/*
 * Didaquê System v2 — Folha de estilos principal
 * Instituto Bíblico Reformado Didaquê — Goiânia/GO
 *
 * Paleta: --navy #0f1f3d  |  --gold #c9a84c
 * Fontes: Cormorant Garamond (títulos) · DM Sans (interface)
 */

/* ══════════════════════════════════════════════════════════════════
   VARIÁVEIS
   ══════════════════════════════════════════════════════════════════ */
:root {
  /* Identidade institucional */
  --navy:         #0f1f3d;
  --navy-hover:   #1a3460;
  --navy-dark:    #091428;
  --gold:         #c9a84c;
  --gold-hover:   #b8923c;
  --gold-light:   #f5e9c8;

  /* Semântica */
  --success:      #16a34a;
  --success-bg:   #dcfce7;
  --danger:       #dc2626;
  --danger-bg:    #fee2e2;
  --warning:      #d97706;
  --warning-bg:   #fef3c7;
  --info:         #0284c7;
  --info-bg:      #e0f2fe;

  /* Superfície */
  --bg:           #f4f6f9;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --border:       #e2e8f0;
  --border-focus: #0f1f3d;

  /* Texto */
  --text:         #1e293b;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;

  /* Layout */
  --sidebar-w:    240px;
  --topbar-h:     56px;

  /* Forma */
  --radius-sm:    4px;
  --radius:       8px;
  --radius-lg:    12px;
  --radius-pill:  999px;

  /* Elevação */
  --shadow-sm:    0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

  /* Tipografia */
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Transição */
  --t:            .15s ease;
}

/* ══════════════════════════════════════════════════════════════════
   RESET + BASE
   ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ══════════════════════════════════════════════════════════════════
   TIPOGRAFIA
   ══════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem;   }
h3 { font-size: 1.25rem;  }
h4 { font-size: 1.0625rem; }

.text-muted  { color: var(--text-muted); }
.text-small  { font-size: .8125rem; }
.text-serif  { font-family: var(--font-serif); }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }


/* ══════════════════════════════════════════════════════════════════
   LAYOUT PRINCIPAL (sidebar + conteúdo)
   ══════════════════════════════════════════════════════════════════ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--t);
}

.sidebar__brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__brand-nome {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}
.sidebar__brand-sub {
  font-size: .72rem;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}

.sidebar__nav {
  flex: 1;
  padding: 12px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.7);
  font-size: .875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: color var(--t), background var(--t), border-color var(--t);
}
.nav-link .nav-icon { font-size: 1rem; opacity: .8; flex-shrink: 0; }
.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
}
.nav-link.ativo,
.nav-link[aria-current="page"] {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(201,168,76,.1);
}

.sidebar__sep {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 8px 20px;
}

.sidebar__footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar__version {
  font-size: .72rem;
  color: rgba(255,255,255,.25);
}

/* ── Wrapper do conteúdo ────────────────────────────────────────── */
.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar__hamburger {
  display: none;   /* visível somente no mobile */
  background: none;
  border: none;
  padding: 6px;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}
.topbar__hamburger:hover { background: var(--bg); }

.topbar__titulo {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
  flex: 1;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar__nome {
  font-size: .875rem;
  font-weight: 500;
}
.topbar__perfil {
  font-size: .72rem;
  background: var(--gold-light);
  color: var(--navy);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-transform: capitalize;
}

/* ── Área principal ─────────────────────────────────────────────── */
.conteudo {
  flex: 1;
  padding: 24px;
}

.pagina-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.pagina-header h1 { font-size: 1.5rem; }

/* ══════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-body  { padding: 20px 24px; }
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2,
.card-header h3 { font-size: 1rem; color: var(--text); margin: 0; }
.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Cards de estatística */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card__label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-card__valor {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.stat-card__sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card--gold { border-left: 4px solid var(--gold); }

/* ══════════════════════════════════════════════════════════════════
   BOTÕES
   ══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: opacity var(--t), transform var(--t), background var(--t);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }

/* Variantes */
.btn-primary   { background: var(--navy);    color: var(--gold); }
.btn-primary:hover { background: var(--navy-hover); }

.btn-gold      { background: var(--gold);    color: var(--navy); font-weight: 700; }
.btn-gold:hover { background: var(--gold-hover); }

.btn-danger    { background: var(--danger);  color: #fff; }
.btn-danger:hover { opacity: .88; }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { opacity: .88; }

.btn-ghost     { background: transparent;   color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }

.btn-link      { background: none; color: var(--navy); padding: 0; font-weight: 500; text-decoration: underline; }
.btn-link:hover { color: var(--navy-hover); }

/* Tamanhos */
.btn-sm   { padding: 5px 12px; font-size: .8125rem; }
.btn-lg   { padding: 11px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: var(--radius); }

/* Grupo de botões */
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════════════
   FORMULÁRIOS
   ══════════════════════════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-full  { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
}
.form-group .obrigatorio::after {
  content: ' *';
  color: var(--danger);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  transition: border-color var(--t), box-shadow var(--t);
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15,31,61,.1);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}
textarea { resize: vertical; min-height: 80px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: .78rem;
  color: var(--text-muted);
}
.form-error {
  font-size: .78rem;
  color: var(--danger);
  font-weight: 500;
}
input.erro, select.erro, textarea.erro {
  border-color: var(--danger);
}

/* Checkbox / Radio */
.checkbox-group, .radio-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
}

/* Barra de filtros */
.filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.filtros .form-group { min-width: 160px; }
.filtros .form-group label { font-size: .78rem; }
.filtros input, .filtros select { font-size: .8125rem; padding: 6px 10px; }

/* ══════════════════════════════════════════════════════════════════
   TABELAS
   ══════════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }

.table-acoes { display: flex; gap: 6px; justify-content: flex-end; }

/* Avatar circular com iniciais — usado na listagem de alunos e usuários */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .03em;
  user-select: none;
}

/* Paginação */
.paginacao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  font-size: .8125rem;
  color: var(--text-muted);
}
.paginacao-btns { display: flex; gap: 4px; }
.paginacao-btns button {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .8125rem;
  transition: background var(--t);
}
.paginacao-btns button:hover { background: var(--bg); }
.paginacao-btns button.ativo { background: var(--navy); color: #fff; border-color: var(--navy); }
.paginacao-btns button:disabled { opacity: .4; pointer-events: none; }

/* ══════════════════════════════════════════════════════════════════
   BADGES DE STATUS
   ══════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge--ativo       { background: var(--success-bg); color: #15803d; }
.badge--inativo     { background: #f1f5f9;            color: var(--text-muted); }
.badge--formado     { background: var(--info-bg);     color: #0369a1; }
.badge--desistente  { background: var(--danger-bg);   color: #b91c1c; }
.badge--trancado    { background: var(--warning-bg);  color: #92400e; }
.badge--pendente    { background: var(--warning-bg);  color: #92400e; }
.badge--paga        { background: var(--success-bg);  color: #15803d; }
.badge--vencida     { background: var(--danger-bg);   color: #b91c1c; }
.badge--parcial     { background: var(--info-bg);     color: #0369a1; }
.badge--cancelada   { background: #f1f5f9;            color: var(--text-muted); }
.badge--admin       { background: var(--navy); color: var(--gold); }
.badge--secretaria  { background: var(--info-bg); color: #0369a1; }
.badge--professor   { background: var(--gold-light); color: #92400e; }

/* ══════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .15s ease;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .2s ease;
}
.modal--sm { max-width: 420px; }
.modal--lg { max-width: 860px; }

.modal__header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.modal__titulo {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--navy);
}
.modal__fechar {
  background: none;
  border: none;
  padding: 4px;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: background var(--t);
}
.modal__fechar:hover { background: var(--bg); color: var(--text); }

.modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal__footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Confirm dialog */
.confirm__msg { font-size: .9375rem; margin-bottom: 4px; }
.confirm__sub { font-size: .8125rem; color: var(--text-muted); }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ══════════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 600;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .875rem;
  font-weight: 500;
  max-width: 340px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast--visivel { opacity: 1; transform: none; }

.toast--success { background: var(--success); color: #fff; }
.toast--error   { background: var(--danger);  color: #fff; }
.toast--warning { background: var(--warning); color: #fff; }
.toast--info    { background: var(--navy);    color: var(--gold); }

.toast__icone { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ══════════════════════════════════════════════════════════════════
   ESTADOS
   ══════════════════════════════════════════════════════════════════ */
/* Loading spinner */
.spinner-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Estado vazio */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}
.empty-state__icone { font-size: 2.5rem; margin-bottom: 12px; opacity: .4; }
.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 6px;
}
.empty-state p { font-size: .875rem; }

/* Alerta inline */
.alerta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 16px;
}
.alerta--error   { background: var(--danger-bg);  color: #991b1b; border: 1px solid #fecaca; }
.alerta--warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fde68a; }
.alerta--success { background: var(--success-bg); color: #14532d; border: 1px solid #bbf7d0; }
.alerta--info    { background: var(--info-bg);    color: #075985; border: 1px solid #bae6fd; }

/* ══════════════════════════════════════════════════════════════════
   UTILITÁRIOS
   ══════════════════════════════════════════════════════════════════ */
.d-none    { display: none !important; }
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.gap-4     { gap: 4px; }
.gap-8     { gap: 8px; }
.gap-16    { gap: 16px; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.text-right  { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* Separador de seção na sidebar */
.nav-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.3);
  padding: 14px 20px 4px;
}

/* ══════════════════════════════════════════════════════════════════
   LOGIN (tela standalone)
   ══════════════════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1a3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,.3);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.login-card__brand {
  text-align: center;
  margin-bottom: 28px;
}
.login-card__brand-nome {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.login-card__brand-sub {
  font-size: .8125rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.login-card__divisor {
  width: 40px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 12px auto 0;
}

.login-card__titulo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.login-card .form-group { margin-bottom: 14px; }
.login-card .btn-primary {
  width: 100%;
  padding: 11px;
  font-size: .9375rem;
  margin-top: 6px;
}

.login-erro {
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
}
.login-erro.visivel { display: block; }

.login-card__footer {
  text-align: center;
  margin-top: 20px;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVO
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }
  .sidebar.aberta {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main-wrap { margin-left: 0; }
  .topbar__hamburger { display: flex; }
  .conteudo { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pagina-header { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .modal { max-height: 100vh; border-radius: 0; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .toast-container { right: 12px; left: 12px; bottom: 16px; }
  .toast { max-width: 100%; }
}

/* Overlay para fechar sidebar no mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 199;
}
.sidebar-overlay.visivel { display: block; }

/* ══════════════════════════════════════════════════════════════════
   IMPRESSÃO (recibos)
   ══════════════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .topbar__hamburger,
  .btn, .paginacao, .filtros,
  .toast-container, .modal-overlay,
  .no-print { display: none !important; }

  .main-wrap { margin-left: 0; }

  body { background: #fff; font-size: 11pt; }

  .recibo {
    max-width: 100%;
    padding: 0;
    box-shadow: none;
    border: none;
  }
  .recibo__header { border-bottom: 2pt solid #000; padding-bottom: 8pt; margin-bottom: 12pt; }
  .recibo__titulo { font-size: 14pt; font-weight: bold; }

  a { text-decoration: none; color: #000; }
  table { page-break-inside: avoid; }
}
