/* Blisscord site: the admin panel's palette and type, one stylesheet for the
   landing, auth, invite, gift, template, consent, unsubscribe and developer
   portal pages. Class names are shared with the templates; keep them stable. */
:root {
  --bg-0: #1e1f22;
  --bg-1: #2b2d31;
  --bg-2: #313338;
  --bg-3: #383a40;
  --bg-hover: #404249;
  --bg: var(--bg-2);
  --bg-elev: var(--bg-1);
  --bg-input: var(--bg-0);
  --border: #3f4147;
  --text: #dbdee1;
  --text-strong: #f2f3f5;
  --muted: #949ba4;
  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --accent: var(--blurple);
  --accent-hover: var(--blurple-hover);
  --green: #23a559;
  --yellow: #f0b232;
  --red: #da373c;
  --danger: var(--red);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font); font-size: 14px; color: var(--text);
  background: radial-gradient(900px 500px at 50% -10%, rgba(88,101,242,.25), transparent 70%), var(--bg-2);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: #00a8fc; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .code { font-family: var(--mono); font-size: 12.5px; }
.code { display: inline-block; background: var(--bg-0); border-radius: 4px; padding: 4px 8px; color: var(--text-strong); word-break: break-all; }
.hidden { display: none !important; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 0 24px; height: 52px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.topbar-brand { font-weight: 800; letter-spacing: -0.02em; color: var(--text-strong); font-size: 16px; }
.topbar-brand:hover { text-decoration: none; }
.topbar-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar-link { color: var(--muted); font-weight: 600; padding: 6px 10px; border-radius: 4px; background: none; border: 0; cursor: pointer; }
.topbar-link:hover { background: var(--bg-3); color: var(--text); text-decoration: none; }
/* The hosted web client is the one action a visitor with no install can take,
   so it reads as a button rather than as another nav link. */
.topbar-cta { background: var(--blurple); color: #fff; }
.topbar-cta:hover { background: var(--blurple-hover); color: #fff; }
.topbar-user { color: var(--text-strong); font-weight: 600; padding: 0 6px; }
[data-signed-out] [data-when="in"], [data-signed-out] [data-when="staff"] { display: none; }
#account-nav:not([data-signed-out]) [data-when="out"] { display: none; }

/* Shell */
.shell { min-height: calc(100% - 52px); display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px 60px; }

/* Landing */
.hero { text-align: center; max-width: 620px; margin-top: 40px; }
.wordmark { margin: 0; font-size: clamp(40px, 8vw, 64px); font-weight: 800; letter-spacing: -0.03em; color: var(--text-strong); }
.lede { color: var(--muted); font-size: 16px; margin: 8px 0 24px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; }
.site-links { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; text-align: left; }
.site-links li { background: var(--bg-1); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.site-links a { font-weight: 700; color: var(--text-strong); }
.site-links span { color: var(--muted); font-size: 12.5px; }

/* Cards and forms */
.card { width: 100%; max-width: 480px; background: var(--bg-1); border-radius: var(--radius); padding: 28px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.card.dev, .card.oauth2 { max-width: 760px; }
.card-title { margin: 0 0 4px; font-size: 22px; color: var(--text-strong); }
.form { display: flex; flex-direction: column; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .field > label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .02em; }
.field input, .field select, .field textarea, .input { background: var(--bg-0); border: 1px solid transparent; border-radius: 4px; padding: 9px 10px; color: var(--text-strong); outline: none; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blurple); }
.field textarea { min-height: 84px; resize: vertical; }
.err { color: #fa777c; font-size: 12px; min-height: 16px; }
.form-err.ok { color: #57f287; }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--text); }
.check input { width: 16px; height: 16px; accent-color: var(--blurple); }
.notice { color: var(--text); }
.notice h2 { margin: 0 0 6px; font-size: 18px; color: var(--text-strong); }
.notice p { color: var(--muted); margin: 0 0 12px; }
.alt { margin-top: 12px; color: var(--muted); }
.invite { text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 4px; padding: 9px 16px; font-weight: 600; cursor: pointer; background: var(--bg-3); color: var(--text-strong); white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn-primary { background: var(--blurple); color: #fff; }
.btn-primary:hover { background: var(--blurple-hover); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-3); }
.btn:disabled { opacity: .5; cursor: default; }
.dev-danger { color: #fa777c; }

/* OAuth2 consent, gift, template */
.oauth2-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.oauth2-icon { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.oauth2-sub { color: var(--muted); margin: 4px 0 0; }
.oauth2-list { margin: 0; padding-left: 18px; color: var(--text); }
.oauth2-list li { margin: 4px 0; }
.oauth2-perms li { color: var(--muted); }
.oauth2-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* Developer portal */
.dev-nav { display: flex; gap: 6px; margin: 0 0 18px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.dev-nav a { color: var(--muted); font-weight: 600; padding: 6px 10px; border-radius: 4px; }
.dev-nav a.active, .dev-nav a:hover { color: var(--text-strong); background: var(--bg-3); text-decoration: none; }
.dev-nav-doc { margin-left: auto; }
.dev-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dev-head .card-title { margin: 0; }
.dev-inline { margin: 0 0 16px; padding: 14px; background: var(--bg-2); border-radius: var(--radius); }
.dev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--bg-2); border-radius: var(--radius); }
.dev-row-main { flex: 1; display: flex; flex-direction: column; color: var(--text-strong); min-width: 0; }
.dev-row-main:hover { text-decoration: none; }
.dev-row-id { font-size: 12px; color: var(--muted); }
.dev-icon-sm { width: 36px; height: 36px; border-radius: 8px; flex: none; object-fit: cover; }
.dev-icon-blank { display: inline-flex; align-items: center; justify-content: center; background: var(--blurple); color: #fff; font-weight: 700; }
.dev-icon { width: 80px; height: 80px; border-radius: 16px; object-fit: cover; }
.dev-iconrow { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.dev-crumb { color: var(--muted); margin: 0 0 8px; }
.dev-crumb a { color: var(--muted); }
.dev-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.dev-tabs a { padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; }
.dev-tabs a:hover { text-decoration: none; color: var(--text); }
.dev-tabs a.active { color: var(--text-strong); border-bottom-color: var(--blurple); }
.dev-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.dev-actions .dev-danger { margin-right: auto; }
.dev-token { display: flex; align-items: center; gap: 10px; }
.dev-token .code { flex: 1; }
.dev-hint { color: var(--muted); font-size: 12.5px; }
.dev-subtitle { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 22px 0 8px; }
.dev-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.dev-url { display: block; margin-bottom: 8px; }
.dev-empty { color: var(--muted); }
@media (max-width: 640px) { .shell { padding: 20px 12px 40px; } .card { padding: 20px; } .topbar { padding: 0 14px; } }
