/* MCutilities dashboard — admin-sidebar layout, Minecraft green. */
:root {
  --bg: #0a0e0c;
  --bg-2: #0e1411;
  --panel: #121a16;
  --panel-2: #18221d;
  --hover: #1c2721;
  --line: #222d28;
  --line-2: #2d3a33;
  --text: #e7efea;
  --text-2: #c3cfc8;
  --muted: #869890;
  --accent: #22c55e;
  --accent-2: #16a34a;
  --accent-ink: #04210f;
  --accent-soft: rgba(34, 197, 94, .12);
  --warn: #f59e0b;
  --error: #f05252;
  --info: #60a5fa;
  --embed-bg: #1a1f1d;
  --embed-bar: #5865f2;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .45);
  --topbar: 60px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f7f5; --bg-2: #edf2ef; --panel: #ffffff; --panel-2: #f6f9f7; --hover: #eef3f0;
    --line: #e1e8e4; --line-2: #d3ddd7; --text: #0f1a14; --text-2: #2c3a33; --muted: #5d6e65;
    --accent: #16a34a; --accent-2: #15803d; --accent-ink: #ffffff; --accent-soft: rgba(22, 163, 74, .1);
    --embed-bg: #f2f3f5; --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 8px 24px rgba(16, 40, 28, .06);
    --shadow-lg: 0 20px 50px rgba(16, 40, 28, .14);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f7f5; --bg-2: #edf2ef; --panel: #ffffff; --panel-2: #f6f9f7; --hover: #eef3f0;
  --line: #e1e8e4; --line-2: #d3ddd7; --text: #0f1a14; --text-2: #2c3a33; --muted: #5d6e65;
  --accent: #16a34a; --accent-2: #15803d; --accent-ink: #ffffff; --accent-soft: rgba(22, 163, 74, .1);
  --embed-bg: #f2f3f5; --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 8px 24px rgba(16, 40, 28, .06);
  --shadow-lg: 0 20px 50px rgba(16, 40, 28, .14);
  color-scheme: light;
}

/* ─── base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); min-height: 100vh;
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.02rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
code {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
  font: .84em ui-monospace, "Cascadia Code", Consolas, monospace;
}
.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── top bar ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 12px;
  padding: 0 20px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(140%) blur(12px);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, #4ade80, var(--accent-2)); color: #04210f;
  font: 400 10px "Press Start 2P", monospace; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22), 0 4px 14px rgba(34, 197, 94, .25);
}
.logo-mark.sm { width: 24px; height: 24px; font-size: 7px; border-radius: 7px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.logo-text { font-family: "Press Start 2P", monospace; font-size: 12px; letter-spacing: .5px; }
.topbar .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.me .who { font-weight: 600; font-size: .9rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); object-fit: cover;
  border: 1px solid var(--line); flex: none;
}
.avatar.md { width: 40px; height: 40px; border-radius: 12px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; }
.avatar.xl { width: 72px; height: 72px; border-radius: 20px; font-size: 1.6rem; }
.initial { display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.avatar.pic { position: relative; overflow: hidden; }
.avatar.pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: inline-block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: inline-block; }
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: none; }
}

/* ─── buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  padding: 8px 15px; border-radius: var(--radius-sm); font: inherit; font-size: .92rem; font-weight: 600;
  text-decoration: none !important; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn .i { width: 16px; height: 16px; }
.btn:hover { background: var(--hover); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-2)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(34, 197, 94, .22); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); border-color: transparent; }
.btn.danger { color: var(--error); }
.btn.danger:hover { border-color: var(--error); background: color-mix(in srgb, var(--error) 8%, var(--panel-2)); }
.btn.danger.solid { background: var(--error); border-color: var(--error); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: .82rem; border-radius: 8px; }
.btn.lg { padding: 12px 22px; font-size: 1rem; border-radius: 12px; }
.btn.icon { padding: 7px; }
.btn.busy { opacity: .65; cursor: progress; }
form.inline { display: inline; margin: 0; }

/* ─── app shell ────────────────────────────────────────────────────────── */
.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; }
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidebar {
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto;
  border-right: 1px solid var(--line); background: var(--bg-2); padding: 16px 12px 20px; display: flex; flex-direction: column;
}
.server-switch {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--text);
  border: 1px solid var(--line); background: var(--panel); margin-bottom: 16px;
}
.server-switch:hover { text-decoration: none; border-color: var(--line-2); background: var(--hover); }
.server-switch .meta { min-width: 0; flex: 1; }
.server-switch .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-switch .i { color: var(--muted); width: 16px; height: 16px; }
.nav-group { margin-bottom: 14px; }
.nav-label { font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 0 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; margin-bottom: 1px;
  color: var(--text-2); font-weight: 600; font-size: .92rem; position: relative;
}
.nav a .i { color: var(--muted); }
.nav a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a.active .i { color: var(--accent); }
.nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: .7rem; font-weight: 800; background: var(--accent); color: var(--accent-ink);
}
.sidebar-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.main { padding: 30px 40px 72px; max-width: 1080px; width: 100%; }

/* ─── page head ────────────────────────────────────────────────────────── */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.page-icon .i { width: 22px; height: 22px; }
.page-head .text { flex: 1; min-width: 220px; }
.page-head p { margin: 3px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 20px; box-shadow: var(--shadow); overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-head .chip {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--panel-2); color: var(--accent); border: 1px solid var(--line);
}
.card-head .chip .i { width: 17px; height: 17px; }
.card-head .title { flex: 1; min-width: 0; }
.card-head .sub { color: var(--muted); font-size: .83rem; margin-top: 1px; }
.card-head .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-body { padding: 18px 20px; }
.card-body > :last-child { margin-bottom: 0; }
.card.danger-zone { border-color: color-mix(in srgb, var(--error) 35%, var(--line)); }
.card.danger-zone .chip { color: var(--error); }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; }
.link-more .i { width: 15px; height: 15px; }

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.wide-left { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.grid > .card { margin-bottom: 0; }
.stack { display: grid; gap: 20px; align-content: start; }
.stack > .card { margin-bottom: 0; }
.mb { margin-bottom: 20px; }

/* stat tiles */
.stat {
  display: block; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .label { color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.stat .ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.stat .ico .i { width: 16px; height: 16px; }
.stat .value { font-size: 1.75rem; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .sub { color: var(--muted); font-size: .8rem; }
a.stat:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); }

/* server banner */
.server-banner {
  display: flex; align-items: center; gap: 18px; padding: 22px; margin-bottom: 20px; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden;
  background:
    radial-gradient(600px 160px at 0% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    linear-gradient(180deg, var(--panel), var(--panel));
}
.server-banner h1 { font-size: 1.5rem; }
.server-banner .facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: .88rem; }
.server-banner .facts span { display: inline-flex; align-items: center; gap: 6px; }
.server-banner .facts .i { width: 15px; height: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); display: inline-block; }

/* ─── settings rows ────────────────────────────────────────────────────── */
.setting {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 28px; align-items: center;
  padding: 16px 20px; border-top: 1px solid var(--line);
}
.card-head + .setting, .setting:first-child { border-top: 0; }
.setting .s-label { font-weight: 650; font-size: .93rem; display: block; }
.setting .s-hint { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.setting .s-control { min-width: 0; }
.setting.top { align-items: start; }
.setting.full { grid-template-columns: 1fr; }

/* ─── forms ────────────────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field > label, .label-row { display: block; font-weight: 650; font-size: .9rem; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 6px; }
input[type=text], input[type=number], input[type=search], select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 9px 12px; font: inherit; font-size: .93rem;
  transition: border-color .15s, box-shadow .15s;
}
select:not([multiple]) {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23869890' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
select[multiple] { min-height: 128px; padding: 6px; }
select[multiple] option { padding: 5px 8px; border-radius: 6px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 25%, var(--line-2)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin: 4px 0 20px; }
.form-actions .unsaved { display: none; margin-right: auto; color: var(--warn); font-weight: 700; font-size: .9rem; align-items: center; gap: 8px; }
.form-actions .unsaved::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
form.dirty .form-actions {
  position: sticky; bottom: 16px; z-index: 15; padding: 10px 12px 10px 16px; border-radius: 12px;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); box-shadow: var(--shadow-lg);
}
form.dirty .form-actions .unsaved { display: inline-flex; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s cubic-bezier(.3, .7, .4, 1.2);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.repeat-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin-bottom: 8px; }
.repeat-row.reward { grid-template-columns: 120px 1fr auto; }
.repeat-head { display: grid; grid-template-columns: 1fr 2fr 38px; gap: 8px; margin-bottom: 6px; }
.repeat-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* placeholders + counter */
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ph {
  font: .78rem ui-monospace, "Cascadia Code", Consolas, monospace; cursor: pointer; color: var(--text-2);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px;
  transition: border-color .15s, color .15s, background .15s;
}
.ph:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.counter { text-align: right; font-size: .74rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.counter.near { color: var(--warn); }

/* segmented control (permissions) */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; padding: 5px 12px; border-radius: 7px; font-size: .82rem; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg label:hover span { color: var(--text); }
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ─── tables ───────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; background: var(--panel-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--hover) 60%, transparent); }
tr:last-child td { border-bottom: 0; }
.rank { font-weight: 800; width: 56px; font-variant-numeric: tabular-nums; color: var(--muted); }
.member { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.member .avatar { width: 30px; height: 30px; font-size: .8rem; }
.lvl { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .78rem; }
.xp-input { display: inline-flex; gap: 6px; }
.xp-input input { width: 110px; padding: 5px 9px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.open, .badge.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.badge.claimed { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
.badge.live { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

.progress { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), #4ade80); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-size: .75rem; color: var(--muted); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* ─── lists: modules + checklist ───────────────────────────────────────── */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; }
.rows .chip {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.rows .chip.on { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.rows .what { flex: 1; min-width: 0; }
.rows .what strong { display: block; font-size: .93rem; }
.rows .what .muted { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .go { color: var(--muted); display: grid; place-items: center; padding: 6px; border-radius: 8px; }
.rows .go:hover { background: var(--hover); color: var(--text); }
.rows form { margin: 0; }

.check {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line-2); color: var(--accent-ink);
}
.check .i { width: 13px; height: 13px; stroke-width: 3; }
li.ok .check { background: var(--accent); border-color: var(--accent); }
li.ok .what strong { color: var(--muted); font-weight: 600; }
.setup-progress { padding: 16px 20px 6px; }
.setup-progress .row { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 8px; }
.setup-progress strong { font-size: 1.4rem; }
.all-done { display: flex; align-items: center; gap: 10px; padding: 14px 20px 18px; color: var(--accent); font-weight: 700; }

.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; list-style: none; margin: 0; padding: 0; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.feature-list .i { color: var(--accent); width: 17px; height: 17px; margin-top: 2px; }
.feature-list li.off .i { color: var(--muted); }
.feature-list li.off { color: var(--muted); }

/* ─── message / embed preview ──────────────────────────────────────────── */
.msg-preview { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.msg-preview .msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.msg-preview .msg-head .tag {
  font-size: .62rem; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); letter-spacing: .04em;
}
.msg-preview .msg-head time { color: var(--muted); font-size: .75rem; }
.embed {
  background: var(--embed-bg); border-radius: 6px; border-left: 4px solid var(--embed-bar);
  padding: 10px 14px 12px; max-width: 520px; font-size: .88rem; color: var(--text);
}
.embed.green { border-left-color: #57f287; }
.embed .e-author { font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.embed .e-title { font-weight: 800; font-size: .95rem; margin-bottom: 4px; }
.embed .e-desc { white-space: pre-wrap; word-break: break-word; color: var(--text-2); }
.embed .e-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin-top: 10px; }
.embed .e-fields b { display: block; font-size: .78rem; }
.embed .e-fields span { font-size: .8rem; color: var(--text-2); }
.embed .e-foot { font-size: .74rem; color: var(--muted); margin-top: 10px; }
.mention { color: #8ea1ff; background: rgba(88, 101, 242, .18); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.fake-select {
  margin-top: 8px; max-width: 520px; display: flex; justify-content: space-between; align-items: center;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; padding: 9px 12px; color: var(--muted); font-size: .86rem;
}
.fake-buttons { display: flex; gap: 8px; margin-top: 8px; }
.fake-buttons span { padding: 6px 14px; border-radius: 5px; font-size: .82rem; font-weight: 600; color: #fff; background: #4e5058; }
.fake-buttons span.red { background: #da373c; }
.editor-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: 18px 20px; }
.editor-split + .editor-split { border-top: 1px solid var(--line); }
.editor-split h3 { margin-bottom: 12px; }

/* search */
.search-box { position: relative; }
.search-box .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-box input { padding: 7px 12px 7px 34px; width: 230px; font-size: .88rem; }

/* ─── flashes ──────────────────────────────────────────────────────────── */
.flashes { margin-bottom: 20px; display: grid; gap: 8px; }
.flash {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-weight: 600; font-size: .92rem;
  border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); transition: opacity .4s;
}
.flash > span { flex: 1; }
.flash.ok { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.flash.error { border-color: color-mix(in srgb, var(--error) 45%, transparent); color: var(--error); }
.flash.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.flash.fade { opacity: 0; }
.flash-close { background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 2px; display: grid; place-items: center; border-radius: 6px; }
.flash-close:hover { opacity: 1; background: var(--hover); }

/* ─── landing + server picker ──────────────────────────────────────────── */
.landing-bg {
  background:
    radial-gradient(900px 420px at 50% -120px, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    var(--bg);
}
.hero { text-align: center; padding: 84px 0 56px; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-weight: 900; letter-spacing: -.035em; line-height: 1.08; max-width: 780px; margin: 0 auto; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #4ade80, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 600px; margin: 18px auto 30px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.section-title { text-align: center; margin: 12px 0 22px; }
.section-title h2 { font-size: 1.3rem; }
.section-title p { color: var(--muted); margin: 6px 0 0; }
.feature { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); transform: translateY(-2px); }
.feature .chip { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: .9rem; margin: 0; }
.steps { counter-reset: step; }
.steps .feature h3::before {
  counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .75rem;
}
.server-card {
  display: flex; align-items: center; gap: 14px; padding: 18px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.server-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
.server-card .meta { flex: 1; min-width: 0; }
.server-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-card .go { color: var(--accent); }
.server-card.add { border-style: dashed; box-shadow: none; color: var(--muted); }
.server-card.add .avatar { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .big-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--panel-2); color: var(--muted); }
.empty .big-icon .i { width: 26px; height: 26px; }
.empty h1, .empty h2 { color: var(--text); margin-bottom: 8px; }
.empty p { max-width: 460px; margin: 0 auto 18px; }
.empty-inline { padding: 22px 20px; color: var(--muted); font-size: .9rem; }
footer.site { text-align: center; color: var(--muted); font-size: .85rem; padding: 32px 16px; border-top: 1px solid var(--line); margin-top: 40px; }

/* ─── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .main { padding: 26px 26px 64px; }
  .grid.wide-left { grid-template-columns: 1fr; }
  .editor-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { min-width: 0; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .server-switch { margin-bottom: 10px; }
  .nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav-group { display: contents; }
  .nav-label, .sidebar-foot { display: none; }
  .nav a { white-space: nowrap; }
  .nav a.active::before { display: none; }
  .main { padding: 20px 16px 56px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setting { grid-template-columns: 1fr; gap: 10px; }
  .wrap { padding: 20px 16px 56px; }
  .topbar { padding: 0 16px; }
  .logo-text, .me .who, .topbar .btn-label { display: none; }
  .me { padding-left: 8px; gap: 6px; }
  .topbar { gap: 6px; }
  .server-banner { padding: 16px; gap: 14px; }
  .server-banner .avatar.xl { width: 56px; height: 56px; }
  .page-head .actions { width: 100%; }
  .feature-list { grid-template-columns: 1fr; }
  .search-box input { width: 100%; }
  .card-head .right { width: 100%; }
  th, td { padding: 10px 14px; }
  .repeat-row, .repeat-row.reward { grid-template-columns: 1fr; }
  .repeat-head { display: none; }
  .repeat-row { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .embed .e-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
