/* Abstract Client Hub — V3 brand tokens, app density */
:root {
  color-scheme: light;
  --ink: #141414;
  --ink-soft: rgba(20, 20, 20, 0.8);
  --muted: rgba(20, 20, 20, 0.58);
  --line: #e6e2db;
  --line-strong: #d4cfc6;
  --panel: #f7f5f1;
  --surface: #ffffff;
  --gold: #d4a574;
  --gold-hover: #c99456;
  --gold-soft: rgba(212, 165, 116, 0.14);
  --sage: #c5dbbe;
  --good: #2f6b3a;
  --bad: #8b3a2b;
  --warn: #8a6a2f;
  --shadow: 0 18px 48px rgba(20, 20, 20, 0.08);
  --radius-card: 10px;
  --radius-control: 10px;
  --heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --page-pad: 24px;
  --max-admin: 1360px;
  --max-client: 880px;
  --max-client-wide: 960px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--body);
  color: var(--ink);
  background: #fbfaf8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

body.has-preview-banner { padding-top: 48px; }

img { max-width: 100%; display: block; }
a { color: var(--ink); }
button, input, select, textarea {
  font: inherit;
  color: var(--ink);
}
button {
  cursor: pointer;
  border: none;
  background: none;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }

h1, h2, h3, .display {
  font-family: var(--heading);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}
.display {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 500;
}
.eyebrow {
  margin: 0 0 var(--space-2);
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.45; }
.lead {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 14px 28px;
  border-radius: 0;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  /* Dark ink on brand gold — keeps #d4a574 and meets contrast */
  background: #d4a574;
  color: #141414;
  border-color: #d4a574;
}
.btn-primary:hover:not(:disabled) {
  background: #c99456;
  border-color: #c99456;
  color: #141414;
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
  min-height: 44px;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--gold-soft);
  border-color: var(--gold);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  letter-spacing: 0.12em;
  min-height: 44px;
}
.btn-ghost:hover:not(:disabled) {
  color: var(--ink);
  background: rgba(20, 20, 20, 0.04);
}
.btn-full { width: 100%; }
.btn-sm {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 11px;
}

/* Forms */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-4);
}
.field > span,
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: #fff;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus,
.btn:focus-visible {
  outline: 2px solid rgba(212, 165, 116, 0.35);
  outline-offset: 1px;
}

/* Shell chrome */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px var(--page-pad);
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
body.has-preview-banner .topbar { top: 48px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-family: var(--heading);
  font-size: 20px;
  font-weight: 600;
  flex: 0 0 auto;
}
.mark-lg {
  width: 48px;
  height: 48px;
  font-size: 26px;
}
.brand-title {
  font-family: var(--heading);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shell {
  max-width: var(--max-admin);
  margin: 0 auto;
  padding: var(--space-5) var(--page-pad) var(--space-7);
}

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

.stack { display: grid; gap: var(--space-4); }
.stack-lg { display: grid; gap: var(--space-5); }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
}
.badge-good { background: rgba(47, 107, 58, 0.1); color: var(--good); border-color: rgba(47, 107, 58, 0.18); }
.badge-warn { background: rgba(138, 106, 47, 0.12); color: var(--warn); border-color: rgba(138, 106, 47, 0.2); }
.badge-bad { background: rgba(139, 58, 43, 0.1); color: var(--bad); border-color: rgba(139, 58, 43, 0.18); }
.badge-gold { background: var(--gold-soft); color: #8a6234; border-color: rgba(212, 165, 116, 0.35); }

/* Preview banner */
.preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 8px var(--page-pad);
  background: #1f1a14;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  border-bottom: 1px solid rgba(212, 165, 116, 0.35);
}
.preview-banner strong { font-weight: 600; color: #fff; }
.preview-banner .btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 11px;
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}
.preview-banner .btn:hover { background: rgba(255,255,255,0.08); }

/* Login */
.login-page {
  background:
    radial-gradient(circle at top left, rgba(212, 165, 116, 0.18), transparent 34%),
    linear-gradient(180deg, #fbfaf8 0%, #f3efe8 100%);
  min-height: 100vh;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}
.login-brand-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  background:
    linear-gradient(160deg, rgba(20,20,20,0.92), rgba(20,20,20,0.82)),
    linear-gradient(135deg, #2a241c, #141414);
  color: #fff;
}
.login-brand-inner {
  max-width: 480px;
  width: 100%;
}
.login-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.login-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.login-brand-name {
  font-family: var(--heading);
  font-size: 28px;
  font-weight: 500;
  margin-top: 2px;
}
.login-headline {
  font-family: var(--heading);
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: #fff;
}
.login-lead {
  color: rgba(255,255,255,0.78);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 28px;
}
.login-points {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.login-points li {
  position: relative;
  padding-left: 18px;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.45;
}
.login-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: #d4a574;
}
.login-form-panel {
  display: grid;
  place-items: center;
  padding: 40px 32px;
}
.login-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-card);
  padding: 36px 32px;
}
.login-card-header { margin-bottom: 28px; }
.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--heading);
  font-size: 20px;
}
.login-card h2 {
  font-family: var(--heading);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  line-height: 1.1;
}
.login-card .field > span {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.login-card input {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 400;
}
.login-card input:focus {
  border-color: #d4a574;
  outline: 2px solid rgba(212, 165, 116, 0.28);
  outline-offset: 1px;
}
.form-error {
  margin: 12px 0 0;
  color: var(--bad);
  font-size: 13px;
  font-weight: 600;
}
.login-footnote { margin: 18px 0 0; }

/* Admin layout */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-5);
  align-items: start;
}
.admin-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 6px;
}
body.has-preview-banner .admin-nav { top: 136px; }
.nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.nav-link:hover { background: rgba(20,20,20,0.04); color: var(--ink); }
.nav-link.active {
  background: var(--gold-soft);
  color: var(--ink);
}
.admin-main { min-width: 0; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.page-header .actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.stat-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-card .value {
  margin-top: 8px;
  font-family: var(--heading);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.table-wrap { overflow-x: auto; }
table.jobs {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
table.jobs th,
table.jobs td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.jobs th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
}
table.jobs tr:hover td { background: rgba(212, 165, 116, 0.05); }
.job-name {
  font-weight: 600;
  color: var(--ink);
}
.job-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.progress {
  height: 8px;
  background: #ebe6de;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  min-width: 88px;
}
.progress > span {
  display: block;
  height: 100%;
  min-width: 0;
  background: #d4a574;
}
.progress[data-zero="1"] > span,
.progress > span[style*="width: 0"] {
  min-width: 0;
}
.progress {
  position: relative;
}
.progress::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(20, 20, 20, 0.04);
  pointer-events: none;
}

/* Admin job detail */
.detail-header {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
  flex-wrap: wrap;
}
.detail-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.tab-btn {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.tab-btn:hover { color: var(--ink); background: rgba(20,20,20,0.03); }
.tab-btn.active {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 2px solid #d4a574;
  margin-bottom: -1px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-4);
}
.meta-list {
  display: grid;
  gap: 10px;
}
.meta-list .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.meta-list .row span:first-child { color: var(--muted); }
.onboarding-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.onboarding-shortcut {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.onboarding-shortcut:hover {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.onboarding-shortcut-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.onboarding-shortcut-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 12px;
  z-index: 5;
  margin: 0 0 16px;
  padding: 10px 0;
  background: linear-gradient(180deg, #fbfaf8 70%, rgba(251, 250, 248, 0));
}
.onboarding-part-anchor {
  scroll-margin-top: 72px;
}
.onboarding-part-flash {
  box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.45);
}
@media (max-width: 900px) {
  .onboarding-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .onboarding-shortcuts { grid-template-columns: 1fr; }
}
.people-list, .action-list, .invite-list {
  display: grid;
  gap: 10px;
}
.person-row, .action-item, .invite-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.action-item .title, .person-row .title, .invite-row .title {
  font-weight: 600;
  font-size: 14px;
}
.action-item .meta, .person-row .meta, .invite-row .meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Client shell */
.client-shell {
  max-width: var(--max-client-wide);
  margin: 0 auto;
  padding: var(--space-5) var(--page-pad) 96px;
}
.client-top-meta {
  margin-bottom: var(--space-4);
}
.client-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 0 0 var(--space-5);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}
.client-tabs .tab-btn {
  flex: 0 0 auto;
  border-radius: 8px;
  border: none;
  margin: 0;
}
.client-tabs .tab-btn.active {
  background: var(--gold-soft);
  border: none;
  color: var(--ink);
}

.needs-list {
  display: grid;
  gap: 12px;
}
.need-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.need-card:hover { border-color: var(--gold); background: rgba(212,165,116,0.06); }
.need-card h3 { margin-bottom: 4px; }
.phase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.phase-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}
.phase-card .status {
  margin-top: 10px;
}

/* Checklist (shared) */
.section-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.section-link {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.section-link:hover, .section-link.active {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--gold-soft);
}
.section-block { margin-bottom: var(--space-4); }
.section-block > h2 { margin-bottom: 6px; }
.section-block > .muted { margin-bottom: 16px; }
.item-card {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.item-card:first-of-type { border-top: none; padding-top: 0; }
.item-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.item-card-copy { min-width: 0; flex: 1; }
.item-card-head h3 { margin: 0; }
.item-staff-tools,
.section-staff-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 6px; }
.section-head .muted { margin-bottom: 0; }
.staff-edit-hint {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #d4a574;
  background: var(--gold-soft);
  color: var(--ink-soft);
  font-size: 13px;
}
.item-help {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.item-editor {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.45);
}
.item-editor.hidden { display: none; }
.item-editor-panel {
  width: min(100%, 560px);
  max-height: min(90vh, 760px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 24px;
}
.item-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.item-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.hidden { display: none !important; }
.item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.status-pill {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.status-pill.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.impact {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  font-size: 13px;
  color: var(--ink-soft);
}
.sticky-save {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0 8px;
  background: linear-gradient(180deg, rgba(251,250,248,0), #fbfaf8 28%);
  z-index: 10;
}

.empty {
  text-align: left;
  padding: 36px 28px;
}
.empty h1, .empty .display { margin-bottom: 12px; }

/* Documents */
.doc-upload-form {
  display: grid;
  gap: 14px;
}
.doc-upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.doc-list {
  display: grid;
  gap: 12px;
}
.doc-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.doc-row:first-child { border-top: none; padding-top: 0; }
.doc-main { min-width: 0; flex: 1; }
.doc-main strong {
  display: block;
  margin-bottom: 4px;
  word-break: break-word;
}
.doc-meta { flex-shrink: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.stack { display: grid; gap: 16px; }

/* Dialogs */
dialog {
  border: none;
  border-radius: var(--radius-card);
  padding: 0;
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20,20,20,0.42); }
.dialog-card { padding: 24px; }
.dialog-card h2 { margin-bottom: 8px; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 960px) {
  :root { --page-pad: 16px; }
  h1 { font-size: 28px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    margin-bottom: 8px;
  }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .item-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-mobile-brand { display: flex; }
  .phase-grid { grid-template-columns: 1fr; }
  .sticky-save {
    flex-direction: column;
    align-items: stretch;
  }
  .need-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .stats-row { grid-template-columns: 1fr; }
  .topbar { padding-top: 12px; padding-bottom: 12px; }
  .brand-sub { display: none; }
  .row-actions { justify-content: flex-start; }
}
