/* Brand tokens taken from shard.tech (accent #fa002d, near-black, dark navy, Open Sans). */
:root {
  --brand-accent: #fa002d;
  --brand-navy: #0c1a27;
  --brand-ink: #16141a;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: var(--brand-ink);
  --muted: #5b6270;
  --border: #dfe2e7;

  --green: #12805c;
  --green-bg: #e3f4ec;
  --amber: #a15c00;
  --amber-bg: #fdf0d9;
  --red: #c4162a;
  --red-bg: #fde4e6;

  --radius: 10px;
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a121b;
    --surface: #121e2b;
    --text: #eef1f5;
    --muted: #9aa5b4;
    --border: #253446;
    --green: #4cc58f;
    --green-bg: #11372a;
    --amber: #f2b24c;
    --amber-bg: #3b2c10;
    --red: #ff6b78;
    --red-bg: #42161c;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
}

a { color: inherit; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Brand bar: the logo is white-on-dark, so this stays navy in both themes. */
.brand-bar { background: var(--brand-navy); border-bottom: 3px solid var(--brand-accent); color: #fff; }
.brand-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand-bar__logo img { display: block; width: 180px; height: auto; }
.brand-bar__title { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }

main { flex: 1; }
main.wrap { padding-top: 32px; padding-bottom: 48px; }

h1, h2 { font-weight: 700; line-height: 1.25; margin: 0; }

/* Status dot + colours */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dot--lg { width: 16px; height: 16px; }
.pill--green, .banner--green { --tone: var(--green); --tone-bg: var(--green-bg); }
.pill--amber, .banner--amber { --tone: var(--amber); --tone-bg: var(--amber-bg); }
.pill--red, .banner--red { --tone: var(--red); --tone-bg: var(--red-bg); }

.banner {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px; margin-bottom: 24px;
  border-radius: var(--radius);
  background: var(--tone-bg); color: var(--tone);
  border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent);
}
.banner h1 { font-size: 1.375rem; color: var(--text); }

.services { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.service { padding: 16px 20px; }
.service + .service { border-top: 1px solid var(--border); }
.service__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.service__name { font-weight: 600; }
.service__desc { margin: 6px 0 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 600;
  background: var(--tone-bg); color: var(--tone);
}

.note { color: var(--muted); font-size: 0.875rem; margin-top: 16px; }

.site-footer { padding: 20px 0; border-top: 1px solid var(--border); font-size: 0.875rem; color: var(--muted); }

/* --- Admin --- */
.admin__bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 20px; }
.admin__user { color: var(--muted); font-size: 0.875rem; }
.admin__list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card.dragging { opacity: 0.5; }
.card.drop-target { outline: 2px dashed var(--brand-accent); outline-offset: 2px; }
.card.dirty { border-color: var(--amber); }

.row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.row__move { display: flex; flex-direction: column; gap: 4px; }
.row__fields { display: grid; gap: 10px; grid-template-columns: 1fr 180px; }
.row__fields .full { grid-column: 1 / -1; }
.row__actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 560px) { .row__fields { grid-template-columns: 1fr; } }

label { display: grid; gap: 4px; font-size: 0.875rem; font-weight: 600; }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; width: 100%;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 1px; }

.btn {
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:disabled { opacity: 0.4; cursor: default; }
.btn--icon { padding: 2px 8px; line-height: 1.2; }
.btn--primary { background: var(--brand-accent); border-color: var(--brand-accent); color: #fff; }
.btn--danger { color: var(--red); }
.handle { cursor: grab; color: var(--muted); text-align: center; user-select: none; }

.add { display: grid; gap: 12px; }
.add h2 { font-size: 1.125rem; }
.add .btn { justify-self: start; }

.flash { padding: 10px 14px; border-radius: 6px; margin: 0 0 16px; background: var(--green-bg); color: var(--green); font-weight: 600; }
.flash.error { background: var(--red-bg); color: var(--red); }
