/* if you want similar website or tool contact @coderxknight */
:root {
    
    --bg-base:        #060709;
    --bg-surface:     rgba(12, 13, 17, 0.72);
    --bg-elevated:    rgba(17, 19, 24, 0.85);

    
    --accent-rgb: 212, 175, 55;

    
    --gold-100:  #fef9e7;
    --gold-200:  #fdeea8;
    --gold-300:  #f5d96b;
    --gold-400:  #e8c040;
    --gold-500:  #d4af37;   
    --gold-600:  #b8941e;
    --gold-700:  #96750f;
    --gold-glow: rgba(212, 175, 55, 0.18);
    --gold-glow-strong: rgba(212, 175, 55, 0.35);

    
    --grad-gold:    linear-gradient(135deg, #fdeea8 0%, #d4af37 55%, #96750f 100%);
    --grad-gold-h:  linear-gradient(90deg,  #fdeea8 0%, #d4af37 55%, #96750f 100%);
    --grad-text:    linear-gradient(135deg, #ffffff 20%, #f5d96b 60%, #d4af37 100%);

    
    --card-bg:     transparent;
    --card-border: rgba(212, 175, 55, 0.1);
    --card-border-hover: rgba(212, 175, 55, 0.28);
    --card-shadow: 0 24px 64px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.06);

    
    --text-white:  #f8f9fa;
    --text-dim:    #9ca3af;
    --text-faint:  #6b7280;

    
    --green:  #22c55e;
    --red:    #ef4444;
    --red-bg: rgba(239,68,68,0.08);

    
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);

    
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'Courier New', monospace;

    
    --btn-text-color: #000;
    --orb-color-1: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
    --orb-color-2: radial-gradient(circle, rgba(184,148,30,0.09) 0%, transparent 70%);
    --orb-color-3: radial-gradient(circle, rgba(212,175,55,0.07) 0%, transparent 70%);
    --orb-color-4: radial-gradient(circle, rgba(150,117,15,0.08) 0%, transparent 70%);
}


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.28);
    border: 2px solid var(--bg-base);
    border-radius: 99px;
    transition: background 0.3s var(--ease);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-rgb), 0.6);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.28) var(--bg-base);
}



body, header {
    transition: background-color 0.4s ease, color 0.4s ease;
}
.card, .app-container, .system-frame, .staff-pane-card, .metric-card, .staff-header-card {
    transition: background 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}
.logo-text, .logo-mark {
    transition: color 0.4s ease;
}
input, textarea, label, table, th, td {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}



body[data-theme="pink"] {
    --accent-rgb: 223, 73, 115;
    --gold-100: #fff0f2;
    --gold-200: #ffd6dd;
    --gold-300: #e5a5b2;   
    --gold-400: #ea7994;
    --gold-500: #df4973;   
    --gold-600: #bc315c;   
    --gold-700: #931e42;
    --gold-glow: rgba(223, 73, 115, 0.18);
    --gold-glow-strong: rgba(223, 73, 115, 0.35);

    --grad-gold: linear-gradient(135deg, #e5a5b2 0%, #df4973 55%, #bc315c 100%);
    --grad-gold-h: linear-gradient(90deg, #e5a5b2 0%, #df4973 55%, #bc315c 100%);
    --grad-text: linear-gradient(135deg, #ffffff 20%, #e5a5b2 60%, #df4973 100%);

    --card-border: rgba(223, 73, 115, 0.15);
    --card-border-hover: rgba(223, 73, 115, 0.35);

    --btn-text-color: #fff;
    --orb-color-1: radial-gradient(circle, rgba(223,73,115,0.12) 0%, transparent 70%);
    --orb-color-2: radial-gradient(circle, rgba(188,49,92,0.09) 0%, transparent 70%);
    --orb-color-3: radial-gradient(circle, rgba(223,73,115,0.07) 0%, transparent 70%);
    --orb-color-4: radial-gradient(circle, rgba(188,49,92,0.08) 0%, transparent 70%);
}



body[data-theme="red"] {
    --accent-rgb: 229, 9, 20;
    --bg-base: rgba(0, 0, 0, 0.72);
    --bg-surface: rgba(0, 0, 0, 0.72);
    --bg-elevated: rgba(30, 30, 30, 0.85);

    --gold-100: #ffccd0;
    --gold-200: #ff99a1;
    --gold-300: #ff6673;
    --gold-400: #ff3344;
    --gold-500: #e50914;   
    --gold-600: #b80710;   
    --gold-700: #94050a;   
    --gold-glow: rgba(229, 9, 20, 0.18);
    --gold-glow-strong: rgba(229, 9, 20, 0.35);

    --grad-gold: linear-gradient(135deg, #ff99a1 0%, #e50914 55%, #94050a 100%);
    --grad-gold-h: linear-gradient(90deg, #ff99a1 0%, #e50914 55%, #94050a 100%);
    --grad-text: linear-gradient(135deg, #ffffff 20%, #ffccd0 60%, #e50914 100%);

    --card-border: rgba(229, 9, 20, 0.18);
    --card-border-hover: rgba(229, 9, 20, 0.4);

    --btn-text-color: #fff;
    --orb-color-1: radial-gradient(circle, rgba(229,9,20,0.12) 0%, transparent 70%);
    --orb-color-2: radial-gradient(circle, rgba(184,7,16,0.09) 0%, transparent 70%);
    --orb-color-3: radial-gradient(circle, rgba(229,9,20,0.07) 0%, transparent 70%);
    --orb-color-4: radial-gradient(circle, rgba(148,5,10,0.08) 0%, transparent 70%);

    
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.88) 100%), url('nf bg.jpg') center/cover no-repeat fixed !important;
}


body[data-theme="red"] #neural-canvas,
body[data-theme="red"] .particles,
body[data-theme="red"] .bg-mesh,
body[data-theme="red"] .grid-overlay {
    display: none !important;
}


body[data-theme="red"] .logo-text {
    color: #e50914 !important;
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

body[data-theme="red"] .logo-mark {
    color: #e50914 !important;
    filter: drop-shadow(0 0 8px rgba(229, 9, 20, 0.5)) !important;
}

body[data-theme="red"] .logo-dot {
    color: #e50914 !important;
}


body[data-theme="black"] {
    --accent-rgb: 163, 163, 163;
    --bg-base: #000000;
    --bg-surface: rgba(5, 5, 5, 0.72);
    --bg-elevated: rgba(10, 10, 10, 0.85);

    --gold-100: #ffffff;
    --gold-200: #e5e5e5;
    --gold-300: #cccccc;
    --gold-400: #a3a3a3;
    --gold-500: #737373;   
    --gold-600: #525252;
    --gold-700: #404040;
    --gold-glow: rgba(255, 255, 255, 0.08);
    --gold-glow-strong: rgba(255, 255, 255, 0.18);

    --grad-gold: linear-gradient(135deg, #ffffff 0%, #737373 55%, #404040 100%);
    --grad-gold-h: linear-gradient(90deg, #ffffff 0%, #737373 55%, #404040 100%);
    --grad-text: linear-gradient(135deg, #ffffff 20%, #cccccc 60%, #737373 100%);

    --card-border: rgba(255, 255, 255, 0.1);
    --card-border-hover: rgba(255, 255, 255, 0.25);

    --btn-text-color: #fff;
    --orb-color-1: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    --orb-color-2: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    --orb-color-3: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 70%);
    --orb-color-4: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
}


.theme-selector-container {
    position: relative;
    z-index: 1000;
}
.theme-selector-container.open {
    z-index: 1002 !important;
}

.theme-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.25s var(--ease);
    outline: none;
}

.theme-selector-btn:hover {
    background: var(--gold-glow);
    border-color: var(--gold-500);
    color: #fff;
    box-shadow: 0 0 16px var(--gold-glow);
    transform: translateY(-1px);
}

.theme-selector-btn svg {
    flex-shrink: 0;
    transition: transform 0.25s var(--ease);
}

.theme-selector-btn .chevron-icon {
    opacity: 0.6;
}

.theme-selector-container.open .theme-selector-btn {
    background: var(--gold-glow-strong);
    border-color: var(--gold-500);
    color: #fff;
    box-shadow: 0 0 20px var(--gold-glow-strong);
}

.theme-selector-container.open .chevron-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 160px;
    background: rgba(15, 15, 17, 0.88);
    border: 1.5px solid var(--card-border-hover);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px var(--gold-glow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-selector-container.open .theme-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.theme-option {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all 0.2s;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.theme-option.active {
    background: var(--gold-glow-strong);
    color: #fff;
    font-weight: 600;
}

.theme-color-preview {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}


*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html { overflow-x: hidden; } 

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}




#neural-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}


.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);          
    opacity: 0;
    animation: orb-appear 2s var(--ease) forwards;
    will-change: transform;      
    
}

.mesh-orb-1 {
    width: 700px;
    height: 700px;
    top: -250px;
    left: -150px;
    background: var(--orb-color-1);
    animation: orb-appear 2s var(--ease) forwards, orb-float-1 18s ease-in-out 2s infinite;
}

.mesh-orb-2 {
    width: 600px;
    height: 600px;
    top: 30%;
    right: -200px;
    background: var(--orb-color-2);
    animation: orb-appear 2.5s var(--ease) 0.3s forwards, orb-float-2 22s ease-in-out 2s infinite;
}

.mesh-orb-3 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    left: 30%;
    background: var(--orb-color-3);
    animation: orb-appear 3s var(--ease) 0.6s forwards, orb-float-3 20s ease-in-out 2s infinite;
}

.mesh-orb-4 {
    width: 400px;
    height: 400px;
    top: 60%;
    left: -100px;
    background: var(--orb-color-4);
    animation: orb-appear 3.5s var(--ease) 0.9s forwards, orb-float-1 25s ease-in-out 2s infinite reverse;
}

@keyframes orb-appear {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes orb-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(40px, -60px) scale(1.08); }
    66%  { transform: translate(-30px, 40px) scale(0.95); }
}
@keyframes orb-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-50px, 30px) scale(1.1); }
}
@keyframes orb-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    40%  { transform: translate(30px, -40px) scale(0.92); }
    80%  { transform: translate(-20px, 20px) scale(1.06); }
}


.particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--gold-500);
    opacity: 0;
    animation: particle-rise linear infinite;
    will-change: transform, opacity; 
    contain: strict;                 
}

@keyframes particle-rise {
    0%   { opacity: 0; transform: translateY(0) scale(1); }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.2; }
    100% { opacity: 0; transform: translateY(-100vh) scale(0.5); }
}


.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(212,175,55,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,175,55,0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}


.main-header {
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    animation: fade-down 0.8s var(--ease) both;
}

@keyframes fade-down {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
}

.logo-mark {
    width: 34px;
    height: 34px;
    color: var(--gold-500);
    filter: drop-shadow(0 0 8px rgba(212,175,55,0.4));
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(212,175,55,0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(212,175,55,0.7)); }
}

.logo-mark.small {
    width: 22px;
    height: 22px;
}

.logo-text {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    display: inline-block;
    vertical-align: middle;
}

.logo-dot {
    color: var(--gold-500);
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.18);
    padding: 7px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: #86efac;
    letter-spacing: 0.5px;
}

.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: blink 2s ease-in-out infinite;
}

.status-indicator.small {
    width: 5px;
    height: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}


.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}


.hamburger-container {
    position: relative;
    display: inline-block;
}

.hamburger-btn {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    color: var(--gold-400);
    padding: 9px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
}

.hamburger-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: all 0.25s var(--ease);
}

.hamburger-btn:hover {
    background: var(--gold-glow);
    border-color: var(--gold-500);
    color: #fff;
    box-shadow: 0 0 12px var(--gold-glow);
}

@keyframes goldGlowPulse {
    0% {
        box-shadow: 0 0 4px rgba(212, 175, 55, 0.4), inset 0 0 2px rgba(212, 175, 55, 0.2);
        border-color: rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 0 16px rgba(212, 175, 55, 0.8), inset 0 0 8px rgba(212, 175, 55, 0.4);
        border-color: rgba(212, 175, 55, 0.95);
    }
    100% {
        box-shadow: 0 0 4px rgba(212, 175, 55, 0.4), inset 0 0 2px rgba(212, 175, 55, 0.2);
        border-color: rgba(212, 175, 55, 0.5);
    }
}

.hamburger-btn.glow-pulse {
    animation: goldGlowPulse 2s infinite ease-in-out;
    border: 1.5px solid rgba(212, 175, 55, 0.7) !important;
}

.hamburger-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(15, 15, 17, 0.95) !important;
    border: 1.5px solid var(--card-border-hover) !important;
    border-radius: 16px;
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 12px;
    min-width: 260px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--gold-glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
}

.hamburger-container.open .hamburger-dropdown {
    display: flex;
}


.hamburger-dropdown .lang-selector-container,
.hamburger-dropdown .theme-selector-container {
    width: 100%;
}

.hamburger-dropdown .lang-selector-btn,
.hamburger-dropdown .theme-selector-btn {
    width: 100%;
    display: inline-flex;
    justify-content: space-between;
}


.hamburger-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #f87171;
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.25s var(--ease);
    outline: none;
    width: 100%;
}

.hamburger-logout-btn:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fff;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.18);
    transform: translateY(-1px);
}

.hamburger-logout-btn svg {
    flex-shrink: 0;
}


.hamburger-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.25s var(--ease);
    outline: none;
    width: 100%;
}

.hamburger-menu-btn:hover {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: #fff;
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.18);
    transform: translateY(-1px);
}

.hamburger-menu-btn svg {
    flex-shrink: 0;
}

.nav-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.25);
    color: var(--gold-400);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.25s var(--ease);
}

.nav-login-btn:hover {
    background: var(--grad-gold);
    border-color: transparent;
    color: #000;
    box-shadow: 0 4px 20px rgba(212,175,55,0.3);
    transform: translateY(-1px);
}


.btn-login-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--grad-gold);
    color: #000;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 28px rgba(212,175,55,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.28s var(--ease);
    position: relative;
    overflow: hidden;
}

.btn-login-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-login-hero:hover::before { opacity: 1; }

.btn-login-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(212,175,55,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-login-hero:active { transform: translateY(0); }


.bottom-cta {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 80px 32px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.bottom-cta-inner {
    position: relative;
    width: 100%;
    max-width: 680px;
    text-align: center;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 32px;
    padding: 60px 48px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
}

.bottom-cta-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212,175,55,0.08) 0%, transparent 70%);
    pointer-events: none;
}


.cta-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
    filter: blur(60px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    animation: orb-float-1 12s ease-in-out infinite;
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(212,175,55,0.7);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.cta-title {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1.5px;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
}

.cta-desc {
    font-size: 15px;
    color: var(--text-dim);
    line-height: 1.65;
    max-width: 480px;
    margin: 0 auto 36px;
}

.cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.cta-main-btn {
    font-size: 16px;
    padding: 16px 32px;
}

.cta-secondary-btn {
    font-size: 14px;
    padding: 14px 24px;
}


.cta-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 28px;
}

.cta-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 32px;
}

.cta-stat-num {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-stat-label {
    font-size: 11.5px;
    color: var(--text-faint);
    letter-spacing: 0.3px;
}

.cta-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.07);
    flex-shrink: 0;
}


.ticker-ribbon {
    position: relative;
    z-index: 10;
    width: 100%;
    overflow: hidden;
    border-top: 1px solid rgba(212,175,55,0.08);
    border-bottom: 1px solid rgba(212,175,55,0.08);
    background: rgba(212,175,55,0.025);
    display: flex;
    align-items: center;
    padding: 0;
    animation: fade-in 1s var(--ease) 0.4s both;
}


.ticker-label {
    flex-shrink: 0;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #000;
    background: var(--grad-gold-h);
    padding: 9px 16px;
    white-space: nowrap;
    border-right: 1px solid rgba(212,175,55,0.2);
    z-index: 1;
}


.ticker-track {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: ticker-scroll 55s linear infinite;
    width: max-content;
    padding: 9px 0;
}

.ticker-ribbon.ticker-reverse .ticker-track {
    animation-direction: reverse;
    animation-duration: 50s;
}


.ticker-item {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(240, 220, 150, 0.75);
    padding: 0 6px;
    white-space: nowrap;
    transition: color 0.3s;
}

.ticker-item:hover {
    color: var(--gold-300);
}


.ticker-rating {
    font-size: 9px;
    color: rgba(212,175,55,0.45);
    margin-left: 2px;
    vertical-align: middle;
}


.ticker-year {
    font-size: 9.5px;
    color: rgba(212,175,55,0.35);
    margin-left: 3px;
    font-family: var(--mono);
}


.ticker-sep {
    color: rgba(212,175,55,0.2);
    font-size: 7px;
    padding: 0 14px;
    flex-shrink: 0;
}


.ticker-skeleton {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: rgba(212,175,55,0.25);
    padding: 0 24px;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.7; }
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}


.portal-layout {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 40px 24px;
    animation: fade-in 1s var(--ease) 0.2s both;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}


.branding-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.eyebrow-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 2.5px;
    color: rgba(212,175,55,0.7);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-500);
    box-shadow: 0 0 8px var(--gold-500);
    animation: blink 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-title {
    font-size: 54px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -2px;
    color: #fff;
    margin-bottom: 22px;
}

.gradient-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 480px;
    margin-bottom: 32px;
}


.hero-cta-row {
    display: flex;
    gap: 14px;
    margin-bottom: 52px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(212,175,55,0.22);
    color: var(--gold-500);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s var(--ease);
}

.btn-ghost svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }

.btn-ghost:hover {
    background: rgba(212,175,55,0.08);
    border-color: var(--gold-500);
    box-shadow: 0 4px 20px rgba(212,175,55,0.12);
}

.btn-ghost:hover svg { transform: translateY(3px); }

.login-card-footer-cta {
    display: flex;
    justify-content: center;
    width: 100%;
}


.feature-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 40px;
    margin-top: 20px;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid rgba(212,175,55,0.2);
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212,175,55,0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-item:hover::before { opacity: 1; }

.feature-item:hover {
    background: rgba(212,175,55,0.05);
    border-color: rgba(212,175,55,0.25);
    border-left-color: var(--gold-500);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,175,55,0.08);
}

.feature-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-500);
    transition: all 0.3s var(--ease);
}

.feature-item:hover .feature-icon {
    background: rgba(212,175,55,0.22);
    box-shadow: 0 0 20px rgba(212,175,55,0.3);
    transform: scale(1.1);
}

.feature-icon svg { width: 22px; height: 22px; }

.feature-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: -0.1px;
}

.feature-info p {
    font-size: 12.5px;
    color: var(--text-faint);
    line-height: 1.5;
}


.form-section {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.system-frame {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 35px 80px rgba(0,0,0,0.65), 0 0 50px rgba(var(--accent-rgb), 0.03);
    animation: card-appear 1.2s var(--ease) 0.1s both;
    transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

@keyframes card-appear {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.frame-header {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
    padding: 12px 16px;
}

.frame-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red    { background: #ff5f57; box-shadow: 0 0 6px rgba(255,95,87,0.5); }
.dot-yellow { background: #febc2e; box-shadow: 0 0 6px rgba(254,188,46,0.5); }
.dot-green  { background: #28c840; box-shadow: 0 0 6px rgba(40,200,64,0.5); }

.frame-address {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 7px;
    padding: 5px 12px;
    font-family: var(--mono);
    font-size: 10.5px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lock-icon {
    width: 11px;
    height: 11px;
    color: var(--green);
    flex-shrink: 0;
}

.frame-badge {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--gold-400);
    opacity: 0.8;
    flex-shrink: 0;
}


.app-container {
    background: var(--bg-surface);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    padding: 2px;
    transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}


.card {
    display: none;               
    padding: 36px;
}

.card.active {
    display: block;
    animation: fade-in-card 0.4s var(--ease) both; 
}

@keyframes fade-in-card {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.glass-card {
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(212,175,55,0.06) 0%, transparent 70%);
    pointer-events: none;
}


.text-center { text-align: center; }

.loading-ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
}

.loading-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(212,175,55,0.1);
    border-top-color: var(--gold-500);
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    position: absolute;
    inset: 0;
    box-shadow: 0 0 20px rgba(212,175,55,0.15);
}

.ring-inner {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px solid rgba(212,175,55,0.06);
    border-bottom-color: rgba(212,175,55,0.3);
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

.loading-icon-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-500);
}

.loading-icon-center svg {
    width: 26px;
    height: 26px;
    animation: icon-throb 2s ease-in-out infinite;
}

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

@keyframes icon-throb {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50%  { opacity: 1; transform: scale(1.05); }
}


.progress-bar-wrap {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.progress-bar-track {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--grad-gold-h);
    border-radius: 100px;
    animation: progress-anim 2.5s var(--ease) infinite;
    width: 0%;
}

@keyframes progress-anim {
    0%   { width: 0%; margin-left: 0; }
    50%  { width: 60%; margin-left: 20%; }
    100% { width: 0%; margin-left: 100%; }
}

.progress-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text-faint);
    text-transform: uppercase;
}


.card-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-title {
    background: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 24px;
}


.lock-badge {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.16);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 24px rgba(239,68,68,0.12);
    animation: lock-pulse 3s ease-in-out infinite;
}

@keyframes lock-pulse {
    0%, 100% { box-shadow: 0 0 24px rgba(239,68,68,0.12); }
    50%  { box-shadow: 0 0 36px rgba(239,68,68,0.22); }
}

.lock-badge svg { width: 28px; height: 28px; }


.portal-badge {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.16);
    color: var(--gold-500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 24px rgba(212,175,55,0.12);
    animation: portal-pulse 3s ease-in-out infinite;
}

@keyframes portal-pulse {
    0%, 100% { box-shadow: 0 0 24px rgba(212,175,55,0.12); }
    50%  { box-shadow: 0 0 36px rgba(212,175,55,0.25); }
}

.portal-badge svg { width: 28px; height: 28px; }


.login-box { margin-bottom: 20px; }

.field-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
}

label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-faint);
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-faint);
    pointer-events: none;
    transition: color 0.2s;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"] {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    padding: 14px 16px 14px 42px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    transition: all 0.3s var(--ease);
    outline: none;
}

input[type="email"]:hover,
input[type="password"]:hover,
input[type="text"]:hover,
input[type="number"]:hover {
    border-color: rgba(var(--accent-rgb), 0.25);
    background: rgba(255,255,255,0.05);
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="number"]:focus {
    border-color: var(--gold-500);
    background: rgba(var(--accent-rgb), 0.04);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15), 0 0 25px rgba(var(--accent-rgb), 0.08);
}

input[type="email"]:focus ~ .input-icon,
input[type="password"]:focus ~ .input-icon,
input[type="text"]:focus ~ .input-icon,
input[type="number"]:focus ~ .input-icon {
    color: var(--gold-500);
    transform: translateY(-50%) scale(1.15);
}

.input-wrap:has(input:focus) .input-icon {
    color: var(--gold-500);
    transform: translateY(-50%) scale(1.15);
}

input::placeholder { color: rgba(255,255,255,0.22); }


.alert-error {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #fca5a5;
    background: var(--red-bg);
    border: 1px solid rgba(239,68,68,0.18);
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 10px;
    animation: shake 0.4s ease;
}

.alert-error svg { width: 14px; height: 14px; flex-shrink: 0; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}


.quick-guide {
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 16px;
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
}

.guide-header svg { width: 14px; height: 14px; flex-shrink: 0; }

.guide-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guide-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.4;
}

.guide-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(212,175,55,0.12);
    border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold-400);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.15);
    color: var(--gold-500);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg { width: 19px; height: 19px; }

.user-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.role-tag {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--gold-400);
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--text-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
}

.btn-icon:hover { background: rgba(255,255,255,0.07); color: #fff; }
.btn-icon svg { width: 16px; height: 16px; }


.tabs-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tab-bar {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(var(--accent-rgb), 0.12);
    border-radius: 14px;
    padding: 5px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    padding: 20px 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--font);
    transition: all 0.25s var(--ease);
    opacity: 1;
    position: relative;
    flex: 1 1 50%;
    min-width: 0;
}

.tab-btn svg { 
    width: 24px; 
    height: 24px; 
    opacity: 0.8; 
    stroke: currentColor;
    transition: all 0.25s var(--ease); 
}

.tab-btn:hover:not(.disabled) { 
    color: #fff; 
    background: rgba(var(--accent-rgb), 0.08); 
    border-color: rgba(var(--accent-rgb), 0.2);
}
.tab-btn:hover:not(.disabled) svg { 
    opacity: 1; 
}

.tab-btn.active {
    background: rgba(var(--accent-rgb), 0.18) !important;
    border: 1px solid var(--gold-500) !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.15);
    opacity: 1 !important;
}

.tab-btn.active svg { 
    opacity: 1; 
    stroke: var(--gold-300);
}

.tab-btn.disabled {
    opacity: 0.15;
    cursor: not-allowed;
    pointer-events: none;
}


.tab-bar:has(.tab-btn.active) .tab-btn:not(.active) {
    opacity: 0.65;
    color: var(--gold-400);
}
.tab-bar:has(.tab-btn.active) .tab-btn:not(.active) svg {
    opacity: 0.8;
}


.btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    transition: all 0.25s var(--ease);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gold-500) !important;
    background-image: none !important;
    color: var(--btn-text-color, #000);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.2);
}

.btn-primary::before {
    display: none !important;
}

.btn-primary:hover:not(:disabled) {
    background: var(--gold-600) !important;
    background-image: none !important;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.35), 0 0 15px rgba(var(--accent-rgb), 0.15);
}

.btn-primary:active:not(:disabled) { transform: translateY(0) scale(1); }

.btn-secondary {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-white);
    transition: all 0.25s var(--ease);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.06);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-1.5px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active:not(:disabled) { transform: translateY(0) scale(1); }

.btn:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-sm { padding: 10px 16px; font-size: 12px; border-radius: 9px; }

.btn-arrow { width: 16px; height: 16px; transition: transform 0.2s var(--ease); flex-shrink: 0; }
.btn:hover:not(:disabled) .btn-arrow { transform: translateX(3px); }
.btn:disabled .btn-arrow { display: none; }

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-secondary .btn-spinner {
    border-color: rgba(255,255,255,0.1);
    border-top-color: #fff;
}


.results-section {
    background: rgba(255,255,255,0.015);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 18px;
    animation: slide-up 0.4s var(--ease);
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.results-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.results-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gold-400);
}

.time-chip {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--text-faint);
    background: rgba(255,255,255,0.03);
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.05);
}

.result-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    animation: slide-up 0.35s var(--ease);
}

.result-card:last-child { margin-bottom: 0; }

.result-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-faint);
    margin-bottom: 10px;
}

.code-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-value {
    font-family: var(--mono);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 5px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,255,255,0.15);
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.copy-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(212,175,55,0.1);
    border-color: rgba(212,175,55,0.25);
    color: var(--gold-500);
}

.copy-btn svg { width: 15px; height: 15px; }
.icon-check { color: var(--green); }

.link-display {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--gold-400);
    word-break: break-all;
    line-height: 1.5;
    margin-bottom: 10px;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--text-faint);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.meta-row b { color: var(--text-dim); }


.fetch-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.14);
    border-radius: 14px;
    padding: 16px;
    color: #fca5a5;
    animation: slide-up 0.35s var(--ease);
}

.fetch-error svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.fetch-error h4 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.fetch-error p { font-size: 12px; line-height: 1.45; opacity: 0.8; }


.procedures-section {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 80px 32px 60px;
    border-top: 1px solid rgba(212,175,55,0.06);
}

.procedures-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(212,175,55,0.6);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-title {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -1.5px;
    color: #fff;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.65;
}

.procedure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.proc-card {
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(212,175,55,0.1);
    background: rgba(255,255,255,0.022);
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease);
}

.proc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(212,175,55,0.05) 0%, transparent 70%);
}

.proc-card:hover {
    border-color: rgba(212,175,55,0.25);
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 40px rgba(212,175,55,0.05);
}

.proc-tag {
    position: absolute;
    top: 24px;
    right: 24px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold-400);
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.15);
    padding: 4px 10px;
    border-radius: 100px;
}

.proc-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.15);
    color: var(--gold-500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s var(--ease);
}

.proc-card:hover .proc-icon {
    background: rgba(212,175,55,0.15);
    box-shadow: 0 0 20px rgba(212,175,55,0.2);
}

.proc-icon svg { width: 22px; height: 22px; }

.proc-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.2;
}

.proc-desc {
    font-size: 13px;
    color: var(--text-faint);
    margin-bottom: 28px;
    line-height: 1.5;
}

.proc-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.proc-steps li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.step-bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(212,175,55,0.1);
    border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold-400);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--mono);
    transition: all 0.3s var(--ease);
}

.proc-steps li:hover .step-bubble {
    background: rgba(212,175,55,0.2);
    box-shadow: 0 0 12px rgba(212,175,55,0.2);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.step-content strong {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.step-content span {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.45;
}

.step-content em {
    color: var(--gold-400);
    font-style: normal;
    font-weight: 600;
}


.main-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    padding: 32px;
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.6);
}

.footer-logo svg { color: var(--gold-500); }

.footer-text {
    font-size: 12px;
    color: var(--text-faint);
    letter-spacing: 0.3px;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #86efac;
}


.footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-divider {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.footer-made-by {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    background: rgba(212,175,55,0.07);
    border: 1px solid rgba(212,175,55,0.18);
    border-radius: 100px;
    padding: 5px 14px 5px 10px;
    font-size: 12px;
    color: var(--gold-400);
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.25s var(--ease);
    white-space: nowrap;
}

.footer-made-by:hover {
    background: rgba(212,175,55,0.14);
    border-color: var(--gold-500);
    color: var(--gold-300);
    box-shadow: 0 0 16px rgba(212,175,55,0.15);
    transform: translateY(-1px);
}

.footer-made-by strong {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--gold-300);
}

.footer-made-by:hover strong {
    color: #fff;
}

.tg-icon {
    width: 15px;
    height: 15px;
    color: #54a9eb;
    flex-shrink: 0;
    transition: transform 0.25s var(--ease);
}

.footer-made-by:hover .tg-icon {
    transform: scale(1.15) rotate(-5deg);
}



.hidden  { display: none !important; }
.mt-2    { margin-top: 8px; }
.mt-3    { margin-top: 14px; }
.mt-4    { margin-top: 22px; }
.mb-2    { margin-bottom: 8px; }
.mb-3    { margin-bottom: 14px; }
.flex-1  { flex: 1; }


@media (max-width: 1024px) {
    .portal-layout {
        padding: 40px 20px;
    }

    .branding-section {
        align-items: center;
        text-align: center;
        order: 3;
    }

    .form-section {
        order: 1;
    }

    .login-card-footer-cta {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .hero-description {
        margin: 0 auto 32px;
    }

    .hero-cta-row {
        justify-content: center;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 0 auto;
        order: 2;
    }

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

    .section-title { font-size: 32px; }
}

@media (max-width: 600px) {
    .main-header { padding: 18px 16px; }
    .logo-text {
        max-width: none;
        font-size: 11px;
        letter-spacing: 1px;
    }

    .portal-layout {
        padding: 0;
        min-height: calc(100vh - 70px);
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: stretch;
        align-items: stretch;
    }

    .form-section {
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .system-frame {
        max-width: 100%;
        width: 100%;
        flex: 1;
        border-radius: 0;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }

    .frame-header {
        border-radius: 0;
    }

    .app-container {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .card.active {
        padding: 24px 16px;
        flex: 1;
        display: flex !important;
        flex-direction: column;
    }

    .hero-title {
        font-size: 38px;
        letter-spacing: -1.5px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .proc-card { padding: 28px; }

    .main-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .frame-address { display: none; }

    
    .bottom-cta { padding: 40px 20px; }

    .bottom-cta-inner {
        padding: 40px 24px;
        border-radius: 24px;
    }

    .cta-title { font-size: 30px; }

    .cta-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .cta-stat-divider { display: none; }

    .cta-stat { padding: 0 16px; }

    .nav-login-btn {
        padding: 6px 14px;
        font-size: 11.5px;
    }
}


.quick-lang-selectors {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 100px;
    transition: all 0.25s var(--ease);
}

.quick-lang-btn {
    background: transparent;
    border: 1.5px solid transparent;
    color: var(--text-dim);
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 100px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.25s var(--ease);
    outline: none;
}

.quick-lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.quick-lang-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
    color: #fff;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}


@media (max-width: 580px) {
    .quick-lang-selectors {
        display: none;
    }
}


.lang-selector-container {
    position: relative;
    z-index: 1000;
}
.lang-selector-container.open {
    z-index: 1002 !important;
}

.lang-selector-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.25s var(--ease);
    outline: none;
}

.lang-selector-btn:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.35);
    color: #fff;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
    transform: translateY(-1px);
}

.lang-selector-btn svg {
    flex-shrink: 0;
    transition: transform 0.25s var(--ease);
}

.lang-selector-btn .chevron-icon {
    opacity: 0.6;
}

.lang-selector-container.open .lang-selector-btn {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.5);
    color: #fff;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
}

.lang-selector-container.open .chevron-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    max-height: 320px;
    background: rgba(15, 15, 17, 0.88);
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.4) rgba(0, 0, 0, 0.2);
}

.lang-selector-container.open .lang-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}


.lang-dropdown::-webkit-scrollbar {
    width: 5px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    transition: background 0.2s;
}

.lang-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.6);
}


.lang-option {
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 550;
    color: rgba(255, 255, 255, 0.85);
    text-align: left;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s var(--ease);
}

.lang-option:hover {
    background: rgba(212, 175, 55, 0.08);
    color: #fff;
    padding-left: 17px;
}

.lang-option.active {
    background: rgba(212, 175, 55, 0.16) !important;
    color: var(--gold-400) !important;
    font-weight: 700;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.lang-option .check-icon {
    font-size: 11px;
    color: var(--gold-400);
    font-weight: 900;
}


html[dir="rtl"] .nav-login-btn svg {
    margin-right: 0;
    margin-left: 7px;
}

html[dir="rtl"] .lang-selector-btn svg {
    margin-right: 0;
    margin-left: 7px;
}

html[dir="rtl"] .hamburger-dropdown {
    right: auto;
    left: 0;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

html[dir="rtl"] .theme-dropdown {
    right: auto;
    left: 0;
}

html[dir="rtl"] .lang-option {
    text-align: right;
    flex-direction: row-reverse;
}

html[dir="rtl"] .lang-option:hover {
    padding-left: 14px;
    padding-right: 17px;
}

html[dir="rtl"] .input-icon {
    left: auto;
    right: 14px;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] input[type="text"],
html[dir="rtl"] input[type="number"] {
    padding: 14px 42px 14px 16px;
}

html[dir="rtl"] .copy-btn {
    margin-left: 0;
    margin-right: 12px;
}

html[dir="rtl"] .btn-arrow {
    transform: scaleX(-1);
}

html[dir="rtl"] .btn:hover:not(:disabled) .btn-arrow {
    transform: scaleX(-1) translateX(3px);
}

html[dir="rtl"] .step-bubble {
    margin-right: 0;
    margin-left: 14px;
}

html[dir="rtl"] .footer-right {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-made-by {
    flex-direction: row-reverse;
    padding: 5px 10px 5px 14px;
}


.recent-emails-container {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    animation: fadeIn 0.3s var(--ease) forwards;
}

.recent-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    user-select: none;
}

.recent-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.recent-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    outline: none;
    user-select: none;
}

.recent-chip:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.35);
    color: #fff;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.12);
    transform: translateY(-0.5px);
}

.recent-chip .remove-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.15s var(--ease);
    margin-left: 2px;
}

.recent-chip .remove-chip:hover {
    background: rgba(212, 175, 55, 0.25);
    color: var(--gold-400);
}

html[dir="rtl"] .recent-chip .remove-chip {
    margin-left: 0;
    margin-right: 2px;
}



.staff-dashboard {
    width: 100%;
    max-width: 100%;
    margin: 40px auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fade-in 0.4s var(--ease) forwards; 
    box-sizing: border-box;
}

.staff-header-card {
    background: rgba(20, 20, 25, 0.45);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    padding: 30px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(212, 175, 55, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-wrap: wrap;
    gap: 20px;
}

.staff-header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.staff-header-left h2 {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.25;
}

.staff-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-300);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    width: fit-content;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--gold-500);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--gold-500);
    animation: pulse 2s infinite;
}

.staff-subtitle {
    font-size: 14px;
    color: var(--text-dim);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s var(--ease);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fff;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.12);
}


.staff-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}


.btn-staff-inbox-switch {
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: all 0.25s var(--ease);
}


.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


.btn-staff-hub {
    background: rgba(212, 175, 55, 0.07);
    border: 1px solid rgba(212, 175, 55, 0.28);
    color: var(--gold-300);
    padding: 8px 15px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s var(--ease);
    white-space: nowrap;
}

.btn-staff-hub:hover {
    background: rgba(212, 175, 55, 0.14);
    border-color: rgba(212, 175, 55, 0.55);
    color: #fff;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.18);
}
/* Staff Top Bar: metrics + action buttons in one horizontal row */
.staff-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Action buttons container pushed to the right */
.dashboard-action-btns {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

/* Action button base */
.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    height: auto;
    box-sizing: border-box;
}

/* Primary action button: filled with accent */
.action-btn-primary {
    background: rgba(var(--accent-rgb), 0.12);
    border: 1.5px solid rgba(var(--accent-rgb), 0.35);
    color: var(--accent, #d4af37);
}
.action-btn-primary:hover,
.action-btn-primary.active {
    background: rgba(var(--accent-rgb), 0.22);
    border-color: rgba(var(--accent-rgb), 0.7);
    color: var(--accent, #d4af37);
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.15);
}

/* Ghost action button: outlined */
.action-btn-ghost {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}
.action-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}
.action-btn-ghost.active {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: var(--accent, #d4af37);
}

/* White theme overrides */
body[data-theme="white"] .action-btn-ghost {
    border-color: rgba(0, 0, 0, 0.12);
    color: #555;
}
body[data-theme="white"] .action-btn-ghost:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
    color: #222;
}

.staff-metrics-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 0;
    flex: 0 0 auto;
}

.staff-metrics-grid .metric-card {
    background: rgba(12, 13, 17, 0.55);
    border: 1px solid rgba(var(--accent-rgb), 0.1);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 160px !important;
    max-width: 220px !important;
    height: auto !important;
    align-self: flex-start !important;
}

/* Ensure the hidden emails card is completely hidden and overrides display:flex */
#card-staff-emails {
    display: none !important;
}

.staff-metrics-grid .metric-card:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.staff-metrics-grid .metric-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-400);
    border: 1px solid rgba(212, 175, 55, 0.2);
    flex-shrink: 0 !important;
}

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

.metric-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.metric-value {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-mono);
    line-height: 1.2;
}


.staff-panes-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#pane-staff-users,
#pane-staff-imap,
#pane-staff-payments,
#pane-staff-support {
    grid-template-columns: 1fr !important;
}

@media (max-width: 1024px) {
    .staff-panes-layout {
        grid-template-columns: 1fr;
    }
}

/* Dashboard Sub-navigation Toggle Buttons */
.dashboard-toggle-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    padding: 6px;
    border-radius: 12px;
    width: fit-content;
    align-self: center;
}

body[data-theme="white"] .dashboard-toggle-bar {
    background: rgba(0, 0, 0, 0.02);
}

.dashboard-toggle-bar .toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-toggle-bar .toggle-btn svg {
    color: var(--text-faint);
    transition: color 0.2s ease;
}

.dashboard-toggle-bar .toggle-btn:hover {
    color: var(--text-white);
}

.dashboard-toggle-bar .toggle-btn:hover svg {
    color: var(--text-white);
}

.dashboard-toggle-bar .toggle-btn.active {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent, #d4af37);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.05);
}

.dashboard-toggle-bar .toggle-btn.active svg {
    color: var(--accent, #d4af37);
}

body[data-theme="white"] .dashboard-toggle-bar .toggle-btn.active {
    background: rgba(0, 113, 227, 0.08) !important;
    color: #0071e3 !important;
}

body[data-theme="white"] .dashboard-toggle-bar .toggle-btn.active svg {
    color: #0071e3 !important;
}

.staff-pane-card {
    background: rgba(12, 13, 17, 0.55);
    border: 1px solid rgba(var(--accent-rgb), 0.12);
    border-radius: 22px;
    padding: 30px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.staff-pane-card:hover {
    border-color: rgba(var(--accent-rgb), 0.28);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 35px rgba(var(--accent-rgb), 0.05);
}

.pane-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pane-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-400);
    border: 1px solid rgba(212, 175, 55, 0.15);
    flex-shrink: 0;
}

.pane-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.pane-desc {
    font-size: 12.5px;
    color: var(--text-dim);
}


#staff-allot-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.form-group label {
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

.form-group label .required {
    color: var(--gold-400);
}

.features-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
}

.features-checkbox-grid .feature-checkbox-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    user-select: none;
    transition: all 0.25s var(--ease), opacity 0.3s ease;
    min-height: 38px;
    box-sizing: border-box;
    align-items: center;
    gap: 0;
}

.features-checkbox-grid .feature-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(var(--accent-rgb), 0.3);
    transform: translateY(-1px);
}


.features-checkbox-grid .feature-checkbox-label .custom-checkbox,
.features-checkbox-grid .feature-checkbox-label div p {
    display: none !important;
}

.features-checkbox-grid .feature-checkbox-label div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.features-checkbox-grid .feature-checkbox-label div strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-dim);
    transition: color 0.25s var(--ease);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.features-checkbox-grid .feature-checkbox-label:has(input:checked) {
    background: rgba(var(--accent-rgb), 0.1) !important;
    border-color: var(--gold-500) !important;
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.15);
}

.features-checkbox-grid .feature-checkbox-label:has(input:checked) div strong {
    color: #fff !important;
}

.feature-checkbox-label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    border-radius: 10px;
    background: transparent;
    transition: all 0.25s var(--ease);
}

.feature-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

body[data-theme="white"] .feature-checkbox-label:hover {
    background: rgba(0, 0, 0, 0.02);
}

.feature-checkbox-label:has(input:checked) {
    background: rgba(var(--accent-rgb), 0.05);
}

.feature-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.feature-checkbox-label:hover .custom-checkbox {
    border-color: var(--gold-400);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.25);
    transform: scale(1.05);
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
    background: rgba(0, 0, 0, 0.25);
    margin-top: 0;
    position: relative;
}

.feature-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    background: var(--gold-500);
    border-color: var(--gold-500);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4);
    transform: scale(1.08);
}

.feature-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid var(--btn-text-color, #000);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-0.5px, -1px);
    transition: all 0.2s var(--ease);
}

.feature-checkbox-label div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-checkbox-label div strong {
    font-size: 13px;
    color: #fff;
    line-height: 1;
}

.feature-checkbox-label div p {
    font-size: 11.5px;
    color: var(--text-dim);
}

.checkbox-group-helper {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: -4px;
}

.scrollable-box {
    max-height: 160px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) rgba(0, 0, 0, 0.1);
}

.emails-pool-list::-webkit-scrollbar {
    width: 4px;
}
.emails-pool-list::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.25);
    border-radius: 4px;
}

.pool-empty-state {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    padding: 20px 0;
}

.email-pool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.email-pool-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(212, 175, 55, 0.1);
}

.email-pool-item span {
    font-size: 12.5px;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.85);
}

.allot-submit-btn {
    margin-top: 10px;
    justify-content: center;
}


.table-wrap {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) rgba(0, 0, 0, 0.1);
}

.staff-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.staff-table th {
    padding: 16px 20px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1.5px solid rgba(var(--accent-rgb), 0.12);
}

.staff-table td {
    padding: 16px 20px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
    transition: background-color 0.2s ease; 
}

.staff-table tbody tr {
    transition: background-color 0.2s ease;
    contain: content; 
}

.staff-table tbody tr:hover {
    background: rgba(var(--accent-rgb), 0.04);
}

.user-profile-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.user-avatar-initial {
    font-size: 13px;
    font-weight: 800;
    color: var(--gold-400);
    letter-spacing: 0.5px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-id-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-id {
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13.5px;
}

.role-tag-subadmin {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-300);
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.user-telegram-link {
    font-size: 12px;
    color: var(--gold-400);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
    width: fit-content;
}

.user-telegram-link:hover {
    color: var(--gold-200);
    text-decoration: underline;
}

.user-credentials-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 3px 6px;
    margin-top: 4px;
    width: fit-content;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.cred-icon {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.6;
    stroke-width: 2px;
    flex-shrink: 0;
}

.cred-value {
    font-family: var(--font-mono);
    font-weight: 500;
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-copy-credentials {
    background: none;
    border: none;
    color: var(--gold-400);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.1s ease;
}

.btn-copy-credentials:hover {
    color: var(--gold-200);
    transform: scale(1.1);
}

.btn-copy-credentials:active {
    transform: scale(0.9);
}

.allotted-emails-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.allotted-emails-list span {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.allotted-emails-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.all-access-badge-premium {
    display: inline-flex;
    align-items: center;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--gold-300);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    width: fit-content;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--gold-500);
    border-radius: 50%;
    margin-right: 6px;
    animation: dot-pulse 2s infinite ease-in-out;
}

.email-tags-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.email-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.8);
    width: fit-content;
    transition: all 0.2s ease;
}

.email-tag svg {
    width: 11px !important;
    height: 11px !important;
    stroke-width: 2px;
    flex-shrink: 0;
}

.email-tag:hover {
    background: rgba(var(--accent-rgb), 0.05);
    border-color: rgba(var(--accent-rgb), 0.2);
    color: #fff;
}

.validity-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.expiry-date-text {
    font-weight: 700;
    color: #fff;
    font-size: 13.5px;
}

.expiry-date-text span {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 14px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.22);
    color: #34d399;
}

.status-pill.expiring {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #fbbf24;
}

.status-pill.expired {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: #fca5a5;
}

.status-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pill.active .status-pill-dot {
    background-color: #10b981;
    animation: dot-pulse-green 2s infinite ease-in-out;
}

.status-pill.expiring .status-pill-dot {
    background-color: #f59e0b;
    animation: dot-pulse-orange 2s infinite ease-in-out;
}

.status-pill.expired .status-pill-dot {
    background-color: #ef4444;
    animation: dot-pulse-red 2s infinite ease-in-out;
}

.permissions-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.perm-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.perm-chip svg {
    width: 10.5px !important;
    height: 10.5px !important;
    stroke-width: 2.5px;
    flex-shrink: 0;
}

.perm-chip.subadmin-role {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-300);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.perm-chip.signin {
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-300);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.perm-chip.reset {
    background: rgba(99, 102, 241, 0.08);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.perm-chip.household {
    background: rgba(16, 185, 129, 0.08);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.perm-chip.verify {
    background: rgba(236, 72, 153, 0.08);
    color: #fbcfe8;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.perm-chip.none {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.btn-action svg {
    width: 12px !important;
    height: 12px !important;
    stroke-width: 2px;
    flex-shrink: 0;
}

.btn-action-edit {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.btn-action-edit:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.btn-action-demote {
    background: rgba(245, 158, 11, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.btn-action-demote:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fff;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.btn-action-revoke {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.btn-action-revoke:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.btn-revoke {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-revoke:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}


@keyframes dot-pulse {
    0% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.65); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0); }
    100% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

@keyframes dot-pulse-green {
    0% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes dot-pulse-orange {
    0% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes dot-pulse-red {
    0% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65); }
    70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.85); opacity: 0.55; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.table-empty-state {
    text-align: center;
    padding: 50px 0 !important;
    color: var(--text-dim);
    font-style: italic;
    font-size: 13px;
}


@media (max-width: 768px) {
    .staff-dashboard {
        margin: 20px auto;
        padding: 0 16px;
        gap: 20px;
    }
    
    .staff-header-card {
        padding: 20px;
        border-radius: 16px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 16px;
    }
    
    .staff-header-left {
        align-items: center;
    }
    
    .staff-header-left h2 {
        font-size: 20px;
    }
    
    .staff-subtitle {
        font-size: 12.5px;
    }
    
    .btn-logout {
        justify-content: center;
        width: 100%;
    }
    
    .staff-header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .btn-staff-inbox-switch {
        justify-content: center;
        width: 100%;
        padding: 12px 20px;
        font-size: 14.5px;
    }
    
    .staff-metrics-grid {
        gap: 10px;
    }
    
    .staff-metrics-grid .metric-card {
        padding: 12px 16px;
        border-radius: 14px;
        gap: 12px;
        min-width: 140px;
        max-width: 200px;
    }
    
    .staff-metrics-grid .metric-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    
    .staff-metrics-grid .metric-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .staff-metrics-grid .metric-card .metric-label {
        font-size: 10px;
        letter-spacing: 0.5px;
    }
    
    .staff-metrics-grid .metric-card .metric-value {
        font-size: 18px;
    }
    
    .staff-panes-layout {
        gap: 20px;
    }
    
    .staff-panes-layout > * {
        min-width: 0;
    }
    
    .staff-pane-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .features-checkbox-grid {
        padding: 12px;
        gap: 10px;
    }
    
    .feature-checkbox-label div strong {
        font-size: 13px;
    }
    
    .feature-checkbox-label div p {
        font-size: 11px;
    }
    
    .email-pool-item span {
        font-size: 12px;
    }
    
    .scrollable-box {
        max-height: 140px;
    }
    
    .staff-table th, 
    .staff-table td {
        padding: 12px 14px;
        font-size: 12.5px;
    }
    
    .user-profile-td strong {
        font-size: 12.5px;
    }
    
    .user-profile-td span {
        font-size: 11px;
    }
    
    .allotted-emails-list span {
        font-size: 11px;
        padding: 1px 6px;
    }
    
    .perm-badge {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    .btn-revoke {
        padding: 4px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .staff-dashboard {
        padding: 0 10px;
    }
    
    .staff-header-left h2 {
        font-size: 18px;
    }
    
    .staff-subtitle {
        font-size: 11.5px;
    }
    
    .staff-metrics-grid .metric-card .metric-value {
        font-size: 18px;
    }
    
    .staff-metrics-grid .metric-card .metric-label {
        font-size: 9.5px;
        letter-spacing: 0.3px;
    }
    
    .staff-metrics-grid .metric-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    
    .staff-metrics-grid .metric-icon svg {
        width: 15px;
        height: 15px;
    }
    
    .staff-pane-card {
        padding: 16px 12px;
    }
    
    .staff-metrics-grid .metric-card {
        padding: 10px 12px;
        border-radius: 10px;
        gap: 8px;
    }
    
    .pane-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        gap: 12px;
    }
    
    .pane-title {
        font-size: 16px;
    }
    
    .pane-desc {
        font-size: 11.5px;
    }
}


.allot-custom-emails-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    padding: 12px;
    font-family: inherit;
    font-size: 13.5px;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s var(--ease);
}
.allot-custom-emails-textarea:hover {
    border-color: rgba(var(--accent-rgb), 0.25);
    background: rgba(255, 255, 255, 0.05);
}
.allot-custom-emails-textarea:focus {
    border-color: var(--gold-500);
    background: rgba(var(--accent-rgb), 0.04);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15), 0 0 25px rgba(var(--accent-rgb), 0.08);
}

.user-expiry-date {
    font-weight: 700;
    color: #fff;
}


body[data-theme="white"] {
    --accent-rgb:     0, 113, 227;
    --bg-base:        #f5f5f7;  
    --bg-surface:     rgba(255, 255, 255, 0.85);  
    --bg-elevated:    rgba(240, 240, 243, 0.9);
    
    --text-white:     #1d1d1f;  
    --text-dim:       #86868b;  
    --text-faint:     #a1a1a6;
    
    --gold-100:       #1d1d1f;  
    --gold-200:       #333336;
    --gold-300:       #515154;
    --gold-400:       #86868b;
    --gold-500:       #0071e3;  
    --gold-600:       #005ab2;
    --gold-700:       #004480;
    --gold-glow:      rgba(0, 113, 227, 0.08);
    --gold-glow-strong: rgba(0, 113, 227, 0.18);
    
    --grad-gold:      linear-gradient(135deg, #1d1d1f 0%, #86868b 100%);
    --grad-gold-h:    linear-gradient(90deg, #1d1d1f 0%, #86868b 100%);
    --grad-text:      linear-gradient(135deg, #1d1d1f 20%, #434344 60%, #86868b 100%);
    
    --card-border:    rgba(0, 0, 0, 0.08);
    --card-border-hover: rgba(0, 0, 0, 0.15);
    --card-shadow:    0 8px 30px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    
    --btn-text-color: #fff;
    --orb-color-1:    radial-gradient(circle, rgba(0, 113, 227, 0.04) 0%, transparent 70%);
    --orb-color-2:    radial-gradient(circle, rgba(0, 113, 227, 0.02) 0%, transparent 70%);
    --orb-color-3:    radial-gradient(circle, rgba(0, 113, 227, 0.01) 0%, transparent 70%);
    --orb-color-4:    radial-gradient(circle, rgba(0, 113, 227, 0.02) 0%, transparent 70%);
    
    background: #f5f5f7 !important;
}


body[data-theme="white"] #neural-canvas,
body[data-theme="white"] .particles,
body[data-theme="white"] .bg-mesh,
body[data-theme="white"] .grid-overlay {
    display: none !important;
}


body[data-theme="white"] {
    color: #1d1d1f !important;
}

body[data-theme="white"] h1,
body[data-theme="white"] h2,
body[data-theme="white"] h3,
body[data-theme="white"] h4,
body[data-theme="white"] h5,
body[data-theme="white"] h6,
body[data-theme="white"] .pane-title,
body[data-theme="white"] .metric-value,
body[data-theme="white"] .hero-title,
body[data-theme="white"] .staff-badge,
body[data-theme="white"] .badge,
body[data-theme="white"] .status-indicator,
body[data-theme="white"] th,
body[data-theme="white"] td,
body[data-theme="white"] .btn-secondary,
body[data-theme="white"] .btn-text,
body[data-theme="white"] .logo-text,
body[data-theme="white"] .logo-mark,
body[data-theme="white"] .user-info h3,
body[data-theme="white"] label,
body[data-theme="white"] .guide-step,
body[data-theme="white"] .use-step,
body[data-theme="white"] .flow-step-title,
body[data-theme="white"] .tab-btn {
    color: #1d1d1f !important;
}

body[data-theme="white"] .logo-dot {
    color: #0071e3 !important;
}

body[data-theme="white"] .gradient-text {
    background: linear-gradient(135deg, #1d1d1f 0%, #0071e3 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}


body[data-theme="white"] .btn-primary,
body[data-theme="white"] #btn-fetch,
body[data-theme="white"] #btn-allot-submit,
body[data-theme="white"] #btn-login-submit {
    background: #0071e3 !important;
    border-color: #0071e3 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.15) !important;
}

body[data-theme="white"] .btn-primary:hover,
body[data-theme="white"] #btn-fetch:hover,
body[data-theme="white"] #btn-allot-submit:hover,
body[data-theme="white"] #btn-login-submit:hover {
    background: #0077ed !important;
    border-color: #0077ed !important;
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.25) !important;
}


body[data-theme="white"] .btn-secondary,
body[data-theme="white"] #btn-staff-dashboard,
body[data-theme="white"] #btn-staff-inbox {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1d1d1f !important;
}

body[data-theme="white"] .btn-secondary:hover,
body[data-theme="white"] #btn-staff-dashboard:hover,
body[data-theme="white"] #btn-staff-inbox:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

body[data-theme="white"] .tab-btn.active {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.25) !important;
    color: #0071e3 !important;
}


body[data-theme="white"] .metric-card,
body[data-theme="white"] .staff-pane-card,
body[data-theme="white"] .quick-guide,
body[data-theme="white"] .allot-access-card,
body[data-theme="white"] .staff-header-card,
body[data-theme="white"] .system-frame,
body[data-theme="white"] .app-container {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

body[data-theme="white"] .system-frame {
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="white"] .pane-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="white"] .pane-icon,
body[data-theme="white"] .metric-icon {
    background: rgba(0, 113, 227, 0.08) !important;
    color: #0071e3 !important;
    border: 1px solid rgba(0, 113, 227, 0.15) !important;
}


body[data-theme="white"] input[type="email"],
body[data-theme="white"] input[type="password"],
body[data-theme="white"] input[type="text"],
body[data-theme="white"] input[type="number"],
body[data-theme="white"] .allot-custom-emails-textarea {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1d1d1f !important;
}

body[data-theme="white"] input[type="email"]:focus,
body[data-theme="white"] input[type="password"]:focus,
body[data-theme="white"] input[type="text"]:focus,
body[data-theme="white"] input[type="number"]:focus,
body[data-theme="white"] .allot-custom-emails-textarea:focus {
    background: rgba(0, 113, 227, 0.03) !important;
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.08), 0 0 20px rgba(0, 113, 227, 0.08) !important;
}

body[data-theme="white"] input::placeholder,
body[data-theme="white"] .allot-custom-emails-textarea::placeholder {
    color: rgba(0, 0, 0, 0.3) !important;
}


body[data-theme="white"] .staff-table th {
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="white"] .staff-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body[data-theme="white"] .staff-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}


body[data-theme="white"] .user-id {
    color: #1d1d1f !important;
}
body[data-theme="white"] .user-avatar {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.25) !important;
}
body[data-theme="white"] .user-avatar-initial {
    color: #0071e3 !important;
}
body[data-theme="white"] .user-credentials-card {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}
body[data-theme="white"] .credential-item {
    color: rgba(0, 0, 0, 0.6) !important;
}
body[data-theme="white"] .credential-item svg {
    color: rgba(0, 0, 0, 0.5) !important;
}
body[data-theme="white"] .email-tag {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    color: rgba(0, 0, 0, 0.8) !important;
}
body[data-theme="white"] .email-tag:hover {
    background: rgba(0, 113, 227, 0.04) !important;
    border-color: rgba(0, 113, 227, 0.2) !important;
    color: #0071e3 !important;
}
body[data-theme="white"] .expiry-date-text {
    color: #1d1d1f !important;
}
body[data-theme="white"] .expiry-date-text span {
    background: linear-gradient(135deg, #1d1d1f 0%, #0071e3 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
body[data-theme="white"] .perm-chip.none {
    background: rgba(0, 0, 0, 0.02) !important;
    color: rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}
body[data-theme="white"] .btn-action-edit {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #1d1d1f !important;
}
body[data-theme="white"] .btn-action-edit:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.16) !important;
    color: #000 !important;
}



body[data-theme="white"] .hamburger-dropdown,
body[data-theme="white"] .lang-dropdown,
body[data-theme="white"] .theme-dropdown {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="white"] .lang-selector-btn,
body[data-theme="white"] .theme-selector-btn,
body[data-theme="white"] .lang-option,
body[data-theme="white"] .theme-option {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1d1d1f !important;
}

body[data-theme="white"] .lang-selector-btn:hover,
body[data-theme="white"] .theme-selector-btn:hover,
body[data-theme="white"] .lang-option:hover,
body[data-theme="white"] .theme-option:hover,
body[data-theme="white"] .lang-option.active,
body[data-theme="white"] .theme-option.active {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.25) !important;
    color: #0071e3 !important;
}

body[data-theme="white"] .hamburger-btn {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1d1d1f !important;
}

body[data-theme="white"] .hamburger-btn:hover {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.25) !important;
    color: #0071e3 !important;
}

body[data-theme="white"] header {
    background: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

body[data-theme="white"] .footer-text,
body[data-theme="white"] .footer-status {
    color: #86868b !important;
}


body[data-theme="white"] .alert-error {
    color: #b91c1c !important;
    background: rgba(239, 68, 68, 0.06) !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
}

body[data-theme="white"] .fetch-error {
    background: rgba(239, 68, 68, 0.06) !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
    color: #b91c1c !important;
}

body[data-theme="white"] .fetch-error p {
    color: #86868b !important;
}


body[data-theme="white"] .result-card {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="white"] .code-value {
    background: linear-gradient(135deg, #1d1d1f 0%, #0071e3 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: none !important;
}

body[data-theme="white"] .copy-btn {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="white"] .copy-btn:hover {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.25) !important;
    color: #0071e3 !important;
    box-shadow: none !important;
}


body[data-theme="white"] .time-chip {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

body[data-theme="white"] .recent-chip {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #515154 !important;
}

body[data-theme="white"] .recent-chip:hover {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.25) !important;
    color: #0071e3 !important;
    box-shadow: 0 0 12px rgba(0, 113, 227, 0.12) !important;
}

body[data-theme="white"] .perm-badge.signin {
    background: rgba(0, 113, 227, 0.08) !important;
    color: #0071e3 !important;
    border: 1px solid rgba(0, 113, 227, 0.2) !important;
}

body[data-theme="white"] .perm-badge.reset {
    background: rgba(99, 102, 241, 0.08) !important;
    color: #4f46e5 !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

body[data-theme="white"] .perm-badge.household {
    background: rgba(16, 185, 129, 0.08) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

body[data-theme="white"] .perm-badge.verify {
    background: rgba(236, 72, 153, 0.08) !important;
    color: #db2777 !important;
    border: 1px solid rgba(236, 72, 153, 0.2) !important;
}

body[data-theme="white"] .btn-revoke {
    background: rgba(239, 68, 68, 0.06) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #dc2626 !important;
}

body[data-theme="white"] .btn-revoke:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fff !important;
}

body[data-theme="white"] .user-profile-td strong {
    color: #1d1d1f !important;
}

body[data-theme="white"] .user-key-value {
    color: rgba(0, 0, 0, 0.6) !important;
}

body[data-theme="white"] .user-key-row {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="white"] .allotted-emails-list span {
    color: #1d1d1f !important;
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

body[data-theme="white"] .user-expiry-date {
    color: #1d1d1f !important;
}


body[data-theme="white"] .feature-checkbox-label div strong {
    color: #1d1d1f !important;
}

body[data-theme="white"] .feature-checkbox-label div p,
body[data-theme="white"] .checkbox-group-helper {
    color: #515154 !important;
}

body[data-theme="white"] .custom-checkbox {
    border-color: rgba(0, 0, 0, 0.18) !important;
    background: rgba(0, 0, 0, 0.03) !important;
}

body[data-theme="white"] .feature-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    background: #0071e3 !important;
    border-color: #0071e3 !important;
}

body[data-theme="white"] #allot-all-emails-label {
    border-color: rgba(0, 0, 0, 0.08) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

body[data-theme="white"] #allot-all-emails-label:has(input:checked) {
    background: rgba(0, 113, 227, 0.05) !important;
    border-color: rgba(0, 113, 227, 0.2) !important;
}


body[data-theme="white"] .tab-bar {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

body[data-theme="white"] .tab-btn {
    color: #515154 !important;
}

body[data-theme="white"] .tab-btn.active {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #0071e3 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="white"] .tab-btn.active svg {
    stroke: #0071e3 !important;
}

body[data-theme="white"] .tab-bar:has(.tab-btn.active) .tab-btn:not(.active) {
    opacity: 0.65 !important;
    color: #515154 !important;
}

body[data-theme="white"] .tab-bar:has(.tab-btn.active) .tab-btn:not(.active) svg {
    opacity: 0.75 !important;
}

body[data-theme="white"] .tab-btn:hover:not(.active) {
    color: #0071e3 !important;
    background: rgba(0, 113, 227, 0.05) !important;
}


body[data-theme="white"] .btn:disabled {
    background: #e5e5ea !important;
    border-color: #e5e5ea !important;
    color: #aeaeae !important;
    opacity: 1 !important;
    box-shadow: none !important;
}


body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label {
    border-color: rgba(0, 0, 0, 0.08) !important;
    background: rgba(0, 0, 0, 0.02) !important;
}

body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label:has(input:checked) {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: #0071e3 !important;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.1) !important;
}

body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label div strong {
    color: #515154 !important;
}

body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label:has(input:checked) div strong {
    color: #0071e3 !important;
}


.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: flex !important; 
}

.modal-card {
    width: 90%;
    max-width: 440px;
    padding: 30px;
    border-radius: 20px;
    background: #0b0c10; 
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}


.modal-card input[type="text"],
.modal-card input[type="number"],
.modal-card textarea {
    padding: 12px 14px !important;
    text-align: left !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
}

.modal-overlay.hidden .modal-card {
    transform: translateY(30px);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    color: var(--text-white);
    opacity: 0.6;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-top: -5px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}


.user-filters {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.user-filters .btn {
    border-radius: 20px;
    transition: all 0.2s ease;
}

.user-filters .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px var(--gold-glow);
}


.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.expiring {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.expired {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}


.status-badge.hold {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    animation: status-pulse-red 2s infinite ease-in-out;
}

.status-badge.refund {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.status-badge.resolved {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

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


.connection-pulse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    animation: pulse-ring 1.5s infinite cubic-bezier(0.215, 0.610, 0.355, 1);
}

.connection-pulse.connected {
    color: #10b981;
}

.connection-pulse.connected .pulse-dot {
    background: #10b981;
}

.connection-pulse.connected .pulse-dot::after {
    border: 2px solid rgba(16, 185, 129, 0.4);
}

.connection-pulse.failed {
    color: #ef4444;
}

.connection-pulse.failed .pulse-dot {
    background: #ef4444;
}

.connection-pulse.failed .pulse-dot::after {
    border: 2px solid rgba(239, 68, 68, 0.4);
}

.connection-pulse.testing {
    color: #f59e0b;
}

.connection-pulse.testing .pulse-dot {
    background: #f59e0b;
}

.connection-pulse.testing .pulse-dot::after {
    border: 2px solid rgba(245, 158, 11, 0.4);
}

@keyframes pulse-ring {
    0% { transform: scale(0.7); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}


.features-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.features-checkbox-grid .feature-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 38px;
    box-sizing: border-box;
}

.features-checkbox-grid .feature-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--card-border-hover);
}

.features-checkbox-grid .feature-checkbox-label input[type="checkbox"]:checked ~ div strong {
    color: var(--primary);
}

.features-checkbox-grid .feature-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.features-checkbox-grid .custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.features-checkbox-grid .feature-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    border-color: var(--primary);
    background: var(--primary);
}

.features-checkbox-grid .feature-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


body[data-theme="white"] .modal-overlay {
    background: rgba(0, 0, 0, 0.4);
}

body[data-theme="white"] .modal-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

body[data-theme="white"] .features-checkbox-grid .custom-checkbox {
    border-color: rgba(0, 0, 0, 0.2) !important;
    background: rgba(0, 0, 0, 0.03) !important;
}

body[data-theme="white"] .features-checkbox-grid .feature-checkbox-label input[type="checkbox"]:checked ~ .custom-checkbox {
    background: #0071e3 !important;
    border-color: #0071e3 !important;
}



@media (min-width: 1025px) {
    .staff-dashboard {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        grid-template-areas:
            "header metrics"
            "nav nav"
            "content content";
        gap: 25px;
        max-width: 1800px;
        margin: 40px auto;
        padding: 0 30px;
    }

    .staff-header-card {
        grid-area: header;
        height: 100%;
        margin-bottom: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 30px 40px;
    }

    .staff-metrics-grid {
        grid-area: metrics;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        height: 100%;
        box-sizing: border-box;
    }

    .staff-metrics-grid .metric-card {
        height: 100%;
        margin-bottom: 0;
        box-sizing: border-box;
        padding: 24px 30px;
    }

    #staff-sub-nav {
        grid-area: nav;
        margin-bottom: 5px !important;
        margin-top: 15px !important;
    }

    #pane-staff-users,
    #pane-staff-subadmins,
    #pane-staff-payments,
    #pane-staff-imap,
    #pane-staff-support {
        grid-area: content;
    }

    
    .staff-table th {
        padding: 18px 24px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .staff-table td {
        padding: 18px 24px;
        font-size: 14.5px;
    }

    
    .user-profile-td {
        gap: 6px;
    }

    .user-key-row {
        gap: 8px;
    }

    
    .staff-table td:last-child {
        white-space: nowrap;
    }

    
    .main-header {
        max-width: 1200px;
        transition: max-width 0.4s var(--ease);
    }
    body:has(#staff-dashboard:not(.hidden)) .main-header {
        max-width: 1800px;
    }
    .hamburger-btn {
        display: none !important;
    }
    body .hamburger-dropdown,
    body[data-theme] .hamburger-dropdown {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: none !important;
        width: auto !important;
        min-width: 0 !important;
    }
    .hamburger-dropdown .lang-selector-container,
    .hamburger-dropdown .theme-selector-container {
        width: auto !important;
    }
    .hamburger-dropdown .lang-selector-btn,
    .hamburger-dropdown .theme-selector-btn {
        width: auto !important;
        display: inline-flex !important;
        justify-content: flex-start !important;
        gap: 7px !important;
    }
    .hamburger-menu-btn,
    .hamburger-logout-btn {
        width: auto !important;
        padding: 8px 18px !important;
        margin: 0 !important;
    }
}




@media (max-width: 768px) {

    
    .app-container,
    .staff-header-card,
    .staff-pane-card,
    .staff-metrics-grid .metric-card,
    .bottom-cta-inner,
    .hamburger-dropdown,
    .modal-overlay {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .app-container                       { background: rgba(12, 13, 17, 0.97); }
    .staff-header-card                   { background: rgba(20, 20, 25, 0.98); }
    .staff-pane-card                     { background: rgba(12, 13, 17, 0.98); }
    .staff-metrics-grid .metric-card     { background: rgba(12, 13, 17, 0.98); }
    .bottom-cta-inner                    { background: rgba(17, 19, 24, 0.98); }
    .hamburger-dropdown                  { background: rgba(15, 15, 17, 0.99) !important; }
    .modal-overlay                       { background: rgba(0, 0, 0, 0.88); }

    
    .mesh-orb-1 { width: 280px; height: 280px; filter: blur(50px); }
    .mesh-orb-2 { width: 240px; height: 240px; filter: blur(45px); }
    .mesh-orb-3 { width: 200px; height: 200px; filter: blur(40px); }
    .mesh-orb-4 { display: none; } 

    
    .pulse-dot::after      { animation: none; }
    .status-badge.hold     { animation: none; opacity: 0.9; }
    .logo-mark             { animation: none; }
    .badge-dot             { animation: none; }

    
    .particle:nth-child(n + 15) { display: none; }

    
    .staff-metrics-grid .metric-card:hover { transform: none; }
    .staff-pane-card:hover { transform: none; }
}



#neural-canvas, .bg-mesh, .particles {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}


body.logged-in #neural-canvas,
body.logged-in .bg-mesh,
body.logged-in .particles {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


body.logged-in:not([data-theme="white"]) {
    background-color: #000000 !important;
    background: #000000 !important;
}

body.logged-in[data-theme="white"] {
    background-color: #f5f5f7 !important;
    background: #f5f5f7 !important;
}


.outlook-oauth-card {
    margin-top: 25px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    transition: all 0.3s ease;
}
.outlook-oauth-card:hover {
    border-color: rgba(0, 164, 239, 0.35);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 164, 239, 0.05);
}
.microsoft-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252525;
    border: 1px solid #3c3c3c;
    border-radius: 8px;
    color: #ffffff;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    gap: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    outline: none;
    box-sizing: border-box;
}
.microsoft-signin-btn:hover {
    background: #333333;
    border-color: #00a4ef;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 14px rgba(0, 164, 239, 0.4);
    transform: translateY(-1.5px);
}
.microsoft-signin-btn:active {
    transform: translateY(0);
    background: #1a1a1a;
}
.outlook-oauth-card .card-info-icon {
    animation: bounceSlow 3s infinite ease-in-out;
}
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}




.imap-method-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.imap-method-selector .method-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s var(--ease);
}

.imap-method-selector .method-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.imap-method-selector .method-btn.active {
    background: rgba(var(--accent-rgb), 0.12);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: #f5d96b;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.08);
}


.method-content-pane {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.method-content-pane.hidden {
    display: none !important;
}


.imap-search-container {
    margin-bottom: 16px;
    padding: 0 2px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.imap-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#imap-provider-filter {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' 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: 12px !important;
    padding-right: 32px !important;
}

@media (max-width: 600px) {
    .imap-search-container {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .imap-search-container > .input-wrap {
        width: 100% !important;
        flex: none !important;
    }
    .imap-filter-actions {
        display: flex !important;
        width: 100% !important;
        gap: 10px !important;
        margin-top: 8px !important;
    }
    .imap-filter-actions .input-wrap {
        width: 60% !important;
        flex: 0 0 60% !important;
        max-width: 60% !important;
        min-width: 0 !important;
    }
    .imap-filter-actions #btn-test-all-imap {
        width: 40% !important;
        flex: 0 0 40% !important;
        max-width: 40% !important;
        margin-top: 0 !important;
        justify-content: center !important;
        align-self: center !important;
    }
}


.btn-test-imap,
.btn-edit-user,
.btn-demote-subadmin {
    width: auto !important;
}




.ticket-item-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(var(--accent-rgb), 0.25);
    transform: translateY(-1px);
}

.ticket-item-info {
    min-width: 0;
    flex: 1;
    margin-right: 15px;
}

.ticket-item-subject {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-item-meta {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 3px;
    font-family: var(--mono);
}


.chat-messages::-webkit-scrollbar,
#admin-chat-messages-container::-webkit-scrollbar,
#tickets-list-container::-webkit-scrollbar,
#admin-tickets-list::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track,
#admin-chat-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
#admin-chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
#admin-chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-rgb), 0.3);
}

.chat-msg-row {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    animation: bubble-fade-in 0.3s var(--ease) both;
}

@keyframes bubble-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-msg-row.sent {
    align-self: flex-end;
}

.chat-msg-row.received {
    align-self: flex-start;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #fff;
    word-break: break-word;
}

.chat-msg-row.sent .chat-bubble {
    background: rgba(var(--accent-rgb), 0.16);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-bottom-right-radius: 2px;
}

.chat-msg-row.received .chat-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 2px;
}

.chat-meta {
    font-size: 9.5px;
    color: var(--text-faint);
    margin-top: 4px;
    display: flex;
    gap: 6px;
    font-family: var(--mono);
}

.chat-msg-row.sent .chat-meta {
    align-self: flex-end;
}

.chat-msg-row.received .chat-meta {
    align-self: flex-start;
}


.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.status-badge.working {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.status-badge.solved {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}


.admin-tickets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 992px) {
    .admin-tickets-grid {
        grid-template-columns: 380px 1fr;
        gap: 24px;
        align-items: stretch;
    }
    #admin-tickets-list-card.hidden {
        display: block !important;
    }
    #btn-admin-back-to-tickets {
        display: none !important;
    }
}

.admin-ticket-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-ticket-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(var(--accent-rgb), 0.22);
}

.admin-ticket-item.active {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: var(--accent);
    box-shadow: inset 0 0 10px rgba(var(--accent-rgb), 0.05);
}


.status-change-btn {
    opacity: 0.5;
    transition: all 0.25s var(--ease);
}

.status-change-btn:hover {
    opacity: 0.8;
}

.status-change-btn.active {
    opacity: 1 !important;
}

.status-change-btn.pending.active {
    background: rgba(239, 68, 68, 0.16) !important;
    border-color: #ef4444 !important;
}

.status-change-btn.working.active {
    background: rgba(245, 158, 11, 0.16) !important;
    border-color: #f59e0b !important;
}

.status-change-btn.solved.active {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: #10b981 !important;
}


.chat-input-row .input-wrap input {
    height: 42px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
}


.admin-chat-placeholder {
    display: none !important;
}

@media (min-width: 992px) {
    .admin-chat-placeholder {
        display: flex !important;
    }
    .admin-chat-placeholder.hidden {
        display: none !important;
    }
}


.support-section {
    display: flex;
    flex-direction: column;
    flex: 1;
}

@media (max-width: 600px) {
    .support-section {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    #ticket-chat-card {
        height: auto !important;
        flex: 1;
        display: flex;
        flex-direction: column;
    }
}

/* ==========================================================================
   PORTAL WEB APP REDESIGN LAYOUT SYSTEM
   ========================================================================== */

/* Main Staff Dashboard Layout Overrides */
main.staff-dashboard {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 500;
    background: var(--bg-base);
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    display: flex;
    flex-direction: column;
}

.app-layout-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Sidebar Styling */
.app-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    height: 100%;
    overflow: hidden;
}

.sidebar-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 16px;
}

body[data-theme="white"] .sidebar-profile {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1.5px solid rgba(var(--accent-rgb), 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #d4af37);
    flex-shrink: 0;
}

.sidebar-profile-info {
    min-width: 0;
    flex: 1;
}

.sidebar-profile-info h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-role {
    font-size: 10.5px;
    color: var(--text-dim);
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

/* Sidebar Tab buttons styling overrides */
.app-sidebar #staff-sub-nav:not(.hidden) {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto;
    overflow-y: visible;
}

.app-sidebar .tab-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    margin: 0 !important;
}

.app-sidebar .tab-btn:not(.hidden) {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    background: transparent !important;
    border: 1.5px solid transparent !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    color: var(--text-dim) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: all 0.2s var(--ease) !important;
    margin: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    justify-content: flex-start !important;
}

.app-sidebar .tab-btn svg {
    width: 16px !important;
    height: 16px !important;
    color: var(--text-faint) !important;
    margin: 0 !important;
    flex-shrink: 0;
    transition: color 0.2s;
}

.app-sidebar .tab-btn:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-white) !important;
}

.app-sidebar .tab-btn:hover svg {
    color: var(--text-white) !important;
}

body[data-theme="white"] .app-sidebar .tab-btn:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

.app-sidebar .tab-btn.active {
    background: rgba(var(--accent-rgb), 0.1) !important;
    border-color: rgba(var(--accent-rgb), 0.2) !important;
    color: var(--text-white) !important;
}

.app-sidebar .tab-btn.active svg {
    color: var(--accent, #d4af37) !important;
}

body[data-theme="white"] .app-sidebar .tab-btn.active {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: rgba(0, 113, 227, 0.2) !important;
}

/* Sidebar Middle Spacer */
.sidebar-spacer {
    flex: 1;
    min-height: 12px;
}

/* Sidebar Settings (Language & Theme) */
.sidebar-settings {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    margin-bottom: 4px;
}

/* Sidebar Footer */
.sidebar-footer {
    flex: 0 0 auto;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body[data-theme="white"] .sidebar-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}

.sidebar-footer-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s var(--ease);
    font-family: var(--font) !important;
}

.sidebar-footer-btn svg {
    color: var(--text-faint);
    flex-shrink: 0;
    transition: color 0.2s;
}

.sidebar-footer-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
}

.sidebar-footer-btn:hover svg {
    color: var(--text-white);
}

body[data-theme="white"] .sidebar-footer-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.sidebar-footer-btn.logout:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.sidebar-footer-btn.logout:hover svg {
    color: #f87171;
}

/* Right Side Viewport */
.app-main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: transparent;
}

/* Top Header Bar */
.app-topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--card-border);
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    flex-shrink: 0;
}

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

.topbar-hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.topbar-hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
}

body[data-theme="white"] .topbar-hamburger-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

.topbar-title {
    font-size: 18px;
    font-weight: 850;
    color: var(--text-white);
    margin: 0;
    letter-spacing: -0.02em;
}

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

.topbar-stats-summary {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
}

body[data-theme="white"] .stat-bubble {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-count {
    font-family: var(--mono);
    color: var(--text-white);
    font-weight: 700;
}

/* Main Viewport Content */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    width: 100%;
}

.app-content::-webkit-scrollbar {
    width: 6px;
}

.app-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
}

.app-content::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-rgb), 0.3);
}

/* Overriding sub-panes formatting for app content */
.staff-panes-wrapper {
    margin-top: 10px;
}

/* Ensure metrics grid stays compact in app layout */
.app-content .staff-metrics-grid {
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    flex: 0 0 auto !important;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(10, 11, 14, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--card-border);
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 1001;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom);
}

body[data-theme="white"] .mobile-bottom-nav {
    background: rgba(245, 245, 247, 0.95);
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    width: 64px;
    height: 48px;
    border-radius: 8px;
    transition: all 0.2s var(--ease);
}

.mobile-nav-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-faint);
    transition: all 0.2s var(--ease);
}

.mobile-nav-btn:hover {
    color: var(--text-white);
}

.mobile-nav-btn.active {
    color: var(--accent, #d4af37) !important;
}

body[data-theme="white"] .mobile-nav-btn.active {
    color: var(--accent, #0071e3) !important;
}

.mobile-nav-btn.active svg {
    color: var(--accent, #d4af37) !important;
    transform: translateY(-1px);
}

body[data-theme="white"] .mobile-nav-btn.active svg {
    color: var(--accent, #0071e3) !important;
}

/* Backdrop for Mobile Slide out Sidebar */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
    z-index: 995;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        z-index: 1010;
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.8);
        border-right: 1px solid var(--card-border);
    }

    body[data-theme="white"] .app-sidebar {
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.05);
    }

    .app-sidebar.sidebar-open {
        transform: translateX(0);
    }

    .topbar-hamburger-btn {
        display: flex !important;
    }

    .topbar-left {
        gap: 16px !important;
    }

    .app-topbar {
        padding: 0 20px;
    }

    .topbar-stats-summary {
        display: none !important;
    }

    .app-content {
        padding: 20px;
        padding-bottom: 96px; /* spacing for bottom nav */
    }

    .mobile-bottom-nav {
        display: flex !important;
    }
}

/* Deep mobile fixes for layout alignment, table overflows, and font scaling */
@media (max-width: 768px) {
    /* Scale down body font-size globally */
    body {
        font-size: 13px !important;
    }

    /* Page-level overflow protection */
    .app-main-container {
        max-width: 100vw !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
    }

    .app-content {
        padding: 16px !important;
        padding-bottom: 96px !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .staff-panes-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .staff-panes-layout {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 16px !important;
        overflow: hidden !important;
    }

    /* Constrain cards so they never exceed viewport width */
    .staff-pane-card {
        padding: 16px 14px !important;
        border-radius: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Form group labels and headings font scaling */
    .pane-title {
        font-size: 14.5px !important;
    }
    
    .pane-desc {
        font-size: 11px !important;
        margin-top: 2px !important;
    }

    .form-group {
        gap: 6px !important;
        margin-bottom: 12px !important;
    }

    .form-group label {
        font-size: 11px !important;
        letter-spacing: 1px !important;
        margin-bottom: 4px !important;
    }

    /* Inputs optimization (shorter height, less bulk) */
    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="number"],
    textarea,
    select {
        padding: 10px 12px 10px 36px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        height: auto !important;
    }

    .input-icon {
        left: 12px !important;
        width: 14px !important;
        height: 14px !important;
    }

    /* Button adjustments */
    .btn {
        padding: 10px 16px !important;
        font-size: 13px !important;
        height: auto !important;
    }

    /* Metrics Grid side-by-side with 50% 50% width */
    .app-content .staff-metrics-grid,
    .staff-metrics-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
    }

    .staff-metrics-grid .metric-card {
        padding: 10px 10px !important;
        border-radius: 10px !important;
        gap: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .staff-metrics-grid .metric-card .metric-value {
        font-size: 15px !important;
    }

    .staff-metrics-grid .metric-card .metric-label {
        font-size: 9px !important;
        letter-spacing: 0px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .staff-metrics-grid .metric-icon {
        width: 28px !important;
        height: 28px !important;
        border-radius: 6px !important;
    }

    .staff-metrics-grid .metric-icon svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Clean horizontal scrolling on tables */
    .table-wrap {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
        box-sizing: border-box !important;
        margin-top: 10px !important;
        -webkit-overflow-scrolling: touch !important;
        border: 1px solid rgba(255,255,255,0.03) !important;
        border-radius: 8px !important;
    }

    body[data-theme="white"] .table-wrap {
        border-color: rgba(0, 0, 0, 0.04) !important;
    }

    /* Modern thin scrollbar styling for tables on mobile */
    .table-wrap::-webkit-scrollbar {
        height: 6px !important;
    }

    .table-wrap::-webkit-scrollbar-thumb {
        background: rgba(var(--accent-rgb), 0.3) !important;
        border-radius: 4px !important;
    }

    /* Smaller table cell sizes */
    .staff-table th {
        padding: 10px 12px !important;
        font-size: 9.5px !important;
        letter-spacing: 0.5px !important;
    }

    .staff-table td {
        padding: 10px 12px !important;
        font-size: 12px !important;
    }

    .user-profile-cell {
        gap: 8px !important;
    }

    .user-avatar {
        width: 28px !important;
        height: 28px !important;
        font-size: 10px !important;
    }

    .user-profile-td strong {
        font-size: 12px !important;
    }

    .user-telegram-link {
        font-size: 11px !important;
    }

    .cred-capsule {
        padding: 2px 6px !important;
        border-radius: 6px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }

    .cred-capsule svg {
        width: 10px !important;
        height: 10px !important;
    }

    /* Support Tickets Manager Responsive Grid Fixes */
    .admin-tickets-container {
        width: 100% !important;
        margin-top: 10px !important;
    }

    .admin-tickets-grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 16px !important;
    }

    .admin-tickets-list-card,
    .admin-chat-box {
        padding: 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        border-radius: 10px !important;
    }

    /* Topbar compact layout for mobile */
    .app-topbar {
        height: 58px !important;
        padding: 0 16px !important;
    }
    .topbar-title {
        font-size: 15px !important;
        max-width: 180px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    #topbar-btn-switch-inbox {
        padding: 6px 12px !important;
        width: auto !important;
        height: 32px !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0 !important;
    }
    #topbar-btn-switch-inbox svg {
        display: none !important;
    }
    .inbox-btn-text {
        display: inline !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
        text-transform: uppercase !important;
    }

    /* Table cells and head compactness */
    .staff-table th {
        padding: 8px 10px !important;
        font-size: 9px !important;
        letter-spacing: 0.3px !important;
    }
    .staff-table td {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    /* User details in table rows */
    .user-profile-cell {
        gap: 6px !important;
    }
    .user-avatar {
        width: 24px !important;
        height: 24px !important;
        font-size: 9px !important;
    }
    .user-id {
        font-size: 11px !important;
    }
    .user-telegram-link {
        font-size: 10px !important;
    }
    .user-credentials-card {
        padding: 2px 4px !important;
        gap: 4px !important;
        max-width: 130px !important;
    }
    .credential-item {
        font-size: 9px !important;
    }
    .cred-value {
        max-width: 45px !important;
    }
    .cred-icon {
        width: 10px !important;
        height: 10px !important;
    }
    .btn-copy-credentials svg {
        width: 10px !important;
        height: 10px !important;
    }

    /* Badges / Status / Pills */
    .all-access-badge-premium {
        padding: 2px 6px !important;
        font-size: 9px !important;
        letter-spacing: 0px !important;
    }
    .pulse-dot {
        width: 4px !important;
        height: 4px !important;
        margin-right: 4px !important;
    }
    .email-tag {
        padding: 2px 6px !important;
        font-size: 9px !important;
        gap: 4px !important;
    }
    .email-tag svg {
        width: 9px !important;
        height: 9px !important;
    }
    .expiry-date-text {
        font-size: 10.5px !important;
    }
    .expiry-date-text span {
        font-size: 10.5px !important;
    }
    .status-pill {
        padding: 2px 6px !important;
        font-size: 8px !important;
    }
    .perm-chip {
        padding: 2px 6px !important;
        font-size: 8px !important;
        gap: 3px !important;
    }
    .perm-chip svg {
        width: 9px !important;
        height: 9px !important;
    }

    /* Action buttons in tables */
    .btn-action-group {
        gap: 4px !important;
    }
    .btn-action {
        padding: 4px 8px !important;
        font-size: 9.5px !important;
        gap: 4px !important;
    }
    .btn-action svg {
        width: 10px !important;
        height: 10px !important;
    }

    /* User filters compactness */
    .user-filters {
        gap: 6px !important;
        margin-top: 8px !important;
    }
    .user-filters .btn {
        padding: 5px 10px !important;
        font-size: 10.5px !important;
        border-radius: 12px !important;
        height: auto !important;
    }

    /* Mobile version of dashboard-toggle-bar */
    .staff-top-bar {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
    }
    .staff-metrics-grid {
        flex: unset !important;
    }
    .dashboard-action-btns {
        margin: 0 auto !important;
        justify-content: center !important;
    }
    .dashboard-toggle-bar {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 4px !important;
        border-radius: 10px !important;
        margin-bottom: 16px !important;
        box-sizing: border-box !important;
    }
    .dashboard-toggle-bar .toggle-btn {
        padding: 8px 10px !important;
        font-size: 11.5px !important;
        justify-content: center !important;
        border-radius: 6px !important;
    }
    #pane-staff-imap .dashboard-toggle-bar {
        margin-bottom: 0 !important;
    }
}

.dashboard-toggle-bar.hidden,
.dashboard-action-btns.hidden,
.staff-top-bar.hidden,
.staff-metrics-grid.hidden {
    display: none !important;
}

/* Small tabs for verification type selection in inbox */
#verification-tabs-group .tab-bar {
    padding: 4px;
    border-radius: 12px;
}
#verification-tabs-group .tab-btn {
    padding: 10px 8px;
    font-size: 13px;
    gap: 6px;
    border-radius: 10px;
}
#verification-tabs-group .tab-btn svg {
    width: 18px;
    height: 18px;
}

/* Show sidebar navigation buttons on mobile view as well to match desktop menu */
@media (max-width: 1024px) {
    .app-sidebar {
        width: 280px;
        padding: 24px 20px;
    }
}

/* Sidebar selector chevron rotation on open */
#sidebar-lang-container.open .chevron-icon,
#sidebar-theme-container.open .chevron-icon {
    transform: rotate(180deg);
}

/* Sidebar selector dropdown overrides for inline accordion layout */
#sidebar-lang-dropdown,
#sidebar-theme-dropdown {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: all !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    max-height: 180px !important;
    overflow-y: auto !important;
}

/* Sidebar settings selector button compact style */
.app-sidebar .lang-selector-btn,
.app-sidebar .theme-selector-btn {
    width: 100% !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1.5px solid transparent !important;
    color: var(--text-dim) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: var(--font) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    transition: all 0.2s var(--ease) !important;
}

.app-sidebar .lang-selector-btn:hover,
.app-sidebar .theme-selector-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-white) !important;
}

body[data-theme="white"] .app-sidebar .lang-selector-btn:hover,
body[data-theme="white"] .app-sidebar .theme-selector-btn:hover {
    background: rgba(0, 0, 0, 0.04) !important;
}

@media (min-width: 1025px) {
    .allot-access-card {
        max-width: 860px !important;
        margin: 0 auto !important;
    }
}

/* --- Added Allotted Customers Enhancements --- */
.role-tag-admin {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    display: inline-block;
}

.btn-copy-login-url {
    background: none !important;
    border: none !important;
    color: var(--gold-400) !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.2s ease, transform 0.1s ease !important;
    padding: 2px !important;
    margin: 0 0 0 4px !important;
    vertical-align: middle;
}
.btn-copy-login-url:hover {
    color: var(--gold-200) !important;
    transform: scale(1.1) !important;
    background: none !important;
    border: none !important;
}
.btn-copy-login-url:active {
    transform: scale(0.9) !important;
}

.search-sort-bar {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}
.search-input-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.search-input-wrap input {
    width: 100%;
    padding: 8px 12px 8px 36px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
    font-family: var(--font) !important;
}
.search-input-wrap input:focus {
    border-color: rgba(212, 175, 55, 0.5) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    outline: none !important;
}
.search-input-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    color: var(--text-dim);
}
.sort-select-wrap select {
    padding: 8px 32px 8px 12px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    font-size: 13px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    font-family: var(--font) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' 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 10px center !important;
    background-size: 12px !important;
}
.sort-select-wrap select:focus {
    border-color: rgba(212, 175, 55, 0.5) !important;
    outline: none !important;
}

/* Expand collapsible Netflix email list */
.btn-toggle-emails {
    background: rgba(212, 175, 55, 0.12) !important;
    border: 1px solid rgba(212, 175, 55, 0.25) !important;
    color: var(--gold-300) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
}
.btn-toggle-emails:hover {
    background: rgba(212, 175, 55, 0.2) !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
}

@media (max-width: 768px) {
    /* Hide allotments, expiry, permissions columns on mobile for Allotted Customers table */
    #staff-users-table th:nth-child(2),
    #staff-users-table th:nth-child(3),
    #staff-users-table th:nth-child(4),
    #staff-users-table td:nth-child(2),
    #staff-users-table td:nth-child(3),
    #staff-users-table td:nth-child(4) {
        display: none !important;
    }

    /* Force table wrap to fit page width without horizontal sliding */
    .managed-users-card .table-wrap {
        overflow-x: hidden !important;
        border: none !important;
        max-width: 100% !important;
    }

    #staff-users-table {
        width: 100% !important;
        table-layout: fixed !important;
    }

    #staff-users-table th, #staff-users-table td {
        padding: 12px 6px !important;
    }
    
    #staff-users-table th:first-child, #staff-users-table td:first-child {
        width: 68% !important;
    }
    #staff-users-table th:last-child, #staff-users-table td:last-child {
        width: 32% !important;
        text-align: right !important;
    }

    /* Action buttons stack vertically */
    .managed-users-card .btn-action-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        align-items: stretch !important;
        width: 100% !important;
    }
    .managed-users-card .btn-action {
        margin: 0 !important;
        padding: 8px 6px !important;
        font-size: 11px !important;
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        border-radius: 6px !important;
    }

    /* Full screen mobile edit view overlay */
    #modal-edit-user {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        background: #0b0c10 !important;
        z-index: 9999 !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    #modal-edit-user .modal-card {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #0b0c10 !important;
        border: none !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #modal-edit-user form {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
        overflow: hidden !important;
    }

    #modal-edit-user .modal-body {
        flex: 1 !important;
        overflow-y: auto !important;
        padding: 16px 12px 24px 12px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #modal-edit-user .modal-header {
        padding: 16px 12px !important;
        margin-bottom: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    /* Decrease Edit User page font and adjust margins on mobile */
    #modal-edit-user h3 {
        font-size: 16px !important;
    }
    #modal-edit-user label {
        font-size: 9.5px !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 4px !important;
    }
    #modal-edit-user input[type="text"],
    #modal-edit-user input[type="number"],
    #modal-edit-user input[type="password"],
    #modal-edit-user textarea {
        font-size: 12px !important;
        padding: 8px 10px !important;
        border-radius: 6px !important;
    }
    #modal-edit-user .features-checkbox-grid .feature-checkbox-label div strong {
        font-size: 9px !important;
    }
    #modal-edit-user .features-checkbox-grid .feature-checkbox-label {
        padding: 6px 4px !important;
        min-height: 32px !important;
        border-radius: 6px !important;
    }
    #modal-edit-user .btn {
        font-size: 12.5px !important;
        padding: 9px !important;
        border-radius: 8px !important;
    }
    #modal-edit-user .form-group {
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }
    #modal-edit-user .form-group-row {
        gap: 8px !important;
        margin-bottom: 8px !important;
    }
    #modal-edit-user .edit-user-actions {
        position: static !important;
        width: 100% !important;
        background: #0d0e13 !important;
        border-top: 1.5px solid rgba(255, 255, 255, 0.05) !important;
        padding: 14px 12px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        gap: 12px !important;
        z-index: 10000 !important;
    }

    /* Mobile full screen support ticket chat box */
    #admin-ticket-chat-box:not(.hidden) {
        position: fixed !important;
        top: 58px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: calc(68px + env(safe-area-inset-bottom)) !important;
        width: 100vw !important;
        height: auto !important;
        background: #0b0c10 !important;
        z-index: 1000 !important;
        border-radius: 0 !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 16px 12px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #admin-ticket-chat-box .chat-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding-bottom: 8px !important;
        margin-bottom: 8px !important;
    }
    
    #admin-ticket-chat-box .chat-header > div:first-child {
        width: 100% !important;
        margin-right: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    #admin-ticket-chat-box .chat-header > div:last-child {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-shrink: 0 !important;
    }
    
    #admin-chat-subject {
        font-size: 13.5px !important;
    }
    
    #admin-chat-user-info {
        font-size: 9.5px !important;
    }

    #admin-chat-ticket-id {
        font-size: 10px !important;
    }
    
    #admin-chat-status-btns {
        gap: 4px !important;
    }
    
    #admin-chat-status-btns .status-change-btn {
        font-size: 8.5px !important;
        padding: 3px 8px !important;
        border-radius: 12px !important;
    }

    #btn-admin-delete-ticket {
        padding: 4px !important;
    }

    #btn-admin-delete-ticket svg {
        width: 13px !important;
        height: 13px !important;
    }

    #admin-ticket-chat-box .chat-messages {
        font-size: 12px !important;
        gap: 8px !important;
    }

    #admin-ticket-chat-box .chat-messages .message-bubble {
        padding: 8px 12px !important;
        border-radius: 10px !important;
    }

    #admin-ticket-chat-box .chat-input-row {
        margin-top: 10px !important;
        gap: 8px !important;
    }

    #admin-ticket-chat-box #admin-chat-message-input {
        font-size: 12px !important;
        padding: 10px 12px !important;
    }

    #admin-ticket-chat-box #btn-admin-send-chat {
        font-size: 12.5px !important;
        padding: 10px 16px !important;
        height: auto !important;
    }
}

/* Global role toggle button styling */
.role-toggle-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim, #a0a0b0);
}
.role-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}
.role-toggle-btn.active {
    background: rgba(212, 175, 55, 0.15) !important;
    border: 1px solid var(--accent, #d4af37) !important;
    color: var(--accent, #d4af37) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

/* Increase height of Netflix account allotment input box globally */
.allot-custom-emails-textarea {
    height: 180px !important;
    min-height: 150px !important;
}

/* Style sorting select options for dark theme support */
.sort-select-wrap select option {
    background-color: #121318 !important;
    color: #ffffff !important;
}

/* Date & Expiry display formatting fixes */
.stat-bubble {
    white-space: nowrap !important;
}

#topbar-stat-expiry {
    font-size: 11px !important;
    white-space: nowrap !important;
}

#metric-staff-expiry {
    font-size: 12.5px !important;
    white-space: nowrap !important;
}

.staff-metrics-grid .metric-card {
    max-width: 260px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🔑 API INTEGRATION & CLIENT KEYS STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
#pane-staff-api .staff-pane-card {
    background: rgba(18, 19, 24, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#pane-staff-api .staff-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-faint, #888899);
    padding: 12px 14px;
}

#pane-staff-api .staff-table td {
    padding: 14px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#pane-staff-api .staff-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
    #pane-staff-api .pane-header {
        flex-direction: column;
        align-items: flex-start;
    }
}