:root {
  color-scheme: dark;
  --bg: #0b0e13;
  --sidebar: rgba(13, 17, 24, .93);
  --panel: rgba(20, 26, 36, .87);
  --panel-strong: #171e29;
  --stroke: rgba(255,255,255,.075);
  --stroke-bright: rgba(255,255,255,.13);
  --text: #f3f5fa;
  --muted: #8e9aaa;
  --muted-2: #b0bac8;
  --blue: #8da7ff;
  --green: #7fe0b0;
  --amber: #f3ca7b;
  --red: #ff8b8b;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin:0; min-height:100vh; color:var(--text); background:var(--bg); font-size:14px; }
button,input,select { font:inherit; }
button,a,select { -webkit-tap-highlight-color: transparent; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; }
.hidden { display:none !important; }
.ambient { position:fixed; width:420px; height:420px; border-radius:50%; filter:blur(130px); opacity:.1; pointer-events:none; z-index:0; }
.ambient-one { background:#547af7; top:-250px; right:4%; }
.ambient-two { background:#1aa97a; bottom:-300px; left:22%; }
.login-screen { min-height:100vh; display:flex; align-items:center; justify-content:center; flex-direction:column; padding:24px; position:relative; z-index:1; }
.login-card { width:min(100%, 470px); padding:44px 40px 36px; border:1px solid var(--stroke-bright); border-radius:26px; background:linear-gradient(150deg,rgba(25,33,46,.96),rgba(15,20,28,.97)); box-shadow:0 28px 100px rgba(0,0,0,.42); text-align:center; }
.brand-mark { width:38px; height:38px; border-radius:12px; display:inline-flex; align-items:center; justify-content:center; font-weight:900; font-size:20px; color:#101626; background:linear-gradient(135deg,#d9e2ff,#809bff 70%); box-shadow:0 6px 24px rgba(113,143,255,.2); }
.brand-mark.large { width:58px; height:58px; border-radius:17px; font-size:30px; margin-bottom:24px; }
.eyebrow { color:#8e9eff; font-size:10px; font-weight:800; letter-spacing:.17em; text-transform:uppercase; }
h1,h2,p { margin-top:0; }
h1 { font-size:clamp(27px,3vw,37px); letter-spacing:-.045em; margin:9px 0 9px; line-height:1.12; }
h2 { font-size:16px; letter-spacing:-.025em; margin:5px 0 0; }
.muted { color:var(--muted); }
.lead { line-height:1.7; font-size:14px; margin:16px 0 24px; }
.button { border:1px solid transparent; border-radius:11px; min-height:42px; padding:0 15px; display:inline-flex; align-items:center; justify-content:center; gap:9px; font-weight:700; color:var(--text); transition:transform .15s ease,border-color .15s ease,background .15s ease; }
.button:hover { transform:translateY(-1px); }
.button:disabled { opacity:.45; cursor:not-allowed; transform:none; }
.button.primary { color:#0b1120; background:linear-gradient(135deg,#c4d0ff,#829bff); box-shadow:0 8px 25px rgba(96,125,255,.12); }
.button.secondary { background:rgba(255,255,255,.04); border-color:var(--stroke-bright); }
.button.danger { background:rgba(238,80,91,.15); color:#ffb0b4; border-color:rgba(255,113,125,.24); }
.button.small { min-height:34px; padding:0 11px; border-radius:9px; font-size:12px; }
.login-button { width:100%; min-height:48px; }
.discord-icon { font-size:19px; }
.login-foot { color:var(--muted); font-size:11px; display:flex; gap:8px; justify-content:center; align-items:center; margin-top:21px; }
.dot { width:7px; height:7px; display:inline-block; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px rgba(127,224,176,.08); flex-shrink:0; }
.error-text { color:var(--red); line-height:1.5; margin:15px 0 0; font-size:12px; }
.page-footer { color:#596474; font-size:11px; margin-top:24px; }
.page-footer span { padding:0 7px; color:#8996a8; }
.app-shell { position:relative; z-index:1; min-height:100vh; display:grid; grid-template-columns:244px minmax(0,1fr); }
.sidebar { position:sticky; top:0; height:100vh; padding:22px 14px 16px; border-right:1px solid var(--stroke); background:var(--sidebar); backdrop-filter:blur(22px); display:flex; flex-direction:column; }
.brand { display:flex; gap:11px; align-items:center; padding:0 9px 27px; }
.brand strong { display:block; font-size:16px; letter-spacing:.09em; }
.brand small { display:block; margin-top:3px; color:var(--muted); font-size:8px; letter-spacing:.17em; }
.workspace-label { color:#6e798a; font-weight:800; font-size:9px; letter-spacing:.15em; margin:0 10px 13px; }
.select-label { display:block; font-size:11px; color:var(--muted); margin:0 10px 7px; }
.guild-select { width:100%; border:1px solid var(--stroke-bright); border-radius:10px; padding:11px 10px; color:var(--text); background:#171d28; outline:none; }
.nav-list { display:grid; gap:5px; margin-top:25px; }
.nav-item { border:1px solid transparent; display:flex; align-items:center; text-align:left; gap:12px; background:transparent; padding:11px 12px; color:#a7b2c1; border-radius:10px; font-size:12px; font-weight:650; }
.nav-item:hover { background:rgba(255,255,255,.035); color:var(--text); }
.nav-item.active { color:#e8ecff; border-color:rgba(129,153,255,.14); background:linear-gradient(90deg,rgba(111,137,255,.16),rgba(111,137,255,.05)); }
.nav-icon { font-size:16px; width:16px; text-align:center; color:#8fa5ff; }
.nav-dot { width:6px; height:6px; margin-left:auto; border-radius:50%; background:var(--red); }
.sidebar-bottom { margin-top:auto; }
.api-status { padding:12px 10px; display:flex; align-items:center; gap:10px; border:1px solid var(--stroke); background:rgba(255,255,255,.02); border-radius:12px; margin-bottom:16px; }
.api-status strong,.user-copy strong { display:block; font-size:11px; font-weight:700; }
.api-status small,.user-copy small { display:block; color:var(--muted); font-size:10px; margin-top:4px; }
.api-status .dot { background:var(--amber); }
.api-status.good .dot { background:var(--green); }
.api-status.bad .dot { background:var(--red); }
.user-row { display:flex; align-items:center; gap:9px; border-top:1px solid var(--stroke); padding:15px 4px 0; }
.avatar { width:31px; height:31px; background:#333f58; color:#e4e9ff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; overflow:hidden; flex-shrink:0; }
.avatar img { width:100%; height:100%; object-fit:cover; }
.user-copy { min-width:0; flex:1; }
.user-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.icon-button { color:var(--muted); border:0; background:transparent; font-size:17px; }
.main-area { min-width:0; padding:0 clamp(20px,3vw,44px) 20px; max-width:1700px; width:100%; margin:0 auto; }
.topbar { height:70px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--stroke); margin-bottom:32px; gap:12px; }
.breadcrumb { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--muted); }
.breadcrumb strong { color:#dfe4ed; font-weight:650; }
.crumb-slash { color:#485261; }
.top-actions { display:flex; align-items:center; gap:13px; }
.tiny { font-size:11px; }
.page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:23px; }
.page-heading h1 { margin-top:10px; }
.page-heading p { margin-bottom:0; font-size:13px; }
.status-pill,.mini-pill { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid var(--stroke-bright); border-radius:999px; background:rgba(255,255,255,.025); color:var(--muted-2); font-size:10px; font-weight:750; white-space:nowrap; }
.status-pill .dot { background:var(--amber); width:6px; height:6px; }
.status-pill.good .dot { background:var(--green); }
.status-pill.bad .dot { background:var(--red); }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:16px; }
.stat-card,.panel { border:1px solid var(--stroke); border-radius:var(--radius); background:linear-gradient(145deg,rgba(22,29,40,.92),rgba(16,21,30,.94)); }
.stat-card { padding:17px 18px 16px; min-width:0; }
.stat-top { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.stat-label { color:var(--muted); font-size:11px; font-weight:600; }
.stat-icon { display:inline-flex; align-items:center; justify-content:center; width:29px; height:29px; border-radius:9px; font-size:15px; background:rgba(255,255,255,.05); }
.stat-icon.amber { color:var(--amber); background:rgba(243,202,123,.08); }
.stat-icon.blue { color:var(--blue); background:rgba(141,167,255,.09); }
.stat-icon.red { color:var(--red); background:rgba(255,139,139,.08); }
.stat-icon.green { color:var(--green); background:rgba(127,224,176,.08); }
.stat-number { font-size:31px; letter-spacing:-.05em; line-height:1; font-weight:780; margin:20px 0 9px; font-variant-numeric:tabular-nums; }
.stat-caption { color:#778496; font-size:10px; line-height:1.45; }
.content-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.12fr); gap:14px; margin-bottom:15px; }
.panel { padding:20px; min-width:0; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:20px; }
.panel-heading h2 { margin-top:6px; }
.mini-pill { padding:6px 9px; font-size:9px; color:var(--green); border-color:rgba(127,224,176,.18); background:rgba(127,224,176,.045); }
.mini-pill.bad { color:var(--red); border-color:rgba(255,139,139,.2); background:rgba(255,139,139,.04); }
.mini-pill.warn { color:var(--amber); border-color:rgba(243,202,123,.2); }
.security-status-row { display:flex; align-items:center; gap:13px; padding:17px 0 21px; border-bottom:1px solid var(--stroke); }
.security-symbol { width:42px; height:42px; border-radius:14px; display:flex; align-items:center; justify-content:center; background:rgba(127,224,176,.08); color:var(--green); font-size:22px; }
.status-copy strong { font-size:13px; }
.status-copy p { margin:5px 0 0; font-size:11px; line-height:1.5; }
.meter-row { margin-top:17px; display:grid; grid-template-columns:105px 1fr; align-items:center; gap:12px; }
.meter-row div:first-child { display:flex; justify-content:space-between; gap:8px; font-size:10px; }
.meter-row strong { font-size:10px; }
.meter { height:5px; border-radius:99px; overflow:hidden; background:#252d3a; }
.meter span { display:block; height:100%; width:0; background:var(--green); border-radius:99px; transition:width .3s ease; }
.text-button { background:transparent; border:0; color:#a5b4ff; font-size:11px; font-weight:700; padding:0; }
.text-button:hover { color:#d1d9ff; }
.security-panel .text-button { margin-top:21px; }
.activity-list { display:grid; gap:0; }
.activity-item { display:grid; grid-template-columns:9px minmax(0,1fr); gap:12px; padding:11px 0; border-bottom:1px solid rgba(255,255,255,.045); }
.activity-item:last-child { border-bottom:0; padding-bottom:0; }
.activity-mark { width:7px; height:7px; margin-top:5px; border-radius:50%; background:var(--amber); box-shadow:0 0 0 4px rgba(243,202,123,.07); }
.activity-mark.danger { background:var(--red); box-shadow:0 0 0 4px rgba(255,139,139,.06); }
.activity-mark.good { background:var(--green); box-shadow:0 0 0 4px rgba(127,224,176,.06); }
.activity-title { display:flex; justify-content:space-between; gap:10px; font-size:11px; font-weight:700; }
.activity-meta { color:var(--muted); font-size:10px; margin-top:4px; line-height:1.5; overflow-wrap:anywhere; }
.empty-state { color:var(--muted); text-align:center; padding:28px 14px; line-height:1.6; font-size:12px; }
.table-panel { padding-bottom:8px; }
.table-wrap { overflow-x:auto; width:100%; }
table { border-collapse:collapse; width:100%; text-align:left; font-size:11px; min-width:780px; }
th { color:#7e8a9b; font-size:9px; text-transform:uppercase; letter-spacing:.09em; font-weight:800; border-bottom:1px solid var(--stroke-bright); padding:11px 10px; }
td { padding:13px 10px; color:#d1d8e3; border-bottom:1px solid rgba(255,255,255,.045); vertical-align:top; max-width:270px; overflow-wrap:anywhere; line-height:1.5; }
tbody tr:last-child td { border-bottom:0; }
.cell-primary { display:block; color:#e5e9f0; font-weight:700; }
.cell-secondary { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.table-empty { text-align:center; padding:30px; color:var(--muted); }
.tag { display:inline-block; padding:4px 7px; border-radius:7px; font-weight:750; font-size:9px; background:rgba(255,255,255,.05); color:#a6b1c0; text-transform:uppercase; letter-spacing:.02em; }
.tag.active,.tag.posted,.tag.sent,.tag.healthy { background:rgba(127,224,176,.08); color:var(--green); }
.tag.failed,.tag.high,.tag.emergency,.tag.expired { background:rgba(255,139,139,.09); color:var(--red); }
.tag.pending,.tag.medium,.tag.alert_only,.tag.not_configured { background:rgba(243,202,123,.08); color:var(--amber); }
.toolbar { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-bottom:13px; }
input,select { background:#101620; border:1px solid var(--stroke-bright); color:var(--text); border-radius:9px; padding:10px 11px; outline:none; width:100%; }
input:focus,select:focus { border-color:rgba(141,167,255,.65); box-shadow:0 0 0 3px rgba(141,167,255,.08); }
#warning-search { max-width:480px; }
.security-grid { grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); }
.lockdown-copy { color:var(--muted-2); line-height:1.6; background:rgba(255,255,255,.025); padding:12px 14px; border-radius:10px; font-size:12px; margin-bottom:16px; }
.form-grid { display:grid; grid-template-columns:150px minmax(0,1fr); gap:12px; }
.form-grid label,.setting label { display:block; color:var(--muted); font-size:10px; font-weight:700; letter-spacing:.02em; }
.form-grid input,.form-grid select,.setting select { display:block; margin-top:7px; font-size:11px; }
.button-row { display:flex; gap:9px; flex-wrap:wrap; margin-top:15px; }
.hint { color:#738092; font-size:10px; line-height:1.6; margin:14px 0 0; }
.check-row { display:flex; justify-content:space-between; gap:12px; align-items:center; font-size:11px; padding:13px 0; border-bottom:1px solid var(--stroke); }
.check-row:last-child { border-bottom:0; }
.check-row span { color:var(--muted); }
.check-row strong { text-align:right; }
.subtle-label { font-size:10px; color:var(--muted); }
.notice { display:flex; align-items:flex-start; gap:12px; padding:14px 16px; background:rgba(141,167,255,.05); border:1px solid rgba(141,167,255,.13); border-radius:12px; margin-bottom:15px; color:#b9c4d7; }
.notice-icon { width:21px; height:21px; display:inline-flex; flex-shrink:0; align-items:center; justify-content:center; border-radius:50%; background:rgba(141,167,255,.14); color:#b5c2ff; font-size:11px; font-weight:800; }
.notice p { font-size:11px; line-height:1.7; margin:1px 0 0; }
.config-form { padding:24px; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:19px 20px; }
.setting { min-width:0; }
.setting .setting-title { display:block; color:#e0e5ee; font-size:12px; margin-bottom:2px; }
.setting .setting-help { display:block; color:var(--muted); font-size:10px; line-height:1.5; margin-top:3px; }
.form-actions { margin-top:25px; padding-top:17px; border-top:1px solid var(--stroke); display:flex; gap:10px; align-items:center; justify-content:space-between; }
.summary-list { display:grid; gap:9px; }
.summary-row { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--stroke); font-size:11px; }
.summary-row:last-child { border:0; }
.summary-row span { color:var(--muted); }
.summary-row strong { overflow-wrap:anywhere; text-align:right; }
.code-preview { margin:0; background:#0b1018; border:1px solid var(--stroke); color:#b7c7ef; padding:16px; border-radius:12px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; max-height:390px; font-size:10px; line-height:1.55; }
.toast { opacity:0; pointer-events:none; position:fixed; z-index:10; right:22px; bottom:22px; max-width:min(420px,calc(100% - 40px)); border:1px solid var(--stroke-bright); background:#1d2633; padding:13px 16px; border-radius:12px; box-shadow:0 18px 50px rgba(0,0,0,.35); font-size:12px; line-height:1.5; transform:translateY(8px); transition:opacity .2s ease,transform .2s ease; }
.toast.show { opacity:1; transform:translateY(0); }
.toast.error { border-color:rgba(255,139,139,.3); color:#ffc0c0; }
.main-footer { display:flex; justify-content:space-between; gap:12px; color:#5e6b7c; font-size:9px; padding:26px 1px 4px; }
code { color:#c3ceff; }
@media (max-width:1100px) {
  .app-shell { grid-template-columns:218px minmax(0,1fr); }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .content-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:760px) {
  .app-shell { display:block; }
  .sidebar { position:relative; height:auto; padding:14px 16px 10px; border-right:0; border-bottom:1px solid var(--stroke); }
  .brand { padding:0 3px 13px; }
  .workspace-label,.select-label,.guild-select,.sidebar-bottom { display:none; }
  .nav-list { display:flex; overflow-x:auto; margin-top:8px; gap:5px; padding-bottom:4px; }
  .nav-item { white-space:nowrap; padding:9px 11px; flex-shrink:0; }
  .nav-item .nav-icon { width:auto; }
  .main-area { padding:0 14px 18px; }
  .topbar { height:56px; margin-bottom:25px; }
  .top-actions .tiny { display:none; }
  .page-heading { flex-direction:column; gap:14px; }
  .page-heading h1 { font-size:28px; }
  .status-pill { align-self:flex-start; }
  .stats-grid { gap:9px; }
  .stat-card { padding:13px; }
  .stat-number { font-size:27px; margin:16px 0 7px; }
  .panel { padding:15px; border-radius:14px; }
  .security-grid,.settings-grid,.form-grid { grid-template-columns:minmax(0,1fr); }
  .toolbar { align-items:stretch; flex-direction:column; }
  #warning-search { max-width:none; }
  .form-actions { align-items:stretch; flex-direction:column; }
  .form-actions .button { width:100%; }
  .main-footer { flex-direction:column; line-height:1.6; }
  .login-card { padding:34px 22px 27px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important; } }
