/* ===== VARIÁVEIS ===== */


/* ===== ESTILOS GERAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fc;
}

a {
    text-decoration: none;
    color: var(--primary);
}

a:hover {
    color: #224abe;
}

/* ===== LAYOUT ===== */
.wrapper {
    display: flex;
    width: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 10%, #224abe 100%);
    color: #fff;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sidebar-header h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-header strong {
    font-size: 2rem;
    font-weight: 800;
}

.sidebar .components {
    padding: 0;
}

.sidebar .components li {
    list-style: none;
}

.sidebar .components li a {
    padding: 1rem;
    display: block;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar .components li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid #fff;
}

.sidebar .components li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid #fff;
}

.sidebar .components li a i {
    margin-right: 0.5rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar .CTAs {
    padding: 1rem;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.sidebar .CTAs .logout {
    display: block;
    padding: 0.75rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 0.35rem;
    transition: var(--transition);
}

.sidebar .CTAs .logout:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.main-content {
    padding: 1.5rem;
}

/* ===== NAVBAR ===== */
.navbar {
    background: #fff !important;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    padding: 0.75rem 1.5rem;
}

.navbar .navbar-toggler {
    border: none;
    font-size: 1.25rem;
}

.navbar .navbar-toggler:focus {
    box-shadow: none;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

/* ===== CARDS ===== */
.card {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border: 1px solid #e3e6f0;
    margin-bottom: 1.5rem;
}

.card .card-header {
    background: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    font-weight: 700;
    color: var(--dark);
}

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
}

/* ===== BOTÕES ===== */
.btn {
    border-radius: 0.35rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* ===== TABELAS ===== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-weight: 700;
    color: var(--dark);
    border-top: 1px solid #e3e6f0;
    border-bottom: 2px solid #e3e6f0;
    padding: 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #e3e6f0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fc;
}

.table-hover tbody tr:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* ===== FORMULÁRIOS ===== */
.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    padding: 0.75rem;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.input-group-text {
    background: #eaecf4;
    border: 1px solid #d1d3e2;
    color: var(--dark);
}

/* ===== ALERTAS ===== */
.alert {
    border-radius: 0.35rem;
    border: none;
    margin-bottom: 1.5rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem;
}

/* ===== MODAIS ===== */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.5);
}

.modal-header {
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e3e6f0;
    padding: 1rem 1.5rem;
}

/* ===== PÁGINA DE LOGIN ===== */
.login-body {
    background: linear-gradient(135deg, var(--primary) 0%, #224abe 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.5);
}

.login-card .card-header {
    border-radius: 1rem 1rem 0 0 !important;
    background: linear-gradient(135deg, var(--primary) 0%, #224abe 100%);
    border: none;
    padding: 2rem;
}

.login-card .card-body {
    padding: 2rem;
}

/* ===== FOOTER ===== */
.footer {
    background: #fff;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e3e6f0;
    margin-top: auto;
}

/* ===== UTILITÁRIOS ===== */
.text-small {
    font-size: 0.875rem;
}

.cursor-pointer {
    cursor: pointer;
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* ===== GRÁFICOS ===== */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
:root{
  --bg:#f8fafc;
  --card:#ffffff;
  --muted:#64748b;
  --text:#0f172a;
  --primary:#4361ee;
  --accent:#3b82f6;
  --danger:#ef4444;
  --success:#10b981;
  --warning:#f59e0b;
  --radius:12px; --gap:16px;
  --shadow:0 10px 24px rgba(2,6,23,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--accent);text-decoration:none} a:hover{text-decoration:underline}
img{max-width:100%;height:auto}
.container, .container-dashboard{max-width:1200px;margin:90px auto 60px;padding:0 16px}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px;border:1px solid rgba(2,6,23,.06);transition:transform .18s ease, box-shadow .18s ease}
.card:hover{transform:translateY(-2px); box-shadow:0 16px 34px rgba(2,6,23,.08)}
.kpi .label{color:var(--muted);font-size:13px}
.kpi .value{color:#0b1324;font:700 24px/1 Inter,system-ui}
.kpi .trend{font-size:12px;color:var(--muted)}
.section-title{font:600 16px/1.2 Inter,system-ui;margin:0 0 10px 0;color:#0b1324}
.dashboard-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--gap)}
.section-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:var(--gap);margin-top:var(--gap)}
.chart-card canvas{width:100%;height:280px;display:block}
.table-card{overflow:auto}
.data-table{width:100%;border-collapse:collapse;background:#fff}
.data-table th{background:#f1f5f9;color:#0b1324;border-bottom:1px solid #e2e8f0}
.data-table td{border-bottom:1px solid #eef2f7}
.data-table th,.data-table td{padding:12px 10px;text-align:left}
.badge{display:inline-block;padding:.3rem .65rem;border-radius:999px;font-size:12px}
.badge-warning{background:rgba(245,158,11,.12);color:#a16207;border:1px solid rgba(245,158,11,.22)}
.badge-danger{background:rgba(239,68,68,.10);color:#991b1b;border:1px solid rgba(239,68,68,.22)}
.badge-success{background:rgba(16,185,129,.10);color:#065f46;border:1px solid rgba(16,185,129,.22)}
.dash-title{font:700 26px/1.2 Inter,system-ui;color:#0b1324}
.dash-sub{color:var(--muted)}
@media (max-width:1024px){ .container, .container-dashboard{margin:60px auto 40px} .dashboard-grid{grid-template-columns:repeat(2,1fr)} .section-grid{grid-template-columns:1fr} }
@media (max-width:640px){ .dashboard-grid{grid-template-columns:1fr} .dash-title{font-size:22px} }


/* ======================
   Modern UI Fix Pack v1
   ====================== */
:root{
  --bg:#ffffff; --surface:#f7f9fc; --card:#ffffff; --text:#0f172a; --muted:#64748b;
  --primary:#4361ee; --accent:#4cc9f0; --success:#16a34a; --warning:#f59e0b; --danger:#ef4444;
  --radius:14px; --gap:16px; --shadow:0 8px 30px rgba(2,6,23,.08);
}
*,:before,:after{box-sizing:border-box}
body{margin:0;background:var(--surface);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;line-height:1.5}
a{color:var(--primary);text-decoration:none} a:hover{text-decoration:underline}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid rgba(2,6,23,.06)}
.button,.btn,button,[role=button]{display:inline-flex;align-items:center;gap:.5rem;padding:.625rem 1rem;border-radius:12px;border:1px solid rgba(2,6,23,.06);background:#fff;color:var(--text);cursor:pointer;transition:.2s}
.btn-primary{background:var(--primary);color:#fff;border-color:transparent}
input,select,textarea{width:100%;padding:.65rem .8rem;border:1px solid rgba(2,6,23,.12);border-radius:12px;background:#fff;color:var(--text);outline:0;transition:.2s}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(67,97,238,.15)}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table thead th{position:sticky;top:0;background:#fff;z-index:1;text-align:left;font-size:.85rem;color:#475569;padding:.75rem;border-bottom:1px solid rgba(2,6,23,.08)}
.table td{padding:.75rem;border-bottom:1px solid rgba(2,6,23,.06)}
.table tbody tr:nth-child(odd){background:rgba(2,6,23,.02)}
.sidebar,#sidebar,.side-menu,.menu-lateral{position:fixed;inset:0 auto 0 0;width:280px;max-width:86vw;height:100dvh;background:#fff;border-right:1px solid rgba(2,6,23,.08);transform:translateX(-100%);transition:transform .25s ease;z-index:1000;overflow:auto;box-shadow:var(--shadow)}
.sidebar.is-open,#sidebar.is-open,.side-menu.is-open,.menu-lateral.is-open{transform:translateX(0)}
@media(min-width:1024px){.sidebar,#sidebar,.side-menu,.menu-lateral{transform:translateX(0)} body.sidebar-collapsed .sidebar, body.sidebar-collapsed #sidebar, body.sidebar-collapsed .side-menu, body.sidebar-collapsed .menu-lateral{transform:translateX(-100%)}}
.main,#main,.content,#content{transition:margin-left .25s ease}
@media(min-width:1024px){.main,#main,.content,#content{margin-left:280px} body.sidebar-collapsed .main,body.sidebar-collapsed #main,body.sidebar-collapsed .content,body.sidebar-collapsed #content{margin-left:0}}
.drawer-overlay{position:fixed;inset:0;background:rgba(2,6,23,.4);z-index:900;opacity:0;pointer-events:none;transition:opacity .2s}
.drawer-overlay.is-visible{opacity:1;pointer-events:auto}


/* ======================
   Modern UI Fix Pack v2
   ====================== */
.auth{min-height:100dvh;display:grid;place-items:center;background:linear-gradient(135deg,#f8fbff 0%,#f3f4f8 100%);padding:2rem}
.auth .auth-card{width:100%;max-width:460px;background:#fff;border-radius:18px;box-shadow:0 20px 50px rgba(2,6,23,.10);border:1px solid rgba(2,6,23,.06);padding:2rem}
.table-responsive{width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
.form-row{display:grid;gap:1rem;grid-template-columns:repeat(12,minmax(0,1fr))}
.form-col-6{grid-column:span 6 / span 6} .form-col-12{grid-column:span 12 / span 12}
@media(max-width:768px){.form-col-6{grid-column:1 / -1}}
.toast-stack{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:.5rem;z-index:2000}
.toast{background:#fff;border:1px solid rgba(2,6,23,.08);border-left:4px solid var(--primary);border-radius:12px;padding:.75rem 1rem;box-shadow:0 10px 30px rgba(2,6,23,.15);min-width:240px;max-width:320px}


/* ======================
   V3 — Sidebar High-Contrast Theme
   ====================== */
:root{--sidebar-bg:#0b1220;--sidebar-fg:#e6edf3;--sidebar-muted:#9fb0c5;--sidebar-active:#fff;--sidebar-accent:#4cc9f0;--sidebar-divider:rgba(255,255,255,.08)}
.sidebar,#sidebar,.side-menu,.menu-lateral{background:var(--sidebar-bg)!important;color:var(--sidebar-fg)!important;border-right:1px solid var(--sidebar-divider);box-shadow:0 10px 30px rgba(0,0,0,.35)}
.sidebar a{color:var(--sidebar-fg)}
.sidebar .nav-item > a:hover{background:rgba(255,255,255,.06)}
.sidebar .nav-item.is-open > a,.sidebar .nav-item > a.active{background:rgba(76,201,240,.16);color:var(--sidebar-active)}


/* ======================
   V6 — Polish & Utilities
   ====================== */
:root{--ring:3px rgba(67,97,238,.25)}
:focus-visible{outline:var(--ring) solid;outline-offset:2px}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.text-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shadow-sm{box-shadow:0 4px 16px rgba(2,6,23,.08)}
.rounded-2xl{border-radius:1rem}
.h-screen{min-height:100vh;min-height:100dvh}


/* ======================
   V7 — Brand & Themes + Topbar
   ====================== */
:root{--primary:#4361ee;--accent:#4cc9f0}
header.topbar{position:sticky;top:0;z-index:800;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.5rem .75rem;background:rgba(255,255,255,.85);backdrop-filter:saturate(180%) blur(8px);border-bottom:1px solid rgba(2,6,23,.06)}
.topbar .left,.topbar .right{display:flex;align-items:center;gap:.5rem}
.topbar .icon-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;border:1px solid rgba(2,6,23,.08);background:#fff;cursor:pointer}
body.has-topbar .sidebar-fab{display:none!important}
