:root {
    --panel-bg: #0d0e10;
    --panel-sidebar: #141518;
    --panel-card: #181a1f;
    --panel-card-soft: #202329;
    --panel-border: rgba(255, 255, 255, .08);
    --panel-text: #f1f3f5;
    --panel-muted: #8d949f;
    --panel-accent: #ffcc00;
    --panel-green: #5ddb93;
    --panel-red: #ff7373;
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--panel-bg); color: var(--panel-text); }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }

.panel-shell { min-height: 100vh; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.panel-sidebar { display: flex; flex-direction: column; padding: 28px 18px 18px; background: var(--panel-sidebar); border-right: 1px solid var(--panel-border); }
.brand-block { display: flex; align-items: center; gap: 12px; padding: 0 10px 30px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--panel-accent); color: #151515; font-weight: 800; font-size: 20px; }
.brand-block strong, .brand-block span { display: block; }
.brand-block strong { font-size: 15px; letter-spacing: .02em; }
.brand-block span { margin-top: 3px; color: var(--panel-muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.server-picker-wrap { padding: 0 10px 28px; }
.server-picker-wrap label, .sidebar-section-title { display: block; margin-bottom: 9px; color: var(--panel-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.server-picker { width: 100%; padding: 12px 13px; color: var(--panel-text); background: var(--panel-card); border: 1px solid var(--panel-border); border-radius: 10px; outline: none; }
.server-picker:focus { border-color: rgba(255, 204, 0, .6); }
.sidebar-section-title { padding: 0 10px; }
.feature-list { display: grid; gap: 4px; }
.feature-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 10px; color: #abb1b9; background: transparent; border: 1px solid transparent; border-radius: 10px; text-align: left; transition: background .16s, color .16s, border-color .16s; }
.feature-item:hover { color: var(--panel-text); background: rgba(255, 255, 255, .04); }
.feature-item.active { color: var(--panel-text); background: rgba(255, 204, 0, .08); border-color: rgba(255, 204, 0, .18); }
.feature-symbol { width: 22px; color: var(--panel-accent); text-align: center; font-size: 15px; }
.feature-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.feature-state { width: 6px; height: 6px; margin-left: auto; flex: 0 0 auto; border-radius: 50%; background: #4b5058; }
.feature-state.enabled { background: var(--panel-green); box-shadow: 0 0 0 3px rgba(93, 219, 147, .1); }
.sidebar-loading { padding: 10px; color: var(--panel-muted); font-size: 13px; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 20px 10px 4px; color: var(--panel-muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--panel-muted); }
.status-dot.online { background: var(--panel-green); box-shadow: 0 0 0 4px rgba(93, 219, 147, .1); }

.panel-main { min-width: 0; padding: 42px clamp(24px, 6vw, 96px); }
.panel-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; max-width: 1000px; margin: 0 auto 42px; }
.eyebrow { margin: 0 0 9px; color: var(--panel-accent); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.04em; }
.topbar-user { display: flex; align-items: center; gap: 14px; color: var(--panel-muted); font-size: 13px; }
.topbar-user a { color: var(--panel-accent); text-decoration: none; }
.workspace { max-width: 1000px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); border: 1px solid var(--panel-border); border-radius: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.18); }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.workspace h2 { margin-bottom: 9px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.muted-copy { max-width: 650px; margin-bottom: 0; color: var(--panel-muted); line-height: 1.6; }
.workspace-divider { height: 1px; margin: 34px 0; background: var(--panel-border); }
.feature-body { max-width: 720px; }
.feature-body h3 { margin: 0 0 8px; font-size: 17px; }
.feature-body p { color: var(--panel-muted); line-height: 1.6; }
.feature-body code { padding: 2px 5px; color: #e9d989; background: rgba(255,204,0,.08); border-radius: 4px; }
.feature-note { padding: 14px 16px; color: #c8cdd4; background: rgba(255, 204, 0, .07); border-left: 3px solid var(--panel-accent); border-radius: 8px; font-size: 13px; line-height: 1.55; }
.form-grid { display: grid; gap: 18px; }
.settings-card { padding: 18px; background: rgba(0,0,0,.15); border: 1px solid var(--panel-border); border-radius: 12px; }
.settings-card h4 { margin: 0 0 16px; font-size: 15px; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 16px; }
.number-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--panel-muted); font-size: 12px; }
.number-option input { width: 58px; padding: 7px 8px; color: var(--panel-text); background: #101114; border: 1px solid var(--panel-border); border-radius: 7px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.checkbox-option { display: flex; align-items: center; gap: 8px; padding: 10px; color: #c7cbd1; background: rgba(255,255,255,.035); border: 1px solid var(--panel-border); border-radius: 8px; font-size: 13px; }
.checkbox-option input { accent-color: var(--panel-accent); }
.birthday-list { display: grid; gap: 8px; margin-top: 24px; }
.birthday-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; background: rgba(255,255,255,.035); border: 1px solid var(--panel-border); border-radius: 8px; }
.birthday-name { flex: 1; font-size: 13px; }
.birthday-date { color: var(--panel-muted); font-size: 13px; }
.danger-button { padding: 7px 10px; color: #ffabab; background: transparent; border: 1px solid rgba(255,115,115,.28); border-radius: 7px; font-size: 12px; }
.danger-button:hover { background: rgba(255,115,115,.08); }
.secondary-button { padding: 7px 10px; color: var(--panel-text); background: transparent; border: 1px solid var(--panel-border); border-radius: 7px; font-size: 12px; }
.secondary-button:hover { background: rgba(255,255,255,.08); }
.aggregate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.aggregate-grid div { padding: 16px; background: rgba(0,0,0,.16); border: 1px solid var(--panel-border); border-radius: 10px; }
.aggregate-grid strong, .aggregate-grid span { display: block; }
.aggregate-grid strong { font-size: 20px; }
.aggregate-grid span { margin-top: 4px; color: var(--panel-muted); font-size: 11px; }
.field label { display: block; margin-bottom: 8px; color: #c7cbd1; font-size: 13px; font-weight: 600; }
.field input, .field textarea { width: 100%; padding: 12px 13px; color: var(--panel-text); background: #101114; border: 1px solid var(--panel-border); border-radius: 9px; outline: none; resize: vertical; }
.field textarea { min-height: 110px; line-height: 1.55; }
.field input:focus, .field textarea:focus { border-color: rgba(255, 204, 0, .65); }
.save-row { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.primary-button { padding: 11px 17px; color: #171717; background: var(--panel-accent); border: 0; border-radius: 9px; font-weight: 800; }
.primary-button:disabled { cursor: wait; opacity: .55; }
.save-status { color: var(--panel-muted); font-size: 12px; }
.empty-state { max-width: 560px; margin: 18vh auto 0; padding: 42px 26px; text-align: center; border: 1px dashed var(--panel-border); border-radius: 18px; }
.empty-icon { margin-bottom: 13px; color: var(--panel-accent); font-size: 32px; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { margin: 0; color: var(--panel-muted); line-height: 1.6; }
.notice { max-width: 1000px; margin: -16px auto 24px; padding: 14px 16px; color: #ffd2d2; background: rgba(255, 115, 115, .08); border: 1px solid rgba(255, 115, 115, .22); border-radius: 10px; font-size: 13px; }

.switch { position: relative; display: inline-flex; flex: 0 0 auto; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; display: block; width: 42px; height: 24px; background: #343941; border-radius: 999px; transition: background .18s; }
.switch-track::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; content: ""; background: #e9ebee; border-radius: 50%; transition: transform .18s; }
.switch input:checked + .switch-track { background: var(--panel-green); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.large-switch .switch-track { width: 52px; height: 29px; }
.large-switch .switch-track::after { width: 23px; height: 23px; }
.large-switch input:checked + .switch-track::after { transform: translateX(23px); }

@media (max-width: 800px) {
    .panel-shell { display: block; }
    .panel-sidebar { min-height: auto; border-right: 0; border-bottom: 1px solid var(--panel-border); }
    .sidebar-footer { display: none; }
    .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-main { padding: 30px 18px 42px; }
    .panel-topbar { margin-bottom: 28px; }
    .topbar-user { display: none; }
}

@media (max-width: 480px) {
    .feature-list { grid-template-columns: 1fr; }
    .workspace-header { gap: 16px; }
    .section-grid, .checkbox-grid, .aggregate-grid { grid-template-columns: 1fr; }
    .birthday-row { align-items: flex-start; flex-wrap: wrap; }
}
