/* Atlas base + app styles (dashboard, account, picker). Marketing extras live in site.css. */
:root {
  --bg-0: #09090b;
  --bg-1: #111114;
  --bg-2: #0c0c0e;
  --bg-3: #1c1c21;
  --bg-4: #27272d;
  --bg-input: #0a0a0c;
  --bg-hover: rgba(255, 255, 255, 0.045);
  --bg-active: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #d9d9de;
  --text-strong: #fafafa;
  --muted: #a1a1aa;
  --faint: #8a8a93;
  --dim: #5d5d66;
  --accent: #4f7cff;
  --accent-hover: #3f6cf0;
  --accent-text: #8aa8ff;
  --accent-soft: rgba(79, 124, 255, 0.12);
  --green: #22a559;
  --green-hover: #1b8c4b;
  --red: #e5484d;
  --red-hover: #c93a3f;
  --yellow: #f0b232;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --radius: 12px;
  --radius-sm: 8px;
  --t: 120ms ease;
  --font: Inter, "Inter Variable", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg-0); color: var(--text);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--text-strong); }
img { max-width: 100%; }
h1, h2, h3, h4 { color: var(--text-strong); margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -0.015em; }
p { margin: 0; }
code, kbd { font-family: var(--mono); font-size: 0.86em; background: var(--bg-3); padding: 2px 6px; border-radius: 5px; color: var(--text-strong); border: 1px solid var(--line-soft); }
.muted { color: var(--faint); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.ico { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgba(79, 124, 255, 0.35); }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { color: var(--text-strong); }
.logo { display: block; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font: 550 14px/1 var(--font); color: #fff; background: var(--bg-4); letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color var(--t), color var(--t), border-color var(--t), opacity var(--t);
}
.btn:hover { color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-3); color: var(--text-strong); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-4); color: var(--text-strong); border-color: var(--line-strong); }
.btn-success { background: var(--green); }
.btn-success:hover:not(:disabled) { background: var(--green-hover); }
.btn-danger { background: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-hover); }
.btn-discord { background: var(--discord); }
.btn-discord:hover:not(:disabled) { background: var(--discord-hover); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-strong); }
.btn-link { background: transparent; color: var(--text-strong); font-weight: 500; padding: 0 12px; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-md { height: 38px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.loading { pointer-events: none; color: transparent; position: relative; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 0; background: transparent; color: var(--faint); cursor: pointer; transition: background-color var(--t), color var(--t);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-strong); }
.icon-btn.danger:hover { color: var(--red); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 550; background: var(--bg-3); color: var(--muted); white-space: nowrap; border: 1px solid var(--line-soft);
}
.badge-demo { background: rgba(240, 178, 50, 0.1); color: #f5c55a; border-color: rgba(240, 178, 50, 0.22); }
.badge-on { background: rgba(34, 165, 89, 0.12); color: #4ccf83; border-color: rgba(34, 165, 89, 0.25); }
.badge-off { color: var(--faint); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); border-color: rgba(79, 124, 255, 0.25); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.dot-on { background: var(--green); }
.dot-off { background: var(--dim); }

.card { background: var(--bg-1); border-radius: var(--radius); border: 1px solid var(--line-soft); }

.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3); object-fit: cover; flex: none; }
.avatar-text { display: inline-grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }

/* ---------- user menu ---------- */
.usermenu { position: relative; }
.userchip {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px; border-radius: 999px;
  background: transparent; border: 1px solid transparent; color: var(--text); cursor: pointer; font: 500 14px var(--font); transition: background-color var(--t), border-color var(--t);
}
.userchip:hover, .usermenu.open .userchip { background: var(--bg-hover); border-color: var(--line-soft); }
.userchip .ico { color: var(--faint); }
.userchip-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; background: #141417;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); display: none; z-index: 80;
}
.usermenu.open .menu { display: block; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; display: flex; flex-direction: column; min-width: 0; }
.menu-head b { color: var(--text-strong); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.menu-head span { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; font-weight: 500; }
.menu a:hover { background: var(--bg-active); color: var(--text-strong); }
.menu a.danger { color: #f07c80; }
.menu a.danger:hover { background: rgba(229, 72, 77, 0.14); color: #ff9a9d; }

/* ---------- app header (picker, account) ---------- */
.app-header { position: sticky; top: 0; z-index: 30; background: rgba(9, 9, 11, 0.96); border-bottom: 1px solid var(--line-soft); }
.app-header-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.app-nav { display: flex; gap: 2px; }
.app-nav a { color: var(--faint); font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: var(--radius-sm); transition: color var(--t), background-color var(--t); }
.app-nav a:hover { color: var(--text-strong); background: var(--bg-hover); }
.app-nav a.active { color: var(--text-strong); background: var(--bg-active); }
.app-header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- pages ---------- */
.page { padding-top: 48px; padding-bottom: 72px; }
.page-narrow { max-width: 820px; }
.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: 32px; letter-spacing: -0.03em; margin-bottom: 8px; font-weight: 680; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.center-page { min-height: calc(100vh - 64px - 260px); display: grid; place-items: center; padding: 48px 16px; }

.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; border: 1px solid; }
.flash .ico { margin-top: 2px; }
.flash-ok { background: rgba(34, 165, 89, 0.08); border-color: rgba(34, 165, 89, 0.28); color: #a6e9c2; }
.flash-ok .ico { color: #4ccf83; }
.flash-err { background: rgba(229, 72, 77, 0.08); border-color: rgba(229, 72, 77, 0.3); color: #ffc0c2; }
.flash-err .ico { color: #ff7b80; }

.empty { text-align: center; color: var(--faint); padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty > .ico { color: var(--dim); margin-bottom: 6px; }
.empty h3 { font-size: 16px; }
.empty p { max-width: 400px; font-size: 14px; }
.empty .btn { margin-top: 10px; }
.empty-lg { padding: 64px 20px; }
.empty-lg h1 { font-size: 28px; letter-spacing: -0.03em; }
.empty-code { font-size: 64px; font-weight: 750; color: var(--bg-4); line-height: 1; letter-spacing: -0.04em; }

/* server picker */
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.server-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: var(--radius); transition: border-color var(--t); }
.server-card:hover { border-color: var(--line-strong); }
.server-card-off .gicon { opacity: 0.55; }
.server-card-body { flex: 1; min-width: 0; }
.server-card-name { font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-card-role { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; }
.server-card-role .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }

.gicon { display: grid; place-items: center; border-radius: 12px; background: var(--bg-3); color: var(--text-strong); font-weight: 650; object-fit: cover; flex: none; overflow: hidden; }
.gicon-sm { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.gicon-md { width: 46px; height: 46px; font-size: 16px; }
.gicon-lg { width: 64px; height: 64px; font-size: 20px; }
.gicon-text { background: var(--bg-4); color: var(--text-strong); }

/* connect Discord step */
.connect-card { padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.connect-card h1 { font-size: 24px; letter-spacing: -0.025em; }
.connect-ic { width: 52px; height: 52px; border-radius: 12px; background: rgba(88, 101, 242, 0.14); color: #8c95ff; display: grid; place-items: center; border: 1px solid rgba(88, 101, 242, 0.3); }
.csteps { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 0; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.cstep { display: flex; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.cstep:first-child { border-top: 0; }
.cstep b { color: var(--text-strong); font-weight: 600; font-size: 14px; }
.cstep p { color: var(--faint); font-size: 13px; }
.cstep-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 650; flex: none; border: 1px solid var(--line); color: var(--faint); }
.cstep-done .cstep-n { background: var(--green); border-color: var(--green); color: #fff; }
.cstep-now { background: var(--bg-hover); }
.cstep-now .cstep-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.cstep-next { opacity: 0.6; }

/* account */
.acc-sec { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line-soft); }
.acc-sec:first-of-type { border-top: 0; padding-top: 0; }
.acc-sec-head h2 { font-size: 16px; margin-bottom: 4px; }
.acc-sec-head p { color: var(--faint); font-size: 14px; }
.acc-sec-body { padding: 4px 20px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.acc-row + .acc-form, .acc-row + .acc-row { border-top: 1px solid var(--line-soft); }
.acc-row > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.acc-row b { color: var(--text-strong); font-weight: 600; font-size: 14px; }
.acc-row span { color: var(--faint); font-size: 13px; }
.acc-discord { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; }
.acc-discord > div { display: flex; flex-direction: column; min-width: 0; }
.acc-dc-ic { width: 40px; height: 40px; border-radius: 50%; display: grid !important; place-items: center; background: var(--bg-3); color: var(--faint) !important; flex: none; }
.acc-note { padding: 0 0 14px; }
.acc-form { display: flex; flex-direction: column; gap: 14px; padding: 18px 0; }
.acc-form h3 { font-size: 14px; }
.acc-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.acc-danger .acc-sec-head h2 { color: #ff8f93; }
.acc-danger .acc-sec-body { border-color: rgba(229, 72, 77, 0.25); }
.fgroup { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lbl { font-size: 13px; font-weight: 550; color: var(--muted); }
.lbl-hint { font-size: 12px; color: var(--dim); }
.pw { position: relative; }
.pw .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--faint); font: 500 12px var(--font); cursor: pointer; }
.pw-toggle:hover { background: var(--bg-hover); color: var(--text-strong); }

/* ---------- dashboard shell ---------- */
body.app { background: var(--bg-2); }
.dash { display: flex; min-height: 100vh; }
.dash-side { width: 264px; flex: none; background: var(--bg-0); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.side-guild { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 14px; border-bottom: 1px solid var(--line-soft); color: var(--text-strong); font-weight: 650; flex: none; transition: background-color var(--t); }
.side-guild:hover { background: var(--bg-hover); color: var(--text-strong); }
.side-guild-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.side-guild > .ico { color: var(--faint); }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 8px 16px; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.side-group { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); padding: 18px 10px 6px; }
.side-item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px 0 10px; border-radius: var(--radius-sm); color: var(--faint); font-weight: 500; font-size: 14px; transition: background-color var(--t), color var(--t); margin-bottom: 1px; }
.side-item:hover { background: var(--bg-hover); color: var(--text); }
.side-item.active { background: var(--bg-active); color: var(--text-strong); }
.side-item .side-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item.off .side-label { color: var(--dim); }
.side-item.active.off .side-label { color: var(--muted); }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-soft); flex: none; min-height: 54px; }
.side-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 650; font-size: 14px; }
.side-brand .logo { border-radius: 5px; }
.side-foot-link { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); color: var(--faint); margin-left: auto; }
.side-foot-link:hover { color: var(--text-strong); background: var(--bg-hover); }

.dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-top { position: sticky; top: 0; z-index: 20; height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 20px 0 32px; background: rgba(12, 12, 14, 0.96); border-bottom: 1px solid var(--line-soft); }
.side-toggle { display: none; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 14px; min-width: 0; }
.crumbs a { color: var(--faint); }
.crumbs a:hover { color: var(--text-strong); }
.crumbs .ico { color: var(--dim); }
.crumbs b { color: var(--text-strong); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.dash-content { flex: 1; padding: 36px 40px 140px; max-width: 920px; width: 100%; outline: none; }
.scrim { display: none; }

.mod-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px; }
.mod-head-ic { width: 44px; height: 44px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; border: 1px solid rgba(79, 124, 255, 0.2); }
.mod-head-text { flex: 1; min-width: 0; }
.mod-head h1 { font-size: 24px; margin-bottom: 4px; letter-spacing: -0.025em; }
.mod-head p { color: var(--faint); font-size: 14px; }
.mod-guide { display: inline-block; margin-top: 6px; color: var(--accent-text); font-size: 13px; font-weight: 550; }
.mod-guide:hover { text-decoration: underline; }
.mod-head-toggle { display: flex; align-items: center; gap: 10px; padding-top: 6px; color: var(--muted); font-size: 14px; font-weight: 500; }

.notice { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--radius); background: rgba(240, 178, 50, 0.06); border: 1px solid rgba(240, 178, 50, 0.2); margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.notice .ico { color: var(--yellow); }
.notice.info { background: var(--accent-soft); border-color: rgba(79, 124, 255, 0.22); }
.notice.info .ico { color: var(--accent-text); }
.notice .btn { margin-left: auto; }

.section-title { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin: 32px 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title:first-child { margin-top: 0; }
.section-title .btn { text-transform: none; letter-spacing: 0; }

.fields { background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px 20px; }
.field { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.field:first-child { border-top: 0; }
.field-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-strong); margin-bottom: 4px; }
.field-hint { font-size: 13px; color: var(--faint); margin-bottom: 10px; }
.field-label + .field-ctl { margin-top: 8px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.field-row .field-label { margin: 0; }
.field-row .field-hint { margin: 2px 0 0; }
.field.error .input, .field.error .picker-btn, .field.error .chips-box { box-shadow: inset 0 0 0 1px var(--red); }
.field-error { color: #ff8f93; font-size: 13px; margin-top: 8px; display: flex; align-items: center; gap: 6px; }

.input, .textarea {
  width: 100%; background: var(--bg-input); border: 0; border-radius: var(--radius-sm); color: var(--text-strong);
  font: 14px/1.45 var(--font); padding: 10px 12px; outline: none; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t);
}
.input:hover, .textarea:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.input:focus, .textarea:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgba(79, 124, 255, 0.18); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.textarea { resize: vertical; min-height: 92px; }
.input-num { max-width: 160px; }
.num-wrap { display: flex; align-items: center; gap: 12px; }
.num-range { color: var(--dim); font-size: 13px; }
.counter { font-size: 12px; color: var(--dim); text-align: right; margin-top: 4px; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ph-chip { font: 550 12px var(--mono); padding: 3px 8px; border-radius: 5px; background: var(--bg-3); color: var(--muted); border: 1px solid var(--line-soft); cursor: pointer; transition: background-color var(--t), color var(--t); }
.ph-chip:hover { background: var(--accent-soft); color: var(--accent-text); border-color: rgba(79, 124, 255, 0.3); }

.color-wrap { display: flex; align-items: center; gap: 10px; }
.color-swatch { position: relative; width: 40px; height: 40px; border-radius: var(--radius-sm); overflow: hidden; flex: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.color-swatch input { position: absolute; inset: -8px; width: 56px; height: 56px; border: 0; padding: 0; cursor: pointer; opacity: 0; }
.color-wrap .input { max-width: 130px; font-family: var(--mono); }

/* switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; border-radius: 999px; background: #3a3a42; cursor: pointer; flex: none; transition: background-color var(--t); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); }
.switch.busy { opacity: 0.6; pointer-events: none; }
.switch-sm { width: 30px; height: 18px; }
.switch-sm::after { width: 12px; height: 12px; }
.switch-sm.on::after { transform: translateX(12px); }

/* picker (dropdown) */
.picker { position: relative; }
.picker-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 12px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 0; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-strong); font: 14px var(--font); cursor: pointer; text-align: left; transition: box-shadow var(--t);
}
.picker-btn:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.picker-btn:focus-visible, .picker.open .picker-btn { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgba(79, 124, 255, 0.18); outline: none; }
.picker-btn .ph { color: var(--dim); }
.picker-btn .val { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-btn .val .ico { color: var(--faint); }
.picker-btn > .ico:last-child { color: var(--faint); margin-left: auto; transition: transform var(--t); }
.picker.open .picker-btn > .ico:last-child { transform: rotate(180deg); }
.picker-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #141417; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); z-index: 60; display: none; overflow: hidden; }
.picker.open .picker-pop { display: block; }
.picker.up .picker-pop { top: auto; bottom: calc(100% + 6px); }
.picker-search { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); color: var(--faint); }
.picker-search input { flex: 1; border: 0; background: transparent; color: var(--text-strong); font: 14px var(--font); outline: none; min-width: 0; }
.picker-list { max-height: 280px; overflow-y: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.picker-opt { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 5px; color: var(--muted); font-size: 14px; cursor: pointer; }
.picker-opt .ico { color: var(--faint); }
.picker-opt.cur { background: var(--bg-active); color: var(--text-strong); }
.picker-opt.sel { color: var(--text-strong); }
.picker-opt.sel::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.picker-opt.none { color: var(--faint); font-style: italic; }
.picker-cat { padding: 10px 8px 4px; font-size: 11px; font-weight: 650; text-transform: uppercase; color: var(--dim); letter-spacing: 0.05em; }
.picker-empty { padding: 14px; text-align: center; color: var(--dim); font-size: 14px; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #99aab5; }

/* chips */
.chips-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; min-height: 42px; background: var(--bg-input); border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: 5px; background: var(--bg-3); border: 1px solid var(--line-soft); color: var(--text-strong); font-size: 13px; max-width: 100%; }
.chip-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .ico { color: var(--faint); }
.chip-x { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; border: 0; background: transparent; color: var(--faint); cursor: pointer; padding: 0; }
.chip-x:hover { color: var(--text-strong); background: var(--bg-4); }
.chips-box .picker { flex: 1; min-width: 150px; position: static; }
.chips-box .picker-btn { min-height: 28px; height: 28px; padding: 0 6px; background: transparent; color: var(--faint); font-size: 13px; box-shadow: none !important; }
.chips-box .picker-btn:hover { color: var(--text-strong); }
.chip-input { flex: 1; min-width: 150px; border: 0; background: transparent; color: var(--text-strong); font: 14px var(--font); outline: none; height: 28px; padding: 0 6px; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-input); box-shadow: inset 0 0 0 1px var(--line-soft); cursor: pointer; font-size: 14px; color: var(--muted); user-select: none; transition: color var(--t), box-shadow var(--t); position: relative; }
.check:hover { color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--line); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px #5d5d66; display: grid; place-items: center; flex: none; color: transparent; transition: background-color var(--t), box-shadow var(--t); }
.check input:checked + .check-box { background: var(--accent); box-shadow: none; color: #fff; }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check input:checked ~ span { color: var(--text-strong); }
.check-tools { display: flex; gap: 4px; margin-bottom: 8px; }

/* row editors */
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 160px 1fr 34px; gap: 8px; align-items: center; }
.row-empty { padding: 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line); color: var(--dim); font-size: 14px; text-align: center; }
.add-btn { margin-top: 10px; }
.sub-card { background: var(--bg-2); border-radius: var(--radius); margin-bottom: 12px; border: 1px solid var(--line-soft); }
.sub-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; cursor: pointer; user-select: none; }
.sub-head h4 { font-size: 14px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-head .meta { color: var(--faint); font-size: 13px; white-space: nowrap; }
.sub-head .chev { color: var(--faint); transition: transform var(--t); }
.sub-card.collapsed .chev { transform: rotate(-90deg); }
.sub-card.collapsed .sub-body { display: none; }
.sub-body { padding: 4px 16px 16px; border-top: 1px solid var(--line-soft); }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.sub-grid .full { grid-column: 1 / -1; }
.mini-label { display: block; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); margin-bottom: 6px; }
.btn-rows { display: grid; gap: 8px; }
.btn-row { display: grid; grid-template-columns: 1.3fr 1fr 90px 34px; gap: 8px; align-items: center; }
.btn-row-head { font-size: 12px; color: var(--dim); font-weight: 600; }
.preview-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 12px; border-radius: var(--radius-sm); background: #313338; }
.preview-btns span { background: #4e5058; color: #fff; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 4px; }
.preview-btns .lbl { width: 100%; font-size: 12px; color: #949ba4; background: none; padding: 0; }

/* minecraft */
.mc-list { display: grid; gap: 10px; }
.mc-card { background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; }
.mc-ic { width: 44px; height: 44px; border-radius: var(--radius); background: var(--bg-3); color: var(--faint); display: grid; place-items: center; }
.mc-card.online .mc-ic { background: rgba(34, 165, 89, 0.12); color: #4ccf83; }
.mc-name { font-weight: 600; color: var(--text-strong); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--faint); font-size: 13px; margin-top: 3px; }
.mc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.mc-actions { display: flex; gap: 4px; }
.mc-players { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.mc-players span { font-size: 12px; background: var(--bg-3); color: var(--muted); padding: 2px 8px; border-radius: 4px; }
.mc-status-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade 120ms ease; }
.modal { width: 100%; max-width: 520px; background: #121215; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; animation: pop 120ms ease; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6); }
.modal-body { padding: 24px 24px 20px; overflow-y: auto; }
.modal h2 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.02em; }
.modal p { color: var(--muted); font-size: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; background: var(--bg-0); border-top: 1px solid var(--line-soft); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.98); opacity: 0; } }
.key-box { display: flex; gap: 8px; margin: 16px 0 6px; }
.key-box .input { font-family: var(--mono); font-size: 13px; }
.key-warn { color: #f5c55a; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.mini-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.mini-steps li { display: flex; gap: 12px; font-size: 14px; color: var(--muted); }
.mini-steps .step-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 650; font-size: 12px; display: grid; place-items: center; flex: none; }
.mini-steps b { color: var(--text-strong); }
.code-block { font-family: var(--mono); font-size: 12.5px; background: var(--bg-0); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 6px; color: var(--text); white-space: pre; overflow-x: auto; }

/* skeletons */
.skel { background: var(--bg-3); border-radius: var(--radius-sm); position: relative; overflow: hidden; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-title { height: 28px; width: 220px; margin-bottom: 12px; }
.skel-line { height: 14px; width: 60%; margin-bottom: 28px; }
.skel-card { height: 120px; border-radius: var(--radius); margin-bottom: 12px; background: var(--bg-1); }
.skel-mc { height: 76px; border-radius: var(--radius); background: var(--bg-1); }

/* save bar */
.savebar {
  position: fixed; left: calc(264px + 32px); right: 32px; bottom: 20px; max-width: 856px; z-index: 70;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 12px;
  background: #18181c; border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); transform: translateY(150%); opacity: 0; pointer-events: none;
  transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease;
}
.savebar.show { transform: none; opacity: 1; pointer-events: auto; }
.savebar.shake { background: var(--red); border-color: var(--red); animation: shake 0.4s; }
.savebar-text { flex: 1; font-weight: 500; color: var(--text-strong); font-size: 14px; }
.savebar-actions { display: flex; gap: 6px; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 200; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.app .toasts { bottom: 92px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px; background: #18181c; border: 1px solid var(--line); color: var(--text-strong); font-size: 14px; font-weight: 500; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); animation: toastIn 160ms ease; pointer-events: auto; }
.toast .ico { color: #4ccf83; }
.toast.err .ico { color: #ff7b80; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 160ms, transform 160ms; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .dash-side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform 160ms ease; }
  .dash.side-open .dash-side { transform: none; box-shadow: 16px 0 40px rgba(0, 0, 0, 0.5); }
  .dash.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 35; }
  .side-toggle { display: inline-grid; }
  .dash-top { padding: 0 12px; }
  .dash-content { padding: 24px 16px 140px; }
  .savebar { left: 16px; right: 16px; }
  .acc-sec { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .app-header-in { gap: 12px; }
  .app-nav { display: none; }
  .userchip-name { display: none; }
  .page { padding-top: 32px; }
  .page-head h1 { font-size: 26px; }
  .server-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr 34px; }
  .row > :first-child { grid-column: 1 / -1; }
  .sub-grid, .fgrid { grid-template-columns: 1fr; }
  .btn-row { grid-template-columns: 1fr 1fr 34px; }
  .btn-row > :nth-child(3) { grid-column: 1 / 3; }
  .btn-row-head { display: none; }
  .mod-head { flex-wrap: wrap; }
  .mod-head-toggle { width: 100%; padding-top: 0; }
  .mc-card { grid-template-columns: 44px 1fr; }
  .mc-actions { grid-column: 1 / -1; }
  .savebar { flex-wrap: wrap; bottom: 12px; }
  .savebar-actions { margin-left: auto; }
  .fields { padding: 4px 14px; }
  .dash-top .badge, .app-header .badge { display: none; }
  .connect-card { padding: 24px; }
  .acc-row { flex-wrap: wrap; }
  .acc-sec-body { padding: 4px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Dashboard v2: navigation-only sidebar, top bar, overview, section cards
   ===================================================================== */
body.app { font-size: 14px; }
.dash-side { width: 260px; }
.side-top { padding: 10px 10px 6px; flex: none; }
.switcher { position: relative; }
.side-switch { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text-strong); cursor: pointer; text-align: left; font: inherit; transition: background-color var(--t); }
.side-switch:hover, .switcher.open .side-switch { background: var(--bg-hover); }
.side-switch > .ico { color: var(--faint); margin-left: auto; }
.side-switch-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side-switch-text b { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.side-switch-text small { color: var(--faint); font-size: 12px; }
.gicon-xs { width: 22px; height: 22px; font-size: 9px; border-radius: 6px; }
.gicon-xl { width: 76px; height: 76px; font-size: 24px; border-radius: 20px; }
.menu-wide { left: 0; right: auto; min-width: 260px; }
.menu-up { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; min-width: 0; }
.menu-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.menu-scroll { max-height: 300px; overflow-y: auto; }
.menu-sep { height: 1px; background: var(--line-soft); margin: 6px 0; }
.menu a.current { background: var(--bg-active); color: var(--text-strong); }
.menu a.current .ico { color: var(--accent-text); margin-left: auto; }
.menu-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-add { font-size: 11px; color: var(--accent-text); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; }
.menu .logo { border-radius: 4px; box-shadow: none; }

.side-nav { padding: 4px 10px 16px; }
.side-group { padding: 20px 10px 6px; }
.side-item { height: 34px; border-radius: 8px; gap: 11px; }
.side-item .ico { color: var(--dim); transition: color var(--t); }
.side-item:hover .ico { color: var(--muted); }
.side-item.active { background: var(--accent-soft); color: var(--accent-text); }
.side-item.active .ico, .side-item.active .side-label { color: var(--accent-text) !important; }
.side-item.off .side-label { color: var(--faint); }
.side-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--dim); }
.side-dot.on { background: var(--accent); box-shadow: none; }
.side-foot { padding: 8px 10px 10px; min-height: 0; }
.side-user { width: 100%; }
.side-userchip { width: 100%; height: auto; padding: 8px; border-radius: 10px; gap: 10px; }
.side-userchip > .ico { margin-left: auto; transform: rotate(180deg); }
.side-user-text { display: flex; flex-direction: column; min-width: 0; text-align: left; }
.side-user-text b { color: var(--text-strong); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text small { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-userchip .avatar { width: 32px; height: 32px; }

.dash-top { padding: 0 24px; gap: 12px; background: var(--bg-2); }
.crumbs { gap: 8px; }
.crumbs a { font-weight: 500; }
.dash-top-right { gap: 8px; }
.top-user { display: none; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--bg-1); color: var(--muted); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(34, 165, 89, 0.18); }
.status-off i { background: var(--yellow); box-shadow: 0 0 0 3px rgba(240, 178, 50, 0.16); }

.dash-content { max-width: 1240px; margin: 0 auto; padding: 32px 32px 140px; }

/* overview */
.ov-hero { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-1); margin-bottom: 16px; }
.ov-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 38%; opacity: 0.14; }
.ov-hero-bg.real { opacity: 0.6; }
.ov-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(17, 17, 20, 0) 0%, rgba(17, 17, 20, 0.55) 55%, var(--bg-1) 100%); }
.ov-hero-in { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 20px; padding: 76px 28px 24px; }
.ov-hero .gicon-xl { box-shadow: 0 0 0 4px var(--bg-1); }
.ov-hero-text { min-width: 0; }
.ov-hero h1 { font-size: 26px; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13.5px; }
.ov-hero-meta > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.ov-hero-meta .status-chip { background: rgba(255, 255, 255, 0.06); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 32px; }
.tile { background: var(--bg-1); border-radius: 12px; padding: 14px 16px 16px; }
.tile-k { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 12.5px; font-weight: 500; margin-bottom: 8px; }
.tile-k .ico { color: var(--dim); }
.tile-v { font-size: 24px; font-weight: 680; color: var(--accent-text); letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-v.is-empty { color: var(--dim); }
.tile-v small { font-size: 14px; color: var(--dim); font-weight: 500; letter-spacing: 0; }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.ov-group { margin-bottom: 28px; }
.ov-group:last-child { margin-bottom: 0; }
.ov-group-title { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0.02em; margin: 0 0 10px 2px; }
.mod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.mod-row { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 12px; background: var(--bg-1); color: var(--text); transition: background-color var(--t); min-width: 0; }
.mod-row:hover { background: #17171b; color: var(--text); }
.mod-row .mr-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(var(--tint), 0.14); color: rgb(var(--tint)); transition: opacity var(--t); }
.mod-row:not(.on) .mr-ic { opacity: 0.55; }
.mr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mr-text b { color: var(--text-strong); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-text span { color: var(--faint); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mr-chev { color: var(--dim); transition: color var(--t), transform var(--t); }
.mod-row:hover .mr-chev { color: var(--muted); transform: translateX(2px); }
.mod-row .badge { background: transparent; border-color: var(--line); }

.tint-server { --tint: 99, 140, 255; }
.tint-engagement { --tint: 160, 132, 255; }
.tint-moderation { --tint: 86, 190, 245; }
.tint-support { --tint: 64, 205, 180; }
.tint-minecraft { --tint: 120, 200, 100; }

.ov-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.side-card { background: var(--bg-1); border-radius: 12px; padding: 16px 18px 14px; }
.side-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.side-card-head h2 { font-size: 15px; letter-spacing: -0.015em; }
.link-sm { font-size: 13px; font-weight: 550; color: var(--accent-text); }
.progress { height: 4px; border-radius: 999px; background: var(--bg-3); overflow: hidden; margin-bottom: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 300ms ease; }
.checklist { display: flex; flex-direction: column; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; color: var(--text); transition: background-color var(--t); }
.check-item:hover { background: var(--bg-hover); color: var(--text); }
.ci-box { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: #fff; }
.check-item.done .ci-box { background: var(--accent); box-shadow: none; }
.ci-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-text b { font-size: 13.5px; font-weight: 600; color: var(--text-strong); }
.ci-text span { font-size: 12.5px; color: var(--faint); }
.check-item.done .ci-text b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--dim); }
.ci-chev { color: var(--dim); }
.side-card-body { display: flex; flex-direction: column; }
.mc-mini { display: flex; flex-direction: column; }
.mc-mini-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.mc-mini-row:first-child { border-top: 0; padding-top: 0; }
.mc-mini-row b { flex: 1; min-width: 0; color: var(--text-strong); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-mini-row span:last-child { color: var(--faint); font-size: 12.5px; }
.mini-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mini-empty p { color: var(--faint); font-size: 13.5px; }
.skel-row { height: 16px; margin: 6px 0; }
.skel-hero { height: 176px; border-radius: 12px; margin-bottom: 16px; background: var(--bg-1); }

/* module pages */
.mod-page { max-width: 880px; margin: 0 auto; }
.mod-head { margin-bottom: 24px; align-items: center; }
.mod-head-ic { width: 46px; height: 46px; border-radius: 12px; border: 0; background: rgba(var(--tint, 99, 140, 255), 0.14); color: rgb(var(--tint, 99, 140, 255)); }
.mod-head h1 { font-size: 24px; }
.mod-head-toggle { padding: 0; gap: 10px; }
.card-sec { background: var(--bg-1); border-radius: 12px; margin-bottom: 16px; }
.card-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.card-sec-head:last-child { border-bottom: 0; }
.card-sec-head h2 { font-size: 15px; letter-spacing: -0.015em; margin-bottom: 2px; }
.card-sec-head p { color: var(--faint); font-size: 13px; }
.card-sec .fields { background: transparent; border: 0; border-radius: 0; padding: 4px 20px 8px; }
.card-sec-plain { background: transparent; }
.card-sec-plain > .card-sec-head { padding: 0 0 12px; border-bottom: 0; }
.field { padding: 18px 0; }
.field-label { font-size: 13.5px; }
.field-hint { font-size: 12.5px; }
.notice { border-radius: 12px; }
.mc-card { border: 0; border-radius: 12px; }
.sub-card { border-radius: 12px; }

@media (max-width: 1180px) {
  .ov-grid { grid-template-columns: 1fr; }
  .ov-side { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; order: -1; }
}
@media (max-width: 860px) {
  .top-user { display: block; }
  .dash-content { padding: 20px 16px 140px; }
  .dash-top { padding: 0 12px; }
}
@media (max-width: 720px) {
  .crumb-root, .top-cmds, .dash-top .status-chip { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
  .ov-side { grid-template-columns: 1fr; }
  .mod-list { grid-template-columns: 1fr; }
  .ov-hero-in { padding: 56px 18px 18px; gap: 14px; }
  .gicon-xl { width: 60px; height: 60px; font-size: 20px; border-radius: 16px; }
  .ov-hero h1 { font-size: 21px; }
  .card-sec-head { padding: 16px; flex-wrap: wrap; }
  .card-sec .fields { padding: 4px 16px 8px; }
  .mod-head { align-items: flex-start; }
}

/* =====================================================================
   Dashboard tools: embed builder, audit log, misc
   ===================================================================== */
.tint-other { --tint: 160, 170, 190; }
.row-actions-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions-inline .btn .ico { margin-left: -2px; }
.tool-page { max-width: 1180px; margin: 0 auto; }
.tool-narrow { max-width: 880px; }

/* embed builder */
.eb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 24px; align-items: start; }
.eb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.eb-two .field { border-top: 0; }
.eb-pad { padding-top: 16px !important; padding-bottom: 16px !important; }
.eb-field { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto 34px; gap: 8px; align-items: start; }
.eb-fv { min-height: 40px; height: 40px; resize: vertical; }
.eb-inline { display: inline-flex; align-items: center; gap: 6px; height: 40px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.eb-inline input { accent-color: var(--accent); width: 16px; height: 16px; }
.eb-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 0 24px; }
.eb-sticky { position: sticky; top: 84px; }
.eb-label { font-size: 12px; font-weight: 600; color: var(--faint); margin: 0 0 10px 2px; }
.eb-preview { background: #313338; border-radius: 12px; padding: 16px 16px 18px 0; color: #dbdee1; font-size: 15px; line-height: 1.375; overflow: hidden; }
.pv-msg { display: flex; gap: 14px; padding-left: 16px; }
.pv-av img { width: 40px; height: 40px; border-radius: 50%; display: block; }
.pv-body { min-width: 0; flex: 1; }
.pv-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.pv-head b { color: #8aa8ff; font-weight: 500; }
.pv-tag { background: #5865f2; color: #fff; font-size: 10px; font-weight: 600; padding: 0 4px; height: 15px; line-height: 15px; border-radius: 3px; }
.pv-time { color: #949ba4; font-size: 12px; }
.pv-text, .pv-desc, .pv-fv { word-wrap: break-word; overflow-wrap: anywhere; }
.pv-text code, .pv-desc code, .pv-fv code { background: #2b2d31; border: 0; padding: 0 3px; border-radius: 3px; font-size: 0.85em; color: #dbdee1; }
.pv-text a, .pv-desc a, .pv-fv a { color: #00a8fc; }
.pv-embed { display: flex; gap: 16px; max-width: 520px; background: #2b2d31; border-left: 4px solid #1e1f22; border-radius: 4px; margin-top: 4px; padding: 10px 16px 14px 12px; }
.pv-embed-in { min-width: 0; flex: 1; }
.pv-author { font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.pv-title { font-weight: 600; color: #f2f3f5; margin-bottom: 6px; }
.pv-title.is-link { color: #00a8fc; }
.pv-desc { font-size: 14px; }
.pv-fields { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 8px; }
.pv-field { flex: 1 1 100%; min-width: 0; padding-right: 12px; }
.pv-field.inline { flex: 1 1 30%; }
.pv-fn { font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 2px; }
.pv-fv { font-size: 14px; }
.pv-image { display: block; max-width: 100%; max-height: 300px; border-radius: 4px; margin-top: 12px; }
.pv-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; flex: none; }
.pv-foot { font-size: 12px; color: #949ba4; margin-top: 8px; }
.pv-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pv-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 4px; background: #4e5058; color: #fff; font-size: 14px; font-weight: 500; }
.pv-empty { color: #949ba4; font-size: 14px; font-style: italic; }

/* audit log */
.audit-list { padding: 4px 0; }
.au-row { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.au-row:first-child { border-top: 0; }
.au-av { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover; }
.au-av-text { display: grid; place-items: center; background: var(--bg-4); color: var(--text-strong); font-size: 12px; font-weight: 650; }
.au-main { flex: 1; min-width: 0; }
.au-line { color: var(--muted); font-size: 14px; }
.au-line b { color: var(--text-strong); font-weight: 600; }
.au-time { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.au-changes { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); border-radius: 8px; padding: 10px 12px; }
.au-change { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.au-change .ico { color: var(--dim); }
.au-key { color: var(--text-strong); font-weight: 550; min-width: 170px; }
.au-from { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--dim); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-to { color: var(--accent-text); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-more { display: flex; justify-content: center; padding: 4px 0 24px; }
.audit-list .skel-mc { margin: 10px 20px; height: 48px; }

@media (max-width: 1100px) {
  .eb-grid { grid-template-columns: minmax(0, 1fr); }
  .eb-side { order: -1; }
  .eb-sticky { position: static; }
}
@media (max-width: 720px) {
  .eb-two { grid-template-columns: 1fr; }
  .eb-field { grid-template-columns: 1fr 34px; }
  .eb-field > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .eb-field > .eb-inline { grid-row: 3; height: 28px; }
  .au-row { padding: 12px 14px; }
  .au-key { min-width: 0; width: 100%; }
}

/* =====================================================================
   Round 4: rounder, softer controls; reveal + motion helpers (global)
   ===================================================================== */
:root { --radius: 16px; --radius-sm: 10px; --ease: cubic-bezier(.2, .7, .2, 1); }
body { animation: pageIn 320ms ease both; }
@keyframes pageIn { from { opacity: 0; } }

/* buttons: pills with a small lift */
.btn { height: 40px; padding: 0 18px; border-radius: 999px; transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms var(--ease), box-shadow 150ms ease, opacity 150ms ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); transition-duration: 60ms; }
.btn-primary { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 16px -8px rgba(79, 124, 255, 0.6); }
.btn-primary:hover:not(:disabled) { background: #6189ff; }
.btn-secondary { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.08); }
.btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.14); }
.btn-discord:hover:not(:disabled) { background: #6b77f5; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-link:hover:not(:disabled) { transform: none; }
.btn-sm { height: 34px; padding: 0 14px; }
.btn-lg { height: 48px; padding: 0 24px; }
.icon-btn { border-radius: 10px; }
.badge { border-radius: 999px; }

/* controls: 10px */
.input, .textarea, .picker-btn, .chips-box, .check, .color-swatch, .search, .pw-toggle, .side-item, .md-input { border-radius: 10px; }
.chip { border-radius: 8px; }
.picker-pop, .menu { border-radius: 12px; }
.side-switch, .side-userchip { border-radius: 12px; }
.ph-chip { border-radius: 999px; }

/* cards: 16px */
.card, .card-sec, .fields, .tile, .mod-row, .side-card, .ov-hero, .stat, .mc-card, .sub-card, .notice, .server-card, .skel-card, .skel-mc, .skel-hero, .connect-card, .acc-sec-body, .row-empty, .flash { border-radius: 16px; }
.modal { border-radius: 18px; }
.savebar { border-radius: 16px; }
.toast { border-radius: 999px; }

/* scroll reveal (only when JS runs, see boot.js) */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 700ms var(--ease) var(--d, 0ms), transform 700ms var(--ease) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* constellation canvas */
.starfield { display: block; pointer-events: none; }
.starfield-fixed { position: fixed; inset: 0; z-index: 0; }
.starfield-in { position: absolute; inset: 0; z-index: 0; }
body.site > header, body.site > main, body.site > footer, body.site > .auth { position: relative; z-index: 1; }
body.site > header { position: sticky; z-index: 30; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover:not(:disabled) { transform: none; }
}

/* =====================================================================
   Round 5: cleaner buttons (shine, sliding icon, press), round icon
   buttons, button groups, focus ring, spinners
   ===================================================================== */
.btn { position: relative; overflow: hidden; isolation: isolate; font-weight: 600; }
.btn:active:not(:disabled) { transform: scale(0.98); transition-duration: 80ms; }
.btn:focus-visible, .icon-btn:focus-visible, .seg > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* trailing icon or arrow slides 3px on hover */
.btn > .ico:last-child:not(:first-child) { transition: transform 180ms var(--ease); }
.btn:hover:not(:disabled) > .ico:last-child:not(:first-child) { transform: translateX(3px); }
.btn > .ico:last-child:not(:first-child) { margin-right: -3px; }
/* primary + Discord: solid, with one diagonal shine pass on hover */
.btn-primary, .btn-discord { color: #fff; }
.btn-primary { background: linear-gradient(180deg, #5c86ff, #4a76fb); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #6a91ff, #5680ff); }
.btn-discord { background: linear-gradient(180deg, #6470f6, #5865f2); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 8px 20px -10px rgba(88, 101, 242, 0.7); }
.btn-discord:hover:not(:disabled) { background: linear-gradient(180deg, #717cf8, #6470f6); }
.btn-primary::before, .btn-discord::before, .btn-danger::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.32) 50%, transparent 80%);
  transform: translateX(-110%) skewX(-12deg);
}
.btn-primary:hover:not(:disabled)::before, .btn-discord:hover:not(:disabled)::before, .btn-danger:hover:not(:disabled)::before {
  transform: translateX(210%) skewX(-12deg); transition: transform 700ms var(--ease);
}

/* secondary: ghost pill with a 1px border that fills on hover */
.btn-secondary {
  background-color: transparent; color: var(--text-strong); border-color: rgba(255, 255, 255, 0.16);
  background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1));
  background-repeat: no-repeat; background-position: 0 0; background-size: 0% 100%;
  transition: background-size 260ms var(--ease), border-color 150ms ease, color 150ms ease, transform 150ms var(--ease);
}
.btn-secondary:hover:not(:disabled) { background-color: transparent; background-image: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)); background-size: 100% 100%; border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.07); color: var(--text-strong); }
.btn-danger { background: linear-gradient(180deg, #f0545a, #e2444a); }
.btn-link { overflow: visible; }
.btn-link:active:not(:disabled) { transform: none; }

/* loading: spinner inside the button, label hidden, width kept */
.btn.loading, .icon-btn.loading { pointer-events: none; color: transparent !important; }
.btn.loading > *, .icon-btn.loading > * { visibility: hidden; }
.btn.loading::after, .icon-btn.loading::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
.btn-secondary.loading::after, .btn-ghost.loading::after, .btn-link.loading::after, .icon-btn.loading::after { border-color: rgba(255, 255, 255, 0.18); border-top-color: var(--accent-text); }

/* round 36px icon buttons (copy, refresh, delete, menu...) */
.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 50%; flex: none;
  border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.03); color: var(--muted);
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: var(--text-strong); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.danger:hover { color: #ff8a8e; background: rgba(237, 66, 69, 0.12); border-color: rgba(237, 66, 69, 0.35); }
.icon-btn.accent { background: var(--accent); border-color: transparent; color: #fff; }
.icon-btn.accent:hover { background: #6189ff; color: #fff; }
.icon-btn.ok { color: #57d98c; border-color: rgba(87, 217, 140, 0.35); }
.icon-btn .ico { transition: transform 300ms var(--ease); }
.icon-btn.spin .ico { animation: spin 0.8s linear infinite; }
.icon-btn.loading::after { border-color: rgba(255, 255, 255, 0.28); border-top-color: #fff; margin: -7px 0 0 -7px; width: 14px; height: 14px; }

/* button groups / segmented controls */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.seg > button, .seg > a {
  height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: 550 13px/1 var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background-color 150ms ease, color 150ms ease;
}
.seg > button:hover, .seg > a:hover { color: var(--text-strong); background: rgba(255, 255, 255, 0.06); }
.seg > .on, .seg > [aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--text-strong); }
.check-tools { margin-bottom: 10px; }
.pw-toggle { border-radius: 999px; }

/* layout spots that held the old 34px square icon buttons */
.btn-row { grid-template-columns: 1.3fr 1fr 90px 36px; }
.eb-field { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto 36px; }
.mc-actions { gap: 8px; }
.key-box { align-items: center; }
.code-wrap { position: relative; }
.code-wrap .icon-btn { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; background: var(--bg-2); }
.code-wrap .code-block { padding-right: 46px; }
.head-tools { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
@media (max-width: 720px) {
  .btn-row { grid-template-columns: 1fr 1fr 36px; }
  .eb-field { grid-template-columns: 1fr 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn::before { display: none; }
  .btn:active:not(:disabled), .icon-btn:active { transform: none; }
  .btn:hover:not(:disabled) > .ico:last-child:not(:first-child) { transform: none; }
  .btn-secondary { transition: none; }
}
/* long keys inside the key modal wrap instead of widening it */
.mini-steps code { word-break: break-all; }
.mini-steps { grid-template-columns: minmax(0, 1fr); }
.mini-steps li > div { min-width: 0; }

/* =====================================================================
   Round 6: animated background on every page (bg.js)
   ===================================================================== */
/* the star canvas sits under everything; the body colour still paints behind it */
.starfield-fixed { z-index: -1; }

/* perspective floor that drifts toward the viewer (landing hero, server picker, 404) */
.grid-floor {
  position: absolute; left: -20%; right: -20%; bottom: 0; height: 60%; pointer-events: none;
  perspective: 340px; perspective-origin: 50% 0;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 92%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 92%);
  opacity: 0.6;
}
.grid-floor::before {
  content: ""; position: absolute; left: 0; right: 0; top: -60%; bottom: -10%;
  background-image:
    linear-gradient(rgba(138, 168, 255, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 168, 255, 0.3) 1px, transparent 1px);
  background-size: 60px 60px; background-position: center top;
  transform-origin: 50% 100%; transform: rotateX(64deg);
  animation: gridDrift 3.6s linear infinite; will-change: transform;
}
@keyframes gridDrift { from { transform: rotateX(64deg) translateY(0); } to { transform: rotateX(64deg) translateY(60px); } }

/* globe hosts fade in once their first frame is drawn */
[data-globe], .ov-globe { opacity: 0; transition: opacity 1200ms var(--ease); }
[data-globe] canvas, .ov-globe canvas { display: block; }

/* server picker header: small globe on the right, floor underneath */
.space-head { position: relative; isolation: isolate; overflow: hidden; border-radius: 20px; margin-bottom: 28px; border: 1px solid var(--line-soft); background: linear-gradient(90deg, rgba(17, 17, 20, 0.94) 0%, rgba(17, 17, 20, 0.9) 55%, rgba(17, 17, 20, 0.45) 100%); }
.space-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.space-globe { position: absolute; right: -30px; top: 50%; width: 340px; height: 340px; margin-top: -170px; }
.space-globe.on { opacity: 0.95; }
.space-head .grid-floor { height: 70%; opacity: 0.5; }
.space-text { position: relative; z-index: 1; padding: 40px 36px 36px; max-width: 620px; }
.space-text .eyebrow { display: inline-block; margin-bottom: 10px; }
.space-text h1 { font-size: 34px; letter-spacing: -0.035em; font-weight: 700; margin-bottom: 8px; }
.space-text .btn { margin-top: 18px; }
@media (max-width: 720px) {
  .space-globe { right: -90px; width: 260px; height: 260px; margin-top: -130px; }
  .space-globe.on { opacity: 0.45; }
  .space-text { padding: 28px 20px 24px; }
  .space-text h1 { font-size: 27px; }
}

/* dashboard Overview header card: a small globe on the right */
.ov-globe { position: absolute; right: -36px; top: -78px; width: 300px; height: 300px; z-index: 1; pointer-events: none; }
.ov-globe.on { opacity: 0.9; }
.ov-hero-in { z-index: 2; }
@media (max-width: 720px) {
  .ov-globe { right: -70px; top: -60px; width: 220px; height: 220px; }
  .ov-globe.on { opacity: 0.5; }
}

/* readability over the stars: tinted panels get a solid underlay */
.notice { position: relative; isolation: isolate; }
.notice::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--bg-1); }
.page .card, .page .server-card { background: var(--bg-1); }

/* login / sign-up: the form sits on a solid card, the stars show around it */
.authpage .auth-box { background: rgba(17, 17, 20, 0.95); border: 1px solid var(--line-soft); border-radius: 20px; padding: 32px; max-width: 440px; margin: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.authpage .auth-side { background: rgba(17, 17, 20, 0.7); }
@media (max-width: 720px) {
  .authpage .auth-box { padding: 24px 20px; margin: 24px auto; }
}

@media (prefers-reduced-motion: reduce) {
  .grid-floor::before { animation: none; }
  [data-globe], .ov-globe { transition: none; }
}
/* small remove (x) buttons inside chips: round like every other icon button */
.chip-x { border-radius: 50%; transition: background-color 150ms ease, color 150ms ease; }
.chip-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.userchip:focus-visible, .side-switch:focus-visible, .pw-toggle:focus-visible, .ph-chip:focus-visible, .picker-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-banner, .flash { position: relative; isolation: isolate; }
.st-banner::before, .flash::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--bg-1); }
.space-text .eyebrow { color: var(--accent-text); font-size: 13px; font-weight: 600; letter-spacing: 0; }

/* =====================================================================
   Round 7: statistics, social alerts, announcements, shop, reaction roles,
   automations, achievements, personalizer (dash-extras.js)
   ===================================================================== */
.modal-wide { max-width: 680px; }
.modal-crop { max-width: 540px; }
.x-form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.x-form .field { margin: 0; padding: 0; border: 0; }
.x-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.x-grid-emoji { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.x-empty { padding: 36px 24px; }
.x-row-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.x-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x-field-head .btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.x-count { display: block; text-align: right; font-size: 12px; color: var(--dim); margin-top: 4px; font-variant-numeric: tabular-nums; }
.ph-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pv-mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.x-sub-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.x-sub-head h2 { font-size: 18px; }

/* stat tiles + charts */
.x-stats .mod-head { flex-wrap: wrap; }
.x-tiles { margin-bottom: 16px; }
.x-tiles .tile-v { margin-bottom: 6px; }
.x-delta { font-size: 12px; color: var(--dim); font-weight: 550; }
.x-delta.up { color: #57d98c; }
.x-delta.down { color: #f0a35c; }
.x-chart-card { padding-bottom: 8px; }
.x-chart-body { padding: 8px 16px 12px; }
.x-skel-chart { height: 280px; }
.x-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ch { position: relative; outline: none; border-radius: 10px; }
.ch:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.ch-svg { display: block; overflow: visible; touch-action: pan-y; }
.ch-grid { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; }
.ch-base { stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; }
.ch-ax { fill: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.ch-guide { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; stroke-dasharray: 3 3; }
.ch-dot { stroke: var(--bg-1); stroke-width: 2.5; }
.ch-tip { position: absolute; pointer-events: none; z-index: 3; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: #1c1c21; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); font-size: 12.5px; }
.ch-tip-d { color: var(--faint); margin-bottom: 6px; font-weight: 550; }
.ch-tip-r { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.ch-tip-r i, .ch-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ch-tip-r b { margin-left: auto; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.ch-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ch-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend b { color: var(--text-strong); font-variant-numeric: tabular-nums; }
.x-hbars { list-style: none; margin: 0; padding: 4px 0; display: grid; gap: 10px; }
.x-hbars li { display: grid; grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 13.5px; }
.x-hbar-name { display: inline-flex; align-items: center; gap: 4px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-hbar-name .ico { color: var(--dim); flex: none; }
.x-hbar-track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); overflow: hidden; }
.x-hbar { display: block; height: 100%; border-radius: 999px; background: #4f7cff; }
.x-hbars b { text-align: right; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.x-details summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 14px 18px; color: var(--muted); font-weight: 550; font-size: 14px; }
.x-details summary::-webkit-details-marker { display: none; }
.x-details[open] summary { border-bottom: 1px solid var(--line-soft); }
.x-table-wrap { overflow-x: auto; max-height: 420px; }
.x-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.x-table th { text-align: left; font-weight: 600; color: var(--faint); font-size: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.x-table td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text); font-variant-numeric: tabular-nums; vertical-align: middle; }
.x-table tr:last-child td { border-bottom: 0; }
.x-table .num { text-align: right; }

/* list cards (feeds, announcements, rules) */
.x-feeds, .x-jobs { display: grid; gap: 10px; }
.x-feed, .x-job { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: 16px; }
.x-job.off { opacity: 0.7; }
.x-feed-main { flex: 1; min-width: 0; }
.x-feed-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-strong); font-size: 15px; }
.x-feed-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.x-feed-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; color: var(--faint); font-size: 13px; }
.x-feed-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.x-next { color: var(--accent-text); font-weight: 550; }
.x-plat { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.x-plat-youtube { color: #ff4e45; background: rgba(255, 78, 69, 0.12); }
.x-plat-twitch { color: #a970ff; background: rgba(169, 112, 255, 0.14); }
.x-plat-kick { color: #53fc18; background: rgba(83, 252, 24, 0.1); }
.x-plat-reddit { color: #ff6a33; background: rgba(255, 106, 51, 0.12); }
.x-plat-rss { color: #f5a524; background: rgba(245, 165, 36, 0.12); }
.x-plat-bluesky { color: #3d9bff; background: rgba(61, 155, 255, 0.13); }
.x-job-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.x-plats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.x-plat-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.02); color: var(--text); font: 550 13px var(--font); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; position: relative; }
.x-plat-tile .x-plat { width: 36px; height: 36px; border-radius: 10px; }
.x-plat-tile:hover:not(:disabled) { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.x-plat-tile.on { border-color: var(--accent); background: var(--accent-soft); }
.x-plat-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.x-plat-tile.soon { opacity: 0.45; cursor: not-allowed; }
.x-plat-tile small { position: absolute; top: 6px; right: 6px; font-size: 10px; font-weight: 650; color: #f5c55a; background: rgba(240, 178, 50, 0.12); border-radius: 999px; padding: 1px 6px; }
.x-pv { background: #313338; border-radius: 12px; padding: 14px 14px 16px 0; color: #dbdee1; font-size: 15px; }
.x-sched { display: contents; }
.x-coins { display: inline-flex; align-items: center; gap: 5px; color: #f5c55a; font-weight: 600; font-variant-numeric: tabular-nums; }
.x-role { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--text); font-size: 12.5px; font-weight: 550; }
.x-table-card { padding: 0; overflow-x: auto; }
.x-shop td:first-child { min-width: 180px; }
.x-td-actions { width: 1%; }
.x-rich { list-style: none; margin: 0; padding: 6px 18px 14px; display: grid; gap: 2px; }
.x-rich li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.x-rich li:last-child { border-bottom: 0; }
.x-rank { width: 32px; color: var(--dim); font-weight: 650; font-variant-numeric: tabular-nums; }
.x-rich-name { flex: 1; min-width: 0; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-rr { display: grid; gap: 12px; }
.x-rr-card { padding: 0; }
.x-rr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.x-rr-head b { display: inline-flex; align-items: center; gap: 4px; color: var(--text-strong); }
.x-rr-rows { display: grid; }
.x-rr-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.x-rr-row:last-child { border-bottom: 0; }
.x-rr-row > .ico { color: var(--dim); }
.x-rr-row .icon-btn { margin-left: auto; }
.x-emoji { font-size: 20px; min-width: 28px; text-align: center; }

/* automations */
.x-step .card-sec-head { align-items: center; }
.x-step-title { display: flex; align-items: center; gap: 14px; }
.x-step-badge { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; flex: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.x-step-link { width: 2px; height: 18px; margin: -16px 0 0 34px; background: linear-gradient(var(--accent), rgba(79, 124, 255, 0.2)); }
.x-step-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.x-cd { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: center; }
.x-action { padding: 12px; border-radius: 14px; border: 1px solid var(--line-soft); background: var(--bg-2); margin-bottom: 10px; }
.x-action .x-step-row { grid-template-columns: 28px minmax(0, 1fr) 36px; }
.x-step-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--text-strong); font-size: 12px; font-weight: 650; }
.x-step-params { display: grid; gap: 8px; padding-left: 36px; }
.x-step-params .seg { justify-self: start; flex-wrap: wrap; }

/* achievements */
.x-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.x-ach { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--bg-1); border: 1px solid var(--line-soft); text-align: left; min-height: 170px; }
.x-ach-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 4px; }
.x-ach-emoji { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: rgba(245, 197, 90, 0.1); }
.x-ach-name { color: var(--text-strong); font-size: 15px; }
.x-ach-desc { color: var(--faint); font-size: 13px; }
.x-ach-goal { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: auto; }
.x-ach-rewards { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x-ach-new { align-items: center; justify-content: center; border-style: dashed; color: var(--faint); cursor: pointer; font: inherit; transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease; }
.x-ach-new:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.x-ach-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* personalizer */
.x-drop { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 14px; border: 1.5px dashed rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.02); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.x-drop:hover, .x-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.x-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.x-drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.x-drop-text b { color: var(--text-strong); font-size: 14px; }
.x-drop-thumb { position: relative; flex: none; overflow: hidden; background: var(--bg-3); display: grid; place-items: center; }
.x-drop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-drop-avatar { width: 64px; height: 64px; border-radius: 50%; }
.x-drop-banner { width: 136px; height: 48px; border-radius: 10px; }
.x-drop-def { font-size: 11px; color: var(--dim); }
.x-drop-tag { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; }
.x-crop-box { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 12px; }
.x-crop { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
.x-crop canvas { display: block; cursor: grab; touch-action: none; }
.x-crop canvas:active { cursor: grabbing; }
.x-crop canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.x-crop.round::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.55); outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: -2px; }
.x-crop-row { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 360px; color: var(--dim); }
.x-crop-zoom { flex: 1; accent-color: #4f7cff; }
.x-pz-pv { display: grid; gap: 14px; }
.x-pz-card { position: relative; background: #232428; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.x-pz-banner { height: 120px; background-size: cover; background-position: center; }
.x-pz-avwrap { position: absolute; left: 16px; top: 76px; width: 88px; height: 88px; border-radius: 50%; background: #232428; padding: 6px; }
.x-pz-av { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #1e1f22; }
.x-pz-online { position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; background: #23a55a; border: 5px solid #232428; }
.x-pz-body { padding: 52px 16px 16px; }
.x-pz-name { display: flex; align-items: center; gap: 6px; }
.x-pz-name b { color: #f2f3f5; font-size: 20px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-pz-user { color: #b5bac1; font-size: 14px; margin-bottom: 12px; }
.x-pz-sec { background: #111214; border-radius: 10px; padding: 12px; }
.x-pz-label { color: #f2f3f5; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 6px; }
.x-pz-bio { color: #dbdee1; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.x-pz-foot { display: flex; align-items: center; gap: 8px; }
.x-pz-foot img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }

@media (max-width: 1100px) {
  .x-two { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .x-grid2 { grid-template-columns: 1fr; }
  .x-feed, .x-job { flex-wrap: wrap; }
  .x-feed .x-row-actions, .x-job .x-row-actions { width: 100%; justify-content: flex-end; }
  .x-hbars li { grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 56px; gap: 8px; }
  .x-step-row { grid-template-columns: 1fr 36px; }
  .x-action .x-step-row { grid-template-columns: 24px minmax(0, 1fr) 36px; }
  .x-step-params { padding-left: 0; }
  .x-drop { flex-direction: column; align-items: flex-start; }
  .x-stats .head-tools { margin-left: 0; width: 100%; }
}
.x-off { opacity: 0.45; pointer-events: none; }

/* charts never wider than their card (they redraw at the new width on resize) */
.ch-svg { max-width: 100%; height: auto; }
@media (max-width: 1100px) { .x-two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- round 8: demo dashboard ---------- */
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px auto 0; width: calc(100% - 64px); max-width: 1176px; padding: 10px 12px 10px 14px; border-radius: 12px; background: #15192a; border: 1px solid rgba(79, 124, 255, 0.28); color: var(--text); font-size: 14px; }
.demo-bar > .ico { color: var(--accent-text); flex: none; }
.demo-bar > span { flex: 1; min-width: 200px; }
.demo-bar b { color: var(--text-strong); }
.menu-note { padding: 8px 10px; color: var(--faint); font-size: 13px; max-width: 240px; }
@media (max-width: 720px) { .demo-bar { width: calc(100% - 32px); } }
@media (max-width: 560px) { .demo-bar .btn { width: 100%; } }

/* ---------- owner: /admin page + owner access tag/bar ---------- */
.badge-owner { height: 20px; padding: 0 8px; font-size: 11.5px; font-weight: 600; }
.owner-bar { background: #1a1730; border-color: rgba(138, 168, 255, 0.32); }
.adm-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.adm-meta .status-chip { background: rgba(255, 255, 255, 0.06); }
.admin-tiles { margin-bottom: 20px; }
.adm-list { padding: 4px 0; }
.adm-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.adm-row:first-child { border-top: 0; }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-main b { color: var(--text-strong); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-sub { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.adm-cell { display: flex; flex-direction: column; align-items: flex-end; min-width: 92px; }
.adm-cell b { color: var(--text-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.adm-actions form { margin: 0; }
.adm-leave:hover:not(:disabled) { color: #ff8f93 !important; border-color: rgba(229, 72, 77, 0.45) !important; }
.adm-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--bg-input); box-shadow: inset 0 0 0 1px var(--line); color: var(--faint); min-width: 220px; }
.adm-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text-strong); font: 14px var(--font); outline: none; }
.adm-search:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px rgba(79, 124, 255, 0.18); }
.adm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.adm-cols .card-sec { margin-bottom: 0; }
.adm-cols .au-time a { color: var(--accent-text); }
@media (max-width: 900px) {
  .adm-cols { grid-template-columns: 1fr; }
  .admin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .adm-row { flex-wrap: wrap; padding: 12px 16px; }
  .adm-hide-sm { display: none; }
  .adm-actions { width: 100%; }
  .adm-actions .btn, .adm-actions form { flex: 1; }
  .adm-actions form .btn { width: 100%; }
  .card-sec-head { flex-wrap: wrap; }
  .adm-search { min-width: 0; width: 100%; }
}

/* Applications, Ban Appeals, ModMail (dash-forms.js) */
.fm-qrows { margin-bottom: 8px; }
.row.fm-qrow { grid-template-columns: 22px minmax(0, 1fr) 150px 122px 34px; }
.fm-qn { font: 600 12px var(--mono); color: var(--dim); text-align: center; }
.check.fm-check { padding: 8px 10px; }
.fm-inline { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.fm-filter { padding: 12px 20px 0; }
.fm-list { display: flex; flex-direction: column; padding: 8px 12px; }
.fm-more { display: flex; justify-content: center; padding: 0 0 14px; }
.fm-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; color: var(--faint); text-align: center; }
.fm-item { border-radius: 10px; }
.fm-item + .fm-item { border-top: 1px solid var(--line-soft); }
.fm-item summary { display: flex; align-items: center; gap: 12px; padding: 12px 8px; cursor: pointer; list-style: none; border-radius: 10px; }
.fm-item summary::-webkit-details-marker { display: none; }
.fm-item summary:hover { background: var(--bg-hover); }
.fm-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-when { font-size: 12px; color: var(--faint); white-space: nowrap; }
.fm-chev { color: var(--dim); transition: transform var(--t); flex: none; }
.fm-item[open] .fm-chev { transform: rotate(180deg); }
.fm-st { font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 999px; background: var(--bg-3); color: var(--muted); flex: none; }
.fm-st-pending, .fm-st-open { background: rgba(250, 166, 26, 0.12); color: #f5b74e; }
.fm-st-accepted { background: rgba(34, 165, 89, 0.12); color: #4ccf83; }
.fm-st-denied { background: rgba(229, 72, 77, 0.12); color: #ff7b80; }
.fm-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 8px 16px 8px; }
.fm-q { font-size: 12.5px; font-weight: 650; color: var(--muted); margin-bottom: 3px; }
.fm-a { font-size: 14px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.fm-decision { font-size: 13px; color: var(--faint); border-top: 1px solid var(--line-soft); padding-top: 10px; }
.fm-steps { margin: 0; padding: 16px 20px 18px 40px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 14px; }
@media (max-width: 720px) {
  .row.fm-qrow { grid-template-columns: 22px minmax(0, 1fr) 34px; }
  .row.fm-qrow .picker, .row.fm-qrow .fm-check { grid-column: 2 / 3; }
  .fm-when { display: none; }
}

/* Tickets page (dash-tickets.js) */
.tk-body { padding: 16px 20px 18px; }
.tk-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
.tk-tiles .tile { background: var(--bg-2); border: 1px solid var(--line-soft); }
.tk-tiles .tile-v { font-size: 20px; }
.tk-tiles .tile-v small { font-size: 12px; }
.tk-top { display: flex; flex-direction: column; font-size: 13.5px; }
.tk-top-head, .tk-top-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 70px 70px; gap: 8px; padding: 7px 4px; }
.tk-top-head { color: var(--faint); font-size: 12px; font-weight: 650; border-bottom: 1px solid var(--line-soft); }
.tk-top-row + .tk-top-row { border-top: 1px solid var(--line-soft); }
.tk-top-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tk-type { width: auto; min-width: 140px; }
.tk-search { flex: 1; min-width: 180px; }
.tk-st-closed { background: var(--bg-3); color: var(--muted); }
.tk-stars { color: #f5b74e; letter-spacing: 1px; }
.tk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.tk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 720px) {
  .tk-tiles { grid-template-columns: 1fr 1fr; }
  .tk-grid { grid-template-columns: 1fr; }
  .tk-top-head, .tk-top-row { grid-template-columns: minmax(0, 1fr) 54px 54px 54px; }
}

/* =====================================================================
   Server list card (public /servers pages and the dashboard preview)
   ===================================================================== */
.sl-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; transition: border-color 150ms ease, transform 150ms var(--ease, ease), box-shadow 150ms ease; }
.sl-card:hover { border-color: rgba(79, 124, 255, 0.4); transform: translateY(-2px); box-shadow: 0 14px 32px -18px rgba(79, 124, 255, 0.45); }
.sl-card-preview:hover { transform: none; }
.sl-card-cover { display: block; height: 84px; background: radial-gradient(120% 140% at 0% 0%, rgba(79, 124, 255, 0.35), transparent 60%), radial-gradient(120% 140% at 100% 100%, rgba(167, 111, 240, 0.25), transparent 60%), var(--bg-3); }
.sl-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-card-body { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 16px; flex: 1; min-width: 0; }
.sl-card-top { display: flex; align-items: flex-end; gap: 12px; margin-top: -26px; min-width: 0; }
.sl-card-top .gicon { border: 4px solid var(--bg-1); border-radius: 18px; width: 68px; height: 68px; }
.sl-card-title { min-width: 0; padding-bottom: 2px; }
.sl-card-title h3 { font-size: 16px; letter-spacing: -0.015em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-card-title h3 a { color: var(--text-strong); }
.sl-card-title h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.sl-card-meta { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.sl-boost { display: inline-flex; align-items: center; gap: 4px; color: #f47fff; font-weight: 600; }
.sl-card-desc { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sl-empty-text { color: var(--dim); font-style: italic; }
.sl-tags { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.sl-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--bg-3); color: var(--text); font-size: 12px; font-weight: 550; transition: background-color var(--t), color var(--t); }
a.sl-tag:hover { background: var(--accent-soft); color: var(--accent-text); }
.sl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.sl-count { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-count .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--dim); margin: 0 2px; }
.sl-card .sl-join { position: relative; z-index: 1; }

/* dashboard: Server Listing page */
.sl-dash-in { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; padding: 18px 20px 20px; align-items: start; }
.sl-dash-right .mini-label { display: block; margin-bottom: 8px; }
.sl-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.sl-state b { color: var(--text-strong); }
.sl-why { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.sl-why li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13px; }
.sl-why .ico { color: var(--yellow); margin-top: 2px; flex: none; }
.sl-link { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.sl-link code { font-family: var(--mono); font-size: 13px; background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--accent-text); padding: 6px 10px; border-radius: 8px; overflow-wrap: anywhere; min-width: 0; }
.sl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 0; }
.sl-tiles .tile { background: var(--bg-2); border: 1px solid var(--line-soft); }
.sl-tiles .tile-v { font-size: 20px; }
.sl-tiles .tile-v small { font-size: 12px; }
.sl-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sl-suggest .tl-chip { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font: 550 12.5px/1 var(--font); cursor: pointer; }
.sl-suggest .tl-chip:hover:not(:disabled) { background: var(--bg-4); color: var(--text-strong); }
.sl-suggest .tl-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: rgba(79, 124, 255, 0.45); color: var(--accent-text); }
.sl-suggest .tl-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.sl-slug { display: flex; align-items: stretch; max-width: 520px; }
.sl-slug-pre { display: inline-flex; align-items: center; padding: 0 10px; border-radius: 10px 0 0 10px; background: var(--bg-3); color: var(--faint); font-size: 13px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 0 0 1px var(--line); }
.sl-slug .input { border-radius: 0 10px 10px 0; flex: 1; min-width: 0; }
.sl-slug-note { margin-top: 6px; }
.sl-slug-note.sl-bad { color: #ff8f93; }
@media (max-width: 1100px) { .sl-dash-in { grid-template-columns: minmax(0, 1fr); } }

/* ---------- server backups (dashboard) + status incidents (admin) ---------- */
.bk-new { display: flex; gap: 10px; margin-bottom: 14px; }
.bk-new .input { flex: 1; min-width: 0; }
.bk-list { display: grid; }
.bk-item summary { flex-wrap: wrap; }
.bk-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.adm-inc-form { display: grid; gap: 8px; margin: 10px 0 8px; }
.adm-inc-new { grid-template-columns: minmax(0, 1fr) 180px; margin-bottom: 16px; }
.adm-inc-new .textarea, .adm-inc-new .row-actions-inline { grid-column: 1 / -1; }
.adm-inc .textarea { min-height: 60px; }
.up-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--dim); }
.up-badge-investigating { background: rgba(229, 72, 77, 0.14); color: #ff8f93; }
.up-badge-identified, .up-badge-monitoring { background: rgba(240, 178, 50, 0.14); color: #f5c55a; }
.up-badge-resolved { background: rgba(34, 165, 89, 0.14); color: #8fe0b2; }
.up-badge-maintenance { background: rgba(79, 124, 255, 0.14); color: #9bb5ff; }
@media (max-width: 640px) { .bk-new { flex-direction: column; } .adm-inc-new { grid-template-columns: minmax(0, 1fr); } }

/* Staff Tools + Channel Scheduler (dash-staff.js) */
.st-sec .card-sec-head { flex-wrap: wrap; gap: 10px; }
.st-table td, .st-table th { white-space: nowrap; }
.st-who { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: var(--text-strong); font: inherit; cursor: pointer; }
.st-who:hover span:last-child { text-decoration: underline; }
.st-who img, .st-av { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.st-av { display: inline-grid; place-items: center; background: var(--bg-3); color: var(--muted); font-size: 12px; font-weight: 600; }
.st-tag { display: inline-block; padding: 2px 8px; margin-right: 4px; border-radius: 999px; font-size: 12px; background: var(--bg-3); color: var(--muted); border: 1px solid var(--line-soft); }
.st-tag.st-on { color: #57d38c; border-color: rgba(87, 211, 140, 0.35); }
.st-tag.st-leave { color: var(--accent-text); border-color: rgba(79, 124, 255, 0.35); }
.st-tag.st-warn { color: #e8a24a; border-color: rgba(232, 162, 74, 0.4); }
.st-note { margin-top: 8px; }
.st-chart-card { margin-top: 14px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--bg-2); color: var(--muted); }
.st-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--text-strong); flex-wrap: wrap; }
.st-chart { display: block; width: 100%; height: auto; max-height: 200px; }
.st-lists { margin-top: 14px; }
.st-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.st-list li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-days button { min-width: 48px; }
.st-row { display: flex; gap: 8px; align-items: center; }
.st-gap { margin-top: 10px; }
.st-last { margin-top: 4px; }
.st-edit .fields { margin-top: 12px; }
@media (max-width: 640px) { .st-days { flex-wrap: wrap; } }

/* ---------- review log (dashboard Applications / Ban Appeals + /review page): review-log.js ---------- */
.fm-st-review { background: rgba(79, 124, 255, 0.14); color: var(--accent-text); }
.rv-tabs { margin-bottom: 14px; }
.rv-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 20px 0; }
.rv-q { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; height: 36px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--bg-input); box-shadow: inset 0 0 0 1px var(--line); color: var(--faint); }
.rv-q:focus-within { box-shadow: inset 0 0 0 1px var(--accent); }
.rv-q .rv-search { flex: 1; min-width: 0; height: 34px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.rv-select { width: auto; max-width: 220px; height: 36px; }
.rv-seg { flex-wrap: wrap; }
.rv-item.open { background: var(--bg-2); }
.rv-sum { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 8px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.rv-sum:hover { background: var(--bg-hover); }
.rv-item.open .fm-chev { transform: rotate(180deg); }
.rv-tag { margin-left: 8px; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 999px; background: var(--bg-3); color: var(--muted); }
.rv-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rv-who { display: flex; align-items: center; gap: 12px; }
.rv-who-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rv-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.rv-warn { color: #f5b74e; }
.rv-answers { display: flex; flex-direction: column; gap: 12px; }
.rv-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.rv-actions .rv-del { margin-left: auto; }
.rv-reason { display: flex; flex-direction: column; gap: 8px; }
.rv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rv-sec .rv-row { justify-content: flex-start; }
.rv-add .rv-row { justify-content: flex-end; margin-top: 8px; }
.rv-sec { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rv-sec h3 { font-size: 13px; font-weight: 650; color: var(--muted); }
.rv-vote.on { background: var(--accent-soft); color: var(--accent-text); }
.rv-voters { overflow-wrap: anywhere; }
.rv-notes { display: flex; flex-direction: column; gap: 8px; }
.rv-note { background: var(--bg-3); border-radius: var(--radius-sm); padding: 8px 10px; }
.rv-note-head { display: flex; align-items: center; gap: 8px; }
.rv-note-head .icon-btn { margin-left: auto; width: 26px; height: 26px; }
.rv-note-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.rv-others { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rv-others li { display: flex; align-items: center; gap: 10px; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent-text); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.rv-wide { max-width: 980px; }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-top .ap-head { margin-bottom: 22px; }
/* /apply pages */
.apl-h { font-size: 16px; margin-bottom: 12px; color: var(--text-strong); }
.apl-list { display: flex; flex-direction: column; gap: 8px; }
.apl-form { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.apl-form:hover { border-color: var(--line-strong); }
.apl-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.apl-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.apl-go { color: var(--dim); flex: none; }
.apl-mine, .ap-card + .ap-card { margin-top: 16px; }
.apl-past { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.apl-past li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.apl-past li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.apl-reason { color: var(--muted); }
.apl-back { margin: -10px 0 14px; }
.apl-back a { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) {
  .rv-tools { padding: 12px 12px 0; }
  .rv-select { max-width: none; flex: 1; }
  .rv-mini { display: none; }
}
