/* ========================================
   CT-SecurityCyber — Light + Dark Blue
   ======================================== */

:root {
    /* Core palette — light backgrounds */
    --bg-primary:    #f5f7fa;
    --bg-secondary:  #ffffff;
    --bg-card:       #ffffff;
    --bg-card-hover: #f0f4ff;
    --bg-input:      #f5f7fa;
    --bg-sidebar:    #0b1a3b;

    /* Accent blues */
    --blue-900: #071332;
    --blue-800: #0b1a3b;
    --blue-700: #0f2347;
    --blue-600: #163060;
    --blue-500: #1e4d8c;
    --blue-400: #2563eb;
    --blue-300: #3b82f6;
    --blue-200: #60a5fa;
    --blue-100: #dbeafe;
    --blue-glow: rgba(37, 99, 235, 0.08);
    --blue-glow-strong: rgba(37, 99, 235, 0.14);

    /* Text */
    --text-primary:   #1e293b;
    --text-secondary: #64748b;
    --text-muted:     #94a3b8;

    /* Status */
    --green:  #16a34a;
    --red:    #dc2626;
    --yellow: #d97706;
    --orange: #ea580c;
    --purple: #7c3aed;
    --cyan:   #0891b2;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #cbd5e1;

    /* Sidebar */
    --sidebar-width: 250px;
    --sidebar-collapsed: 70px;

    /* Misc */
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 14px; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--blue-400); text-decoration: none; }
a:hover { color: var(--blue-500); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-400); }

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-sidebar);
    border-right: none;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--blue-400), var(--blue-300));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.brand-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.brand-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.brand-sub {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Nav items */
.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.55);
    transition: var(--transition);
    position: relative;
    text-decoration: none;
    font-weight: 500;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--blue-300);
}

.nav-badge {
    margin-left: auto;
    background: var(--red);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Sidebar footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-dot.offline {
    background: var(--red);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* Top bar — removed, using hero banners instead */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 110;
    background: var(--bg-sidebar);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.menu-toggle svg { width: 24px; height: 24px; }

/* Content area */
.content-area {
    padding: 28px 32px;
    flex: 1;
}

/* ========================================
   CARDS & METRICS  — icon-circle style
   ======================================== */

/* Hero banner */
.hero-banner {
    background: linear-gradient(135deg, #0b1a3b 0%, #163060 60%, #1e4d8c 100%);
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    color: white;
}

.hero-banner::after { display: none; }

.hero-banner-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 90px;
    height: 90px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    background: rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner-icon svg {
    width: 44px;
    height: 44px;
    color: rgba(255,255,255,0.35);
    stroke-width: 1.5;
}

.hero-banner h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-banner p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
}

/* Section label */
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    margin-top: 8px;
}

.section-label svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Metric cards grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Remove the old top-bar line */
.metric-card::before { display: none; }

.metric-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Icon circle */
.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.metric-icon.blue   { background: var(--blue-400); }
.metric-icon.green  { background: var(--green); }
.metric-icon.red    { background: var(--red); }
.metric-icon.yellow { background: var(--yellow); }
.metric-icon.purple { background: var(--purple); }
.metric-icon.cyan   { background: var(--cyan); }
.metric-icon.orange { background: var(--orange); }
.metric-icon.teal   { background: #0d9488; }
.metric-icon.pink   { background: #ec4899; }

.metric-info {
    display: flex;
    flex-direction: column;
}

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

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    margin-bottom: 0;
}

.metric-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ========================================
   PANELS / SECTIONS
   ======================================== */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title svg {
    width: 18px;
    height: 18px;
    color: var(--blue-400);
}

.panel-body {
    padding: 0;
}

/* ========================================
   TABLES
   ======================================== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    background: var(--blue-800);
    border-bottom: none;
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--blue-glow);
}

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

/* ========================================
   BADGES & STATUS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-online     { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge-offline    { background: rgba(239, 68, 68, 0.15);  color: var(--red); }
.badge-scanning   { background: rgba(59, 130, 246, 0.15); color: var(--blue-300); }
.badge-error      { background: rgba(239, 68, 68, 0.15);  color: var(--red); }
.badge-detection  { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-scan       { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge-update     { background: rgba(139, 92, 246, 0.15); color: var(--purple); }

.badge-quarantined       { background: rgba(239, 68, 68, 0.15);  color: var(--red); }
.badge-restored          { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.badge-deleted           { background: rgba(107, 114, 128, 0.15); color: #9ca3af; }
.badge-clean             { background: rgba(6, 182, 212, 0.15);  color: var(--cyan); }
.badge-pending_restore,
.badge-pending_delete,
.badge-pending_reanalyze { background: rgba(245, 158, 11, 0.15); color: var(--yellow); }

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-400), var(--blue-300));
    color: white;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
}

.btn-scan {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue-400);
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.btn-scan:hover {
    background: rgba(59, 130, 246, 0.25);
}
.btn-scan-full {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.btn-scan-full:hover {
    background: rgba(168, 85, 247, 0.25);
}

.fleet-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--blue-100);
    color: var(--blue-400);
    border-color: var(--blue-400);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.75rem;
}

.btn svg { width: 16px; height: 16px; }

.btn-group {
    display: flex;
    gap: 6px;
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238896ab' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.filters-bar .form-group {
    margin-bottom: 0;
    min-width: 160px;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    max-width: 450px;
    animation: slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.toast.success {
    background: #f0fdf4;
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: var(--green);
}

.toast.error {
    background: #fef2f2;
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--red);
}

.toast.info {
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--blue-400);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.1rem;
}

.toast-close:hover { opacity: 1; }

@keyframes slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ========================================
   MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fade-in 0.2s;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: scale-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1.1rem; }

.modal-body { padding: 24px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ========================================
   LOADING
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ========================================
   UTILITIES
   ======================================== */
.text-mono  { font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace; }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 0.8rem; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
    display: inline-block;
}

.flex     { display: flex; }
.flex-col { flex-direction: column; }
.gap-sm   { gap: 8px; }
.gap-md   { gap: 16px; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Toggle switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input { display: none; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--border-light);
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--blue-400);
    border-color: var(--blue-400);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle { display: block; }

    .content-area {
        padding: 20px 16px;
    }

    .topbar {
        padding: 12px 16px;
    }

    .hero-banner {
        padding: 24px 20px;
    }

    .hero-banner h2 {
        font-size: 1.3rem;
    }

    .hero-banner::after {
        width: 60px;
        height: 60px;
        right: 16px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filters-bar .form-group {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .metric-value {
        font-size: 1.8rem;
    }
}

/* ========================================
   AUTH STATE — Show/Hide Login vs App
   ======================================== */
body.not-authenticated #login-screen {
    display: flex;
}
body.not-authenticated .sidebar,
body.not-authenticated .main-content {
    display: none !important;
}
body.authenticated #login-screen,
body:not(.not-authenticated) #login-screen {
    display: none !important;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-600) 50%, var(--blue-500) 100%);
    z-index: 9999;
    overflow: hidden;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    width: 90%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--blue-800), var(--blue-500));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(11, 26, 59, 0.25);
}

.login-icon svg {
    width: 38px;
    height: 38px;
    stroke: #ffffff;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blue-800);
    margin: 0;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.login-form label svg {
    stroke: var(--blue-400);
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.toggle-password:hover {
    color: var(--blue-400);
}

.login-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--blue-800), var(--blue-500));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(11, 26, 59, 0.3);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(11, 26, 59, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.login-bg {
    display: none;
}

@media (min-width: 900px) {
    .login-card {
        padding: 56px;
    }

    .login-bg {
        display: block;
        position: absolute;
        top: 0; right: 0; bottom: 0; left: 0;
        z-index: 0;
        overflow: hidden;
    }

    .login-bg-pattern {
        position: absolute;
        width: 100%;
        height: 100%;
        background:
            radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.2) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
            radial-gradient(circle at 60% 80%, rgba(30, 77, 140, 0.15) 0%, transparent 40%);
    }
}

/* ========================================
   SIDEBAR USER INFO
   ======================================== */
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.user-name {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.btn-logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   BADGE EXTRAS
   ======================================== */
.badge-blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue-400);
}

.badge-gray {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-secondary);
}
