:root{
  --primary:#1f3a5f; --primary-d:#16293f; --accent:#e8a13a; --sidebar-w:248px;
}
*{box-sizing:border-box}
body{font-family:'Segoe UI',system-ui,sans-serif;background:#f4f6f9;margin:0}
/* Sidebar */
.sidebar{width:var(--sidebar-w);min-width:var(--sidebar-w);min-height:100vh;
  background:linear-gradient(180deg,var(--primary),var(--primary-d));position:sticky;top:0;height:100vh;overflow-y:auto}
.sidebar-brand{display:flex;align-items:center;gap:.6rem;padding:1.1rem 1rem;font-weight:600;
  font-size:1.02rem;border-bottom:1px solid rgba(255,255,255,.12)}
.sidebar-brand .bi{font-size:1.5rem;color:var(--accent)}
.brand-logo{width:34px;height:34px;object-fit:contain;background:#fff;border-radius:6px;padding:2px}
.sidebar .nav-link{color:rgba(255,255,255,.82);padding:.6rem 1rem;border-left:3px solid transparent;
  display:flex;align-items:center;gap:.65rem;font-size:.93rem}
.sidebar .nav-link:hover{background:rgba(255,255,255,.08);color:#fff}
.sidebar .nav-link.active{background:rgba(255,255,255,.12);border-left-color:var(--accent);color:#fff}
.sidebar .nav-link .bi{width:20px;text-align:center}
.content{min-height:100vh;display:flex;flex-direction:column}
.content main{flex:1}
.topbar{position:sticky;top:0;z-index:1020}
/* Cards de estatística */
.stat-card{border:none;border-radius:14px;overflow:hidden}
.stat-card .stat-icon{width:52px;height:52px;border-radius:12px;display:flex;align-items:center;
  justify-content:center;font-size:1.5rem}
.stat-card .stat-val{font-size:1.6rem;font-weight:700;line-height:1}
.card{border:none;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.btn-primary{background:var(--primary);border-color:var(--primary)}
.btn-primary:hover{background:var(--primary-d);border-color:var(--primary-d)}
.page-title{font-weight:700;color:var(--primary)}
.table thead th{background:#f1f4f8;font-size:.82rem;text-transform:uppercase;letter-spacing:.3px;color:#5a6b80}
/* Auth */
.auth-body{background:linear-gradient(135deg,#1f3a5f,#16293f);min-height:100vh;display:flex;
  align-items:center;justify-content:center;padding:20px}
.auth-card{background:#fff;border-radius:16px;padding:2.2rem;width:100%;max-width:410px}
.auth-logo{width:64px;height:64px;border-radius:16px;background:var(--primary);color:var(--accent);
  display:inline-flex;align-items:center;justify-content:center;font-size:2rem}
/* Responsivo */
@media(max-width:768px){
  .sidebar{position:fixed;left:-260px;z-index:1050;transition:left .25s}
  .sidebar.open{left:0}
}
@media print{.sidebar,.topbar,footer,.no-print{display:none!important}.content{margin:0}}

/* ===== Modo escuro (Bootstrap 5.3 data-bs-theme) ===== */
[data-bs-theme="dark"] body{background:#0f1722}
[data-bs-theme="dark"] .topbar{background:#16202e!important;border-color:#243140!important}
[data-bs-theme="dark"] .card{background:#16202e;box-shadow:0 1px 3px rgba(0,0,0,.4)}
[data-bs-theme="dark"] .page-title{color:#e9eef5}
[data-bs-theme="dark"] .table thead th{background:#1c2737;color:#9fb1c7}
[data-bs-theme="dark"] .navbar-brand,[data-bs-theme="dark"] .text-dark{color:#e9eef5!important}
[data-bs-theme="dark"] .list-group-item{background:transparent;color:#cdd7e3}
[data-bs-theme="dark"] .modal-content{background:#16202e}
[data-bs-theme="dark"] .form-control,[data-bs-theme="dark"] .form-select{background:#0f1722;border-color:#2a3a4d;color:#e9eef5}
[data-bs-theme="dark"] .form-control:focus,[data-bs-theme="dark"] .form-select:focus{background:#0f1722;color:#e9eef5}
[data-bs-theme="dark"] .bg-light{background:#1c2737!important;color:#cdd7e3!important}
[data-bs-theme="dark"] .btn-light{background:#1c2737;border-color:#2a3a4d;color:#cdd7e3}
[data-bs-theme="dark"] .btn-light:hover{background:#243140}
/* a sidebar mantém o gradiente escuro da marca em ambos os temas */
