/* ============================================================
   AI VOID — USER DASHBOARD — ULTIMATE REMASTER
   Deep Void × Neon Arcane × Holographic Glass
   ============================================================ */

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

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
    /* Void Depths */
    --bg-deep:           #02020e;
    --bg-primary:        #06060f;
    --bg-secondary:      #0b0b1a;
    --bg-card:           rgba(8, 8, 22, 0.72);
    --bg-card-solid:     #0d0d22;
    --bg-glass:          rgba(255, 255, 255, 0.025);
    --bg-glass-hover:    rgba(255, 255, 255, 0.055);
    --bg-input:          rgba(0, 0, 0, 0.45);

    /* Neon Palette */
    --primary:           #7c3aed;
    --accent:            #7c3aed;
    --accent-light:      #c4b5fd;
    --accent-glow:       rgba(124, 58, 237, 0.45);
    --accent-subtle:     rgba(124, 58, 237, 0.1);
    --accent2:           #00e5ff;
    --accent2-glow:      rgba(0, 229, 255, 0.3);
    --accent3:           #ff2d78;
    --accent3-glow:      rgba(255, 45, 120, 0.35);
    --accent4:           #00ffb3;

    /* Status */
    --success:           #00e5a0;
    --danger:            #ff3355;
    --warning:           #ffb800;
    --info:              #00aaff;

    /* Typography */
    --text:              #eeeeff;
    --text-secondary:    #8892aa;
    --text-muted:        #505870;

    /* Borders */
    --border:            rgba(124, 58, 237, 0.14);
    --border-hover:      rgba(124, 58, 237, 0.4);
    --border-subtle:     rgba(255, 255, 255, 0.055);
    --border-glow:       rgba(0, 229, 255, 0.2);

    /* Shadows */
    --shadow-sm:         0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md:         0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg:         0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow:       0 0 80px rgba(124, 58, 237, 0.18);
    --shadow-card:       0 4px 32px rgba(0, 0, 0, 0.4),
                         inset 0 1px 0 rgba(255, 255, 255, 0.04),
                         inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    --shadow-neon:       0 0 20px var(--accent-glow),
                         0 0 60px rgba(124, 58, 237, 0.1);
    --shadow-cyan:       0 0 20px var(--accent2-glow),
                         0 0 60px rgba(0, 229, 255, 0.08);

    /* Layout */
    --sidebar-w:         272px;
    --radius-sm:         10px;
    --radius-md:         14px;
    --radius-lg:         20px;
    --radius-xl:         28px;

    /* Motion */
    --ease:              cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out:          cubic-bezier(0, 0, 0.2, 1);
    --t-fast:            0.15s;
    --t-normal:          0.3s;
    --t-slow:            0.55s;
}

/* ─── RESET & BASE ──────────────────────────────────────── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body.dark-theme {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    cursor: default;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--accent2); }

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--accent2));
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { opacity: 0.8; }
::selection { background: rgba(124, 58, 237, 0.35); color: #fff; }

/* ─── ANIMATED BACKGROUND ───────────────────────────────── */
.bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Deep space gradient */
.bg-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 900px 700px at 10% 15%,  rgba(124, 58, 237, 0.1)  0%, transparent 65%),
        radial-gradient(ellipse 700px 600px at 90% 85%,  rgba(0,  229, 255, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse 600px 500px at 50% 50%,  rgba(255, 45, 120, 0.05) 0%, transparent 65%),
        radial-gradient(ellipse 400px 300px at 75% 20%,  rgba(124, 58, 237, 0.05) 0%, transparent 60%);
}

/* Scanline overlay */
.bg-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    pointer-events: none;
    opacity: 0.4;
}

/* Star field */
.bg-wrapper .orb-1::after,
.bg-wrapper .orb-2::after {
    content: '';
    position: absolute;
    inset: -100%;
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 60%, rgba(255,255,255,0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 30%, rgba(200,180,255,0.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 20%, rgba(255,255,255,0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 50%, rgba(180,220,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.25) 0%, transparent 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.3;
    will-change: transform;
}

.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, #2d0a8f 50%, transparent 100%);
    top: -200px; left: -150px;
    animation: orbFloat1 28s ease-in-out infinite;
}

.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent3) 0%, #800040 50%, transparent 100%);
    bottom: -150px; right: -100px;
    animation: orbFloat2 34s ease-in-out infinite;
}

.orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--accent2) 0%, #003d55 60%, transparent 100%);
    top: 40%; left: 40%;
    opacity: 0.12;
    filter: blur(100px);
    animation: orbFloat3 40s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%,100% { transform: translate(0,0) scale(1) rotate(0deg); }
    25%      { transform: translate(70px, 50px) scale(1.08) rotate(4deg); }
    50%      { transform: translate(30px, 90px) scale(0.97) rotate(-2deg); }
    75%      { transform: translate(-40px, 40px) scale(1.05) rotate(6deg); }
}

@keyframes orbFloat2 {
    0%,100% { transform: translate(0,0) scale(1) rotate(0deg); }
    33%      { transform: translate(-60px, -50px) scale(1.06) rotate(-5deg); }
    66%      { transform: translate(50px, -35px) scale(0.96) rotate(3deg); }
}

@keyframes orbFloat3 {
    0%,100% { transform: translate(0,0) scale(1); }
    50%      { transform: translate(60px, -70px) scale(1.12); }
}

/* ─── GLASS PANEL ───────────────────────────────────────── */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(1.4) brightness(1.05);
    -webkit-backdrop-filter: blur(24px) saturate(1.4) brightness(1.05);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    position: relative;
}

/* Shimmer line on hover — kept behind all content */
.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,0.03) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
    z-index: 0;
}

.glass-panel:hover::after {
    opacity: 1;
    animation: shimmer 1.8s var(--ease) forwards;
}

/* All direct children of glass-panel sit above the shimmer */
.glass-panel > * { position: relative; z-index: 1; }

@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ─── LOGIN SCREEN ──────────────────────────────────────── */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 24px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 460px;
    border-radius: var(--radius-xl);
    padding: 52px 44px;
    text-align: center;
    animation: loginEntry 0.8s var(--ease-spring) both;
    position: relative;
    overflow: hidden;
}

/* Animated top border */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent),
        var(--accent2),
        var(--accent3),
        var(--accent2),
        var(--accent),
        transparent
    );
    background-size: 300% 100%;
    animation: borderFlow 4s linear infinite;
}

@keyframes borderFlow {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.login-card .logo { margin-bottom: 36px; }

.login-card .logo i {
    font-size: 3.8rem;
    background: linear-gradient(135deg, var(--accent2), var(--accent), var(--accent3));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 25px var(--accent-glow));
    margin-bottom: 18px;
    display: block;
    animation: logoPulse 4s ease-in-out infinite, gradShift 6s linear infinite;
}

.login-card .logo h2 {
    font-family: 'Syne', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: 6px;
    background: linear-gradient(135deg, #fff 0%, var(--accent-light) 40%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: glitch 8s infinite;
}

.login-card .logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes gradShift {
    0%,100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes logoPulse {
    0%,100% { filter: drop-shadow(0 0 25px var(--accent-glow)); }
    50%      { filter: drop-shadow(0 0 50px var(--accent-glow)) drop-shadow(0 0 80px rgba(0,229,255,0.15)); }
}

@keyframes glitch {
    0%,90%,100% { transform: none; }
    92%          { transform: skewX(-1deg) translateX(2px); filter: drop-shadow(2px 0 var(--accent3)); }
    94%          { transform: skewX(1deg) translateX(-2px); filter: drop-shadow(-2px 0 var(--accent2)); }
    96%          { transform: none; }
}

@keyframes loginEntry {
    from { opacity: 0; transform: translateY(50px) scale(0.94); filter: blur(8px); }
    to   { opacity: 1; transform: translateY(0) scale(1);     filter: blur(0); }
}

.error-msg {
    background: rgba(255, 51, 85, 0.08);
    border: 1px solid rgba(255, 51, 85, 0.25);
    color: #ff8fa3;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font-size: 0.88rem;
    backdrop-filter: blur(10px);
}

.login-options p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all var(--t-normal) var(--ease);
    text-decoration: none;
    color: white;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.discord-btn {
    background: linear-gradient(135deg, #5865F2 0%, #4044c4 100%);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3), 0 0 0 0 rgba(88, 101, 242, 0);
}

.discord-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
    opacity: 0;
    transition: opacity var(--t-fast);
}

/* Ripple line */
.discord-btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s, opacity 0.5s;
    opacity: 0;
}

.discord-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(88, 101, 242, 0.5), 0 0 0 4px rgba(88,101,242,0.1);
}

.discord-btn:hover::before { opacity: 1; }

.discord-btn:active {
    transform: translateY(-1px);
}

.discord-btn:active::after {
    width: 300px; height: 300px; opacity: 0;
}

.footer-credits {
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.3px;
}

.footer-credits a {
    color: var(--accent-light);
    transition: color var(--t-fast);
}

.footer-credits a:hover {
    color: var(--accent2);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── APP LAYOUT ────────────────────────────────────────── */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ─── SIDEBAR ───────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    z-index: 100;
    flex-shrink: 0;
    background: rgba(5, 5, 18, 0.88);
    backdrop-filter: blur(32px) saturate(1.4);
    -webkit-backdrop-filter: blur(32px) saturate(1.4);
    border-right: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}

/* Glowing edge line */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--accent) 20%,
        var(--accent2) 50%,
        var(--accent3) 80%,
        transparent 100%
    );
    opacity: 0.25;
    animation: sidebarGlow 5s ease-in-out infinite alternate;
}

@keyframes sidebarGlow {
    from { opacity: 0.15; }
    to   { opacity: 0.40; }
}

/* Interior ambient light */
.sidebar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    background: radial-gradient(ellipse 200px 200px at 50% 100%, rgba(124,58,237,0.08), transparent);
    pointer-events: none;
}

.sidebar-header {
    padding: 26px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    z-index: 1;
}

.sidebar-header i {
    font-size: 1.7rem;
    background: linear-gradient(135deg, var(--accent2), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 14px var(--accent-glow));
    animation: logoPulse 4s ease-in-out infinite;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #fff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-icon {}

.user-profile {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--t-normal) var(--ease);
    position: relative;
    z-index: 1;
}

.user-profile:hover { background: rgba(124, 58, 237, 0.06); }

.user-profile .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card-solid), var(--bg-card-solid)) padding-box,
                linear-gradient(135deg, var(--accent), var(--accent2)) border-box;
    box-shadow: 0 0 16px var(--accent-glow), 0 0 30px rgba(0,229,255,0.1);
    transition: all var(--t-normal) var(--ease);
    flex-shrink: 0;
}

.user-profile:hover .avatar {
    box-shadow: 0 0 24px var(--accent-glow), 0 0 50px rgba(0,229,255,0.15);
    transform: scale(1.06) rotate(2deg);
}

.user-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    font-family: 'DM Sans', sans-serif;
}

.badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(0,229,255,0.1));
    color: var(--accent-light);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(124, 58, 237, 0.25);
    font-family: 'DM Sans', sans-serif;
}

/* Nav */
.nav-links {
    list-style: none;
    padding: 12px 10px;
    flex: 1;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

.nav-group-title {
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 22px 0 8px 14px;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
}

.nav-links li {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
    transition: all var(--t-fast) var(--ease);
    position: relative;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
}

/* Hover sweep */
.nav-links li::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(124,58,237,0.12), transparent);
    transform: translateX(-100%);
    transition: transform var(--t-normal) var(--ease);
    border-radius: inherit;
}

.nav-links li i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    transition: all var(--t-fast) var(--ease);
    flex-shrink: 0;
}

.nav-links li:hover {
    color: var(--text);
    background: var(--bg-glass-hover);
    transform: translateX(4px);
}

.nav-links li:hover::before { transform: translateX(0); }

.nav-links li:hover i {
    color: var(--accent2);
    filter: drop-shadow(0 0 6px var(--accent2-glow));
}

.nav-links li.active {
    background: linear-gradient(135deg,
        rgba(124, 58, 237, 0.22),
        rgba(0, 229, 255, 0.06)
    );
    color: white;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.22);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.18),
                inset 0 1px 0 rgba(255,255,255,0.06);
}

.nav-links li.active::after {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--accent2), var(--accent));
    box-shadow: 0 0 12px var(--accent2-glow), 0 0 20px var(--accent-glow);
}

.nav-links li.active i {
    color: var(--accent2);
    filter: drop-shadow(0 0 6px var(--accent2-glow));
}

.nav-links li.hidden { display: none; }

.logout-btn {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    border-top: 1px solid var(--border-subtle);
    transition: all var(--t-fast) var(--ease);
    position: relative;
    z-index: 1;
    font-family: 'DM Sans', sans-serif;
}

.logout-btn:hover {
    background: rgba(255, 51, 85, 0.07);
    color: var(--danger);
    padding-left: 28px;
}

/* ─── MAIN CONTENT ──────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 32px;
    position: relative;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 0 24px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 28px;
    position: relative;
}

/* Glow line under header */
.top-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent2), transparent);
    opacity: 0.2;
}

#page-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent-light) 60%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.header-actions { display: flex; gap: 10px; }

.icon-btn {
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--t-normal) var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(124, 58, 237, 0.12);
    border-color: var(--border-hover);
    color: var(--accent2);
    transform: rotate(180deg);
    box-shadow: 0 0 20px var(--accent-glow), 0 0 40px rgba(0,229,255,0.08);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    margin-right: 14px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background var(--t-fast);
}

.mobile-menu-btn:hover {
    background: var(--bg-glass-hover);
}

.content-wrapper {
    flex: 1;
    padding-bottom: 32px;
}

.app-footer {
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
    letter-spacing: 0.3px;
}

.app-footer a { color: var(--accent-light); }
.app-footer a:hover { color: var(--accent2); }

/* ─── LOADING ───────────────────────────────────────────── */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
    gap: 0;
}

.spinner {
    width: 46px;
    height: 46px;
    border: 2px solid rgba(124, 58, 237, 0.1);
    border-top-color: transparent;
    border-right-color: var(--accent);
    border-bottom-color: var(--accent2);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 18px;
    box-shadow: 0 0 30px var(--accent-glow), inset 0 0 15px rgba(0,229,255,0.05);
}

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

/* ─── SERVER CARDS ──────────────────────────────────────── */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.server-card {
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--t-normal) var(--ease);
    position: relative;
    overflow: hidden;
    cursor: default;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

/* Holographic top line */
.server-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent),
        var(--accent2),
        var(--accent3),
        transparent
    );
    background-size: 200%;
    opacity: 0;
    transition: opacity var(--t-normal);
}

.server-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-neon), var(--shadow-lg),
                0 0 0 1px rgba(0,229,255,0.06);
}

.server-card:hover::before {
    opacity: 1;
    animation: borderFlow 2s linear infinite;
}

.server-icon {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 18px;
    overflow: hidden;
    color: var(--accent-light);
    font-weight: 800;
    font-family: 'Syne', sans-serif;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 2px var(--border),
                0 0 20px rgba(124, 58, 237, 0.1);
    transition: all var(--t-normal) var(--ease-spring);
}

.server-card:hover .server-icon {
    border-color: transparent;
    box-shadow: 0 0 0 2px var(--accent),
                0 0 30px var(--accent-glow),
                0 0 60px rgba(0,229,255,0.1);
    transform: scale(1.08) rotate(-3deg);
}

.server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.server-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    letter-spacing: 0.3px;
}

.server-card p {
    color: var(--text-muted);
    font-size: 0.83rem;
    margin-bottom: 22px;
    line-height: 1.5;
}

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #8b44f7 50%, #6020c8 100%);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    transition: all var(--t-normal) var(--ease);
    width: 100%;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
    letter-spacing: 0.3px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity var(--t-fast);
}

/* Moving light streak */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 50%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s var(--ease);
}

.btn-primary:hover {
    background-position: right center;
    box-shadow: 0 6px 28px rgba(124, 58, 237, 0.5),
                0 0 0 1px rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary:hover::after { left: 110%; }

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

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--accent-subtle);
    border-color: var(--border-hover);
    color: var(--text);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ─── FORMS ─────────────────────────────────────────────── */
.form-group { margin-bottom: 22px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'DM Sans', sans-serif;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-family: 'DM Sans', sans-serif;
    transition: all var(--t-fast) var(--ease);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.2),
                0 0 20px rgba(124,58,237,0.08);
    background: rgba(124, 58, 237, 0.04);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.help-text {
    display: block;
    margin-top: 7px;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ─── PANELS ────────────────────────────────────────────── */
.panel {
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Subtle inner glow top line */
.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124,58,237,0.2), transparent);
    pointer-events: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.panel-title {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

/* ─── STATS ROW ─────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-box {
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
    transition: all var(--t-normal) var(--ease);
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    isolation: isolate; /* creates own stacking context */
}

/* Diagonal shimmer background */
.stat-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        transparent 30%,
        rgba(255,255,255,0.02) 50%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity var(--t-normal);
    z-index: -1;
}

/* Bottom glow accent */
.stat-box::after {
    content: '';
    position: absolute;
    bottom: 0; left: 20%; right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity var(--t-normal);
    border-radius: 2px;
    z-index: -1;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-neon), var(--shadow-md);
}

.stat-box:hover::before { opacity: 1; }
.stat-box:hover::after  { opacity: 1; }

.stat-box i {
    font-size: 1.7rem;
    margin-bottom: 14px;
    display: block;
    filter: drop-shadow(0 0 8px currentColor);
    transition: all var(--t-normal) var(--ease-spring);
    position: relative;
    z-index: 1;
}

.stat-box:hover i {
    transform: scale(1.15) translateY(-2px);
    filter: drop-shadow(0 0 14px currentColor);
}

.stat-val {
    font-family: 'Syne', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #fff; /* fallback */
    background: linear-gradient(135deg, #fff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.stat-lbl {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* ─── DATA TABLES ───────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
    transition: all var(--t-fast);
    font-family: 'DM Sans', sans-serif;
}

.data-table tbody tr {
    transition: all var(--t-fast) var(--ease);
}

.data-table tbody tr:hover {
    background: rgba(124, 58, 237, 0.05);
}

.data-table tbody tr:hover td {
    border-bottom-color: rgba(124,58,237,0.1);
}

.data-table tbody tr:last-child td { border-bottom: none; }

.info-table { width: 100%; }

.info-table td {
    padding: 11px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.025);
    font-family: 'DM Sans', sans-serif;
}

.info-table td:first-child {
    width: 40%;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ─── BADGES ────────────────────────────────────────────── */
.badge-success {
    background: rgba(0, 229, 160, 0.1);
    color: var(--success);
    border-color: rgba(0, 229, 160, 0.25);
}

.badge-warning {
    background: rgba(255, 184, 0, 0.1);
    color: var(--warning);
    border-color: rgba(255, 184, 0, 0.25);
}

.badge-danger {
    background: rgba(255, 51, 85, 0.1);
    color: var(--danger);
    border-color: rgba(255, 51, 85, 0.25);
}

.badge-info {
    background: rgba(0, 170, 255, 0.1);
    color: var(--info);
    border-color: rgba(0, 170, 255, 0.25);
}

.badge-purple {
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent-light);
    border-color: rgba(124, 58, 237, 0.3);
}

/* ─── LIST ROWS ─────────────────────────────────────────── */
.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all var(--t-fast) var(--ease);
    font-family: 'DM Sans', sans-serif;
}

.list-row:last-child { border-bottom: none; }

.list-row:hover {
    padding-left: 8px;
    color: var(--text);
}

.list-row .muted {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.role-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

/* ─── COMMAND GRID ──────────────────────────────────────── */
.cmd-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cmd-grid code {
    background: rgba(0, 0, 0, 0.5);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    border: 1px solid var(--border);
    color: var(--accent2);
    transition: all var(--t-fast) var(--ease);
    position: relative;
    overflow: hidden;
}

.cmd-grid code::before {
    content: '> ';
    color: var(--accent3);
    opacity: 0.6;
    font-size: 0.75rem;
}

.cmd-grid code:hover {
    border-color: var(--accent2);
    background: rgba(0, 229, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,229,255,0.15), 0 0 0 1px rgba(0,229,255,0.1);
    color: #fff;
}

/* ─── HELPERS ───────────────────────────────────────────── */
.muted { color: var(--text-muted); }

.switch-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
}

/* ─── TOAST ─────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: rgba(8, 8, 24, 0.95);
    backdrop-filter: blur(24px) saturate(1.4);
    color: white;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg),
                0 0 0 1px rgba(255,255,255,0.06);
    border-left: 3px solid var(--accent);
    transform: translateX(120px);
    opacity: 0;
    transition: all 0.45s var(--ease-spring);
    min-width: 220px;
    font-family: 'DM Sans', sans-serif;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger);  }
.toast.warning { border-color: var(--warning); }

/* ─── ANIMATIONS ────────────────────────────────────────── */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(28px) scale(0.98); filter: blur(4px); }
    to   { opacity: 1; transform: translateY(0) scale(1);     filter: blur(0); }
}

.fade-in {
    animation: slideUp 0.55s var(--ease-out) both;
}

/* Stagger delays */
.stats-row .stat-box:nth-child(1) { animation-delay: 0s;     }
.stats-row .stat-box:nth-child(2) { animation-delay: 0.08s;  }
.stats-row .stat-box:nth-child(3) { animation-delay: 0.16s;  }
.stats-row .stat-box:nth-child(4) { animation-delay: 0.24s;  }

.server-grid .server-card:nth-child(1) { animation-delay: 0s;    }
.server-grid .server-card:nth-child(2) { animation-delay: 0.07s; }
.server-grid .server-card:nth-child(3) { animation-delay: 0.14s; }
.server-grid .server-card:nth-child(4) { animation-delay: 0.21s; }
.server-grid .server-card:nth-child(5) { animation-delay: 0.28s; }
.server-grid .server-card:nth-child(6) { animation-delay: 0.35s; }

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1200px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .main-content { padding: 0 22px; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -310px;
        height: 100%;
        transition: left var(--t-normal) var(--ease),
                    box-shadow var(--t-normal) var(--ease);
        border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
        z-index: 200;
    }

    .sidebar.open {
        left: 0;
        box-shadow: var(--shadow-lg),
                    30px 0 80px rgba(0, 0, 0, 0.6);
    }

    /* Backdrop */
    .sidebar.open::before {
        display: none;
    }

    .main-content { padding: 0 16px; }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .server-grid { grid-template-columns: 1fr; }
    .stats-row   { grid-template-columns: repeat(2, 1fr); }

    #page-title   { font-size: 1.5rem; }
    .top-header   { padding: 18px 0 16px; margin-bottom: 20px; }

    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        min-width: unset;
    }
}

@media (max-width: 520px) {
    .stats-row { grid-template-columns: 1fr; }

    .login-card {
        padding: 36px 22px;
        margin: 0 8px;
    }

    .sidebar { width: 268px; }

    .panel { padding: 18px 16px; }

    .data-table thead th,
    .data-table tbody td {
        padding: 10px 10px;
        font-size: 0.8rem;
    }

    #page-title { font-size: 1.3rem; }
}

/* ─── FOCUS STATES (A11Y) ───────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}