/* ═══════════════════════════════════════════════════════════════
   XENTRO · Global design system v2
   Premium futuristic Discord automation desktop platform
   deep navy · technical grid · glassmorphism · blue/cyan accents
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg0: #060B16;
    --bg1: #0B1220;
    --panel: rgba(16, 26, 43, 0.72);
    --panel2: rgba(11, 18, 32, 0.55);
    --panel3: rgba(6, 10, 20, 0.60);
    --line: rgba(122, 155, 220, 0.11);
    --line2: rgba(122, 155, 220, 0.24);
    --tx: #F5F7FF;
    --tx2: #8E9DB8;
    --tx3: #5C6A86;
    --blue: #1688FF;
    --blue2: #0F6FD8;
    --blue3: #3F9FFF;
    --cyan: #39C6FF;
    --green: #22D38A;
    --green2: #2CE795;
    --orange: #FFB547;
    --orange2: #FFC36B;
    --red: #FF4D5E;
    --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Consolas', monospace;
    --radius: 12px;
    --radius-s: 8px;
    --glow-blue: 0 0 16px rgba(22, 136, 255, 0.28);
}

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

html, body { height: 100%; }

body {
    font-family: var(--font);
    color: var(--tx);
    background: var(--bg0);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ══ BACKGROUND: deep electric blue · grid · glow · noise ══ */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1100px 560px at 82% -12%, rgba(22, 136, 255, 0.13), transparent 60%),
        radial-gradient(900px 500px at -8% 112%, rgba(57, 198, 255, 0.07), transparent 55%),
        radial-gradient(760px 420px at 50% 55%, rgba(63, 159, 255, 0.04), transparent 70%),
        linear-gradient(160deg, #081024 0%, #060B16 55%, #04070F 100%);
}

.bg-fx::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(126, 158, 215, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126, 158, 215, 0.055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
}

.bg-fx::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    opacity: 0.025;
}

#xentro-root {
    position: relative;
    z-index: 1;
    height: 100vh;
    padding: 12px;
}

/* ══ APP WINDOW ══ */
.app-window {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(13, 21, 38, 0.78), rgba(7, 12, 24, 0.84));
    border: 1px solid rgba(130, 160, 225, 0.16);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.72), 0 0 70px rgba(22, 136, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    overflow: hidden;
}

/* ══ TITLEBAR ══ */
.titlebar {
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 11, 20, 0.55);
}

.tb-left { display: flex; align-items: center; gap: 11px; }

.logo {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(22, 136, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.logo svg { width: 15px; height: 15px; }

.tb-title { font-size: 14px; font-weight: 800; letter-spacing: 0.3px; line-height: 1.1; }
.tb-version { font-size: 9.5px; color: var(--tx3); line-height: 1.2; font-family: var(--mono); }

.tb-center { position: absolute; left: 50%; transform: translateX(-50%); }

.tb-pill {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(22, 136, 255, 0.09);
    border: 1px solid rgba(22, 136, 255, 0.32);
    color: #9CC6FF;
    box-shadow: 0 0 16px rgba(22, 136, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tb-pill::before, .tb-pill::after {
    content: '';
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.tb-right { display: flex; align-items: center; gap: 4px; }

.tb-up { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--tx3); margin-right: 12px; letter-spacing: 0.4px; }
.tb-up::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green2); box-shadow: 0 0 8px rgba(44, 231, 149, 0.9); animation: livePulse 2.2s infinite; }

.tb-clock { font-family: var(--mono); font-size: 11px; color: var(--tx3); margin-right: 8px; letter-spacing: 0.5px; }

.win-btn {
    width: 33px;
    height: 29px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.win-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--tx); }
.win-btn.win-close:hover { background: rgba(255, 77, 94, 0.18); color: var(--red); }
.win-btn svg { width: 12px; height: 12px; }

/* ══ APP BODY ══ */
.app-body {
    flex: 1;
    display: grid;
    grid-template-columns: 228px minmax(0, 1fr);
    min-height: 0;
}

/* ══ SIDEBAR v2 ══ */
.sidebar {
    background: linear-gradient(180deg, rgba(8, 13, 24, 0.66), rgba(6, 10, 19, 0.72));
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px 12px;
}

.side-nav { flex: 1; min-height: 0; }

.nav-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--tx3);
    opacity: 0.85;
    margin: 14px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--tx3);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    text-decoration: none;
    position: relative;
}

.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; transition: 0.15s; }

.nav-item:hover { background: rgba(22, 136, 255, 0.08); color: var(--tx2); }
.nav-item:hover svg { color: var(--blue3); }

.nav-item.active {
    background: rgba(22, 136, 255, 0.14);
    border-color: rgba(22, 136, 255, 0.38);
    color: #fff;
    box-shadow: 0 0 16px rgba(22, 136, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
    box-shadow: 0 0 10px rgba(57, 198, 255, 0.7);
}
.nav-item.active svg { color: var(--blue3); }

.side-foot {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.side-fuser {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
    padding: 6px 8px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.025);
    text-decoration: none;
    transition: 0.15s;
}
.side-fuser:hover { border-color: var(--line2); background: rgba(22, 136, 255, 0.07); }
.side-fuser img { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--line2); }
.side-fuser .sf-name { font-size: 11.5px; font-weight: 700; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-fuser .sf-sub { font-size: 9.5px; color: var(--tx3); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-fuser .sf-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-left: auto; }
.side-fuser .sf-dot.online { background: var(--green2); box-shadow: 0 0 8px rgba(44, 231, 149, 0.9); }
.side-fuser .sf-dot.idle { background: var(--orange); box-shadow: 0 0 8px rgba(255, 181, 71, 0.9); }
.side-fuser .sf-dot.dnd { background: var(--red); box-shadow: 0 0 8px rgba(255, 77, 94, 0.9); }
.side-fuser .sf-dot.invisible, .side-fuser .sf-dot.none, .side-fuser .sf-dot.offline { background: #4E5A6E; }

.side-logout {
    width: 30px; height: 30px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    flex-shrink: 0;
    text-decoration: none;
}
.side-logout svg { width: 14px; height: 14px; }
.side-logout:hover { background: rgba(255, 77, 94, 0.14); color: var(--red); }

/* legacy nav-rail (kept for compat) */
.nav-rail {
    background: rgba(7, 11, 20, 0.62);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    gap: 8px;
    overflow-y: auto;
    overflow-x: visible;
}

.rail-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: none;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
    position: relative;
    flex-shrink: 0;
}

.rail-btn svg { width: 19px; height: 19px; }

.rail-btn:hover { background: rgba(22, 136, 255, 0.10); color: var(--tx2); }

.rail-btn.active {
    background: linear-gradient(135deg, rgba(22, 136, 255, 0.28), rgba(63, 159, 255, 0.16));
    color: #fff;
    border: 1px solid rgba(63, 159, 255, 0.4);
    box-shadow: 0 0 16px rgba(22, 136, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.rail-btn .rail-tip {
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: #0d1424;
    border: 1px solid var(--line2);
    color: var(--tx);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: 0.15s;
    z-index: 80;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.rail-btn:hover .rail-tip { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ══ MAIN COLUMN ══ */
.main-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.top-strip {
    flex-shrink: 0;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 11, 20, 0.45);
}

.ts-crumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tx3); min-width: 0; }
.ts-crumb .ts-brand { color: var(--blue3); font-weight: 800; font-size: 12.5px; letter-spacing: 0.3px; }
.ts-crumb b { color: var(--tx); font-weight: 700; font-size: 12.5px; }
.ts-crumb .ts-sep { color: var(--tx3); opacity: 0.7; font-size: 11px; }

.ts-right { display: flex; align-items: center; gap: 10px; }

.ts-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 5px;
    border-radius: 999px;
    border: 1px solid rgba(122, 155, 220, 0.18);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: 0.15s;
    text-decoration: none;
}

.ts-user:hover { background: rgba(22, 136, 255, 0.09); border-color: var(--line2); }

.ts-user img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(122, 155, 220, 0.22); }

.ts-user span { font-size: 12px; font-weight: 700; color: var(--tx); }

.ts-user .ts-u-dot { width: 8px; height: 8px; border-radius: 50%; margin-left: 2px; }
.ts-u-dot.online { background: #2CE795; box-shadow: 0 0 8px rgba(44, 231, 149, 0.8); }
.ts-u-dot.idle { background: #FFB547; box-shadow: 0 0 8px rgba(255, 181, 71, 0.8); }
.ts-u-dot.dnd { background: #FF4D5E; box-shadow: 0 0 8px rgba(255, 77, 94, 0.8); }
.ts-u-dot.invisible, .ts-u-dot.none, .ts-u-dot.offline { background: #4E5A6E; }

.ts-link {
    color: var(--tx3);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.ts-link:hover { color: var(--red); background: rgba(255, 77, 94, 0.08); border-color: rgba(255, 77, 94, 0.25); }
.ts-link svg { width: 13px; height: 13px; }

.content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 60px;
    min-height: 0;
    animation: ntFadeIn 0.3s ease;
}

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

.content::-webkit-scrollbar, .workflow::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb, .workflow::-webkit-scrollbar-thumb { background: rgba(122, 155, 220, 0.22); border-radius: 4px; }

/* ══ PAGE HEAD ══ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }

.page-head h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.2px;
    background: linear-gradient(180deg, #fff, #B9C8E8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-head h1 .h-emoji { -webkit-text-fill-color: initial; }

.page-head p { font-size: 12.5px; color: var(--tx3); margin-top: 3px; }

.page-head-actions { display: flex; gap: 9px; align-items: center; }

/* ══ GRIDS ══ */
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ══ GLASS CARDS ══ */
.glass, .section-card, .card {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.card-sub { font-size: 11.5px; color: var(--tx3); margin-bottom: 16px; }

.section-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #9ec4ff;
    padding-bottom: 10px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.section-title .st-icon { margin-right: 6px; }

/* ══ BUTTONS ══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-s);
    border: 1px solid var(--line2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--tx2);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.16s;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn svg { width: 14px; height: 14px; }

.btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--tx); border-color: var(--line2); }
.btn:active { transform: translateY(1px) scale(0.985); }

.btn-primary, .btn-blue {
    background: linear-gradient(135deg, var(--blue2), #4da3ff 55%, #38c4e8);
    border: none;
    color: #fff;
    box-shadow: 0 6px 20px rgba(47, 111, 228, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover, .btn-blue:hover, .btn-primary:focus { background: linear-gradient(135deg, #3a7ef0, #5cb0ff 55%, #4ad4f2); color: #fff; box-shadow: 0 8px 26px rgba(47, 111, 228, 0.55); }

.btn-cyan {
    background: linear-gradient(135deg, #149fb8, #38d9f0);
    border: none;
    color: #fff;
    box-shadow: 0 6px 20px rgba(56, 217, 240, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-cyan:hover { color: #fff; box-shadow: 0 8px 26px rgba(56, 217, 240, 0.5); filter: brightness(1.06); }

.btn-danger {
    background: rgba(255, 92, 92, 0.10);
    border: 1px solid rgba(255, 92, 92, 0.35);
    color: #ff8890;
}

.btn-danger:hover { background: rgba(255, 92, 92, 0.20); color: #ffb0b5; border-color: rgba(255, 92, 92, 0.5); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--tx3); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--tx2); }

.btn-sm { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.btn-lg { height: 44px; padding: 0 24px; font-size: 14.5px; border-radius: 12px; }
.btn-block { width: 100%; }

.btn.busy { opacity: 0.6; pointer-events: none; }
.btn.saved { background: rgba(46, 204, 113, 0.15) !important; border-color: rgba(46, 204, 113, 0.4) !important; color: var(--green2) !important; box-shadow: none !important; }

/* legacy buttons */
.save-btn, .btn-add, .btn-join, .btn-q, .btn-start, .btn-stop, .btn-clone, .btn-action, .btn-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-s);
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    transition: 0.16s;
    border: none;
    color: #fff;
}

.save-btn, .btn-add { width: 100%; height: 42px; margin-top: 8px; background: linear-gradient(135deg, var(--blue2), #4da3ff); font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.5px; box-shadow: 0 6px 20px rgba(47, 111, 228, 0.35); }
.save-btn:hover, .btn-add:hover { box-shadow: 0 10px 28px rgba(47, 111, 228, 0.5); transform: translateY(-1px); }
.save-btn:active, .btn-add:active, .btn-join:active, .btn-start:active, .btn-stop:active { transform: translateY(1px) scale(0.99); }

.btn-add { margin-top: 0; height: 38px; text-transform: none; }

.btn-q { height: 38px; padding: 0 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); color: var(--tx2); font-size: 13px; }
.btn-q:hover { background: rgba(255, 255, 255, 0.09); color: var(--tx); }

.btn-start { height: 38px; padding: 0 20px; background: linear-gradient(135deg, var(--blue2), #4da3ff); font-size: 13px; box-shadow: 0 4px 16px rgba(47, 111, 228, 0.35); }
.btn-start:hover { box-shadow: 0 6px 22px rgba(47, 111, 228, 0.5); }

.btn-stop { height: 38px; padding: 0 20px; background: rgba(255, 92, 92, 0.14); border: 1px solid rgba(255, 92, 92, 0.4); color: #ff8890; font-size: 13px; }
.btn-stop:hover { background: rgba(255, 92, 92, 0.24); color: #ffb0b5; }

.btn-join { height: 40px; padding: 0 22px; width: auto; min-width: 170px; background: linear-gradient(135deg, var(--blue2), #4da3ff); font-size: 13.5px; box-shadow: 0 6px 20px rgba(47, 111, 228, 0.4); }
.btn-join:hover { box-shadow: 0 8px 28px rgba(47, 111, 228, 0.55); transform: translateY(-1px); }

.btn-clone { height: 42px; padding: 0 26px; font-size: 13.5px; background: linear-gradient(135deg, var(--blue2), #4da3ff); }
.btn-clone:hover { box-shadow: 0 8px 26px rgba(47, 111, 228, 0.5); transform: translateY(-1px); }
.btn-clone[red] { background: rgba(255, 92, 92, 0.14); border: 1px solid rgba(255, 92, 92, 0.4); color: #ff8890; }
.btn-clone[red]:hover { background: rgba(255, 92, 92, 0.24); }

.btn-action { height: 36px; padding: 0 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); color: var(--tx2); font-size: 12.5px; }
.btn-action:hover { background: rgba(79, 156, 249, 0.12); color: #fff; }

.btn-control { height: 40px; width: 40px; padding: 0; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--tx2); font-size: 14px; border-radius: 11px; }
.btn-control:hover { background: rgba(79, 156, 249, 0.14); color: #fff; border-color: rgba(79, 156, 249, 0.4); }
.btn-control.active { background: linear-gradient(135deg, var(--blue2), #4da3ff); color: #fff; border: none; }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tx3);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    transition: 0.15s;
    margin-bottom: 14px;
}

.back-btn:hover { color: var(--tx); }

/* ══ FORMS ══ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.full-width, .full { grid-column: 1 / -1; }
.input-group { margin-bottom: 0; }
.input-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--tx3);
    margin-bottom: 6px;
}
.input-field {
    width: 100%;
    background: rgba(4, 7, 14, 0.65);
    border: 1px solid rgba(120, 160, 235, 0.14);
    border-radius: var(--radius-s);
    padding: 10px 12px;
    color: var(--tx);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    transition: 0.15s;
}
.input-field::placeholder { color: #3d4a5e; }
.input-field:focus { border-color: rgba(96, 165, 250, 0.5); box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.12); }
.input-field:disabled { opacity: 0.4; cursor: not-allowed; }

select.input-field, .select-box {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235c6a80' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}

.select-box { width: 100%; background: rgba(4, 7, 14, 0.65); border: 1px solid rgba(120, 160, 235, 0.14); border-radius: var(--radius-s); padding: 10px 12px; color: var(--tx); font-family: var(--font); font-size: 13px; outline: none; }

.hint, .help { font-size: 10.5px; color: var(--tx3); font-style: italic; }

textarea.input-field { resize: vertical; min-height: 90px; font-family: var(--font); }

/* status radios */
.status-options { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-label { cursor: pointer; }
.radio-label input { display: none; }
.radio-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--tx3);
    font-size: 12px;
    font-weight: 600;
    transition: 0.15s;
}
.radio-btn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.radio-label input:checked + .radio-btn { color: #fff; border-color: rgba(96, 165, 250, 0.5); background: rgba(47, 111, 228, 0.18); box-shadow: 0 0 14px rgba(47, 111, 228, 0.2); }
.radio-btn.online { color: #3ce08a; } .radio-label input:checked + .radio-btn.online { background: rgba(46, 204, 113, 0.12); border-color: rgba(46, 204, 113, 0.4); }
.radio-btn.idle { color: #ffb45e; } .radio-label input:checked + .radio-btn.idle { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.4); }
.radio-btn.dnd { color: #ff8890; } .radio-label input:checked + .radio-btn.dnd { background: rgba(255, 92, 92, 0.12); border-color: rgba(255, 92, 92, 0.4); }
.radio-btn.offline { color: #8a96ab; } .radio-label input:checked + .radio-btn.offline { background: rgba(116, 127, 141, 0.12); border-color: rgba(116, 127, 141, 0.4); }

/* ══ TOGGLES ══ */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line2);
    transition: 0.25s;
    border-radius: 999px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #b8c4d8;
    transition: 0.25s;
    border-radius: 50%;
}
input:checked + .slider {
    background: linear-gradient(135deg, var(--blue2), #4da3ff);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 0 12px rgba(47, 111, 228, 0.45);
}
input:checked + .slider:before { transform: translateX(20px); background: #fff; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line2); transition: 0.25s; border-radius: 999px; }
.toggle-switch .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #b8c4d8; transition: 0.25s; border-radius: 50%; }
.toggle-switch input:checked + .slider { background: linear-gradient(135deg, var(--blue2), #4da3ff); border-color: rgba(96, 165, 250, 0.6); box-shadow: 0 0 12px rgba(47, 111, 228, 0.45); }
.toggle-switch input:checked + .slider:before { transform: translateX(20px); background: #fff; }

.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-row .status-info { font-size: 12px; color: var(--tx2); flex: 1; }
.status-row .status-info b { display: block; color: var(--tx); font-weight: 600; font-size: 13px; }

/* ══ BADGES / CHIPS / TAGS ══ */
.badge, .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    white-space: nowrap;
}
.badge-green, .tag.online, .tag.done { background: rgba(46, 204, 113, 0.12); border: 1px solid rgba(46, 204, 113, 0.35); color: var(--green2); }
.badge-orange, .tag.warn { background: rgba(245, 158, 11, 0.10); border: 1px solid rgba(245, 158, 11, 0.35); color: var(--orange2); }
.badge-red, .tag.error { background: rgba(255, 92, 92, 0.10); border: 1px solid rgba(255, 92, 92, 0.35); color: #ff8890; }
.badge-blue { background: rgba(79, 156, 249, 0.10); border: 1px solid rgba(79, 156, 249, 0.3); color: #9ec4ff; }
.badge-gray, .tag { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--tx3); }
.badge-cyan { background: rgba(56, 217, 240, 0.10); border: 1px solid rgba(56, 217, 240, 0.3); color: var(--cyan); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(79, 156, 249, 0.09); border: 1px solid rgba(79, 156, 249, 0.22); color: #9ec4ff; font-size: 10.5px; font-weight: 600; }

/* event pills */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px; }
.pill-orange { background: rgba(245, 158, 11, 0.10); border: 1px solid rgba(245, 158, 11, 0.35); color: var(--orange2); }
.pill-yellow { background: rgba(240, 178, 50, 0.10); border: 1px solid rgba(240, 178, 50, 0.35); color: #ffd97a; }
.pill-green { background: rgba(46, 204, 113, 0.10); border: 1px solid rgba(46, 204, 113, 0.35); color: var(--green2); }
.pill-blue { background: rgba(79, 156, 249, 0.10); border: 1px solid rgba(79, 156, 249, 0.35); color: #9ec4ff; }
.pill-red { background: rgba(255, 92, 92, 0.10); border: 1px solid rgba(255, 92, 92, 0.35); color: #ff8890; }
.pill-gray { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--tx3); }

/* ══ TABS ══ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
    position: relative;
    padding: 9px 16px;
    background: none;
    border: none;
    color: var(--tx3);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
}
.tab::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--blue2), var(--cyan));
    transform: scaleX(0);
    transition: 0.22s ease;
    box-shadow: 0 0 10px rgba(79, 156, 249, 0.7);
}
.tab:hover { color: var(--tx2); }
.tab.active { color: #fff; }
.tab.active::after { transform: scaleX(1); }

/* ══ TABLES ══ */
.glass-table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel3); }
.glass-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 760px; }
.glass-table thead th {
    text-align: left;
    padding: 11px 14px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--tx3);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
}
.glass-table tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(110, 150, 235, 0.07); color: var(--tx2); vertical-align: middle; }
.glass-table tbody tr { transition: 0.12s; }
.glass-table tbody tr:hover { background: rgba(79, 156, 249, 0.045); }
.glass-table tbody tr:last-child td { border-bottom: none; }

.checkbox-cell { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.03); cursor: pointer; appearance: none;
    display: inline-flex; align-items: center; justify-content: center; transition: 0.15s; vertical-align: middle; }
.checkbox-cell:checked { background: linear-gradient(135deg, var(--blue2), #4da3ff); border-color: transparent; box-shadow: 0 0 10px rgba(47, 111, 228, 0.5); }
.checkbox-cell:checked::after { content: ''; width: 3.5px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -2px; }

.icon-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.icon-cell .ic-img { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; background: #101828; border: 1px solid var(--line); object-fit: cover; }
.icon-cell .ic-main { display: flex; flex-direction: column; min-width: 0; }
.icon-cell .ic-title { color: var(--tx); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-cell .ic-sub { color: var(--tx3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar-cell { display: flex; align-items: center; gap: 9px; }
.avatar-cell img { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--line); }
.avatar-cell .ac-main { display: flex; flex-direction: column; min-width: 0; }
.avatar-cell .ac-name { color: var(--tx); font-weight: 600; }
.avatar-cell .ac-sub { color: var(--tx3); font-size: 11px; }

.time-cell { display: flex; flex-direction: column; }
.time-cell .tc-date { color: var(--tx); font-weight: 600; font-size: 12px; }
.time-cell .tc-time { color: var(--tx3); font-size: 10.5px; font-family: var(--mono); }

.dot-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    transition: 0.15s;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dot-btn:hover { background: rgba(79, 156, 249, 0.12); color: #fff; }

/* pagination */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page-btn {
    min-width: 31px;
    height: 31px;
    padding: 0 9px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--tx3);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
}
.page-btn:hover { background: rgba(79, 156, 249, 0.10); color: var(--tx2); }
.page-btn.active { background: linear-gradient(135deg, var(--blue2), #4da3ff); color: #fff; border: none; box-shadow: 0 4px 14px rgba(47, 111, 228, 0.45); }
.page-ellipsis { color: var(--tx3); font-size: 12px; padding: 0 2px; }

/* ══ TOOLBAR (filter bar) ══ */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search-box { position: relative; flex: 1; min-width: 200px; max-width: 420px; }
.search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--tx3); }
.search-box input { width: 100%; padding: 10px 12px 10px 36px; }

select.input-field.toolbar-select { width: auto; min-width: 190px; }

/* ══ DROPDOWNS + CONTEXT MENUS ══ */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: #0d1424;
    border: 1px solid var(--line2);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 30px rgba(47, 111, 228, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 90;
    display: none;
    animation: menuIn 0.14s ease;
}
.dropdown-menu.right { left: auto; right: 0; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu .menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--tx2);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: 0.12s;
}
.dropdown-menu .menu-item:hover { background: rgba(79, 156, 249, 0.12); color: #fff; }
.dropdown-menu .menu-item svg { width: 14px; height: 14px; opacity: 0.75; flex-shrink: 0; }
.dropdown-menu .menu-item.danger { color: #ff8890; }
.dropdown-menu .menu-item.danger:hover { background: rgba(255, 92, 92, 0.14); color: #ffb0b5; }
.dropdown-menu .menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }

@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* context menu (positioned at cursor) */
.ctx-menu {
    position: fixed;
    z-index: 200;
    min-width: 210px;
    background: #0d1424;
    border: 1px solid var(--line2);
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65), 0 0 30px rgba(47, 111, 228, 0.10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: none;
    animation: menuIn 0.13s ease;
}
.ctx-menu.show { display: block; }
.ctx-menu .menu-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 11px; background: transparent; border: none; border-radius: 8px; color: var(--tx2); font-family: var(--font); font-size: 12.5px; cursor: pointer; text-align: left; transition: 0.12s; }
.ctx-menu .menu-item:hover { background: rgba(79, 156, 249, 0.12); color: #fff; }
.ctx-menu .menu-item.danger { color: #ff8890; }
.ctx-menu .menu-item.danger:hover { background: rgba(255, 92, 92, 0.14); color: #ffb0b5; }
.ctx-menu .menu-item svg { width: 13.5px; height: 13.5px; opacity: 0.75; flex-shrink: 0; }
.ctx-menu .menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.ctx-menu .menu-sub { color: var(--tx3); font-size: 10.5px; padding: 3px 11px 6px; }

/* ══ TOAST ══ */
.toast {
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%) translateY(-14px);
    background: rgba(13, 20, 36, 0.94);
    border: 1px solid var(--line2);
    color: var(--tx);
    font-size: 12.5px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 12px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.6), 0 0 24px rgba(47, 111, 228, 0.18);
    display: flex;
    align-items: center;
    gap: 9px;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
    z-index: 300;
    backdrop-filter: blur(16px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .t-ic { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast .t-ic svg { width: 11px; height: 11px; }
.toast.t-ok { border-color: rgba(46, 204, 113, 0.45); }
.toast.t-ok .t-ic { background: rgba(46, 204, 113, 0.18); color: var(--green2); }
.toast.t-err { border-color: rgba(255, 92, 92, 0.5); }
.toast.t-err .t-ic { background: rgba(255, 92, 92, 0.18); color: #ff8890; }
.toast.t-info { border-color: rgba(79, 156, 249, 0.45); }
.toast.t-info .t-ic { background: rgba(79, 156, 249, 0.16); color: #9ec4ff; }

/* ══ PROGRESS ══ */
.progress-wrap { width: 100%; height: 6px; background: rgba(255, 255, 255, 0.07); border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue2), var(--cyan)); border-radius: 6px; transition: width 0.4s ease; min-width: 0; box-shadow: 0 0 8px rgba(56, 217, 240, 0.4); }
.progress-fill.done { background: linear-gradient(90deg, #1f9d57, #3ce08a); box-shadow: 0 0 8px rgba(46, 204, 113, 0.4); }

/* stat rings */
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring {
    --p: 0;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: conic-gradient(var(--blue) calc(var(--p) * 1%), rgba(255, 255, 255, 0.06) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #0c1424; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5); }
.ring .ring-val { position: relative; z-index: 1; font-family: var(--mono); font-size: 14px; font-weight: 700; color: #fff; }
.ring .ring-val small { display: block; text-align: center; font-size: 8.5px; color: var(--tx3); font-family: var(--font); font-weight: 600; letter-spacing: 0.8px; }
.ring-info b { display: block; font-size: 13px; font-weight: 700; color: var(--tx); }
.ring-info span { font-size: 11px; color: var(--tx3); }
.ring-info small { font-size: 10px; color: var(--tx3); display: block; margin-top: 2px; }

/* ══ STAT CARDS ══ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    transition: 0.15s;
}
.stat-card:hover { border-color: rgba(96, 165, 250, 0.28); box-shadow: 0 0 20px rgba(47, 111, 228, 0.12); transform: translateY(-1px); }
.stat-value { font-size: 20px; font-weight: 800; font-family: var(--mono); color: #fff; }
.stat-value small { font-size: 11px; color: var(--tx3); font-family: var(--font); font-weight: 600; }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--tx3); margin-top: 3px; }

/* uptime boxes */
.uptime-grid { display: flex; gap: 10px; }
.up-box {
    flex: 1;
    background: rgba(4, 7, 14, 0.6);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 10px 6px;
    text-align: center;
}
.up-box .up-val { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--blue3); text-shadow: 0 0 12px rgba(79, 156, 249, 0.4); }
.up-box .up-label { font-size: 8.5px; font-weight: 700; letter-spacing: 1.2px; color: var(--tx3); text-transform: uppercase; margin-top: 2px; }

/* ══ NOTIFICATION CENTER ══ */
.notif-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.notif-head h3 { font-size: 14px; font-weight: 700; flex: 1; display: flex; align-items: center; gap: 8px; }
.notif-head h3 svg { width: 15px; height: 15px; color: var(--blue3); }
.notif-clear {
    width: 28px; height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}
.notif-clear:hover { background: rgba(79, 156, 249, 0.12); color: #fff; }
.notif-clear svg { width: 13.5px; height: 13.5px; }

.notif-list { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 12px;
    background: var(--panel3);
    border: 1px solid var(--line);
    transition: 0.15s;
}
.notif-item:hover { border-color: var(--line2); background: rgba(13, 20, 36, 0.82); }
.notif-item .n-ic {
    width: 30px; height: 30px;
    border-radius: 9px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.notif-item .n-ic svg { width: 15px; height: 15px; }
.notif-item.n-info .n-ic { background: rgba(79, 156, 249, 0.12); color: #9ec4ff; border: 1px solid rgba(79, 156, 249, 0.3); }
.notif-item.n-success .n-ic { background: rgba(46, 204, 113, 0.12); color: var(--green2); border: 1px solid rgba(46, 204, 113, 0.3); }
.notif-item.n-error .n-ic { background: rgba(255, 92, 92, 0.12); color: #ff8890; border: 1px solid rgba(255, 92, 92, 0.3); }
.notif-item .n-body { min-width: 0; flex: 1; }
.notif-item .n-title { font-size: 12.5px; font-weight: 600; color: var(--tx); word-break: break-word; }
.notif-item .n-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; flex-wrap: wrap; }
.notif-item .n-time { font-size: 10.5px; color: var(--tx3); }
.notif-item .n-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--tx3); font-family: var(--mono); }

.notif-empty { padding: 26px 10px; text-align: center; color: var(--tx3); font-size: 12px; border: 1px dashed var(--line); border-radius: 12px; }

/* ══ LEGACY LIST ITEMS (command pages) ══ */
.whitelist-item, .trigger-item, .msg-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 11px;
    background: var(--panel3);
    border: 1px solid var(--line);
    margin-bottom: 9px;
    transition: 0.15s;
}
.whitelist-item:hover, .trigger-item:hover, .msg-item:hover { border-color: var(--line2); }
.whitelist-icon, .sp-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    background: #101828;
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.whitelist-icon img, .sp-icon img { width: 100%; height: 100%; object-fit: cover; }
.sp-info, .cp-info { flex: 1; min-width: 0; }
.sp-info b, .cp-info b { display: block; font-size: 13px; font-weight: 600; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-info span, .cp-info span { font-size: 11px; color: var(--tx3); }
.btn-delete {
    width: 30px; height: 30px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    transition: 0.15s;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.btn-delete:hover { background: rgba(255, 92, 92, 0.14); color: #ff8890; }
.no-items { padding: 18px; text-align: center; color: var(--tx3); font-size: 12px; border: 1px dashed var(--line); border-radius: 11px; }

/* ══ TERMINAL ══ */
.terminal-window {
    background: rgba(3, 6, 12, 0.8);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}
.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--line);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot:nth-child(1) { background: #ff5f57; }
.term-dot:nth-child(2) { background: #febc2e; }
.term-dot:nth-child(3) { background: #28c840; }
.terminal-title { font-size: 11px; color: var(--tx3); font-weight: 600; }
.terminal-body { padding: 13px 15px; font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--tx2); max-height: 250px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.log-line { margin: 0; }
.log-line.error { color: #ff8890; }
.log-line.success { color: var(--green2); }

/* ══ QUEUE / LISTS (recorder & music) ══ */
.queue-card {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    backdrop-filter: blur(14px);
}
.queue-header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--tx2);
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.queue-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.record-item, .queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 11px;
    background: var(--panel3);
    border: 1px solid var(--line);
    transition: 0.15s;
}
.record-item:hover, .queue-item:hover { border-color: var(--line2); }
.record-title { font-size: 12.5px; font-weight: 600; color: var(--tx); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-info { font-size: 10.5px; color: var(--tx3); margin-top: 2px; font-family: var(--mono); }
.rec-btn {
    height: 28px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--line2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--tx2);
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
}
.rec-btn:hover { background: rgba(79, 156, 249, 0.14); color: #fff; }
.rec-btn.red, .rec-btn[red] { border-color: rgba(255, 92, 92, 0.35); color: #ff8890; background: rgba(255, 92, 92, 0.08); }
.rec-btn.red:hover, .rec-btn[red]:hover { background: rgba(255, 92, 92, 0.18); }
.rec-btn.light-purple { border-color: rgba(79, 156, 249, 0.35); color: #9ec4ff; background: rgba(79, 156, 249, 0.08); }
.rec-btn.light-purple:hover { background: rgba(79, 156, 249, 0.16); }

.q-img { width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0; object-fit: cover; background: #101828; border: 1px solid var(--line); }
.q-info { flex: 1; min-width: 0; }
.q-title { font-size: 12.5px; font-weight: 600; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-author { font-size: 10.5px; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ MODAL ══ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(2, 5, 11, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 250;
}
.modal.show { display: flex; animation: ntFadeIn 0.2s ease; }
.modal-content {
    width: 440px;
    max-width: 92vw;
    background: #0d1424;
    border: 1px solid var(--line2);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(47, 111, 228, 0.12);
    animation: menuIn 0.18s ease;
}
.modal-content h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.modal-btns { display: flex; gap: 9px; margin-top: 16px; justify-content: flex-end; }

/* ══ COMMANDS HUB CARDS ══ */
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cmd-card {
    position: relative;
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    cursor: pointer;
    transition: 0.18s;
    overflow: hidden;
}
.cmd-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 120px at 20% -20%, rgba(79, 156, 249, 0.12), transparent 60%);
    opacity: 0;
    transition: 0.18s;
    pointer-events: none;
}
.cmd-card:hover { border-color: rgba(96, 165, 250, 0.4); box-shadow: 0 0 26px rgba(47, 111, 228, 0.18); transform: translateY(-2px); }
.cmd-card:hover::after { opacity: 1; }
.cmd-card .card-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(47, 111, 228, 0.28), rgba(79, 156, 249, 0.12));
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: var(--blue3);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 13px;
    box-shadow: 0 0 14px rgba(47, 111, 228, 0.15);
}
.cmd-card .card-icon svg { width: 22px; height: 22px; }
.cmd-card .card-title { font-size: 14.5px; font-weight: 700; color: var(--tx); }
.cmd-card .card-desc { font-size: 11.5px; color: var(--tx3); margin-top: 5px; line-height: 1.45; }
.cmd-card .card-go {
    position: absolute;
    right: 14px;
    top: 14px;
    color: var(--tx3);
    opacity: 0;
    transition: 0.18s;
}
.cmd-card:hover .card-go { opacity: 1; color: var(--blue3); }

.card-clone {
    position: fixed;
    z-index: 400;
    background: #0b1120;
    border: 1px solid var(--line2);
    border-radius: 16px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: wait;
}
.card-clone .card-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; color: var(--blue3); }
.card-clone .card-icon svg { width: 34px; height: 34px; }

/* ══ QUEST CARDS ══ */
.quests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 13px; }
.quest-card {
    background: var(--panel2);
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 15px;
    transition: 0.18s;
}
.quest-card:hover { border-color: rgba(96, 165, 250, 0.32); box-shadow: 0 0 22px rgba(47, 111, 228, 0.12); }
.quest-card.running { border-color: rgba(46, 204, 113, 0.4); box-shadow: 0 0 22px rgba(46, 204, 113, 0.10); }
.quest-name { font-size: 13.5px; font-weight: 700; color: var(--tx); display: flex; align-items: center; gap: 8px; }
.quest-meta { font-size: 11px; color: var(--tx3); margin-top: 4px; }
.quest-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.quest-progress-text { font-size: 10.5px; color: var(--tx3); margin-top: 5px; font-family: var(--mono); }

/* ══ RECORDING / MUSIC PLAYER ══ */
.rec-grid, .music-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.guild-badge { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.guild-icon { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line2); box-shadow: 0 0 14px rgba(47, 111, 228, 0.2); }
.guild-badge b { display: block; font-size: 13.5px; font-weight: 700; color: var(--tx); }
.channel-name { font-size: 11px; color: var(--tx3); }

.recording-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 92, 92, 0.08);
    border: 1px solid rgba(255, 92, 92, 0.3);
    color: #ff8890;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 12px;
}
.recording-status.active { animation: recPulse 2s infinite; }
@keyframes recPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 92, 92, 0.25); }
    60% { box-shadow: 0 0 0 10px rgba(255, 92, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 92, 92, 0); }
}
.rec-timer { font-family: var(--mono); font-size: 26px; font-weight: 700; color: #fff; letter-spacing: 1px; }

.track-art-wrap { padding: 10px; background: rgba(4, 7, 14, 0.5); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.track-art { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: #101828; }
.track-art.playing { box-shadow: 0 0 0 1px rgba(56, 217, 240, 0.3), 0 0 30px rgba(47, 111, 228, 0.25); }
.track-title { font-size: 16px; font-weight: 800; color: #fff; }
.track-artist { font-size: 12px; color: var(--tx3); margin-top: 2px; }
.progress-wrapper { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.progress-wrapper .progress-container { flex: 1; }
.volume-container { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; }
.extra-controls { display: flex; gap: 8px; margin-top: 12px; justify-content: center; }

/* ══ CLONER ══ */
.server-input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--panel3);
    border: 1px solid var(--line);
    transition: 0.15s;
}
.option-item:hover { border-color: var(--line2); }
.option-label { font-size: 12.5px; font-weight: 600; color: var(--tx); }
.server-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-top: 8px;
    font-size: 12px;
}
.server-preview.valid { background: rgba(46, 204, 113, 0.07); border: 1px solid rgba(46, 204, 113, 0.3); color: var(--green2); }
.server-preview.invalid { background: rgba(255, 92, 92, 0.07); border: 1px solid rgba(255, 92, 92, 0.3); color: #ff8890; }
.preview-icon { width: 30px; height: 30px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #101828; }
.preview-icon img { width: 100%; height: 100%; object-fit: cover; }
.preview-info b { display: block; color: var(--tx); font-weight: 600; font-size: 12.5px; }
.preview-info span { font-size: 10.5px; color: var(--tx3); }
.perm-tag { font-size: 9.5px; font-weight: 700; letter-spacing: 0.6px; padding: 2px 8px; border-radius: 6px; }
.perm-ok { background: rgba(46, 204, 113, 0.12); color: var(--green2); }
.perm-bad { background: rgba(255, 92, 92, 0.12); color: #ff8890; }
.action-area { display: flex; gap: 10px; margin-top: 16px; }
.console-box {
    background: rgba(3, 6, 12, 0.8);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 15px;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--tx2);
    max-height: 260px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin-top: 12px;
}

/* ══ AFK ══ */
.logs-list { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; }
.log-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    background: var(--panel3);
    border: 1px solid var(--line);
}
.log-info { flex: 1; min-width: 0; }
.log-user { font-size: 12.5px; font-weight: 600; color: var(--tx); }
.log-msg { font-size: 12px; color: var(--tx2); margin-top: 1px; }
.log-meta { font-size: 10px; color: var(--tx3); font-family: var(--mono); }
.log-link { font-size: 11px; color: var(--blue3); text-decoration: none; }
.log-link:hover { text-decoration: underline; }
.delete-log-btn {
    width: 26px; height: 26px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--tx3);
    cursor: pointer;
    transition: 0.15s;
}
.delete-log-btn:hover { background: rgba(255, 92, 92, 0.14); color: #ff8890; }
.clear-btn {
    height: 30px;
    padding: 0 13px;
    border-radius: 9px;
    border: 1px solid rgba(255, 92, 92, 0.35);
    background: rgba(255, 92, 92, 0.08);
    color: #ff8890;
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
}
.clear-btn:hover { background: rgba(255, 92, 92, 0.18); }

.status-indicator { display: flex; align-items: center; gap: 9px; padding: 12px 15px; border-radius: 12px; margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.status-indicator.on { background: rgba(46, 204, 113, 0.08); border: 1px solid rgba(46, 204, 113, 0.3); color: var(--green2); }
.status-indicator.off { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); color: var(--tx3); }
.status-indicator .si-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-indicator.on .si-dot { background: var(--green2); box-shadow: 0 0 10px rgba(46, 204, 113, 0.9); }
.status-indicator.off .si-dot { background: var(--tx3); }

/* ══ AVATAR / PROFILE ══ */
.avatar-wrap {
    width: 88px; height: 88px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(from 0deg, var(--blue2), var(--cyan), var(--blue2));
    box-shadow: 0 0 30px rgba(47, 111, 228, 0.45);
    flex-shrink: 0;
}
.avatar-wrap .avatar { width: 100%; height: 100%; border-radius: 50%; display: block; border: 3px solid #0a1220; object-fit: cover; }
.stroke-online { --ring-c: #23a559; }
.stroke-idle { --ring-c: #f0b232; }
.stroke-dnd { --ring-c: #f23f43; }
.stroke-offline { --ring-c: #4e5a6e; }
.avatar-wrapper {
    width: 82px; height: 82px;
    border-radius: 50%;
    padding: 2px;
    border: 3px solid var(--ring-c, #4e5a6e);
    box-shadow: 0 0 24px color-mix(in srgb, var(--ring-c, #4e5a6e) 45%, transparent);
    flex-shrink: 0;
}
.avatar-wrapper .avatar { width: 100%; height: 100%; border-radius: 50%; display: block; border: 3px solid #0a1220; object-fit: cover; }

.badge-row { display: flex; gap: 5px; margin-top: 9px; justify-content: center; flex-wrap: wrap; }
.disc-badge { width: 20px; height: 20px; border-radius: 50%; background: rgba(79, 156, 249, 0.1); border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: #9ec4ff; font-size: 11px; }
.disc-badge.staff { color: #ff8890; border-color: rgba(255, 92, 92, 0.3); }
.disc-badge.boost { color: #e5a9ff; border-color: rgba(229, 169, 255, 0.3); }

.kv-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid rgba(110, 150, 235, 0.07); }
.kv-row:last-child { border-bottom: none; }
.kv-row .kv-label { font-size: 11px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--tx3); }
.kv-row .kv-value { font-size: 12.5px; font-weight: 600; color: var(--tx); font-family: var(--mono); }
.kv-row .kv-value .badge { margin-left: 6px; }

/* ══ MISC ══ */
.divider { border: none; height: 1px; background: var(--line); margin: 16px 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--tx3); }

.settings-form { display: flex; flex-direction: column; gap: 4px; }

.live-dot, .pv-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green2);
    display: inline-block;
    animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.warn-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--orange2);
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 1280px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .rec-grid, .music-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    #xentro-root { padding: 8px; }
    .app-body { grid-template-columns: 48px minmax(0, 1fr); }
    .content { padding: 16px 16px 48px; }
    .grid-3, .form-grid, .server-input-group { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════════════════════════
   XENTRO v2 — CORE COMPONENT LAYER
   dense premium desktop surfaces · glass panels · compact controls
   ═══════════════════════════════════════════════════════════════ */

/* ── surfaces ── */
.glass, .section-card, .card {
    background: linear-gradient(180deg, rgba(18, 28, 46, 0.72), rgba(10, 16, 28, 0.66));
    border: 1px solid rgba(122, 155, 220, 0.14);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(2, 5, 12, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.section-card { padding: 16px; }
.card { padding: 15px 16px; }

.card-title { font-size: 13.5px; font-weight: 700; color: var(--tx); margin-bottom: 3px; }
.card-sub { font-size: 11.5px; color: var(--tx3); margin-bottom: 14px; }

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--tx2);
    margin: 0 0 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
}
.section-title::before {
    content: '';
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
    box-shadow: 0 0 8px rgba(57, 198, 255, 0.6);
}
.section-title .st-icon { margin: 0; }

/* ── buttons ── */
.btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid rgba(122, 155, 220, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--tx2);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.16s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    white-space: nowrap;
}

.btn svg { width: 14px; height: 14px; }
.btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--tx); border-color: rgba(122, 155, 220, 0.35); }
.btn:active { transform: translateY(1px) scale(0.985); }

.btn-primary {
    background: linear-gradient(135deg, var(--blue), #2E9BFF);
    border: 1px solid rgba(63, 159, 255, 0.5);
    color: #fff;
    box-shadow: 0 4px 18px rgba(22, 136, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(135deg, #1D8FFF, #46B6FF); color: #fff; box-shadow: 0 7px 24px rgba(22, 136, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25); }

.btn-cyan {
    background: rgba(57, 198, 255, 0.12);
    border: 1px solid rgba(57, 198, 255, 0.4);
    color: #A9E3FF;
}
.btn-cyan:hover { background: rgba(57, 198, 255, 0.2); color: #fff; box-shadow: 0 6px 20px rgba(57, 198, 255, 0.28); }

.btn-danger {
    border-color: rgba(255, 77, 94, 0.4);
    background: rgba(255, 77, 94, 0.10);
    color: #FF8A96;
}
.btn-danger:hover { background: rgba(255, 77, 94, 0.2); color: #FFB0B8; border-color: rgba(255, 77, 94, 0.6); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--tx3); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: var(--tx2); }

.btn-sm { height: 28px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; }
.btn-lg { height: 42px; padding: 0 22px; font-size: 13.5px; border-radius: 11px; }
.btn-block { width: 100%; }

.save-btn, .btn-add, .btn-join, .btn-q, .btn-start, .btn-stop, .btn-clone, .btn-action, .btn-control {
    height: 38px;
    padding: 0 18px;
    border-radius: 9px;
    border: 1px solid rgba(22, 136, 255, 0.45);
    background: linear-gradient(135deg, var(--blue), #2E9BFF);
    color: #fff;
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.16s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(22, 136, 255, 0.28);
}
.save-btn:hover, .btn-add:hover, .btn-join:hover, .btn-start:hover, .btn-clone:hover { box-shadow: 0 7px 22px rgba(22, 136, 255, 0.42); filter: brightness(1.06); }
.save-btn:active, .btn-add:active, .btn-join:active, .btn-start:active, .btn-stop:active { transform: translateY(1px) scale(0.99); }

.btn-add { margin-top: 0; height: 34px; text-transform: none; background: rgba(22, 136, 255, 0.1); border-color: rgba(22, 136, 255, 0.35); color: #9CC6FF; box-shadow: none; }
.btn-add:hover { background: rgba(22, 136, 255, 0.18); }

.btn-q { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); color: var(--tx2); box-shadow: none; }
.btn-q:hover { background: rgba(255, 255, 255, 0.09); color: var(--tx); }

.btn-stop { background: rgba(255, 77, 94, 0.12); border-color: rgba(255, 77, 94, 0.4); color: #FF8A96; box-shadow: none; }
.btn-stop:hover { background: rgba(255, 77, 94, 0.22); color: #FFB0B8; }

.btn-join { min-width: 170px; }

.btn-clone[red] { background: rgba(255, 77, 94, 0.12); border: 1px solid rgba(255, 77, 94, 0.4); color: #FF8A96; box-shadow: none; }
.btn-clone[red]:hover { background: rgba(255, 77, 94, 0.22); }

.btn-action { height: 34px; padding: 0 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); color: var(--tx2); font-size: 12px; box-shadow: none; }
.btn-action:hover { background: rgba(22, 136, 255, 0.14); color: #fff; border-color: rgba(22, 136, 255, 0.4); }

.btn-control { height: 38px; width: 38px; padding: 0; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--tx2); border-radius: 10px; box-shadow: none; }
.btn-control:hover { background: rgba(22, 136, 255, 0.16); color: #fff; border-color: rgba(22, 136, 255, 0.42); }
.btn-control.active { background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; border: none; box-shadow: 0 4px 14px rgba(57, 198, 255, 0.4); }

.btn-round { width: 34px; height: 34px; padding: 0; border-radius: 50%; }

/* ── inputs ── */
.input-field, .select-box {
    height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid rgba(122, 155, 220, 0.16);
    background: rgba(4, 8, 16, 0.6);
    color: var(--tx);
    font-family: var(--font);
    font-size: 12.5px;
    outline: none;
    transition: 0.15s;
    width: 100%;
}
.input-field:focus, .select-box:focus { border-color: rgba(63, 159, 255, 0.55); box-shadow: 0 0 0 3px rgba(22, 136, 255, 0.12); }
.input-field::placeholder { color: #45546E; }
.input-field:disabled { opacity: 0.4; cursor: not-allowed; }
select.input-field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6A86' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 13px; padding-right: 30px; }

.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--tx3);
    margin-bottom: 6px;
}
.input-group { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.full-width, .full { grid-column: 1 / -1; }

/* ── badges ── */
.badge, .tag, .pill {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.badge-green, .tag.done, .pill-green { background: rgba(34, 211, 138, 0.1); border: 1px solid rgba(34, 211, 138, 0.35); color: var(--green2); }
.badge-orange, .tag.warn, .pill-orange { background: rgba(255, 181, 71, 0.1); border: 1px solid rgba(255, 181, 71, 0.35); color: var(--orange2); }
.badge-red, .tag.error, .pill-red { background: rgba(255, 77, 94, 0.1); border: 1px solid rgba(255, 77, 94, 0.35); color: #FF8A96; }
.badge-blue, .pill-blue { background: rgba(22, 136, 255, 0.1); border: 1px solid rgba(22, 136, 255, 0.32); color: #9CC6FF; }
.badge-gray, .tag, .pill-gray { background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); color: var(--tx3); }
.badge-cyan, .pill-yellow { background: rgba(57, 198, 255, 0.1); border: 1px solid rgba(57, 198, 255, 0.32); color: #A9E3FF; }
.badge-neutral { background: rgba(142, 157, 184, 0.1); border: 1px solid rgba(142, 157, 184, 0.3); color: var(--tx2); }
.badge-off { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--tx3); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(22, 136, 255, 0.08);
    border: 1px solid rgba(22, 136, 255, 0.25);
    color: #9CC6FF;
    font-size: 10.5px;
    font-weight: 700;
}

/* ── switches ── */
.switch { width: 40px; height: 22px; }
.slider:before { height: 14px; width: 14px; left: 3px; bottom: 3px; }
input:checked + .slider { background: linear-gradient(135deg, var(--blue), var(--cyan)); border-color: rgba(63, 159, 255, 0.6); box-shadow: 0 0 12px rgba(22, 136, 255, 0.4); }
input:checked + .slider:before { transform: translateX(18px); }

.toggle-switch { width: 40px; height: 22px; }
.toggle-switch .slider:before { height: 14px; width: 14px; left: 3px; bottom: 3px; }
.toggle-switch input:checked + .slider { background: linear-gradient(135deg, var(--blue), var(--cyan)); border-color: rgba(63, 159, 255, 0.6); box-shadow: 0 0 12px rgba(22, 136, 255, 0.4); }
.toggle-switch input:checked + .slider:before { transform: translateX(18px); }

/* ── status rows / kv ── */
.status-row { padding: 10px 0; border-bottom: 1px solid rgba(122, 155, 220, 0.08); }
.status-row:last-child { border-bottom: none; }
.status-row .status-info { font-size: 11.5px; }
.status-row .status-info b { font-size: 12.5px; }

.kv-row { padding: 8px 0; }
.kv-label { letter-spacing: 1px; font-size: 10px; }
.kv-value { font-size: 12px; font-family: var(--mono); }

/* ── tables v2 (dense) ── */
.glass-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid rgba(122, 155, 220, 0.14);
    background: rgba(6, 10, 20, 0.5);
}
.glass-table { font-size: 12px; min-width: 860px; }
.glass-table thead th { padding: 9px 12px; font-size: 9.5px; }
.glass-table tbody td { padding: 8px 12px; font-size: 11.5px; }
.glass-table tbody tr:hover { background: rgba(22, 136, 255, 0.05); }

/* ── toolbar / filters ── */
.toolbar { gap: 8px; margin-bottom: 12px; }
.search-box { min-width: 200px; max-width: 360px; }
.search-box input { height: 34px; padding-left: 34px; }

/* ── tabs (seg) ── */
.seg {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: rgba(4, 8, 16, 0.55);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.seg-btn {
    height: 28px;
    padding: 0 13px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--tx3);
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.seg-btn svg { width: 13px; height: 13px; }
.seg-btn:hover { color: var(--tx2); }
.seg-btn.active {
    background: linear-gradient(135deg, rgba(22, 136, 255, 0.85), rgba(57, 198, 255, 0.7));
    color: #fff;
    box-shadow: 0 3px 12px rgba(22, 136, 255, 0.35);
}

.tabs { gap: 2px; padding: 3px; background: rgba(4, 8, 16, 0.5); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 16px; }
.tab { padding: 7px 14px; font-size: 12px; border-radius: 7px; }
.tab::after { display: none; }
.tab.active { background: linear-gradient(135deg, rgba(22, 136, 255, 0.85), rgba(57, 198, 255, 0.7)); color: #fff; box-shadow: 0 3px 12px rgba(22, 136, 255, 0.3); }

/* ── stat strip ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.stat-mini {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(18, 28, 46, 0.72), rgba(10, 16, 28, 0.66));
    border: 1px solid rgba(122, 155, 220, 0.14);
    border-radius: var(--radius-s);
    transition: 0.15s;
}
.stat-mini:hover { border-color: rgba(63, 159, 255, 0.35); box-shadow: 0 0 18px rgba(22, 136, 255, 0.1); transform: translateY(-1px); }
.stat-mini .sm-ic {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(22, 136, 255, 0.12);
    border: 1px solid rgba(63, 159, 255, 0.28);
    color: var(--blue3);
    flex-shrink: 0;
}
.stat-mini .sm-ic svg { width: 16px; height: 16px; }
.stat-mini.green .sm-ic { background: rgba(34, 211, 138, 0.1); border-color: rgba(34, 211, 138, 0.3); color: var(--green2); }
.stat-mini.cyan .sm-ic { background: rgba(57, 198, 255, 0.1); border-color: rgba(57, 198, 255, 0.3); color: var(--cyan); }
.stat-mini.orange .sm-ic { background: rgba(255, 181, 71, 0.1); border-color: rgba(255, 181, 71, 0.3); color: var(--orange2); }
.stat-mini.red .sm-ic { background: rgba(255, 77, 94, 0.1); border-color: rgba(255, 77, 94, 0.3); color: #FF8A96; }
.stat-mini .sm-val { font-size: 15px; font-weight: 800; font-family: var(--mono); color: #fff; line-height: 1.1; }
.stat-mini .sm-val small { font-size: 9.5px; color: var(--tx3); font-family: var(--font); font-weight: 700; }
.stat-mini .sm-label { font-size: 9px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: var(--tx3); margin-top: 2px; }

/* ── hero header (dashboard) ── */
.hero-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-head h1 { font-size: 22px; font-weight: 800; background: linear-gradient(180deg, #fff, #B9C8E8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 10px; }
.hero-head p { font-size: 12px; color: var(--tx3); margin-top: 3px; display: flex; align-items: center; gap: 7px; }
.hero-head p .live-dot { margin: 0; }
.hero-actions { display: flex; gap: 8px; align-items: center; }

/* ── account card ── */
.acct-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.acct-top { display: flex; align-items: center; gap: 16px; }
.acct-top .avatar-wrap { width: 74px; height: 74px; z-index: 0; }
.acct-top .avatar-wrap .avatar { border-width: 3px; }
.acct-info { flex: 1; min-width: 0; }
.acct-info .ai-name { font-size: 17px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acct-info .ai-tag { font-size: 12px; color: var(--tx3); font-family: var(--mono); margin-top: 2px; }
.acct-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.acct-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acct-cell {
    padding: 9px 12px;
    border-radius: 9px;
    background: rgba(4, 8, 16, 0.5);
    border: 1px solid var(--line);
}
.acct-cell .ac-label { font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tx3); }
.acct-cell .ac-value { font-size: 11.5px; font-family: var(--mono); color: var(--tx); margin-top: 3px; display: flex; align-items: center; gap: 6px; word-break: break-all; }
.acct-cell .ac-value .badge { margin-left: auto; }

.ring { width: 62px; height: 62px; }
.ring::before { inset: 5px; }
.ring .ring-val { font-size: 12.5px; }
.ring-info b { font-size: 12.5px; }
.ring-info span { font-size: 10.5px; }

/* ── notification center ── */
.notif-list { gap: 7px; max-height: 560px; }
.notif-item { padding: 10px 12px; border-radius: 10px; gap: 10px; }
.notif-item .n-ic { width: 28px; height: 28px; border-radius: 8px; }
.notif-item.n-info .n-ic { background: rgba(22, 136, 255, 0.12); color: #9CC6FF; border-color: rgba(22, 136, 255, 0.3); }
.notif-item.n-success .n-ic { background: rgba(34, 211, 138, 0.12); color: var(--green2); border-color: rgba(34, 211, 138, 0.3); }
.notif-item.n-error .n-ic { background: rgba(255, 77, 94, 0.12); color: #FF8A96; border-color: rgba(255, 77, 94, 0.3); }
.notif-item .n-title { font-size: 12px; }
.notif-item .n-time { font-size: 10px; }
.notif-head h3 { font-size: 13px; }
.notif-head h3 svg { width: 14px; height: 14px; }

/* ── cmd cards (hub) ── */
.cmd-grid { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 12px; }
.cmd-card { border-radius: 13px; padding: 15px; background: linear-gradient(180deg, rgba(18, 28, 46, 0.8), rgba(10, 16, 28, 0.7)); }
.cmd-card::after { background: radial-gradient(480px 110px at 20% -20%, rgba(22, 136, 255, 0.16), transparent 60%); }
.cmd-card:hover { border-color: rgba(63, 159, 255, 0.45); box-shadow: 0 0 24px rgba(22, 136, 255, 0.2); transform: translateY(-2px); }
.cmd-card .card-icon { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, rgba(22, 136, 255, 0.22), rgba(57, 198, 255, 0.08)); border-color: rgba(63, 159, 255, 0.35); }
.cmd-card .card-title { font-size: 13.5px; }
.cmd-card .card-desc { font-size: 11px; margin-top: 4px; }
.cmd-card .tag, .cmd-card .badge { margin-top: 9px; }

.hub-card { position: relative; display: flex; flex-direction: column; min-height: 138px; }
.hub-card .go-btn {
    position: absolute;
    right: 13px; top: 13px;
    width: 28px; height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(63, 159, 255, 0.3);
    background: rgba(22, 136, 255, 0.08);
    color: var(--blue3);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: 0.18s;
}
.hub-card:hover .go-btn { opacity: 1; transform: scale(1); }
.hub-card .go-btn svg { width: 13px; height: 13px; }
.hub-card .hub-status { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 10px; }

/* ── quests ── */
.quests-grid { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 11px; }
.quest-card { padding: 13px 14px; }
.quest-name { font-size: 12.5px; }
.quest-meta { font-size: 10.5px; }

/* ── lists ── */
.whitelist-item, .trigger-item, .msg-item, .record-item, .queue-item { padding: 9px 11px; border-radius: 9px; gap: 10px; }
.sp-info b, .cp-info b { font-size: 12.5px; }
.sp-info span, .cp-info span { font-size: 10.5px; }
.whitelist-icon, .sp-icon { width: 32px; height: 32px; border-radius: 8px; }
.q-img { width: 36px; height: 36px; }
.q-title { font-size: 12px; }

/* ── terminal / console ── */
.terminal-window { border-radius: var(--radius); }
.terminal-body { padding: 11px 13px; font-size: 11px; }
.console-box { padding: 11px 13px; font-size: 11px; }

/* ── ctx menu / dropdown v2 ── */
.ctx-menu, .dropdown-menu {
    background: rgba(10, 16, 28, 0.96);
    border: 1px solid rgba(122, 155, 220, 0.22);
    border-radius: 11px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 24px rgba(22, 136, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.ctx-menu .menu-item, .dropdown-menu .menu-item { padding: 8px 10px; font-size: 12px; border-radius: 7px; }
.ctx-menu .menu-item:hover, .dropdown-menu .menu-item:hover { background: rgba(22, 136, 255, 0.14); }
.ctx-menu .menu-item.danger, .dropdown-menu .menu-item.danger { color: #FF8A96; }
.ctx-menu .menu-item.danger:hover, .dropdown-menu .menu-item.danger:hover { background: rgba(255, 77, 94, 0.14); }

/* ── toast v2 ── */
.toast {
    top: 64px;
    background: rgba(10, 16, 28, 0.96);
    border: 1px solid rgba(122, 155, 220, 0.25);
    font-size: 12px;
    padding: 9px 16px;
    border-radius: 11px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.toast.t-ok { border-color: rgba(34, 211, 138, 0.5); }
.toast.t-err { border-color: rgba(255, 77, 94, 0.55); }
.toast.t-info { border-color: rgba(22, 136, 255, 0.5); }

/* ── modal v2 ── */
.modal-content { background: rgba(10, 16, 28, 0.97); border-radius: 13px; padding: 19px; }
.modal-content h2 { font-size: 15px; }

/* ═══════════════════════════════════════════════════════════════
   XENTRO v2 — NEW PAGE COMPONENTS
   ═══════════════════════════════════════════════════════════════ */

/* ── scripts IDE ── */
.ide-wrap { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 14px; height: calc(100vh - 190px); min-height: 460px; }
.explorer {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 10px;
    background: linear-gradient(180deg, rgba(10, 16, 28, 0.7), rgba(6, 10, 20, 0.65));
    border: 1px solid rgba(122, 155, 220, 0.14);
    border-radius: var(--radius);
}
.explorer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 10px; }
.explorer-head .ex-title { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tx2); display: flex; align-items: center; gap: 7px; }
.explorer-head .ex-title svg { width: 14px; height: 14px; color: var(--blue3); }
.explorer-search { position: relative; margin-bottom: 8px; }
.explorer-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; color: var(--tx3); }
.explorer-search input { height: 32px; padding: 0 10px 0 30px; font-size: 11.5px; }
.explorer-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.file-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.13s;
    color: var(--tx3);
    width: 100%;
    background: transparent;
    font-family: var(--font);
    text-align: left;
}
.file-item svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--tx3); transition: 0.13s; }
.file-item:hover { background: rgba(22, 136, 255, 0.07); color: var(--tx2); }
.file-item.active { background: rgba(22, 136, 255, 0.13); border-color: rgba(63, 159, 255, 0.3); color: #fff; }
.file-item.active svg { color: var(--blue3); }
.file-item .fi-main { flex: 1; min-width: 0; }
.file-item .fi-name { font-size: 12px; font-weight: 600; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .fi-sub { font-size: 9.5px; color: var(--tx3); font-family: var(--mono); margin-top: 1px; }
.file-item .fi-st { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.file-item .fi-st.on { background: var(--green2); box-shadow: 0 0 7px rgba(44, 231, 149, 0.8); }
.file-item .fi-st.off { background: #4E5A6E; }

.editor-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(4, 8, 16, 0.72);
    border: 1px solid rgba(122, 155, 220, 0.14);
    border-radius: var(--radius);
    overflow: hidden;
}
.ed-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 16, 28, 0.6);
    overflow-x: auto;
}
.ed-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--tx3);
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.13s;
    white-space: nowrap;
    font-family: var(--font);
    background: transparent;
}
.ed-tab svg { width: 12px; height: 12px; color: var(--blue3); }
.ed-tab:hover { background: rgba(255, 255, 255, 0.05); color: var(--tx2); }
.ed-tab.active { background: rgba(22, 136, 255, 0.12); color: #fff; border-color: rgba(63, 159, 255, 0.25); }
.ed-tab .et-close { opacity: 0; transition: 0.13s; width: 12px; height: 12px; border-radius: 3px; display: flex; align-items: center; justify-content: center; }
.ed-tab:hover .et-close { opacity: 0.7; }
.ed-tab .et-close:hover { opacity: 1; background: rgba(255, 77, 94, 0.2); color: #FF8A96; }

.ed-body { flex: 1; min-height: 0; display: flex; position: relative; }
.ed-lines {
    width: 52px;
    flex-shrink: 0;
    padding: 12px 8px 12px 0;
    text-align: right;
    font-family: var(--mono);
    font-size: 11px;
    line-height: 1.75;
    color: #3B4965;
    border-right: 1px solid rgba(122, 155, 220, 0.09);
    background: rgba(4, 8, 16, 0.6);
    user-select: none;
    overflow: hidden;
}
.ed-code {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.75;
    color: #C9D6EF;
    white-space: pre;
    overflow: auto;
    tab-size: 4;
}
.ed-code .tk-kw { color: #60A5FA; }
.ed-code .tk-str { color: #7CF0B0; }
.ed-code .tk-num { color: #FFB46B; }
.ed-code .tk-fn { color: #7CD0FF; }
.ed-code .tk-cm { color: #45546E; font-style: italic; }
.ed-code .tk-pr { color: #C792EA; }
.ed-code .tk-pro { color: #FFC36B; }
.minimap {
    position: absolute;
    right: 10px;
    top: 12px;
    bottom: 12px;
    width: 46px;
    border-radius: 6px;
    background: rgba(122, 155, 220, 0.05);
    border: 1px solid rgba(122, 155, 220, 0.1);
    overflow: hidden;
    opacity: 0.85;
}
.minimap .mm-bar {
    position: absolute;
    left: 3px; right: 3px;
    height: 40px;
    border-radius: 4px;
    background: rgba(22, 136, 255, 0.25);
    border: 1px solid rgba(63, 159, 255, 0.4);
}
.ed-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 12px;
    border-top: 1px solid var(--line);
    background: rgba(10, 16, 28, 0.6);
    font-family: var(--mono);
    font-size: 10px;
    color: var(--tx3);
    flex-wrap: wrap;
}
.ed-foot .ef-right { display: flex; gap: 14px; align-items: center; }
.ed-foot .ef-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green2); box-shadow: 0 0 7px rgba(44, 231, 149, 0.8); }

/* syntax toolbar */
.ed-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: rgba(10, 16, 28, 0.5); flex-wrap: wrap; }
.ed-toolbar .spacer { flex: 1; }
.ed-toolbar .combo { display: flex; gap: 4px; }

/* ── marketplace cards ── */
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 13px; }
.market-card {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: linear-gradient(180deg, rgba(18, 28, 46, 0.78), rgba(10, 16, 28, 0.7));
    border: 1px solid rgba(122, 155, 220, 0.14);
    border-radius: var(--radius);
    transition: 0.16s;
    position: relative;
}
.market-card:hover { border-color: rgba(63, 159, 255, 0.4); box-shadow: 0 0 22px rgba(22, 136, 255, 0.15); transform: translateY(-2px); }
.market-card .mc-head { display: flex; align-items: center; gap: 10px; }
.market-card .mc-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(22, 136, 255, 0.2), rgba(57, 198, 255, 0.08)); border: 1px solid rgba(63, 159, 255, 0.3); color: var(--blue3); flex-shrink: 0; }
.market-card .mc-ic svg { width: 17px; height: 17px; }
.market-card .mc-title { font-size: 13px; font-weight: 700; color: var(--tx); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.market-card .mc-desc { font-size: 11px; color: var(--tx3); line-height: 1.5; flex: 1; }
.market-card .mc-meta { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--tx3); font-family: var(--mono); flex-wrap: wrap; }
.market-card .mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid rgba(122, 155, 220, 0.08); }
.market-card .stars { display: flex; align-items: center; gap: 3px; color: var(--orange2); font-size: 10.5px; font-weight: 700; }
.market-card .stars svg { width: 12px; height: 12px; }
.dl-btn { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.dl-btn svg { width: 13px; height: 13px; }
.dl-btn.done { color: var(--green2); border-color: rgba(34, 211, 138, 0.35); background: rgba(34, 211, 138, 0.1); }
.dl-btn svg { width: 13px; height: 13px; }

/* ── themes ── */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 13px; }
.theme-card { overflow: hidden; padding: 0; }
.theme-card .th-prev { height: 92px; border-radius: 0; border: none; border-bottom: 1px solid rgba(122, 155, 220, 0.14); }
.theme-card .th-body { padding: 11px 13px; }
.theme-card .th-name { font-size: 12.5px; font-weight: 700; color: var(--tx); display: flex; align-items: center; gap: 8px; }
.theme-card .th-sub { font-size: 10px; color: var(--tx3); font-family: var(--mono); margin-top: 2px; }
.theme-card .th-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 6px; }
.th-prev {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--pv-bg, #0B1220);
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    gap: 5px;
}
.th-prev .pv-row { display: flex; align-items: center; gap: 7px; font-size: 8px; color: var(--pv-tx2, #8E9DB8); }
.th-prev .pv-av { width: 14px; height: 14px; border-radius: 50%; background: var(--pv-a, #1688FF); flex-shrink: 0; box-shadow: 0 0 6px var(--pv-a, #1688FF); }
.th-prev .pv-bubble {
    padding: 4px 8px;
    border-radius: 7px;
    background: var(--pv-bg2, #101A2B);
    border: 1px solid var(--pv-line, rgba(122,155,220,.15));
    font-size: 8px;
    color: var(--pv-tx, #F5F7FF);
    align-self: flex-start;
    min-width: 55%;
}
.th-prev .pv-bar { height: 5px; border-radius: 3px; background: var(--pv-btn, #1688FF); width: 45%; box-shadow: 0 0 8px color-mix(in srgb, var(--pv-btn, #1688FF) 60%, transparent); margin-top: 1px; }
.th-prev .pv-strip { height: 3px; border-radius: 2px; background: var(--pv-s, #39C6FF); width: 70%; opacity: 0.85; }
.th-apply.active { color: var(--green2); border-color: rgba(34, 211, 138, 0.4); background: rgba(34, 211, 138, 0.1); }

/* theme live preview panel */
.theme-live { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.dc-preview {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--pv-line, rgba(122, 155, 220, 0.14));
    background: var(--pv-bg, #0B1220);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}
.dc-side { display: flex; flex-direction: column; gap: 8px; }
.dc-main { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.dc-server { padding: 8px 10px; font-size: 11px; font-weight: 700; color: var(--pv-tx, #F5F7FF); border-bottom: 1px solid var(--pv-line, rgba(122,155,220,.15)); background: var(--pv-bg2, #101A2B); display: flex; align-items: center; gap: 8px; }
.dc-msg { display: flex; gap: 8px; align-items: flex-start; }
.dc-msg .dc-av { width: 28px; height: 28px; border-radius: 50%; background: var(--pv-a, #1688FF); flex-shrink: 0; box-shadow: 0 0 10px color-mix(in srgb, var(--pv-a, #1688FF) 55%, transparent); }
.dc-msg .dc-body { background: var(--pv-bg2, #101A2B); border: 1px solid var(--pv-line, rgba(122,155,220,.15)); border-radius: 9px; padding: 7px 10px; flex: 1; }
.dc-msg .dc-author { font-size: 10px; font-weight: 800; color: var(--pv-tx, #F5F7FF); }
.dc-msg .dc-text { font-size: 9.5px; color: var(--pv-tx2, #8E9DB8); margin-top: 2px; line-height: 1.45; }
.dc-input { border-radius: 9px; border: 1px solid var(--pv-line, rgba(122,155,220,.2)); background: var(--pv-bg2, #101A2B); padding: 9px 11px; font-size: 10px; color: var(--pv-tx2, #8E9DB8); }

/* ── feature builder (custom features) ── */
.builder-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; height: calc(100vh - 190px); min-height: 460px; }
.builder-palette {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    background: rgba(10, 16, 28, 0.7);
    border: 1px solid rgba(122, 155, 220, 0.14);
    border-radius: var(--radius);
    overflow-y: auto;
}
.pal-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid rgba(122, 155, 220, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--tx2);
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 600;
    cursor: grab;
    transition: 0.14s;
    text-align: left;
}
.pal-item svg { width: 14px; height: 14px; color: var(--cyan); flex-shrink: 0; }
.pal-item:hover { border-color: rgba(63, 159, 255, 0.4); background: rgba(22, 136, 255, 0.1); color: #fff; transform: translateX(2px); }
.pal-item:active { cursor: grabbing; }

.builder-canvas {
    position: relative;
    padding: 22px 20px;
    overflow-y: auto;
    background:
        radial-gradient(600px 300px at 50% 0%, rgba(22, 136, 255, 0.05), transparent 65%),
        rgba(4, 8, 16, 0.55);
    border: 1px solid rgba(122, 155, 220, 0.14);
    border-radius: var(--radius);
}
.builder-canvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(122, 155, 220, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 155, 220, 0.05) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    border-radius: inherit;
}

.flow { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
.node {
    background: linear-gradient(180deg, rgba(18, 28, 46, 0.92), rgba(10, 16, 28, 0.9));
    border: 1px solid rgba(122, 155, 220, 0.18);
    border-radius: 11px;
    padding: 12px 13px;
    box-shadow: 0 10px 26px rgba(2, 5, 12, 0.4);
    position: relative;
    z-index: 1;
    transition: 0.15s;
}
.node:hover { border-color: rgba(63, 159, 255, 0.4); }
.node.cond { border-left: 3px solid var(--cyan); }
.node.act { border-left: 3px solid var(--blue); }
.node.logic { border-left: 3px solid var(--orange); }
.node-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.node-head .nd-ic { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--blue3); background: rgba(22, 136, 255, 0.12); border: 1px solid rgba(63, 159, 255, 0.25); }
.node.cond .nd-ic { color: var(--cyan); background: rgba(57, 198, 255, 0.1); border-color: rgba(57, 198, 255, 0.3); }
.node.logic .nd-ic { color: var(--orange2); background: rgba(255, 181, 71, 0.1); border-color: rgba(255, 181, 71, 0.3); }
.node-head .nd-ic svg { width: 13px; height: 13px; }
.node-head .nd-name { font-size: 12px; font-weight: 700; color: var(--tx); flex: 1; }
.node-head .nd-del { width: 22px; height: 22px; border-radius: 6px; border: none; background: transparent; color: var(--tx3); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.13s; }
.node-head .nd-del svg { width: 11px; height: 11px; }
.node-head .nd-del:hover { background: rgba(255, 77, 94, 0.15); color: #FF8A96; }
.node-body { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 11px; }
.node-body .full { grid-column: 1 / -1; }
.node-body .nd-opts { display: flex; gap: 4px; flex-wrap: wrap; grid-column: 1 / -1; }
.nd-add { grid-column: 1 / -1; }
.flow-connector { display: flex; align-items: center; justify-content: center; height: 30px; position: relative; z-index: 0; }
.flow-connector .fc-line { width: 2px; height: 100%; background: linear-gradient(180deg, var(--blue), var(--cyan)); box-shadow: 0 0 8px rgba(57, 198, 255, 0.5); border-radius: 2px; }
.flow-connector .fc-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: fcFlow 1.6s linear infinite; }
@keyframes fcFlow {
    0% { transform: translateY(-10px); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

.expr-btn {
    height: 26px;
    padding: 0 9px;
    border-radius: 7px;
    border: 1px solid rgba(57, 198, 255, 0.3);
    background: rgba(57, 198, 255, 0.07);
    color: #A9E3FF;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.13s;
}
.expr-btn:hover { background: rgba(57, 198, 255, 0.16); color: #fff; box-shadow: 0 0 10px rgba(57, 198, 255, 0.2); }

.openx { display: flex; align-items: center; justify-content: center; height: 34px; margin: 2px 0; }
.openx .ox-line { flex: 1; height: 1px; background: rgba(122, 155, 220, 0.25); position: relative; }
.openx .ox-line::after { content: ''; position: absolute; right: 0; top: -2.5px; width: 6px; height: 6px; border-right: 1.5px solid var(--line2); border-top: 1.5px solid var(--line2); transform: rotate(45deg); }

/* ── activity viewer ── */
.act-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.act-toolbar .select-box { width: auto; min-width: 160px; height: 34px; }
.act-toolbar .spacer { flex: 1; }
.cnt-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(22, 136, 255, 0.08); border: 1px solid rgba(63, 159, 255, 0.25); color: #9CC6FF; font-size: 10.5px; font-weight: 800; font-family: var(--mono); }
.cnt-chip .live-dot { width: 6px; height: 6px; }

.ev-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; }
.ev-msg { background: rgba(22, 136, 255, 0.1); border: 1px solid rgba(22, 136, 255, 0.3); color: #9CC6FF; }
.ev-auto { background: rgba(57, 198, 255, 0.08); border: 1px solid rgba(57, 198, 255, 0.3); color: #A9E3FF; }
.ev-join { background: rgba(34, 211, 138, 0.1); border: 1px solid rgba(34, 211, 138, 0.3); color: var(--green2); }
.ev-misc { background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.3); color: var(--orange2); }

.sel-row { background: rgba(22, 136, 255, 0.07) !important; }

/* ── profile page ── */
.profile-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; align-items: start; }
.profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; gap: 12px; }
.profile-hero .avatar-wrap { width: 96px; height: 96px; }
.profile-hero .avatar-wrap .avatar { border-width: 4px; }
.profile-hero .ph-name { font-size: 19px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.profile-hero .ph-tag { font-size: 12px; color: var(--tx3); font-family: var(--mono); }
.ph-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 4px; }
.ph-stat { padding: 8px; border-radius: 9px; background: rgba(4, 8, 16, 0.5); border: 1px solid var(--line); }
.ph-stat .ps-val { font-size: 15px; font-weight: 800; font-family: var(--mono); color: #fff; }
.ph-stat .ps-label { font-size: 8.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--tx3); margin-top: 2px; }
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(122, 155, 220, 0.08);
}
.setting-item:last-child { border-bottom: none; }
.setting-item .set-info { min-width: 0; }
.setting-item .set-info b { display: block; font-size: 12.5px; font-weight: 700; color: var(--tx); }
.setting-item .set-info span { font-size: 10.5px; color: var(--tx3); display: block; margin-top: 2px; line-height: 1.4; }
.setting-item .set-info b .badge { margin-left: 7px; vertical-align: 1px; }

/* ── custom tabs page ── */
.tabs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ctab-card { padding: 13px 14px; display: flex; align-items: center; gap: 11px; transition: 0.15s; }
.ctab-card:hover { border-color: rgba(63, 159, 255, 0.4); box-shadow: 0 0 18px rgba(22, 136, 255, 0.12); }
.ctab-card .ct-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(57, 198, 255, 0.14), rgba(22, 136, 255, 0.06)); border: 1px solid rgba(57, 198, 255, 0.28); color: var(--cyan); flex-shrink: 0; }
.ctab-card .ct-ic svg { width: 17px; height: 17px; }
.ctab-card .ct-main { flex: 1; min-width: 0; }
.ctab-card .ct-name { font-size: 12.5px; font-weight: 700; color: var(--tx); }
.ctab-card .ct-sub { font-size: 10px; color: var(--tx3); font-family: var(--mono); margin-top: 2px; }
.ctab-new {
    border: 1.5px dashed rgba(63, 159, 255, 0.3);
    background: rgba(22, 136, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--blue3);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
    border-radius: var(--radius);
    min-height: 74px;
}
.ctab-new:hover { border-color: rgba(63, 159, 255, 0.6); background: rgba(22, 136, 255, 0.08); }
.ctab-new svg { width: 15px; height: 15px; }

/* ── settings / about ── */
.about-row { display: flex; align-items: center; gap: 12px; }
.about-row .ar-logo { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--blue), var(--cyan)); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 18px rgba(22, 136, 255, 0.5); }
.about-row .ar-logo svg { width: 21px; height: 21px; }
.about-row .ar-name { font-size: 15px; font-weight: 800; color: #fff; }
.about-row .ar-sub { font-size: 10.5px; color: var(--tx3); font-family: var(--mono); }

/* ── skeletons / loading ── */
.skel { position: relative; overflow: hidden; background: rgba(255, 255, 255, 0.04); border-radius: 8px; }
.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent); animation: skel 1.4s infinite; }
@keyframes skel { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ── responsive v2 ── */
@media (max-width: 1280px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .rec-grid, .music-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .theme-live { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    #xentro-root { padding: 8px; }
    .app-body { grid-template-columns: 68px minmax(0, 1fr); }
    .sidebar { padding: 8px; }
    .sidebar .nav-label { display: none; }
    .sidebar .nav-item { justify-content: center; padding: 8px 0; }
    .sidebar .nav-item span { display: none; }
    .sidebar .nav-item::before { display: none; }
    .sidebar .side-foot { justify-content: center; }
    .sidebar .side-fuser { display: none; }
    .content { padding: 16px 16px 48px; }
    .grid-3, .form-grid, .server-input-group { grid-template-columns: 1fr; }
    .ide-wrap, .builder-wrap { grid-template-columns: 1fr; height: auto; }
    .explorer { max-height: 260px; }
    .node-body { grid-template-columns: 1fr; }
}

.toast.t-warn { border-color: rgba(255, 181, 71, 0.55); }
.toast.t-warn .t-ic { background: rgba(255, 181, 71, 0.16); color: var(--orange2); }
