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

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* White-Blue Glassmorphism Palette */
    --bg-gradient: radial-gradient(circle at 10% 20%, rgba(224, 242, 254, 0.8) 0%, rgba(240, 249, 255, 0.9) 50%, rgba(219, 234, 254, 0.8) 100%);
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-hover: rgba(255, 255, 255, 0.88);
    --glass-bg-card: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.85);
    --glass-border-light: rgba(191, 219, 254, 0.5);
    --glass-shadow: 0 20px 45px -12px rgba(37, 99, 235, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    --glass-shadow-lg: 0 25px 60px -15px rgba(30, 58, 138, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    
    /* Primary White-Blue Accents */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --primary-gradient-glow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    
    --accent-cyan: #0284c7;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    
    /* Alert & Status Colors */
    --success: #10b981;
    --success-bg: rgba(209, 250, 229, 0.8);
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-bg: rgba(254, 226, 226, 0.85);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Ambient Background Floating Glows */
body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

body::before {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.45) 0%, rgba(37, 99, 235, 0.15) 100%);
    top: -80px;
    right: -80px;
    animation: floatOrb 16s ease-in-out infinite alternate;
}

body::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.4) 0%, rgba(14, 165, 233, 0.12) 100%);
    bottom: -100px;
    left: -100px;
    animation: floatOrb 20s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(30px) scale(1.08); }
    100% { transform: translateY(-20px) scale(0.95); }
}

/* Glassmorphism Card Component */
.glass-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-hover:hover {
    background: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow-lg);
    transform: translateY(-2px);
}

/* Glassmorphism Navbar */
.glass-navbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.05);
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    box-shadow: var(--primary-gradient-glow);
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* User Badge in Nav */
.user-nav-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border-light);
    padding: 6px 14px 6px 8px;
    border-radius: 9999px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.user-meta-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-meta-role {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control-glass {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) inset;
}

.form-control-glass:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Buttons */
.btn-glass-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--primary-gradient-glow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glass-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -5px rgba(37, 99, 235, 0.5);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: #fff;
}

.btn-glass-primary:active {
    transform: translateY(0);
}

.btn-glass-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-glass-outline:hover {
    background: #ffffff;
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

/* Authentication Page Wrapper */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: var(--glass-shadow-lg);
    position: relative;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    background: var(--primary-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    box-shadow: var(--primary-gradient-glow);
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Glass Alerts */
.alert-glass-danger {
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Loading Overlay */
#globalLoadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(240, 249, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.25s ease;
}

.loading-spinner-glass {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(37, 99, 235, 0.15);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Glass Toast Container */
#toastContainer {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-glass {
    pointer-events: auto;
    min-width: 300px;
    max-width: 420px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-radius: 14px;
    box-shadow: 0 15px 35px -5px rgba(30, 58, 138, 0.15);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    animation: slideInToast 0.3s ease forwards;
}

.toast-glass.success { border-left: 4px solid var(--success); }
.toast-glass.error { border-left: 4px solid var(--danger); }
.toast-glass.warning { border-left: 4px solid var(--warning); }

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

/* Glass Confirm Modal */
#globalConfirmModal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9997;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-modal-glass {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--glass-shadow-lg);
    text-align: center;
    animation: scaleModal 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.confirm-icon-wrap {
    width: 50px;
    height: 50px;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin: 0 auto 16px;
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.confirm-message {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.btn-confirm-cancel {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-confirm-ok {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: var(--danger);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   Enterprise App Shell & Glassmorphism Sidebar
   ========================================================================== */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.glass-sidebar {
    width: 270px;
    min-width: 270px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: 4px 0 24px -4px rgba(37, 99, 235, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

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

.sidebar-nav-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 14px 12px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-group-title i {
    font-size: 13px;
    color: var(--primary);
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

.sidebar-menu-item:hover {
    color: var(--primary);
    background: rgba(239, 246, 255, 0.85);
    border-color: rgba(191, 219, 254, 0.6);
    transform: translateX(3px);
}

.sidebar-menu-item.active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(239, 246, 255, 0.95);
    border-color: rgba(147, 197, 253, 0.8);
    box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.12);
}

.sidebar-menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3.5px;
    background: var(--primary-gradient);
    border-radius: 0 4px 4px 0;
}

.sidebar-menu-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu-icon {
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.sidebar-menu-item:hover .sidebar-menu-icon,
.sidebar-menu-item.active .sidebar-menu-icon {
    color: var(--primary);
}

.sidebar-sub-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 18px;
    margin-top: 2px;
    margin-bottom: 4px;
    position: relative;
}

.sidebar-sub-menu::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: rgba(203, 213, 225, 0.7);
}

.sidebar-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sidebar-sub-item:hover {
    color: var(--primary);
    background: rgba(239, 246, 255, 0.75);
    border-color: rgba(191, 219, 254, 0.5);
    transform: translateX(3px);
}

.sidebar-sub-item.active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(239, 246, 255, 0.95);
    border-color: rgba(147, 197, 253, 0.8);
}

.sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    background: rgba(255, 255, 255, 0.5);
}

.app-main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* UserMenu Card Grid for Dashboard */
.usermenu-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.usermenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.usermenu-card {
    background: var(--glass-bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--glass-shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.usermenu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-lg);
    border-color: rgba(191, 219, 254, 0.9);
}

.usermenu-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.usermenu-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid rgba(191, 219, 254, 0.6);
}

.usermenu-badge-active {
    font-size: 11px;
    font-weight: 700;
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 3px 8px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.usermenu-subitem-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.7);
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.usermenu-subitem-row:hover {
    background: rgba(239, 246, 255, 0.9);
    border-color: rgba(191, 219, 254, 0.8);
    color: var(--primary);
    transform: translateX(2px);
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsive Enhancements
   ========================================================================== */

/* Toggle and Close Controls */
.btn-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.btn-sidebar-toggle:hover {
    background: #ffffff;
    color: var(--primary);
    transform: scale(1.04);
}

.btn-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(241, 245, 249, 0.8);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sidebar-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.app-content-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* --------------------------------------------------------------------------
   Tablet & Mobile Breakpoint (<= 991px)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .btn-sidebar-toggle {
        display: flex;
    }

    .btn-sidebar-close {
        display: flex;
    }

    .sidebar-backdrop {
        display: block;
    }

    .glass-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        min-width: 280px;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 15px 0 40px rgba(15, 23, 42, 0.22);
    }

    .glass-sidebar.show {
        transform: translateX(0);
    }

    .app-main-layout {
        width: 100%;
        min-width: 0;
    }

    .glass-navbar {
        padding: 12px 18px;
    }

    .user-meta-role {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Mobile Phone Breakpoint (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .app-content-container {
        padding: 16px 12px;
    }

    .glass-navbar {
        padding: 10px 14px;
        gap: 8px;
    }

    .user-nav-badge {
        padding: 4px 8px;
        gap: 8px;
    }

    .user-meta-name {
        max-width: 95px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
    }

    .hero-card-responsive {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 20px 18px !important;
        gap: 16px !important;
    }

    .hero-actions-responsive {
        width: 100%;
    }

    .hero-actions-responsive .btn-glass-outline {
        width: 100%;
        justify-content: center;
    }

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

    .usermenu-card {
        padding: 18px 16px;
    }

    .usermenu-header-responsive {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .auth-container {
        padding: 16px 12px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 18px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    #toastContainer {
        top: 12px;
        left: 12px;
        right: 12px;
    }

    .toast-glass {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .confirm-modal-glass {
        max-width: min(400px, 92vw);
        padding: 22px 18px;
    }
}

/* --------------------------------------------------------------------------
   Small Mobile Phone Breakpoint (<= 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .nav-platform-title,
    .nav-platform-separator {
        display: none !important;
    }

    .btn-logout-text {
        display: none;
    }

    .btn-logout-responsive {
        padding: 8px 10px !important;
    }

    .user-meta-name {
        max-width: 75px;
    }

    .auth-card {
        padding: 24px 16px;
    }
}

/* --------------------------------------------------------------------------
   Branch Context Switcher (Navbar)
   -------------------------------------------------------------------------- */
.branch-switcher-dropdown {
    position: relative;
}

.btn-branch-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 6px 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-branch-switcher:hover {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.branch-icon-pin {
    font-size: 15px;
    color: var(--primary);
}

.branch-switcher-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.branch-switcher-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.branch-switcher-selected {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.branch-chevron-icon {
    font-size: 11px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.branch-switcher-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    max-height: 380px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    z-index: 1050;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.branch-switcher-menu.show {
    display: flex;
    flex-direction: column;
}

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

.branch-switcher-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(248, 250, 252, 0.7);
}

.branch-switcher-count {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
}

.branch-switcher-items {
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.branch-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.branch-select-option:hover {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.15);
}

.branch-select-option.active {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.25);
}

.branch-option-info {
    min-width: 0;
    flex: 1;
}

.branch-option-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.branch-option-default {
    color: #eab308;
    font-size: 11px;
}

.branch-option-type {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.branch-option-check {
    color: var(--primary);
    font-size: 16px;
    margin-left: 8px;
}

.branch-single-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Branch Catalog Page Styles
   -------------------------------------------------------------------------- */
.page-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary);
}

.page-header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.page-header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-primary-glass {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.btn-primary-glass:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* Context Indicator Card */
.context-indicator-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.8) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-left: 4px solid var(--primary);
    flex-wrap: wrap;
    gap: 12px;
}

.context-indicator-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.context-indicator-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.context-indicator-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.context-indicator-value {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.context-branch-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.badge-type-pill {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 9999px;
}

.badge-default-pill {
    font-size: 10.5px;
    font-weight: 700;
    background: rgba(234, 179, 8, 0.15);
    color: #b45309;
    padding: 2px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.context-help-text {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Filter Card */
.filter-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.filter-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.85);
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.filter-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.filter-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    border-color: var(--primary);
    background: #ffffff;
}

/* Table styles */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.glass-table th {
    background: rgba(248, 250, 252, 0.85);
    padding: 14px 18px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    white-space: nowrap;
}

.glass-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(241, 245, 249, 0.9);
    color: var(--text-secondary);
    vertical-align: middle;
}

.glass-table tbody tr {
    transition: background-color 0.15s ease;
}

.glass-table tbody tr:hover {
    background-color: rgba(239, 246, 255, 0.45);
}

.glass-table tbody tr.row-active-context {
    background-color: rgba(239, 246, 255, 0.7);
}

.branch-cell-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.branch-main-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.active-context-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.branch-sub-display {
    font-size: 12px;
    color: var(--text-muted);
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-hq {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-store {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-wh {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-branch {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.branch-contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12.5px;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.contact-line i {
    color: var(--text-muted);
    font-size: 13px;
}

.branch-hours-info {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.badge-count-users {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(241, 245, 249, 0.9);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(203, 213, 225, 0.6);
}

.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
}

.btn-action-select {
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(37, 99, 235, 0.06);
}

.btn-action-select:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-action-edit {
    color: var(--text-secondary);
    border-color: rgba(203, 213, 225, 0.8);
}

.btn-action-edit:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-action-deactivate {
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.06);
}

.btn-action-deactivate:hover {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
}

.btn-action-activate {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.06);
}

.btn-action-activate:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.empty-state-cell {
    padding: 60px 20px !important;
    text-align: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.empty-icon {
    font-size: 40px;
    color: var(--text-muted);
}

.empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.empty-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Glassmorphism Modal
   -------------------------------------------------------------------------- */
.glass-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.glass-modal-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    border-radius: 18px;
    width: 100%;
    max-width: 540px;
    overflow: hidden;
    animation: zoomInModal 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.glass-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(248, 250, 252, 0.7);
}

.glass-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.15s ease;
}

.btn-modal-close:hover {
    background: rgba(241, 245, 249, 0.9);
    color: var(--text-primary);
}

.glass-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-section-title {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--primary);
    padding: 6px 0 3px;
    border-bottom: 1px dashed rgba(203, 213, 225, 0.8);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group-glass {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label-glass {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control-glass {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.9);
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.form-control-glass:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.font-12 {
    font-size: 12px;
}

.glass-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(248, 250, 252, 0.7);
}

.btn-cancel-glass {
    padding: 9px 18px;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancel-glass:hover {
    background: rgba(241, 245, 249, 0.9);
    color: var(--text-primary);
}

.btn-submit-glass {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.15s ease;
}

.btn-submit-glass:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* --------------------------------------------------------------------------
   Responsive for Branch Catalog & Switcher
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .page-header-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-header-actions {
        width: 100%;
    }
    .btn-primary-glass {
        width: 100%;
        justify-content: center;
    }
    .filter-card {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-select-wrap {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .filter-select {
        flex: 1 1 140px;
    }
    .filter-select-wrap .btn-primary-glass {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    .branch-switcher-selected {
        max-width: 90px;
    }
}

@media (max-width: 480px) {
    .branch-switcher-text {
        display: none;
    }
    .btn-branch-switcher {
        padding: 8px 10px;
    }
    .branch-switcher-menu {
        width: calc(100vw - 24px);
        right: -60px;
    }
}