/* ==========================================================================
   VOX EDU — sistema visual
   Identidade VOX: turquesa da marca (#0FA9A0) sobre tinta azul-petróleo,
   canvas cinza levemente azulado e superfícies brancas.
   Tipografia auto-hospedada (IBM Plex Sans) — nada de CDN de fonte.
   Só Plex, em pesos diferentes: a marca VOX é tecnológica e moderna, uma
   display serifada (tipo Fraunces) puxaria pro lado editorial/heráldico,
   que é de outra casa.
   ========================================================================== */

@font-face {
  font-family: "Plex";
  src: url("../fonts/plex-latin.woff2") format("woff2");
  font-weight: 100 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex";
  src: url("../fonts/plex-latin-ext.woff2") format("woff2");
  font-weight: 100 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- tokens -- */
:root {
  --canvas:      #EFF4F6;
  --surface:     #FFFFFF;
  --surface-2:   #F6FAFB;
  --surface-3:   #E9F1F3;

  --ink:         #0F2A33;
  --ink-2:       #446771;
  --ink-3:       #7A97A1;

  --line:        #E2EAEE;
  --line-2:      #CBD9DF;

  --brand:       #0FA9A0;
  --brand-hover: #0C8981;
  --brand-soft:  #4ECDC5;
  --brand-wash:  #E0F5F3;
  --brand-ink:   #FFFFFF;
  --brand-deep:  #0A3F45;   /* turquesa escuro — login, marca, faixas */
  --brand-deep2: #072E33;

  --ok:   #10795A;  --ok-wash:   #E1F3EC;
  --warn: #9C6207;  --warn-wash: #FBF0DF;
  --bad:  #BE3A32;  --bad-wash:  #FBE9E7;
  --info: #1D6FA5;  --info-wash: #E5F0F8;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px;
  --sh-1: 0 1px 2px rgba(15,42,51,.05);
  --sh-2: 0 1px 2px rgba(15,42,51,.04), 0 6px 18px -6px rgba(15,42,51,.13);
  --sh-3: 0 14px 44px -14px rgba(10,63,69,.32);

  --sidebar-w: 256px;
  --topbar-h:  64px;

  /* barra do topo = MÓDULOS da suíte. Fundo escuro da marca, constante nos
     dois temas, pra separar visualmente "em que módulo estou" de "o que faço
     dentro dele" (que é a barra lateral). Mesmo padrão do CRM GAM. */
  --tb-bg:     #0A3F45;
  --tb-line:   rgba(255,255,255,.10);
  --tb-ink:    #EAF7F6;
  --tb-ink-2:  #85B3B4;

  --font-ui: "Plex", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #061A1E; --surface: #0D2A30; --surface-2: #103239; --surface-3: #163C44;
    --ink: #EAF5F6; --ink-2: #A3C0C7; --ink-3: #6D8E97;
    --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.18);
    --brand: #2FC6BC; --brand-hover: #46D6CC; --brand-soft: #7BE0D8;
    --brand-wash: rgba(47,198,188,.16); --brand-ink: #04211F;
    --brand-deep: #04212A; --brand-deep2: #02171D;
    --ok:   #3FC08F;  --ok-wash:   rgba(63,192,143,.15);
    --warn: #E0A64F;  --warn-wash: rgba(224,166,79,.15);
    --bad:  #E8827A;  --bad-wash:  rgba(232,130,122,.15);
    --info: #5BB0E6;  --info-wash: rgba(91,176,230,.15);
    --sh-1: 0 1px 2px rgba(0,0,0,.34);
    --sh-2: 0 1px 2px rgba(0,0,0,.28), 0 6px 18px -6px rgba(0,0,0,.55);
    --sh-3: 0 14px 44px -14px rgba(0,0,0,.75);
    --tb-bg: #04212A; --tb-line: rgba(255,255,255,.09);
    --tb-ink: #DDF2F0; --tb-ink-2: #6E9A9C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #061A1E; --surface: #0D2A30; --surface-2: #103239; --surface-3: #163C44;
  --ink: #EAF5F6; --ink-2: #A3C0C7; --ink-3: #6D8E97;
  --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.18);
  --brand: #2FC6BC; --brand-hover: #46D6CC; --brand-soft: #7BE0D8;
  --brand-wash: rgba(47,198,188,.16); --brand-ink: #04211F;
  --brand-deep: #04212A; --brand-deep2: #02171D;
  --ok:   #3FC08F;  --ok-wash:   rgba(63,192,143,.15);
  --warn: #E0A64F;  --warn-wash: rgba(224,166,79,.15);
  --bad:  #E8827A;  --bad-wash:  rgba(232,130,122,.15);
  --info: #5BB0E6;  --info-wash: rgba(91,176,230,.15);
  --sh-1: 0 1px 2px rgba(0,0,0,.34);
  --sh-2: 0 1px 2px rgba(0,0,0,.28), 0 6px 18px -6px rgba(0,0,0,.55);
  --sh-3: 0 14px 44px -14px rgba(0,0,0,.75);
  --tb-bg: #04212A; --tb-line: rgba(255,255,255,.09);
  --tb-ink: #DDF2F0; --tb-ink-2: #6E9A9C;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base -- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas); color: var(--ink); font-family: var(--font-ui);
  font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-wash); color: var(--ink); }
svg.ic { width: 1em; height: 1em; flex: 0 0 auto; stroke: currentColor; fill: none;
         stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.small { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.tcenter { text-align: center; }
.tright { text-align: right; }

/* ------------------------------------------------------------- marca VOX -- */
/* O logotipo é escrito, não uma imagem: "VOX" em peso alto + "EDU" em turquesa. */
.marca { font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.marca .edu { color: var(--brand); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-hover));
  color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: -0.05em;
  box-shadow: 0 3px 10px -3px rgba(15,169,160,.6);
}

/* ------------------------------------------------------------- estrutura -- */
/* A barra lateral começa ABAIXO da barra do topo: em cima ficam os MÓDULOS da
   suíte (onde estou), aqui dentro só o que pertence ao módulo ativo (o que faço). */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: var(--sidebar-w); z-index: 45;
  background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; border-right: 1px solid var(--line);
  transition: transform .24s cubic-bezier(.4,0,.2,1);
}
/* cabeçalho da lateral: rótulo miúdo em cima, nome do módulo grande embaixo */
.sb-modulo-atual { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.sb-modulo-atual .rotulo {
  font-size: .6rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--ink-3); font-weight: 700;
}
.sb-modulo-atual .nome {
  display: flex; align-items: center; gap: 9px; margin-top: 4px;
  font-size: 1.06rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
}
.sb-modulo-atual .nome svg.ic { width: 19px; height: 19px; color: var(--brand); }

.sb-nav { flex: 1; overflow-y: auto; padding: 6px 12px 8px; }
.sb-sec { font-size: .6rem; text-transform: uppercase; letter-spacing: .14em;
          color: var(--ink-3); padding: 15px 11px 5px; font-weight: 700; }
.sb-nav button.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 11px;
  border-radius: 9px; border: none; background: transparent; color: var(--ink-2);
  font-family: inherit; font-size: .855rem; font-weight: 500; cursor: pointer;
  position: relative; text-align: left; transition: background .13s, color .13s;
}
.sb-nav button.nav-item svg.ic { width: 17px; height: 17px; color: var(--ink-3); }
.sb-nav button.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.sb-nav button.nav-item:hover svg.ic { color: var(--ink-2); }
.sb-nav button.nav-item.active {
  background: var(--brand-wash); color: var(--brand-hover); font-weight: 600;
}
:root[data-theme="dark"] .sb-nav button.nav-item.active { color: var(--brand-soft); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sb-nav button.nav-item.active { color: var(--brand-soft); }
}
.sb-nav button.nav-item.active svg.ic { color: var(--brand); }
.sb-nav button.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.sb-pe { padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.sb-pe .quem { display: flex; align-items: center; gap: 9px; }
.sb-pe .quem .txt { min-width: 0; line-height: 1.2; }
.sb-pe .quem b { font-size: .79rem; display: block; overflow: hidden;
                 text-overflow: ellipsis; white-space: nowrap; }
.sb-pe .quem span { font-size: .68rem; color: var(--ink-3); }

/* fica ABAIXO da barra lateral (45) e da barra do topo (60), pra o menu e as
   abas de módulo continuarem clicáveis com o menu aberto no celular */
.sb-fundo { position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(6,26,30,.5); z-index: 44;
            opacity: 0; pointer-events: none; transition: opacity .2s; }
.sb-fundo.on { opacity: 1; pointer-events: auto; }

.app-body { margin-left: var(--sidebar-w); padding-top: var(--topbar-h);
            display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

/* ---- barra do topo: MARCA à esquerda · MÓDULOS no centro · ações à direita -- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--topbar-h);
  background: var(--tb-bg); color: var(--tb-ink);
  border-bottom: 1px solid var(--tb-line);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
}
.tb-menu { display: none; background: transparent; border: none; color: var(--tb-ink-2);
           cursor: pointer; padding: 9px; border-radius: 9px; line-height: 0; flex: 0 0 auto; }
.tb-menu svg.ic { width: 20px; height: 20px; }
.tb-menu:hover { background: rgba(255,255,255,.09); color: #fff; }

/* marca e ações crescem igual dos dois lados, então as abas de módulo ficam
   exatamente no centro da barra — não só "no meio do que sobrou". */
.tb-marca { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0;
            padding-right: 14px; border-right: 1px solid var(--tb-line); }
.tb-marca .logo-mark { width: 34px; height: 34px; border-radius: 9px; font-size: .88rem; }
.tb-marca .nome { font-size: 1.04rem; color: #fff; }
.tb-marca .nome .edu { color: var(--brand-soft); }
.tb-marca .unidade { font-size: .67rem; color: var(--tb-ink-2); margin-top: 2px;
                     max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* com 2+ unidades a linha da unidade vira um seletor, sem mudar de lugar */
.tb-marca select.unidade {
  appearance: none; -webkit-appearance: none; border: none; background: transparent;
  color: var(--tb-ink-2); font-family: inherit; font-size: .67rem; font-weight: 600;
  padding: 1px 14px 1px 0; margin-top: 1px; cursor: pointer; max-width: 200px;
  background-image: linear-gradient(45deg, transparent 50%, var(--tb-ink-2) 50%),
                    linear-gradient(135deg, var(--tb-ink-2) 50%, transparent 50%);
  background-position: right 4px top 60%, right 0px top 60%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.tb-marca select.unidade:hover { color: #fff; }
.tb-marca select.unidade option { color: var(--ink); background: var(--surface); }

/* abas de módulo — centralizadas entre a marca e as ações */
.tb-modulos {
  flex: 0 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center;
  gap: 3px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tb-modulos::-webkit-scrollbar { display: none; }
.tb-mod {
  display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px;
  border: none; background: transparent; color: var(--tb-ink-2); font-family: inherit;
  font-size: .85rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  position: relative; transition: background .14s, color .14s;
}
.tb-mod svg.ic { width: 16px; height: 16px; }
.tb-mod:hover { background: rgba(255,255,255,.08); color: #fff; }
.tb-mod.ativo { background: var(--brand); color: #fff; }
.tb-mod.ativo::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: -12px;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-soft);
}
.tb-mod .selo {
  font-size: .55rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700;
  color: var(--tb-ink-2); background: rgba(255,255,255,.09);
  border-radius: 999px; padding: 3px 6px; white-space: nowrap;
}
.tb-mod.breve { color: var(--tb-ink-2); }
.tb-mod.breve:hover { background: rgba(255,255,255,.06); }

.tb-dir { display: flex; align-items: center; justify-content: flex-end; gap: 7px;
          flex: 1 1 0; min-width: 0; }

.tb-busca { position: relative; display: none; }
@media (min-width: 1180px) { .tb-busca { display: block; } }
.tb-busca svg.ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
                   width: 15px; height: 15px; color: var(--tb-ink-2); pointer-events: none; }
.tb-busca input[type=search] {
  width: 200px; padding: 8px 14px 8px 34px; font-size: .82rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #fff;
  font-family: inherit; transition: width .18s, border-color .14s, background .14s;
}
.tb-busca input::placeholder { color: var(--tb-ink-2); }
.tb-busca input[type=search]:focus {
  width: 265px; outline: none; border-color: var(--brand-soft);
  background: rgba(255,255,255,.14); box-shadow: none;
}

/* caminho da tela, que antes ficava na barra do topo */
.pagina-caminho { font-size: .71rem; color: var(--ink-3); font-weight: 600;
                  letter-spacing: .02em; margin-bottom: 10px; }
.tb-res {
  position: absolute; top: calc(100% + 8px); left: 0; width: 330px; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-3); overflow: hidden; max-height: 360px; overflow-y: auto;
}
.tb-res button.res {
  display: block; width: 100%; text-align: left; padding: 10px 13px; border: none;
  background: transparent; color: var(--ink); font-family: inherit; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.tb-res button.res:last-child { border-bottom: none; }
.tb-res button.res:hover { background: var(--brand-wash); }
.tb-res .n { font-size: .84rem; font-weight: 600; }
.tb-res .d { font-size: .72rem; color: var(--ink-3); }

.tb-btn { background: transparent; border: 1px solid transparent; color: var(--tb-ink-2);
          cursor: pointer; padding: 9px; border-radius: 10px; line-height: 0; position: relative;
          display: flex; align-items: center; justify-content: center; }
.tb-btn svg.ic { width: 19px; height: 19px; }
.tb-btn:hover { background: rgba(255,255,255,.09); color: #fff; }
.tb-btn .contador {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--bad); color: #fff; border-radius: 999px; font-size: .61rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--tb-bg); pointer-events: none;
}
.tb-user { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px;
           border-radius: 999px; border: 1px solid rgba(255,255,255,.15);
           background: rgba(255,255,255,.07); cursor: pointer; color: #fff; font-family: inherit; }
.tb-user:hover { border-color: var(--brand-soft); background: rgba(255,255,255,.12); }
.tb-user .quem { text-align: left; line-height: 1.15; display: none; }
@media (min-width: 1320px) { .tb-user .quem { display: block; } }
.tb-user .quem b { font-size: .78rem; font-weight: 600; display: block; }
.tb-user .quem span { font-size: .67rem; color: var(--tb-ink-2); }

.menu-flutuante {
  position: absolute; top: calc(100% + 8px); right: 0; width: 220px; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-3); overflow: hidden; padding: 5px;
}
.menu-flutuante button {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  border: none; background: transparent; color: var(--ink); font-family: inherit;
  font-size: .83rem; text-align: left; border-radius: 8px; cursor: pointer;
}
.menu-flutuante button:hover { background: var(--surface-3); }
.menu-flutuante svg.ic { width: 16px; height: 16px; color: var(--ink-3); }
.menu-flutuante hr { border: none; border-top: 1px solid var(--line); margin: 5px 0; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: .73rem; font-weight: 700; color: #fff; letter-spacing: .02em;
  background: var(--brand);
}
.avatar.lg { width: 38px; height: 38px; font-size: .82rem; }
.avatar.sm { width: 26px; height: 26px; font-size: .63rem; }

main { flex: 1; padding: 22px 20px 40px; max-width: 1400px; width: 100%; margin: 0 auto; }

.rodape-marca {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 20px 28px; color: var(--ink-3); font-size: .74rem;
}
.rodape-marca .marca { font-size: .82rem; }

@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-3); }
  .sidebar.aberta { transform: none; }
  .app-body { margin-left: 0; }
  .tb-menu { display: block; }
  main { padding: 16px 14px 36px; }
}
/* No celular as abas de módulo continuam na barra do topo — só passam a rolar
   na horizontal e encostam à esquerda, em vez de sumirem. */
@media (max-width: 900px) {
  .topbar { padding: 0 10px; gap: 6px; }
  /* aqui as abas passam a ficar com todo o espaço que sobra, rolando na horizontal */
  .tb-marca { padding-right: 10px; flex: 0 0 auto; }
  .tb-dir { flex: 0 0 auto; }
  .tb-marca .nome { font-size: .95rem; }
  .tb-marca .unidade, .tb-marca select.unidade { display: none; }
  .tb-modulos { flex: 1 1 auto; justify-content: flex-start; }
  .tb-mod { padding: 7px 10px; font-size: .8rem; }
  .tb-mod .selo { display: none; }
  .tb-mod.breve::after {
    content: "•"; position: static; height: auto; width: auto; background: none;
    color: var(--tb-ink-2); font-size: .8rem; line-height: 0;
  }
}
@media (max-width: 620px) {
  .tb-marca .nome { display: none; }
  .tb-marca { border-right: none; padding-right: 4px; }
}

/* ------------------------------------------------------------ tipografia -- */
.pagina-topo { display: flex; justify-content: space-between; align-items: flex-start;
               gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
h2.titulo-secao { font-size: 1.3rem; margin: 0 0 3px; font-weight: 700; letter-spacing: -0.025em; }
p.dica { color: var(--ink-3); font-size: .82rem; line-height: 1.6; margin: 0; max-width: 76ch; }
h3.sub-titulo { font-size: .88rem; margin: 20px 0 10px; font-weight: 600; }
.nota-rodape { font-size: .77rem; color: var(--ink-3); line-height: 1.65; margin-top: 18px; max-width: 80ch; }

/* --------------------------------------------------------------- blocos --- */
.card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card { padding: 16px; }
.panel { overflow: hidden; }
.panel + .panel, .card + .card { margin-top: 14px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px 11px;
              border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: .92rem; font-weight: 600; letter-spacing: -0.012em; }
.panel-head .sub { font-size: .73rem; color: var(--ink-3); margin-top: 1px; }
.panel-head .acao { margin-left: auto; font-size: .76rem; font-weight: 600; color: var(--brand);
                    background: transparent; border: none; font-family: inherit; cursor: pointer;
                    padding: 5px 9px; border-radius: 7px; white-space: nowrap; }
.panel-head .acao:hover { background: var(--brand-wash); }
.panel-body { padding: 16px; }
.panel-body.aperta { padding: 8px; }

.grid { display: grid; gap: 14px; }
.grid.g2, .grid.g3, .grid.g4, .grid.g21 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid.g2 { grid-template-columns: repeat(2,1fr); }
  .grid.g4 { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 1080px) {
  .grid.g3 { grid-template-columns: repeat(3,1fr); }
  .grid.g4 { grid-template-columns: repeat(4,1fr); }
  .grid.g21 { grid-template-columns: 2fr 1fr; }
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.row.fim { align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.mb { margin-bottom: 16px; }
.mt { margin-top: 16px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: none; }

/* ------------------------------------------------------------------ KPI --- */
.kpi-row { display: grid; gap: 12px; margin-bottom: 18px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 660px)  { .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .kpi-row { grid-template-columns: repeat(4, 1fr); } }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px; box-shadow: var(--sh-1); display: flex; gap: 12px; align-items: flex-start;
  font-family: inherit; text-align: left; width: 100%;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
button.kpi { cursor: pointer; color: inherit; }
button.kpi:hover { border-color: var(--brand-soft); box-shadow: var(--sh-2); transform: translateY(-1px); }
.kpi-ic { width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
          display: flex; align-items: center; justify-content: center;
          background: var(--brand-wash); color: var(--brand); }
.kpi-ic svg.ic { width: 18px; height: 18px; }
.kpi-ic.ok   { background: var(--ok-wash);   color: var(--ok); }
.kpi-ic.warn { background: var(--warn-wash); color: var(--warn); }
.kpi-ic.bad  { background: var(--bad-wash);  color: var(--bad); }
.kpi-ic.info { background: var(--info-wash); color: var(--info); }
.kpi .txt { min-width: 0; }
.kpi .k { font-size: .725rem; color: var(--ink-3); font-weight: 500; line-height: 1.3; }
.kpi .v { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; margin-top: 3px; }
.kpi .v.menor { font-size: 1.05rem; letter-spacing: -0.02em; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: .71rem;
         font-weight: 600; margin-top: 3px; color: var(--ink-3); }
.delta svg.ic { width: 12px; height: 12px; }
.delta.sobe { color: var(--ok); }
.delta.desce { color: var(--bad); }

/* ------------------------------------------------------------- elementos -- */
.icon-tile { width: 40px; height: 40px; border-radius: var(--r); flex: 0 0 auto;
             display: flex; align-items: center; justify-content: center;
             background: var(--brand-wash); color: var(--brand); font-weight: 700; font-size: .8rem; }
.icon-tile svg.ic { width: 18px; height: 18px; }
.icon-tile.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-tile.ok { background: var(--ok-wash); color: var(--ok); }
.icon-tile.warn { background: var(--warn-wash); color: var(--warn); }
.icon-tile.bad { background: var(--bad-wash); color: var(--bad); }
.icon-tile.info { background: var(--info-wash); color: var(--info); }

.item-lista { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 16px;
        border-bottom: 1px solid var(--line); color: inherit; text-align: left;
        background: transparent; border-left: none; border-right: none; border-top: none;
        font-family: inherit; width: 100%; }
.item:last-child { border-bottom: none; }
.item.clicavel { cursor: pointer; transition: background .13s; }
.item.clicavel:hover { background: var(--surface-2); }
.item .titulo { font-size: .87rem; font-weight: 600; letter-spacing: -0.005em; }
.item .meta { font-size: .74rem; color: var(--ink-3); margin-top: 2px;
              display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item .meta svg.ic { width: 12px; height: 12px; }
.item .meta .mi { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.item .meta .mi span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .dir { margin-left: auto; text-align: right; flex: 0 0 auto; }
.item .num { font-size: .95rem; font-weight: 700; }
.item .num.g { font-size: 1.3rem; letter-spacing: -0.02em; }

.legenda { display: flex; flex-direction: column; gap: 7px; }
.legenda .li { display: flex; align-items: center; gap: 9px; font-size: .8rem; }
.legenda .li .bolinha { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.legenda .li .rot { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legenda .li .n { margin-left: auto; font-weight: 700; }
.legenda .li .pc { color: var(--ink-3); width: 38px; text-align: right; font-size: .75rem; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
        font-size: .69rem; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.pill svg.ic { width: 11px; height: 11px; }
.pill-ok { background: var(--ok-wash); color: var(--ok); }
.pill-warn { background: var(--warn-wash); color: var(--warn); }
.pill-bad { background: var(--bad-wash); color: var(--bad); }
.pill-neutral { background: var(--brand-wash); color: var(--brand-hover); }
.pill-info { background: var(--info-wash); color: var(--info); }
.pill-off { background: var(--surface-3); color: var(--ink-3); }
:root[data-theme="dark"] .pill-neutral { color: var(--brand-soft); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill-neutral { color: var(--brand-soft); }
}

/* barra de progresso (linha do tempo da turma) */
.barra { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.barra > i { display: block; height: 100%; background: var(--brand); border-radius: 999px;
             transition: width .45s cubic-bezier(.4,0,.2,1); }
.barra.completa > i { background: var(--ok); }
.barra.atrasada > i { background: var(--warn); }

/* aviso destacado (usado nos valores a confirmar da remuneração) */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
         border-radius: var(--r); font-size: .8rem; line-height: 1.55;
         background: var(--warn-wash); color: var(--warn); border: 1px solid transparent; }
.aviso svg.ic { width: 16px; height: 16px; margin-top: 1px; }
.aviso.info { background: var(--info-wash); color: var(--info); }
.aviso.ok { background: var(--ok-wash); color: var(--ok); }
.aviso b { font-weight: 700; }

/* ------------------------------------------------------------ formulário -- */
input[type=text], input[type=number], input[type=tel], input[type=password], input[type=date],
input[type=time], input[type=month], input[type=email], input[type=search], input[type=url],
input[type=file], select, textarea {
  width: 100%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  border-radius: var(--r-sm); padding: 9px 11px; font-size: .88rem; font-family: inherit;
  transition: border-color .13s, box-shadow .13s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-wash);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-2); }
/* o preenchimento automático do Chrome pintava o campo de amarelo/marrom,
   destoando do tema — aqui ele volta pras cores do sistema */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}
textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
label.rotulo { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
               color: var(--ink-3); display: block; margin-bottom: 5px; font-weight: 700; }
.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.field .ajuda { font-size: .72rem; color: var(--ink-3); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 580px) {
  .field-row.duas { grid-template-columns: 1fr 1fr; }
  .field-row.tres { grid-template-columns: repeat(3,1fr); }
  .field-row.quatro { grid-template-columns: repeat(2,1fr); }
}
@media (min-width: 900px) { .field-row.quatro { grid-template-columns: repeat(4,1fr); } }
label.check { display: flex; align-items: center; gap: 8px; font-size: .85rem; cursor: pointer; }
label.check input { width: auto; }
input[type=range] { width: 100%; accent-color: var(--brand); }

.btn { border: 1px solid transparent; border-radius: var(--r-sm); padding: 9px 15px;
       font-size: .85rem; font-weight: 600; cursor: pointer; font-family: inherit;
       display: inline-flex; align-items: center; justify-content: center; gap: 7px;
       text-decoration: none; white-space: nowrap;
       transition: background .13s, border-color .13s, color .13s, opacity .13s; }
.btn svg.ic { width: 15px; height: 15px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-escuro { background: var(--brand-deep); color: #fff; }
.btn-escuro:hover { background: var(--brand-deep2); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.btn-danger { background: var(--bad-wash); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-success { background: var(--ok-wash); color: var(--ok); }
.btn-success:hover { background: var(--ok); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 11px; font-size: .77rem; border-radius: 7px; }
.btn-lg { padding: 13px 20px; font-size: .95rem; border-radius: var(--r); }

.chip-linha { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
        border-radius: 999px; padding: 6px 13px; font-size: .78rem; font-weight: 600;
        cursor: pointer; font-family: inherit; transition: all .13s; white-space: nowrap; }
.chip:hover { border-color: var(--brand-soft); }
.chip.ativo { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* segmentado de presença — alvos grandes, pensados pro celular na sala */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.seg button { border: none; background: var(--surface); padding: 10px 14px; font-size: .8rem;
              font-weight: 600; cursor: pointer; color: var(--ink-3); font-family: inherit;
              min-height: 42px; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: none; }
.seg button:hover { background: var(--surface-2); }
.seg button.on-presente { background: var(--ok-wash); color: var(--ok); }
.seg button.on-falta { background: var(--bad-wash); color: var(--bad); }
.seg button.on-reposicao { background: var(--warn-wash); color: var(--warn); }
@media (max-width: 520px) { .seg { width: 100%; } .seg button { flex: 1; padding: 10px 6px; } }

/* linha de presença */
.presenca-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
                align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.presenca-row:last-child { border-bottom: none; }
.presenca-row > .quem { flex: 1 1 220px; min-width: 0; }
.presenca-row .nome { font-size: .89rem; font-weight: 600; }

/* ------------------------------------------------------------ permissões -- */
/* São muitas funções — a tela precisa ser rápida de operar, não um paredão de
   caixinhas soltas: agrupada igual ao menu, com atalhos por módulo e por grupo. */
.perm-modulo { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.perm-modulo .cab { display: flex; align-items: center; gap: 9px; padding: 10px 12px;
                    background: var(--surface-2); border-bottom: 1px solid var(--line); }
.perm-modulo .cab svg.ic { width: 16px; height: 16px; color: var(--brand); }
.perm-modulo .cab b { font-size: .87rem; }
.perm-modulo .cab .conta { font-size: .72rem; color: var(--ink-3); }
.perm-modulo.desligado { opacity: .6; }
.perm-grupo { padding: 9px 12px; border-bottom: 1px dashed var(--line); }
.perm-grupo:last-child { border-bottom: none; }
.perm-grupo .rot { display: flex; align-items: center; gap: 8px; font-size: .65rem;
                   text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
                   font-weight: 700; margin-bottom: 6px; }
.perm-itens { display: grid; grid-template-columns: 1fr; gap: 3px 16px; }
@media (min-width: 560px) { .perm-itens { grid-template-columns: 1fr 1fr; } }
.perm-itens label { font-size: .82rem; padding: 3px 0; }
.link-mini { background: none; border: none; color: var(--brand); font-family: inherit;
             font-size: .71rem; font-weight: 700; cursor: pointer; padding: 2px 7px;
             border-radius: 6px; white-space: nowrap; }
.link-mini:hover { background: var(--brand-wash); }

/* -------------------------------------------------------------- tabelas --- */
table.data { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px;
                               border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data thead th { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em;
                      color: var(--ink-3); font-weight: 700; background: var(--surface-2); }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.wrap, table.data th.wrap { white-space: normal; min-width: 160px; }
table.data td.acoes { text-align: right; }
table.data td.acoes .btn { margin-left: 5px; }
table.data input, table.data select { padding: 6px 8px; font-size: .8rem; }
/* qualquer conteúdo largo rola dentro do próprio container, nunca o body */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --------------------------------------------------- agenda / calendário -- */
.calgrid { display: grid; grid-template-columns: 62px repeat(7, minmax(96px, 1fr));
           border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
           min-width: 760px; background: var(--surface); }
.calgrid .h { background: var(--surface-2); padding: 8px 6px; font-size: .72rem; font-weight: 700;
              text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.calgrid .h:first-child { border-left: none; }
.calgrid .h .d { font-size: .66rem; color: var(--ink-3); font-weight: 500; }
.calgrid .h.hoje { background: var(--brand-wash); color: var(--brand-hover); }
.calgrid .hourlbl { padding: 6px 8px 6px 0; font-size: .68rem; color: var(--ink-3);
                    border-top: 1px solid var(--line); text-align: right; }
.calgrid .cell { min-height: 36px; border-top: 1px solid var(--line);
                 border-left: 1px solid var(--line); padding: 2px; }
.slot { background: var(--brand); color: #fff; border: none; font-family: inherit;
        border-radius: 6px; padding: 4px 6px; font-size: .67rem; line-height: 1.25;
        cursor: pointer; overflow: hidden; width: 100%; text-align: left; display: block;
        margin-bottom: 2px; }
.slot.concluido { background: var(--ok); }
.slot.cancelado { background: var(--ink-3); text-decoration: line-through; }
.slot:hover { filter: brightness(1.1); }

/* --------------------------------------------- grade de ocupação de salas -- */
.ocupagrid { display: grid; grid-template-columns: 62px repeat(6, minmax(130px, 1fr));
             border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
             min-width: 860px; background: var(--surface); }
.ocupagrid .h { background: var(--surface-2); padding: 9px 8px; font-size: .74rem; font-weight: 700;
                text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.ocupagrid .h:first-child { border-left: none; }
.ocupagrid .hourlbl { padding: 6px 8px 6px 0; font-size: .68rem; color: var(--ink-3);
                      border-top: 1px solid var(--line); text-align: right; }
.ocupagrid .cell { min-height: 40px; border-top: 1px solid var(--line);
                   border-left: 1px solid var(--line); padding: 3px; }
.aloc { border-radius: 7px; padding: 5px 7px; font-size: .69rem; line-height: 1.3;
        margin-bottom: 3px; border-left: 3px solid; background: var(--surface-2); }
.aloc b { display: block; font-size: .73rem; }
.aloc .sub { color: var(--ink-3); }
.aloc.conflito { background: var(--bad-wash); border-color: var(--bad) !important; color: var(--bad); }
.aloc.conflito .sub { color: var(--bad); }

/* ---------------------------------------------------------------- misc ---- */
.vazio { text-align: center; color: var(--ink-3); font-size: .84rem; padding: 30px 16px;
         display: flex; flex-direction: column; align-items: center; gap: 9px; }
.vazio svg.ic { width: 26px; height: 26px; color: var(--line-2); stroke-width: 1.5; }
.vazio .acao { margin-top: 4px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(12px);
  background: var(--ink); color: var(--canvas); padding: 11px 18px; border-radius: 999px;
  font-size: .83rem; font-weight: 600; box-shadow: var(--sh-3); opacity: 0;
  pointer-events: none; transition: opacity .2s, transform .2s; z-index: 95;
  max-width: 92%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--bad); color: #fff; }

.modal-fundo { position: fixed; inset: 0; background: rgba(6,26,30,.55); z-index: 80;
               display: flex; align-items: center; justify-content: center; padding: 16px;
               backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3);
         border: 1px solid var(--line); width: 100%; max-width: 560px; max-height: 90vh;
         overflow-y: auto; padding: 20px; }
.modal.larga { max-width: 760px; }
.modal-topo { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.modal-topo h3 { margin: 0; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; }
.modal-topo .sub { font-size: .75rem; color: var(--ink-3); margin-top: 2px; }
.modal-topo .fechar { margin-left: auto; background: transparent; border: none; cursor: pointer;
                      color: var(--ink-3); padding: 4px; border-radius: 7px; line-height: 0; }
.modal-topo .fechar:hover { background: var(--surface-3); color: var(--ink); }
.modal-topo .fechar svg.ic { width: 18px; height: 18px; }
.modal-acoes { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }

.kv { font-size: .86rem; margin-bottom: 11px; }
.kv b { display: block; font-size: .66rem; color: var(--ink-3); text-transform: uppercase;
        letter-spacing: .08em; margin-bottom: 2px; font-weight: 700; }

.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px;
        overflow-x: auto; }
.abas button { background: none; border: none; padding: 9px 13px; font-size: .82rem; font-weight: 600;
               color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent;
               font-family: inherit; white-space: nowrap; }
.abas button.active { color: var(--brand); border-bottom-color: var(--brand); }

video.camera { width: 100%; max-width: 420px; border-radius: var(--r); background: #000;
               display: block; aspect-ratio: 4/3; object-fit: cover; }

/* -------------------------------------------------------------- login ----- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(900px 460px at 18% -10%, rgba(15,169,160,.45) 0%, transparent 62%),
    radial-gradient(700px 420px at 92% 108%, rgba(15,169,160,.22) 0%, transparent 60%),
    var(--brand-deep2);
  position: relative; overflow: hidden;
}
/* ondas sutis — a marca é VOX (voz): a assinatura visual é a onda sonora,
   não um gradiente roxo qualquer */
.login-wrap::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 220px; opacity: .16;
  background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 14px);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 120%, #000 30%, transparent 72%);
  mask-image: radial-gradient(120% 100% at 50% 120%, #000 30%, transparent 72%);
  pointer-events: none;
}
.login-card { width: 100%; max-width: 380px; background: var(--surface); position: relative;
              border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: 28px; }
.login-marca { text-align: center; margin-bottom: 22px; }
.login-marca .logo-mark { width: 54px; height: 54px; border-radius: 15px; font-size: 1.3rem;
                          margin: 0 auto 12px; }
.login-marca h1 { font-size: 1.6rem; margin: 0; }
.login-marca p { font-size: .79rem; color: var(--ink-3); margin: 5px 0 0; }
.login-erro { background: var(--bad-wash); color: var(--bad); padding: 10px 12px;
              border-radius: var(--r-sm); font-size: .81rem; margin-bottom: 14px; }
.login-pe { text-align: center; margin-top: 20px; font-size: .72rem; color: var(--ink-3); }

/* -------------------------------------------------------------- animação -- */
.aparece { animation: aparece .3s cubic-bezier(.4,0,.2,1) both; }
@keyframes aparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skel { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%);
        background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite; border-radius: var(--r-sm);
        height: 14px; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------- impressão -- */
@media print {
  .sidebar, .topbar, .sb-fundo, .rodape-marca, .toast, .nao-imprimir { display: none !important; }
  .app-body { margin-left: 0 !important; }
  body { background: #fff; color: #000; }
  main { padding: 0; max-width: none; }
  .panel, .card, .kpi { box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   Módulo Franqueadora
   Cartões de conteúdo vindo do portal da Vox2You, aviso de novidade e agenda
   da rede. Segue os mesmos tokens do resto do sistema — nada de cor solta.
   ========================================================================== */

.aviso.warn { background: var(--warn-wash); color: var(--warn); }
.dica { color: var(--ink-3); font-size: .82rem; line-height: 1.6; }

/* selo com o número de não lidos, na aba do módulo no topo */
.tb-mod .selo-num { display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; margin-left: 5px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: .62rem; font-weight: 800; line-height: 1; }

/* --- lista de conteúdo --- */
.franq-lista { display: grid; gap: 10px; }
.franq-lista.grade { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }

.franq-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 15px; cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s; position: relative; }
.franq-card:hover { border-color: var(--brand); box-shadow: var(--sh-1); transform: translateY(-1px); }
.franq-card.novo { border-left: 3px solid var(--brand); }
.franq-card h3 { margin: 5px 0 4px; font-size: .93rem; font-weight: 700; line-height: 1.35;
  letter-spacing: -.01em; }
.franq-card p { margin: 0; font-size: .8rem; color: var(--ink-3); line-height: 1.55; }
.franq-corpo { flex: 1; min-width: 0; }
.franq-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.franq-data { font-size: .72rem; color: var(--ink-3); font-weight: 600; }
.franq-rodape { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.franq-cat, .franq-ext { font-size: .68rem; color: var(--ink-3); background: var(--surface-3);
  border-radius: 5px; padding: 2px 7px; font-weight: 600; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.franq-ext { background: var(--brand-wash); color: var(--brand-hover); letter-spacing: .04em; }

.franq-capa { flex: 0 0 84px; height: 84px; border-radius: 8px; overflow: hidden;
  background: var(--surface-3); }
.franq-capa img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* na grade de marketing o cartão vira vertical, com a capa em cima */
.franq-lista.grade .franq-card { flex-direction: column; gap: 10px; padding: 0; overflow: hidden; }
.franq-lista.grade .franq-capa { flex: none; width: 100%; height: 132px; border-radius: 0; }
.franq-lista.grade .franq-corpo { padding: 0 13px 13px; }
.franq-lista.grade .franq-card:not(:has(.franq-capa)) .franq-corpo { padding-top: 13px; }

.franq-paginador { display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 16px; flex-wrap: wrap; }

/* --- detalhe --- */
.franq-previa { margin-bottom: 14px; border-radius: var(--r); overflow: hidden;
  background: var(--surface-3); max-height: 320px; display: flex; justify-content: center; }
.franq-previa img { max-width: 100%; max-height: 320px; object-fit: contain; display: block; }
.franq-texto { font-size: .88rem; line-height: 1.7; color: var(--ink-1); overflow-wrap: anywhere; }
.franq-texto p { margin: 0 0 10px; }
.franq-texto a { color: var(--brand-hover); }
.franq-texto img { max-width: 100%; height: auto; border-radius: 8px; }
.franq-texto table { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 10px 0; }
.franq-texto td, .franq-texto th { border: 1px solid var(--line); padding: 6px 9px; }
.franq-texto ul, .franq-texto ol { padding-left: 20px; margin: 0 0 10px; }

/* --- eventos da rede --- */
.franq-evento { display: flex; gap: 14px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.franq-evento:last-child { border-bottom: none; }
.franq-evento .dia { flex: 0 0 46px; text-align: center; background: var(--brand-wash);
  border-radius: 8px; padding: 6px 0; }
.franq-evento .dia b { display: block; font-size: 1.05rem; color: var(--brand-hover); line-height: 1; }
.franq-evento .dia span { font-size: .64rem; text-transform: uppercase; color: var(--ink-3);
  font-weight: 700; letter-spacing: .06em; }
.franq-evento h4 { margin: 0 0 2px; font-size: .87rem; font-weight: 700; }
.franq-evento.passado { opacity: .55; }
.franq-evento.passado .dia { background: var(--surface-3); }
.franq-evento.passado .dia b { color: var(--ink-3); }

/* --- aviso de novidade dentro do sistema --- */
.franq-banner { position: fixed; right: 16px; bottom: 16px; z-index: 90; max-width: min(380px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--r);
  box-shadow: var(--sh-2); transform: translateY(18px); opacity: 0;
  transition: transform .25s ease, opacity .25s ease; }
.franq-banner.on { transform: translateY(0); opacity: 1; }
.franq-banner svg.ic { width: 20px; height: 20px; color: var(--brand); flex: none; }
.franq-banner > div { flex: 1; min-width: 0; font-size: .82rem; line-height: 1.4; }
.franq-banner > div span { display: block; color: var(--ink-3); font-size: .75rem; }
.franq-banner .btn { flex: none; }
.franq-banner .fechar { background: none; border: none; cursor: pointer; color: var(--ink-3);
  padding: 2px; display: flex; }
.franq-banner .fechar svg.ic { width: 15px; height: 15px; color: inherit; }

@media (max-width: 640px) {
  .franq-card { flex-direction: column; gap: 10px; }
  .franq-capa { width: 100%; height: 148px; flex: none; }
  .franq-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .franq-lista.grade { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .franq-lista.grade .franq-capa { height: 104px; }
}
