:root {
    --bg-body: #020617;
    --bg-sidebar: rgba(8, 15, 35, 0.92);
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-hover: rgba(30, 41, 59, 0.8);
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --primary-color: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent-color: #10b981;
    --warn-color: #f59e0b;
    --danger-color: #ef4444;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px var(--primary-glow);
    --shadow-glass: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ========== Base ========== */
body {
    background-color: var(--bg-body);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.1), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.06), transparent 25%),
        radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.06), transparent 30%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.45); }

h1, h2, h3, h4, h5, h6, .fw-bold, strong {
    color: #ffffff;
    letter-spacing: -0.01em;
}

a {
    color: #93c5fd;
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: #bfdbfe;
    text-decoration: none;
    text-shadow: 0 0 8px rgba(147, 197, 253, 0.5);
}

/* ========== App Shell: Sidebar + Content ========== */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    background: var(--bg-sidebar);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
}

.sidebar-brand {
    padding: 1.5rem 1.4rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(135deg, #93c5fd, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 0.6rem 0;
    overflow-y: auto;
}

.sidebar-group-label {
    padding: 1.1rem 1.4rem 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
    font-weight: 800;
    user-select: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.4rem;
    margin: 1px 0.6rem;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link i {
    font-size: 1.05rem;
    opacity: 0.7;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: opacity 0.25s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(59, 130, 246, 0.1);
    text-decoration: none;
    text-shadow: none;
}

.sidebar-link:hover i {
    opacity: 1;
    color: #60a5fa;
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.12));
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    box-shadow: 0 0 8px var(--primary-glow);
}

.sidebar-link.active i {
    opacity: 1;
    color: #60a5fa;
}

.sidebar-footer {
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-footer .sidebar-link {
    margin: 0;
    color: #94a3b8;
}

.sidebar-footer .sidebar-link:hover {
    color: #fb7185;
    background: rgba(239, 68, 68, 0.1);
}

/* ========== Main Content Area ========== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top bar (mobile hamburger + optional breadcrumb) */
.topbar {
    display: none; /* Hidden on desktop */
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.75rem 1rem;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.topbar-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.3rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.topbar-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1035;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.main-content {
    padding: 1.8rem 2rem;
    flex: 1;
    /* 设置最终状态的默认值，动画播完后不再需要 forwards 保留 */
    opacity: 1;
    transform: translateY(0);
    animation: slideUpFade 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    /* 不用 forwards，避免创建永久层叠上下文导致 Modal 被遮挡 */
}

footer {
    padding: 1.5rem 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.82rem;
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .topbar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    .main-content {
        padding: 1.2rem 1rem;
    }
}

/* ========== Cards ========== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow-md), var(--shadow-glass);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    background: rgba(0, 0, 0, 0.2) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1rem 1.3rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff !important;
    letter-spacing: 0.02em;
}

.text-muted { color: var(--text-muted) !important; }

/* Stat Cards */
.card-stat {
    position: relative;
    z-index: 1;
}

.card-stat::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    box-shadow: 0 0 0 0 var(--primary-glow);
    transition: box-shadow 0.4s ease;
    z-index: -1;
}

.card-stat:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.4);
}

.card-stat:hover::after {
    box-shadow: var(--shadow-glow);
}

.card-stat .card-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.card-stat .display-6 {
    font-weight: 800;
    font-size: 2.4rem;
    margin-bottom: 0;
    background: linear-gradient(to bottom right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== Hero Panel ========== */
.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 2rem 2.2rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.5) 0%, rgba(15, 23, 42, 0.9) 100%);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    animation: rotateSlow 25s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-panel > * {
    position: relative;
    z-index: 1;
}

.eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #93c5fd;
    margin-bottom: 0.5rem;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(147, 197, 253, 0.4);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    margin: 0;
    color: #e2e8f0;
    max-width: 52rem;
    font-size: 1rem;
    line-height: 1.7;
}

/* Hero Chips */
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
    padding: 0.65rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
    transition: all 0.3s ease;
}

.hero-chip:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
    background: rgba(16, 185, 129, 0.2);
}

.hero-chip-alert {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.12);
    color: #fde047;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.hero-chip-alert:hover {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.2);
}

/* ========== Metric Cards ========== */
.metric-card {
    height: 100%;
    padding: 1.4rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    box-shadow: var(--shadow-glass);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
    box-shadow: var(--shadow-sm);
}

.metric-card-primary { border-left: 3px solid #60a5fa; }
.metric-card-warn { border-left: 3px solid #fbbf24; }
.metric-card-danger { border-left: 3px solid #f87171; }
.metric-card-ink { border-left: 3px solid #a78bfa; }

.metric-label {
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    font-weight: 700;
}

.metric-value {
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 800;
    margin: 0.4rem 0 0.15rem;
    color: #ffffff;
}

.metric-note {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* ========== Form Controls ========== */
.form-control,
.form-select {
    background-color: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #ffffff;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.92rem;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(2, 6, 23, 0.95);
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 12px rgba(59, 130, 246, 0.1);
    color: #ffffff;
}

.form-control::placeholder { color: #64748b; }

.input-group-text {
    background-color: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
    border-radius: 10px;
    font-weight: 600;
}

.form-label {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ========== Tables ========== */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    --bs-table-border-color: rgba(148, 163, 184, 0.1);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    background-color: transparent !important;
}

.table thead th {
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(148, 163, 184, 0.15);
    padding: 0.9rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 0.8rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    font-size: 0.92rem;
    color: #e2e8f0;
    transition: background 0.2s ease;
}

/* Zebra striping */
.table tbody tr:nth-child(even) > td {
    background: rgba(255, 255, 255, 0.015);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table-hover > tbody > tr:hover > * {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #ffffff !important;
}

.font-monospace {
    color: #f8fafc;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.88em;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

/* ========== Buttons ========== */
.btn {
    font-weight: 700;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 0.02em;
    font-size: 0.92rem;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.12), transparent);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-outline-primary {
    border: 1px solid #60a5fa;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.08);
}

.btn-outline-primary:hover {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.btn-outline-light {
    border: 1px solid rgba(255,255,255,0.15);
    color: #f8fafc;
    background: rgba(255,255,255,0.04);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.btn-group-sm > .btn {
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
}

/* ========== Badges ========== */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 800;
    border-radius: 8px;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    font-size: 0.78rem;
}

.bg-success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.bg-danger {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.bg-warning {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fde047 !important;
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.bg-secondary {
    background: rgba(148, 163, 184, 0.18) !important;
    color: #f1f5f9 !important;
    border-color: rgba(148, 163, 184, 0.35);
}

.bg-primary {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
    border-color: rgba(59, 130, 246, 0.35);
}

.bg-secondary-subtle {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.bg-success-subtle {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.bg-danger-subtle {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.bg-warning-subtle {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #fde047 !important;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ========== Utility Text Colors ========== */
.text-success { color: #34d399 !important; text-shadow: 0 0 10px rgba(16, 185, 129, 0.3); font-weight: 700; }
.text-danger { color: #fb7185 !important; text-shadow: 0 0 10px rgba(244, 63, 94, 0.3); font-weight: 700; }
.text-warning { color: #fde047 !important; text-shadow: 0 0 10px rgba(251, 191, 36, 0.3); font-weight: 700; }
.text-primary { color: #60a5fa !important; text-shadow: 0 0 10px rgba(59, 130, 246, 0.3); font-weight: 700; }
.text-light { color: #f8fafc !important; font-weight: 700; }

/* ========== Animations ========== */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

tbody tr {
    animation: fadeInRow 0.35s ease backwards;
}

@keyframes fadeInRow {
    from { opacity: 0; transform: translateX(-6px); }
    to { opacity: 1; transform: translateX(0); }
}

tbody tr:nth-child(1) { animation-delay: 0.03s; }
tbody tr:nth-child(2) { animation-delay: 0.06s; }
tbody tr:nth-child(3) { animation-delay: 0.09s; }
tbody tr:nth-child(4) { animation-delay: 0.12s; }
tbody tr:nth-child(5) { animation-delay: 0.15s; }
tbody tr:nth-child(6) { animation-delay: 0.18s; }
tbody tr:nth-child(7) { animation-delay: 0.21s; }
tbody tr:nth-child(8) { animation-delay: 0.24s; }

/* ========== Dashboard ========== */
.panel-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-weight: 800;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.summary-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.summary-row strong {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
}

/* ========== Login Page ========== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.login-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite alternate;
}

.login-bg-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(59, 130, 246, 0.15);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.login-bg-orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(139, 92, 246, 0.12);
    bottom: -80px;
    left: -80px;
    animation-delay: 2s;
}

.login-bg-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(16, 185, 129, 0.1);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -20px) scale(1.08); }
}

.login-card {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
    animation: loginAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card .card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.password-toggle-wrap {
    position: relative;
}

.password-toggle-wrap .form-control {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.3rem;
    font-size: 1.05rem;
    transition: color 0.2s ease;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: #93c5fd;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-panel {
        flex-direction: column;
        padding: 1.5rem;
    }
    .hero-title { font-size: 1.7rem; }
    .metric-value { font-size: 1.7rem; }
}

/* Alert styles */
.alert {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(8px);
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-info {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

/* Compact table helper */
.compact-table td,
.compact-table th {
    padding: 0.65rem 0.85rem;
}

/* ========== Modal fix ========== */
.modal-backdrop {
    display: none !important;
}
