:root {
  /* Moony colors: night navy + moon yellow (the bot's avatar and banner) */
  --bg: #0c0a22;
  --panel: #161430;
  --panel-2: #1f1c42;
  --line: #2a2750;
  --text: #f7f5ff;
  --muted: #aca8d2;
  --accent: #ffd166;
  --accent-hover: #ffc53d;
  --accent-soft: #ffd780;
  --on-accent: #16133f; /* text on yellow buttons and the active menu item */
  --glow: rgba(255, 209, 102, 0.22);
  --ok: #2ee87a;
  --error: #ff4d5e;
  --discord: #313338;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1 { font-size: 28px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 22px; margin: 0 0 16px; }
h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); font-size: 14px; }
.ok { color: var(--ok); font-size: 14px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.nav nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); }
.nav nav > a:not(.button):hover { color: var(--text); }
.nav nav > a.nav-premium {
  padding: 6px 12px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffd84d, #f5a623);
  color: #3b2600;
  font-weight: 600;
}
.nav nav > a.nav-premium:hover { color: #3b2600; filter: brightness(1.08); }
/* Premium server names: same gold as the Premium button in the nav. */
.premium-name {
  background: linear-gradient(135deg, #ffd84d, #f5a623);
  -webkit-background-clip: text;
  background-clip: text;
  color: #ffc53a;
  -webkit-text-fill-color: transparent;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand img, .user img { width: 28px; height: 28px; border-radius: 50%; }
.user { display: flex; align-items: center; gap: 8px; color: var(--text); }
/* Nav: your picture opens a small menu (Dashboard, Log out). */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: var(--panel-2); }
.user-menu .chevron { color: var(--muted); transition: transform 0.15s; }
.user-menu[open] .chevron { transform: rotate(180deg); }
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  z-index: 20;
}
.user-dropdown a, .user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.user-dropdown a:hover { background: var(--panel-2); }
.user-dropdown .icon { width: 18px; height: 18px; color: var(--accent-soft); }
.user-dropdown form { margin: 0; }
.user-dropdown button.logout, .user-dropdown button.logout .icon { color: var(--error); }
.user-dropdown button.logout:hover { background: rgba(237, 66, 69, 0.12); }

.button, button {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.button:hover, button:hover { border-color: var(--muted); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.soon { cursor: default; color: var(--muted); border-style: dashed; }
button.link { padding: 0; border: 0; background: none; color: var(--muted); }
button.link:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wide { width: 100%; max-width: 1000px; margin: 0 auto; padding: 32px 24px 64px; }
.center { text-align: center; }
.center .button { margin-top: 16px; }

.hero { text-align: center; padding: 24px 0 32px; }
.hero img { width: 88px; height: 88px; border-radius: 50%; margin-bottom: 12px; }
.hero h1 { font-size: 36px; }
/* Public premium page: big gold crown + gold "Premium", like the side menu link. */
.premium-title { display: inline-flex; align-items: center; gap: 12px; }
.premium-title .icon { width: 36px; height: 36px; stroke: url(#gold); color: #ffc53a; }
.hero p { max-width: 560px; margin: 0 auto 20px; color: var(--muted); }
.hero .price { color: var(--text); font-size: 20px; font-weight: 600; }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 40px; }
.stats div, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stats span { display: block; color: var(--muted); font-size: 13px; }
.stats b { font-size: 24px; font-weight: 600; }
.stats .online { color: var(--ok); font-size: 18px; }
.stats .offline { color: var(--error); font-size: 18px; }


.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.feature-icon { display: inline-flex; color: var(--accent-soft); }
.feature-icon .icon { width: 28px; height: 28px; }
.features p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.server { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.server .button { width: 100%; margin-top: auto; }
.server.inactive { background: transparent; }
.server.inactive .server-icon { filter: grayscale(1); opacity: 0.6; }
.server-icon { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.server-icon-text { display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; }

/* The side menu stays in place while the page scrolls. Its background + border are drawn by .dashboard,
   so the column stays colored all the way down even though the menu itself is only one screen tall. */
.dashboard {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  flex: 1;
  background: linear-gradient(to right, var(--panel) 229px, var(--line) 229px, var(--line) 230px, transparent 230px);
}
.dashboard main { padding: 28px 32px 48px; max-width: 840px; min-width: 0; }
.dashboard h1 { font-size: 24px; margin-bottom: 16px; }
.side { padding: 16px 12px; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
.side-server { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; overflow-wrap: anywhere; font-size: 14px; }
.side-server .server-icon { width: 36px; height: 36px; font-size: 12px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); color: var(--text); font-size: 14px; }
.side a .icon { flex: none; color: var(--accent-soft); }
.side a:hover { background: var(--panel-2); }
.side a.active { background: var(--accent); color: var(--on-accent); }
.side a.active .icon { color: var(--on-accent); }
/* Switched-off features: darker, so the ones that are on stand out. */
.side a.off { color: var(--muted); opacity: 0.5; }
.side a.off .icon { color: var(--muted); }
.side a.off:hover { opacity: 0.8; }
.side a.off.active { color: var(--on-accent); opacity: 0.7; }
.side a.off.active .icon { color: var(--on-accent); }
.side .back { margin-top: 12px; }

.row { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.label { font-weight: 600; font-size: 15px; }
.control { display: flex; justify-content: flex-end; }
.locked .label, .locked .muted, .locked .control { opacity: 0.55; }
.locked .crown { opacity: 1; }
.crown { cursor: pointer; }

input[type="text"], input[type="number"], input[type="url"], input[type="search"], input[type="datetime-local"], select, textarea {
  width: 100%;
  min-width: 0; /* never wider than its column, so narrow windows don't scroll sideways */
  color-scheme: dark;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
textarea { resize: vertical; }
:disabled { cursor: not-allowed; }
.color { display: flex; gap: 8px; width: 100%; }
input[type="color"] { flex: none; width: 40px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { display: block; width: 100%; height: 100%; border-radius: 12px; background: #5c5e66; pointer-events: none; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { background: var(--on-accent); }
.switch input:checked + span::after { left: 21px; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.savebar {
  position: sticky;
  bottom: 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.savebar.dirty, .savebar.saved { display: flex; }
.savebar .button.primary { background: var(--ok); border-color: var(--ok); color: #06301a; font-weight: 600; }
.savebar .button.primary:hover { background: #26cf6b; border-color: #26cf6b; }
.savebar.dirty { border-color: var(--accent); }
.savebar.saved { border-color: var(--ok); }
.savebar.saved span { color: var(--ok); font-weight: 600; }
.savebar.saved .actions { display: none; }

.alert { padding: 10px 14px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 14px; }
.alert.success { border-color: var(--ok); }
.alert.error { border-color: var(--error); }

.footer { margin-top: auto; padding: 20px 16px; border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 14px; text-align: center; }
.footer p { margin: 0; }
.footer .footer-legal { margin-top: 6px; font-size: 13px; }
.footer a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(179, 184, 230, 0.4); text-underline-offset: 3px; }
.footer a:hover { color: var(--text); text-decoration-color: currentColor; }
/* /terms and /privacy */
.legal { max-width: 760px; }
.legal h2 { font-size: 19px; margin: 26px 0 8px; }
.legal p { line-height: 1.6; margin: 0 0 8px; }

/* Home page feature sections */
.feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding: 44px 0; }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h2 { font-size: 26px; margin-bottom: 10px; }
.feature p { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips code, .chips span { padding: 3px 8px; border-radius: 6px; background: var(--panel-2); color: var(--accent-soft); font-size: 13px; }
.chips.small { margin-top: 10px; }
.chips.small span { font-size: 12px; color: var(--muted); }
.screenshot { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.cta { text-align: center; padding: 48px 0 16px; }
/* Home page: moonlight glow behind the top, "in one bot" in yellow, the "…and much more" list */
.home { position: relative; isolation: isolate; }
/* A soft ellipse behind the logo and title that fades out before it reaches any edge (so no hard lines). */
.home::before { content: ""; position: absolute; inset: 0 0 auto; height: 560px; background: radial-gradient(closest-side at 50% 42%, var(--glow), transparent); pointer-events: none; z-index: -1; }
.hero h1 { font-weight: 800; letter-spacing: -0.02em; }
.highlight { color: var(--accent); }
.feature h2 { font-weight: 800; letter-spacing: -0.01em; }
.more { text-align: center; padding: 32px 0 8px; }
.more h2 { font-size: 22px; margin-bottom: 4px; }
.more .chips { justify-content: center; }
.more .chips span { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px; }

/* A message drawn like Discord shows it */
.dc-message { display: flex; gap: 14px; padding: 18px; border-radius: 12px; background: var(--discord); border: 1px solid var(--line); color: #dbdee1; font-size: 15px; line-height: 1.4; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.dc-body { min-width: 0; flex: 1; }
.dc-name { color: #f2f3f5; font-weight: 600; margin-bottom: 4px; }
.dc-app { padding: 1px 5px; border-radius: 4px; background: #5865f2; color: #fff; font-size: 10px; vertical-align: 2px; }
.dc-body p { margin-bottom: 6px; }
.dc-embed { max-width: 440px; margin-top: 6px; padding: 10px 14px 12px; border-left: 4px solid #5865f2; border-radius: 4px; background: #2b2d31; }
.dc-author { font-size: 13px; font-weight: 600; color: #f2f3f5; margin-bottom: 4px; }
.dc-title { font-weight: 700; color: #f2f3f5; margin-bottom: 4px; }
.dc-text { font-size: 14px; }
.dc-text b, .dc-body p b { color: #f2f3f5; }
.dc-text .big { display: block; font-size: 22px; font-weight: 700; color: #f2f3f5; margin: 2px 0; }
.mention { padding: 0 2px; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; font-size: 14px; }
.dc-field b { display: block; color: #f2f3f5; font-size: 13px; }
.dc-wide { grid-column: 1 / -1; }
.dc-image, .dc-attachment { display: block; width: 100%; max-width: 440px; margin-top: 10px; border-radius: 6px; }
.dc-footer { margin-top: 8px; color: #b5bac1; font-size: 12px; }
.dc-buttons { display: flex; gap: 8px; margin-top: 8px; }
.dc-button { padding: 6px 14px; border-radius: 4px; color: #fff; font-size: 14px; font-weight: 500; }
.dc-primary { background: #5865f2; }
.dc-success { background: #248046; }
.dc-secondary { background: #4e5058; }

/* Commands page */
.search { margin: 20px 0 8px; max-width: 420px; }
.command-group { margin-top: 28px; }
.command-group h2 small { color: var(--muted); font-size: 15px; font-weight: 400; }
.command-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.command { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.command-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.command code { color: var(--accent-soft); font-size: 15px; font-weight: 600; }
.command p { color: var(--muted); font-size: 14px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; background: var(--panel-2); color: var(--muted); font-size: 12px; white-space: nowrap; }
[hidden] { display: none !important; }

.control.inline { gap: 8px; align-items: center; }
.control.inline input { width: 110px; }
.control.inline form { margin: 0; }
.subhead { margin: 28px 0 4px; font-size: 18px; }
/* Temp voice, role panels, sticky messages, announcements */
.page-intro { margin: -8px 0 20px; }
.stack { display: grid; gap: 14px; }
.stack h3 { margin: 0; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.panel-card { margin-bottom: 20px; }
.panel-card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-card > p.muted { margin: 4px 0 0; }
.minihead { margin: 18px 0 0; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.panel-edit { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.panel-edit summary { cursor: pointer; color: var(--accent-soft); font-size: 14px; margin-bottom: 12px; }
.inline-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
/* "+ New panel" / "+ New sticky message": the button opens the form and disappears (Cancel reloads the page). */
.new-item { margin-top: 16px; }
.new-item > summary { list-style: none; display: inline-flex; cursor: pointer; }
.new-item > summary::-webkit-details-marker { display: none; }
.new-item[open] > summary { display: none; }
.color-field.locked { opacity: 0.45; }
.duration { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; }
a.link-plain { color: var(--text); }
a.link-plain:hover { text-decoration: underline; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
/* Levels page: level rewards. A reward over the free limit (premium ended) is dimmed. */
.rewards { margin-top: 8px; }
.role-name { font-weight: 600; }
/* "PREMIUM" link inside a sentence: gold like the Premium button, bold. */
a.premium-word { font-weight: 700; text-decoration: none; }
a.premium-word:hover { filter: brightness(1.15); }
.inactive .label, .inactive .role-name { opacity: 0.55; }
.reward-add { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 12px; align-items: end; margin-top: 16px; }
.reward-add .field { margin: 0; }
.reward-add.locked { opacity: 0.55; }
@media (max-width: 640px) { .reward-add { grid-template-columns: minmax(0, 1fr); } }
.subhead small { font-weight: 400; }
.button.danger:hover { border-color: var(--error); color: var(--error); }
.top-gap { margin-top: 16px; }
.link-accent { color: var(--accent-soft); text-decoration: underline; }
.command-form { margin-top: 20px; display: grid; gap: 14px; }
.command-form h3 { font-size: 17px; }
.command-form.locked { opacity: 0.55; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-weight: 600; font-size: 14px; }
.with-prefix { display: flex; align-items: center; gap: 8px; }
.with-prefix b { color: var(--accent-soft); }
.actions.left { justify-content: flex-start; }
.js .hidden-js { display: none; }

.buy { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

@media (max-width: 720px) {
  .nav { padding: 12px 16px; }
  .wide { padding: 24px 16px 48px; }
  .hero h1 { font-size: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 32px 0; }
  .feature:nth-of-type(even) .feature-text { order: 0; }
  .dc-message { padding: 12px; gap: 10px; }
  .dc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard { grid-template-columns: minmax(0, 1fr); background: none; }
  /* Phones: the menu sits above the page and scrolls away with it. */
  .side { display: flex; flex-wrap: wrap; gap: 4px; position: static; max-height: none; background: var(--panel); border-bottom: 1px solid var(--line); }
  .side-server { width: 100%; }
  .side .back { margin-top: 0; }
  .dashboard main { padding: 20px 16px 40px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .control { justify-content: flex-start; }
}

/* "Send test message" under the Welcome/Goodbye settings. */
.test-send {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.test-send p { margin: 4px 0 0; }
.test-send .button { flex-shrink: 0; }
@media (max-width: 600px) {
  .test-send { flex-direction: column; align-items: stretch; }
}

/* Placeholder chips under message texts ({user}, {server} …). */
.control:has(.placeholders) { flex-direction: column; align-items: stretch; }
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--accent-soft);
  font: 12px ui-monospace, Consolas, monospace;
  cursor: pointer;
}
.chip:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.chip:disabled { cursor: default; opacity: 0.6; }

/* Page title with its icon, and the feature's on/off switch on the right. */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.page-head .page-title { margin: 0; }
.page-title { display: flex; align-items: center; gap: 12px; }
.page-title .icon { width: 28px; height: 28px; color: var(--accent-soft); flex: none; }
.page-title .crown .icon, .label .crown .icon { width: 16px; height: 16px; color: #ffc53a; vertical-align: -2px; }
.switch.big { width: 52px; height: 30px; }
.switch.big span { border-radius: 15px; }
.switch.big span::after { width: 24px; height: 24px; }
.switch.big input:checked + span::after { left: 25px; }
.off-note { border-color: var(--line); color: var(--muted); }

/* Bot owner: "All bot servers" on the server list, and the bar on servers opened as the owner. */
.owner-title { display: flex; align-items: center; gap: 10px; margin-top: 40px; }
.owner-title small { font-weight: 400; font-size: 15px; }
/* Admin pages */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 8px; border-bottom: 1px solid var(--line); padding: 10px 0; position: sticky; top: 0; z-index: 5; background: var(--bg); }
/* Admin: wider page, and on a big screen the tabs spread over one whole row. */
.wide.admin { max-width: 1240px; }
@media (min-width: 1100px) { .admin-tabs { flex-wrap: nowrap; justify-content: space-between; } .admin-tabs a { flex: 1 1 auto; } }
.admin-section { scroll-margin-top: 70px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.admin-section:last-child { border-bottom: 0; }
.admin-section > .alert:first-child { margin-top: 20px; }
.admin-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 10px; white-space: nowrap; border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.admin-tabs a .icon { width: 16px; height: 16px; }
.admin-tabs a:hover { background: var(--panel-2); color: var(--text); }
.admin-tabs a.active { background: var(--accent); color: var(--on-accent); }
.admin .owner-title:first-of-type { margin-top: 24px; }
.admin-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-tools p { margin: 4px 0 0; }
.leave-form { margin: 2px 0 0; }
button.link-danger { background: none; border: 0; padding: 2px 4px; color: var(--error); font-size: 12px; cursor: pointer; }
button.link-danger:hover { text-decoration: underline; }
.presence-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.duration .unit { align-self: center; color: var(--muted); font-size: 14px; }
.maintenance-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; }
.maintenance-card.on { border-color: #f5a623; background: rgba(245, 166, 35, 0.1); }
.button.maintenance-on { background: #f5a623; border-color: #f5a623; color: #3b2600; font-weight: 600; }
.command-off { display: flex; gap: 10px; }
.command-off input { flex: 1; }
.server-links { display: flex; justify-content: center; gap: 4px; margin-top: 2px; }
button.link-button { background: none; border: 0; padding: 2px 4px; color: var(--muted); font-size: 12px; cursor: pointer; }
button.link-button:hover { color: var(--text); text-decoration: underline; }
.server-dialog { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-align: left; }
.server-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.server-dialog .dialog-close { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 8px; }
.server-dialog .dialog-close:hover { color: var(--text); }
.dialog-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-right: 24px; }
.dialog-head img, .dialog-head .server-icon { width: 48px; height: 48px; flex: none; }
.dialog-head h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.info-list { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 14px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.info-list dd small { display: block; font-size: 12px; }
.backup-list { margin-top: 8px; }
.error-row { align-items: flex-start; }
.error-main { min-width: 0; flex: 1; }
.error-details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 4px; }
.error-details pre { max-height: 260px; overflow: auto; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.site-banner { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; background: #5865f2; color: #fff; font-size: 14px; text-align: center; }
.site-banner span { overflow-wrap: anywhere; }
.site-banner-close { background: none; border: 0; color: inherit; opacity: 0.8; cursor: pointer; font-size: 14px; padding: 2px 6px; }
.site-banner-close:hover { opacity: 1; }
.site-banner.preview { border-radius: var(--radius); }
.discord-only { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.discord-only .icon { width: 16px; height: 16px; flex: none; }
.discord-only code { color: var(--text); }
.banner-extend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.banner-extend .muted { margin-right: 4px; }
.banner-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.banner-presets .chip { text-align: left; }
.inline-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.maintenance-form { margin-top: 12px; }
.field.half { max-width: calc(50% - 7px); }
@media (max-width: 640px) { .field.half { max-width: none; } }
.link-field { display: flex; gap: 8px; align-items: center; }
.link-field input { flex: 1; min-width: 0; }
.color-group { margin: 22px 0 8px; font-size: 15px; color: var(--muted); }
/* Admin colors: 4 next to each other on a full screen, then 3, 2 and 1 as the window gets narrower. */
.color-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.color-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name color" "note note"; align-items: center; gap: 4px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.color-item b { grid-area: name; overflow-wrap: anywhere; }
.color-item small { grid-area: note; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.color-item .color { grid-area: color; width: auto; gap: 6px; }
.color-item input[type="color"] { width: 30px; height: 30px; }
.color-item input[type="text"] { width: 84px; padding: 4px 8px; height: 30px; font-size: 12px; font-family: ui-monospace, monospace; }
.error-row p { margin: 4px 0 0; overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: 13px; }
.tag.error-tag { background: rgba(255, 77, 94, 0.15); color: var(--error); }
.alert.warning { border-color: #f5a623; background: rgba(245, 166, 35, 0.1); }
.alert.problems ul { margin: 6px 0; padding-left: 20px; }
.alert.problems li { margin: 2px 0; overflow-wrap: anywhere; }
.alert.problems p { margin: 0; }
.notice-page .alert h1 { font-size: 22px; margin: 0 0 6px; color: #ffc53a; }
.notice-page .alert p { margin: 0; }
.maintenance-banner { padding: 8px 16px; text-align: center; background: rgba(245, 166, 35, 0.15); border-bottom: 1px solid #f5a623; color: #ffc53a; font-size: 14px; }
@media (max-width: 640px) { .presence-row { grid-template-columns: minmax(0, 1fr); } .command-off { flex-direction: column; } }
.admin-title { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.admin-title .icon { width: 30px; height: 30px; stroke: url(#gold); color: #ffc53a; }
/* Server cards on the admin page: small buttons side by side – Open + Give premium (gold) / Remove premium (red). */
.admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin-top: auto; }
.admin-actions form { margin: 0; display: flex; }
.server .admin-actions .button {
  width: 100%;
  margin: 0;
  /* same height, text on one line and in the middle – "Remove premium" used to wrap and make its button taller */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.button.small { padding: 5px 8px; font-size: 12px; justify-content: center; }
.button.give-premium { background: linear-gradient(135deg, #ffd84d, #f5a623); border-color: transparent; color: #3b2600; font-weight: 600; }
.button.give-premium:hover { border-color: transparent; filter: brightness(1.08); }
.button.remove-premium { background: rgba(255, 77, 94, 0.15); border-color: var(--error); color: var(--error); font-weight: 600; }
.button.remove-premium:hover { background: rgba(255, 77, 94, 0.25); border-color: var(--error); }
.user-dropdown a.admin-link .icon { stroke: url(#gold); color: #ffc53a; }
.owner-title .icon { color: #ffc53a; }
.owner-bar { display: flex; align-items: flex-start; gap: 10px; border-color: #ffc53a; }
.owner-bar .icon { flex: none; color: #ffc53a; }

/* All bot servers: search (by name or ID) and the server ID under the name. */
.server-search { display: flex; gap: 8px; margin: 0 0 16px; max-width: 520px; }
.server-search select { width: auto; flex: none; }
.server-search input { flex: 1; min-width: 0; }
.server-id { margin: -4px 0 4px; font: 12px ui-monospace, Consolas, monospace; color: var(--muted); }
.card.server[hidden] { display: none; }

/* Premium in the side menu: crown in the same gold as the Premium button (gradient defined once in <body>). */
.svg-defs { position: absolute; }
.side a.premium-link .icon, .side a.premium-link.active .icon { stroke: url(#gold); color: #ffc53a; }

/* Bot status (bot owner, top of the server list). */
.bot-status { margin-bottom: 40px; }
.bot-status .owner-title { margin-top: 0; }
.status-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.status-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.status-tile span { font-size: 13px; color: var(--muted); }
.status-tile b { font-size: 20px; }
.status-tile .ok { color: var(--ok); }
.status-tile .warn { color: #ffc53a; }
.status-tile .bad { color: var(--error); }
.status-details { margin: 16px 0 8px; }
.status-details h3 { margin: 0 0 10px; }
.status-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.status-list li { display: flex; gap: 10px; justify-content: space-between; overflow-wrap: anywhere; }
.status-list time { flex: none; color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
.status-tile small { font-size: 12px; color: var(--muted); }

/* Most used commands: a leaderboard. */
.command-board { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; }
@media (max-width: 800px) { .command-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .command-board { grid-template-columns: minmax(0, 1fr); } }
.command-board li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.command-board .place { width: 24px; flex: none; color: #ff79c6; font-weight: 700; }
.command-board .share { color: var(--muted); font-weight: 400; font-size: 13px; }
.command-board b { margin-left: auto; }
.status-tile .today { font-size: 15px; font-weight: 500; color: var(--muted); }
.status-tile .today .ok { color: var(--ok); }
.status-tile .today .bad { color: var(--error); }
.status-tile span.premium-name { color: transparent; }
.status-tile .today span { font-size: inherit; }
.status-tile .share { color: var(--muted); font-weight: 400; font-size: 15px; }
.status-tile b .sep { color: var(--text); font-size: inherit; }

/* Admin → Overview: "Website" and "Device" headings above their rows */
.status-group { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 18px 0 8px; flex-wrap: wrap; }
.status-group .icon { width: 18px; height: 18px; color: #ffc53a; }
.status-group .muted { font-weight: 400; font-size: 13px; }

/* Welcome / Goodbye / Levels: live preview under the settings */
.preview { margin-top: 28px; }
.preview .dc-message { max-width: 560px; }
.preview .small { margin-top: 8px; font-size: 13px; }

/* Notifications page: what to paste for each platform */
.hint-list { margin: -4px 0 4px; padding-left: 18px; line-height: 1.6; }
