@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

:root {
    /* DARK THEME (The Core Premium Aesthetic) */
    --bg-body: #05070a;
    --bg-sidebar: #0a0c10;
    --bg-panel: rgba(17, 25, 40, 0.75);
    --bg-topbar: rgba(10, 12, 16, 0.8);
    --bg-card: #0f1117;
    --bg-card-hover: rgba(255, 255, 255, 0.03);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --accent: #a855f7;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --panel-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);

    --sidebar-width: 260px;
    --topbar-height: 70px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Login Specific */
    --card: #111827;
    --error: #f87171;
}

.light {
    /* LIGHT PREMIUM (Glassmorphic but bright) */
    --bg-body: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-panel: rgba(255, 255, 255, 0.7);
    --bg-topbar: rgba(255, 255, 255, 0.8);
    --bg-card: #ffffff;
    --bg-card-hover: rgba(0, 0, 0, 0.02);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: rgba(0, 0, 0, 0.08);
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.2);

    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.05);
    --panel-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    transition: background 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* --- LOGIN PAGE STYLES --- */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #020617, #0f172a);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    animation: fadeUp .6s ease;
    color: #0f172a;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box .brand {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: none;
    padding: 0;
}

.login-box .brand h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: .5px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f172a 0%, #6366f1 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: block;
}

.login-box .brand p {
    margin-top: 5px;
    font-size: 13px;
    color: #64748b;
}

/* Tabs */
.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
}

.tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.light .tab-btn:hover:not(.active) {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.06);
}

.login-box .input-group {
    margin-top: 15px;
}

.login-box .label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.login-box .input-group label {
    font-size: 12px;
    color: #334155;
    display: block;
    text-transform: none;
    margin-bottom: 6px;
    font-weight: 700;
}

.login-box .forgot-password {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.login-box .forgot-password:hover {
    color: #2563eb;
    text-decoration: underline;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: var(--transition);
    z-index: 2;
}

.login-box .input-group input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.login-box .input-group input:hover:not(:focus) {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.standard-input {
    padding: 12px;
}

.icon-input {
    padding: 12px 12px 12px 42px;
}

.login-box .input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.login-box .input-group input:focus + .input-icon,
.login-box .input-group input:focus ~ .input-icon {
    color: #3b82f6;
}

.login-box .password-wrapper {
    position: relative;
}

.login-box .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    font-size: 18px;
    user-select: none;
    z-index: 2;
    transition: color 0.2s ease, transform 0.2s ease;
}

.login-box .password-toggle:hover {
    color: #3b82f6 !important;
    transform: translateY(-50%) scale(1.1);
}

#togglePassword {
    transition: color 0.2s ease, transform 0.2s ease;
}

#togglePassword:hover {
    color: var(--primary) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login svg {
    width: 18px;
    height: 18px;
}

.login-box button.btn-login {
    width: 100%;
    padding: 12px;
    margin-top: 22px;
    border: none;
    border-radius: 8px;
    background: #1e293b;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.login-box button.btn-login:hover {
    background: #0f172a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.login-box .error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
    display: none;
    padding: 8px;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 6px;
}

.login-box .footer {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.create-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.create-account svg {
    width: 16px;
    height: 16px;
}

.create-account:hover {
    color: #0f172a;
}

/* Multi-mode Login & Register styles */
.login-box .login-mode-form {
    display: none;
    animation: loginFadeIn 0.4s ease;
}
.login-box .login-mode-form.active {
    display: block;
}

@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* OTP Specifics */
.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-top: 15px;
    margin-bottom: 15px;
}
.otp-digit {
    flex: 1;
    height: 48px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: all 0.3s ease;
}
.otp-digit:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

/* QR Code Mock Simulator */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    text-align: center;
}
.qr-frame-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}
.qr-frame-wrapper::before {
    content: '';
    position: absolute;
    width: calc(100% - 20px);
    height: 2px;
    background: #10b981;
    top: 10px;
    left: 10px;
    box-shadow: 0 0 8px #10b981;
    animation: scanLaser 3s linear infinite;
    z-index: 2;
}
@keyframes scanLaser {
    0% { top: 10px; }
    50% { top: 170px; }
    100% { top: 10px; }
}
.qr-frame-wrapper img {
    width: 140px;
    height: 140px;
    opacity: 0.95;
    transition: all 0.3s ease;
}
.qr-frame-wrapper.success::before {
    display: none;
}
.qr-frame-wrapper.success img {
    filter: blur(4px) grayscale(50%);
    opacity: 0.3;
}
.qr-status {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
.qr-success-mark {
    position: absolute;
    color: #10b981;
    font-size: 48px;
    display: none;
    z-index: 3;
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes scaleUp {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* OTP Resend Link & Button Styling */
.resend-container {
    text-align: right;
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}
.resend-btn {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    transition: color 0.2s;
}
.resend-btn:hover:not(:disabled) {
    color: #2563eb;
    text-decoration: underline;
}
.resend-btn:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

/* Dynamic slide anims for Register form toggle */
.login-box {
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-container.register-mode {
    max-width: 480px;
}

/* --- DASHBOARD LAYOUT --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    max-width: 100%;
    height: 45px;
    object-fit: contain;
    transition: var(--transition);
}

.sidebar .brand a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 10px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar .brand a:hover .brand-logo {
    transform: scale(1.06);
    opacity: 0.85;
}

.topbar-logo {
    display: none;
}

body.sidebar-collapsed .brand-logo {
    width: 0;
    opacity: 0;
}

.sidebar nav {
    padding: 20px 15px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 25px 10px 10px;
    letter-spacing: 1.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.card p {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 5px;
    letter-spacing: -0.5px;
}
}

.menu-item:hover {
    background: var(--glass-bg);
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    margin-left: 15px;
    border-left: 1px solid var(--glass-border);
}

.has-dropdown.open .submenu {
    max-height: 2000px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.submenu a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.submenu a:hover,
.submenu a.active {
    color: var(--primary);
    background: var(--glass-bg);
}

/* Nested Dropdowns */
.submenu .has-dropdown {
    margin-left: 0;
}

.submenu .menu-item {
    padding: 8px 15px;
    font-size: 13px;
    border-radius: 8px;
    margin-bottom: 2px;
}

.submenu .submenu {
    margin-left: 10px;
    border-left: 1px dashed var(--glass-border);
}

.submenu .submenu a {
    padding: 6px 15px;
    font-size: 12px;
}

.submenu .arrow {
    width: 14px;
    height: 14px;
}

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

.topbar {
    height: var(--topbar-height);
    padding: 0 40px;
    background: var(--bg-topbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
}

.search-box {
    position: relative;
    width: 400px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.create-account svg {
    width: 16px;
    height: 16px;
}

.create-account:hover {
    color: #0f172a;
}

/* --- DASHBOARD LAYOUT --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    max-width: 100%;
    height: 45px;
    object-fit: contain;
    transition: var(--transition);
}

.topbar-logo {
    display: none;
}

@media screen and (min-width: 769px) {
    body.sidebar-collapsed {
        --sidebar-width: 80px;
    }
    body.sidebar-collapsed .brand-logo,
    body.sidebar-collapsed .menu-text,
    body.sidebar-collapsed .arrow,
    body.sidebar-collapsed .sidebar-section {
        display: none !important;
    }
    body.sidebar-collapsed .menu-item {
        justify-content: center;
        padding: 12px;
    }
    body.sidebar-collapsed .menu-item svg {
        margin: 0 !important;
    }
    body.sidebar-collapsed .sidebar .brand {
        padding: 25px 0;
    }
    body.sidebar-collapsed .has-dropdown.open .submenu {
        display: none !important;
    }
    body.sidebar-collapsed .has-dropdown.active-parent .menu-item {
        background: var(--primary);
        color: #ffffff;
        box-shadow: 0 4px 15px var(--primary-glow);
    }
    body.sidebar-collapsed .has-dropdown.active-parent .menu-item svg {
        color: #ffffff;
    }
}

.premium-filter {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
    cursor: pointer;
}

.premium-filter:focus {
    background: var(--bg-panel);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Date Input Specifics */
input[type="date"].premium-filter {
    position: relative;
}

input[type="date"].premium-filter::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.premium-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}



.sidebar nav {
    padding: 20px 15px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 25px 10px 10px;
    letter-spacing: 1.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.arrow {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin-left: auto;
}

.has-dropdown.open .arrow {
    transform: rotate(90deg);
    opacity: 1;
    color: var(--primary);
}

.menu-item:hover {
    background: var(--glass-bg);
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    margin-left: 15px;
    border-left: 1px solid var(--glass-border);
}

.has-dropdown.open .submenu {
    max-height: 2000px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.submenu a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.submenu a:hover,
.submenu a.active {
    color: var(--primary);
    background: var(--glass-bg);
}

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

.topbar {
    height: var(--topbar-height);
    padding: 0 40px;
    background: var(--bg-topbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
}

.search-box {
    position: relative;
    width: 400px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.search-box input:focus {
    background: var(--bg-panel);
    border-color: var(--primary);
    width: 450px;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-box input:focus+.search-icon {
    color: var(--primary);
}

.search-key {
    position: absolute;
    right: 15px;
    padding: 2px 8px;
    background: var(--glass-border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    pointer-events: none;
}

/* SEARCH DROPDOWN */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    max-height: 450px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: var(--panel-shadow);
    display: none;
    animation: dropdownFade 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

:root:not(.light) .search-dropdown {
    background: #11131a;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(99, 102, 241, 0.12);
    padding-left: 24px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-icon {
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.2s;
}

.search-result-item:hover .search-result-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.theme-toggle {
    width: 65px;
    height: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.toggle-ball {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    left: 4px;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transform: translateX(31px);
}

.light .toggle-ball {
    transform: translateX(0);
}

.profile {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
    border-radius: 14px;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.profile-trigger:hover {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    transform: translateY(-1px);
}

.profile-trigger > div {
    display: flex;
    flex-direction: column;
    text-align: right;
    justify-content: center;
}

.profile img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    transition: var(--transition);
    object-fit: cover;
}

.profile-trigger:hover img {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 250px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--panel-shadow);
    display: none;
    overflow: hidden;
    z-index: 1001;
}

.create-account:hover {
    color: #0f172a;
}

/* --- DASHBOARD LAYOUT --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar .brand {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-logo {
    max-width: 100%;
    height: 45px;
    object-fit: contain;
    transition: var(--transition);
}

.topbar-logo {
    display: none;
}

@media screen and (min-width: 769px) {
    body.sidebar-collapsed {
        --sidebar-width: 80px;
    }
    body.sidebar-collapsed .brand-logo,
    body.sidebar-collapsed .menu-text,
    body.sidebar-collapsed .arrow,
    body.sidebar-collapsed .sidebar-section {
        display: none !important;
    }
    body.sidebar-collapsed .menu-item {
        justify-content: center;
        padding: 12px;
    }
    body.sidebar-collapsed .menu-item svg {
        margin: 0 !important;
    }
    body.sidebar-collapsed .sidebar .brand {
        padding: 25px 0;
    }
    body.sidebar-collapsed .has-dropdown.open .submenu {
        display: none !important;
    }
}


.sidebar nav {
    padding: 20px 15px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 25px 10px 10px;
    letter-spacing: 1.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.arrow {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin-left: auto;
}

.has-dropdown.open .arrow {
    transform: rotate(90deg);
    opacity: 1;
    color: var(--primary);
}

.menu-item:hover {
    background: var(--glass-bg);
    color: var(--primary);
    transform: translateX(5px);
}

.menu-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    margin-left: 15px;
    border-left: 1px solid var(--glass-border);
}

.has-dropdown.open .submenu {
    max-height: 2000px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.submenu a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.submenu a:hover,
.submenu a.active {
    color: var(--primary);
    background: var(--glass-bg);
}

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

.topbar {
    height: var(--topbar-height);
    padding: 0 40px;
    background: var(--bg-topbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex: 1;
}

.search-box {
    position: relative;
    width: 400px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition);
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.search-box input:focus {
    background: var(--bg-panel);
    border-color: var(--primary);
    width: 450px;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.search-box input:focus+.search-icon {
    color: var(--primary);
}

.search-key {
    position: absolute;
    right: 15px;
    padding: 2px 8px;
    background: var(--glass-border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    pointer-events: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.theme-toggle {
    width: 65px;
    height: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.toggle-ball {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    left: 4px;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transform: translateX(31px);
}

.light .toggle-ball {
    transform: translateX(0);
}

.content {
    padding: 40px;
}

.page-title h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 800;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: var(--panel-shadow);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4), 0 0 20px rgba(99, 102, 241, 0.15);
}

.card p {
    font-size: 32px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 5px;
    letter-spacing: -1px;
}

.card-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.card h3 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.card-info {
    flex: 1;
}

.card-icon {
    /* Uniform icon container for all stat cards */
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: none;
    border-radius: 14px;
    color: var(--primary);
    flex-shrink: 0;
    transition: none;
    box-shadow: 0 8px 28px rgba(2,6,23,0.55);
}

.card:hover .card-icon {
    /* disable hover transformations for a stable, professional look */
    transform: none !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)) !important;
    box-shadow: 0 8px 28px rgba(2,6,23,0.55) !important;
}

.card-icon svg {
    /* Force SVGs to scale to the container consistently (overrides inline attrs) */
    width: 60% !important;
    height: 60% !important;
    display: block;
    stroke-width: 1.6;
    stroke: currentColor;
    fill: none;
}

/* Larger variant for emphasis */
.card-icon--large {
    /* kept for compatibility but same size as default */
    width: 56px;
    height: 56px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(2,6,23,0.6);
}
.card-icon--large svg {
    width: 60% !important;
    height: 60% !important;
}

.profile.active .profile-menu {
    display: block;
    animation: popup 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popup {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

.profile-info {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

.profile-menu-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.profile-menu-item:hover {
    background: var(--glass-bg);
    color: var(--primary);
}

.profile-menu-item.danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* MISC */
.error-message {
    display: none;
}

/* --- COMPANIES PAGE COMPONENTS --- */

/* Filter Row */
.filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: var(--glass-bg);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 30px;
    scrollbar-width: thin;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    padding: 8px 15px;
    border-radius: 14px;
    flex: 1;
    min-width: 200px;
}

.filter-group svg {
    color: var(--primary);
    opacity: 0.8;
}

.filter-group select,
.filter-group input {
    background: transparent;
    /* remove inner control border to keep only outer two borders */
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-size: 14px;
    padding: 10px;
}

/* Status Badges */
.status-badge {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    gap: 6px;
}

.status-active,
.status-verified,
.status-approved {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-warning,
.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-expired,
.status-inactive,
.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-spacing: 0 10px;
    border-collapse: separate;
}

.admin-table th {
    padding: 15px 20px;
    text-align: left;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table tbody tr {
    background: var(--glass-bg);
    border-radius: 16px;
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--glass-border);
    transform: scale(1.005);
}

.admin-table td {
    padding: 18px 20px;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
}

.admin-table td:first-child {
    border-radius: 16px 0 0 16px;
}

.admin-table td:last-child {
    border-radius: 0 16px 16px 0;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content.glass {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 40px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--panel-shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 800;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #ef4444;
}

/* Preview Grid (for previews inside modals) */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.preview-item span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* Asset Boxes */
.mock-asset-box {
    background: var(--glass-bg);
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 10px;
}

/* Form Layouts inside Modal */
.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.page-header-actions {
    display: flex;
    justify-content: space-between;
}

/* --- RESPONSIVENESS (MEDIA QUERIES) --- */

/* Tablet & Smaller (Max 1024px) */
@media screen and (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }

    .topbar {
        padding: 0 20px;
    }

    .content {
        padding: 25px;
    }

    .search-box {
        width: 300px;
    }

    .search-box input:focus {
        width: 350px;
    }
}

/* Mobile Devices (Max 768px) */
@media screen and (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
        /* Slightly wider for mobile overlay */
        --topbar-height: 60px;
    }

    .sidebar {
        left: calc(-1 * var(--sidebar-width));
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Override collapsed state for mobile to work as a drawer */
    body.sidebar-collapsed .sidebar {
        transform: translateX(0);
        margin-left: 0;
        width: var(--sidebar-width);
    }

    /* Fix sidebar logo on mobile overlay */
    body.sidebar-collapsed .brand-logo {
        width: auto !important;
        opacity: 1 !important;
    }

    body.sidebar-collapsed .main {
        margin-left: 0;
    }

    /* Fixed main margin for mobile */
    .main {
        margin-left: 0 !important;
    }

    /* Global Responsiveness Fixes */
    .premium-table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px; /* Ensure tables don't squash too much */
    }

    .form-row, .grid-2, .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .panel {
        padding: 20px;
        margin-top: 20px;
    }

    .topbar {
        padding: 0 15px;
    }

    .topbar-right {
        gap: 15px;
    }

    
    .topbar {
        position: relative;
        margin-bottom: 65px;
    }

    .search-box {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        display: flex;
        padding: 10px 15px;
        background: var(--bg-topbar);
        border-bottom: 1px solid var(--border-color);
        box-sizing: border-box;
        z-index: 10;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    .search-box input {
        width: 100%;
        padding-left: 36px;
        font-size: 14px;
        background: var(--bg-primary);
        border-radius: 8px;
    }

    .search-key {
        display: none;
    }

    .topbar-logo {
        display: none !important;
    }


    .topbar-logo img {
        height: 100%;
        object-fit: contain;
    }

    .page-title h1 {
        font-size: 24px;
    }

    .cards {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .card {
        padding: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-control {
        padding: 12px 15px;
        font-size: 14px;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 20px;
    }

    .profile-trigger span {
        display: none;
        /* Hide name/role on mobile */
    }

    .modal-content.glass {
        padding: 20px;
        width: 95%;
        border-radius: 20px;
        max-height: 85vh;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: 100%;
    }

    /* Sidebar overlay when open */
    body.sidebar-mobile-active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    body.sidebar-mobile-active .sidebar {
        transform: translateX(var(--sidebar-width));
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}

/* Very Small Devices (Max 480px) */
@media screen and (max-width: 480px) {
    .topbar-right .theme-toggle {
        display: none;
        /* Hide theme toggle on very small screens to save space */
    }

    .page-header-actions {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
/* Custom Checkboxes */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Add slight hover effect */
.custom-checkbox:hover {
    border-color: var(--primary);
}

.dashboard-section-header {
    width: 100%;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; }
.card:nth-child(6) { animation-delay: 0.35s; }
.card:nth-child(7) { animation-delay: 0.4s; }
.card:nth-child(8) { animation-delay: 0.45s; }
.card:nth-child(9) { animation-delay: 0.5s; }

/* Refined typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
}

p {
    line-height: 1.6;
}

/* Premium Table Wrapper */
.premium-table-wrapper {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 10px;
    overflow-x: auto;
    box-shadow: var(--panel-shadow);
}

/* Base Badge Style */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.badge-info {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.2);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Button Refinements */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: inherit;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-outline {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--glass-border);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Filter Panel & Form Controls */
.filters-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: var(--panel-shadow);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 5px;
    margin-bottom: 8px;
    display: inline-block;
}

.form-control {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    width: 100%;
}

.form-control:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.light .form-control:hover:not(:focus) {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.01);
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--bg-sidebar);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

select.form-control {
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

select.form-control option {
    background: #0f1117 !important;
    color: #f8fafc !important;
    padding: 10px !important;
}

.premium-filter {
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 10px 15px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.premium-filter:hover {
    border-color: var(--primary);
    background: var(--glass-bg);
}

.premium-filter:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

select.premium-filter {
    padding-right: 35px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
}

select.premium-filter:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

select.premium-filter option {
    background: #0f1117;
    color: #f8fafc;
}

/* Date Input Specifics */
:root:not(.light) input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ==========================================================================
   PREMIUM REFINEMENTS & ENHANCEMENTS (Added by Antigravity)
   ========================================================================== */

.premium-table-wrapper {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 12px;
    box-shadow: var(--panel-shadow);
    margin-top: 25px;
    animation: premiumSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes premiumSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.premium-table th {
    padding: 16px 24px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.premium-table tbody tr {
    transition: var(--transition);
}

.premium-table tbody tr td {
    padding: 18px 24px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    font-size: 14px;
    color: var(--text-primary);
}

.premium-table tbody tr td:first-child {
    border-left: 1px solid var(--glass-border);
    border-radius: 16px 0 0 16px;
}

.premium-table tbody tr td:last-child {
    border-right: 1px solid var(--glass-border);
    border-radius: 0 16px 16px 0;
}

.premium-table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.25);
}

.premium-table-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

/* Premium Badges Refined */
.badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.25);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.badge-info {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.25);
}

/* Premium Buttons Refined */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn:active::after {
    width: 300%;
    height: 300%;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border: none;
    color: white;
    font-weight: 700;
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.4);
}

/* Panel Refinement */
.panel {
    background: var(--bg-panel);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--panel-shadow);
}

/* Typography Enhancements */
.page-title h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title p {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
}

/* Force solid white backgrounds for search components in light mode for maximum clarity */
.light .search-box input,
.light .search-dropdown {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

/* ── Status Badge ────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-badge.active {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}
.status-badge.active::before { background: #4ade80; }
.status-badge.inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}
.status-badge.inactive::before { background: #f87171; }

/* ── Location Action Buttons ─────────────────────── */
.btn-action {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-action:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}
.btn-action.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}
.action-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Fix dropdown options in dark mode */
select option {
    background-color: var(--bg-body);
    color: var(--text-primary);
}

/* ── Fix: native <select> dropdown renders above sibling panels globally ──
   Chrome/Edge GPU compositing can clip native select popups when a following
   sibling has overflow:hidden + border-radius. Elevating filter containers
   to their own stacking context (z-index) prevents this on all admin pages. */
.filter-row,
.filters-panel,
.filter-bar,
.filter-group-row,
.search-filter-row {
    position: relative;
    z-index: 20;
}

/* Panels and table containers sit below filter rows */
.panel,
.premium-table-container,
.data-table-container {
    position: relative;
    z-index: 1;
}

/* Modals always on top */
.modal {
    z-index: 1000;
}


/* ─────────────────────────────────────────────────────────────────────────────
   LIVE NOTIFICATIONS & TOAST ALERTS SYSTEM
   ────────────────────────────────────────────────────────────────────────── */

/* Bell & Dropdown container */
.notification-bell-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell-btn {
    background: var(--bg-body, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    padding: 0;
}

.notification-bell-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid #05070a;
}

.light .notification-badge {
    border-color: #ffffff;
}

/* Dropdown Menu */
.notification-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #11141e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    overflow: hidden;
    font-family: 'Outfit', 'Poppins', sans-serif;
    animation: searchFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.light .notification-dropdown-menu {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.notification-dropdown-menu.active {
    display: block;
}

.notification-dropdown-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-header strong {
    font-size: 14px;
    color: var(--text-primary);
}

.clear-all-btn {
    background: none;
    border: none;
    color: var(--primary, #6366f1);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.clear-all-btn:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.notification-dropdown-list {
    max-height: 280px;
    overflow-y: auto;
}

.notification-empty-state {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.notification-item {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.04));
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.notification-item:hover {
    background: var(--glass-bg, rgba(255,255,255,0.02));
}

.notification-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.notification-item-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-item-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-item-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
}

.notification-item-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.notification-item-time {
    font-size: 10px;
    color: var(--text-muted);
}

/* Stackable Live Toast Alerts */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.live-toast {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px 20px 16px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s, transform 0.3s;
    color: #1e293b;
    overflow: hidden;
    pointer-events: auto;
}

.light .live-toast {
    background: #ffffff;
    border-color: rgba(0,0,0,0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Dark Mode Toast */
body:not(.light) .live-toast {
    background: #11141e;
    border-color: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.live-toast.success .toast-accent-bar {
    background: #10b981; /* Green */
}
.live-toast.info .toast-accent-bar {
    background: #3b82f6; /* Blue */
}
.live-toast.warning .toast-accent-bar {
    background: #f59e0b; /* Yellow */
}
.live-toast.danger .toast-accent-bar {
    background: #ef4444; /* Red */
}

.toast-accent-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}

.toast-icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.live-toast.success .toast-icon-circle {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.live-toast.info .toast-icon-circle {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.live-toast.warning .toast-icon-circle {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.live-toast.danger .toast-icon-circle {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.toast-body {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    flex-grow: 1;
}

.toast-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toast-close-btn:hover {
    color: var(--text-primary, #0f172a);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.live-toast.fade-out {
    opacity: 0;
    transform: translateX(50px) scale(0.9);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PREMIUM GLASSMORPHIC & ACCENTED STYLING UPGRADES
   ────────────────────────────────────────────────────────────────────────── */

/* Typography Gradient Title Glows */
h1 {
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Slick Cards Interactive Scale & Hover states */
.premium-card, .report-card, .stat-card, .report-stat-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s, box-shadow 0.3s !important;
}
.premium-card:hover, .report-card:hover, .stat-card:hover, .report-stat-card:hover {
    transform: translateY(-4px) scale(1.02) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15), var(--panel-shadow) !important;
}
.light .premium-card:hover, .light .report-card:hover, .light .stat-card:hover, .light .report-stat-card:hover {
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08), 0 8px 32px 0 rgba(31, 38, 135, 0.04) !important;
}

/* Advanced Micro-Animations for Table Rows */
.admin-table tbody tr, table.data-table tbody tr {
    transition: background 0.25s, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.admin-table tbody tr:hover, table.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04) !important;
    transform: scale(1.008) !important;
}
.light .admin-table tbody tr:hover, .light table.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.02) !important;
}

/* Beautiful Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

/* --- BUG FIXES & COMPONENT STYLING IMPROVEMENTS --- */

/* Action Button Icon Size Alignment Fix (Row 14) */
.btn-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}

/* Hide HTML5 Spin Buttons / Number Input Alignment Fix (Row 21) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Global Responsive Tables Fix for iPad Pro and Mobile (Row 19) */
.premium-table-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Global Form Controls & Form Group Styling for Modals (Row 17) */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: var(--bg-body, rgba(0, 0, 0, 0.2));
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Modal Open Background Scroll Locking (Row 20) */
body.modal-open, body:has(.modal.active) {
    overflow: hidden !important;
}

/* Print layout optimizations for Analytics PDF Export (Row 24) */
.pdf-export {
    background: #ffffff !important;
    color: #1e293b !important;
    padding: 20px !important;
}

.pdf-export .panel, 
.pdf-export .card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    color: #1e293b !important;
}

.pdf-export .card p {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: #4f46e5 !important;
}

.pdf-export th {
    color: #64748b !important;
}

.pdf-export td {
    color: #334155 !important;
}

.pdf-export .admin-table tbody tr {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

/* ===== GLOBAL EMPTY STATE (Fixes Bugs 104, 123, 125) ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted);
    width: 100%;
}

.empty-state svg {
    opacity: 0.35;
    color: var(--text-muted);
    flex-shrink: 0;
}

.empty-state p {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.empty-state small {
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.8;
}

/* ===== DARK MODE CALENDAR PICKER ICON FIX (Fixes Bug 109) ===== */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.5);
    cursor: pointer;
}

.light input[type="date"]::-webkit-calendar-picker-indicator,
.light input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.light input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0) opacity(0.6);
}

/* ===== BUG FIX BATCH (Bugs 1, 13, 14, 16, 17, 19) ===== */

/* Bug 1 & 16: Remove underline from .btn anchor elements globally */
a.btn, a.btn-primary, a.btn-outline {
    text-decoration: none !important;
}

/* Bug 13: Fix pagination dropdown (select) display in light mode */
.light .btn-page {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: var(--text-secondary) !important;
}
.light .btn-page:hover:not(:disabled) {
    background: rgba(79, 70, 229, 0.08) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.light .btn-page.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

/* Bug 13: Pagination "per page" select in light mode */
.light select[onchange*="changePerPage"] {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0,0,0,0.15) !important;
    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='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
}

/* Bug 14 & 17: Fix form-control select dropdown color in light mode (theme consistency) */
.light select.form-control {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.light select.form-control option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.light select.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* Bug 17: Module dropdown in Recent Activities - light mode fix */
.light #moduleFilter {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Bug 19: Dropdown arrow icon for filter-select-premium not visible in Dark mode */
body:not(.light) select.filter-select-premium {
    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='%23f8fafc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

/* Bug 19: Fix light mode filter-select-premium arrow visibility */
.light select.filter-select-premium {
    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='%230f172a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0,0,0,0.12) !important;
}

/* ===================================================
   PAGINATION — Global styles (Operations, Tables, etc.)
   =================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 4px 4px;
}

/* Groups the info label + buttons together, pushed to the right */
.pagination-right-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.pagination-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Base page button */
.btn-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    overflow: visible;
    transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
    line-height: 1;
}

.btn-page:hover:not(:disabled):not(.active) {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--primary, #6366f1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.btn-page.active {
    background: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    cursor: default;
    pointer-events: none;
}

.btn-page:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* Prev / Next nav buttons — wider to fit label + icon */
.btn-page-nav {
    min-width: 80px;
    padding: 0 14px;
    gap: 6px;
}
.btn-page-nav svg {
    flex-shrink: 0;
}

/* Ellipsis between page numbers */
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    user-select: none;
}

/* Light-mode overrides */
.light .btn-page {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: var(--text-secondary) !important;
}
.light .btn-page:hover:not(:disabled):not(.active) {
    background: rgba(79, 70, 229, 0.08) !important;
    color: var(--primary, #4f46e5) !important;
    border-color: var(--primary, #4f46e5) !important;
}
.light .btn-page.active {
    background: var(--primary, #4f46e5) !important;
    color: #fff !important;
    border-color: var(--primary, #4f46e5) !important;
}
.light .pagination-info {
    color: #64748b !important;
}
.light .pagination-ellipsis {
    color: #94a3b8 !important;
}


