
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Cores Executive Dark */
    --bg-primary: #0D1E3A;
    --bg-secondary: #1e293b;
    --card-bg: rgba(30, 41, 59, 0.4);
    --accent: #3b82f6; /* Azul Executivo */
    --accent-hover: #2563eb;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(56, 120, 220, 0.14);
    
    /* Matriz de Densidade (Compacta) */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --input-height: 38px;
    --font-size-base: 0.875rem;
    --border-radius-elite: 6px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base de Elite */
body { 
    font-family: var(--font-main) !important; 
    font-size: var(--font-size-base) !important;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Componentização Corporativa Compacta */
.form-group label {
    font-size: 0.725rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 6px !important;
}

.form-control, .field-input {
    height: var(--input-height) !important;
    padding: 6px 12px !important;
    font-size: 0.9rem !important;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--border-radius-elite) !important;
    color: white !important;
    transition: var(--transition-fast) !important;
}

.form-control:focus, .field-input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0D1E3A;
    --bg-secondary: #1E293B;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --accent: #3B82F6;
    --accent-hover: #60A5FA;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --danger: #EF4444;
    --success: #10B981;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --sidebar-width: 260px;
    --header-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.3); border-radius: 10px; }
* { scrollbar-width: thin; scrollbar-color: rgba(59,130,246,0.3) transparent; }

html, body {
    height: 100vh; overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(ellipse at top right, #1a203f, #0D1E3A, #020617);
    color: var(--text-primary);
}

.auth-wrapper {
    display: flex; align-items: center; justify-content: center;
    height: 100vh; width: 100vw;
    position: relative; overflow: hidden;
    background: radial-gradient(ellipse at 70% 20%, rgba(59,130,246,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(139,92,246,0.10) 0%, transparent 60%),
                linear-gradient(135deg, #020617 0%, #0D1E3A 50%, #1a203f 100%);
}
.auth-blob {
    position: absolute; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.25) 0%, transparent 70%);
    border-radius: 50%; filter: blur(60px);
    top: -200px; right: -100px; pointer-events: none;
    animation: blob-drift 12s ease-in-out infinite alternate;
}
.auth-blob-2 {
    position: absolute; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%);
    border-radius: 50%; filter: blur(70px);
    bottom: -150px; left: -100px; pointer-events: none;
    animation: blob-drift 15s ease-in-out infinite alternate-reverse;
}
@keyframes blob-drift {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(40px,30px) scale(1.08); }
}
.auth-card {
    width: 100%; max-width: 420px; padding: 48px 44px;
    z-index: 10; position: relative;
    background: rgba(15,23,42,0.75);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(56, 120, 220, 0.14); border-radius: 24px;
    box-shadow: 0 32px 64px -12px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.1);
}
.auth-header { text-align: center; margin-bottom: 36px; }
.auth-header h1 {
    font-size: 26px; font-weight: 700;
    background: linear-gradient(to right, #fff 30%, #94A3B8 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}
.auth-header p { color: var(--text-secondary); font-size: 14px; }

.form-group { margin-bottom: 20px; }
.form-label {
    display: block; margin-bottom: 8px;
    font-size: 11px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px;
}
.form-input {
    width: 100%; padding: 13px 16px;
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
    color: var(--text-primary); font-size: 15px; font-family: 'Inter', sans-serif;
    transition: all 0.25s ease; outline: none;
}
.form-input:focus {
    border-color: var(--accent); background: rgba(15,23,42,0.9);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
.form-input::placeholder { color: rgba(148,163,184,0.5); }
select.form-input option { background: #1E293B; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6, #1E40AF);
    color: white; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 4px 14px rgba(59,130,246,0.4); text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,0.55); }
.btn:active { transform: translateY(0); }
.btn-full { width: 100%; }
.btn-danger { background: linear-gradient(135deg, #EF4444, #B91C1C); box-shadow: 0 4px 14px rgba(239,68,68,0.4); }
.btn-danger:hover { box-shadow: 0 8px 24px rgba(239,68,68,0.55); }
.btn-secondary { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); box-shadow: none; }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 10px; }

.alert-error {
    background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
    color: #FCA5A5; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14px;
}
.alert-success {
    background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3);
    color: #6EE7B7; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14px;
}

.app-container { display: flex; height: 100vh; width: 100%; }

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0D1E3A 0%, #0a0f1e 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column;
    z-index: 20; flex-shrink: 0;
}
.sidebar-brand {
    height: var(--header-height);
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none; background: rgba(59,130,246,0.04);
    color: white;
}
.sidebar-brand .brand-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    background: linear-gradient(135deg, #3B82F6, #1E40AF); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}
.sidebar-brand .brand-icon svg { width: 20px; height: 20px; color: white; }
.sidebar-brand .brand-text {
    font-size: 17px; font-weight: 700;
    background: linear-gradient(to right, #fff, #94A3B8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; color: var(--text-secondary);
    text-decoration: none; border-radius: 12px; margin-bottom: 4px;
    font-size: 14px; font-weight: 500; transition: all 0.2s ease;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.nav-item.active {
    background: rgba(59,130,246,0.12); color: #60A5FA;
    border-left: 3px solid var(--accent); padding-left: 11px;
}

.main-wrapper { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; min-width: 0; }
.top-header {
    height: var(--header-height); background: rgba(10,15,30,0.9);
    backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; flex-shrink: 0; z-index: 10;
}
.header-title { font-size: 17px; font-weight: 600; }
.header-profile { display: flex; align-items: center; gap: 12px; }
.profile-btn {
    text-decoration: none; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 20px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(56, 120, 220, 0.14);
    font-size: 14px; transition: all 0.2s;
}
.profile-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.content-area { flex: 1; padding: 28px; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }

.glass-panel {
    background: rgba(15,23,42,0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.07); border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.table-wrapper { background: rgba(15,23,42,0.6); border: 1px solid rgba(255,255,255,0.07); border-radius: 20px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead { background: rgba(30,41,59,0.8); }
th { padding: 14px 20px; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.8px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.06); }
td { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 14px; vertical-align: middle; }
tbody tr:hover { background: rgba(59,130,246,0.04); }
tbody tr:last-child td { border-bottom: none; }

.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-success { background: rgba(16,185,129,0.15); color: #34D399; }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #F87171; }
.badge-warning { background: rgba(245,158,11,0.15); color: #FCD34D; }
.badge-info    { background: rgba(59,130,246,0.15);  color: #60A5FA; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card { padding: 24px; position: relative; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; opacity: 0; transition: opacity 0.3s; }
.stat-card:hover::before { opacity: 1; }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue   { background: rgba(59,130,246,0.15); color: #60A5FA; }
.stat-icon.green  { background: rgba(16,185,129,0.15); color: #34D399; }
.stat-icon.purple { background: rgba(139,92,246,0.15); color: #A78BFA; }
.stat-icon.red    { background: rgba(239,68,68,0.15); color: #F87171; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1; }

.profile-container { max-width: 800px; }
.profile-section { padding: 32px; margin-bottom: 24px; }
.profile-section h2 { font-size: 18px; font-weight: 600; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid rgba(56, 120, 220, 0.14); }
.form-row { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }


/* ============================================================
   REGRAS DE RESPONSIVIDADE MASTER (NÍVEL ARQUITETO)
   ============================================================ */
:root { --sidebar-width: 260px; }

@media (max-width: 768px) {
    :root { --sidebar-width: 0px !important; }
    
    .sidebar { 
        position: fixed !important; 
        left: -260px !important; 
        width: 260px !important; 
        height: 100vh !important;
        z-index: 99999 !important; 
        transition: 0.3s ease-in-out !important; 
        display: block !important;
        visibility: visible !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.5) !important;
    }
    
    .sidebar.active { 
        left: 0 !important; 
    }
    
    .main-wrapper { 
        margin-left: 0 !important; 
        width: 100% !important; 
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .top-header { 
        left: 0 !important; 
        width: 100% !important; 
        padding: 0 15px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Ativar o Botão Hambúrguer */
    .mobile-menu-toggle { 
        display: flex !important; 
        align-items: center !important; 
        justify-content: center !important; 
        width: 45px !important; 
        height: 45px !important; 
        background: rgba(255,255,255,0.1) !important; 
        border: none !important; 
        border-radius: 8px !important; 
        color: white !important; 
        margin-right: 15px !important; 
        cursor: pointer !important; 
        z-index: 100000 !important;
    }
    
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
    }
}

/* ── Topbar: ajuste do main-content ──────────────────────────────────── */
:root { --topbar-h: 58px; }
.main-content {
    padding-top: var(--topbar-h) !important;
}
