@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════════════════
   Ticketweb Design System — tokens, base elements, components
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Surfaces — dark navy scale, darkest to lightest.
       Bigger steps between levels so cards/panels read as clearly
       "filled" containers instead of just an outline on the page bg. */
    --bg:       #0a0d15;
    --surface:  #121629;
    --card:     #1c2340;
    --elevated: #272f52;
    --input:    #0d1119;
    --sidebar:  #0c0f18;
    --border:   #333d61;
    --border-lt:#414c74;

    /* Text */
    --text1: #eef1fa;
    --text2: #8592b4;
    --text3: #4a5578;

    /* Brand + status */
    --accent:   #5865f2;
    --accent-h: #4954d6;
    --accent2:  #8b5cf6;
    --accent3:  #ec4899;
    --green:    #2ecc71;
    --red:      #ef4444;
    --yellow:   #e67e22;

    /* Radii + layout */
    --r:   10px;
    --rlg: 14px;
    --sw:  220px;
    --th:  56px;
    --fh:  52px;

    --font: 'Outfit', sans-serif;
    --mono: 'JetBrains Mono', monospace;

    /* Aliases — kept so the large amount of existing component CSS
       written against these names keeps working unchanged. */
    --bg-base:     var(--bg);
    --bg-surface:  var(--surface);
    --bg-card:     var(--card);
    --bg-elevated: var(--elevated);
    --bg-input:    var(--input);
    --bg-hover:    var(--elevated);
    --sidebar-bg:  var(--sidebar);
    --text-1: var(--text1);
    --text-2: var(--text2);
    --text-3: var(--text3);
    --accent-glow: rgba(88,101,242,.16);

    --shadow-color:        rgba(0,0,0,.4);
    --shadow-color-strong: rgba(0,0,0,.5);
    --card-shadow: none;

    color-scheme: dark;
}

/* ── LIGHT THEME ───────────────────────────────────────────── */
:root[data-theme="light"] {
    --bg:       #f3f4f9;
    --surface:  #ffffff;
    --card:     #ffffff;
    --elevated: #eef0f7;
    --input:    #ffffff;
    --sidebar:  #ffffff;
    --border:   #d5d9e8;
    --border-lt:#c0c6da;

    --text1: #161a2c;
    --text2: #565f7e;
    --text3: #98a0ba;

    --accent:   #5865f2;
    --accent-h: #4650d6;
    --accent2:  #8b5cf6;
    --accent3:  #db2777;
    --green:    #15803d;
    --red:      #dc2626;
    --yellow:   #b45309;

    --accent-glow: rgba(88,101,242,.10);
    --shadow-color:        rgba(30,41,59,.10);
    --shadow-color-strong: rgba(30,41,59,.16);
    --card-shadow: 0 1px 3px rgba(30,41,59,.08);

    color-scheme: light;
}
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg:       #f3f4f9;
        --surface:  #ffffff;
        --card:     #ffffff;
        --elevated: #eef0f7;
        --input:    #ffffff;
        --sidebar:  #ffffff;
        --border:   #d5d9e8;
        --border-lt:#c0c6da;

        --text1: #161a2c;
        --text2: #565f7e;
        --text3: #98a0ba;

        --accent-h: #4650d6;
        --accent3:  #db2777;
        --green:    #15803d;
        --red:      #dc2626;
        --yellow:   #b45309;

        --accent-glow: rgba(88,101,242,.10);
        --shadow-color:        rgba(30,41,59,.10);
        --shadow-color-strong: rgba(30,41,59,.16);
        --card-shadow: 0 1px 3px rgba(30,41,59,.08);

        color-scheme: light;
    }
}

html { font-size: 15px; }

html, body {
    background: var(--bg);
    color: var(--text1);
    font-family: var(--font);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}



/* ── TOPBAR ─────────────────────────── */
.topbar {
    display: flex; align-items: center; gap: 10px;
    padding: 0 18px; height: var(--th);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 200;
}
.menu-btn {
    width: 40px; height: 40px; border-radius: var(--r);
    background: none; border: none; cursor: pointer;
    color: var(--text2); display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s; flex-shrink: 0;
}
.menu-btn:hover { background: var(--elevated); color: var(--text1); }

/* ── THEME TOGGLE ─────────────────────── */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .theme-toggle .icon-sun  { display: block; }
    :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}

.brand {
    font-weight: 800; font-size: 1.08rem; color: var(--text1);
    text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.brand span { color: var(--accent); }
.brand-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; border: 1px solid var(--border-lt); flex-shrink: 0;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar-right a, .topbar-btn, .topbar-btn-muted {
    color: var(--text2); text-decoration: none; font-size: .85rem; font-weight: 500;
    padding: 6px 12px; border-radius: var(--r);
    transition: background .15s, color .15s;
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer;
}
.topbar-right a:hover, .topbar-btn:hover, .topbar-btn-muted:hover { background: var(--elevated); color: var(--text1); }
.topbar-right .t-logout { color: var(--red); }
.topbar-right .t-logout:hover { background: rgba(239,68,68,.1); color: var(--red); }

/* ── SIDEBAR DRAWER (global hamburger nav) ───── */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(6,8,14,.65);
    z-index: 300; backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none; transition: opacity .22s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    background: var(--surface); border-right: 1px solid var(--border);
    z-index: 301; display: flex; flex-direction: column;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: var(--th); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.drawer-brand { font-weight: 800; font-size: 1.05rem; color: var(--text1); }
.drawer-brand span { color: var(--accent); }
.drawer-close {
    width: 36px; height: 36px; border-radius: var(--r); background: none;
    border: none; cursor: pointer; color: var(--text2);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.drawer-close:hover { background: var(--elevated); color: var(--text1); }
.drawer-body { padding: 12px 8px; display: flex; flex-direction: column; gap: 1px; }
.drawer-section-label {
    font-size: .68rem; font-weight: 700; color: var(--text3);
    text-transform: uppercase; letter-spacing: .08em;
    padding: 12px 12px 4px;
}
.drawer-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--r); color: var(--text2);
    text-decoration: none; font-size: .9rem; font-weight: 500;
    cursor: pointer; transition: background .15s, color .15s;
    background: none; border: none; font-family: var(--font);
    width: 100%; text-align: left;
}
.drawer-item:hover { background: var(--elevated); color: var(--text1); }
.drawer-item.active { background: var(--accent-glow); color: var(--accent); font-weight: 700; }
.drawer-item svg { flex-shrink: 0; opacity: .75; }
.drawer-sep { height: 1px; background: var(--border); margin: 8px 12px; }
.drawer-item.danger { color: var(--red); }
.drawer-item.danger:hover { background: rgba(239,68,68,.1); color: var(--red); }

.drawer-server {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: var(--r); color: var(--text2);
    text-decoration: none; font-size: .87rem; font-weight: 500;
    transition: background .15s, color .15s;
}
.drawer-server:hover { background: var(--elevated); color: var(--text1); }
.drawer-server-icon {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--elevated); overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}
.drawer-server-icon img { width: 100%; height: 100%; object-fit: cover; }
.drawer-server-name {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── PAGE FOOTER ──────────────────────── */
.page-footer {
    text-align: center; padding: 24px 16px;
    color: var(--text3); font-size: .8rem; border-top: 1px solid var(--border);
}
.page-footer a { color: var(--text3); text-decoration: none; transition: color .15s; }
.page-footer a:hover { color: var(--text1); }

/* ── LAYOUT ─────────────────────────── */
.app-layout {
    display: flex;
    min-height: calc(100vh - var(--th));
    flex: 1;
    position: relative;
    z-index: 1;
}

/* ── SIDEBAR ────────────────────────── */
.sidebar:empty {
    display: none;
    width: 0;
    border: none;
    padding: 0;
}
.sidebar {
    width: var(--sw);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    position: sticky;
    top: var(--th);
    height: calc(100vh - var(--th));
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    padding: 14px 9px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-guild-header {
    display: flex; align-items: center; gap: 9px;
    padding: 6px 7px 10px;
}
.sidebar-guild-icon {
    width: 34px; height: 34px; border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-lt);
    flex-shrink: 0;
}
.sidebar-guild-icon-fallback {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-elevated);
    border: 2px solid var(--border-lt);
    color: var(--accent); font-weight: 700; font-size: 1rem;
}
.sidebar-guild-name {
    font-weight: 600; font-size: 0.85rem;
    color: var(--text-1);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-switch-server {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--accent); font-size: 0.72rem; font-weight: 500;
    text-decoration: none;
    padding: 3px 7px;
    border-radius: var(--r);
    margin-bottom: 6px;
    transition: all 0.14s;
    width: fit-content;
    margin-left: 7px;
}
.sidebar-switch-server:hover { background: var(--accent-glow); }

.sidebar-divider {
    height: 1px; background: var(--border);
    margin: 6px 4px 10px;
}
.sidebar-label {
    font-size: 0.66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3);
    padding: 0 8px; margin-bottom: 4px; margin-top: 2px;
}

/* Server list (dashboard sidebar) */
.sidebar-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-server-item {
    display: flex; align-items: center; gap: 9px;
    padding: 6px 9px; border-radius: var(--r);
    text-decoration: none; color: var(--text-2);
    font-size: 0.83rem; font-weight: 500;
    transition: all 0.14s;
    white-space: nowrap; overflow: hidden;
}
.sidebar-server-item:hover { background: var(--bg-elevated); color: var(--text-1); }
.sidebar-server-icon {
    width: 26px; height: 26px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; color: var(--accent);
    border: 1px solid var(--border);
}
.sidebar-server-icon img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-server-name { overflow: hidden; text-overflow: ellipsis; }

/* Module items */
.sidebar-module {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 9px; border-radius: var(--r);
    color: var(--text-2); font-size: 0.84rem; font-weight: 500;
    cursor: pointer; transition: all 0.14s;
    text-decoration: none; user-select: none;
    border: 1px solid transparent;
}
.sidebar-module:hover:not(.disabled) { background: var(--bg-elevated); color: var(--text-1); }
.sidebar-module.active {
    background: var(--accent-glow);
    color: var(--text-1);
    border-color: rgba(88,101,242,.28);
}
.sidebar-module.disabled { opacity: 0.4; cursor: not-allowed; }
.sidebar-module-icon { font-size: 0.95rem; flex-shrink: 0; }
.sidebar-module-badge {
    margin-left: auto;
    font-size: 0.6rem; font-weight: 700;
    padding: 2px 5px; border-radius: 100px;
    text-transform: uppercase; letter-spacing: 0.04em;
    flex-shrink: 0;
}
.active-badge { background: rgba(59,165,92,.14); color: var(--green); border: 1px solid rgba(59,165,92,.28); }
.soon-badge   { background: rgba(250,168,26,.1);  color: var(--yellow); border: 1px solid rgba(250,168,26,.22); }

/* ── MAIN AREA ──────────────────────── */
.main-area {
    flex: 1; min-width: 0;
    padding: 34px 38px 60px;
}

/* ── DASHBOARD ──────────────────────── */
.dashboard-hero {
    margin: -34px -38px 26px;
    padding: 30px 38px 24px;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
    border-bottom: 1px solid var(--border);
}
.dashboard-hero h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; }
.dashboard-hero p  { color: var(--text-2); font-size: 0.88rem; margin-top: 4px; }

.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 11px;
}
.server-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--rlg);
    padding: 13px 17px;
    text-decoration: none; color: var(--text-1);
    transition: all 0.16s ease;
}
.server-card:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 22px rgba(88,101,242,.11);
}
.server-icon {
    width: 42px; height: 42px; border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
}
.server-icon img { width: 100%; height: 100%; object-fit: cover; }
.server-icon-fallback { font-size: 1.05rem; font-weight: 700; color: var(--accent); }
.server-info { flex: 1; min-width: 0; }
.server-name { font-weight: 600; font-size: 0.93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-id   { font-size: 0.7rem; color: var(--text-3); font-family: var(--mono); margin-top: 2px; }
.server-arrow { color: var(--text-3); font-size: 0.93rem; transition: all 0.16s; }
.server-card:hover .server-arrow { color: var(--accent); transform: translateX(3px); }

/* ── GUILD PAGE ─────────────────────── */
.guild-page-header {
    margin: -34px -38px 26px;
    padding: 30px 38px 24px;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
    border-bottom: 1px solid var(--border);
}
.back-btn {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--text-2); text-decoration: none;
    font-size: 0.82rem; font-weight: 500;
    margin-bottom: 14px; transition: color 0.14s;
}
.back-btn:hover { color: var(--accent); }
.guild-title-row  { display: flex; align-items: center; gap: 13px; }
.guild-title-icon {
    width: 50px; height: 50px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--border-lt); flex-shrink: 0;
}
.guild-title-icon-fallback {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-elevated);
    font-size: 1.35rem; font-weight: 700; color: var(--accent);
}
.guild-title    { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em; }
.guild-subtitle { font-size: 0.73rem; color: var(--text-3); margin-top: 2px; }
.mono { font-family: var(--mono); }

/* ── MODULE INTRO ───────────────────── */
.module-intro {
    display: flex; align-items: center; gap: 13px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 18px;
    margin-bottom: 18px;
}
.module-intro-icon  { font-size: 1.5rem; }
.module-intro-title { font-weight: 700; font-size: 0.97rem; }
.module-intro-desc  { font-size: 0.82rem; color: var(--text-2); margin-top: 2px; }

/* ── SECTION PICKER CARDS ───────────── */
.section-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 11px;
    margin-bottom: 22px;
}
.section-pick-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px 16px;
    cursor: pointer; transition: all 0.16s ease;
    text-align: left; color: var(--text-1); font-family: var(--font);
}
.section-pick-card:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(88,101,242,.1);
}
.section-pick-card.danger { border-color: rgba(237,66,69,.2); }
.section-pick-card.danger:hover {
    border-color: var(--red);
    box-shadow: 0 5px 18px rgba(237,66,69,.1);
    background: rgba(237,66,69,.04);
}
.spc-icon  { font-size: 1.4rem; margin-bottom: 2px; }
.spc-label { font-weight: 700; font-size: 0.92rem; }
.spc-desc  { font-size: 0.75rem; color: var(--text-2); line-height: 1.3; }

/* ── EDIT PANEL ─────────────────────── */
.edit-panel {
    background: var(--bg);
    border: none;
    border-radius: var(--rlg);
    animation: slideIn 0.18s ease;
    overflow: hidden;
    box-shadow: none;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.edit-panel-header {
    display: flex; align-items: center; gap: 14px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}
.edit-panel-back {
    display: flex; align-items: center; gap: 5px;
    background: none; border: none;
    color: var(--text-2); font-family: var(--font);
    font-size: 0.82rem; font-weight: 500;
    cursor: pointer; padding: 5px 9px;
    border-radius: var(--r); transition: all 0.14s;
}
.edit-panel-back:hover { background: var(--bg-elevated); color: var(--text-1); }
.edit-panel-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-1);
    letter-spacing: -0.01em;
}
.edit-panel-body {
    background: var(--bg);
    min-height: 100vh;
}

.section-content        { display: none; }
.section-content.active { display: block; }

/* ── FORMS ──────────────────────────── */
.form-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; margin-bottom: 16px;
}
.form-group       { display: flex; flex-direction: column; gap: 5px; }
.form-group.full-width { grid-column: 1/-1; }

.label {
    font-size: 0.76rem; font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase; letter-spacing: 0.07em;
    display: flex; align-items: center; gap: 7px;
}
.input, .textarea, .select {
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text1);
    font-family: var(--font);
    font-size: .88rem;
    padding: 8px 12px;
    transition: border-color .16s, box-shadow .16s;
    outline: none;
    width: 100%;
}
.input:focus, .textarea:focus, .select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
.mono-input { font-family: var(--mono); font-size: 0.8rem; }
.select-wrapper { position: relative; }
.select { appearance: none; cursor: pointer; padding-right: 32px; }
.select-wrapper::after {
    content: '▾'; position: absolute;
    right: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); pointer-events: none;
}
.hint { font-size: 0.74rem; color: var(--text-3); line-height: 1.4; }
.hint code {
    font-family: var(--mono);
    background: var(--bg-elevated);
    padding: 1px 4px; border-radius: 3px;
    font-size: 0.71rem; color: var(--accent);
}
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.subsection-title {
    font-size: 0.82rem; font-weight: 700; color: var(--text-2);
    margin-bottom: 13px; text-transform: uppercase; letter-spacing: 0.05em;
}
.form-actions {
    display: flex; justify-content: flex-end;
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid var(--border);
}
.btn-primary {
    background: var(--accent); color: #fff; border: none;
    border-radius: var(--r); padding: 8px 20px;
    font-family: var(--font); font-size: 0.86rem; font-weight: 600;
    cursor: pointer; transition: all 0.16s;
    box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }

/* ── BADGES ─────────────────────────── */
.badge {
    display: inline-block; padding: 1px 7px; border-radius: 100px;
    font-size: 0.66rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-green { background: rgba(59,165,92,.14); color: var(--green); border: 1px solid rgba(59,165,92,.28); }
.badge-red   { background: rgba(237,66,69,.14);  color: var(--red);   border: 1px solid rgba(237,66,69,.28); }

/* ── INFO BOX ───────────────────────── */
.info-box {
    display: flex; align-items: flex-start; gap: 9px;
    background: rgba(88,101,242,.06);
    border: 1px solid rgba(88,101,242,.2);
    border-radius: var(--r);
    padding: 10px 14px;
    font-size: 0.84rem; color: var(--text-2);
    margin-top: 16px;
    margin-bottom: 16px;
}
.info-box strong { color: var(--text1); }

/* ── PREVIEW ────────────────────────── */
.preview-box {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--r); padding: 13px 16px; margin-top: 12px;
}
.preview-label {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-3); font-weight: 700; margin-bottom: 9px;
}
.preview-options { display: flex; flex-wrap: wrap; gap: 6px; }
.preview-option {
    background: var(--bg-base); border: 1px solid var(--border-lt);
    border-radius: 100px; padding: 3px 10px;
    font-size: 0.77rem; color: var(--text-1);
}

/* ── TOGGLE ─────────────────────────── */
.toggle-row  { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.toggle      { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0;
    background: var(--bg-elevated); border: 1px solid var(--border-lt);
    border-radius: 100px; cursor: pointer; transition: all 0.18s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 14px; height: 14px; left: 3px; top: 3px;
    background: var(--text-3); border-radius: 50%; transition: all 0.18s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: #fff; }
.toggle-label { font-size: 0.86rem; color: var(--text-2); }

/* ── DANGER ─────────────────────────── */
.danger-card {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    background: rgba(237,66,69,.05); border: 1px solid rgba(237,66,69,.18);
    border-radius: var(--r); padding: 16px 20px; margin-bottom: 10px;
}
.danger-card-title { font-weight: 600; font-size: 0.91rem; margin-bottom: 3px; }
.danger-card-desc  { font-size: 0.79rem; color: var(--text-2); }
.btn-danger {
    background: transparent; color: var(--red);
    border: 1px solid rgba(237,66,69,.38);
    border-radius: var(--r); padding: 7px 16px;
    font-family: var(--font); font-size: 0.83rem; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: all 0.16s; flex-shrink: 0;
}
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ── TOAST ──────────────────────────── */
.toast {
    position: fixed; bottom: 52px; right: 26px;
    display: flex; align-items: center; gap: 8px;
    background: var(--green); color: #fff;
    padding: 10px 20px; border-radius: var(--r);
    font-weight: 600; font-size: 0.88rem;
    box-shadow: 0 4px 18px var(--shadow-color);
    animation: toastIn 0.28s ease, toastOut 0.28s ease 3.2s forwards;
    z-index: 500;
    max-width: min(420px, calc(100vw - 40px));
}
.toast-error { background: var(--red); }
@keyframes toastIn  { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes toastOut { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(10px)} }

/* ── MODAL / DIALOG ───────────────────
   Shared overlay component for "edit inline" panels (items, coins,
   selfroles, income, …) that used to be ad-hoc show/hide divs. */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(6,8,14,.6);
    backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    z-index: 800;
    animation: modalOverlayIn 0.15s ease;
}
@keyframes modalOverlayIn { from{opacity:0} to{opacity:1} }
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--rlg);
    width: 100%; max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 12px 48px var(--shadow-color-strong);
    animation: modalBoxIn 0.18s ease;
}
@keyframes modalBoxIn { from{opacity:0;transform:translateY(10px) scale(.98)} to{opacity:1;transform:none} }
.modal-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 20px;
    background: var(--elevated);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
}
.modal-title { font-weight: 700; font-size: 0.95rem; color: var(--text1); }
.modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--text2); font-size: 1.1rem; line-height: 1;
    padding: 4px 8px; border-radius: var(--r);
    transition: background .14s, color .14s;
}
.modal-close:hover { background: rgba(255,255,255,.06); color: var(--text1); }
.modal-body { padding: 4px 0; }

/* ── FOOTER ─────────────────────────── */
.site-footer {
    height: var(--fh);
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.76rem; color: var(--text-3);
    letter-spacing: 0.03em;
    position: relative; z-index: 1; flex-shrink: 0;
}

/* ── RESPONSIVE ─────────────────────── */
@media (max-width: 700px) {
    :root { --sw: 54px; }
    .sidebar { padding: 10px 5px; }
    .sidebar-guild-name, .sidebar-module > span:not(.sidebar-module-icon),
    .sidebar-module-badge, .sidebar-label, .sidebar-server-name,
    .sidebar-switch-server { display: none; }
    .sidebar-guild-header { justify-content: center; padding: 6px 0 10px; }
    .sidebar-module { justify-content: center; padding: 8px 0; }
    .main-area { padding: 20px 14px 40px; }
    .hero-section { margin: -20px -14px 0; padding: 40px 14px 28px; }
    .guild-page-header { margin: -20px -14px 20px; padding: 20px 14px 16px; }
    .dashboard-hero { margin: -20px -14px 20px; padding: 20px 14px 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .section-picker { grid-template-columns: 1fr 1fr; }
    .guild-title { font-size: 1.25rem; }
    .edit-panel-body { padding: 16px 14px; }
}

/* ── SIDEBAR NAV ITEMS ──────────────────────── */
.sidebar-group-label {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-3);
    padding: 10px 10px 3px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: var(--r);
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.14s;
    border: 1px solid transparent;
    user-select: none;
}
.sidebar-nav-item:hover:not(.disabled) {
    background: var(--bg-elevated);
    color: var(--text-1);
}
.sidebar-nav-item.active {
    background: var(--bg-elevated);
    color: var(--text-1);
    border-color: var(--border-lt);
}
.sidebar-nav-item.disabled {
    opacity: 0.38;
    cursor: not-allowed;
}
.sidebar-nav-item.danger-item { color: rgba(237,66,69,.7); }
.sidebar-nav-item.danger-item:hover { background: rgba(237,66,69,.08); color: var(--red); }
.sidebar-nav-item.danger-item.active { background: rgba(237,66,69,.08); color: var(--red); border-color: rgba(237,66,69,.25); }

.snav-icon {
    width: 15px; height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
}

.snav-soon {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 100px;
    text-transform: uppercase;
    background: rgba(250,168,26,.1);
    color: var(--yellow);
    border: 1px solid rgba(250,168,26,.22);
    letter-spacing: 0.04em;
}

/* ── CARD GROUPS (overview, image 2 style) ───── */
.card-group {
    margin-bottom: 20px;
}

.card-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 8px;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
@media (max-width: 900px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .card-grid { grid-template-columns: 1fr; }
}

.nav-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 18px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    text-align: left;
    color: var(--text-1);
    font-family: var(--font);
    width: 100%;
}
.nav-card:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--bg-elevated) 92%, var(--accent));
}
.nav-card:hover:not(.disabled) {
    background: var(--bg-elevated);
    border-color: var(--accent);
    transform: translateX(3px);
}
.nav-card.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.nav-card-body { flex: 1; min-width: 0; overflow: hidden; }
.nav-card-title {
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
    color: var(--text-1);
}
.nav-card-desc {
    font-size: 0.76rem;
    color: var(--text-3);
    margin-top: 3px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-card-arrow {
    width: 16px; height: 16px;
    color: var(--text-2);
    flex-shrink: 0;
    transition: color 0.15s;
    margin-left: auto;
}
.nav-card:hover .nav-card-arrow {
    color: var(--accent);
}
.nav-card:hover:not(.disabled) .nav-card-arrow { color: var(--accent); transform: translateX(2px); }

.card-soon-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 100px;
    text-transform: uppercase;
    background: rgba(250,168,26,.1);
    color: var(--yellow);
    border: 1px solid rgba(250,168,26,.22);
    letter-spacing: 0.04em;
    vertical-align: middle;
}

/* ── SIDEBAR SERVER HERO (guild page) ─────── */
.sidebar-server-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 10px 12px;
    text-align: center;
    gap: 8px;
}

.sidebar-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-lt);
    box-shadow: 0 4px 16px var(--shadow-color);
    flex-shrink: 0;
}

.sidebar-hero-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 3px solid var(--border-lt);
    color: var(--accent);
    font-weight: 800;
    font-size: 1.6rem;
    box-shadow: 0 4px 16px var(--shadow-color);
}

.sidebar-hero-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-1);
    line-height: 1.3;
    max-width: 180px;
    word-break: break-word;
}

.sidebar-server-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-lt);
    border-radius: 100px;
    color: var(--text-2);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    padding: 5px 13px;
    transition: all 0.15s;
    margin-top: 2px;
}
.sidebar-server-switcher:hover {
    background: var(--accent-glow);
    border-color: rgba(88,101,242,.4);
    color: var(--text-1);
}

/* ── DASHBOARD SECTIONS ───────────────────── */
.dash-section {
    margin-bottom: 32px;
}

.dash-section-header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.dash-section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-green { background: var(--green); box-shadow: 0 0 6px rgba(59,165,92,.6); }
.dot-muted { background: var(--text-3); }

.dash-section-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-section-count {
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-3);
    padding: 1px 7px;
    border-radius: 100px;
}

/* ── CONTROL CARDS (admin bot/service control) ── */
.ctrl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 20px;
}
@media (max-width: 640px) { .ctrl-grid { grid-template-columns: 1fr; } }
.ctrl-card {
    background: var(--elevated);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
}
.ctrl-card-title { font-weight: 700; margin-bottom: 4px; color: var(--text1); }
.ctrl-card-sub   { font-size: .8rem; color: var(--text3); margin-bottom: 12px; font-family: var(--mono); }
.ctrl-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { font-size: .8rem; padding: 6px 14px; }

/* ── SERVER CARDS with/without bot ──────────── */
.server-card.has-bot {
    border-color: rgba(59,165,92,.2);
}
.server-card.has-bot:hover {
    border-color: var(--green);
    box-shadow: 0 5px 22px rgba(59,165,92,.1);
}

.server-card.no-bot {
    opacity: 0.75;
}
.server-card.no-bot:hover {
    opacity: 1;
    border-color: var(--accent);
}

.server-manage-btn {
    display: inline-flex;
    align-items: center;
    background: var(--green);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--r);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}
.server-manage-btn:hover {
    background: #2d8f4e;
    transform: translateX(2px);
}

.server-invite-btn {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(88,101,242,.4);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--r);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
}
.server-invite-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ── DISCORD SELECTORS ──────────────────── */
.ds-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ds-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.ds-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-lt);
    border-radius: 100px;
    padding: 3px 10px 3px 8px;
    font-size: 0.8rem;
    color: var(--text-1);
    font-weight: 500;
}

.ds-chip-x {
    cursor: pointer;
    color: var(--text-3);
    font-size: 1rem;
    line-height: 1;
    margin-left: 2px;
    transition: color 0.12s;
}
.ds-chip-x:hover { color: var(--red); }

.ds-role-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.ds-dropdown-wrap {
    position: relative;
}

.ds-search {
    width: 100%;
}

.ds-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-lt);
    border-radius: var(--r);
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.ds-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.12s;
    border-bottom: 1px solid var(--border);
}
.ds-item:last-child { border-bottom: none; }
.ds-item:hover { background: var(--bg-hover); color: var(--text-1); }
.ds-item.ds-empty { color: var(--text-3); cursor: default; font-style: italic; }
.ds-item.ds-empty:hover { background: none; color: var(--text-3); }

/* ── SEND PANEL BLOCK ───────────────────── */
.send-panel-block {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px 20px;
}
.send-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.send-panel-icon  { font-size: 1.3rem; }
.send-panel-title { font-weight: 700; font-size: 0.95rem; }
.send-panel-desc  { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }
.send-panel-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}
.btn-send {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--r);
    padding: 9px 20px;
    font-family: var(--font);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
    box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-send:hover { background: var(--accent-h); transform: translateY(-1px); }

/* ── DISCORD SELECTOR STATE ─────────────── */
.ds-loading-text {
    font-size: 0.8rem;
    color: var(--text-3);
    padding: 4px 2px;
}

.ds-no-token {
    font-size: 0.78rem;
    color: var(--text-3);
    font-style: italic;
    padding: 6px 2px;
}

/* ── LOADING CHIP (before Discord API responds) ── */
.ds-chip-loading {
    opacity: 0.55;
    font-family: var(--mono);
    font-size: 0.72rem;
    border-style: dashed;
}

/* ── LEVEL SYSTEM ───────────────────────── */
.level-sub-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--card-shadow);
    margin-bottom: 14px;
    overflow: hidden;
    padding: 0 0 18px;
}
/* Content area padding — everything after the header */
.level-sub-card > *:not(.level-sub-header):not(.form-actions) {
    padding: 16px 18px 0;
}
.level-sub-card > *:last-child:not(.level-sub-header):not(.form-actions) {
    padding-bottom: 18px;
}

.level-sub-header {
    font-weight: 700;
    font-size: .75rem;
    color: var(--text2);
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 14px 20px;
    background: var(--elevated);
    border-bottom: 1px solid var(--border);
}
/* Card content padding */
.level-sub-card > *:not(.level-sub-header):not(.form-actions) {
    padding-left: 20px;
    padding-right: 20px;
}
/* Form-actions strip */
.level-sub-card > .form-actions {
    border-top: 1px solid var(--border);
    padding: 12px 20px 0;
    margin-top: 14px;
    background: transparent;
}


/* Leaderboard */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-3);
    padding: 6px 10px; text-align: left;
    border-bottom: 1px solid var(--border);
}
.lb-table td {
    padding: 9px 10px; font-size: 0.84rem; color: var(--text-2);
    border-bottom: 1px solid var(--border);
}
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr:hover td { background: var(--bg-hover); }

.lb-rank { font-weight: 700; color: var(--text-1); width: 40px; }
.lb-name { color: var(--text-1); font-weight: 500; }
.lb-level { text-align: center; }
.lb-xp { text-align: right; font-family: var(--mono); font-size: 0.75rem; }

.lb-bar-wrap { width: 120px; }
.lb-bar-bg {
    background: var(--bg-base);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}
.lb-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}

.lb-tab-btn {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.lb-tab-btn.active, .lb-tab-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.lb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
}

.lb-loading {
    color: var(--text-3);
    font-size: 0.84rem;
    padding: 16px 0;
}

/* Level role list */
.lr-list { display: flex; flex-direction: column; gap: 6px; }
.lr-item {
    display: flex; align-items: center;
    justify-content: space-between;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 8px 14px;
    font-size: 0.84rem;
}
.lr-item-info { display: flex; gap: 12px; align-items: center; }
.lr-item-level { font-weight: 700; color: var(--text-1); min-width: 60px; }
.lr-item-type {
    font-size: 0.68rem; font-weight: 700;
    padding: 2px 7px; border-radius: 100px;
    text-transform: uppercase;
}
.lr-type-chat  { background: rgba(88,101,242,.15); color: #5865F2; border: 1px solid rgba(88,101,242,.3); }
.lr-type-voice { background: rgba(139,92,246,.15);  color: #8B5CF6; border: 1px solid rgba(139,92,246,.3); }
.lr-item-role { color: var(--text-2); }
.lr-empty { color: var(--text-3); font-size: 0.83rem; font-style: italic; padding: 8px 0; }

/* ── LEVEL ROLE DELETE BUTTON ───────────── */
.lr-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: var(--r);
    transition: background 0.14s;
    flex-shrink: 0;
}
.lr-delete-btn:hover { background: rgba(237,66,69,.15); }

/* ── LEVEL ROLE EDIT BUTTON ─────────────── */
.lr-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: var(--r);
    transition: background 0.14s;
    flex-shrink: 0;
}
.lr-edit-btn:hover { background: rgba(88,101,242,.15); }

/* ── LEADERBOARD column alignment ───────── */
.lb-table td, .lb-table th { vertical-align: middle; }
.lb-level, .lb-xp { text-align: right !important; }
.lb-bar-wrap { text-align: left; }

/* ── SELFROLES PANELS ───────────────────── */
.sr-panel-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.sr-panel-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.sr-panel-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sr-panel-msgid {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-3);
}

.sr-panel-chan {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-1);
}

.sr-roles-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.sr-role-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    background: var(--bg-base);
    border-radius: var(--r);
    border: 1px solid var(--border);
}

.sr-emoji { font-size: 1.1rem; flex-shrink: 0; }

.sr-role-label {
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--text-1);
    min-width: 100px;
}

.sr-role-name {
    font-size: 0.82rem;
    color: var(--text-2);
    flex: 1;
}

/* Panel edit button — prominent */
.sr-panel-edit-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-lt);
    border-radius: var(--r);
    color: var(--text-2);
    font-family: var(--font);
    font-size: .82rem;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
    transition: all .15s;
}
.sr-panel-edit-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--text-1);
}

/* Role row action buttons */
.sr-role-edit-btn, .sr-role-del-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    padding: 2px 5px;
    border-radius: var(--r);
    transition: background .13s;
}
.sr-role-edit-btn:hover { background: rgba(88,101,242,.15); }
.sr-role-del-btn:hover  { background: rgba(237,66,69,.15); }

/* ── REGELWERK ──────────────────────────── */
.rw-status-bar {
    background: rgba(87,242,135,.08);
    border: 1px solid rgba(87,242,135,.25);
    border-radius: var(--r);
    padding: 10px 16px;
    font-size: 0.84rem;
    color: var(--green);
    margin-bottom: 18px;
    font-family: var(--mono);
}

/* ── WELCOME IMAGE GRID ─────────────────── */
.wc-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.wc-img-wrap {
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
}

.wc-img-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.wc-img-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.wc-img-name {
    font-size: 0.72rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    font-family: var(--mono);
}

/* ── First card in edit-panel: no top gap ─── */
.edit-panel-body > .level-sub-card:first-child,
.section-content.active > .level-sub-card:first-child,
.section-content.active > form > .level-sub-card:first-child,
.section-content.active > * > .level-sub-card:first-child {
    margin-top: 0;
}

/* ── LEADERBOARD CARDS (level-card style) ── */
.lb-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}
.lb-card:hover { border-color: var(--accent); }

.lb-card-top1 { border-color: rgba(255,215,0,.4);  background: rgba(255,215,0,.04); }
.lb-card-top2 { border-color: rgba(192,192,192,.4); background: rgba(192,192,192,.04); }
.lb-card-top3 { border-color: rgba(205,127,50,.4);  background: rgba(205,127,50,.04); }

/* Rank col */
.lb-card-rank {
    width: 42px;
    text-align: center;
    flex-shrink: 0;
}
.lb-medal    { font-size: 1.7rem; line-height: 1; }
.lb-rank-num { font-size: 1rem; font-weight: 700; color: var(--text-3); }

/* Center col */
.lb-card-center { flex: 1; min-width: 0; }

.lb-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.lb-card-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb-card-bar-label {
    font-size: 0.72rem;
    color: var(--text-3);
    white-space: nowrap;
    width: 54px;
    flex-shrink: 0;
}

.lb-card-bar-wrap { flex: 1; }

.lb-card-bar-bg {
    background: var(--bg-base);
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.lb-card-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
    transition: width 0.4s ease;
}

.lb-card-xp {
    font-size: 0.72rem;
    color: var(--text-3);
    font-family: var(--mono);
    white-space: nowrap;
    min-width: 100px;
    text-align: right;
}

/* Right col: level */
.lb-card-right {
    text-align: center;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}
.lb-card-level-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-3);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.lb-card-level-num {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

/* ── SELECTOR WITH SEARCH ───────────────── */
.ds-search-container { display: flex; flex-direction: column; gap: 6px; }
.ds-search-wrap { position: relative; }
.ds-search-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 0.85rem;
    padding: 7px 12px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.ds-search-input:focus { border-color: var(--accent); }
.ds-search-input::placeholder { color: var(--text-3); }

/* ── LOG CATEGORIES ─────────────────────── */
.logs-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.logs-cat-row:last-child { border-bottom: none; }

.logs-cat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.logs-toggle {
    width: 18px; height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

.logs-cat-label label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.logs-cat-icon  { font-size: 1.1rem; }
.logs-cat-name  { font-weight: 700; color: var(--text-1); font-size: .9rem; }
.logs-cat-desc  { color: var(--text-3); font-size: .78rem; margin-left: 4px; }

.logs-cat-channel {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logs-cat-ch-label {
    font-size: .8rem;
    color: var(--text-3);
    white-space: nowrap;
}

/* ── TOPBAR MUTED LINKS ──────────────────── */
.topbar-btn-muted {
    color: var(--text-3);
    font-size: 0.8rem;
    padding: 6px 10px;
    border-radius: var(--r);
    text-decoration: none;
    transition: color 0.15s;
}
.topbar-btn-muted:hover { color: var(--text-1); }

/* ── FOOTER ──────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-surface); }
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
}
.footer-copy  { font-size: 0.78rem; color: var(--text-3); }
.footer-links { display: flex; gap: 16px; }
.footer-link  {
    font-size: 0.78rem;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-link:hover { color: var(--text-1); }

/* ── DASHBOARD FOOTER ────────────────────── */
.dash-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}
.dash-footer-copy  { font-size: 0.78rem; color: var(--text-3); }
.dash-footer-links { display: flex; gap: 16px; }
.dash-footer-link  {
    font-size: 0.78rem;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.15s;
}
.dash-footer-link:hover { color: var(--text-1); }

/* ── COMING SOON PAGE ────────────────────── */
.coming-soon-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}
.coming-soon-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--rlg);
    padding: 48px 56px;
    text-align: center;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 8px 32px var(--shadow-color);
}
.coming-soon-icon  { font-size: 3rem; margin-bottom: 16px; }
.coming-soon-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-1);
    margin: 0 0 10px;
}
.coming-soon-sub   { font-size: 0.9rem; color: var(--text-3); margin-bottom: 24px; }
.coming-soon-badge {
    display: inline-block;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 28px;
}
.coming-soon-back {
    display: block;
    color: var(--text-3);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.15s;
}
.coming-soon-back:hover { color: var(--accent); }

/* ── FEATURE TOGGLE on nav-cards ─────── */
.card-toggle {
    position: relative;
    display: inline-flex;
    width: 34px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 10px;
    cursor: pointer;
}
.card-toggle input  { opacity:0; width:0; height:0; position:absolute; }
.card-toggle .toggle-slider {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: var(--border-lt, #2e3a58);
    transition: .22s;
    cursor: pointer;
}
.card-toggle .toggle-slider::before {
    content: "";
    position: absolute;
    width: 14px; height: 14px;
    left: 3px; bottom: 3px;
    border-radius: 50%;
    background: #8896b0;
    transition: .22s;
}
.card-toggle input:checked + .toggle-slider { background: var(--accent, #5865f2); }
.card-toggle input:checked + .toggle-slider::before {
    transform: translateX(14px);
    background: #fff;
}
/* Dim disabled cards */
.nav-card.feat-disabled {
    opacity: .45;
    pointer-events: none;
}
.nav-card.feat-disabled .card-toggle {
    pointer-events: all;
    opacity: 1;
}

/* ── Status-page utilities (used on all pages) ──────── */
.hero-section {
    text-align: center;
    /* Cancel .main-area's padding so this bar spans full width edge-to-edge
       instead of sitting inset with its own background showing as a "frame". */
    margin: -34px -38px 0;
    padding: 56px 38px 36px;
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
    border-bottom: 1px solid var(--border);
}
.hero-section h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 6px; }
.hero-section p  { color: var(--text-2); font-size: .93rem; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--card-shadow);
    padding: 20px 22px;
}
.stat-label { font-size: .73rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text-1); }
.stat-sub   { font-size: .76rem; color: var(--text-2); margin-top: 2px; }

.section-label {
    font-size: .73rem; color: var(--text-2); text-transform: uppercase;
    letter-spacing: .07em; margin-bottom: 10px; font-weight: 700;
}


/* ═══════════════════════════════════════════════
   RESPONSIVE — Mobile & Tablet
   ═══════════════════════════════════════════════ */

/* Viewport fix for all devices */
* { box-sizing: border-box; }
img, video { max-width: 100%; }

/* ── Topbar mobile ── */
@media (max-width: 768px) {
    .topbar {
        padding: 0 16px;
        height: 52px;
    }
    .topbar-right {
        gap: 12px;
    }
    .topbar-btn {
        font-size: .8rem;
    }
    /* Hide some nav links on very small screens */
    .topbar-btn.hide-mobile {
        display: none;
    }
}

@media (max-width: 480px) {
    .topbar-right .topbar-btn:not(:last-child):not(:first-child) {
        display: none;
    }
}

/* ── Sidebar + Content layout ── */
@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100% !important;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        flex-direction: row;
        padding: 8px;
        gap: 6px;
    }
    .sidebar-server-list {
        display: flex;
        flex-direction: row;
        gap: 6px;
        padding: 0;
    }
    .sidebar-server-item {
        flex-direction: column;
        padding: 8px 12px;
        font-size: .78rem;
        white-space: nowrap;
        gap: 4px;
    }
    .sidebar-server-icon { width: 28px; height: 28px; font-size: .8rem; }
    .main-content { width: 100%; }
}

/* ── Edit panel mobile ── */
@media (max-width: 768px) {
    .edit-panel-header {
        padding: 12px 16px;
        font-size: .9rem;
    }
    .edit-panel-body {
        padding: 12px 16px;
    }
    .level-sub-header {
        padding: 12px 16px;
    }
    .level-sub-card {
        padding: 0 0 14px;
    }
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    .input, .select, .textarea {
        font-size: 16px; /* prevents iOS zoom */
    }
}

/* ── Dashboard server grid ── */
@media (max-width: 768px) {
    .server-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    .server-card {
        padding: 14px;
    }
    .dash-hero {
        padding: 24px 16px;
    }
    .dash-hero h1 { font-size: 1.4rem; }
}

/* ── Overview cards ── */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: 1fr !important;
    }
    .nav-card {
        padding: 14px 16px;
    }
}

/* ── Status page ── */
@media (max-width: 768px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }
    .hero-section, .hero {
        padding: 32px 16px 24px;
    }
    .hero h1, .hero-section h1 { font-size: 1.4rem; }
    .main { padding: 24px 16px; }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr !important;
    }
    .stat-value { font-size: 1.3rem; }
}

/* ── Buttons touch-friendly ── */
@media (max-width: 768px) {
    .btn-primary, .btn-secondary, .btn-danger {
        padding: 10px 16px;
        font-size: .9rem;
        min-height: 44px; /* Apple HIG touch target */
    }
    .form-actions {
        flex-direction: column;
    }
}

/* ── Admin guild cards ── */
@media (max-width: 768px) {
    #guilds-grid {
        grid-template-columns: 1fr !important;
    }
    .admin-guild-card {
        padding: 14px;
    }
}

/* ── Tables ── */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ── Font consistency ── */
* {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}
code, pre, .mono, [class*="font-mono"] {
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
}

/* ── Brand/headings always Outfit bold ── */
h1, h2, h3, h4, .brand, .brand-name,
.nav-card-title, .level-sub-header,
.server-name, .dash-hero h1 {
    font-family: 'Outfit', sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════
   PUBLIC / LEGAL PAGES (Impressum, Datenschutz, DSGVO, Status)
   ═══════════════════════════════════════════════ */
.content-page { max-width: 960px; margin: 0 auto; padding: 40px 24px; }

.info-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r); padding: 24px 28px; margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}
.info-card h2 {
    font-size: 1rem; font-weight: 700; color: var(--text1);
    margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.info-card p { font-size: .87rem; color: var(--text2); line-height: 1.7; margin-bottom: 12px; }
.info-card p:last-child { margin-bottom: 0; }
.info-card ul { padding-left: 18px; font-size: .87rem; color: var(--text2); line-height: 1.8; margin-bottom: 12px; }
.info-card a { color: var(--accent); text-decoration: none; }
.info-card a:hover { text-decoration: underline; }

.rights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; margin-top: 4px; }
.right-item { background: var(--elevated); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; }
.right-item .art  { font-size: .7rem; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.right-item .name { font-size: .9rem; font-weight: 700; color: var(--text1); }
.right-item .desc { font-size: .78rem; color: var(--text2); margin-top: 4px; line-height: 1.5; }

.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.type-option {
    cursor: pointer; display: flex; align-items: flex-start; gap: 10px;
    background: var(--input); border: 1px solid var(--border); border-radius: var(--r);
    padding: 12px 14px; transition: border-color .15s;
}
.type-option input[type="radio"] { width: auto; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.type-option-title { font-weight: 700; color: var(--text1); font-size: .9rem; }
.type-option-sub   { color: var(--text3); font-size: .77rem; margin-top: 2px; }

.alert-success {
    background: rgba(46,204,113,.08); border: 1px solid rgba(46,204,113,.3);
    border-radius: var(--r); padding: 24px 28px; text-align: center;
    color: var(--green); font-size: .95rem; line-height: 1.7;
}
.alert-success strong { color: #fff; }
.alert-error {
    background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3);
    border-radius: var(--r); padding: 12px 16px; color: var(--red);
    font-size: .85rem; margin-bottom: 16px;
}
.small-note { font-size: .75rem; color: var(--text3); text-align: center; line-height: 1.6; }
.lbl { font-size: .72rem; color: var(--text3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.val { font-size: .9rem; color: var(--text1); font-weight: 600; margin-bottom: 12px; }
.val a { color: var(--accent); font-weight: 400; }
.val:last-child { margin-bottom: 0; }

@media (max-width: 480px) { .type-grid { grid-template-columns: 1fr; } }

/* ── STATUS PAGE ──────────────────────── */
.status-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 18px; border-radius: 30px; font-weight: 700; font-size: .9rem;
    margin-top: 16px; border: 1px solid;
}
.badge-online  { background: rgba(46,204,113,.12); border-color: rgba(46,204,113,.35); color: var(--green); }
.badge-offline { background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.35);  color: var(--red); }
.badge-maint   { background: var(--accent-glow);   border-color: rgba(88,101,242,.35); color: var(--accent); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }

/* ── SERVICE / STATUS BADGES (admin) ──── */
.svc-badge {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 20px; padding: 2px 10px;
    font-size: .78rem; font-weight: 700;
    border: 1px solid;
}
.svc-badge-green  { background: rgba(46,204,113,.12); border-color: rgba(46,204,113,.35); color: var(--green); }
.svc-badge-red    { background: rgba(239,68,68,.12);  border-color: rgba(239,68,68,.35);  color: var(--red); }
.svc-badge-muted  { background: var(--elevated); border-color: var(--border); color: var(--text2); font-weight: 600; }
.svc-badge-accent { background: var(--accent-glow); border-color: rgba(88,101,242,.35); color: var(--accent2); }
.svc-text-accent  { color: var(--accent2); }
.svc-text-muted   { color: var(--text2); }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(.85)} }

.chart-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r); padding: 20px 22px; margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}
.chart-card canvas { width: 100% !important; height: 140px !important; }

.table-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--r); overflow: hidden; margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}
.table-card table { width: 100%; border-collapse: collapse; }
.table-card th {
    background: var(--elevated); color: var(--text2); font-size: .75rem;
    text-transform: uppercase; letter-spacing: .05em; padding: 10px 16px; text-align: left;
}
.table-card td { padding: 9px 16px; font-size: .85rem; border-top: 1px solid var(--border); color: var(--text2); }
.table-card td:first-child { color: var(--text1); }
.table-card tr:hover td { background: rgba(255,255,255,.02); }
.ping-ok   { color: var(--green); font-weight: 700; }
.ping-warn { color: var(--yellow); font-weight: 700; }
.ping-bad  { color: var(--red); font-weight: 700; }

.maint-banner {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
    padding: 20px 24px; margin-bottom: 28px; display: flex; align-items: center; gap: 18px;
}
.maint-banner-icon {
    width: 44px; height: 44px; border-radius: var(--r); background: var(--elevated);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.maint-banner-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); font-weight: 700; margin-bottom: 3px; }
.maint-banner-title { font-weight: 700; font-size: 1rem; color: var(--text1); }
.maint-banner-msg   { font-size: .85rem; color: var(--text2); margin-top: 4px; }
.maint-banner-badge { background: var(--elevated); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: .78rem; color: var(--text2); font-weight: 600; }

/* ── AUTH CARD (login / verify pages) ─── */
.auth-page { display: flex; align-items: center; justify-content: center; padding: 60px 24px; }
.auth-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--rlg); padding: 44px 48px;
    max-width: 440px; width: 100%;
    box-shadow: 0 8px 40px var(--shadow-color-strong);
}
.auth-icon  { font-size: 2.3rem; margin-bottom: 14px; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; color: var(--text1); }
.auth-sub   { color: var(--text2); font-size: .87rem; margin-bottom: 28px; line-height: 1.6; }
.auth-form label, .auth-form .label { margin-bottom: 6px; margin-top: 0; display: block; }
.auth-form .input { margin-bottom: 16px; }
.auth-submit { width: 100%; justify-content: center; padding: 12px; font-size: .95rem; }
.auth-back { display: block; text-align: center; color: var(--text3); font-size: .82rem; text-decoration: none; margin-top: 14px; }
.auth-back:hover { color: var(--text1); }
.code-input {
    font-size: 1.6rem; text-align: center; letter-spacing: .25em;
    font-family: var(--mono); padding: 14px 16px;
}
@media (max-width: 480px) {
    .auth-card { padding: 32px 24px; }
    .code-input { font-size: 1.2rem; letter-spacing: .15em; }
}