/* ============================================================
   BDS One · mock da interface (componente da LP) · cockpit do CEO
   Escopo: tudo sob .one-mock · prefixo one-
   Paleta estrita: #0D0D0D / #121212 / #171717 / #FAFAFA / #ED7D31 (só fio/ponto)
   ============================================================ */

.one-mock {
  --one-bg: #0D0D0D;
  --one-s1: #121212;
  --one-s2: #171717;
  --one-line: rgba(250, 250, 250, .08);
  --one-line-hi: rgba(250, 250, 250, .14);
  --one-top: rgba(250, 250, 250, .06);
  --one-fg: #FAFAFA;
  --one-fg2: rgba(250, 250, 250, .55);
  --one-fg3: rgba(250, 250, 250, .38);
  --one-or: #ED7D31;
  --one-r: 14px;
  --one-pad: clamp(12px, 1.5vw, 18px);
  --one-gap: clamp(8px, 1vw, 12px);
  --one-fs-xs: clamp(9px, .68vw, 10.5px);
  --one-fs-sm: clamp(10.5px, .84vw, 12.5px);
  --one-fs-md: clamp(12px, .95vw, 14px);
  --one-fs-h: clamp(15px, 1.35vw, 20px);
  --one-fs-kpi: clamp(15px, 1.45vw, 21px);
  --one-ff-h: "Space Grotesk", "Inter", system-ui, sans-serif;
  --one-ff-b: "Inter", system-ui, -apple-system, sans-serif;
  --one-ff-m: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--one-r);
  background:
    radial-gradient(60% 50% at 100% 100%, rgba(237, 125, 49, .10), transparent 70%),
    linear-gradient(180deg, rgba(250, 250, 250, .025), transparent 40%),
    var(--one-s1);
  border: 1px solid var(--one-line);
  box-shadow:
    inset 0 1px 0 var(--one-top),
    0 1px 0 rgba(250, 250, 250, .03),
    0 30px 80px -20px rgba(0, 0, 0, .85),
    0 12px 32px -12px rgba(0, 0, 0, .7);
  color: var(--one-fg);
  font-family: var(--one-ff-b);
  font-size: var(--one-fs-sm);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.one-mock *, .one-mock *::before, .one-mock *::after { box-sizing: border-box; }
.one-mock ul { list-style: none; margin: 0; padding: 0; }
.one-mock h1, .one-mock h2, .one-mock h3, .one-mock p { margin: 0; }

/* Rótulo mono (reutilizável) */
.one-mono {
  font-family: var(--one-ff-m);
  font-size: var(--one-fs-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--one-fg2);
  font-weight: 400;
}

/* ---------- Barra superior ---------- */
.one-titlebar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: clamp(8px, .8vw, 12px) var(--one-pad);
  border-bottom: 1px solid var(--one-line);
  background: rgba(250, 250, 250, .012);
}
.one-dots { display: flex; gap: 7px; }
.one-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(250, 250, 250, .10);
  border: 1px solid var(--one-line-hi);
}
.one-title {
  font-family: var(--one-ff-h);
  font-weight: 500;
  font-size: var(--one-fs-sm);
  color: var(--one-fg2);
  letter-spacing: .01em;
  white-space: nowrap;
}
.one-title b { color: var(--one-fg); font-weight: 600; }
.one-live {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--one-line);
  background: var(--one-s2);
  font-family: var(--one-ff-m);
  font-size: var(--one-fs-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--one-fg2);
}
.one-live i {
  position: relative;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--one-or);
}
.one-live i::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--one-or);
  opacity: 0;
  animation: one-pulse 2s ease-out infinite;
}
@keyframes one-pulse {
  0%   { transform: scale(.4); opacity: .9; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ---------- Corpo: sidebar + main ---------- */
.one-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.one-side {
  display: flex; flex-direction: column;
  padding: var(--one-pad) 0;
  border-right: 1px solid var(--one-line);
  background: rgba(0, 0, 0, .18);
  min-height: 0;
  overflow: hidden;
}
.one-brand {
  font-family: var(--one-ff-h);
  font-weight: 600;
  font-size: var(--one-fs-md);
  letter-spacing: .14em;
  padding: 0 var(--one-pad) clamp(12px, 1.4vw, 18px);
  color: var(--one-fg);
}
.one-brand small {
  display: block;
  margin-top: 4px;
  font-family: var(--one-ff-m);
  font-weight: 400;
  font-size: var(--one-fs-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--one-fg3);
}
.one-nav li {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: clamp(5px, .55vw, 7px) var(--one-pad);
  font-size: var(--one-fs-sm);
  color: var(--one-fg2);
  border-left: 2px solid transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.one-nav li::before {
  content: "";
  width: 12px; height: 12px; flex: 0 0 12px;
  border-radius: 3px;
  border: 1px solid var(--one-line-hi);
  background: rgba(250, 250, 250, .03);
}
.one-nav li.is-active {
  color: var(--one-fg);
  border-left-color: var(--one-or);
  background: linear-gradient(90deg, rgba(250, 250, 250, .035), transparent);
}
.one-nav li.is-active::before {
  border-color: var(--one-or);
  background: transparent;
}
.one-side-foot {
  margin-top: auto;
  padding: var(--one-pad) var(--one-pad) 0;
  color: var(--one-fg3);
}

/* ---------- Área principal ---------- */
.one-main {
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  gap: var(--one-gap);
  padding: var(--one-pad);
}
.one-head { display: flex; flex-direction: column; gap: 3px; }
.one-head .one-mono span { white-space: nowrap; }
.one-head h1 {
  font-family: var(--one-ff-h);
  font-weight: 600;
  font-size: var(--one-fs-h);
  letter-spacing: -.01em;
  line-height: 1.1;
}

/* KPIs · 6 tiles */
.one-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--one-gap);
}
.one-kpi {
  position: relative;
  padding: clamp(8px, .9vw, 12px) clamp(9px, 1vw, 13px);
  border-radius: 10px;
  border: 1px solid var(--one-line);
  background: var(--one-s2);
  box-shadow: inset 0 1px 0 var(--one-top);
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.one-kpi-label {
  display: flex; align-items: flex-start; gap: 6px;
  line-height: 1.3;
  min-height: 2.6em;
  min-width: 0;
  overflow: hidden;
}
.one-kpi-label::before {
  content: "";
  width: 6px; height: 6px; flex: 0 0 6px;
  margin-top: .32em;
  border-radius: 50%;
  background: var(--one-or);
}
.one-kpi.is-alert .one-kpi-label { flex-wrap: wrap; row-gap: 2px; }
.one-flag {
  flex: 0 0 auto;
  margin-left: 12px;
  font-style: normal;
  font-size: .9em;
  letter-spacing: .08em;
  color: var(--one-or);
  padding: 1px 6px;
  border: 1px solid rgba(237, 125, 49, .55);
  border-radius: 999px;
  line-height: 1.25;
  white-space: nowrap;
}
.one-kpi-value {
  font-family: var(--one-ff-h);
  font-weight: 600;
  font-size: var(--one-fs-kpi);
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--one-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.one-kpi-sub {
  font-size: var(--one-fs-xs);
  color: var(--one-fg2);
  line-height: 1.3;
}

/* Grade: fluxo de caixa (esq., 2 linhas) + DRE + prazos (dir.) */
.one-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "chart dre"
    "chart due";
  gap: var(--one-gap);
}
.one-card-chart { grid-area: chart; }
.one-card-dre   { grid-area: dre; }
.one-card-due   { grid-area: due; }

.one-card {
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  padding: clamp(10px, 1.1vw, 14px);
  border-radius: 10px;
  border: 1px solid var(--one-line);
  background: var(--one-s2);
  box-shadow: inset 0 1px 0 var(--one-top);
}
.one-card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: clamp(7px, .9vw, 12px);
}
.one-card-head h2 {
  font-family: var(--one-ff-h);
  font-weight: 500;
  font-size: var(--one-fs-md);
  letter-spacing: -.005em;
  color: var(--one-fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.one-card-head h2 span { color: var(--one-fg2); font-weight: 400; }
.one-card-head > .one-mono { white-space: nowrap; color: var(--one-fg3); }

/* Gráfico de barras CSS · fluxo de caixa 13 semanas */
.one-chart {
  flex: 1 1 auto;
  min-height: 120px;
  display: flex; flex-direction: column;
}
.one-bars {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: clamp(3px, .5vw, 8px);
  align-items: end;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--one-line);
  background:
    repeating-linear-gradient(180deg, var(--one-line) 0 1px, transparent 1px 25%);
  background-size: 100% 100%;
  background-position: 0 0;
}
.one-bars i {
  display: block;
  height: var(--h, 40%);
  border-radius: 3px 3px 0 0;
  background:
    linear-gradient(180deg, rgba(250, 250, 250, .26), rgba(250, 250, 250, .14));
}
.one-bars i.is-current {
  background:
    linear-gradient(180deg, rgba(250, 250, 250, .34), rgba(250, 250, 250, .16));
  border-top: 2px solid var(--one-or);
}
/* linha de mínimo de segurança */
.one-floor {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--y, 40%) + 8px);
  height: 0;
  border-top: 1px dashed rgba(250, 250, 250, .25);
  pointer-events: none;
}
.one-floor b {
  position: absolute;
  right: 0; bottom: 3px;
  font-weight: 400;
  color: var(--one-fg3);
  background: var(--one-s2);
  padding: 0 4px;
  letter-spacing: .05em;
}
.one-axis {
  display: flex; justify-content: space-between;
  padding-top: 6px;
}
.one-axis span { color: var(--one-fg3); }
.one-legend { display: flex; gap: 12px; align-items: center; flex: 0 0 auto; }
.one-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.one-legend span::before {
  content: ""; width: 10px; height: 2px; background: rgba(250, 250, 250, .3);
}
.one-legend span.is-dim::before { background: rgba(250, 250, 250, .14); }
.one-legend span.is-or::before { background: var(--one-or); }

/* DRE resumida */
.one-dre {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.one-dre li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: clamp(3px, .4vw, 5px) 0 clamp(3px, .4vw, 5px) 8px;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--one-line);
  font-size: var(--one-fs-sm);
  color: var(--one-fg2);
}
.one-dre li:last-child { border-bottom: 0; }
.one-dre li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.one-dre li b {
  font-family: var(--one-ff-m);
  font-weight: 400;
  font-size: var(--one-fs-xs);
  letter-spacing: .02em;
  color: var(--one-fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.one-dre li.is-total {
  margin-top: 2px;
  border-left-color: var(--one-or);
  color: var(--one-fg);
}
.one-dre li.is-total span { font-weight: 500; }
.one-dre li.is-total b {
  font-family: var(--one-ff-h);
  font-weight: 600;
  font-size: var(--one-fs-md);
  letter-spacing: -.01em;
}

/* Obrigações e prazos */
.one-due {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  justify-content: space-between;
  gap: clamp(4px, .5vw, 7px);
}
.one-due li {
  position: relative;
  display: grid;
  grid-template-columns: 10px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding-left: 2px;
}
.one-due li::before {
  content: "";
  grid-column: 1;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(250, 250, 250, .32);
  justify-self: center;
}
.one-due li.is-next::before { background: var(--one-or); }
.one-due li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 4.5px; top: calc(50% + 6px); bottom: calc(-1 * clamp(4px, .5vw, 7px) - 6px);
  width: 1px;
  background: var(--one-line);
}
.one-due time {
  font-family: var(--one-ff-m);
  font-size: var(--one-fs-xs);
  letter-spacing: .04em;
  color: var(--one-fg3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.one-due li.is-next time { color: var(--one-fg); }
.one-due p {
  font-size: var(--one-fs-sm);
  color: var(--one-fg2);
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.one-due li.is-next p { color: var(--one-fg); }
.one-due em {
  font-style: normal;
  color: var(--one-fg3);
  white-space: nowrap;
  padding: 1px 6px;
  border: 1px solid var(--one-line);
  border-radius: 999px;
  letter-spacing: .05em;
}
.one-due li.is-next em { color: var(--one-fg2); border-color: var(--one-line-hi); }

/* Faixa inferior · 3 mini-cards (módulos) */
.one-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--one-gap);
}
.one-mini {
  min-width: 0;
  padding: clamp(8px, .9vw, 11px) clamp(10px, 1vw, 13px);
  border-radius: 10px;
  border: 1px solid var(--one-line);
  background: rgba(250, 250, 250, .015);
  display: flex; flex-direction: column; gap: 3px;
}
.one-mini-label {
  display: flex; align-items: center; gap: 6px;
  color: var(--one-fg3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.one-mini-label::before {
  content: ""; width: 10px; height: 1px; flex: 0 0 10px;
  background: var(--one-or);
}
.one-mini p {
  font-family: var(--one-ff-h);
  font-weight: 500;
  font-size: var(--one-fs-md);
  color: var(--one-fg);
  letter-spacing: -.005em;
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.one-mini .one-mini-sub {
  font-family: var(--one-ff-b);
  font-weight: 400;
  font-size: var(--one-fs-xs);
  color: var(--one-fg2);
  letter-spacing: 0;
}
.one-mini .one-mini-sub b { font-weight: 500; color: var(--one-fg); }

/* Rodapé do painel */
.one-foot {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 0;
}
.one-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--one-line);
  background: rgba(250, 250, 250, .02);
  font-family: var(--one-ff-m);
  font-size: var(--one-fs-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--one-fg2);
  white-space: nowrap;
}
.one-pill::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--one-or);
}
.one-foot-note { margin-left: auto; color: var(--one-fg3); white-space: nowrap; }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .one-mock { aspect-ratio: auto; }
  .one-body { grid-template-columns: 160px minmax(0, 1fr); }
  .one-side-foot { display: none; }
  .one-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .one-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "chart" "dre" "due";
  }
  .one-chart { min-height: 170px; }
  .one-dre, .one-due { gap: 6px; }
  .one-due li:not(:last-child)::after { bottom: -12px; }
}

@media (max-width: 720px) {
  .one-mock {
    aspect-ratio: auto;
    --one-pad: 14px;
    --one-gap: 10px;
    --one-fs-xs: 9.5px;
    --one-fs-sm: 11.5px;
    --one-fs-md: 13px;
    --one-fs-h: 18px;
    --one-fs-kpi: 18px;
  }
  .one-titlebar { grid-template-columns: auto 1fr auto; }
  .one-title { justify-self: center; }
  .one-body { grid-template-columns: minmax(0, 1fr); }
  .one-side { display: none; }
  .one-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .one-chart { min-height: 150px; }
  .one-bars { min-height: 110px; }
  .one-floor b { display: none; }
  .one-legend { display: none; }
  .one-card-head { flex-wrap: wrap; }
  .one-card-head h2 { white-space: normal; }
  .one-due li { grid-template-columns: 10px auto minmax(0, 1fr); }
  .one-due em { display: none; }
  .one-due p { white-space: normal; }
  .one-strip { grid-template-columns: minmax(0, 1fr); }
  .one-mini p, .one-mini-label { white-space: normal; }
  .one-foot-note { display: none; }
}

@media (max-width: 400px) {
  .one-title b + span { display: none; }
  .one-head .one-mono .is-opt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .one-live i::after { animation: none; }
}
