:root {
  color-scheme: light;
  --bg: #f1f5f9;
  --ink: #0f172a;
  --muted: #475569;
  --line: #cbd5e1;
  --surface: #ffffff;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --danger: #b91c1c;
  --ok: #047857;
  --warn: #b45309;
  --rail: #0f172a;
  --rail-ink: #e2e8f0;
  --rail-muted: #94a3b8;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.login-split {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(18rem, 28rem) 1fr;
}

.login-brand {
  background: var(--rail);
  color: var(--rail-ink);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-brand h1 {
  margin: 0.5rem 0 0;
  font-size: 1.75rem;
}

.login-brand p {
  color: var(--rail-muted);
  line-height: 1.5;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-card {
  width: min(26rem, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.75rem;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.stack {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  background: #fff;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check input {
  width: auto;
}

.option-with-terms {
  display: grid;
  gap: 0.55rem;
}

.option-with-terms:not(:has(input[type="checkbox"]:checked)):not(:has(select option[value="new_member"]:checked)) .terms-panel {
  display: none;
}

.terms-panel {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-size: 0.88rem;
}

.terms-panel strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
}

.terms-panel ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
}

.terms-panel li::marker {
  color: var(--accent);
}

.pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--line);
  background: #f1f5f9;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.pill-terms {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
  white-space: normal;
}

.btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.65rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn.secondary {
  background: #e2e8f0;
  color: var(--ink);
}

.btn.danger {
  background: var(--danger);
}

.alert {
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.7rem 0.8rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert.success {
  border-color: var(--ok);
  color: var(--ok);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
}

.shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: 16.5rem 1fr;
}

.rail {
  background: var(--rail);
  color: var(--rail-ink);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rail-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.rail-brand img {
  width: 2rem;
  height: 2rem;
}

.rail-brand strong {
  display: block;
}

.rail-brand span {
  color: var(--rail-muted);
  font-size: 0.78rem;
}

.rail nav {
  display: grid;
  gap: 0.25rem;
}

.rail nav a {
  text-align: left;
  background: transparent;
  color: var(--rail-ink);
  text-decoration: none;
  padding: 0.55rem 0.6rem;
}

.rail nav a.active {
  background: #1e3a5f;
}

.rail-foot {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--rail-muted);
}

.workspace {
  padding: 1.5rem 1.75rem 2.5rem;
}

.workspace h1 {
  margin: 0 0 0.35rem;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 46rem;
}

.cards {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 1rem 0 1.5rem;
}

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

.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.status-published {
  color: var(--ok);
  font-weight: 600;
}

.status-draft {
  color: var(--warn);
  font-weight: 600;
}

.status-archived {
  color: var(--muted);
}

.form-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  align-items: end;
  margin: 1rem 0;
}

.inline {
  display: inline;
}

.muted {
  color: var(--muted);
}

.facts {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0 0 1.5rem;
}

.facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.facts dd {
  margin: 0.2rem 0 0;
}

.workspace table.data a,
.workspace .card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 860px) {
  .login-split,
  .shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 12rem;
  }
}
.theme-usage-cards {
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
}

a.theme-usage-card {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 0.35rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.theme-usage-card:hover,
a.theme-usage-card.is-active {
  border-color: var(--theme-accent, var(--accent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--theme-accent, var(--accent)) 35%, transparent);
}

.theme-usage-card__swatch {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--theme-accent, #64748b);
}

.theme-usage-card__stats {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.theme-usage-card__stats strong {
  color: var(--ink);
}


