/* ============================================================
   Sistema Itinerante — ULTRA PREMIUM CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    /* Colors */
    --primary:          #4f46e5;
    --primary-dark:     #3730a3;
    --primary-light:    #6366f1;
    --primary-xlight:   rgba(79,70,229,0.12);

    --success:          #10b981;
    --success-light:    rgba(16,185,129,0.12);
    --warning:          #f59e0b;
    --warning-light:    rgba(245,158,11,0.12);
    --danger:           #ef4444;
    --danger-light:     rgba(239,68,68,0.12);
    --info:             #06b6d4;
    --info-light:       rgba(6,182,212,0.12);
    --purple:           #8b5cf6;
    --purple-light:     rgba(139,92,246,0.12);

    /* Sidebar */
    --sidebar-bg:       #0c0e1a;
    --sidebar-width:    265px;
    --sidebar-border:   rgba(255,255,255,0.05);
    --sidebar-text:     rgba(255,255,255,0.55);
    --sidebar-hover-bg: rgba(255,255,255,0.07);
    --sidebar-active-bg:rgba(79,70,229,0.22);

    /* Layout */
    --body-bg:          #f1f5f9;
    --card-bg:          #ffffff;
    --topbar-bg:        rgba(255,255,255,0.92);
    --border:           #e2e8f0;

    /* Text */
    --text:             #0f172a;
    --text-2:           #334155;
    --text-muted:       #64748b;
    --text-faint:       #94a3b8;

    /* Shadows */
    --shadow-xs:        0 1px 3px rgba(0,0,0,0.06);
    --shadow-sm:        0 4px 12px rgba(0,0,0,0.06);
    --shadow-md:        0 8px 28px rgba(0,0,0,0.10);
    --shadow-lg:        0 20px 60px rgba(0,0,0,0.14);
    --shadow-primary:   0 8px 24px rgba(79,70,229,0.28);
    --shadow-card-hover:0 12px 40px rgba(79,70,229,0.14);

    /* Radii */
    --r-sm:   8px;
    --r-md:   12px;
    --r-lg:   18px;
    --r-xl:   24px;
    --r-full: 9999px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrapper { display: flex; min-height: 100vh; }

/* ============================================================
   SIDEBAR — ULTRA PREMIUM
   ============================================================ */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    border-right: 1px solid var(--sidebar-border);
    overflow: hidden;
}

/* Subtle glow accent on sidebar top */
#sidebar::before {
    content: '';
    position: absolute;
    top: -80px; left: -80px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(79,70,229,0.35) 0%, transparent 70%);
    pointer-events: none;
}

#sidebar.active { transform: translateX(calc(-1 * var(--sidebar-width))); }

/* Header */
.sidebar-header {
    padding: 28px 20px 22px;
    border-bottom: 1px solid var(--sidebar-border);
    position: relative;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #fff;
    box-shadow: 0 4px 14px rgba(79,70,229,0.5);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.sidebar-logo-icon::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-title { font-size: 0.95rem; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-subtitle { font-size: 0.68rem; color: var(--sidebar-text); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* Nav */
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; overflow-x: hidden; }

.nav-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.22);
    padding: 12px 8px 6px;
    margin-top: 4px;
}

#sidebar ul { list-style: none; padding: 0; margin: 0; }

#sidebar ul li { margin-bottom: 2px; }

#sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all .2s ease;
    position: relative;
    overflow: hidden;
}

#sidebar ul li a .nav-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
    transition: all .2s ease;
}

#sidebar ul li a:hover {
    color: #fff;
    background: var(--sidebar-hover-bg);
}

#sidebar ul li a:hover .nav-icon {
    background: rgba(255,255,255,0.12);
}

#sidebar ul li.active > a {
    color: #fff;
    background: var(--sidebar-active-bg);
    box-shadow: inset 0 0 0 1px rgba(79,70,229,0.35);
}

#sidebar ul li.active > a .nav-icon {
    background: var(--primary);
    box-shadow: 0 4px 10px rgba(79,70,229,0.5);
}

/* Active indicator dot */
#sidebar ul li.active > a::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 8px var(--primary-light);
}

/* Sidebar footer */
.sidebar-footer {
    padding: 14px 12px 20px;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--sidebar-border);
    transition: background .2s;
}

.sidebar-user:hover { background: rgba(255,255,255,0.08); }

.user-av {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; color: #fff;
    flex-shrink: 0;
}

.user-av-name  { font-size: 0.82rem; font-weight: 600; color: #fff; line-height: 1.2; }
.user-av-role  { font-size: 0.68rem; color: var(--sidebar-text); }

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .35s cubic-bezier(.4,0,.2,1);
}

#content.sidebar-hidden { margin-left: 0; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--topbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226,232,240,0.8);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.btn-sidebar-toggle {
    width: 38px; height: 38px;
    border-radius: var(--r-sm);
    background: transparent;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}
.btn-sidebar-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.topbar-page-info { line-height: 1.3; }
.topbar-page-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.topbar-page-time { font-size: 0.72rem; color: var(--text-faint); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.topbar-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px 6px 6px;
    border-radius: var(--r-full);
    background: var(--body-bg);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    cursor: default;
}

.topbar-av {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; font-weight: 700; color: #fff;
}

.btn-logout-top {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--r-full);
    background: var(--danger-light);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.btn-logout-top:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

/* ============================================================
   CONTENT BODY
   ============================================================ */
.content-body {
    padding: 28px 28px 40px;
    flex: 1;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10;
    letter-spacing: -0.3px;
}

.page-title i {
    font-size: 1.1rem;
    padding: 9px;
    border-radius: 10px;
    background: var(--primary-xlight);
    color: var(--primary);
}

/* ============================================================
   CARDS — ULTRA PREMIUM
   ============================================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    margin-bottom: 24px;
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
    overflow: hidden;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
    border-color: rgba(79,70,229,0.2);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 22px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text);
    display: flex;
    align-items: center;
}

.card-body { padding: 22px; }

/* ============================================================
   STAT CARDS — ULTRA PREMIUM
   ============================================================ */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    box-shadow: var(--shadow-xs);
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
}

/* Subtle top accent line */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transition: opacity .3s;
    opacity: 0;
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.stat-card:hover::before { opacity: 1; }

.stat-card.blue::before   { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.green::before  { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), #a78bfa); }

/* Glow on hover */
.stat-card.blue:hover   { border-color: rgba(79,70,229,0.3); }
.stat-card.green:hover  { border-color: rgba(16,185,129,0.3); }
.stat-card.orange:hover { border-color: rgba(245,158,11,0.3); }
.stat-card.purple:hover { border-color: rgba(139,92,246,0.3); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    position: relative;
}

.stat-card.blue   .stat-icon { background: var(--primary-xlight); color: var(--primary); }
.stat-card.green  .stat-icon { background: var(--success-light);  color: var(--success); }
.stat-card.orange .stat-icon { background: var(--warning-light);  color: var(--warning); }
.stat-card.purple .stat-icon { background: var(--purple-light);   color: var(--purple); }

.stat-card:hover .stat-icon { transform: scale(1.08); }

.stat-info { flex: 1; min-width: 0; }
.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
    line-height: 1;
    display: block;
}

.stat-trend {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-faint);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ============================================================
   TABLES
   ============================================================ */
.table {
    --bs-table-color: var(--text);
    font-size: 0.865rem;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table > thead > tr > th {
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-faint);
    background: var(--body-bg);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table > tbody > tr > td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(226,232,240,0.6);
    vertical-align: middle;
    transition: background .15s;
}

.table > tbody > tr:last-child > td { border-bottom: none; }

.table-hover > tbody > tr:hover > td { background: rgba(79,70,229,0.03); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1px;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background .2s;
}
.btn:hover::after { background: rgba(255,255,255,0.08); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    color: #fff;
    padding: 10px 20px;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 10px 30px rgba(79,70,229,0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 7px; }

.btn-outline-primary { border-color: rgba(79,70,229,0.35); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color:#fff; box-shadow: var(--shadow-primary);}

.btn-outline-danger  { border-color: rgba(239,68,68,0.3); color:var(--danger); }
.btn-outline-danger:hover  { background: var(--danger); color:#fff; }

.btn-outline-info    { border-color: rgba(6,182,212,0.3); color:var(--info); }
.btn-outline-info:hover    { background: var(--info); color:#fff; }

.btn-outline-success { border-color: rgba(16,185,129,0.3); color:var(--success); }
.btn-outline-success:hover { background: var(--success); color:#fff; }

.btn-outline-secondary { border-color: var(--border); color:var(--text-muted); }
.btn-outline-secondary:hover { background:var(--text-muted); color:#fff; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-control, .form-select {
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border);
    font-size: 0.9rem;
    padding: 10px 14px;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    background: var(--card-bg);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79,70,229,0.1);
    outline: none;
}
.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-2);
    margin-bottom: 7px;
}
.input-group-text {
    background: var(--body-bg);
    border: 1.5px solid var(--border);
    border-right: none;
    color: var(--text-muted);
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    padding: 10px 14px;
}
.input-group .form-control { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; padding: 10px 0; }
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 20px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
    border-radius: 99px;
}
.timeline-item { position: relative; padding-left: 52px; margin-bottom: 22px; }
.timeline-marker {
    position: absolute;
    left: 11px; top: 6px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 5px rgba(79,70,229,0.1);
}
.timeline-content {
    background: var(--card-bg);
    padding: 14px 18px;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
}

/* ============================================================
   CPF MASKED
   ============================================================ */
.cpf-masked {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--text-faint);
    letter-spacing: 0.5px;
}

/* ============================================================
   QUICK ACTION CARDS (Dashboard)
   ============================================================ */
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 12px;
    border-radius: var(--r-lg);
    background: var(--card-bg);
    border: 1.5px dashed var(--border);
    text-decoration: none;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all .25s ease;
    text-align: center;
}
.quick-action:hover {
    border-style: solid;
    transform: translateY(-3px);
    color: var(--text);
}
.quick-action.qa-blue:hover  { border-color: var(--primary); background: var(--primary-xlight); }
.quick-action.qa-green:hover { border-color: var(--success); background: var(--success-light); }
.quick-action.qa-orange:hover { border-color: var(--warning); background: var(--warning-light);}
.quick-action.qa-purple:hover { border-color: var(--purple); background: var(--purple-light); }

.qa-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: all .25s;
}
.quick-action.qa-blue   .qa-icon { background: var(--primary-xlight); color: var(--primary); }
.quick-action.qa-green  .qa-icon { background: var(--success-light);  color: var(--success); }
.quick-action.qa-orange .qa-icon { background: var(--warning-light);  color: var(--warning); }
.quick-action.qa-purple .qa-icon { background: var(--purple-light);   color: var(--purple); }
.quick-action:hover .qa-icon { transform: scale(1.12) rotate(-5deg); }

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226,232,240,0.6);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }

.activity-dot {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.activity-dot.blue   { background: var(--primary-xlight); color: var(--primary); }
.activity-dot.green  { background: var(--success-light);  color: var(--success); }
.activity-dot.orange { background: var(--warning-light);  color: var(--warning); }

.activity-text { flex: 1; min-width: 0; }
.activity-title { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-meta { font-size: 0.72rem; color: var(--text-faint); margin-top: 2px; }

/* ============================================================
   LOGIN PAGE — ULTRA PREMIUM
   ============================================================ */
body.login-page {
    background: #0a0e1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient orbs */
body.login-page::before {
    content: '';
    position: fixed;
    top: -200px; left: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(79,70,229,0.25) 0%, transparent 70%);
    animation: orb1 8s ease-in-out infinite alternate;
    pointer-events: none;
}
body.login-page::after {
    content: '';
    position: fixed;
    bottom: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(139,92,246,0.2) 0%, transparent 70%);
    animation: orb2 10s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes orb1 { from { transform: translate(0,0) scale(1); } to { transform: translate(80px,60px) scale(1.2); } }
@keyframes orb2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px,-80px) scale(1.15); } }

.login-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(15,20,40,0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
    border-radius: var(--r-xl);
    padding: 48px 44px;
    animation: cardIn .5s cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.login-logo {
    width: 60px; height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    display: flex; align-items: center; justify-content: center;
    margin: 10 auto 22px;
    font-size: 1.5rem; color: #fff;
    box-shadow: 0 10px 30px rgba(79,70,229,0.5);
}

.login-title {
    font-size: 1.45rem; font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

.login-subtitle {
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    margin-bottom: 34px;
}

/* Login form labels & inputs on dark bg */
.login-card .form-label { color: rgba(255,255,255,0.7); }
.login-card .form-control {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: var(--r-sm);
}
.login-card .form-control::placeholder { color: rgba(255,255,255,0.25); }
.login-card .form-control:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.2);
    color: #fff;
}
.login-card .input-group-text {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.4);
    border-right: none;
}

.login-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.2px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .25s;
    box-shadow: 0 6px 20px rgba(79,70,229,0.5);
    margin-top: 4px;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79,70,229,0.6);
}

.password-wrapper { position: relative; }
.password-toggle {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer; padding: 4px; z-index: 5;
    transition: color .2s;
}
.password-toggle:hover { color: var(--primary-light); }

/* ============================================================
   DATATABLES CUSTOM
   ============================================================ */
div.dataTables_wrapper div.dataTables_filter input,
div.dataTables_wrapper div.dataTables_length select {
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border);
    padding: 7px 12px;
    font-size: 0.85rem;
    color: var(--text);
   
}
div.dataTables_wrapper div.dataTables_filter input:focus,
div.dataTables_wrapper div.dataTables_length select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
    outline: none;
}
.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-primary);
}
.dataTables_paginate .paginate_button:hover {
    background: var(--body-bg) !important;
    border-color: var(--border) !important;
    border-radius: var(--r-sm);
}
.dataTables_info, .dataTables_length, .dataTables_filter { color: var(--text-muted); font-size: 0.82rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity:0; transform: translateY(20px); }
    to   { opacity:1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity:0; } to { opacity:1; }
}
@keyframes countUp { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: none; } }

.animate-card {
    animation: fadeInUp .45s ease forwards;
    opacity: 0;
}
.animate-card:nth-child(1) { animation-delay:.05s }
.animate-card:nth-child(2) { animation-delay:.10s }
.animate-card:nth-child(3) { animation-delay:.15s }
.animate-card:nth-child(4) { animation-delay:.20s }
.animate-card:nth-child(5) { animation-delay:.25s }
.animate-card:nth-child(6) { animation-delay:.30s }
.animate-card:nth-child(7) { animation-delay:.35s }
.animate-card:nth-child(8) { animation-delay:.40s }

.page-enter { animation: fadeIn .35s ease forwards; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }
    #sidebar.active {
        transform: translateX(0);
    }
    #content {
        margin-left: 0 !important;
    }
    .content-body { padding: 18px 16px 32px; }
    .topbar { padding: 0 16px; }
    .stat-value { font-size: 1.6rem; }
}

@media (max-width: 575.98px) {
    .login-card { padding: 32px 22px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .topbar-page-name { font-size: 0.9rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    #sidebar, .topbar, .btn, .dataTables_wrapper *:not(table):not(thead):not(tbody):not(tr):not(td):not(th) { display:none!important; }
    #content { margin-left: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}
