/* SIGA — Trebuchet MS font global */
* { font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif; }

/* ════════════════════════════════════════════════════════════════
   SIGA — Sistema de Gestão Académica
   Design System — Azul-Marinho + Dourado — Padrão Internacional
   © 2025 Cornélio Ntunduatha
════════════════════════════════════════════════════════════════ */

/* ── Variáveis ─────────────────────────────────────────────── */
:root {
  --az:  #0F2544;
  --az2: #1A3A6E;
  --az3: #2E5090;
  --az4: #EEF2FA;
  --go:  #C9A227;
  --go2: #E8C040;
  --go3: #FDF6E0;
  --bg:  #F0F4F9;
  --bg2: #E4EAF4;
  --wh:  #FFFFFF;
  --tc:  #0F172A;
  --tc2: #64748B;
  --tc3: #94A3B8;
  --br:  #DDE3EE;
  --br2: #C8D2E4;
  --gr:  #059669;
  --gr2: #D1FAE5;
  --rd:  #DC2626;
  --rd2: #FEE2E2;
  --am:  #D97706;
  --am2: #FEF3C7;
  --pu:  #7C3AED;
  --pu2: #EDE9FE;
  --bl:  #2563EB;
  --bl2: #DBEAFE;
  --sh:  0 1px 3px rgba(15,37,68,.08), 0 1px 2px rgba(15,37,68,.04);
  --sh2: 0 4px 16px rgba(15,37,68,.10), 0 2px 6px rgba(15,37,68,.06);
  --r:   8px;
  --r2:  12px;
  --r3:  16px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', 'Inter', Arial, sans-serif; font-size: 13.5px; color: var(--tc); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--az2); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--br2); border-radius: 10px; }

/* ── Layout Principal ───────────────────────────────────────── */
.siga-app { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: 224px; background: var(--az); color: #fff;
  display: flex; flex-direction: column; flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo {
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo-icon {
  width: 38px; height: 38px; background: var(--go);
  border-radius: var(--r); display: flex; align-items: center;
  justify-content: center; font-size: 17px; font-weight: 900;
  color: var(--az); flex-shrink: 0; letter-spacing: -1px;
}
.sidebar-logo-txt { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.sidebar-logo-sub { font-size: 9px; opacity: .5; letter-spacing: 1px; text-transform: uppercase; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0 8px; }
.nav-section {
  padding: 10px 16px 3px;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; color: rgba(255,255,255,.35);
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px; margin: 1px 8px;
  border-radius: var(--r); cursor: pointer;
  transition: background .15s, opacity .15s;
  font-size: 12.5px; font-weight: 500; opacity: .72;
  color: #fff;
}
.nav-item:hover { background: rgba(255,255,255,.09); opacity: .92; }
.nav-item.active { background: rgba(255,255,255,.15); opacity: 1; }
.nav-item.active .nav-item-ic { color: var(--go); }
.nav-item-ic { font-size: 15px; width: 19px; text-align: center; flex-shrink: 0; }
.nav-item-badge {
  margin-left: auto; background: var(--go); color: var(--az);
  font-size: 9px; font-weight: 800; padding: 1px 5px;
  border-radius: 10px; min-width: 16px; text-align: center;
}
.nav-item-new {
  margin-left: auto; background: rgba(5,150,105,.3); color: #6EE7B7;
  font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 10px;
}

.sidebar-user {
  padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--go); color: var(--az);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.sidebar-user-nome { font-size: 12px; font-weight: 600; color: #fff; }
.sidebar-user-papel { font-size: 10px; color: rgba(255,255,255,.45); }
.sidebar-logout {
  margin-left: auto; background: none; border: none;
  color: rgba(255,255,255,.4); font-size: 15px; cursor: pointer; padding: 4px;
  border-radius: var(--r); transition: .15s;
}
.sidebar-logout:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }

/* ── Main Area ──────────────────────────────────────────────── */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  height: 54px; background: var(--wh);
  border-bottom: 1px solid var(--br);
  display: flex; align-items: center;
  padding: 0 20px; gap: 12px;
  flex-shrink: 0; position: relative; z-index: 10;
}
.topbar-title { font-size: 15px; font-weight: 700; color: var(--az); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-search {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1px solid var(--br);
  border-radius: 20px; padding: 6px 12px;
}
.topbar-search input {
  border: none; background: none; outline: none;
  font-size: 12px; color: var(--tc); width: 160px;
}
.topbar-search input::placeholder { color: var(--tc3); }
.topbar-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--br);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; color: var(--tc2);
  transition: .15s; position: relative;
}
.topbar-btn:hover { background: var(--az4); color: var(--az); }
.topbar-notif::after {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; background: var(--rd);
  border-radius: 50%; border: 2px solid var(--wh);
}
.topbar-hora { font-size: 11px; color: var(--tc2); font-variant-numeric: tabular-nums; }

/* ── Content Area ───────────────────────────────────────────── */
.content { flex: 1; overflow-y: auto; padding: 18px 20px; background: var(--bg); }

/* ── Páginas ────────────────────────────────────────────────── */
.page { display: none; width: 100%; box-sizing: border-box; }
.page.active { display: block; width: 100%; min-height: 200px; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--wh); border-radius: var(--r2);
  border: 1px solid var(--br); padding: 16px;
  margin-bottom: 14px; box-shadow: var(--sh);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 10px;
}
.card-title { font-size: 13.5px; font-weight: 700; color: var(--az); }
.card-subtitle { font-size: 11px; color: var(--tc2); margin-top: 2px; }

/* ── Banner / Hero ──────────────────────────────────────────── */
.banner {
  background: var(--az); border-radius: var(--r2);
  padding: 20px 24px; color: #fff;
  margin-bottom: 14px; position: relative; overflow: hidden;
}
.banner::before {
  content: ''; position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(201,162,39,.12);
}
.banner::after {
  content: ''; position: absolute;
  right: 60px; bottom: -60px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.banner-saudacao { font-size: 20px; font-weight: 800; margin-bottom: 3px; }
.banner-data { font-size: 12px; opacity: .65; }
.banner-inst { font-size: 11px; opacity: .5; margin-top: 10px; }

/* ── Metric Cards ───────────────────────────────────────────── */
.metrics { display: grid; gap: 12px; margin-bottom: 14px; }
.metrics-4 { grid-template-columns: repeat(4,1fr); }
.metrics-3 { grid-template-columns: repeat(3,1fr); }
.metrics-2 { grid-template-columns: repeat(2,1fr); }
.metric {
  background: var(--wh); border-radius: var(--r2);
  border: 1px solid var(--br); padding: 14px 16px;
  box-shadow: var(--sh); transition: transform .15s;
}
.metric:hover { transform: translateY(-1px); box-shadow: var(--sh2); }
.metric-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--tc2); margin-bottom: 6px; }
.metric-value { font-size: 26px; font-weight: 800; color: var(--az); line-height: 1; }
.metric-sub { font-size: 10px; color: var(--tc3); margin-top: 5px; }
.metric-icon { font-size: 22px; float: right; margin-top: -2px; opacity: .7; }
.metric.gold .metric-value { color: var(--go); }
.metric.green .metric-value { color: var(--gr); }
.metric.red .metric-value { color: var(--rd); }
.metric.purple .metric-value { color: var(--pu); }
.metric.gold { border-left: 3px solid var(--go); }
.metric.green { border-left: 3px solid var(--gr); }
.metric.red { border-left: 3px solid var(--rd); }
.metric.purple { border-left: 3px solid var(--pu); }

/* ── Grids ──────────────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }

/* ── Botões ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--r);
  border: 1px solid var(--br); background: var(--wh);
  color: var(--az); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: .15s; white-space: nowrap;
  font-family: inherit;
}
.btn:hover { background: var(--az4); border-color: var(--az3); }
.btn:active { transform: scale(.98); }

.btn-primary { background: var(--az); color: #fff; border-color: var(--az); }
.btn-primary:hover { background: var(--az2); border-color: var(--az2); }
.btn-gold { background: var(--go); color: var(--az); border-color: var(--go); }
.btn-gold:hover { background: var(--go2); }
.btn-green { background: var(--gr); color: #fff; border-color: var(--gr); }
.btn-green:hover { opacity: .9; }
.btn-red { background: var(--rd); color: #fff; border-color: var(--rd); }
.btn-red:hover { opacity: .9; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-xs { padding: 2px 7px; font-size: 10px; border-radius: 5px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Chips / Badges ─────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
}
.chip-green { background: var(--gr2); color: #065F46; }
.chip-red { background: var(--rd2); color: #991B1B; }
.chip-amber { background: var(--am2); color: #92400E; }
.chip-blue { background: var(--bl2); color: #1E40AF; }
.chip-gold { background: var(--go3); color: #7A5E00; }
.chip-purple { background: var(--pu2); color: #4C1D95; }
.chip-gray { background: var(--bg2); color: var(--tc2); }

/* ── Tabelas ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.siga-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.siga-table thead th {
  padding: 9px 12px; text-align: left;
  background: var(--bg); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--tc2);
  border-bottom: 1.5px solid var(--br);
  white-space: nowrap;
}
.siga-table tbody td {
  padding: 9px 12px; border-bottom: 1px solid var(--bg);
  color: var(--tc);
}
.siga-table tbody tr { transition: background .1s; }
.siga-table tbody tr:hover td { background: var(--az4); }
.siga-table .fw { font-weight: 700; }
.siga-table .mono { font-family: 'Courier New', monospace; font-size: 10.5px; color: var(--az2); }
.siga-table .muted { color: var(--tc2); }

/* ── Formulários ────────────────────────────────────────────── */
.form-group { margin-bottom: 12px; }
.form-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--tc2); margin-bottom: 4px; text-transform: uppercase;
  letter-spacing: .5px;
}
.form-control {
  width: 100%; padding: 8px 11px;
  border: 1.5px solid var(--br); border-radius: var(--r);
  font-size: 12.5px; color: var(--tc);
  background: var(--wh); transition: border-color .15s;
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--az2); background: #fff; }
.form-control::placeholder { color: var(--tc3); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; gap: 10px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; }
.form-check input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--az); cursor: pointer; }

/* ── Modais ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,37,68,.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal {
  background: var(--wh); border-radius: var(--r2);
  box-shadow: var(--sh2);
  width: 100%; max-height: 90vh;
  overflow-y: auto; animation: modalIn .2s ease;
}
.modal-sm { max-width: 440px; }
.modal-md { max-width: 620px; }
.modal-lg { max-width: 820px; }
@keyframes modalIn { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--br);
  background: var(--az); border-radius: var(--r2) var(--r2) 0 0;
}
.modal-title { font-size: 14px; font-weight: 700; color: #fff; }
.modal-close {
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: 18px; cursor: pointer; line-height: 1;
  padding: 4px; border-radius: var(--r); transition: .15s;
}
.modal-close:hover { background: rgba(255,255,255,.15); color: #fff; }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--br);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--bg); border-radius: 0 0 var(--r2) var(--r2);
}

/* ── Alertas ────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px; border-radius: var(--r);
  font-size: 12.5px; margin-bottom: 12px;
  border-left: 3px solid;
}
.alert-info { background: var(--bl2); color: #1E40AF; border-color: var(--bl); }
.alert-success { background: var(--gr2); color: #065F46; border-color: var(--gr); }
.alert-warning { background: var(--am2); color: #92400E; border-color: var(--am); }
.alert-danger { background: var(--rd2); color: #991B1B; border-color: var(--rd); }

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.avatar-md { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg { width: 48px; height: 48px; font-size: 17px; }
.avatar-navy { background: var(--az4); color: var(--az2); }
.avatar-gold { background: var(--go3); color: #7A5E00; }

/* ── Toasts / Notificações ──────────────────────────────────── */
#siga-toasts {
  position: fixed; bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999; max-width: 340px;
}
.siga-toast {
  background: var(--az); color: #fff;
  padding: 12px 16px; border-radius: var(--r2);
  font-size: 12.5px; font-weight: 500;
  box-shadow: var(--sh2); animation: toastIn .25s ease;
  display: flex; align-items: center; gap: 8px;
}
.siga-toast.success { background: #065F46; border-left: 3px solid var(--gr); }
.siga-toast.error { background: #991B1B; border-left: 3px solid var(--rd); }
.siga-toast.warning { background: #92400E; border-left: 3px solid var(--am); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ── Barras de progresso ────────────────────────────────────── */
.progress { height: 6px; background: var(--bg2); border-radius: 10px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--az2); border-radius: 10px; transition: width .4s; }

/* ── KPI Chart bars ─────────────────────────────────────────── */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; margin-top: 10px; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; }
.chart-bar { width: 100%; border-radius: 4px 4px 0 0; transition: .3s; cursor: pointer; min-height: 4px; }
.chart-bar:hover { opacity: .8; }
.chart-bar-lbl { font-size: 9px; color: var(--tc2); margin-top: 4px; }
.chart-bar-val { font-size: 9px; font-weight: 700; color: var(--az); margin-bottom: 2px; }

/* ── Timeline ───────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline-item { position: relative; padding-bottom: 14px; }
.timeline-item::before {
  content: ''; position: absolute; left: -23px; top: 4px;
  width: 2px; height: calc(100% + 4px); background: var(--br);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute; left: -27px; top: 3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--az); border: 2px solid var(--wh);
  box-shadow: 0 0 0 2px var(--az);
}
.timeline-dot.gold { background: var(--go); box-shadow: 0 0 0 2px var(--go); }
.timeline-dot.green { background: var(--gr); box-shadow: 0 0 0 2px var(--gr); }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--br); margin-bottom: 14px; }
.tab {
  padding: 8px 16px; font-size: 12.5px; font-weight: 600;
  color: var(--tc2); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: .15s;
}
.tab:hover { color: var(--az); }
.tab.active { color: var(--az); border-bottom-color: var(--az); }

/* ── Steps / Processo ───────────────────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg2); color: var(--tc2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; border: 2px solid var(--br);
}
.step-item.done .step-num { background: var(--gr); color: #fff; border-color: var(--gr); }
.step-item.active .step-num { background: var(--az); color: #fff; border-color: var(--az); }
.step-label { font-size: 10px; color: var(--tc2); margin-top: 5px; text-align: center; }
.step-line { flex: 1; height: 2px; background: var(--br); margin: 0 -1px; margin-bottom: 20px; }
.step-line.done { background: var(--gr); }

/* ── Misc ────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--tc2); font-size: 12.5px;
}
.empty-state-icon { font-size: 32px; margin-bottom: 8px; opacity: .4; }
.separator { height: 1px; background: var(--br); margin: 14px 0; }
.nowrap { white-space: nowrap; }
.bold { font-weight: 700; }
.mono { font-family: 'Courier New', monospace; }
.text-muted { color: var(--tc2); }
.text-success { color: var(--gr); }
.text-danger { color: var(--rd); }
.text-gold { color: var(--go); }
.text-navy { color: var(--az); }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ── Responsivo básico ──────────────────────────────────────── */
@media (max-width: 900px) {
  .metrics-4 { grid-template-columns: repeat(2,1fr); }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   FASE 3 — Estilos adicionais
══════════════════════════════════════════════════════════════ */

/* ── Horários ───────────────────────────────────────────────── */
.horario-grid { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.horario-grid th { background: var(--az); color: #fff; padding: 8px 10px; text-align: center; font-size: 11px; letter-spacing: .5px; }
.horario-grid td { border: 1px solid var(--br); padding: 0; vertical-align: top; min-width: 100px; height: 56px; }
.horario-grid .hora-col { background: var(--az4); color: var(--az); font-weight: 700; text-align: center; font-size: 11px; padding: 8px 4px; width: 70px; }
.aula-slot { padding: 5px 7px; border-radius: 5px; margin: 3px; font-size: 10.5px; cursor: pointer; transition: .15s; }
.aula-slot:hover { opacity: .85; transform: scale(.98); }
.aula-slot .disc { font-weight: 700; margin-bottom: 2px; }
.aula-slot .sala { font-size: 9px; opacity: .75; }

/* ── Cards KPI ──────────────────────────────────────────────── */
.kpi-card { background: var(--wh); border-radius: var(--r2); border: 1px solid var(--br); padding: 16px; position: relative; overflow: hidden; box-shadow: var(--sh); }
.kpi-card::after { content: ''; position: absolute; right: -10px; bottom: -10px; width: 60px; height: 60px; border-radius: 50%; background: rgba(15,37,68,.04); }
.kpi-trend { font-size: 11px; display: flex; align-items: center; gap: 4px; margin-top: 5px; }
.kpi-trend.up { color: var(--gr); }
.kpi-trend.down { color: var(--rd); }

/* ── Timeline de pagamentos ─────────────────────────────────── */
.pay-timeline { display: flex; flex-direction: column; gap: 0; }
.pay-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bg); }
.pay-item:last-child { border: 0; }
.pay-ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }

/* ── Referências bancárias ──────────────────────────────────── */
.ref-bci { background: linear-gradient(135deg, var(--az) 0%, var(--az2) 100%); border-radius: var(--r2); padding: 20px 24px; color: #fff; }
.ref-bci-num { font-size: 28px; font-weight: 900; letter-spacing: 3px; font-family: 'Courier New', monospace; margin: 8px 0; }
.ref-bci-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; opacity: .65; }

/* ── Certificado preview ────────────────────────────────────── */
.cert-preview { border: 2px solid var(--az); border-radius: var(--r2); padding: 28px; position: relative; background: #fff; }
.cert-preview::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--go); border-radius: 8px; pointer-events: none; }
.cert-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-30deg); font-size: 60px; font-weight: 900; opacity: .03; color: var(--az); white-space: nowrap; pointer-events: none; }

/* ── Impresión ──────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .btn-group, .btn, .tabs, .modal-overlay,
  #siga-toasts, .topbar-search, .sidebar-user { display: none !important; }
  .siga-app { display: block !important; }
  .main-area { height: auto !important; overflow: visible !important; }
  .content { height: auto !important; overflow: visible !important; padding: 0 !important; }
  .page { display: block !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; page-break-inside: avoid; }
  .metrics { page-break-inside: avoid; }
  body { font-size: 11px !important; }
  .print-header { display: block !important; text-align: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #0F2544; }
  .no-print { display: none !important; }
  .print-only { display: block !important; }
}
.print-header { display: none; }
.print-only { display: none; }

/* ── Stat ring ──────────────────────────────────────────────── */
.stat-ring { position: relative; width: 80px; height: 80px; }
.stat-ring svg { transform: rotate(-90deg); }
.stat-ring-val { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 14px; font-weight: 800; color: var(--az); }

/* ── Wizard steps melhorado ─────────────────────────────────── */
.wizard-step { display: none; }
.wizard-step.active { display: block; }

/* ── Mapa de calor de presenças ─────────────────────────────── */
.heatmap-cell { width: 20px; height: 20px; border-radius: 3px; display: inline-block; cursor: pointer; margin: 1px; transition: .15s; }
.heatmap-cell:hover { transform: scale(1.3); }

/* Topbar pills — Delegação, Língua, Moeda */
.topbar-pill {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(201,162,39,.15); border: 1px solid rgba(201,162,39,.4);
  color: #F5D060; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: .2s; user-select: none;
  letter-spacing: .2px;
}
.topbar-pill:hover {
  background: rgba(201,162,39,.28); border-color: rgba(201,162,39,.7);
  color: #FFE080;
  transform: translateY(-1px);
}
.topbar-pill:hover { background: rgba(255,255,255,.18); color: #fff; }
.topbar-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 9999;
  background: #fff; border-radius: 14px; border: 1px solid #DDE3EE;
  box-shadow: 0 10px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  min-width: 200px; overflow: hidden;
  animation: fadeDown .15s ease;
}
.td-item {
  padding: 9px 14px; font-size: 13px; cursor: pointer;
  border-radius: 8px; margin: 4px; transition: .15s;
  color: var(--tc); font-weight: 500;
}
.td-item:hover {
  background: #F0F4FF; color: var(--navy);
  transform: translateX(2px);
}
.td-item:hover { background: var(--bg2); }
@keyframes fadeDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

/* Dashboard extras */
.dash-section-title{font-size:12px;font-weight:700;text-transform:uppercase;
  letter-spacing:.8px;color:var(--az);margin:16px 0 8px;padding-left:4px;
  display:flex;align-items:center;gap:6px}
.metric.navy{border-color:rgba(15,37,84,.3)}.metric.navy .metric-value{color:#0F2544}
.metric.blue{border-color:rgba(59,130,246,.3)}.metric.blue .metric-value{color:#2563EB}
.metric.pink{border-color:rgba(236,72,153,.3)}.metric.pink .metric-value{color:#DB2777}
.metric.red{border-color:rgba(239,68,68,.3)}.metric.red .metric-value{color:#DC2626}
.metric.green{border-color:rgba(5,150,105,.3)}.metric.green .metric-value{color:#059669}
.metric.gold{border-color:rgba(201,162,39,.3)}.metric.gold .metric-value{color:#B8911E}

.sidebar-logo-svg{display:flex;align-items:center;cursor:pointer}
.sidebar-logo-svg svg,.sidebar-logo-svg img{filter:drop-shadow(0 2px 6px rgba(0,0,0,.3))}
