/* ============================================================
   PGA — style.css
   Tokens de marca + base + layout responsivo (mobile-first) + componentes.
   Usado por index.html (painel) e agenda.html (agenda pública).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---------------------------------------------------------- Tokens */
:root{
  /* Marca — herdada do sistema em produção, mantida por reconhecimento */
  --navy:      #003776;
  --navy-700:  #002a5c;
  --navy-100:  #E7EDF6;
  --blue:      #0056A2;
  --blue-100:  #E5EEF7;
  --gold:      #C8900A;
  --gold-100:  #FBF1DC;

  /* Neutros — papel frio, não creme, para não brigar com o navy */
  --bg:        #F3F5F8;
  --surface:   #FFFFFF;
  --surface-2: #F8F9FB;
  --ink:       #16233D;
  --muted:     #6B7C99;
  --faint:     #9CA9BE;
  --line:      #DCE3ED;
  --line-2:    #EAEEF4;

  /* Semântica */
  --success:   #2E7D5B;
  --success-100: #E6F2EC;
  --danger:    #B23A48;
  --danger-100: #FBEAEC;
  --info:      var(--blue);

  /* Tipografia */
  --f-display: 'Fraunces', Georgia, serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* Escala e espaçamento */
  --r-sm: 8px;  --r-md: 12px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(16,35,66,.06), 0 1px 1px rgba(16,35,66,.04);
  --sh-2: 0 8px 24px rgba(16,35,66,.10), 0 2px 6px rgba(16,35,66,.06);
  --sh-nav: 0 12px 32px rgba(0,20,50,.22);

  --topbar-h: 60px;
  --bottombar-h: 62px;
  --sidebar-w: 248px;

  --dur: 180ms;
  --ease: cubic-bezier(.2,.7,.3,1);
}

@media (prefers-color-scheme: dark){
  /* Reservado — o sistema hoje opera só em modo claro por padrão. */
}

/* ---------------------------------------------------------- Reset */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--f-body); font-size:15px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
/* Nenhum elemento pode empurrar a largura além da tela do celular. */
.conteudo, .conteudo__max, .cartao, .mes-bloco, .dia-bloco{ max-width:100%; }
.conteudo *{ min-width:0; }
h1,h2,h3,h4{ margin:0; font-family:var(--f-display); font-weight:600; color:var(--navy); letter-spacing:-0.01em; }
p{ margin:0; }
a{ color:var(--blue); text-decoration:none; }
button{ font-family:inherit; }
input,select,textarea{ font-family:inherit; font-size:inherit; color:inherit; }
ul{ list-style:none; margin:0; padding:0; }
svg{ display:block; }
img{ max-width:100%; display:block; }
::selection{ background:var(--gold-100); color:var(--navy-700); }

:focus-visible{
  outline:2.5px solid var(--gold); outline-offset:2px; border-radius:4px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

.num{ font-family:var(--f-mono); font-variant-numeric:tabular-nums; }

/* ---------------------------------------------------------- Utilitários */
.hide{ display:none !important; }
.only-desktop{ display:none; }
.only-mobile{ display:block; }
@media (min-width:900px){
  .only-desktop{ display:block; }
  .only-mobile{ display:none; }
}
.muted{ color:var(--muted); }
.center{ text-align:center; }
.row{ display:flex; align-items:center; gap:10px; }
.row.between{ justify-content:space-between; }
.row.wrap{ flex-wrap:wrap; }
.stack{ display:flex; flex-direction:column; gap:10px; }
.grow{ flex:1 1 auto; min-width:0; }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ============================================================
   TELA DE ENTRADA (login / cadastro / recuperação) — telas públicas
   ============================================================ */
.tela-publica{
  min-height:100dvh; min-height:100vh;
  display:flex; flex-direction:column;
  background:
    radial-gradient(720px 420px at 90% -8%, rgba(200,144,10,.14), transparent 60%),
    radial-gradient(600px 380px at -10% 0%, rgba(0,86,162,.16), transparent 55%),
    var(--navy);
  padding:0;
}
.tela-publica__topo{
  padding:36px 24px 18px;
  color:#fff;
}
.marca{ display:flex; align-items:center; gap:10px; }
.marca__selo{
  width:38px; height:38px; border-radius:10px;
  background:linear-gradient(155deg, var(--gold), #a97300);
  display:flex; align-items:center; justify-content:center;
  color:#241900; font-family:var(--f-display); font-weight:700; font-size:17px;
  box-shadow:0 4px 14px rgba(0,0,0,.25);
  flex-shrink:0;
}
.marca__texto{ line-height:1.15; }
.marca__nome{ font-family:var(--f-display); font-weight:600; font-size:19px; color:#fff; }
.marca__sub{ font-size:12px; color:rgba(255,255,255,.62); letter-spacing:.02em; }

.tela-publica__cartao{
  flex:1; background:var(--bg);
  border-radius:26px 26px 0 0;
  padding:30px 22px 40px;
  box-shadow:0 -18px 40px rgba(0,10,30,.28);
  display:flex; flex-direction:column;
}
@media (min-width:640px){
  .tela-publica{ align-items:center; justify-content:center; padding:32px; }
  .tela-publica__topo{ display:none; }
  .tela-publica__cartao{
    flex:none; width:100%; max-width:428px; border-radius:var(--r-xl);
    box-shadow:var(--sh-nav); padding:36px 32px 32px;
  }
  .tela-publica__cartao::before{
    content:''; display:block; height:2px; margin:-36px -32px 26px;
    background:linear-gradient(90deg, var(--gold), var(--blue) 60%, var(--navy));
    border-radius:var(--r-xl) var(--r-xl) 0 0;
  }
}

.tela-publica h1{ font-size:24px; margin-bottom:4px; }
.tela-publica .lead{ color:var(--muted); font-size:13.5px; margin-bottom:22px; }

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.campo{ display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.campo label{ font-size:12.5px; font-weight:600; color:var(--navy-700); letter-spacing:.01em; }
.campo .ajuda{ font-size:11.5px; color:var(--faint); }
.campo .erro{ font-size:12px; color:var(--danger); }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=search], select, textarea{
  width:100%; padding:11px 13px; border:1.5px solid var(--line);
  border-radius:var(--r-md); background:var(--surface); color:var(--ink);
  transition:border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
textarea{ resize:vertical; min-height:80px; }
input::placeholder, textarea::placeholder{ color:var(--faint); }
input:focus, select:focus, textarea:focus{
  border-color:var(--blue); box-shadow:0 0 0 3.5px var(--blue-100); outline:none;
}
select{ appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7C99' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center; padding-right:34px;
}
.campo-linha{ display:flex; gap:10px; }
.campo-linha .campo{ flex:1; margin-bottom:14px; }

.check{ display:flex; align-items:center; gap:8px; font-size:13.5px; cursor:pointer; user-select:none; }
.check input{ width:17px; height:17px; accent-color:var(--blue); }

/* ---- Botões ---- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding:11px 18px; border-radius:var(--r-md); border:1.5px solid transparent;
  font-weight:600; font-size:14px; cursor:pointer; white-space:nowrap;
  transition:transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:active{ transform:translateY(1px) scale(.99); }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; }
.btn-primario{ background:var(--navy); color:#fff; box-shadow:var(--sh-1); }
.btn-primario:hover:not(:disabled){ background:var(--navy-700); box-shadow:var(--sh-2); }
.btn-ouro{ background:var(--gold); color:#2A1D02; }
.btn-ouro:hover:not(:disabled){ background:#B37F09; }
.btn-linha{ background:transparent; border-color:var(--line); color:var(--navy); }
.btn-linha:hover:not(:disabled){ border-color:var(--blue); background:var(--blue-100); }
.btn-fantasma{ background:transparent; color:var(--muted); }
.btn-fantasma:hover:not(:disabled){ background:var(--line-2); color:var(--ink); }
.btn-perigo{ background:transparent; color:var(--danger); border-color:var(--danger-100); }
.btn-perigo:hover:not(:disabled){ background:var(--danger-100); }
.btn-bloco{ width:100%; }
.btn-sm{ padding:7px 12px; font-size:12.5px; border-radius:var(--r-sm); }
.btn-icone{ padding:8px; border-radius:var(--r-sm); }
.btn .spin{ animation:girar .7s linear infinite; }
@keyframes girar{ to{ transform:rotate(360deg); } }

/* ============================================================
   APP AUTENTICADO — casca (topbar + sidebar + conteúdo + tabs mobile)
   ============================================================ */
.app{ min-height:100dvh; min-height:100vh; display:flex; flex-direction:column; }

.topbar{
  height:var(--topbar-h); flex-shrink:0; background:var(--navy); color:#fff;
  display:flex; align-items:center; gap:10px; padding:0 14px;
  position:sticky; top:0; z-index:40; box-shadow:0 2px 10px rgba(0,20,50,.18);
}
.topbar__menu{ background:none; border:none; color:#fff; padding:8px; border-radius:var(--r-sm); cursor:pointer; }
.topbar__menu:hover{ background:rgba(255,255,255,.1); }
.topbar__titulo{ font-family:var(--f-display); font-weight:600; font-size:16.5px; }
.topbar__miolo{ flex:1; min-width:0; }
.topbar__trilha{ font-size:11px; color:rgba(255,255,255,.6); display:flex; align-items:center; gap:5px; }
.topbar__usuario{
  width:34px; height:34px; border-radius:50%; background:var(--gold); color:#2A1D02;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px;
  border:none; cursor:pointer; flex-shrink:0;
}

.app__corpo{ flex:1; display:flex; min-height:0; }

.sidebar{
  position:fixed; inset:0 auto 0 0; width:min(82vw, var(--sidebar-w)); z-index:60;
  background:var(--navy); color:#fff; transform:translateX(-100%);
  transition:transform var(--dur) var(--ease); display:flex; flex-direction:column;
  box-shadow:var(--sh-nav);
}
.sidebar.aberta{ transform:translateX(0); }
.sidebar__véu{
  position:fixed; inset:0; background:rgba(8,16,32,.5); z-index:55; opacity:0;
  pointer-events:none; transition:opacity var(--dur) var(--ease);
}
.sidebar__véu.visível{ opacity:1; pointer-events:auto; }
.sidebar__topo{ padding:20px 16px 14px; }
.sidebar__fechar{ background:none; border:none; color:rgba(255,255,255,.7); position:absolute; right:10px; top:14px; padding:8px; cursor:pointer; }
.sidebar nav{ flex:1; overflow-y:auto; padding:6px 10px 14px; }
.sidebar__grupo{ font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; color:rgba(255,255,255,.42); padding:14px 10px 6px; }
.sidebar__link{
  display:flex; align-items:center; gap:11px; padding:10px 11px; border-radius:var(--r-sm);
  color:rgba(255,255,255,.78); font-size:14px; font-weight:500; cursor:pointer;
}
.sidebar__link:hover{ background:rgba(255,255,255,.06); color:#fff; }
.sidebar__link.ativo{ background:rgba(200,144,10,.16); color:#fff; }
.sidebar__link.ativo .sidebar__ícone{ color:var(--gold); }
.sidebar__ícone{ width:18px; height:18px; flex-shrink:0; color:rgba(255,255,255,.5); }
.sidebar__rodapé{ padding:12px 16px 18px; border-top:1px solid rgba(255,255,255,.1); }
.sidebar__versao{ text-align:center; font-size:11px; color:rgba(255,255,255,.4); margin-top:10px; }
.tela-publica__versao{ text-align:center; font-size:11.5px; color:var(--faint); padding:14px 0 6px; }

@media (min-width:900px){
  .topbar__menu{ display:none; }
  .sidebar{ position:sticky; top:0; height:100dvh; transform:none; width:var(--sidebar-w); flex-shrink:0; box-shadow:none; border-right:1px solid rgba(255,255,255,.06); }
  .sidebar__véu, .sidebar__fechar{ display:none; }
}

.conteudo{ flex:1; min-width:0; padding:18px 14px 90px; }
@media (min-width:900px){ .conteudo{ padding:28px 32px 40px; } }
.conteudo__max{ max-width:1180px; margin:0 auto; }

.tabsmobile{
  position:fixed; left:0; right:0; bottom:0; height:var(--bottombar-h); z-index:45;
  background:var(--surface); border-top:1px solid var(--line);
  display:flex; box-shadow:0 -6px 20px rgba(16,35,66,.08);
  padding-bottom:env(safe-area-inset-bottom);
}
@media (min-width:900px){ .tabsmobile{ display:none; } }
.tabsmobile__item{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  color:var(--muted); background:none; border:none; font-size:10.5px; font-weight:600; cursor:pointer;
}
.tabsmobile__item.ativo{ color:var(--navy); }
.tabsmobile__item svg{ width:20px; height:20px; }
.tabsmobile__item.ativo svg{ color:var(--gold); }

/* ============================================================
   COMPONENTES COMPARTILHADOS
   ============================================================ */
.cabecalho-pagina{ margin-bottom:20px; }
.cabecalho-pagina .eyebrow{ font-size:11.5px; font-weight:700; color:var(--gold); text-transform:uppercase; letter-spacing:.08em; margin-bottom:4px; }
.cabecalho-pagina h1{ font-size:23px; }
.cabecalho-pagina .lead{ color:var(--muted); font-size:13.5px; margin-top:4px; }
.cabecalho-pagina__acoes{ margin-top:14px; display:flex; gap:8px; flex-wrap:wrap; }
@media (min-width:640px){
  .cabecalho-pagina{ display:flex; justify-content:space-between; align-items:flex-end; gap:16px; }
  .cabecalho-pagina__acoes{ margin-top:0; }
}

.cartao{
  background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); padding:18px;
}
.cartao + .cartao{ margin-top:14px; }
.cartao__cabecalho{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:14px; }
.cartao__titulo{ font-family:var(--f-display); font-weight:600; font-size:16px; color:var(--navy); }

.grade-cartoes{ display:grid; grid-template-columns:1fr; gap:12px; }
.grade-cartoes.cols-3{ grid-template-columns:repeat(3,1fr); gap:8px; }
.grade-cartoes.cols-2{ grid-template-columns:1fr 1fr; gap:10px; }
@media (min-width:640px){ .grade-cartoes.cols-3-md{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:900px){ .grade-cartoes.cols-3{ gap:12px; } .grade-cartoes.cols-2{ gap:12px; } .grade-cartoes.cols-4{ grid-template-columns:repeat(4,1fr); } }

.kpi{ display:flex; flex-direction:column; gap:2px; }
.kpi__rotulo{ font-size:10.5px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.03em; }
.kpi__valor{ font-family:var(--f-display); font-size:23px; font-weight:600; color:var(--navy); }
.kpi__valor .unid{ font-family:var(--f-body); font-size:13px; color:var(--muted); font-weight:500; }
.grade-cartoes.cols-3 .cartao{ padding:13px; }

.lista{ display:flex; flex-direction:column; }
.linha-lista{
  display:flex; align-items:center; gap:11px; padding:10px 4px;
  border-bottom:1px solid var(--line-2); cursor:pointer;
}
.linha-lista:last-child{ border-bottom:none; }
.linha-lista:hover{ background:var(--surface-2); }
.linha-lista__ícone{
  width:32px; height:32px; border-radius:var(--r-sm); background:var(--navy-100); color:var(--navy);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.linha-lista__ícone svg{ width:17px; height:17px; }
.linha-lista__corpo{ flex:1; min-width:0; }
.linha-lista__titulo{ font-weight:600; font-size:13.5px; color:var(--ink); }
.linha-lista__sub{ font-size:11.5px; color:var(--muted); margin-top:1px; }
.linha-lista__meta{ text-align:right; flex-shrink:0; }
/* Variante ainda mais compacta, para listas longas (usuários, disciplinas) */
.lista-compacta .linha-lista{ padding:7px 4px; gap:10px; }
.lista-compacta .linha-lista__ícone{ width:28px; height:28px; }
.lista-compacta .linha-lista__ícone svg{ width:15px; height:15px; }

/* ---- Campo de busca com lupa ---- */
.busca{ position:relative; margin-bottom:14px; }
.busca__lupa{
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  color:var(--faint); pointer-events:none; display:flex;
}
.busca__lupa svg{ width:18px; height:18px; }
.busca__input{ width:100%; padding:10px 14px 10px 40px !important; border-radius:var(--r-pill) !important; }
.busca__input::-webkit-search-cancel-button{ cursor:pointer; }

/* Contador "X de Y" ao lado da busca */
.busca-info{ font-size:12px; color:var(--muted); margin:-8px 2px 12px; }

/* Caixa de ementa */
.ementa-label{ font-size:12.5px; font-weight:600; color:var(--navy-700); display:block; margin-bottom:6px; }
.ementa-box{
  background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md);
  padding:14px; font-size:13.5px; line-height:1.6; color:var(--ink);
  max-height:45vh; overflow-y:auto; white-space:normal;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-kpis{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
@media (min-width:640px){ .dash-kpis{ grid-template-columns:repeat(3,1fr); } }
.dash-kpi{
  background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); padding:12px 14px; display:flex; align-items:center; gap:10px;
}
.dash-kpi__ico{
  width:34px; height:34px; border-radius:var(--r-sm); background:var(--navy-100); color:var(--navy);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.dash-kpi__ico svg{ width:18px; height:18px; }
.dash-kpi__valor{ font-family:var(--f-display); font-size:22px; font-weight:700; line-height:1; }
.dash-kpi__rotulo{ font-size:10.5px; font-weight:600; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin-top:2px; }

.dash-alertas{
  display:flex; align-items:center; gap:8px; margin-top:12px;
  background:var(--gold-100); border:1px solid #EAD9A8; border-radius:var(--r-md);
  padding:10px 14px; font-size:12.5px; color:#8A6407; font-weight:500;
}
.dash-alertas svg{ width:18px; height:18px; flex-shrink:0; }

.dash-card{ padding:0 !important; overflow:hidden; margin-bottom:10px; }
.dash-card__cab{
  display:flex; align-items:center; gap:11px; padding:12px 14px; cursor:pointer;
}
.dash-card__cab:hover{ background:var(--surface-2); }
.dash-card__cab.aberto{ background:var(--surface-2); border-bottom:1px solid var(--line-2); }
.dash-card__cab.aberto .dash-card__seta{ transform:rotate(90deg); }
.dash-card__ava{
  width:36px; height:36px; border-radius:50%; background:var(--navy); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; flex-shrink:0;
}
.dash-card__nome{ font-weight:600; font-size:14px; color:var(--ink); }
.dash-card__sub{ font-size:11.5px; color:var(--muted); margin-top:1px; }
.dash-card__ch{ display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex-shrink:0; min-width:90px; }
.dash-card__seta{ color:var(--faint); flex-shrink:0; transition:transform var(--dur) var(--ease); }
.dash-card__seta svg{ width:18px; height:18px; }

.dash-detalhe{ padding:6px 14px 12px; }
.dash-detalhe__linha{ display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px dashed var(--line-2); }
.dash-detalhe__linha:last-child{ border-bottom:none; }
.dash-detalhe__nome{ flex:1; min-width:0; font-size:13px; color:var(--ink); overflow:hidden; text-overflow:ellipsis; }
.dash-detalhe__ch{ display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex-shrink:0; min-width:84px; }

.dash-barra{ width:70px; height:6px; border-radius:var(--r-pill); background:var(--line-2); overflow:hidden; }
.dash-barra__preenchida{ height:100%; border-radius:var(--r-pill); }
.dash-barra__txt{ font-size:10.5px; color:var(--muted); }
.dash-card__ch .dash-barra, .dash-detalhe__ch .dash-barra{ width:84px; }

/* ---- Selo / badge de status ---- */
.selo{
  display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:var(--r-pill);
  font-size:11.5px; font-weight:700; letter-spacing:.01em; white-space:nowrap;
}
.selo::before{ content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.selo-disponivel{ background:var(--line-2); color:var(--muted); }
.selo-solicitado{ background:var(--gold-100); color:#8A6407; }
.selo-confirmado{ background:var(--success-100); color:var(--success); }
.selo-pendente{ background:var(--gold-100); color:#8A6407; }
.selo-aprovado{ background:var(--success-100); color:var(--success); }
.selo-recusado{ background:var(--danger-100); color:var(--danger); }
.selo-neutro{ background:var(--blue-100); color:var(--blue); }

/* ---- Tabela (desktop) / cartões empilhados (mobile) ---- */
.tabela-wrap{ overflow-x:auto; }
table.tabela{ width:100%; border-collapse:collapse; font-size:13.5px; }
table.tabela th{
  text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--muted); padding:9px 12px; border-bottom:2px solid var(--line); white-space:nowrap;
}
table.tabela td{ padding:11px 12px; border-bottom:1px solid var(--line-2); vertical-align:middle; }
table.tabela tr:hover td{ background:var(--surface-2); }
table.tabela .num{ text-align:right; }

/* ---- Horários: rolagem contínua, agrupados por mês e por dia ---- */
.mes-bloco{ margin-bottom:26px; }
.mes-bloco__titulo{
  position:sticky; top:calc(var(--topbar-h) + 6px); z-index:5;
  font-family:var(--f-display); font-size:16px; font-weight:600; color:var(--navy);
  background:var(--bg); padding:8px 2px; margin-bottom:10px;
  border-bottom:2px solid var(--gold);
}
@media (min-width:900px){ .mes-bloco__titulo{ top:8px; } }

.dia-bloco{
  background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); padding:12px 14px; margin-bottom:14px;
}
.dia-bloco__cab{
  display:flex; align-items:baseline; gap:8px; margin-bottom:10px; padding-bottom:8px;
  border-bottom:1px solid var(--line-2);
}
.dia-bloco__dow{
  font-family:var(--f-body); font-weight:700; font-size:11px; text-transform:uppercase;
  letter-spacing:.04em; color:#fff; background:var(--navy); padding:2px 8px; border-radius:var(--r-pill);
}
.dia-bloco__data{ font-family:var(--f-mono); font-size:13px; font-weight:600; color:var(--ink); }
.dia-bloco__qtd{ font-size:11.5px; color:var(--muted); margin-left:auto; }
.dia-bloco__slots{ display:flex; flex-direction:column; gap:7px; }

.slot-linha{
  display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; padding:10px 12px;
  border-radius:var(--r-md); border:1.5px dashed var(--line); background:var(--surface-2);
  cursor:pointer; transition:all var(--dur) var(--ease);
}
.slot-linha:hover{ box-shadow:var(--sh-1); }
.slot-linha.st-requested{ border-style:dashed; border-color:var(--gold); background:var(--gold-100); }
.slot-linha.st-confirmed{ border-style:solid; border-color:var(--success); background:var(--success-100); }
.slot-linha.selecionado{ border-color:var(--blue); border-style:solid; background:var(--blue-100); box-shadow:0 0 0 3px var(--blue-100); }
.slot-linha__hora{ font-family:var(--f-mono); font-size:13.5px; font-weight:600; color:var(--ink); flex-shrink:0; white-space:nowrap; }
.slot-linha__quem{ flex:1 1 100%; min-width:0; font-size:12.5px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; order:3; }
.slot-linha .selo{ margin-left:auto; }
.slot-linha.st-confirmed .slot-linha__hora::after{ content:'✓'; margin-left:6px; color:var(--success); }
@media (min-width:640px){
  .slot-linha__quem{ flex:1 1 auto; order:0; }
  .slot-linha .selo{ margin-left:0; }
}

/* ---- Chip de horário (mantido para outros usos) ---- */
.slot-grade{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; }
.slot-chip{
  border-radius:var(--r-md); border:1.5px dashed var(--line); padding:9px 11px;
  cursor:pointer; user-select:none; background:var(--surface); transition:all var(--dur) var(--ease);
  display:flex; flex-direction:column; gap:2px;
}
.slot-chip__data{ font-family:var(--f-mono); font-size:12px; color:var(--muted); font-weight:600; }
.slot-chip__hora{ font-family:var(--f-mono); font-size:13.5px; font-weight:600; color:var(--ink); }
.slot-chip__quem{ font-size:11px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.slot-chip.selecionado{ border-color:var(--blue); border-style:solid; background:var(--blue-100); box-shadow:0 0 0 3px var(--blue-100); }
.slot-chip.st-requested{ border-style:dashed; border-color:var(--gold); background:var(--gold-100); }
.slot-chip.st-confirmed{ border-style:solid; border-color:var(--success); background:var(--success-100); }
.slot-chip.st-confirmed .slot-chip__hora::after{ content:'✓'; margin-left:5px; color:var(--success); }

/* ---- Modal ---- */
.modal-véu{
  position:fixed; inset:0; background:rgba(8,16,32,.52); z-index:100;
  display:flex; align-items:flex-end; justify-content:center; opacity:0; pointer-events:none;
  transition:opacity var(--dur) var(--ease);
}
.modal-véu.visível{ opacity:1; pointer-events:auto; }
@media (min-width:640px){ .modal-véu{ align-items:center; padding:20px; } }
.modal{
  background:var(--surface); width:100%; max-width:520px; max-height:88vh; overflow-y:auto;
  border-radius:22px 22px 0 0; padding:22px 20px calc(20px + env(safe-area-inset-bottom));
  transform:translateY(16px); transition:transform var(--dur) var(--ease);
}
.modal-véu.visível .modal{ transform:translateY(0); }
@media (min-width:640px){ .modal{ border-radius:var(--r-xl); padding:26px; } }
.modal__cabecalho{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:16px; }
.modal__titulo{ font-size:18px; }
.modal__acoes{ display:flex; gap:8px; justify-content:flex-end; margin-top:20px; flex-wrap:wrap; }

/* ---- Toast ---- */
.toasts{ position:fixed; left:14px; right:14px; bottom:calc(var(--bottombar-h) + 14px); z-index:200; display:flex; flex-direction:column; gap:8px; align-items:center; }
@media (min-width:900px){ .toasts{ left:auto; right:24px; bottom:24px; align-items:flex-end; } }
.toast{
  background:var(--navy); color:#fff; padding:12px 16px; border-radius:var(--r-md);
  font-size:13.5px; font-weight:500; box-shadow:var(--sh-2); max-width:420px;
  display:flex; align-items:center; gap:10px; animation:subir .22s var(--ease);
}
.toast.erro{ background:var(--danger); }
.toast.sucesso{ background:var(--success); }
@keyframes subir{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:translateY(0); } }

/* ---- Vazio / carregando ---- */
.estado-vazio{ text-align:center; padding:48px 20px; color:var(--muted); }
.estado-vazio__ícone{ width:44px; height:44px; margin:0 auto 14px; color:var(--faint); }
.estado-vazio h3{ color:var(--ink); font-size:15px; margin-bottom:4px; }
.estado-vazio p{ font-size:13px; max-width:320px; margin:0 auto; }
.carregando{ display:flex; align-items:center; justify-content:center; padding:40px; color:var(--muted); gap:10px; font-size:13.5px; }
.carregando svg{ animation:girar .8s linear infinite; }
.skel{ background:linear-gradient(90deg, var(--line-2) 25%, var(--line) 37%, var(--line-2) 63%); background-size:400% 100%; animation:skel 1.4s ease infinite; border-radius:var(--r-sm); }
@keyframes skel{ 0%{ background-position:100% 50%; } 100%{ background-position:0 50%; } }

/* ---- Abas (tabs) internas ---- */
.abas{ display:flex; gap:4px; border-bottom:1.5px solid var(--line); margin-bottom:16px; overflow-x:auto; }
.abas__item{
  padding:10px 4px; margin-right:18px; font-size:13.5px; font-weight:600; color:var(--muted);
  background:none; border:none; border-bottom:2.5px solid transparent; cursor:pointer; white-space:nowrap;
}
.abas__item.ativa{ color:var(--navy); border-color:var(--gold); }

/* ---- Barra de progresso ---- */
.progresso{ height:7px; border-radius:var(--r-pill); background:var(--line-2); overflow:hidden; }
.progresso__barra{ height:100%; background:linear-gradient(90deg, var(--blue), var(--navy)); border-radius:var(--r-pill); transition:width .4s var(--ease); }
.progresso__barra.ouro{ background:linear-gradient(90deg, var(--gold), #8A6407); }

/* ============================================================
   AGENDA PÚBLICA — elemento-assinatura: a trilha de aulas
   ============================================================ */
.agenda-topo{
  background:
    radial-gradient(560px 300px at 100% -10%, rgba(200,144,10,.18), transparent 60%),
    var(--navy);
  color:#fff; padding:26px 18px 60px; position:relative;
}
.agenda-topo__marca{ display:flex; align-items:center; gap:9px; margin-bottom:22px; opacity:.9; }
.agenda-topo h1{ color:#fff; font-size:21px; margin-bottom:3px; }
.agenda-topo .sub{ color:rgba(255,255,255,.62); font-size:13px; }

.agenda-corpo{ max-width:760px; margin:-42px auto 0; padding:0 14px 50px; position:relative; z-index:2; }

.termometro{
  background:var(--surface); border-radius:var(--r-xl); box-shadow:var(--sh-2); padding:20px;
  display:flex; align-items:center; gap:18px; margin-bottom:18px;
}
.termometro__anel{ flex-shrink:0; }
.termometro__corpo{ flex:1; min-width:0; }
.termometro__pct{ font-family:var(--f-display); font-size:15px; font-weight:600; color:var(--navy); }

.filtro-chips{ display:flex; gap:7px; overflow-x:auto; padding-bottom:4px; margin-bottom:16px; }
.filtro-chip{
  flex-shrink:0; padding:8px 15px; border-radius:var(--r-pill); border:1.5px solid var(--line);
  background:var(--surface); font-size:12.5px; font-weight:600; color:var(--muted); cursor:pointer;
}
.filtro-chip.ativo{ background:var(--navy); border-color:var(--navy); color:#fff; }

.cartao-turma{
  background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--sh-1); border:1px solid var(--line-2);
  padding:16px; cursor:pointer; margin-bottom:12px; transition:box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cartao-turma:hover{ box-shadow:var(--sh-2); transform:translateY(-1px); }
.cartao-turma__topo{ display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-bottom:10px; }
.cartao-turma__nome{ font-family:var(--f-display); font-weight:600; font-size:16px; color:var(--navy); }
.cartao-turma__curso{ font-size:12px; color:var(--muted); margin-top:1px; }
.cartao-turma__prox{
  display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--navy-700);
  background:var(--navy-100); padding:8px 11px; border-radius:var(--r-sm); margin-top:10px;
}

/* Anel de progresso (SVG) */
.anel-svg{ transform:rotate(-90deg); }
.anel-svg .trilho{ fill:none; stroke:var(--line-2); }
.anel-svg .valor{ fill:none; stroke:var(--gold); stroke-linecap:round; transition:stroke-dashoffset .6s var(--ease); }

/* ---- A trilha: linha vertical de aulas agrupada por mês ---- */
/* ---- Próxima aula (nível 2) — igual à versão antiga ---- */
.prox-aula{
  background:linear-gradient(135deg, #FBF7EC, #FDF3DC);
  border:1.5px solid var(--gold); border-left-width:5px;
  border-radius:var(--r-lg); padding:16px 18px; margin-bottom:16px;
}
.prox-aula__rotulo{ font-size:11.5px; font-weight:700; letter-spacing:.1em; color:var(--gold); }
.prox-aula__quando{
  font-size:11.5px; font-weight:700; letter-spacing:.06em; color:#fff;
  background:linear-gradient(155deg, var(--gold), #a97300); padding:4px 12px; border-radius:var(--r-pill);
}
.prox-aula__data{ display:flex; align-items:center; gap:12px; margin:6px 0 12px; }
.prox-aula__dia{ font-family:var(--f-display); font-size:44px; font-weight:700; color:var(--navy); line-height:1; }
.prox-aula__mesnome{ font-family:var(--f-display); font-size:19px; font-weight:600; color:var(--navy); line-height:1.1; }
.prox-aula__dow{ font-size:13px; color:var(--muted); }
.prox-aula__linha{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding-top:12px; border-top:1px dashed rgba(200,144,10,.4); }
.prox-aula__hora{ font-family:var(--f-mono); font-size:14px; font-weight:600; color:var(--navy); background:var(--surface); border:1px solid var(--line); padding:5px 10px; border-radius:var(--r-sm); }
.prox-aula__disc{ font-size:13.5px; color:var(--ink); flex:1; min-width:0; }

/* Selo do código da disciplina (azul, igual à foto) */
.selo-cod{
  font-family:var(--f-body); font-size:12px; font-weight:700; color:#fff;
  background:var(--blue); padding:3px 9px; border-radius:var(--r-sm); white-space:nowrap;
}

/* ---- KPIs em 3 colunas ---- */
.kpis-agenda{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:18px; }
.kpi-agenda{
  background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); padding:14px 8px; text-align:center;
}
.kpi-agenda__valor{ font-family:var(--f-display); font-size:26px; font-weight:700; line-height:1; }
.kpi-agenda__rotulo{ font-size:10.5px; font-weight:600; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); margin-top:6px; }

/* ---- Abas ---- */
.abas-agenda{ background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r-pill); padding:4px; display:flex; gap:4px; margin-bottom:18px; box-shadow:var(--sh-1); }
.abas-agenda .abas__item{
  flex:1; margin:0; padding:9px 0; border:none; border-radius:var(--r-pill); text-align:center;
  font-size:13.5px; font-weight:600; color:var(--muted); background:transparent; cursor:pointer;
}
.abas-agenda .abas__item.ativa{ background:var(--navy); color:#fff; }

/* ---- Trilha de aulas (mês → dia) igual à foto ---- */
.ag-mes{ margin-bottom:22px; }
.ag-mes__cab{ display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.ag-mes__nome{ font-family:var(--f-display); font-size:15px; font-weight:700; color:var(--navy); letter-spacing:.02em; }
.ag-mes__ano{ font-family:var(--f-display); font-size:15px; font-weight:600; color:var(--faint); }
.ag-mes__linha{ flex:1; height:1px; background:var(--line); }
.ag-mes__horas{ font-size:12px; font-weight:600; color:var(--muted); background:var(--surface); border:1px solid var(--line); padding:3px 12px; border-radius:var(--r-pill); }

.ag-trilha{ position:relative; padding-left:52px; }
.ag-trilha::before{ content:''; position:absolute; left:21px; top:10px; bottom:10px; width:2px; background:var(--line); }
.ag-dia{ position:relative; margin-bottom:14px; }
.ag-dia:last-child{ margin-bottom:0; }
.ag-dia__chip{
  position:absolute; left:-52px; top:0; width:42px; height:46px; border-radius:12px;
  background:var(--surface); border:1.5px solid var(--line); display:flex; flex-direction:column;
  align-items:center; justify-content:center; box-shadow:var(--sh-1); z-index:1;
}
.ag-dia__num{ font-family:var(--f-display); font-size:19px; font-weight:700; color:var(--navy); line-height:1; }
.ag-dia__dow{ font-size:9px; font-weight:700; color:var(--muted); letter-spacing:.04em; }
.ag-dia.realizada .ag-dia__chip{ background:var(--navy); border-color:var(--navy); }
.ag-dia.realizada .ag-dia__num, .ag-dia.realizada .ag-dia__dow{ color:#fff; }
.ag-dia.hoje .ag-dia__chip{ background:var(--gold); border-color:var(--gold); box-shadow:0 0 0 4px var(--gold-100); }
.ag-dia.hoje .ag-dia__num, .ag-dia.hoje .ag-dia__dow{ color:#2A1D02; }

.ag-dia__card{
  background:var(--surface); border:1px solid var(--line-2); border-radius:var(--r-lg);
  box-shadow:var(--sh-1); padding:12px 14px;
}
.ag-dia.futura .ag-dia__card{ background:var(--surface-2); }
.ag-dia__titulo{ font-weight:700; font-size:13.5px; color:var(--navy); margin-bottom:8px; }
.ag-linha{ display:flex; align-items:center; gap:10px; padding:7px 0; }
.ag-linha + .ag-linha{ border-top:1px solid var(--line-2); }
.ag-linha__hora{ font-family:var(--f-mono); font-size:13px; font-weight:700; color:var(--ink); white-space:nowrap; }
.ag-linha__disc{ font-size:12.5px; color:var(--muted); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ag-linha.aguardando .ag-linha__hora{ color:var(--muted); }

.disc-estagio{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding:12px 0; border-bottom:1px solid var(--line-2);
}
.disc-estagio:last-child{ border-bottom:none; }
.disc-estagio__nome{ font-weight:600; font-size:13.5px; }
.disc-estagio__cod{ font-family:var(--f-mono); font-size:11px; color:var(--muted); }
.disc-estagio__barra{ width:100%; margin-top:6px; }

.rodape-agenda{ text-align:center; padding:24px 0 6px; color:var(--faint); font-size:11.5px; }

/* ---- Cabeçalho de "voltar" no nível 2 da agenda ---- */
.voltar{ display:inline-flex; align-items:center; gap:6px; color:rgba(255,255,255,.85); font-size:13px; font-weight:600; cursor:pointer; margin-bottom:14px; background:none; border:none; padding:0; }
.voltar:hover{ color:#fff; }
