@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Sora:wght@600;700;800&display=swap");

/* ─── TOKENS ──────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* surfaces — Discord palette */
  --bg:          #1e1f22;
  --bg2:         #2b2d31;
  --bg3:         #313338;
  --bg4:         #383a40;
  --float:       #111214;

  /* text */
  --text:        #dbdee1;
  --text2:       #80848e;
  --text3:       #4e5058;

  /* brand */
  --accent:      #5865f2;
  --accent-h:    #4752c4;
  --accent-dim:  rgba(88,101,242,0.16);
  --accent-glow: rgba(88,101,242,0.32);

  /* status */
  --ok:          #23a55a;
  --ok-dim:      rgba(35,165,90,0.15);
  --warn:        #f0b232;
  --warn-dim:    rgba(240,178,50,0.15);
  --danger:      #f23f43;
  --danger-dim:  rgba(242,63,67,0.15);

  /* layout */
  --nav-h:       48px;
  --sidebar-w:   240px;
  --radius-s:    4px;
  --radius:      8px;
  --radius-l:    12px;
  --border:      rgba(255,255,255,0.06);
  --border2:     rgba(255,255,255,0.1);

  --font: "Figtree", "Segoe UI", sans-serif;
  --font-display: "Sora", "Figtree", sans-serif;
}

/* ─── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

[hidden] { display: none !important; }

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

a { color: var(--accent); text-decoration: none; }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-s);
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s, box-shadow 0.12s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-h); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
}
.btn-ghost:hover { background: var(--bg4); color: var(--text); }

.btn-discord {
  background: var(--accent);
  color: #fff;
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
}
.btn-discord:hover { background: var(--accent-h); }
.btn-discord.disabled { opacity: 0.4; pointer-events: none; }

.btn-sm { padding: 5px 12px; font-size: 13px; }

.btn-lg { padding: 12px 22px; font-size: 15px; font-weight: 600; border-radius: var(--radius); }

.nav-text {
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
}
.nav-text:hover { color: var(--text); }

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(242,63,67,0.3);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

/* ─── TOP NAV ─────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--float);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg3);
}

.nav-links { display: flex; gap: 6px; align-items: center; }

/* ─── VIEW SWITCHING (login vs dashboard) ─────────────────── */
body.is-authed #loginView  { display: none !important; }
body.is-authed #dashboardView { display: flex !important; }
body:not(.is-authed) #loginView  { display: grid !important; }
body:not(.is-authed) #dashboardView { display: none !important; }

/* ─── SPLIT LOGIN PAGE ────────────────────────────────────── */
.login-page {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 10;
  min-height: unset;
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-left  { display: none; }
}

.login-left {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(88, 101, 242, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(35, 165, 90, 0.08), transparent 50%),
    linear-gradient(165deg, #1a1b1e 0%, var(--bg2) 45%, #25272c 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
  overflow: hidden;
}

.login-left-inner {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.login-left-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-left-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.25);
}

.login-left-brand strong {
  font-family: "Sora", var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.login-left h1 {
  font-family: "Sora", var(--font);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: 16px;
  color: var(--text);
}

.login-lead {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 32px;
}

.login-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.login-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: #a5b0ff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.login-steps strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.login-steps span {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.login-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-pill-row span {
  font-size: 12px;
  color: var(--text2);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.login-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(88, 101, 242, 0.12), transparent 55%),
    var(--bg3);
  padding: 48px 40px;
}

.login-card {
  position: relative;
  width: min(380px, 100%);
  text-align: center;
  padding: 36px 32px;
  background: rgba(30, 31, 34, 0.72);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.login-card-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 120px;
  background: radial-gradient(ellipse, rgba(88, 101, 242, 0.22), transparent 70%);
  pointer-events: none;
}

.login-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
  background: var(--bg4);
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.2);
}

.login-card h2 {
  position: relative;
  font-family: "Sora", var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-card > p {
  position: relative;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.login-card > p strong { color: var(--text); }

.btn-discord-lg {
  position: relative;
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  font-size: 15px;
}

.login-fineprint {
  position: relative;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.55;
  margin: 18px 0 0;
}

.login-fineprint strong { color: var(--text2); }

.login-card .hint {
  position: relative;
  font-size: 12px;
  color: var(--text2);
  margin-top: 14px;
  line-height: 1.5;
}
.login-card .hint.err { color: var(--danger); }

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
  flex-shrink: 0;
}

.feature-item span {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.feature-item strong { color: var(--text); }

/* ─── DASHBOARD SHELL ─────────────────────────────────────── */
.dash {
  display: flex;
  margin-top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.sidebar-section-label {
  padding: 16px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.guild-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.guild-list::-webkit-scrollbar { width: 3px; }
.guild-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.guild-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: var(--radius-s);
  background: transparent;
  border: none;
  color: var(--text2);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  transition: background 0.1s, color 0.1s;
}

.guild-item:hover {
  background: var(--bg4);
  color: var(--text);
}

.guild-item.active {
  background: var(--accent-dim);
  color: var(--text);
}

.guild-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: border-radius 0.2s;
}

.guild-item.active img,
.guild-item:hover img {
  border-radius: var(--radius-s);
}

.guild-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  transition: border-radius 0.2s;
}

.guild-item.active .guild-item-icon,
.guild-item:hover .guild-item-icon {
  border-radius: var(--radius-s);
}

.guild-item-info { min-width: 0; }

.guild-item strong {
  display: block;
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-item span {
  font-size: 11px;
  color: var(--text3);
}

.guild-item.active span { color: rgba(88,101,242,0.7); }

.sidebar-footer {
  padding: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--float);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-footer-info { min-width: 0; flex: 1; }

.sidebar-footer strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.sidebar-footer span {
  font-size: 11px;
  color: var(--text2);
}

/* ─── MAIN PANEL ──────────────────────────────────────────── */
.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg3);
  overflow: hidden;
}

.panel-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--text3);
  font-size: 13px;
}

/* ─── PANEL HEADER ────────────────────────────────────────── */
.panel-header {
  padding: 16px 20px 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-guild-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.panel-guild-initial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  display: grid;
  place-items: center;
}

.panel-guild-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1px;
}

.panel-guild-meta {
  font-size: 12px;
  color: var(--text2);
  font-family: ui-monospace, monospace;
}

/* ─── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
}

.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.12s;
  white-space: nowrap;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ─── TAB BODY ────────────────────────────────────────────── */
.tab-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.tab-body::-webkit-scrollbar { width: 3px; }
.tab-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ─── SECTION ─────────────────────────────────────────────── */
.section-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}

/* ─── STATUS BADGES ───────────────────────────────────────── */
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-tier  { background: var(--accent-dim); color: #8891f7; }
.badge-ok    { background: var(--ok-dim);     color: #3ba55d; }
.badge-warn  { background: var(--warn-dim);   color: var(--warn); }
.badge-muted { background: var(--bg4);        color: var(--text2); }

/* ─── METERS ──────────────────────────────────────────────── */
.meters { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }

.meter-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.meter-label { color: var(--text2); }
.meter-value { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.meter-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--bg4);
  overflow: hidden;
}

.meter-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.5s ease;
}

/* ─── INFO GRID ───────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.info-cell {
  background: var(--bg2);
  padding: 12px 14px;
}

.info-label { font-size: 11px; color: var(--text2); margin-bottom: 4px; }
.info-value { font-size: 14px; font-weight: 600; color: var(--text); }

/* ─── ACTION ROW ──────────────────────────────────────────── */
.action-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── SETTINGS FORM ───────────────────────────────────────── */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 480px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.form-row:last-child { border-bottom: none; }

.form-row-label { font-size: 13px; font-weight: 500; color: var(--text); }
.form-row-sub   { font-size: 12px; color: var(--text2); margin-top: 2px; }

.form-select {
  min-width: 180px;
  padding: 7px 30px 7px 10px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border2);
  background: var(--bg3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2380848e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  appearance: none;
  outline: none;
  cursor: pointer;
}

.form-select:focus { border-color: var(--accent); }

.toggle {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg4);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border2);
}

.toggle input:checked + .toggle-track {
  background: var(--accent);
  border-color: transparent;
}

.toggle-track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.toggle input:checked + .toggle-track::after { left: 19px; }

.form-footer {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  border-top: 1px solid var(--border);
  margin-top: -1px;
}

.form-msg { font-size: 12px; }
.form-msg.ok  { color: var(--ok); }
.form-msg.err { color: var(--danger); }

/* ─── MODERATION TABLE ────────────────────────────────────── */
.mod-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mod-legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.mod-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg2);
}

.mod-head,
.mod-row {
  display: grid;
  grid-template-columns: 110px 140px 1.4fr 110px 150px;
  gap: 0;
  align-items: stretch;
}

.mod-head {
  background: var(--float);
  border-bottom: 1px solid var(--border);
}

.mod-head span {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  border-right: 1px solid var(--border);
}
.mod-head span:last-child { border-right: none; }

.mod-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.mod-row:last-child { border-bottom: none; }
.mod-row:hover { background: var(--bg4); }
.mod-row.is-reversed { opacity: 0.55; }

.mod-row > span {
  padding: 11px 12px;
  font-size: 12px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border-right: 1px solid var(--border);
}
.mod-row > span:last-child { border-right: none; }

.mod-reason {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block !important;
  line-height: 1.4;
  padding-top: 12px !important;
}

.mod-rev-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ok);
  background: var(--ok-dim);
  padding: 2px 5px;
  border-radius: 3px;
}

.mod-actions {
  display: flex !important;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.action-chip.warn     { background: var(--warn-dim);   color: var(--warn); }
.action-chip.filter,
.action-chip.ban      { background: var(--danger-dim); color: var(--danger); }
.action-chip.kick,
.action-chip.timeout  { background: rgba(88, 101, 242, 0.14); color: #8891f7; }
.action-chip.reversed { background: var(--ok-dim);     color: var(--ok); }
.action-chip.muted    { background: var(--bg4);        color: var(--text2); }

@media (max-width: 900px) {
  .mod-head { display: none; }
  .mod-head,
  .mod-row {
    grid-template-columns: 1fr;
  }
  .mod-row > span {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .mod-row > span:last-child { border-bottom: none; }
  .mod-actions { justify-content: flex-start !important; }
}

/* ─── HEALTH CHECKS ───────────────────────────────────────── */
.health-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.health-summary {
  font-size: 13px;
  color: var(--text2);
}

.check-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-s);
  background: var(--bg2);
  border: 1px solid transparent;
  transition: border-color 0.1s;
}

.check:hover { border-color: var(--border2); }

.check-indicator {
  width: 3px;
  height: 36px;
  border-radius: 2px;
  flex-shrink: 0;
}

.check.ok   .check-indicator { background: var(--ok); }
.check.warn .check-indicator { background: var(--warn); }
.check.fail .check-indicator { background: var(--danger); }

.check-text { min-width: 0; }
.check-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.check-detail { font-size: 12px; color: var(--text2); line-height: 1.4; }

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text3);
  font-size: 13px;
}

/* ─── MONO ────────────────────────────────────────────────── */
.mono {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 11px;
  color: var(--text2);
}

/* ─── HOMEPAGE ────────────────────────────────────────────── */
.page-home {
  background: var(--float);
}

.lp-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 32px) 24px 48px;
  overflow: hidden;
}

.lp-hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(88, 101, 242, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(35, 165, 90, 0.08), transparent 50%),
    linear-gradient(180deg, #0c0d10 0%, #15161a 45%, #1e1f22 100%);
  pointer-events: none;
}

.lp-hero-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.lp-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 860px) {
  .lp-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .lp-cta { justify-content: center; }
  .lp-hero-visual { order: -1; margin: 0 auto; }
  .lp-lead { margin-left: auto; margin-right: auto; }
}

.lp-brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 18px;
}

.lp-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
  max-width: 16ch;
  margin-bottom: 16px;
}

@media (max-width: 860px) {
  .lp-hero h1 { max-width: none; margin-left: auto; margin-right: auto; }
}

.lp-lead {
  font-size: 1.05rem;
  color: var(--text2);
  line-height: 1.65;
  max-width: 38ch;
  margin-bottom: 28px;
}

.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lp-hero-visual {
  position: relative;
  width: min(360px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.lp-avatar-glow {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.45), transparent 70%);
  filter: blur(28px);
  animation: lp-breathe 5s ease-in-out infinite;
}

.lp-avatar {
  position: relative;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: lp-float 7s ease-in-out infinite;
}

.lp-hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.lp-hero-scroll span {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--text3));
  animation: lp-scroll 2.2s ease-in-out infinite;
}

@keyframes lp-breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@keyframes lp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes lp-scroll {
  0% { opacity: 0; transform: scaleY(0.4); transform-origin: top; }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scaleY(1); transform-origin: top; }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0ms);
}

body.is-ready .reveal {
  opacity: 1;
  transform: none;
}

.lp-section {
  padding: 88px 24px;
  border-top: 1px solid var(--border);
}

.lp-alt {
  background: var(--bg);
}

.lp-wrap {
  width: min(920px, 100%);
  margin: 0 auto;
}

.lp-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.lp-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.lp-section p {
  font-size: 1.02rem;
  color: var(--text2);
  line-height: 1.7;
}

.lp-narrow { max-width: 54ch; }

.lp-intro h2 { max-width: 18ch; }
.lp-intro p { max-width: 52ch; font-size: 1.1rem; }

.lp-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.lp-split.reverse { direction: rtl; }
.lp-split.reverse > * { direction: ltr; }

@media (max-width: 760px) {
  .lp-split,
  .lp-split.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

.lp-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
}

.lp-points li {
  position: relative;
  padding-left: 18px;
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.5;
}

.lp-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.lp-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}

@media (max-width: 900px) {
  .lp-plans { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .lp-plans { grid-template-columns: 1fr; }
}

.lp-plan {
  padding: 22px 20px;
  border-top: 2px solid var(--accent);
}

.lp-plan-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}

.lp-plan-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.lp-plan-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text2);
}

.lp-plan p {
  font-size: 0.92rem;
  color: var(--text2);
}

.lp-footnote {
  margin-top: 20px;
  font-size: 0.88rem !important;
  color: var(--text3) !important;
}

.lp-proof {
  padding: 56px 24px;
  background: var(--bg2);
}

.lp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.lp-stats .num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lp-stats .label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lp-final {
  background:
    radial-gradient(ellipse 70% 80% at 50% 120%, rgba(88, 101, 242, 0.2), transparent 55%),
    var(--float);
  text-align: center;
}

.lp-final-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lp-final h2 {
  max-width: 16ch;
}

.lp-final p {
  max-width: 36ch;
  margin-bottom: 8px;
}

.lp-final .lp-cta {
  margin-top: 24px;
  justify-content: center;
}

.lp-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
  background: var(--float);
}

.lp-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lp-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.lp-footer-links a {
  color: var(--text2);
  font-size: 13px;
}

.lp-footer-links a:hover { color: var(--text); }

.lp-footer-note {
  font-size: 12px;
  color: var(--text3);
}

/* ─── DOCS ────────────────────────────────────────────────── */
.page-docs {
  background: var(--bg);
}

.docs-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 24px) 24px 80px;
  align-items: start;
}

@media (max-width: 800px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-nav {
    position: static !important;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }
  .docs-nav-title { width: 100%; }
}

.docs-nav {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 16px;
}

.docs-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}

.docs-nav a {
  color: var(--text2);
  font-size: 13px;
  padding: 6px 8px;
  border-radius: var(--radius-s);
}

.docs-nav a:hover {
  color: var(--text);
  background: var(--bg3);
}

.docs-main {
  padding-left: 28px;
  border-left: 1px solid var(--border);
}

@media (max-width: 800px) {
  .docs-main { padding-left: 0; border-left: none; }
}

.docs-hero {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.docs-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.docs-hero p {
  color: var(--text2);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 52ch;
}

.docs-section {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.docs-section h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.docs-section p,
.docs-section li {
  color: var(--text2);
  line-height: 1.7;
  font-size: 0.98rem;
}

.docs-section p + p,
.docs-section p + ul,
.docs-section ul + p {
  margin-top: 12px;
}

.docs-section ul {
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-section code,
.docs-table code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text);
}

.docs-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: step;
}

.docs-steps li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.docs-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.docs-steps .docs-step-body {
  flex: 1;
  min-width: 0;
}

.docs-steps strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.docs-steps span {
  display: block;
  color: var(--text2);
  font-size: 0.95rem;
  line-height: 1.6;
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.docs-table th,
.docs-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.docs-table th {
  color: var(--text3);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-table td { color: var(--text2); }
.docs-table td:first-child { color: var(--text); }

.docs-faq {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.docs-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

.docs-faq summary::-webkit-details-marker { display: none; }

.docs-faq summary::after {
  content: "+";
  float: right;
  color: var(--text3);
  font-weight: 500;
}

.docs-faq[open] summary::after { content: "–"; }

.docs-faq p {
  margin-top: 10px;
  padding-right: 24px;
}

.docs-end {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* legacy home leftovers (unused) */
.home {
  max-width: 880px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 64px) 24px 80px;
}

.feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.feature p  { font-size: 13px; color: var(--text2); line-height: 1.55; }

.site-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer span { font-size: 12px; color: var(--text3); }

.ticket-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 20px;
  padding: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ticket-compose-lg {
  padding: 18px;
  border-color: rgba(88, 101, 242, 0.28);
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.08), var(--bg2));
}

.ticket-compose input,
.ticket-compose textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 14px;
  resize: vertical;
}

.tickets-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: 12px;
  border: 1px solid rgba(88, 101, 242, 0.28);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(88, 101, 242, 0.18), transparent 55%),
    var(--bg2);
}

.tickets-hero h3 {
  font-family: "Sora", var(--font);
  font-size: 18px;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.tickets-hero p {
  margin: 0;
  max-width: 520px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
}

.tickets-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--bg2);
}

.tickets-empty p { margin: 0 0 6px; }

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ticket-card:hover {
  border-color: rgba(88, 101, 242, 0.4);
  background: var(--bg3);
}

.ticket-card-main {
  flex: 1;
  text-align: left;
  padding: 14px 16px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
}

.ticket-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ticket-card-title {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.ticket-card-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-left: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

@media (max-width: 640px) {
  .tickets-hero { flex-direction: column; }
  .ticket-card { flex-direction: column; }
  .ticket-card-actions {
    flex-direction: row;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.ticket-row:hover { background: var(--bg3); }

.ticket-meta {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
}

.ticket-date {
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
}

.ticket-thread-bar {
  justify-content: flex-start;
}

.ticket-thread-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket-id-pill {
  font-size: 12px;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.ticket-thread-title {
  font-family: "Sora", var(--font);
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 4px 0 8px;
}

.ticket-ph-icon {
  color: #a5b0ff;
}

.ticket-nav-icon {
  display: grid;
  place-items: center;
  color: #a5b0ff;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.ticket-bubble {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
}

.ticket-bubble.staff {
  border-color: rgba(88, 101, 242, 0.35);
  background: var(--accent-dim);
}

.ticket-bubble.system {
  border-color: rgba(35, 165, 90, 0.35);
  background: var(--ok-dim);
}

.ticket-bubble.user {
  border-color: var(--border2);
}

.ticket-bubble-meta {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticket-bubble-body {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 14px;
}

.tickets-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.sidebar-ticket-btn {
  border: 1px solid rgba(88, 101, 242, 0.25) !important;
  margin-top: 2px;
}

.sidebar-ticket-btn.active {
  background: var(--accent-dim) !important;
  border-color: rgba(88, 101, 242, 0.45) !important;
}

.active-filter {
  border-color: var(--accent) !important;
  color: var(--text) !important;
}

/* ─── TOKEN PACKS ─────────────────────────────────────────── */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

@media (max-width: 900px) {
  .pack-grid { grid-template-columns: 1fr; }
}

.pack-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pack-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}

.pack-amount {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.pack-price {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
}

/* ─── EMBEDDED CHECKOUT (Discord-style modal) ─────────────── */
.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.checkout-overlay[hidden] {
  display: none !important;
}

.checkout-modal {
  width: min(520px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  padding: 20px 20px 16px;
}

.checkout-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.checkout-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.checkout-modal-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.checkout-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
}

.checkout-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: var(--bg4);
  color: var(--text2);
  cursor: pointer;
}

.checkout-close:hover {
  background: var(--bg3);
  color: var(--text);
}

.checkout-mount {
  min-height: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  overflow: hidden;
}

.checkout-mount:empty::before {
  content: "Loading checkout…";
  display: block;
  padding: 48px 16px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}

/* ─── CHAT ────────────────────────────────────────────────── */
.chat-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 220px);
}

.chat-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-thread {
  flex: 1;
  min-height: 320px;
  max-height: 52vh;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  margin: auto;
  color: var(--text3);
  font-size: 13px;
  text-align: center;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg4);
  border: 1px solid var(--border);
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent-dim);
  border-color: rgba(88,101,242,0.28);
}

.chat-bubble.assistant {
  align-self: flex-start;
}

.chat-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 4px;
}

.chat-bubble.user .chat-meta { color: #8891f7; }
.chat-bubble.assistant .chat-meta { color: var(--accent); }

.chat-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.chat-compose {
  display: flex;
  gap: 8px;
}

.chat-compose input {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border2);
  background: var(--bg2);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
}

.chat-compose input:focus { border-color: var(--accent); }

/* ─── SUCCESS / CANCEL ────────────────────────────────────── */
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.result-card {
  width: min(440px, 100%);
  text-align: center;
  animation: rise 0.4s ease;
}

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

.icon-ring {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok-dim);
  border: 1px solid rgba(35,165,90,0.3);
}

.icon-ring.warn {
  background: var(--warn-dim);
  border-color: rgba(240,178,50,0.3);
}

.result-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.result-card p  { color: var(--text2); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }

/* ─── CONFETTI ────────────────────────────────────────────── */
.confetti { pointer-events: none; position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.confetti span { position: absolute; width: 7px; height: 12px; top: -20px; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.content-wrap { position: relative; z-index: 1; }
