/* UA Hub. Palette follows the Spirit Bomb tools (Creative Performance). */
:root {
  --brand: #f6931c;
  --brand-ink: #0b0b0b;
  --plane: #f6f5f3;
  --surface: #ffffff;
  --ink: #0b0b0b;
  --muted: #6f6c68;
  --line: #e6e3dd;
  --good: #17a673;
  --warning: #b97800;
  --critical: #d7263d;
  --focus: #1f6feb;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --plane: #0b0b0b;
    --surface: #161615;
    --ink: #f4f3f1;
    --muted: #a19d97;
    --line: #2c2a27;
    --good: #3cc68f;
    --warning: #ffb020;
    --critical: #ff6b7d;
    --focus: #6ea8ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* top bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.account { display: flex; align-items: center; gap: 16px; font-size: 14px; flex-wrap: wrap; justify-content: flex-end; }
.account form { margin: 0; }
.account .who { color: var(--muted); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* layout */
.page { max-width: 1080px; margin: 0 auto; padding: 32px 24px 64px; }
.narrow { max-width: 440px; margin: 0 auto; padding: 48px 16px 64px; }
.intro h1 { margin: 0 0 4px; font-size: 28px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: -6px 0 12px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px;
}

/* forms */
.form-card h1 { margin: 0 0 8px; font-size: 24px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=password] {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--plane); border: 1px solid var(--line); border-radius: 8px;
}
button, .button {
  display: inline-block; margin-top: 18px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
button.primary, .button.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.danger { color: var(--critical); }
button.small, .button.small { margin-top: 0; padding: 4px 10px; font-size: 13px; }
.alert {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--critical);
  color: var(--critical); background: color-mix(in srgb, var(--critical) 8%, transparent);
}
.notice {
  padding: 12px 14px; border-radius: 8px; border: 1px solid var(--good);
  background: color-mix(in srgb, var(--good) 8%, transparent);
}

/* tool cards */
.tools {
  list-style: none; margin: 24px 0 0; padding: 0;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.tool { display: flex; flex-direction: column; }
.tool-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tool h2 { margin: 0; font-size: 19px; }
.tool h2 a { text-decoration: none; }
.tool p { margin: 8px 0 12px; }
.tool .button { margin-top: auto; align-self: flex-start; }
.meta { display: flex; gap: 20px; margin: 0 0 16px; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.empty { margin-top: 24px; }

.badge {
  flex: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap;
}
.badge-fresh { color: var(--good); }
.badge-stale { color: var(--warning); }
.badge-never, .badge-unknown { color: var(--muted); }

/* admin */
.admin-grid { display: grid; gap: 24px; margin-top: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.inline { display: inline; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions form { margin: 0; }
.tag { font-size: 12px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.temp-password {
  font: 600 18px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 10px 12px; background: var(--plane); border: 1px dashed var(--brand); border-radius: 8px;
  user-select: all; word-break: break-all;
}

@media (max-width: 600px) {
  .bar { padding: 10px 16px; flex-wrap: wrap; }
  .page { padding: 24px 16px 48px; }
  .account .who { display: none; }
}

/* settings: updates */
.inline-form { margin-bottom: 8px; }
.inline-form input[type=number] {
  width: 8em; padding: 8px 10px; font: inherit; color: var(--ink);
  background: var(--plane); border: 1px solid var(--line); border-radius: 8px;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
pre.log {
  margin: 6px 0 0; max-height: 12em; overflow: auto; padding: 8px 10px; font-size: 12px;
  background: var(--plane); border: 1px solid var(--line); border-radius: 6px; white-space: pre-wrap;
}

/* tools on their own site (link-out cards) */
.external-note { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
