/* ---------------------------------------------------------------------------
   Cockpit Executivo — reprodução do produto real (Ndlela.bi) dentro do site.
   Usa os mesmos tokens do resto das páginas: brand #184f95, ink #0b0b0b,
   gray-mid #52514e, gray-light #8a8985, beige #f1efe8, tipografia Inter.
   A moldura de aplicação (barra superior + barra lateral de ícones) existe para
   o visitante perceber que está a ver o produto, e não uma secção do site.
--------------------------------------------------------------------------- */

.ebc {
  --ebc-brand: #184f95;
  --ebc-ink: #0b0b0b;
  --ebc-mid: #52514e;
  --ebc-light: #8a8985;
  /* Divisórias internas: linha escura ténue, como o border-beige do site.
     Nunca branca — dentro de um cartão fosco o branco desaparece. */
  --ebc-line: rgba(11, 11, 11, 0.08);
  --ebc-radius: 24px;

  position: relative;
  font-family: 'Inter', sans-serif;
  color: var(--ebc-ink);
  /* Igual a .glass-panel: o fundo da página atravessa o painel exterior. */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 48px;
  box-shadow:
    inset 0 1.5px 2px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(11, 11, 11, 0.12),
    0 8px 32px rgba(11, 11, 11, 0.07);
  overflow: hidden;
}

/* Fosco leitoso do site (.glass-frost / .glass-panel--dense), aplicado a tudo
   o que tem números para ler. */
.ebc__topbar,
.ebc__rail,
.ebc__companyBar,
.ebc__periods,
.ebc__result,
.ebc__kpi {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(28px) saturate(125%);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  border-color: rgba(255, 255, 255, 0.7);
}

.ebc__companyBar,
.ebc__periods,
.ebc__result,
.ebc__kpi {
  box-shadow:
    inset 0 1.5px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(11, 11, 11, 0.05),
    0 6px 24px rgba(11, 11, 11, 0.06);
}

/* --- Barra superior ------------------------------------------------------ */

.ebc__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ebc-line);
}

.ebc__brand { display: flex; align-items: center; gap: 10px; }
.ebc__wordmark { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.ebc__wordmarkSuffix { font-size: 12px; font-weight: 500; color: var(--ebc-light); }

.ebc__user { display: flex; align-items: center; gap: 10px; }
.ebc__avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: rgba(230, 241, 251, 0.9); color: var(--ebc-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; flex-shrink: 0;
}
.ebc__userText { display: flex; flex-direction: column; line-height: 1.25; }
.ebc__userText strong { font-size: 13px; font-weight: 700; }
.ebc__userText span { font-size: 11px; color: var(--ebc-light); }

/* --- Corpo --------------------------------------------------------------- */

.ebc__body { display: flex; align-items: stretch; }

.ebc__rail {
  width: 56px;
  flex-shrink: 0;
  border-right: 1px solid var(--ebc-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 0;
}
.ebc__railGroup {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding-top: 10px; margin-top: 6px;
  border-top: 1px solid var(--ebc-line);
  width: 34px;
}
.ebc__railFoot {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--ebc-line);
  width: 34px;
}
.ebc__railBtn {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ebc-light);
}
.ebc__railBtn i, .ebc__railBtn svg { width: 17px; height: 17px; }
.ebc__railBtn--active { background: rgba(230, 241, 251, 0.9); color: var(--ebc-brand); }
.ebc__railBtn--chevron { color: var(--ebc-mid); }

.ebc__main { flex: 1; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; }

/* --- Barra da empresa ---------------------------------------------------- */

.ebc__companyBar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  border: 1px solid;
  border-radius: var(--ebc-radius);
  padding: 12px 16px;
}
.ebc__company { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ebc__company strong { font-weight: 700; }
.ebc__companyIcon {
  width: 30px; height: 30px; border-radius: 9px; background: rgba(230, 241, 251, 0.9); color: var(--ebc-brand);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ebc__companyIcon i, .ebc__companyIcon svg { width: 15px; height: 15px; }
.ebc__place { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ebc-light); }
.ebc__place i, .ebc__place svg { width: 13px; height: 13px; }

.ebc__companyMeta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ebc__demoPill {
  font-size: 11px; font-weight: 600; color: #a16207;
  background: rgba(254, 252, 232, 0.85); border: 1px solid rgba(217, 119, 6, 0.28);
  padding: 4px 12px; border-radius: 999px;
}
.ebc__sync { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ebc-light); }
.ebc__sync i, .ebc__sync svg { width: 13px; height: 13px; }
.ebc__sync b { color: var(--ebc-brand); font-weight: 600; }

/* --- Título -------------------------------------------------------------- */

.ebc__pageTitle {
  background: rgba(241, 239, 232, 0.72);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--ebc-radius);
  padding: 20px 22px;
}
.ebc__pageTitle h3 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.ebc__pageTitle p { font-size: 13.5px; color: var(--ebc-mid); margin-top: 2px; }

/* --- Períodos ------------------------------------------------------------ */

.ebc__periods {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  border: 1px solid;
  border-radius: 14px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
}
.ebc__period {
  font-family: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--ebc-mid);
  background: none; border: 0; cursor: pointer;
  padding: 7px 13px; border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.ebc__period:hover { color: var(--ebc-brand); }
.ebc__period--active { background: var(--ebc-brand); color: #ffffff; }
.ebc__period--active:hover { color: #ffffff; }
.ebc__period--sep {
  border-left: 1px solid var(--ebc-line);
  margin-left: 4px; padding-left: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ebc-mid); opacity: 1; cursor: default;
}
.ebc__period--sep i, .ebc__period--sep svg { width: 15px; height: 15px; flex-shrink: 0; }

.ebc__periodLine {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 12px; color: var(--ebc-light);
  margin-top: -4px;
}
.ebc__periodLine span { display: inline-flex; align-items: center; gap: 5px; }
.ebc__periodLine i, .ebc__periodLine svg { width: 13px; height: 13px; }

/* --- Resultado operacional ----------------------------------------------- */

.ebc__result {
  border: 1px solid;
  border-radius: var(--ebc-radius);
  overflow: hidden;
}
.ebc__resultHead { position: relative; background: rgba(230, 241, 251, 0.62); padding: 20px 22px; overflow: hidden; }
.ebc__resultLabel {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ebc-brand);
}
.ebc__resultValue { display: block; font-size: 33px; font-weight: 700; letter-spacing: -0.025em; margin-top: 6px; }
.ebc__resultArt { position: absolute; right: 10px; top: -6px; width: 190px; height: 150px; pointer-events: none; }

.ebc__resultCols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ebc-line);
}
.ebc__resultCols > div { padding: 14px 22px; }
.ebc__resultCols > div + div { border-left: 1px solid var(--ebc-line); }
.ebc__resultCols span {
  display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ebc-light); margin-bottom: 4px;
}
.ebc__resultCols strong { font-size: 17px; font-weight: 700; }
.ebc__resultCols em { font-style: normal; font-size: 12.5px; color: var(--ebc-mid); }
.ebc__accent { color: var(--ebc-brand); }

.ebc__resultBreak {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--ebc-line);
  padding: 14px 22px;
}
.ebc__resultBreak ul {
  display: flex; flex-wrap: wrap; gap: 6px 26px;
  font-size: 12.5px; color: var(--ebc-mid);
  flex: 1 1 460px; min-width: 0;
}
.ebc__resultBreak li { display: inline-flex; align-items: baseline; gap: 5px; }
.ebc__resultBreak b { color: var(--ebc-ink); font-weight: 700; }
.ebc__sign { font-weight: 700; }
.ebc__sign--pos { color: var(--ebc-brand); }
.ebc__sign--neg { color: #b91c1c; }

.ebc__link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--ebc-brand);
  white-space: nowrap;
}
.ebc__link:hover { text-decoration: underline; }
.ebc__link i, .ebc__link svg { width: 14px; height: 14px; }

/* --- Alerta de nível 3 --------------------------------------------------- */

.ebc__alert {
  display: flex; align-items: center; gap: 14px;
  background: rgba(254, 244, 244, 0.82);
  backdrop-filter: blur(28px) saturate(125%);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: var(--ebc-radius);
  padding: 14px 18px;
  box-shadow:
    inset 0 1.5px 2px rgba(255, 255, 255, 0.6),
    0 6px 24px rgba(11, 11, 11, 0.06);
}
.ebc__alertIcon {
  width: 38px; height: 38px; border-radius: 10px; background: #dc2626; color: #ffffff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ebc__alertIcon i, .ebc__alertIcon svg { width: 19px; height: 19px; }
.ebc__alertText { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ebc__alertText strong {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #b91c1c;
}
.ebc__alertText span { font-size: 13.5px; color: #7f1d1d; line-height: 1.45; }
.ebc__alertArrow { width: 17px; height: 17px; color: #b91c1c; margin-left: auto; flex-shrink: 0; }

/* --- Indicadores --------------------------------------------------------- */

.ebc__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.ebc__kpi {
  position: relative;
  border: 1px solid;
  border-radius: var(--ebc-radius);
  padding: 16px 18px;
  overflow: hidden;
}
.ebc__kpiArt {
  position: absolute; right: -16px; bottom: -20px;
  width: 118px; height: 118px; color: var(--ebc-brand);
  opacity: 0.07; pointer-events: none;
  transform: rotate(45deg);
}
.ebc__kpiLabel { font-size: 13.5px; color: var(--ebc-mid); }
.ebc__kpiValue { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin-top: 4px; }
.ebc__kpiUnit { font-size: 12px; font-weight: 600; color: var(--ebc-mid); margin-left: 3px; }

.ebc__kpiCmp { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.ebc__kpiRow { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ebc__kpiDelta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.ebc__kpiDelta i, .ebc__kpiDelta svg { width: 13px; height: 13px; }
.ebc__up { color: #15803d; }
.ebc__down { color: #dc2626; }
.ebc__kpiRef { color: var(--ebc-light); }
.ebc__kpiNote { font-size: 12px; color: var(--ebc-light); margin-top: 8px; }

.ebc__kpiProj {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--ebc-line);
  display: flex; flex-direction: column; gap: 2px;
}
.ebc__kpiProjNote { font-size: 11px; color: var(--ebc-light); }

/* --- Responsivo ---------------------------------------------------------- */

@media (max-width: 900px) {
  .ebc__kpis { grid-template-columns: repeat(2, 1fr); }
  .ebc__resultCols { grid-template-columns: 1fr; }
  .ebc__resultCols > div + div { border-left: 0; border-top: 1px solid var(--ebc-line); }
}

@media (max-width: 640px) {
  .ebc__rail { display: none; }
  .ebc__kpis { grid-template-columns: 1fr; }
  .ebc__resultValue { font-size: 26px; }
  .ebc__resultArt { display: none; }
  .ebc__main { padding: 12px; }
  .ebc__userText { display: none; }
  /* Os separadores de período deslizam na horizontal em vez de partirem a caixa */
  .ebc__periods { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .ebc__period { white-space: nowrap; }
}
