/* ===== VAULT LOGIN ANIMATION ===== */

/* Fullscreen overlay - covers everything */
.vault-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 999999;
    background: #050510;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.vault-overlay.visible { opacity: 1; }
.vault-overlay.fade-out {
    transition: opacity 0.8s ease;
    opacity: 0;
}

/* === PHASE 1: Access Granted === */
.vault-granted-wrap {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.5s;
}
.vault-granted-wrap.visible { opacity: 1; }
.vault-granted-wrap.hide {
    transition: opacity 0.4s;
    opacity: 0;
}

.vault-granted-flash {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.4), transparent 70%);
    transform: translate(-50%, -50%);
    animation: grantedFlashGrow 1s ease-out forwards;
    pointer-events: none;
}
@keyframes grantedFlashGrow {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200vmax; height: 200vmax; opacity: 0; }
}

.vault-granted-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    border: 3px solid var(--cyan);
    box-shadow: 0 0 30px rgba(0,255,255,0.4), 0 0 60px rgba(0,255,255,0.15);
    margin-bottom: 16px;
    animation: grantedAvatarPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes grantedAvatarPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.vault-granted-username {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.vault-granted-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: var(--green);
    text-shadow: 0 0 30px rgba(16,185,129,0.5), 0 0 60px rgba(16,185,129,0.2);
    animation: grantedGlitch 0.08s ease-in-out 4 0.3s;
}
@keyframes grantedGlitch {
    0% { transform: translate(0); }
    25% { transform: translate(-3px, 2px); text-shadow: 3px 0 var(--cyan), -3px 0 var(--magenta); }
    50% { transform: translate(3px, -1px); text-shadow: -3px 0 var(--cyan), 3px 0 var(--magenta); }
    75% { transform: translate(-1px, 3px); }
    100% { transform: translate(0); }
}

/* === PHASE 2: Vault Door === */
.vault-scene {
    position: relative;
    width: 500px; height: 600px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.6s;
}
.vault-scene.visible { opacity: 1; }

/* Vault frame (border around door) */
.vault-frame {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 4px solid #2a2a3e;
    border-radius: 12px;
    background: #0a0a1a;
    box-shadow:
        inset 0 0 60px rgba(0,0,0,0.8),
        0 0 80px rgba(0,255,255,0.05),
        0 0 2px #333;
    overflow: hidden;
}

/* The Door */
.vault-door {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(145deg, #1a1a2e 0%, #16162a 30%, #0f0f20 70%, #1a1a2e 100%);
    transform-origin: left center;
    transition: transform 1.4s cubic-bezier(0.55, 0, 0.1, 1);
    z-index: 5;
    border-right: 3px solid #0a0a15;
}
.vault-door::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(255,255,255,0.02) 29px, rgba(255,255,255,0.02) 30px);
    z-index: 1;
}
.vault-door::after {
    content: '';
    position: absolute; top: 0; right: 0; width: 30px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.5));
    z-index: 2;
}
.vault-door.open {
    transform: rotateY(-105deg);
}

/* Lock mechanism */
.vault-lock {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 160px; height: 160px;
    border-radius: 50%;
    border: 4px solid #333;
    background: radial-gradient(circle, #1a1a2e, #0f0f1e);
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,0,0,0.5), 0 0 2px rgba(0,255,255,0.1);
    z-index: 10;
}

.vault-lock-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 130px; height: 130px;
    border-radius: 50%;
    border: 3px solid rgba(0,255,255,0.15);
    transition: all 0.5s;
}
.vault-lock-ring.unlocking {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(16,185,129,0.3);
    animation: lockSpin 1s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes lockSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Lock ticks */
.vault-lock-ticks {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 150px; height: 150px;
}
.vault-tick {
    position: absolute;
    top: 0; left: 50%;
    width: 2px; height: 10px;
    background: rgba(255,255,255,0.15);
    transform-origin: 50% 75px;
}

/* Lock center icon */
.vault-lock-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: rgba(0,255,255,0.4);
    transition: all 0.5s;
    z-index: 11;
}
.vault-lock-icon.unlocked {
    color: var(--green);
    text-shadow: 0 0 20px rgba(16,185,129,0.5);
}

/* Bolts */
.vault-bolt {
    position: absolute;
    background: linear-gradient(90deg, #333, #555, #333);
    z-index: 8;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}
.vault-bolt.horizontal { width: 60px; height: 14px; top: 50%; transform: translateY(-50%); }
.vault-bolt.vertical { width: 14px; height: 60px; left: 50%; transform: translateX(-50%); }
.vault-bolt.bolt-left { left: -10px; }
.vault-bolt.bolt-right { right: -10px; }
.vault-bolt.bolt-top { top: -10px; }
.vault-bolt.bolt-bottom { bottom: -10px; }

.vault-bolt.retracted.bolt-left { transform: translateY(-50%) translateX(40px); opacity: 0.3; }
.vault-bolt.retracted.bolt-right { transform: translateY(-50%) translateX(-40px); opacity: 0.3; }
.vault-bolt.retracted.bolt-top { transform: translateX(-50%) translateY(40px); opacity: 0.3; }
.vault-bolt.retracted.bolt-bottom { transform: translateX(-50%) translateY(-40px); opacity: 0.3; }

/* Corner bolts */
.vault-corner-bolt {
    position: absolute;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, #444, #222);
    border: 2px solid #555;
    z-index: 9;
    box-shadow: inset 0 1px 3px rgba(255,255,255,0.1), 0 2px 5px rgba(0,0,0,0.5);
}
.vault-corner-bolt::after {
    content: '';
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 2px;
    background: #666; border-radius: 1px;
}
.vault-corner-bolt.tl { top: 20px; left: 20px; }
.vault-corner-bolt.tr { top: 20px; right: 20px; }
.vault-corner-bolt.bl { bottom: 20px; left: 20px; }
.vault-corner-bolt.br { bottom: 20px; right: 20px; }

/* Gears */
.vault-gear {
    position: absolute;
    z-index: 6;
    color: rgba(255,255,255,0.08);
    transition: color 0.5s;
}
.vault-gear.spinning { animation: gearSpin 2s linear infinite; color: rgba(0,255,255,0.15); }
.vault-gear.spinning.reverse { animation-direction: reverse; }
.vault-gear-1 { top: 15%; left: -30px; font-size: 4rem; }
.vault-gear-2 { bottom: 15%; left: -25px; font-size: 3rem; }
.vault-gear-3 { top: 10%; right: -30px; font-size: 3.5rem; }
.vault-gear-4 { bottom: 10%; right: -25px; font-size: 2.5rem; }
@keyframes gearSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Light behind door */
.vault-light {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,255,255,0.3), rgba(0,102,255,0.15), transparent 70%);
    opacity: 0; z-index: 1;
    transition: opacity 1s;
}
.vault-light.active { opacity: 1; }

/* Light beam */
.vault-beam {
    position: absolute;
    top: 0; left: 0;
    width: 8px; height: 100%;
    background: linear-gradient(180deg, transparent 5%, rgba(0,255,255,0.8) 20%, rgba(0,255,255,1) 50%, rgba(0,255,255,0.8) 80%, transparent 95%);
    box-shadow: 0 0 40px rgba(0,255,255,0.5), 0 0 80px rgba(0,255,255,0.3);
    opacity: 0; z-index: 4;
    filter: blur(2px);
    transition: opacity 0.5s, width 1s;
}
.vault-beam.active { opacity: 1; }
.vault-beam.wide {
    width: 100%; filter: blur(0);
    background: radial-gradient(ellipse at 30% 50%, rgba(0,255,255,0.4), rgba(0,102,255,0.2), transparent 80%);
}

/* Warning stripes */
.vault-warning-stripe {
    position: absolute;
    height: 6px; width: 100%;
    background: repeating-linear-gradient(90deg, transparent 0px, transparent 10px, rgba(0,255,255,0.08) 10px, rgba(0,255,255,0.08) 20px);
    z-index: 3;
}
.vault-warning-stripe.top { top: 8px; }
.vault-warning-stripe.bottom { bottom: 8px; }

/* Steam */
.vault-steam {
    position: absolute;
    width: 100%; height: 100%;
    z-index: 7; pointer-events: none; overflow: hidden;
}
.vault-steam-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,255,255,0.15), transparent 70%);
    animation: steamFloat 2s ease-out forwards;
}
@keyframes steamFloat {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0.6; }
    100% { transform: translate(var(--dx, 80px), var(--dy, -40px)) scale(2); opacity: 0; }
}

/* Sparks */
.vault-spark {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
    animation: sparkFly 0.8s ease-out forwards;
    z-index: 12;
}
@keyframes sparkFly {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--sx), var(--sy)) scale(0); opacity: 0; }
}

/* Status text under vault */
.vault-status {
    position: absolute;
    bottom: calc(50% - 340px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0,255,255,0.5);
    opacity: 0;
    transition: opacity 0.5s;
    white-space: nowrap;
    z-index: 15;
}
.vault-status.visible { opacity: 1; }

/* Ambient particles */
.vault-ambient-particle {
    position: absolute;
    width: 2px; height: 2px;
    border-radius: 50%;
    background: var(--cyan);
    opacity: 0;
    animation: ambientFloat 4s ease-in-out infinite;
}
@keyframes ambientFloat {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 0.4; transform: translateY(-30px); }
}

/* Shake */
@keyframes vaultShake {
    0%, 100% { transform: translate(0); }
    10% { transform: translate(-2px, 1px); }
    30% { transform: translate(2px, -1px); }
    50% { transform: translate(-1px, 2px); }
    70% { transform: translate(1px, -2px); }
    90% { transform: translate(-2px, 0); }
}
.vault-shake { animation: vaultShake 0.4s ease-in-out; }

/* Responsive */
@media (max-width: 600px) {
    .vault-scene { width: 90vw; height: 70vh; }
    .vault-lock { width: 120px; height: 120px; }
    .vault-lock-ring { width: 100px; height: 100px; }
    .vault-granted-text { font-size: 1.4rem; letter-spacing: 3px; }
}

/* ===== VAULT LOGOUT GOODBYE TEXT ===== */
.vault-goodbye-text {
    color: #f59e0b !important;
    text-shadow: 0 0 30px rgba(245,158,11,0.5), 0 0 60px rgba(245,158,11,0.2) !important;
}


/* ===== TOPBAR USER WITH ROLE ===== */
.topbar-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    line-height: 1.2;
}
#topbarName {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.topbar-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 6px;
}
.topbar-avatar {
    width: 40px !important;
    height: 40px !important;
    border-width: 2px !important;
    transition: box-shadow 0.3s;
}
.topbar-user:hover .topbar-avatar {
    box-shadow: 0 0 18px rgba(0,255,255,0.35);
}

/* ===== TOPBAR LOGOUT BUTTON ===== */
.topbar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(239,68,68,0.15);
    background: rgba(239,68,68,0.06);
    color: #ef4444;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
}
.topbar-logout-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239,68,68,0.15);
}


/* ===== DASHBOARD ENTRANCE ANIMATION ===== */
.dashboard-wrapper.anim-ready .sidebar {
    transform: translateX(-100%);
    opacity: 0;
}
.dashboard-wrapper.anim-ready .topbar {
    transform: translateY(-100%);
    opacity: 0;
}
.dashboard-wrapper.anim-ready .stat-card {
    transform: translateY(40px) scale(0.9);
    opacity: 0;
}
.dashboard-wrapper.anim-ready .dashboard-grid .card {
    transform: translateY(30px);
    opacity: 0;
}
.dashboard-wrapper.anim-active .sidebar {
    animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.dashboard-wrapper.anim-active .topbar {
    animation: slideInTop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}
.dashboard-wrapper.anim-active .stat-card:nth-child(1) {
    animation: popInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}
.dashboard-wrapper.anim-active .stat-card:nth-child(2) {
    animation: popInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}
.dashboard-wrapper.anim-active .stat-card:nth-child(3) {
    animation: popInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}
.dashboard-wrapper.anim-active .dashboard-grid .card {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.85s forwards;
}
@keyframes slideInLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}
@keyframes slideInTop {
    0% { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
@keyframes popInUp {
    0% { transform: translateY(40px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes fadeInUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}


/* ===== VAULT LOGOUT RED THEME ===== */

/* Red alarm flash */
.vl-alarm-flash {
    position: absolute; inset: 0;
    background: radial-gradient(circle, rgba(239,68,68,0.15), transparent 70%);
    opacity: 0; z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s;
}
.vl-alarm-flash.active {
    animation: vlAlarmPulse 1.5s ease-in-out infinite;
}
.vl-alarm-flash.slam {
    animation: vlAlarmSlam 0.3s ease-out;
}
@keyframes vlAlarmPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
@keyframes vlAlarmSlam {
    0% { opacity: 0; background: rgba(239,68,68,0.3); }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

/* Warning bars top/bottom */
.vl-warning-bar {
    position: absolute;
    left: 0; width: 100%;
    height: 28px;
    overflow: hidden;
    z-index: 20;
}
.vl-warning-bar.top { top: 0; }
.vl-warning-bar.bottom { bottom: 0; }
.vl-warning-stripe-scroll {
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        rgba(239,68,68,0.15) 0px,
        rgba(239,68,68,0.15) 12px,
        rgba(239,68,68,0.05) 12px,
        rgba(239,68,68,0.05) 24px
    );
    animation: vlStripeScroll 1.5s linear infinite;
}
@keyframes vlStripeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Red status text */
.vl-status-red {
    color: #ef4444 !important;
    text-shadow: 0 0 10px rgba(239,68,68,0.5) !important;
}

/* Red sparks */
.vl-spark-red {
    background: #ef4444 !important;
    box-shadow: 0 0 8px #ef4444 !important;
}

/* Red floating particles */
.vl-red-particles {
    position: absolute; inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.vl-red-particle {
    position: absolute;
    border-radius: 50%;
    animation: vlRedFloat 2.5s ease-out forwards;
}
@keyframes vlRedFloat {
    0% { transform: translate(0, 0) scale(0.5); opacity: 0.7; }
    100% { transform: translate(var(--rdx, 0), -100vh) scale(0); opacity: 0; }
}

/* Goodbye subtext */
.vl-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 12px;
    opacity: 0;
    animation: vlSubFade 0.5s ease-out 0.3s forwards;
}
@keyframes vlSubFade {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Avatar fading border for logout */
.vl-avatar-fade {
    border-color: #f59e0b !important;
    box-shadow: 0 0 30px rgba(245,158,11,0.4) !important;
}

/* Logout mode - slightly red-tinted background */
.vault-logout-mode {
    background: #0a0508 !important;
}


/* ===== USER DROPDOWN MENU ===== */
.topbar-user-wrap {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 6px 10px;
    border-radius: 12px;
    transition: background 0.2s;
}
.topbar-user-wrap:hover .topbar-user {
    background: rgba(255,255,255,0.04);
}
.topbar-chevron {
    font-size: 0.6rem;
    color: var(--text-secondary);
    margin-left: 4px;
    transition: transform 0.3s;
}
.topbar-user-wrap.open .topbar-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 1px rgba(0,255,255,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    overflow: hidden;
}
.topbar-user-wrap.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown header */
.ud-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}
.ud-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 12px rgba(0,255,255,0.2);
}
.ud-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ud-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.ud-id {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Divider */
.ud-divider {
    height: 1px;
    background: var(--border);
    margin: 0 12px;
}

/* Items */
.ud-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}
.ud-item:hover {
    background: rgba(255,255,255,0.04);
}
.ud-item i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.ud-item:hover i {
    color: var(--cyan);
}

/* Logout item - red */
.ud-logout {
    color: #ef4444 !important;
}
.ud-logout i {
    color: #ef4444 !important;
}
.ud-logout:hover {
    background: rgba(239,68,68,0.08) !important;
}

/* Theme toggle in dropdown */
.ud-toggle {
    margin-left: auto;
    width: 36px; height: 20px;
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
}
.ud-toggle-dot {
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: all 0.3s;
}
body.light-mode .ud-toggle {
    background: var(--cyan);
}
body.light-mode .ud-toggle-dot {
    left: 19px;
    background: white;
}


/* ===== ACCOUNT PAGE ===== */
.account-page { max-width: 800px; }
.account-header { margin-bottom: 24px; }
.account-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
}
.account-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid var(--cyan);
    box-shadow: 0 0 20px rgba(0,255,255,0.2);
}
.account-info { display: flex; flex-direction: column; gap: 4px; }
.account-info h2 { font-size: 1.3rem; font-weight: 700; }
.account-role {
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 2px 10px; border-radius: 6px;
    display: inline-flex; align-items: center; gap: 5px;
    width: fit-content;
}
.account-discord-id {
    font-size: 0.75rem; color: var(--text-secondary);
    font-family: monospace;
}
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 700px) {
    .account-grid { grid-template-columns: 1fr; }
}
.account-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.account-setting-info strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.account-setting-info p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
}
.account-toggle-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-hover);
    background: rgba(0,255,255,0.05);
    color: var(--cyan);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Inter, sans-serif;
    white-space: nowrap;
}
.account-toggle-btn:hover {
    background: rgba(0,255,255,0.1);
    transform: translateY(-1px);
}
.account-danger-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.06);
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Inter, sans-serif;
    white-space: nowrap;
}
.account-danger-btn:hover {
    background: rgba(239,68,68,0.12);
    transform: translateY(-1px);
}
.account-coming-soon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    font-weight: 500;
    white-space: nowrap;
}
.account-lang-badge {
    font-size: 0.8rem;
    color: var(--green);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ===== 2FA V2 — SCI-FI TRESOR OVERLAY ===== */

.tfa2-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 999999;
    background: #050510;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.tfa2-overlay.visible { opacity: 1; }
.tfa2-overlay.fade-out { transition: opacity 0.8s ease; opacity: 0; }

/* Vignette */
.tfa2-vignette {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
    pointer-events: none; z-index: 1;
}

/* Background hex grid */
.tfa2-bg-grid {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
    overflow: hidden;
}
.tfa2-hex {
    position: absolute;
    width: 60px; height: 60px;
    border: 1px solid rgba(0,255,255,0.04);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: tfa2HexPulse 8s ease-in-out infinite;
}
@keyframes tfa2HexPulse {
    0%, 100% { opacity: 0.3; border-color: rgba(0,255,255,0.03); }
    50% { opacity: 0.8; border-color: rgba(0,255,255,0.08); }
}

/* Floating particles */
.tfa2-particles {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 1;
    overflow: hidden;
}
.tfa2-particle-bg {
    position: absolute;
    border-radius: 50%;
    background: rgba(0,255,255,0.6);
    box-shadow: 0 0 4px rgba(0,255,255,0.4);
    opacity: 0;
    animation: tfa2FloatParticle linear infinite;
}
@keyframes tfa2FloatParticle {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-100vh) translateX(30px); }
}

/* Shield container */
.tfa2-shield-container {
    position: relative;
    width: 110px; height: 110px;
    margin-bottom: 28px;
    z-index: 10;
}
.tfa2-shield-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.6rem;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0,255,255,0.6), 0 0 60px rgba(0,255,255,0.2);
    z-index: 3;
    animation: tfa2IconFloat 3s ease-in-out infinite;
}
@keyframes tfa2IconFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-4px); }
}
.tfa2-shield-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,255,255,0.15), transparent 70%);
    filter: blur(10px);
    z-index: 1;
}
.tfa2-shield-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(0,255,255,0.2);
    z-index: 2;
}
.tfa2-ring-outer {
    width: 110px; height: 110px;
    animation: tfa2RingSpin 12s linear infinite;
    border-style: dashed;
    border-color: rgba(0,255,255,0.15);
}
.tfa2-ring-middle {
    width: 90px; height: 90px;
    animation: tfa2RingPulse 2.5s ease-in-out infinite;
}
.tfa2-ring-inner {
    width: 70px; height: 70px;
    animation: tfa2RingPulse 2.5s ease-in-out infinite 0.8s;
}
.tfa2-shield-scan {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 2px; height: 110px;
    background: linear-gradient(180deg, transparent, rgba(0,255,255,0.6), transparent);
    z-index: 4;
    animation: tfa2ScanRotate 3s linear infinite;
    transform-origin: 50% 50%;
}
@keyframes tfa2RingSpin { 0% { transform: translate(-50%,-50%) rotate(0deg); } 100% { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes tfa2RingPulse {
    0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.4; border-color: rgba(0,255,255,0.2); }
    50% { transform: translate(-50%,-50%) scale(1.1); opacity: 0.9; border-color: rgba(0,255,255,0.5); }
}
@keyframes tfa2ScanRotate {
    0% { transform: translateX(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}

/* Orange shield variant (setup) */
.tfa2-shield-orange .tfa2-shield-icon {
    color: #f59e0b;
    text-shadow: 0 0 30px rgba(245,158,11,0.6), 0 0 60px rgba(245,158,11,0.2);
}
.tfa2-shield-orange .tfa2-shield-glow {
    background: radial-gradient(circle, rgba(245,158,11,0.15), transparent 70%);
}
.tfa2-shield-orange .tfa2-shield-ring {
    border-color: rgba(245,158,11,0.2);
}
.tfa2-shield-orange .tfa2-ring-outer {
    border-color: rgba(245,158,11,0.15);
}
.tfa2-shield-orange .tfa2-shield-scan {
    background: linear-gradient(180deg, transparent, rgba(245,158,11,0.6), transparent);
}

/* Title with glitch effect */
.tfa2-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 6px;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0,255,255,0.4), 0 0 40px rgba(0,255,255,0.1);
    margin-bottom: 8px;
    text-align: center;
    z-index: 10;
    position: relative;
    animation: tfa2Glitch 4s ease-in-out infinite;
}
.tfa2-title::before,
.tfa2-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
}
.tfa2-title::before {
    color: #ff00ff;
    animation: tfa2GlitchLeft 4s ease-in-out infinite;
}
.tfa2-title::after {
    color: #00ff00;
    animation: tfa2GlitchRight 4s ease-in-out infinite;
}
@keyframes tfa2Glitch {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-2px, 1px); }
    94% { transform: translate(2px, -1px); }
    96% { transform: translate(-1px, 0); }
    98% { transform: translate(1px, 1px); }
}
@keyframes tfa2GlitchLeft {
    0%, 90%, 100% { opacity: 0; transform: translate(0); }
    92% { opacity: 0.4; transform: translate(-3px, 0); }
    94% { opacity: 0; transform: translate(0); }
    96% { opacity: 0.3; transform: translate(-2px, 1px); }
    98% { opacity: 0; }
}
@keyframes tfa2GlitchRight {
    0%, 91%, 100% { opacity: 0; transform: translate(0); }
    93% { opacity: 0.4; transform: translate(3px, 0); }
    95% { opacity: 0; }
    97% { opacity: 0.3; transform: translate(2px, -1px); }
    99% { opacity: 0; }
}
.tfa2-title-orange {
    color: #f59e0b;
    text-shadow: 0 0 20px rgba(245,158,11,0.4), 0 0 40px rgba(245,158,11,0.1);
    font-size: 1.4rem;
}

.tfa2-subtitle {
    font-size: 0.85rem;
    color: #8888aa;
    margin-bottom: 28px;
    text-align: center;
    max-width: 440px;
    z-index: 10;
    line-height: 1.5;
}

/* Code container */
.tfa2-code-container {
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
    padding: 20px 24px;
    background: rgba(0,255,255,0.02);
    border: 1px solid rgba(0,255,255,0.08);
    border-radius: 16px;
    backdrop-filter: blur(4px);
}
.tfa2-code-container.shake {
    animation: tfa2Shake 0.5s ease-in-out;
}
@keyframes tfa2Shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
    90% { transform: translateX(3px); }
}

.tfa2-code-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.tfa2-digit-separator {
    width: 12px; height: 3px;
    background: rgba(0,255,255,0.3);
    border-radius: 2px;
    margin: 0 2px;
}

.tfa2-digit {
    width: 52px; height: 64px;
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(0,255,255,0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 1.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    caret-color: transparent;
    position: relative;
}
.tfa2-digit:focus, .tfa2-digit.focused {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0,255,255,0.25), 0 0 40px rgba(0,255,255,0.08), inset 0 0 12px rgba(0,255,255,0.06);
    background: rgba(0,255,255,0.05);
    transform: translateY(-2px);
}
.tfa2-digit.filled {
    border-color: rgba(0,255,255,0.4);
    background: rgba(0,255,255,0.06);
    animation: tfa2DigitPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tfa2DigitPop {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.tfa2-digit.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 20px rgba(16,185,129,0.35), 0 0 40px rgba(16,185,129,0.1) !important;
    background: rgba(16,185,129,0.08) !important;
    color: #10b981 !important;
}
.tfa2-digit.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 20px rgba(239,68,68,0.35) !important;
    background: rgba(239,68,68,0.08) !important;
    color: #ef4444 !important;
}

/* Scanline animation over inputs */
.tfa2-code-scanline {
    position: absolute;
    top: 0; left: 0;
    width: 60px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,255,0.06), transparent);
    border-radius: 16px;
    animation: tfa2ScanlineMove 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes tfa2ScanlineMove {
    0% { left: -60px; }
    50% { left: calc(100% + 10px); }
    50.01% { left: -60px; opacity: 0; }
    60% { opacity: 1; }
    100% { left: -60px; }
}

/* Animated border */
.tfa2-code-border-anim {
    position: absolute;
    top: -1px; left: -1px;
    right: -1px; bottom: -1px;
    border-radius: 17px;
    pointer-events: none;
    z-index: 0;
    background: conic-gradient(from var(--tfa2-angle, 0deg), transparent, rgba(0,255,255,0.3), transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;
    animation: tfa2BorderRotate 4s linear infinite;
}
@keyframes tfa2BorderRotate {
    0% { --tfa2-angle: 0deg; }
    100% { --tfa2-angle: 360deg; }
}
@property --tfa2-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Status */
.tfa2-status {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    min-height: 22px;
    text-align: center;
    z-index: 10;
    margin-bottom: 16px;
    transition: all 0.3s;
}
.tfa2-status.checking {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0,255,255,0.5);
    animation: tfa2Pulse 1s ease-in-out infinite;
}
@keyframes tfa2Pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.tfa2-status.success {
    color: #10b981;
    text-shadow: 0 0 15px rgba(16,185,129,0.6);
}
.tfa2-status.error {
    color: #ef4444;
    text-shadow: 0 0 15px rgba(239,68,68,0.6);
}

/* Success overlay */
.tfa2-success-overlay {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    background: rgba(5,5,16,0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}
.tfa2-success-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.tfa2-success-check {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(16,185,129,0.15);
    border: 3px solid #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #10b981;
    margin-bottom: 20px;
    animation: tfa2CheckPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 40px rgba(16,185,129,0.3), 0 0 80px rgba(16,185,129,0.1);
}
@keyframes tfa2CheckPop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}
.tfa2-success-text {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: #10b981;
    text-shadow: 0 0 30px rgba(16,185,129,0.5);
    animation: tfa2Glitch 4s ease-in-out infinite;
}
.tfa2-success-particles {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.tfa2-burst-particle {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    animation: tfa2Burst 1.2s ease-out forwards;
}
@keyframes tfa2Burst {
    0% { transform: translate(0,0) scale(1); opacity: 1; }
    100% { transform: translate(var(--bx), var(--by)) scale(0); opacity: 0; }
}

/* Backup toggle & section */
.tfa2-backup-toggle {
    font-size: 0.8rem;
    color: #8888aa;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
    margin-bottom: 12px;
    user-select: none;
}
.tfa2-backup-toggle:hover { color: #00ffff; }

.tfa2-backup-section {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
    width: 100%;
    max-width: 340px;
    margin-bottom: 12px;
}
.tfa2-backup-section.visible { display: flex; }

.tfa2-backup-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(0,255,255,0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    letter-spacing: 3px;
    text-align: center;
    outline: none;
    transition: all 0.25s;
}
.tfa2-backup-input:focus {
    border-color: #00ffff;
    box-shadow: 0 0 20px rgba(0,255,255,0.2);
}
.tfa2-backup-btn {
    padding: 12px 24px;
    background: rgba(0,255,255,0.08);
    border: 1px solid rgba(0,255,255,0.25);
    border-radius: 10px;
    color: #00ffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Inter, sans-serif;
    display: flex; align-items: center; gap: 8px;
}
.tfa2-backup-btn:hover {
    background: rgba(0,255,255,0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0,255,255,0.15);
}

/* User bar */
.tfa2-user-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.tfa2-user-bar:hover { opacity: 0.8; }
.tfa2-user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(0,255,255,0.25);
}
.tfa2-user-name {
    font-size: 0.75rem;
    color: #8888aa;
    font-weight: 500;
}


/* ===== 2FA SETUP SPECIFIC ===== */

/* Steps indicator */
.tfa2-steps-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 28px;
    z-index: 10;
}
.tfa2-step-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(0,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #8888aa;
    transition: all 0.4s;
    background: rgba(0,0,0,0.3);
}
.tfa2-step-dot.active {
    border-color: #00ffff;
    color: #00ffff;
    box-shadow: 0 0 15px rgba(0,255,255,0.3);
    background: rgba(0,255,255,0.08);
}
.tfa2-step-dot.done {
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 10px rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.08);
}
.tfa2-step-line {
    width: 50px; height: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 1px;
    overflow: hidden;
}
.tfa2-step-line-fill {
    width: 0%; height: 100%;
    background: linear-gradient(90deg, #00ffff, #10b981);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}
.tfa2-step-line-fill.filled { width: 100%; }

/* Setup steps */
.tfa2-setup-step {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 460px;
    z-index: 10;
    animation: tfa2StepIn 0.4s ease-out;
}
.tfa2-setup-step.visible { display: flex; }
@keyframes tfa2StepIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.tfa2-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tfa2-step-title i { color: #00ffff; }
.tfa2-step-desc {
    font-size: 0.82rem;
    color: #8888aa;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Loading spinner */
.tfa2-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #8888aa;
    margin: 24px 0;
}
.tfa2-spinner {
    width: 24px; height: 24px;
    border: 2px solid rgba(0,255,255,0.15);
    border-top-color: #00ffff;
    border-radius: 50%;
    animation: tfa2SpinAnim 0.8s linear infinite;
}
@keyframes tfa2SpinAnim { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* QR Code area */
.tfa2-qr-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.tfa2-qr-frame {
    position: relative;
    padding: 16px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(0,255,255,0.1), 0 4px 30px rgba(0,0,0,0.4);
}
.tfa2-qr-img {
    width: 200px; height: 200px;
    display: block;
    border-radius: 4px;
}

/* Animated corners */
.tfa2-qr-corner {
    position: absolute;
    width: 20px; height: 20px;
    z-index: 2;
}
.tfa2-qr-corner::before, .tfa2-qr-corner::after {
    content: '';
    position: absolute;
    background: #00ffff;
    box-shadow: 0 0 6px rgba(0,255,255,0.5);
    animation: tfa2CornerPulse 2s ease-in-out infinite;
}
.tfa2-qr-corner.tl { top: -2px; left: -2px; }
.tfa2-qr-corner.tr { top: -2px; right: -2px; }
.tfa2-qr-corner.bl { bottom: -2px; left: -2px; }
.tfa2-qr-corner.br { bottom: -2px; right: -2px; }
.tfa2-qr-corner.tl::before, .tfa2-qr-corner.bl::before { left: 0; width: 20px; height: 3px; }
.tfa2-qr-corner.tr::before, .tfa2-qr-corner.br::before { right: 0; width: 20px; height: 3px; }
.tfa2-qr-corner.tl::after, .tfa2-qr-corner.tr::after { top: 0; width: 3px; height: 20px; }
.tfa2-qr-corner.bl::after, .tfa2-qr-corner.br::after { bottom: 0; width: 3px; height: 20px; }
.tfa2-qr-corner.tl::before { top: 0; } .tfa2-qr-corner.tl::after { left: 0; }
.tfa2-qr-corner.tr::before { top: 0; } .tfa2-qr-corner.tr::after { right: 0; }
.tfa2-qr-corner.bl::before { bottom: 0; } .tfa2-qr-corner.bl::after { left: 0; }
.tfa2-qr-corner.br::before { bottom: 0; } .tfa2-qr-corner.br::after { right: 0; }
@keyframes tfa2CornerPulse {
    0%, 100% { opacity: 0.6; box-shadow: 0 0 4px rgba(0,255,255,0.3); }
    50% { opacity: 1; box-shadow: 0 0 10px rgba(0,255,255,0.6); }
}

/* QR scan line */
.tfa2-qr-scan-line {
    position: absolute;
    top: 10%; left: 10%;
    width: 80%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,255,255,0.6), transparent);
    box-shadow: 0 0 10px rgba(0,255,255,0.3);
    animation: tfa2QrScan 2.5s ease-in-out infinite;
    z-index: 1;
}
@keyframes tfa2QrScan {
    0% { top: 10%; }
    50% { top: 85%; }
    100% { top: 10%; }
}

/* Secret key row */
.tfa2-secret-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.tfa2-secret-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #8888aa;
    text-transform: uppercase;
}
.tfa2-secret-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,255,255,0.12);
    border-radius: 10px;
}
.tfa2-secret-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #00ffff;
    letter-spacing: 2px;
    user-select: all;
}
.tfa2-copy-btn {
    background: none;
    border: none;
    color: #8888aa;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}
.tfa2-copy-btn:hover { color: #00ffff; background: rgba(0,255,255,0.08); }
.tfa2-copy-btn.copied { color: #10b981; }

/* Buttons */
.tfa2-btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    font-family: Inter, sans-serif;
    border: none;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}
.tfa2-btn-cyan {
    background: linear-gradient(135deg, rgba(0,255,255,0.12), rgba(0,255,255,0.06));
    border: 1px solid rgba(0,255,255,0.3);
    color: #00ffff;
}
.tfa2-btn-cyan:hover {
    background: linear-gradient(135deg, rgba(0,255,255,0.2), rgba(0,255,255,0.1));
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,255,255,0.2);
}
.tfa2-btn-green {
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06));
    border: 1px solid rgba(16,185,129,0.3);
    color: #10b981;
}
.tfa2-btn-green:hover {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.1));
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16,185,129,0.2);
}

/* Backup codes grid */
.tfa2-backup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 12px;
}
.tfa2-backup-code {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,255,255,0.08);
    border-radius: 10px;
    animation: tfa2CodeFadeIn 0.4s ease-out forwards;
    opacity: 0;
}
@keyframes tfa2CodeFadeIn {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}
.tfa2-backup-num {
    font-size: 0.65rem;
    font-weight: 700;
    color: #8888aa;
    min-width: 16px;
}
.tfa2-backup-code code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: #00ffff;
    letter-spacing: 1px;
}

.tfa2-copy-codes-btn {
    padding: 10px 20px;
    background: rgba(0,255,255,0.06);
    border: 1px solid rgba(0,255,255,0.15);
    border-radius: 10px;
    color: #00ffff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Inter, sans-serif;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px;
}
.tfa2-copy-codes-btn:hover {
    background: rgba(0,255,255,0.12);
    transform: translateY(-1px);
}
.tfa2-copy-codes-btn.copied {
    border-color: rgba(16,185,129,0.3);
    color: #10b981;
}

/* Warning box */
.tfa2-warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(239,68,68,0.05);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: 12px;
    margin-bottom: 8px;
    width: 100%;
    max-width: 380px;
}
.tfa2-warning-box i {
    color: #ef4444;
    font-size: 1.1rem;
    margin-top: 1px;
    flex-shrink: 0;
}
.tfa2-warning-box span {
    font-size: 0.78rem;
    color: #8888aa;
    line-height: 1.5;
}
.tfa2-warning-box strong {
    color: #ef4444;
}

/* Responsive */
@media (max-width: 500px) {
    .tfa2-digit { width: 42px; height: 54px; font-size: 1.4rem; }
    .tfa2-code-fields { gap: 6px; }
    .tfa2-title { font-size: 1.1rem; letter-spacing: 3px; }
    .tfa2-title-orange { font-size: 1rem; }
    .tfa2-qr-img { width: 160px; height: 160px; }
    .tfa2-backup-grid { grid-template-columns: 1fr; }
    .tfa2-code-container { padding: 14px 16px; }
}



/* ===== 2FA ACCOUNT CARD STYLES ===== */
.tfa-account-status {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tfa-account-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.tfa-account-dot.active {
    background: var(--green);
    box-shadow: 0 0 8px rgba(16,185,129,0.5);
}
.tfa-account-dot.inactive {
    background: var(--red);
    box-shadow: 0 0 8px rgba(239,68,68,0.3);
}

/* 2FA Settings Role Toggles */
.tfa-roles-section {
    margin-top: 16px;
}
.tfa-role-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    margin-bottom: 6px;
    transition: background 0.2s;
}
.tfa-role-toggle-row:hover {
    background: rgba(255,255,255,0.04);
}
.tfa-role-toggle-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tfa-role-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tfa-role-name {
    font-size: 0.85rem;
    font-weight: 600;
}


/* ===== MODAL BUTTONS ===== */
.btn-primary {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: Inter, sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,255,255,0.3); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-hover);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: Inter, sans-serif;
    transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.04); }


/* ===== BACKUP CODE VERIFY MODAL ===== */
.bv-overlay {
    position: fixed; inset: 0;
    z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.bv-overlay.visible { opacity: 1; }
.bv-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}
.bv-modal {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 20px;
    padding: 36px 40px;
    max-width: 460px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,255,255,0.05);
    animation: bvSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bvSlideIn {
    0% { transform: translateY(20px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}
.bv-modal.shake { animation: bvShake 0.4s ease-in-out; }
@keyframes bvShake {
    0%,100% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(8px); }
    45% { transform: translateX(-5px); }
    60% { transform: translateX(5px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(2px); }
}

/* Shield */
.bv-shield {
    position: relative;
    width: 70px; height: 70px;
    margin: 0 auto 20px;
}
.bv-shield-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(0,255,255,0.2);
    animation: bvRingPulse 3s ease-in-out infinite;
}
.bv-ring2 { inset: -8px; border-color: rgba(0,255,255,0.1); animation-delay: 1s; }
@keyframes bvRingPulse {
    0%,100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}
.bv-shield-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    color: var(--cyan);
    text-shadow: 0 0 15px rgba(0,255,255,0.4);
}

/* Title */
.bv-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--cyan);
    margin-bottom: 8px;
}
.bv-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Code inputs */
.bv-code-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
    padding: 16px;
    border: 1px solid rgba(0,255,255,0.1);
    border-radius: 14px;
    background: rgba(0,255,255,0.02);
}
.bv-scanline {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: bvScan 2.5s ease-in-out infinite;
    opacity: 0.6;
}
@keyframes bvScan {
    0%,100% { top: 0; }
    50% { top: calc(100% - 2px); }
}
.bv-digit {
    width: 44px; height: 54px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(0,255,255,0.15);
    border-radius: 10px;
    color: var(--cyan);
    outline: none;
    transition: all 0.2s;
    caret-color: var(--cyan);
}
.bv-digit:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0,255,255,0.2), inset 0 0 10px rgba(0,255,255,0.05);
}
.bv-digit.filled {
    border-color: rgba(0,255,255,0.4);
    background: rgba(0,255,255,0.05);
}
.bv-digit.success {
    border-color: var(--green) !important;
    color: var(--green) !important;
    box-shadow: 0 0 15px rgba(16,185,129,0.3) !important;
    background: rgba(16,185,129,0.08) !important;
}
.bv-digit.error {
    border-color: var(--red) !important;
    color: var(--red) !important;
    box-shadow: 0 0 15px rgba(239,68,68,0.3) !important;
    background: rgba(239,68,68,0.08) !important;
}
.bv-sep {
    font-size: 1.4rem;
    color: rgba(255,255,255,0.15);
    margin: 0 2px;
    font-weight: 300;
}

/* Status */
.bv-status {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 16px;
    min-height: 24px;
    transition: color 0.3s;
}
.bv-status.checking { color: var(--cyan); }
.bv-status.success { color: var(--green); }
.bv-status.error { color: var(--red); }

/* Buttons */
.bv-cancel {
    padding: 10px 24px;
    border-radius: 10px;
    border: 1px solid var(--border-hover);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: Inter, sans-serif;
    transition: all 0.2s;
}
.bv-cancel:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }


/* ===== DOWNLOAD ANIMATION ===== */
.dl-overlay {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    opacity: 0; transition: opacity 0.3s;
}
.dl-overlay.visible { opacity: 1; }

.dl-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 20px;
    padding: 0;
    width: 380px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(0,255,255,0.05);
    animation: bvSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scene */
.dl-scene {
    position: relative;
    height: 280px;
    background: linear-gradient(180deg, #0a0a1a 0%, var(--bg-card) 100%);
    overflow: hidden;
}
.dl-stars { position: absolute; inset: 0; }
.dl-star {
    position: absolute; border-radius: 50%;
    background: white; opacity: 0;
    animation: dlStarTwinkle 3s ease-in-out infinite;
}
@keyframes dlStarTwinkle {
    0%,100% { opacity: 0.1; } 50% { opacity: 0.7; }
}

/* Cloud */
.dl-cloud {
    position: absolute; top: 15%; left: 50%;
    transform: translateX(-50%);
    text-align: center;
    transition: all 0.5s;
}
.dl-cloud-icon { font-size: 3.5rem; color: rgba(0,255,255,0.2); transition: all 0.5s; }
.dl-cloud-arrow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem; color: rgba(0,255,255,0.3);
    animation: dlArrowBounce 1.5s ease-in-out infinite;
}
@keyframes dlArrowBounce {
    0%,100% { transform: translate(-50%,-50%) translateY(0); }
    50% { transform: translate(-50%,-50%) translateY(5px); }
}
.dl-cloud.active .dl-cloud-icon { color: var(--cyan); text-shadow: 0 0 30px rgba(0,255,255,0.5); }
.dl-cloud.active .dl-cloud-arrow { color: var(--cyan); }

/* Beam */
.dl-beam {
    position: absolute; top: 30%; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 0; opacity: 0;
    background: linear-gradient(180deg, rgba(0,255,255,0.6), rgba(0,255,255,0.1), transparent);
    box-shadow: 0 0 20px rgba(0,255,255,0.3);
    transition: all 0.8s;
    filter: blur(1px);
}
.dl-beam.active { height: 55%; opacity: 1; }

/* File */
.dl-file {
    position: absolute; top: 22%; left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
}
.dl-file.flying { opacity: 1; }
.dl-file-icon {
    width: 40px; height: 48px;
    background: linear-gradient(135deg, rgba(0,255,255,0.15), rgba(0,102,255,0.1));
    border: 2px solid rgba(0,255,255,0.4);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--cyan);
    box-shadow: 0 0 15px rgba(0,255,255,0.3);
    animation: dlFilePulse 0.6s ease-in-out infinite alternate;
}
@keyframes dlFilePulse {
    0% { box-shadow: 0 0 15px rgba(0,255,255,0.3); }
    100% { box-shadow: 0 0 25px rgba(0,255,255,0.5); }
}
.dl-file-trail {
    position: absolute; top: -30px; left: 50%;
    transform: translateX(-50%);
    width: 2px; height: 30px;
    background: linear-gradient(180deg, transparent, rgba(0,255,255,0.4));
    border-radius: 1px;
}

/* Target (PC) */
.dl-target {
    position: absolute; bottom: 14%; left: 50%;
    transform: translateX(-50%);
    text-align: center;
    transition: all 0.3s;
}
.dl-target-icon { font-size: 2.5rem; color: rgba(255,255,255,0.15); transition: all 0.3s; }
.dl-target.received .dl-target-icon {
    color: var(--green); text-shadow: 0 0 20px rgba(16,185,129,0.5);
    animation: dlTargetPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes dlTargetPop {
    0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); }
}

/* Particles */
.dl-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dl-particle {
    position: absolute; border-radius: 50%;
    animation: dlParticleFloat 1.8s ease-out forwards;
}
@keyframes dlParticleFloat {
    0% { transform: translate(0,0) scale(1); opacity: 0.7; }
    100% { transform: translate(var(--ddx,0), 120px) scale(0); opacity: 0; }
}
.dl-success-particle {
    position: absolute; border-radius: 50%;
    animation: dlSuccessBurst 0.8s ease-out forwards;
}
@keyframes dlSuccessBurst {
    0% { transform: translate(0,0) scale(1); opacity: 1; }
    100% { transform: translate(var(--spx,0), var(--spy,0)) scale(0); opacity: 0; }
}

/* Info section */
.dl-info { padding: 20px 24px; }
.dl-progress-bar {
    width: 100%; height: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px; overflow: hidden;
    margin-bottom: 12px;
}
.dl-progress-fill {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    border-radius: 4px;
    transition: width 0.1s linear, background 0.3s;
}
.dl-file-name {
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px;
}
.dl-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}


/* ===== 2FA ACCOUNT CARD LAYOUT ===== */
.account-setting-2fa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.account-2fa-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.account-2fa-buttons .account-toggle-btn,
.account-2fa-buttons .account-danger-btn {
    white-space: nowrap;
    margin: 0;
}


/* ===== SESSIONS & TRUSTED IPS ===== */
.sessions-loading {
    text-align: center; padding: 20px;
    color: var(--text-secondary); font-size: 0.85rem;
}
.sessions-empty {
    text-align: center; padding: 16px;
    color: var(--text-secondary); font-size: 0.85rem;
    line-height: 1.6;
}
.session-current {
    display: flex; align-items: center; gap: 14px;
    padding: 14px;
    background: rgba(0,255,255,0.03);
    border: 1px solid rgba(0,255,255,0.1);
    border-radius: 12px;
}
.session-current-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(0,255,255,0.08);
    color: var(--cyan); font-size: 1rem;
}
.session-current-info { flex: 1; }
.session-current-info strong {
    display: block; font-size: 0.85rem; margin-bottom: 2px;
}
.session-ip-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem; font-weight: 600;
    color: var(--cyan);
    background: rgba(0,255,255,0.06);
    padding: 2px 8px; border-radius: 6px;
    border: 1px solid rgba(0,255,255,0.1);
}
.session-current-dot {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.75rem; font-weight: 600;
    color: var(--green);
}
.session-dot-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px rgba(16,185,129,0.5);
    animation: sessionDotPulse 2s ease-in-out infinite;
}
@keyframes sessionDotPulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.session-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0;
}
.session-list-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary);
}
.session-clear-all {
    background: none; border: none;
    color: var(--red); font-size: 0.75rem;
    cursor: pointer; font-family: Inter, sans-serif;
    font-weight: 500;
    display: flex; align-items: center; gap: 4px;
    opacity: 0.7; transition: opacity 0.2s;
}
.session-clear-all:hover { opacity: 1; }
.session-ip-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: background 0.2s;
}
.session-ip-row:hover { background: rgba(255,255,255,0.02); }
.session-ip-row.current { background: rgba(0,255,255,0.02); }
.session-ip-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary); font-size: 0.85rem;
}
.session-ip-row.current .session-ip-icon { color: var(--cyan); background: rgba(0,255,255,0.06); }
.session-ip-info { flex: 1; }
.session-ip-addr {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}
.session-badge-current {
    font-size: 0.6rem; font-weight: 700;
    background: rgba(0,255,255,0.1);
    color: var(--cyan);
    padding: 1px 6px; border-radius: 4px;
    letter-spacing: 0.5px;
    font-family: Inter, sans-serif;
}
.session-ip-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.session-ip-remove {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; border: none;
    background: rgba(239,68,68,0.06);
    color: rgba(239,68,68,0.6);
    cursor: pointer; font-size: 0.75rem;
    transition: all 0.2s;
}
.session-ip-remove:hover {
    background: rgba(239,68,68,0.12);
    color: var(--red);
}
.session-actions {
    display: flex; justify-content: flex-end;
    padding-top: 4px;
}

/* ===== UNIVERSAL SEARCH - TOPBAR ===== */
.topbar-search-wrap {
    position: relative;
    flex: 1;
    max-width: 420px;
    margin: 0 24px;
    z-index: 1000;
}

.topbar-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search-icon {
    position: absolute;
    left: 14px;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    pointer-events: none;
    transition: color 0.2s;
}

.topbar-search-input-wrap:focus-within .topbar-search-icon {
    color: var(--cyan);
}

.topbar-search-input {
    width: 100%;
    padding: 9px 80px 9px 38px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.topbar-search-input::placeholder {
    color: rgba(255,255,255,0.25);
}

.topbar-search-input:focus {
    background: rgba(0,255,255,0.04);
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(0,255,255,0.06), 0 4px 16px rgba(0,0,0,0.2);
}

.topbar-search-kbd {
    position: absolute;
    right: 10px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    font-family: inherit;
    pointer-events: none;
    transition: opacity 0.2s;
}

.topbar-search-input:focus ~ .topbar-search-kbd {
    opacity: 0;
}

/* ===== SEARCH DROPDOWN ===== */
.topbar-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,255,255,0.05);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all 0.2s ease;
    max-height: 420px;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.topbar-search-dropdown.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

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

.topbar-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.topbar-search-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0,255,255,0.15);
    border-radius: 10px;
}

.search-dd-section {
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.search-dd-section:last-of-type {
    border-bottom: none;
}

.search-dd-label {
    padding: 8px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.35);
}

.search-dd-label i {
    margin-right: 6px;
    font-size: 10px;
    color: var(--cyan);
}

.search-dd-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}

.search-dd-item:hover {
    background: rgba(0,255,255,0.06);
}

.search-dd-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.search-dd-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.search-dd-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dd-arrow {
    color: rgba(255,255,255,0.15);
    font-size: 11px;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.search-dd-item:hover .search-dd-arrow {
    color: var(--cyan);
    transform: translateX(2px);
}

.search-dd-loading {
    padding: 20px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}

.search-dd-loading i {
    margin-right: 8px;
    color: var(--cyan);
}

.search-dd-empty {
    padding: 24px 16px;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-size: 13px;
}

.search-dd-empty i {
    margin-right: 8px;
    opacity: 0.5;
}

.search-dd-footer {
    padding: 10px 16px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--cyan);
    cursor: pointer;
    border-top: 1px solid var(--border);
    transition: background 0.15s;
}

.search-dd-footer:hover {
    background: rgba(0,255,255,0.06);
}

.search-dd-footer i {
    margin-right: 6px;
    font-size: 11px;
}

/* ===== SEARCH BADGES ===== */
.search-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.search-badge.ban {
    background: rgba(239,68,68,0.15);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.2);
}

.search-badge.mute {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.2);
}

.search-badge.clean {
    background: rgba(16,185,129,0.15);
    color: var(--green);
    border: 1px solid rgba(16,185,129,0.2);
}

.search-badge.history {
    background: rgba(139,92,246,0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139,92,246,0.2);
}

.search-badge.perm {
    background: rgba(59,130,246,0.15);
    color: #3b82f6;
    border: 1px solid rgba(59,130,246,0.2);
}

.search-badge.team {
    border: 1px solid currentColor;
    opacity: 0.9;
}

/* ===== SEARCH PAGE ===== */
.search-page {
    padding: 0;
}

.search-page-header {
    margin-bottom: 24px;
}

.search-big-input-wrap {
    position: relative;
    margin-bottom: 16px;
}

.search-big-input-wrap i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.3);
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s;
}

.search-big-input-wrap:focus-within i {
    color: var(--cyan);
}

.search-big-input-wrap input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.25s ease;
}

.search-big-input-wrap input::placeholder {
    color: rgba(255,255,255,0.25);
}

.search-big-input-wrap input:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 3px rgba(0,255,255,0.06), 0 4px 20px rgba(0,0,0,0.2);
}

/* Search filters */
.search-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-filter {
    padding: 7px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.search-filter:hover {
    background: rgba(0,255,255,0.06);
    border-color: var(--border-hover);
    color: rgba(255,255,255,0.7);
}

.search-filter.active {
    background: rgba(0,255,255,0.1);
    border-color: rgba(0,255,255,0.3);
    color: var(--cyan);
}

.search-filter i {
    font-size: 11px;
}

/* Search results sections */
.search-section {
    margin-bottom: 24px;
}

.search-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-section h4 i {
    color: var(--cyan);
    font-size: 13px;
}

/* Search cards */
.search-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 14px;
}

.search-card:hover {
    background: rgba(0,255,255,0.04);
    border-color: var(--border-hover);
    transform: translateX(4px);
}

.search-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.search-card-info {
    flex: 1;
    min-width: 0;
}

.search-card-info h5 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.search-card > i.fa-chevron-right {
    color: rgba(255,255,255,0.15);
    font-size: 12px;
    flex-shrink: 0;
    transition: color 0.2s, transform 0.2s;
}

.search-card:hover > i.fa-chevron-right {
    color: var(--cyan);
    transform: translateX(3px);
}

/* Search empty state */
.search-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: rgba(255,255,255,0.25);
}

.search-empty-state i {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.4;
}

.search-empty-state p {
    font-size: 14px;
    margin: 0;
}

.search-loading {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
}

.search-loading i {
    margin-right: 8px;
    color: var(--cyan);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .topbar-search-wrap {
        display: none;
    }
}

@media (max-width: 600px) {
    .search-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .search-filters::-webkit-scrollbar {
        display: none;
    }
    .search-filter {
        flex-shrink: 0;
    }
}


/* ===== PLAYER PROFILE STYLES ===== */
.player-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
}
.player-loading i {
    font-size: 32px;
    color: #00ffff;
}

/* Header */
.pp-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #161638 0%, #1a1a45 100%);
    border-radius: 16px;
    border: 1px solid rgba(0,255,255,0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.pp-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
}
.pp-back {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.pp-back:hover {
    background: rgba(0,255,255,0.1);
    border-color: rgba(0,255,255,0.3);
    color: #00ffff;
}
.pp-avatar {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    border: 2px solid rgba(0,255,255,0.2);
    box-shadow: 0 0 20px rgba(0,255,255,0.1);
    flex-shrink: 0;
    image-rendering: pixelated;
}
.pp-header-info {
    flex: 1;
    min-width: 0;
}
.pp-header-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}
.pp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.pp-badge-ban { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.pp-badge-mute { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }
.pp-badge-clean { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.pp-badge-perm { background: rgba(0,255,255,0.1); color: #00ffff; border: 1px solid rgba(0,255,255,0.2); }

/* Tabs */
.pp-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #111128;
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.05);
    overflow-x: auto;
}
.pp-tab {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pp-tab:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
}
.pp-tab.active {
    background: rgba(0,255,255,0.1);
    color: #00ffff;
    box-shadow: 0 0 10px rgba(0,255,255,0.1);
}

/* Cards */
.pp-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.pp-card {
    background: #161638;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    transition: border-color 0.2s;
}
.pp-card:hover {
    border-color: rgba(0,255,255,0.15);
}
.pp-card-danger {
    border-color: rgba(239,68,68,0.2);
    background: linear-gradient(135deg, #161638 0%, rgba(239,68,68,0.05) 100%);
}
.pp-card-warning {
    border-color: rgba(245,158,11,0.2);
    background: linear-gradient(135deg, #161638 0%, rgba(245,158,11,0.05) 100%);
}
.pp-card-title {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-card-title i {
    color: #00ffff;
    font-size: 14px;
}
.pp-card-body {
    padding: 16px 18px;
}
.pp-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}
.pp-stat-row:last-child {
    border-bottom: none;
}
.pp-stat-row span:last-child {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}
.pp-val-red { color: #ef4444 !important; }
.pp-val-green { color: #10b981 !important; }
.pp-val-cyan { color: #00ffff !important; }
.pp-val-mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.pp-empty {
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    text-align: center;
    padding: 16px 0;
    margin: 0;
}

/* Tables */
.pp-table-wrap {
    overflow-x: auto;
}
.pp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.pp-table th {
    text-align: left;
    padding: 10px 12px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pp-table td {
    padding: 10px 12px;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.pp-table tr:last-child td {
    border-bottom: none;
}
.pp-table tr:hover td {
    background: rgba(0,255,255,0.02);
}

/* Permissions list */
.pp-perm-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pp-perm-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-perm-pos {
    background: rgba(16,185,129,0.08);
    color: #10b981;
}
.pp-perm-neg {
    background: rgba(239,68,68,0.08);
    color: #ef4444;
}
.pp-perm-group {
    background: rgba(0,255,255,0.08);
    color: #00ffff;
}

/* Alt accounts */
.pp-alt-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pp-alt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}
.pp-alt-item:hover {
    border-color: rgba(0,255,255,0.3);
    background: rgba(0,255,255,0.05);
}
.pp-alt-item img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    image-rendering: pixelated;
}
.pp-alt-item i {
    color: rgba(255,255,255,0.3);
    font-size: 10px;
    margin-left: auto;
}

/* Links */
.pp-link {
    color: #00ffff;
    text-decoration: none;
    font-size: 12px;
}
.pp-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .pp-header {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }
    .pp-back {
        position: absolute;
        top: 12px;
        left: 12px;
    }
    .pp-avatar {
        width: 80px;
        height: 80px;
    }
    .pp-badges {
        justify-content: center;
    }
    .pp-overview-grid {
        grid-template-columns: 1fr;
    }
    .pp-tabs {
        gap: 2px;
        padding: 3px;
    }
    .pp-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
}


/* ===== EVIDENCE FORM IN PLAYER PROFILE ===== */
.pp-add-btn {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0,255,255,0.15);
    background: rgba(0,255,255,0.05);
    color: var(--cyan);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: Inter, sans-serif;
    transition: all 0.2s;
}
.pp-add-btn:hover { background: rgba(0,255,255,0.1); }

.pp-evidence-form {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-hover);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.pp-ev-types {
    display: flex; gap: 8px; margin-bottom: 14px;
}
.pp-ev-type {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem; font-weight: 500;
    cursor: pointer; font-family: Inter, sans-serif;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.2s;
}
.pp-ev-type:hover { border-color: var(--border-hover); color: var(--text-primary); }
.pp-ev-type.active { border-color: var(--cyan); color: var(--cyan); background: rgba(0,255,255,0.05); }

.pp-ev-dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 24px;
    border: 2px dashed var(--border-hover);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.pp-ev-dropzone:hover { border-color: var(--cyan); background: rgba(0,255,255,0.02); }
.pp-ev-dropzone i { font-size: 1.5rem; color: var(--cyan); }
.pp-ev-dropzone small { font-size: 0.7rem; }

.pp-ev-fields {
    display: flex; gap: 10px; margin-bottom: 12px;
}
.pp-input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: Inter, sans-serif;
    outline: none;
    transition: border-color 0.2s;
}
.pp-input:focus { border-color: var(--cyan); }
.pp-input-wide { flex: 1; }
.pp-select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.2);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: Inter, sans-serif;
    outline: none;
    cursor: pointer;
}
.pp-ev-actions {
    display: flex; gap: 10px; justify-content: flex-end;
}

/* Evidence cards */
.pp-ev-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.pp-ev-card:hover { border-color: var(--border-hover); }
.pp-ev-card-header {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
}
.pp-ev-card-type { font-size: 1.1rem; width: 24px; text-align: center; }
.pp-ev-card-info { flex: 1; }
.pp-ev-card-desc { font-size: 0.85rem; font-weight: 500; display: block; }
.pp-ev-card-meta { font-size: 0.72rem; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.pp-ev-open {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    color: var(--cyan); font-size: 0.8rem;
    transition: background 0.2s;
    text-decoration: none;
}
.pp-ev-open:hover { background: rgba(0,255,255,0.08); }
.pp-ev-delete {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px; border: none;
    background: transparent;
    color: rgba(239,68,68,0.5); font-size: 0.8rem;
    cursor: pointer; transition: all 0.2s;
}
.pp-ev-delete:hover { background: rgba(239,68,68,0.08); color: var(--red); }
.pp-ev-preview { padding: 0 14px 12px; }
.pp-ev-preview img {
    max-width: 100%; max-height: 200px;
    border-radius: 8px; cursor: pointer;
    transition: opacity 0.2s;
}
.pp-ev-preview img:hover { opacity: 0.8; }
.pp-ev-preview video { max-width: 100%; max-height: 200px; border-radius: 8px; }
