/* ── NEXITY THEME TOKENS ── */
:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --surface-hover: #181824;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(139, 92, 246, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --purple: #8b5cf6;
    --cyan: #06b6d4;
    --gradient: linear-gradient(135deg, var(--purple) 0%, var(--cyan) 100%);
    --glow: rgba(139, 92, 246, 0.25);
    
    --red: #ef4444;
    --red-glow: rgba(239, 68, 68, 0.3);
    
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg); color: var(--text-main);
    font-family: var(--font-ui); font-size: 14px;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
    background-image: radial-gradient(circle at 50% -20%, rgba(139, 92, 246, 0.05), transparent 40%);
}

a { text-decoration: none; color: inherit; }
.wrap { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.mono { font-family: var(--font-mono); }

/* ── NAV ── */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--surface); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.logo-icon::before { content: ''; position: absolute; width: 100%; height: 100%; background: var(--gradient); opacity: 0.2; }
.logo-icon svg { width: 16px; height: 16px; fill: url(#nx-grad); z-index: 1; }
.logo-text { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.logo-text span { color: var(--text-muted); font-weight: 500; font-size: 14px; margin-left: 8px; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px; cursor: pointer; border: none;
    font-family: var(--font-ui); font-size: 13px; font-weight: 600;
    transition: all 0.2s ease; position: relative; overflow: hidden;
}
.btn:disabled { opacity: 0.4; pointer-events: none; }

.btn-primary { background: var(--gradient); color: #fff; font-weight: 700; box-shadow: 0 4px 15px var(--glow); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); transform: translateY(-1px); }

.btn-red { background: rgba(239, 68, 68, 0.15); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-red:hover { background: rgba(239, 68, 68, 0.25); box-shadow: 0 0 15px var(--red-glow); }

.btn-glass { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); color: var(--text-main); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255,255,255,0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }

/* ── INPUT & FORMS ── */
.form-group { margin-bottom: 16px; }
.lbl { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.inp {
    width: 100%; border-radius: 8px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    padding: 12px 14px; color: #fff; outline: none;
    font-family: var(--font-mono); font-size: 13px;
    transition: all 0.2s ease;
}
.inp:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15); background: rgba(0,0,0,0.5); }
.inp::placeholder { color: var(--text-muted); opacity: 0.5; }
.inp[readonly] { background: rgba(255, 255, 255, 0.02); color: var(--text-muted); cursor: not-allowed; }

/* ── CHECKBOX ── */
.checkbox-container {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.checkbox-container input {
    accent-color: var(--cyan);
}

/* ── CARDS ── */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
    transition: border-color 0.3s ease;
}
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
    background: rgba(255,255,255,0.01);
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.kicker { font-size: 11px; font-weight: 600; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.card-title { font-size: 16px; font-weight: 700; color: #fff; }

/* ── SERVER HERO ── */
.server-hero-name { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #fff; letter-spacing: -0.03em; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 8px; }
.badge-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(139, 92, 246, 0.15); color: #d8b4fe; border: 1px solid rgba(139, 92, 246, 0.3); margin-bottom: 16px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); animation: lp 2s infinite; }
@keyframes lp { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── RESOURCE TILE ── */
.res-tile {
    border-radius: 8px; border: 1px solid var(--border);
    background: rgba(0,0,0,0.3); padding: 10px 12px;
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; transition: all 0.15s ease;
    text-align: left; font-family: var(--font-mono);
    font-size: 12px; color: var(--text-muted); width: 100%;
}
.res-tile:hover { border-color: var(--cyan); background: rgba(6, 182, 212, 0.05); color: #fff; }
.res-tile.selected { border-color: var(--purple); background: rgba(139, 92, 246, 0.1); color: #fff; }
.res-check {
    width: 14px; height: 14px; border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2); background: transparent;
    flex-shrink: 0; transition: all 0.15s ease; position: relative;
}
.res-tile.selected .res-check { background: var(--purple); border-color: var(--purple); }
.res-tile.selected .res-check::after {
    content: ''; position: absolute; left: 4px; top: 1px;
    width: 4px; height: 8px; border: 2px solid #fff;
    border-top: none; border-left: none; transform: rotate(45deg);
}
.res-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* ── STAT PILL ── */
.stat-pill { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; }
.stat-pill-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-pill-val { font-size: 18px; font-weight: 800; color: #fff; margin-top: 4px; }

/* ── CONSOLE ── */
.console-body {
    padding: 16px 20px; background: #050508;
    font-family: var(--font-mono); font-size: 12px; line-height: 1.6;
    overflow-y: auto; height: 600px;
}
.console-body::-webkit-scrollbar { width: 6px; }
.console-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.reveal { opacity: 0; animation: fadeUp 0.5s ease forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

@media(max-width:850px){
    .main-grid { grid-template-columns: 1fr !important; }
    .action-row { flex-wrap: wrap; }
}
