/* ==========================================================================
   Tema: escuro, preciso, "instrumento de trabalho". Bootstrap por baixo.
   Regra de ouro: todo número na tela leva a uma decisão.
   ========================================================================== */
:root, [data-bs-theme=dark] {
  --bg: #08090b;
  --painel: #0f1115;
  --painel-2: #15181e;
  --painel-3: #1b1f27;
  --linha: rgba(255, 255, 255, .07);
  --linha-forte: rgba(255, 255, 255, .13);
  --texto: #eef0f4;
  --mudo: #8b919d;
  --mudo-2: #5f6570;
  --acento: #c6f45c;          /* verde-limão elétrico */
  --acento-tinta: #0c1003;
  --acento-fundo: rgba(198, 244, 92, .1);
  --acento-texto: #c6f45c;      /* acento usado como cor de TEXTO */
  --forte: #fff;                 /* texto de máximo contraste */
  --side-bg: rgba(10, 11, 14, .7);
  --vidro: rgba(15, 17, 21, .86);
  --brilho: rgba(198, 244, 92, .05);
  --sombra: 0 10px 40px rgba(0, 0, 0, .5);
  --perigo: #ff6b6b;
  --perigo-fundo: rgba(255, 107, 107, .1);
  --alerta: #ffb84d;
  --alerta-fundo: rgba(255, 184, 77, .1);
  --ok: #45e0a0;
  --ok-fundo: rgba(69, 224, 160, .1);
  --info: #6cc7ff;
  --raio: 14px;
  --raio-p: 9px;

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--texto);
  --bs-secondary-color: var(--mudo);
  --bs-tertiary-color: var(--mudo-2);
  --bs-border-color: var(--linha);
  --bs-border-color-translucent: var(--linha);
  --bs-secondary-bg: var(--painel-2);
  --bs-tertiary-bg: var(--painel);
  --bs-emphasis-color: #fff;
  --bs-link-color: var(--acento);
  --bs-link-color-rgb: 198, 244, 92;
  --bs-link-hover-color: #dbff8a;
  --bs-link-hover-color-rgb: 219, 255, 138;
  --bs-primary-rgb: 198, 244, 92;
  --bs-success-rgb: 69, 224, 160;
  --bs-danger-rgb: 255, 107, 107;
  --bs-warning-rgb: 255, 184, 77;
  --bs-body-font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --bs-body-font-size: .95rem;
  --bs-border-radius: var(--raio-p);
  --bs-focus-ring-color: rgba(198, 244, 92, .3);
}

body { min-height: 100vh; -webkit-font-smoothing: antialiased; letter-spacing: -.005em;
  background: radial-gradient(1200px 600px at 85% -10%, var(--brilho), transparent 60%), var(--bg) fixed; }
::selection { background: var(--acento); color: var(--acento-tinta); }
h1, h2, h3, .h1, .h2, .h3, .h4, .h5 { font-weight: 650; letter-spacing: -.025em; }
a { text-decoration: none; }
.num, .kpi-valor, td.text-end, .table td { font-variant-numeric: tabular-nums; }
.text-body-secondary { color: var(--mudo) !important; }

/* ---------- texto bilíngue ---------- */
.bi { display: inline-flex; flex-direction: column; line-height: 1.15; vertical-align: middle; }
.bi .pt { font-size: .7em; font-weight: 450; font-style: normal; color: var(--mudo-2); margin-top: 2px; letter-spacing: 0; }
/* Botões: uma linha só, em inglês; a tradução aparece ao passar o mouse (title). */
.btn .bi, .btn-icone .bi { display: inline; }
.btn .bi .pt { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn .ico { width: 16px; height: 16px; }
.btn-sm .ico { width: 14px; height: 14px; }
h1 .bi .pt, .h3 .bi .pt { font-size: .42em; font-weight: 500; margin-top: 6px; color: var(--mudo); letter-spacing: .01em; }
h2 .bi .pt, .h5 .bi .pt { font-size: .62em; }

/* ---------- ícones ---------- */
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px 16px; border-right: 1px solid var(--linha); background: var(--side-bg);
  backdrop-filter: blur(12px); }
.marca { display: flex; align-items: center; gap: 10px; color: var(--texto); font-weight: 700; letter-spacing: -.02em;
  padding: 0 8px; }
.marca:hover { color: var(--forte); }
.marca-sinal { width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: conic-gradient(from 210deg, var(--acento), #6cc7ff, var(--acento)); box-shadow: 0 0 22px rgba(198, 244, 92, .35); }
.marca-grande { font-size: 1.25rem; justify-content: center; margin-bottom: 28px; }
.side-escola { margin: 14px 8px 10px; font-size: .74rem; color: var(--mudo-2); text-transform: uppercase; letter-spacing: .08em; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--raio-p);
  color: var(--mudo); font-weight: 520; transition: background .15s, color .15s; }
.side-nav a:hover { background: var(--painel-2); color: var(--texto); }
.side-nav a.ativo { background: var(--painel-3); color: var(--forte); box-shadow: inset 2px 0 0 var(--acento); }
.side-nav a.ativo .ico { color: var(--acento-texto); }
.side-pe { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--linha); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--acento-fundo); color: var(--acento-texto); font-weight: 700; border: 1px solid rgba(198, 244, 92, .25); }
.side-user { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .86rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { color: var(--mudo-2); font-weight: 450; }
.btn-icone { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--raio-p);
  border: 1px solid var(--linha); background: transparent; color: var(--mudo); }
.btn-icone:hover { color: var(--texto); border-color: var(--linha-forte); background: var(--painel-2); }

.principal { min-width: 0; }
.conteudo { max-width: 1240px; margin: 0 auto; padding: 34px 40px 64px; }
.tabbar { display: none; }
.side-escola-trocar { display: block; text-decoration: none; border-radius: 8px; padding: 4px 6px; margin-left: 2px; }
.side-escola-trocar:hover { color: var(--bs-body-color); background: rgba(127,127,127,.12); }
.side-escola-trocar .small { text-transform: none; letter-spacing: 0; opacity: .8; }
.escola-movel { display: none; }

.acesso { max-width: 420px; margin: 0 auto; padding: 12vh 20px 40px; }

/* ---------- cabeçalho de página ---------- */
.cabeca { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.cabeca h1 { margin: 0; font-size: 1.85rem; }
.sobretitulo { font-size: .76rem; color: var(--mudo-2); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }

/* ---------- superfícies ---------- */
.card, .bloco { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); }
.card { --bs-card-bg: var(--painel); --bs-card-border-color: var(--linha); --bs-card-border-radius: var(--raio); }
.bloco { padding: 22px; }
.bloco + .bloco { margin-top: 18px; }
.bloco-titulo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.bloco-titulo h2 { font-size: 1.02rem; margin: 0; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { position: relative; display: block; padding: 18px 20px; background: var(--painel); border: 1px solid var(--linha);
  border-radius: var(--raio); color: var(--texto); overflow: hidden; transition: border-color .15s, transform .15s; }
a.kpi:hover { border-color: var(--linha-forte); color: var(--texto); transform: translateY(-1px); }
.kpi-rotulo { font-size: .8rem; color: var(--mudo); font-weight: 520; }
.kpi-valor { font-size: 1.9rem; font-weight: 680; letter-spacing: -.035em; margin: 8px 0 4px; line-height: 1.05; }
.kpi-sub { font-size: .78rem; color: var(--mudo-2); }
.kpi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: var(--linha); }
.kpi.perigo::after { background: var(--perigo); box-shadow: 0 0 18px var(--perigo); }
.kpi.perigo .kpi-valor { color: var(--perigo); }
.kpi.alerta::after { background: var(--alerta); }
.kpi.alerta .kpi-valor { color: var(--alerta); }
.kpi.ok::after { background: var(--ok); }
.kpi.ok .kpi-valor { color: var(--ok); }
.kpi.acento::after { background: var(--acento); }

/* ---------- fila de ações ---------- */
.fila { display: flex; flex-direction: column; }
.acao { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 13px 4px;
  border-bottom: 1px solid var(--linha); }
.acao:last-child { border-bottom: 0; }
.acao-icone { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.acao-icone.perigo { background: var(--perigo-fundo); color: var(--perigo); }
.acao-icone.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.acao-icone.info { background: rgba(108, 199, 255, .1); color: var(--info); }
.acao-titulo { font-weight: 600; color: var(--texto); }
.acao-sub { font-size: .8rem; color: var(--mudo); }
.vazio { padding: 26px 0; text-align: center; color: var(--mudo); }
.vazio .ico { width: 28px; height: 28px; color: var(--ok); margin-bottom: 8px; }

/* ---------- gráfico de receita ---------- */
.grafico { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; align-items: end; height: 190px; padding-top: 12px; }
.coluna { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; min-width: 0; }
.coluna-barras { width: 100%; max-width: 46px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.barra { width: 100%; border-radius: 6px 6px 3px 3px; min-height: 3px; transition: filter .15s; }
.barra.recebido { background: linear-gradient(180deg, var(--acento), #8fcf2a); box-shadow: 0 0 16px rgba(198, 244, 92, .18); }
.barra.aberto { background: repeating-linear-gradient(135deg, rgba(255, 184, 77, .55) 0 4px, rgba(255, 184, 77, .25) 4px 8px); border-radius: 6px 6px 3px 3px; }
.coluna:hover .barra { filter: brightness(1.15); }
.coluna-valor { font-size: .72rem; color: var(--mudo); white-space: nowrap; }
.coluna-mes { font-size: .75rem; color: var(--mudo-2); text-transform: capitalize; }
.coluna.atual .coluna-mes { color: var(--texto); font-weight: 600; }
.legenda { display: flex; gap: 16px; font-size: .78rem; color: var(--mudo); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legenda .l-recebido { background: var(--acento); }
.legenda .l-aberto { background: var(--alerta); opacity: .7; }

/* ---------- botões ---------- */
.btn { --bs-btn-font-weight: 600; --bs-btn-border-radius: var(--raio-p); letter-spacing: -.01em; }
.btn-primary { --bs-btn-bg: var(--acento); --bs-btn-border-color: var(--acento); --bs-btn-color: var(--acento-tinta);
  --bs-btn-hover-bg: #d6ff7a; --bs-btn-hover-border-color: #d6ff7a; --bs-btn-hover-color: var(--acento-tinta);
  --bs-btn-active-bg: #b3e044; --bs-btn-active-color: var(--acento-tinta); --bs-btn-disabled-bg: var(--acento); --bs-btn-disabled-color: var(--acento-tinta); }
.btn-primary:hover { box-shadow: 0 0 0 4px rgba(198, 244, 92, .12); }
.btn-success { --bs-btn-bg: var(--ok); --bs-btn-border-color: var(--ok); --bs-btn-color: #04150d;
  --bs-btn-hover-bg: #6af0b8; --bs-btn-hover-border-color: #6af0b8; --bs-btn-hover-color: #04150d; }
.btn-outline-success { --bs-btn-color: var(--ok); --bs-btn-border-color: rgba(69, 224, 160, .4);
  --bs-btn-hover-bg: var(--ok-fundo); --bs-btn-hover-color: var(--ok); --bs-btn-hover-border-color: var(--ok); }
.btn-outline-primary { --bs-btn-color: var(--acento-texto); --bs-btn-border-color: rgba(198, 244, 92, .4);
  --bs-btn-hover-bg: var(--acento-fundo); --bs-btn-hover-color: var(--acento-texto); --bs-btn-hover-border-color: var(--acento); }
.btn-outline-secondary { --bs-btn-color: var(--texto); --bs-btn-border-color: var(--linha-forte);
  --bs-btn-hover-bg: var(--painel-2); --bs-btn-hover-color: var(--forte); --bs-btn-hover-border-color: var(--linha-forte); }

/* ---------- formulários ---------- */
.form-control, .form-select { background-color: var(--painel-2); border-color: var(--linha); color: var(--texto);
  border-radius: var(--raio-p); padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { background-color: var(--painel-2); border-color: rgba(198, 244, 92, .55);
  color: var(--texto); box-shadow: 0 0 0 4px rgba(198, 244, 92, .12); }
.form-control::placeholder { color: var(--mudo-2); }
.form-label { font-size: .84rem; font-weight: 560; color: var(--texto); margin-bottom: .35rem; }
.form-text { color: var(--mudo-2); font-size: .78rem; }
.form-check-input:checked { background-color: var(--acento); border-color: var(--acento); }
.form-check-input:checked[type=checkbox] { --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%230c1003' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
.invalid-feedback { color: var(--perigo); }
.form-control.is-invalid { border-color: var(--perigo); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { filter: invert(.8); }

/* ---------- abas (controle segmentado) ---------- */
.segmentos { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--painel); border: 1px solid var(--linha); border-radius: 12px; }
.segmentos a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 9px; color: var(--mudo); font-weight: 550; font-size: .88rem; }
.segmentos a:hover { color: var(--texto); }
.segmentos a.ativo { background: var(--painel-3); color: var(--forte); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset; }
.contador { font-size: .72rem; padding: 2px 7px; border-radius: 99px; background: var(--painel-3); color: var(--mudo); font-variant-numeric: tabular-nums; }
.segmentos a.ativo .contador { background: var(--acento); color: var(--acento-tinta); }

/* ---------- tabelas ---------- */
.tabela { width: 100%; border-collapse: separate; border-spacing: 0; }
.tabela th { font-size: .74rem; font-weight: 600; color: var(--mudo-2); text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 14px; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.tabela th .bi .pt { text-transform: none; letter-spacing: 0; }
.tabela td { padding: 13px 14px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela tbody tr { transition: background .12s; }
.tabela tbody tr:hover { background: var(--painel-2); }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela a.nome { color: var(--texto); font-weight: 600; }
.tabela a.nome:hover { color: var(--acento-texto); }

/* ---------- etiquetas ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-perigo { color: var(--perigo); background: var(--perigo-fundo); }
.tag-alerta { color: var(--alerta); background: var(--alerta-fundo); }
.tag-ok { color: var(--ok); background: var(--ok-fundo); }
.tag-info { color: var(--info); background: rgba(108, 199, 255, .1); }
.tag-neutra { color: var(--mudo); background: var(--painel-3); }
.badge { font-weight: 600; }

/* ---------- avisos ---------- */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--raio-p);
  border: 1px solid var(--linha); background: var(--painel); margin-bottom: 18px; font-size: .9rem; }
.aviso-success { border-color: rgba(69, 224, 160, .3); background: var(--ok-fundo); }
.aviso-erro { border-color: rgba(255, 107, 107, .35); background: var(--perigo-fundo); }
.aviso-warning { border-color: rgba(255, 184, 77, .35); background: var(--alerta-fundo); }
.alert { --bs-alert-border-radius: var(--raio-p); }
.alert-warning { --bs-alert-bg: var(--alerta-fundo); --bs-alert-border-color: rgba(255, 184, 77, .3); --bs-alert-color: #ffd699; }
.alert-danger { --bs-alert-bg: var(--perigo-fundo); --bs-alert-border-color: rgba(255, 107, 107, .3); --bs-alert-color: #ffb3b3; }
.alert-info { --bs-alert-bg: rgba(108, 199, 255, .08); --bs-alert-border-color: rgba(108, 199, 255, .25); --bs-alert-color: #bfe6ff; }

/* ---------- progresso / fases ---------- */
.progress { --bs-progress-height: 8px; --bs-progress-bg: var(--painel-3); --bs-progress-border-radius: 99px; }
.progress-bar { background: linear-gradient(90deg, #8fcf2a, var(--acento)); }
.progress-bar.bg-warning { background: var(--alerta) !important; }
.progress-bar.bg-danger { background: var(--perigo) !important; }
.fase-num { width: 2rem; height: 2rem; border-radius: 10px; display: inline-grid; place-items: center; flex: none;
  background: var(--painel-3); font-weight: 700; color: var(--mudo); }
.fase-em_andamento .fase-num { background: var(--acento); color: var(--acento-tinta); box-shadow: 0 0 16px rgba(198, 244, 92, .3); }
.fase-concluida .fase-num { background: var(--ok-fundo); color: var(--ok); }
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--linha); --bs-list-group-action-hover-bg: var(--painel-2); }

/* ---------- celular ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .escola-movel { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 14px; font-size: .78rem;
                  text-transform: uppercase; letter-spacing: .06em; color: var(--mudo-2); text-decoration: none;
                  border: 1px solid rgba(127,127,127,.3); border-radius: 999px; padding: 4px 12px; }
  .escola-movel span { text-transform: none; letter-spacing: 0; }
  .conteudo { padding: 22px 16px calc(96px + env(safe-area-inset-bottom)); }
  .cabeca h1 { font-size: 1.5rem; }
  .tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    justify-content: space-around; padding: 8px; border-radius: 18px; border: 1px solid var(--linha-forte);
    background: var(--vidro); backdrop-filter: blur(16px); box-shadow: var(--sombra); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 12px;
    font-size: .68rem; font-weight: 600; color: var(--mudo); }
  .tabbar a.ativo { color: var(--acento-texto); background: var(--painel-3); }
  .tabbar .ico { width: 21px; height: 21px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-valor { font-size: 1.3rem; }
  .acao { grid-template-columns: 32px 1fr; }
  .acao > :last-child { grid-column: 2; justify-self: start; }
  .grafico { height: 150px; gap: 6px; }
  .coluna-valor { display: none; }
}
/* larguras e alturas (sem style inline) */
.w-0 { width: 0% !important; } .h-0 { height: 0%; }
.w-1 { width: 1% !important; } .h-1 { height: 1%; }
.w-2 { width: 2% !important; } .h-2 { height: 2%; }
.w-3 { width: 3% !important; } .h-3 { height: 3%; }
.w-4 { width: 4% !important; } .h-4 { height: 4%; }
.w-5 { width: 5% !important; } .h-5 { height: 5%; }
.w-6 { width: 6% !important; } .h-6 { height: 6%; }
.w-7 { width: 7% !important; } .h-7 { height: 7%; }
.w-8 { width: 8% !important; } .h-8 { height: 8%; }
.w-9 { width: 9% !important; } .h-9 { height: 9%; }
.w-10 { width: 10% !important; } .h-10 { height: 10%; }
.w-11 { width: 11% !important; } .h-11 { height: 11%; }
.w-12 { width: 12% !important; } .h-12 { height: 12%; }
.w-13 { width: 13% !important; } .h-13 { height: 13%; }
.w-14 { width: 14% !important; } .h-14 { height: 14%; }
.w-15 { width: 15% !important; } .h-15 { height: 15%; }
.w-16 { width: 16% !important; } .h-16 { height: 16%; }
.w-17 { width: 17% !important; } .h-17 { height: 17%; }
.w-18 { width: 18% !important; } .h-18 { height: 18%; }
.w-19 { width: 19% !important; } .h-19 { height: 19%; }
.w-20 { width: 20% !important; } .h-20 { height: 20%; }
.w-21 { width: 21% !important; } .h-21 { height: 21%; }
.w-22 { width: 22% !important; } .h-22 { height: 22%; }
.w-23 { width: 23% !important; } .h-23 { height: 23%; }
.w-24 { width: 24% !important; } .h-24 { height: 24%; }
.w-25 { width: 25% !important; } .h-25 { height: 25%; }
.w-26 { width: 26% !important; } .h-26 { height: 26%; }
.w-27 { width: 27% !important; } .h-27 { height: 27%; }
.w-28 { width: 28% !important; } .h-28 { height: 28%; }
.w-29 { width: 29% !important; } .h-29 { height: 29%; }
.w-30 { width: 30% !important; } .h-30 { height: 30%; }
.w-31 { width: 31% !important; } .h-31 { height: 31%; }
.w-32 { width: 32% !important; } .h-32 { height: 32%; }
.w-33 { width: 33% !important; } .h-33 { height: 33%; }
.w-34 { width: 34% !important; } .h-34 { height: 34%; }
.w-35 { width: 35% !important; } .h-35 { height: 35%; }
.w-36 { width: 36% !important; } .h-36 { height: 36%; }
.w-37 { width: 37% !important; } .h-37 { height: 37%; }
.w-38 { width: 38% !important; } .h-38 { height: 38%; }
.w-39 { width: 39% !important; } .h-39 { height: 39%; }
.w-40 { width: 40% !important; } .h-40 { height: 40%; }
.w-41 { width: 41% !important; } .h-41 { height: 41%; }
.w-42 { width: 42% !important; } .h-42 { height: 42%; }
.w-43 { width: 43% !important; } .h-43 { height: 43%; }
.w-44 { width: 44% !important; } .h-44 { height: 44%; }
.w-45 { width: 45% !important; } .h-45 { height: 45%; }
.w-46 { width: 46% !important; } .h-46 { height: 46%; }
.w-47 { width: 47% !important; } .h-47 { height: 47%; }
.w-48 { width: 48% !important; } .h-48 { height: 48%; }
.w-49 { width: 49% !important; } .h-49 { height: 49%; }
.w-50 { width: 50% !important; } .h-50 { height: 50%; }
.w-51 { width: 51% !important; } .h-51 { height: 51%; }
.w-52 { width: 52% !important; } .h-52 { height: 52%; }
.w-53 { width: 53% !important; } .h-53 { height: 53%; }
.w-54 { width: 54% !important; } .h-54 { height: 54%; }
.w-55 { width: 55% !important; } .h-55 { height: 55%; }
.w-56 { width: 56% !important; } .h-56 { height: 56%; }
.w-57 { width: 57% !important; } .h-57 { height: 57%; }
.w-58 { width: 58% !important; } .h-58 { height: 58%; }
.w-59 { width: 59% !important; } .h-59 { height: 59%; }
.w-60 { width: 60% !important; } .h-60 { height: 60%; }
.w-61 { width: 61% !important; } .h-61 { height: 61%; }
.w-62 { width: 62% !important; } .h-62 { height: 62%; }
.w-63 { width: 63% !important; } .h-63 { height: 63%; }
.w-64 { width: 64% !important; } .h-64 { height: 64%; }
.w-65 { width: 65% !important; } .h-65 { height: 65%; }
.w-66 { width: 66% !important; } .h-66 { height: 66%; }
.w-67 { width: 67% !important; } .h-67 { height: 67%; }
.w-68 { width: 68% !important; } .h-68 { height: 68%; }
.w-69 { width: 69% !important; } .h-69 { height: 69%; }
.w-70 { width: 70% !important; } .h-70 { height: 70%; }
.w-71 { width: 71% !important; } .h-71 { height: 71%; }
.w-72 { width: 72% !important; } .h-72 { height: 72%; }
.w-73 { width: 73% !important; } .h-73 { height: 73%; }
.w-74 { width: 74% !important; } .h-74 { height: 74%; }
.w-75 { width: 75% !important; } .h-75 { height: 75%; }
.w-76 { width: 76% !important; } .h-76 { height: 76%; }
.w-77 { width: 77% !important; } .h-77 { height: 77%; }
.w-78 { width: 78% !important; } .h-78 { height: 78%; }
.w-79 { width: 79% !important; } .h-79 { height: 79%; }
.w-80 { width: 80% !important; } .h-80 { height: 80%; }
.w-81 { width: 81% !important; } .h-81 { height: 81%; }
.w-82 { width: 82% !important; } .h-82 { height: 82%; }
.w-83 { width: 83% !important; } .h-83 { height: 83%; }
.w-84 { width: 84% !important; } .h-84 { height: 84%; }
.w-85 { width: 85% !important; } .h-85 { height: 85%; }
.w-86 { width: 86% !important; } .h-86 { height: 86%; }
.w-87 { width: 87% !important; } .h-87 { height: 87%; }
.w-88 { width: 88% !important; } .h-88 { height: 88%; }
.w-89 { width: 89% !important; } .h-89 { height: 89%; }
.w-90 { width: 90% !important; } .h-90 { height: 90%; }
.w-91 { width: 91% !important; } .h-91 { height: 91%; }
.w-92 { width: 92% !important; } .h-92 { height: 92%; }
.w-93 { width: 93% !important; } .h-93 { height: 93%; }
.w-94 { width: 94% !important; } .h-94 { height: 94%; }
.w-95 { width: 95% !important; } .h-95 { height: 95%; }
.w-96 { width: 96% !important; } .h-96 { height: 96%; }
.w-97 { width: 97% !important; } .h-97 { height: 97%; }
.w-98 { width: 98% !important; } .h-98 { height: 98%; }
.w-99 { width: 99% !important; } .h-99 { height: 99%; }
.w-100 { width: 100% !important; } .h-100 { height: 100%; }

.busca { max-width: 380px; }


/* ---------- escolha de tema ---------- */
.temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tema-opcao { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 12px; text-align: left;
  border-radius: var(--raio); border: 1px solid var(--linha); background: var(--painel-2); color: var(--texto); font: inherit; font-weight: 600; }
.tema-opcao:hover { border-color: var(--linha-forte); }
.tema-opcao.ativo { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-fundo); }
.tema-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--acento); color: var(--acento-tinta); }
.tema-check .ico { width: 14px; height: 14px; stroke-width: 2.6; }
.tema-amostra { display: grid; grid-template-columns: 28% 1fr; grid-template-rows: 1fr 1fr; gap: 5px; height: 74px; padding: 7px;
  border-radius: 10px; border: 1px solid rgba(128, 128, 128, .2); }
.tema-amostra i { grid-row: span 2; border-radius: 5px; }
.tema-amostra b { border-radius: 5px; }
.amostra-escuro { background: #08090b; } .amostra-escuro i { background: #15181e; } .amostra-escuro b { background: #1b1f27; }
.amostra-escuro b:first-of-type { background: linear-gradient(90deg, #c6f45c 35%, #1b1f27 35%); }
.amostra-claro { background: #f5f6f8; } .amostra-claro i { background: #fff; } .amostra-claro b { background: #e6e9ee; }
.amostra-claro b:first-of-type { background: linear-gradient(90deg, #5d8f12 35%, #e6e9ee 35%); }
.amostra-sistema { background: linear-gradient(90deg, #f5f6f8 50%, #08090b 50%); }
.amostra-sistema i { background: rgba(140, 145, 155, .28); }
.amostra-sistema b { background: linear-gradient(90deg, #e6e9ee 50%, #1b1f27 50%); }
.amostra-sistema b:first-of-type { background: linear-gradient(90deg, #5d8f12 25%, #e6e9ee 25% 50%, #c6f45c 50% 75%, #1b1f27 75%); }
@media (max-width: 560px) { .temas { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   Tema CLARO
   ========================================================================== */
[data-bs-theme=light] {
  --bg: #f5f6f8;
  --painel: #ffffff;
  --painel-2: #f3f5f8;
  --painel-3: #e9ecf1;
  --linha: rgba(16, 22, 34, .09);
  --linha-forte: rgba(16, 22, 34, .16);
  --texto: #10141b;
  --mudo: #5a6170;
  --mudo-2: #8b919c;
  --forte: #05070a;
  --acento: #4f8a0a;            /* tema claro: verde-escuro (limão some no branco) */
  --acento-tinta: #ffffff;
  --acento-fundo: rgba(79, 138, 10, .10);
  --acento-texto: #4f8a0a;
  --perigo: #e5484d;
  --perigo-fundo: rgba(229, 72, 77, .09);
  --alerta: #d97a00;
  --alerta-fundo: rgba(245, 158, 11, .12);
  --ok: #1a9b62;
  --ok-fundo: rgba(26, 155, 98, .1);
  --info: #1d7fc4;
  --side-bg: rgba(255, 255, 255, .8);
  --vidro: rgba(255, 255, 255, .9);
  --brilho: rgba(79, 138, 10, .06);
  --sombra: 0 10px 30px rgba(16, 22, 34, .12);

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--texto);
  --bs-secondary-color: var(--mudo);
  --bs-tertiary-color: var(--mudo-2);
  --bs-border-color: var(--linha);
  --bs-border-color-translucent: var(--linha);
  --bs-secondary-bg: var(--painel-2);
  --bs-tertiary-bg: var(--painel);
  --bs-emphasis-color: var(--forte);
  --bs-link-color: var(--acento-texto);
  --bs-link-color-rgb: 79, 125, 12;
  --bs-link-hover-color: #3b5f08;
  --bs-link-hover-color-rgb: 59, 95, 8;
  --bs-heading-color: var(--forte);
}
[data-bs-theme=light] .card, [data-bs-theme=light] .bloco, [data-bs-theme=light] .kpi { box-shadow: 0 1px 2px rgba(16, 22, 34, .04), 0 8px 24px rgba(16, 22, 34, .04); }
[data-bs-theme=light] .marca-sinal { box-shadow: none; }
[data-bs-theme=light] .avatar { border-color: rgba(79, 125, 12, .25); }
[data-bs-theme=light] .btn-primary { --bs-btn-bg: #4f8a0a; --bs-btn-border-color: #4f8a0a; --bs-btn-color: #fff; --bs-btn-hover-bg: #3f6f08; --bs-btn-hover-border-color: #3f6f08; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #355e06; --bs-btn-active-border-color: #355e06; --bs-btn-active-color: #fff; --bs-btn-disabled-bg: #4f8a0a; --bs-btn-disabled-border-color: #4f8a0a; --bs-btn-disabled-color: #fff; }
[data-bs-theme=light] .btn-success { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #158552; --bs-btn-hover-border-color: #158552; }
[data-bs-theme=light] .barra.recebido { background: #4f8a0a; box-shadow: none; }
[data-bs-theme=light] .barra.aberto { background: repeating-linear-gradient(135deg, rgba(217, 122, 0, .45) 0 4px, rgba(217, 122, 0, .18) 4px 8px); }
[data-bs-theme=light] .legenda .l-recebido { background: #4f8a0a; }
[data-bs-theme=light] .kpi.perigo::after { box-shadow: none; }
[data-bs-theme=light] .fase-em_andamento .fase-num { box-shadow: none; }
[data-bs-theme=light] .progress-bar { background: #4f8a0a; }
[data-bs-theme=light] .alert-warning { --bs-alert-color: #8a4b00; }
[data-bs-theme=light] .alert-danger { --bs-alert-color: #a3262a; }
[data-bs-theme=light] .alert-info { --bs-alert-color: #155f93; }
[data-bs-theme=light] input[type=date]::-webkit-calendar-picker-indicator,
[data-bs-theme=light] input[type=time]::-webkit-calendar-picker-indicator { filter: none; }
[data-bs-theme=light] .text-body-tertiary { color: var(--mudo-2) !important; }
/* linha inteira clicável */
.tabela tr.linha-link { cursor: pointer; }
.tabela tr.linha-link:hover td:first-child { box-shadow: inset 2px 0 0 var(--acento); }
.tabela tr.linha-link:hover a.nome { color: var(--acento-texto); }


/* ---------- ficha do aluno ---------- */
.min-w-0 { min-width: 0; }
.voltar { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; margin-bottom: 18px; border-radius: 99px;
  border: 1px solid var(--linha); background: var(--painel); color: var(--mudo); font-size: .86rem; font-weight: 600; transition: all .15s; }
.voltar:hover { color: var(--texto); border-color: var(--linha-forte); transform: translateX(-2px); }
.voltar .ico { width: 16px; height: 16px; }

.perfil { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.perfil-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.perfil-avatar { width: 64px; height: 64px; border-radius: 20px; flex: none; display: grid; place-items: center; font-size: 1.6rem; font-weight: 750;
  color: var(--acento-tinta); background: linear-gradient(135deg, var(--acento), #6cc7ff); box-shadow: 0 8px 30px rgba(198, 244, 92, .18); }
.perfil-nome { font-size: 1.9rem; margin: 0 0 8px; line-height: 1.1; }
.perfil-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.perfil-email { color: var(--mudo); font-size: .86rem; margin-top: 8px; }
.perfil-acoes { display: flex; gap: 8px; }

.perfil-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pn { padding: 14px 16px; border-radius: var(--raio); background: var(--painel); border: 1px solid var(--linha); min-width: 0; }
.pn-rotulo { display: block; font-size: .8rem; color: var(--mudo); font-weight: 520; }
.pn-valor { display: block; font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.pn-valor small { font-size: .55em; color: var(--mudo); font-weight: 500; letter-spacing: 0; }
.pn-texto { font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn.perigo { border-color: rgba(255, 107, 107, .35); } .pn.perigo .pn-valor { color: var(--perigo); }
.pn.alerta { border-color: rgba(255, 184, 77, .35); } .pn.alerta .pn-valor { color: var(--alerta); }

.dados { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px 20px; margin: 0; }
.dados > div { min-width: 0; }
.dados dt { font-size: .78rem; font-weight: 600; color: var(--mudo); margin-bottom: 4px; }
.dados dd { margin: 0; }
.dados-largo { grid-column: 1 / -1; }
.dados-coluna { grid-template-columns: 1fr; }
.chamada { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--raio-p); background: var(--alerta-fundo);
  border: 1px solid rgba(255, 184, 77, .25); }
.subform { margin-top: 16px; padding: 18px; border-radius: var(--raio-p); background: var(--painel-2); border: 1px solid var(--linha); }

.fase { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--linha); }
.fase:last-child { border-bottom: 0; }
.fase-num .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linha); }
.item:last-child { border-bottom: 0; }
.item-data { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: 10px;
  background: var(--painel-2); border: 1px solid var(--linha); line-height: 1.1; }
.item-data strong { font-size: 1.05rem; }
.item-data small { font-size: .66rem; color: var(--mudo); }
@media (max-width: 900px) {
  .perfil-nome { font-size: 1.45rem; }
  .perfil-avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 1.3rem; }
  .perfil-acoes { width: 100%; } .perfil-acoes .btn { flex: 1; }
  .dados { grid-template-columns: 1fr 1fr; }
  .perfil-numeros { grid-template-columns: 1fr 1fr; }
}

/* Tema claro: tudo que era verde-limão vira verde-escuro. */
[data-bs-theme=light] { --bs-primary-rgb: 79, 138, 10; --bs-focus-ring-color: #4f8a0a; }
[data-bs-theme=light] .btn-primary:hover { box-shadow: none; }
[data-bs-theme=light] .btn-outline-primary { --bs-btn-color: #4f8a0a; --bs-btn-border-color: #4f8a0a;
  --bs-btn-hover-bg: #4f8a0a; --bs-btn-hover-border-color: #4f8a0a; --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #3f6f08; --bs-btn-active-border-color: #3f6f08; --bs-btn-active-color: #fff; }
[data-bs-theme=light] .form-control:focus, [data-bs-theme=light] .form-select:focus { border-color: #4f8a0a; box-shadow: 0 0 0 1px #4f8a0a; }
[data-bs-theme=light] .form-check-input:checked { background-color: #4f8a0a; border-color: #4f8a0a; }
[data-bs-theme=light] .fase-em_andamento .fase-num { box-shadow: none; }
/* Tema claro: nada de verde fraco/transparente — o que tinha fundo verde clarinho vira o verde cheio (#4f8a0a) com texto branco. */
[data-bs-theme=light] { --brilho: transparent; }
[data-bs-theme=light] .avatar { background: #4f8a0a; color: #fff; border-color: #4f8a0a; }
[data-bs-theme=light] .tema-opcao.ativo { box-shadow: 0 0 0 2px #4f8a0a; }
[data-bs-theme=light] .btn-outline-primary { --bs-btn-hover-bg: #4f8a0a; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #4f8a0a; }

/* Logo enviada pelo admin (Configuração do site) */
.marca-logo { width: 32px; height: 32px; border-radius: 9px; object-fit: contain; flex: none; }
.marca-grande .marca-logo { width: 40px; height: 40px; }
