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

:root {
    --bg-0:        #030408;
    --bg-1:        #080c14;
    --bg-2:        #0d1220;
    --bg-3:        #111828;
    --bg-4:        #161e30;
    --bg-5:        #1c2638;
    --border:      #1a2236;
    --border-light:#222e44;
    --accent:      #3d6fff;
    --accent-2:    #5c8aff;
    --accent-glow: rgba(61,111,255,0.14);
    --accent-ring: rgba(61,111,255,0.32);
    --green:       #3ba55d;
    --green-bright:#34d399;
    --green-dim:   rgba(59,165,93,0.15);
    --red:         #ed4245;
    --red-dim:     rgba(237,66,69,0.12);
    --yellow:      #faa61a;
    --blue:        #3d6fff;
    --text-0:      #e3e8f4;
    --text-1:      #7a8aaa;
    --text-2:      #3e4d6a;
    --font:        'Inter', sans-serif;
    --mono:        'JetBrains Mono', monospace;
    --radius:      6px;
    --radius-sm:   4px;
    --radius-lg:   10px;
    --radius-xl:   14px;
    --shadow:      0 8px 40px rgba(0,0,0,0.8);
    --shadow-sm:   0 2px 12px rgba(0,0,0,0.6);
    --sidebar-w:   240px;
    --topbar-h:    48px;
    --ease:        cubic-bezier(0.16,1,0.3,1);
}

html, body {
    height: 100%;
    background: var(--bg-0);
    color: var(--text-0);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

.page { min-height: 100vh; }
.hidden { display: none !important; }
.page.hidden { display: none !important; }

#landing {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

.landing-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#particleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.noise {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    animation: orbFloat 10s ease-in-out infinite;
}
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(61,111,255,0.13) 0%, transparent 70%); top: -200px; right: 4%; animation-delay: 0s; }
.orb-2 { width: 340px; height: 340px; background: radial-gradient(circle, rgba(92,138,255,0.08) 0%, transparent 70%); bottom: 12%; left: 1%; animation-delay: -4s; }
.orb-3 { width: 260px; height: 260px; background: radial-gradient(circle, rgba(61,111,255,0.09) 0%, transparent 70%); top: 42%; left: 30%; animation-delay: -7s; }

@keyframes orbFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50%       { transform: translateY(-22px) scale(1.04); }
}

.top-nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 52px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: default;
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(61,111,255,0.18), rgba(92,138,255,0.1));
    border: 1px solid rgba(61,111,255,0.28);
    border-radius: var(--radius-lg);
    padding: 5px;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo-icon-sm { width: 28px; height: 28px; padding: 4px; border-radius: var(--radius); }
.logo-icon-sm svg { width: 18px; height: 18px; }

.logo-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.4px;
}
.logo-dot { color: var(--accent-2); }

.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius);
    background: var(--bg-3);
    border: 1px solid var(--border-light);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-login:hover {
    background: var(--bg-4);
    border-color: var(--accent);
    color: var(--text-0);
}

.hero {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px 80px;
    animation: heroIn 0.9s var(--ease) both;
}

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

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--accent-2);
    margin-bottom: 28px;
    opacity: 0.8;
}
.eyebrow-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-2);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

.hero-title {
    font-size: clamp(38px, 6vw, 72px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -2.5px;
    color: var(--text-0);
    margin-bottom: 20px;
}
.hero-title-gradient {
    background: linear-gradient(135deg, #3d6fff 0%, #5c8aff 50%, #a0bcff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 16px;
    color: var(--text-1);
    max-width: 420px;
    line-height: 1.7;
    margin-bottom: 36px;
    font-weight: 400;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #2d5be3, #3d6fff);
    color: #fff;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 0 4px 24px rgba(61,111,255,0.45);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.5s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 8px 36px rgba(61,111,255,0.6); }
.btn-primary:hover::before { left: 100%; }
.btn-arrow { transition: transform 0.2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.quick-status {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(8,12,20,0.75);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    padding: 10px 6px;
    margin-bottom: 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(61,111,255,0.07) inset;
    animation: heroIn 1.1s var(--ease) both;
}

.qs-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 18px;
    white-space: nowrap;
}

.qs-icon {
    display: flex;
    align-items: center;
    color: var(--accent-2);
    opacity: 0.75;
    flex-shrink: 0;
}

.qs-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    letter-spacing: 0.2px;
}

.qs-value {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    min-width: 24px;
    display: inline-block;
    transition: color 0.2s ease;
}

.qs-divider {
    width: 1px;
    height: 28px;
    background: var(--border-light);
    flex-shrink: 0;
}

@keyframes qsPulse {
    0%   { color: var(--text-0); text-shadow: none; }
    30%  { color: var(--accent-2); text-shadow: 0 0 12px rgba(92,138,255,0.7); }
    100% { color: var(--text-0); text-shadow: none; }
}

.qs-value.qs-pulse {
    animation: qsPulse 0.8s var(--ease) forwards;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 480px;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.pill:hover { border-color: var(--accent-ring); color: var(--text-1); background: var(--accent-glow); }
.pill svg { color: var(--accent-2); flex-shrink: 0; }

.landing-footer {
    position: relative;
    z-index: 5;
    padding: 20px;
    text-align: center;
    font-size: 11px;
    color: var(--text-2);
    font-family: var(--mono);
    letter-spacing: 0.5px;
}

#dashGridCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#app { display: flex; height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: rgba(4,5,10,0.97);
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s var(--ease);
    backdrop-filter: blur(6px);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s ease;
}
.sidebar-close:hover { color: var(--text-0); background: var(--bg-4); }

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--text-2);
    padding: 14px 16px 4px;
    font-family: var(--font);
    text-transform: uppercase;
    user-select: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin: 0 4px;
    width: calc(100% - 8px);
    border-radius: var(--radius);
    background: none;
    border: none;
    color: var(--text-1);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
    position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-0); }
.nav-item.active { background: var(--accent-glow); color: #a0bcff; border: 1px solid var(--accent-ring); }
.nav-item.active .nav-icon { color: var(--accent-2); }

.nav-icon {
    width: 20px; height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-1);
    flex-shrink: 0;
    transition: color 0.12s ease;
}
.nav-item:hover .nav-icon { color: var(--text-0); }

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(2,3,7,0.98);
    flex-shrink: 0;
    position: relative;
}

.sidebar-footer-avatar-wrap { position: relative; flex-shrink: 0; }
.sidebar-footer-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.sidebar-footer-status-dot {
    position: absolute;
    bottom: -1px; right: -1px;
    width: 10px; height: 10px;
    background: var(--green);
    border: 2px solid var(--bg-1);
    border-radius: 50%;
    display: block;
}

.sidebar-footer-info { flex: 1; min-width: 0; }
.sidebar-footer-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-settings-btn {
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.sidebar-settings-btn:hover { color: var(--text-0); background: var(--bg-4); }

.sidebar-settings-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 12px;
    right: 12px;
    background: var(--bg-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px) scale(0.97);
    transform-origin: bottom center;
    transition: all 0.18s var(--ease);
    z-index: 200;
}
.sidebar-settings-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }

.dropdown-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    color: var(--red);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.12s ease;
    cursor: pointer;
}
.dropdown-logout:hover { background: var(--red-dim); }

.main-wrapper {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background: transparent;
    position: relative;
    z-index: 1;
}

.topbar {
    height: var(--topbar-h);
    background: rgba(3,4,9,0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 20px; height: 2px;
    background: var(--text-1);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.topbar-guild {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-0);
}
#topbarGuildName { color: var(--text-0); }
.topbar-guild-icon {
    width: 22px; height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.topbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-link {
    padding: 5px 13px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 0.18s ease, background 0.18s ease;
    border: 1px solid transparent;
}
.topbar-link:hover {
    color: var(--text-0);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

.avatar-wrap { position: relative; }

.topbar-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    cursor: pointer;
    display: block;
    transition: border-color 0.2s ease;
}
.topbar-avatar:hover { border-color: var(--accent); }

.avatar-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    min-width: 148px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.97);
    transform-origin: top right;
    transition: all 0.18s var(--ease);
    z-index: 200;
}
.avatar-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }

.content { flex: 1; padding: 32px 32px; overflow-y: auto; }

.section { display: none; }
.section.active {
    display: block;
    animation: sectionIn 0.35s var(--ease) both;
}
@keyframes sectionIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section-header { margin-bottom: 28px; }

.section-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.section-icon {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--accent-ring);
    border-radius: var(--radius);
    color: var(--accent-2);
    flex-shrink: 0;
    margin-top: 2px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-0);
    margin-bottom: 3px;
}
.section-sub { color: var(--text-2); font-size: 13px; }
.section-sub strong { color: var(--text-1); }

.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.guild-card {
    background: rgba(6,8,16,0.82);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}
.guild-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.guild-card:hover { border-color: rgba(61,111,255,0.4); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(61,111,255,0.15); }
.guild-card:hover::after { opacity: 1; }

.guild-card.bot-absent {
    border-style: dashed;
    border-color: var(--border-light);
    opacity: 0.65;
}
.guild-card.bot-absent:hover { opacity: 0.9; border-style: dashed; border-color: rgba(61,111,255,0.35); }

.guild-icon {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: var(--bg-4);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-2);
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s ease;
}
.guild-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.guild-card:hover .guild-icon { border-color: rgba(61,111,255,0.4); }

.guild-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
    position: relative;
    z-index: 1;
    line-height: 1.3;
    word-break: break-word;
}

.guild-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    font-family: var(--mono);
}
.guild-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.guild-status.online  { background: var(--green-dim); color: var(--green); }
.guild-status.add-bot { background: var(--accent-glow); color: var(--accent-2); }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 60px 20px;
    color: var(--text-2);
    grid-column: 1/-1;
    font-size: 13px;
}
.spinner {
    width: 28px; height: 28px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 24px; }
.wl-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.card {
    background: rgba(6,8,16,0.82);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: border-color 0.2s ease;
    backdrop-filter: blur(8px);
}
.card:hover { border-color: rgba(255,255,255,0.1); }

.card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.card-icon-box {
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-4);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--accent-2);
    flex-shrink: 0;
}

.card-title { font-size: 14px; font-weight: 600; color: var(--text-0); }
.card-desc  { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }

.toggle-card { padding: 18px 20px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-info { display: flex; align-items: flex-start; gap: 12px; flex: 1; }

.card-icon-inline {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border: 1px solid var(--accent-ring);
    border-radius: var(--radius-sm);
    color: var(--accent-2);
    flex-shrink: 0;
    margin-top: 1px;
}

.toggle-title { font-size: 14px; font-weight: 600; color: var(--text-0); }
.toggle-desc  { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }

.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; inset: 0;
    background: var(--bg-4);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.slider::before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; top: 50%;
    transform: translateY(-50%);
    background: var(--text-2);
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.toggle input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .slider::before { transform: translateX(20px) translateY(-50%); background: #fff; }

.level-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.level-btn {
    flex: 1; min-width: 70px;
    padding: 9px 12px;
    border-radius: var(--radius);
    background: var(--bg-4);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.level-btn:hover { border-color: var(--border-light); color: var(--text-1); background: var(--bg-3); }
.level-btn.active { background: var(--accent-glow); border-color: var(--accent-ring); color: var(--accent-2); }

.level-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.level-dot.low    { background: var(--green); }
.level-dot.medium { background: var(--yellow); }
.level-dot.high   { background: #fb923c; }
.level-dot.ultra  { background: var(--red); box-shadow: 0 0 6px rgba(237,66,69,0.6); }

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #2d5be3, #3d6fff);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(61,111,255,0.35);
}
.btn-save:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(61,111,255,0.5); }
.btn-save:active { transform: translateY(0); }
.btn-save:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.text-input {
    flex: 1;
    padding: 10px 13px;
    border-radius: var(--radius);
    background: var(--bg-0);
    border: 1px solid var(--border);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    transition: all 0.18s ease;
}
.text-input::placeholder { color: var(--text-2); }
.text-input:focus { border-color: rgba(61,111,255,0.5); background: var(--bg-1); box-shadow: 0 0 0 3px rgba(61,111,255,0.1); }

.select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.select-icon {
    position: absolute;
    left: 13px;
    color: var(--text-2);
    pointer-events: none;
    z-index: 1;
}
.select-input {
    width: 100%;
    padding: 10px 38px 10px 36px;
    border-radius: var(--radius);
    background: var(--bg-0);
    border: 1px solid var(--border);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    transition: all 0.18s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%233e4d6a' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}
.select-input:focus { border-color: rgba(61,111,255,0.5); box-shadow: 0 0 0 3px rgba(61,111,255,0.1); }

.channel-select-wrap { margin-bottom: 18px; }

.wl-card { display: flex; flex-direction: column; }
.wl-input-row { display: flex; gap: 8px; margin-bottom: 12px; }

.btn-add {
    padding: 10px 16px;
    border-radius: var(--radius);
    background: rgba(52,211,153,0.1);
    border: 1px solid rgba(52,211,153,0.2);
    color: var(--green);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.btn-add:hover { background: rgba(52,211,153,0.18); border-color: rgba(52,211,153,0.4); }
.btn-add:disabled { opacity: 0.5; cursor: not-allowed; }

.wl-list { display: flex; flex-direction: column; gap: 6px; }
.wl-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 13px;
    border-radius: var(--radius);
    background: var(--bg-3);
    border: 1px solid var(--border);
    transition: border-color 0.15s ease;
    animation: wlIn 0.25s var(--ease) both;
}
@keyframes wlIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}
.wl-item:hover { border-color: var(--border-light); }
.wl-id { font-family: var(--mono); font-size: 12px; color: var(--text-1); }
.wl-remove {
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 13px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.wl-remove:hover { color: var(--red); background: var(--red-dim); }
.wl-empty {
    font-size: 12px;
    color: var(--text-2);
    text-align: center;
    padding: 18px 0;
    font-style: italic;
}

.logs-card .btn-save { margin-top: 0; }

.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    padding: 11px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    background: var(--bg-3);
    border: 1px solid var(--border-light);
    color: var(--text-0);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(12px) scale(0.97);
    opacity: 0;
    transition: all 0.25s var(--ease);
    pointer-events: none;
    max-width: 320px;
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast.success { border-color: rgba(52,211,153,0.3); color: var(--green-bright); background: rgba(52,211,153,0.07); }
.toast.error   { border-color: rgba(237,66,69,0.3); color: var(--red); background: rgba(237,66,69,0.07); }

@media (max-width: 800px) {
    .top-nav { padding: 18px 20px; }
    .hero { padding: 40px 20px 60px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: flex; }
    .main-wrapper { margin-left: 0; }
    .hamburger { display: flex; }
    .content { padding: 20px 16px; }
    .cards-grid { grid-template-columns: 1fr; }
    .wl-grid    { grid-template-columns: 1fr; }
    .guild-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .quick-status { flex-direction: column; gap: 0; padding: 6px 4px; width: 100%; max-width: 320px; }
    .qs-divider { width: 80%; height: 1px; margin: 2px auto; }
    .qs-item { padding: 6px 16px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}