:root {
    --brand-primary: #0f763e;
    --brand-secondary: #16a34a;
    --brand-light: #f0fdf4;
    --neutral-bg: #f8fafc;
    --neutral-surface: #ffffff;
    --neutral-border: #e2e8f0;
    --text-heading: #0f172a;
    --text-body: #475569;
    --text-muted: #94a3b8;
    --danger: #be123c;
    --danger-light: #fff1f2;
    --warning: #d97706;
    --warning-light: #fffbeb;
}

/* --- MODO ESCURO --- */
body.dark-mode {
    --neutral-bg: #0f172a;        /* Fundo bem escuro (Slate 900) */
    --neutral-surface: #1e293b;   /* Cards (Slate 800) */
    --neutral-border: #334155;    /* Bordas (Slate 700) */
    --text-heading: #f8fafc;      /* Texto Branco */
    --text-body: #94a3b8;         /* Texto Cinza Claro */
    --text-muted: #64748b;        /* Texto Muted */
    --brand-light: rgba(15, 118, 62, 0.2);
    --danger-light: rgba(190, 18, 60, 0.2);
    --warning-light: rgba(217, 119, 6, 0.2);
}

/* Ajuste específico para Inputs no modo escuro */
body.dark-mode input, 
body.dark-mode select {
    background-color: #0f172a;
    color: #f8fafc;
}

/* FIM DO MODO ESCURO */

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--neutral-bg); color: var(--text-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background 0.3s, color 0.3s; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.modal-card {
    background: var(--neutral-surface); padding: 2rem; border-radius: 16px; width: 90%; max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3); text-align: center;
    border: 1px solid var(--neutral-border);
    animation: modalIn 0.2s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.modal-icon { 
    width: 50px; height: 50px; background: var(--danger-light); color: var(--danger);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem; font-size: 1.5rem; font-weight: bold;
}
.modal-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 1.5rem; }
.btn-modal-cancel { background: var(--neutral-surface); border: 1px solid var(--neutral-border); padding: 0.8rem; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--text-body); }
.btn-modal-confirm { background: var(--danger); border: none; padding: 0.8rem; border-radius: 8px; font-weight: 600; cursor: pointer; color: white; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { 
    width: 260px; background: var(--neutral-surface); border-right: 1px solid var(--neutral-border);
    padding: 2rem 1.25rem; display: flex; flex-direction: column; position: fixed; height: 100vh;
    z-index: 1000;
}
.main-content { flex: 1; margin-left: 260px; padding: 2.5rem; width: calc(100% - 260px); max-width: 100%; }

@media (max-width: 992px) {
    .sidebar { 
        width: 100%; height: 65px; position: fixed; bottom: 0; top: auto;
        flex-direction: row; padding: 0; border-right: none; border-top: 1px solid var(--neutral-border);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    }
    .brand-header { display: none !important; }
    .nav-group { display: flex; width: 100%; justify-content: space-around; align-items: center; }
    .nav-item { margin-bottom: 0 !important; font-size: 0.65rem !important; padding: 8px !important; flex: 1; text-align: center; flex-direction: column; gap: 4px;}
    .nav-item.logout-desktop { display: none !important; }
    .main-content { margin-left: 0; padding: 1rem; padding-bottom: 100px; width: 100%; }
    .grid-stats { grid-template-columns: 1fr !important; gap: 10px !important; }
    .dashboard-grid { grid-template-columns: 1fr !important; }
    .mobile-logout { display: block !important; }
    
    .chart-container { height: 200px !important; }
}

.mobile-logout { display: none; color: var(--danger); font-size: 0.75rem; font-weight: 700; cursor: pointer; border: 1.5px solid var(--danger); padding: 5px 12px; border-radius: 6px; text-transform: uppercase; }
.brand-header { display: flex; align-items: center; gap: 12px; margin-bottom: 3rem; padding: 0 0.5rem; }
.brand-logo { width: 30px; height: 30px; }
.brand-text { font-size: 1.15rem; font-weight: 800; color: var(--brand-primary); letter-spacing: -0.5px; }

.nav-item { 
    display: flex; align-items: center; padding: 0.8rem 1rem; border-radius: 8px;
    color: var(--text-body); font-weight: 500; cursor: pointer; transition: 0.2s;
    margin-bottom: 0.4rem; font-size: 0.9rem; text-decoration: none;
}
.nav-item:hover { background: var(--brand-light); color: var(--brand-primary); }
.nav-item.active { background: var(--brand-light); color: var(--brand-primary); font-weight: 700; }

.page-header { margin-bottom: 1.5rem; display: flex; justify-content: space-between; align-items: center; }

/* Grid responsiva para os 5 cards */
.grid-stats { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 1.25rem; 
    margin-bottom: 1.5rem; 
}

.card-stat { background: var(--neutral-surface); padding: 1.25rem; border-radius: 12px; border: 1px solid var(--neutral-border); }
.stat-label { font-size: 0.6rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.8px;}
.stat-value { font-size: 1.15rem; font-weight: 700; color: var(--text-heading); word-break: break-all; }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.card-visual { background: var(--neutral-surface); border-radius: 12px; border: 1px solid var(--neutral-border); padding: 1.25rem; min-width: 0; overflow: hidden; }
.card-title { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; letter-spacing: 1px; }

.chart-container { position: relative; height: 250px; width: 100%; }

input, select { width: 100%; padding: 0.75rem; border: 1px solid var(--neutral-border); border-radius: 8px; font-size: 0.9rem; margin-top: 4px; background: var(--neutral-surface); outline: none; transition: border 0.2s;}
input:focus, select:focus { border-color: var(--brand-primary); }
.btn-primary { background: var(--brand-primary); color: white; border: none; padding: 0.8rem 1.5rem; border-radius: 8px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { opacity: 0.9; }

.table-container { background: var(--neutral-surface); border-radius: 12px; border: 1px solid var(--neutral-border); overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th { text-align: left; padding: 1rem; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; border-bottom: 1px solid var(--neutral-border); background: rgba(0,0,0,0.02); font-weight: 700; }
td { padding: 1rem; border-bottom: 1px solid var(--neutral-border); font-size: 0.85rem; color: var(--text-heading); }

.contact-item { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 12px; background: var(--neutral-bg); margin-bottom: 12px; text-decoration: none; color: inherit; transition: 0.2s; border: 1px solid transparent; }
.contact-item:hover { border-color: var(--brand-primary); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.contact-logo { width: 28px; height: 28px; object-fit: contain; }

.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #0f172a; padding: 20px; }
.auth-box { background: white; padding: 2.5rem; border-radius: 16px; width: 100%; max-width: 400px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }

.badge-status { padding: 4px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; cursor: pointer; text-transform: uppercase; }
.status-success { background: var(--brand-light); color: var(--brand-primary); }
.status-warning { background: var(--warning-light); color: var(--warning); }

[v-cloak] { display: none; }