@font-face {
  font-family: "Space Grotesk";
  src: url("./space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* Shared Horus styles are copied unchanged into horus/. These rules cover
   the Store routes and the controls used to walk through the prototype. */
:root {
  --accent: var(--brand-strong);
  --store-panel: #f8f7f4;
  --store-panel-border: #d8d5ce;
  --store-ink: #252525;
  --store-muted: #625e57;
  --store-rule: #e8e5dd;
  --store-focus: #2858b6;
}

[hidden] { display: none !important; }
:where(button, select, summary) { cursor: pointer; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--store-focus);
  outline-offset: 3px;
}

html:has(#topbar, .admin-shell .topbar) { scroll-padding-top: calc(var(--top-height, 65px) + 12px); }

#topbar #top-left, #topbar #top-breadcrumb, #topbar #top-right { min-width: 0; }
#topbar #top-breadcrumb { overflow: hidden; }
#topbar #top-breadcrumb strong { overflow: hidden; text-overflow: ellipsis; }
header#topbar nav#top-breadcrumb :is(a, strong, .top-breadcrumb-brand) { color: var(--store-muted); }
#topbar #top-breadcrumb a:focus-visible { text-decoration: underline; outline-offset: -2px; }
#topbar #top-right a { text-decoration: none; }
#topbar #top-workspace:not([role="button"]) { cursor: default; }
#topbar #top-profile:not([role="button"]) { cursor: default; }
#topbar :is(#top-workspace, #top-profile):is(a, button) { font-family: inherit; }
#topbar button:is(#top-bell, #top-profile) { border: 0; }
#topbar #top-bell:is(a, button) { background: transparent; }
#topbar #top-bell:is(a, button):hover { background: #fff; }
#topbar .store-top-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: var(--store-muted);
}
#topbar .store-top-support:hover { background: #fff; color: var(--text); }
#topbar .store-top-support svg { width: 18px; height: 18px; }

#leftbar #left-brand a { display: block; border-radius: 6px; }
#leftbar #left-brand img { display: block; object-fit: contain; }
#leftbar :is(#left-menu, #left-footer) a > span { display: none; }
aside#leftbar section:is(#left-menu, #left-footer) ul li[data-active],
.admin-shell .sidebar nav a[aria-current="page"] { background: var(--accent); }
aside#leftbar section:is(#left-menu, #left-footer) ul li:has(> a:focus-visible)::before,
aside#leftbar section:is(#left-menu, #left-footer) ul li:has(> a:focus-visible)::after {
  opacity: 1;
  transform: translateY(-50%);
}
.admin-shell { --focus: var(--store-focus); }
.admin-shell .sidebar a:focus-visible { outline-color: #fff; }
.admin-shell .sidebar .brand img { object-fit: contain; }
#leftbar #left-brand .rail-brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
#leftbar #left-brand .rail-brand-mark img { width: 100%; height: 100%; object-fit: contain; }

.content, .workspace, .brand-surface { min-width: 0; }
.content:focus, .content h1[tabindex="-1"]:focus { outline: none; }
.app-shell:not(.public-shell) { min-height: 100vh; }
.app-shell:has(#topbar):not(:has(#leftbar)) { --left-width: 0px; --mobile-nav-height: 0px; }
.public-shell { --top-height: 0px; --left-width: 0px; --mobile-nav-height: 0px; }
.public-shell .content:has(.login-screen) { width: 100%; padding: 0 !important; }
.public-shell .content:not(:has(.login-screen)) { min-height: calc(100vh - 74px); }

.registration-shell { background: #f1eeea; }
.registration-screen {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: clamp(16px, 4vw, 56px) 16px;
}
.registration-screen .registration-card {
  --registration-padding: clamp(22px, 5vw, 38px);
  --registration-intro-ink: var(--store-ink);
  --registration-intro-muted: var(--store-muted);
  --registration-title-size: clamp(1.8rem, 4vw, 2.25rem);
  display: grid;
  gap: 0;
  width: min(100%, 490px);
  min-width: 0;
  border: 1px solid var(--store-panel-border);
  border-radius: 20px;
  background: #fff;
  color: var(--store-ink);
  box-shadow: 0 20px 70px rgb(45 33 26 / 10%), 0 4px 12px rgb(45 33 26 / 4%);
  overflow-wrap: anywhere;
}
.registration-card:has([data-form="onboarding-register"], [data-form="onboarding-submit"]) {
  --registration-intro-ink: #fff;
  --registration-intro-muted: #fadbd7;
  --registration-title-size: clamp(2rem, 4vw, 3.2rem);
  --registration-intro-background: radial-gradient(ellipse at 90% 4%, #913c3a, transparent 64%), linear-gradient(155deg, #6c211e, #411c1b 72%);
  width: min(100%, 1080px);
}
.registration-intro {
  display: grid;
  align-content: start;
  gap: clamp(16px, 4vw, 42px);
  min-width: 0;
  padding: var(--registration-padding) var(--registration-padding) 28px;
  border-radius: 19px 19px 0 0;
  background: var(--registration-intro-background, transparent);
  color: var(--registration-intro-ink);
}
.registration-panel {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 0 var(--registration-padding) var(--registration-padding);
}
.registration-card:has([data-form="onboarding-register"], [data-form="onboarding-submit"]) .registration-panel {
  padding-top: var(--registration-padding);
}
.registration-card > .registration-heading { padding: var(--registration-padding); }
.registration-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  font-size: .9375rem;
  font-weight: 700;
}
.registration-brand img {
  width: 142px;
  max-width: 68%;
  height: 44px;
  flex: 0 1 auto;
  padding: 5px 9px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}
.registration-heading { display: grid; gap: 10px; }
.registration-heading h1 {
  margin: 0;
  font-size: var(--registration-title-size);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.04;
}
.registration-heading p, .registration-card :is(form, .registration-links) p { margin: 0; }
.registration-heading p { color: var(--registration-intro-muted); font-size: 1rem; line-height: 1.5; }
.registration-panel form { gap: 22px; }
.registration-card fieldset.registration-section {
  min-width: 0;
  margin: 0;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--store-rule);
}
.registration-section .registration-section-heading {
  padding: 0;
  margin: 0 0 11px;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -.017em;
}
.registration-card .field > span { font-size: .875rem; }
.registration-card :is(input:not([type="checkbox"], [type="hidden"]), textarea) {
  min-height: 46px;
  border-color: #89837a;
  border-radius: 9px;
  background: #fbfaf8;
  font-size: 1rem;
}
.registration-card :is(input:not([type="checkbox"], [type="hidden"]), textarea):focus { background: #fff; }
.registration-card .field [aria-invalid="true"] { border-color: #a72122; }
.registration-card #onboarding-code { letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.registration-card .actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
}
.registration-card .actions > .primary { grid-column: 1 / -1; }
.registration-card .actions .button { min-height: 48px; font-size: .875rem; }
.registration-card .actions .button.primary { border-radius: 9px; box-shadow: none; }
.registration-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--store-rule);
  color: var(--store-muted);
  font-size: .875rem;
  line-height: 1.5;
}
.registration-signup { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5rem; flex-basis: 100%; }
.registration-links :is(a, button) {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--accent);
  font-weight: 650;
  text-underline-offset: 3px;
}
.registration-links .button.ghost {
  min-height: 44px;
  padding-inline: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-align: left;
  text-decoration: underline;
}
.registration-links :is(a, button):hover { color: var(--store-ink); }

.registration-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.registration-skill {
  position: relative;
  display: block;
  min-width: 0;
  flex: 1 1 max(9.25rem, calc((100% - 20px) / 3));
}
.registration-skill > input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.registration-skill-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "icon indicator" "copy copy";
  align-content: start;
  align-items: center;
  gap: 12px 8px;
  min-height: 100%;
  padding: 12px;
  border: 1px solid #b3a9a3;
  border-radius: 11px;
  background: #fff;
  color: var(--store-ink);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.registration-skill:hover .registration-skill-content { border-color: var(--accent); background: #f8f5f3; }
.registration-skill > input:checked + .registration-skill-content {
  border-color: #a62823;
  background: #fff3f2;
  box-shadow: inset 0 0 0 1px #a62823;
}
.registration-skill > input:focus-visible + .registration-skill-content { outline: 3px solid var(--store-focus); outline-offset: 3px; }
.registration-skill-icon,
.registration-skill-indicator { display: grid; place-items: center; }
.registration-skill-icon {
  grid-area: icon;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f2ebe7;
  color: #8c332e;
}
.registration-skill-copy { grid-area: copy; display: grid; gap: 4px; line-height: 1.3; }
.registration-skill-copy strong { font-size: .875rem; font-weight: 700; }
.registration-skill-copy small { color: var(--store-muted); font-size: .75rem; font-weight: 450; }
.registration-skill-indicator {
  grid-area: indicator;
  width: 22px;
  height: 22px;
  align-self: start;
  border: 1px solid #817771;
  border-radius: 50%;
  color: #645850;
}
.registration-skill-indicator::before {
  grid-area: 1 / 1;
  content: "+";
  font-size: 15px;
  line-height: 1;
}
.registration-skill-indicator svg { grid-area: 1 / 1; width: 15px; height: 15px; visibility: hidden; }
.registration-skill > input:checked + .registration-skill-content .registration-skill-indicator {
  border-color: #9b2420;
  background: #9b2420;
  color: #fff;
}
.registration-skill > input:checked + .registration-skill-content .registration-skill-indicator::before { visibility: hidden; }
.registration-skill > input:checked + .registration-skill-content .registration-skill-indicator svg { visibility: visible; }

@media (min-width: 880px) {
  .registration-card:has([data-form="onboarding-register"], [data-form="onboarding-submit"]) {
    grid-template-columns: minmax(260px, .58fr) minmax(0, 1fr);
  }
  .registration-card:has([data-form="onboarding-register"], [data-form="onboarding-submit"]) .registration-intro {
    min-height: 100%;
    border-radius: 19px 0 0 19px;
  }
}

@media (max-width: 580px) {
  .registration-skill { flex-basis: 100%; }
  .registration-skill-content {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icon copy indicator";
    min-height: 54px;
  }
  .registration-skill-indicator { align-self: center; }
}

@media (forced-colors: active) {
  .registration-skill > input:checked + .registration-skill-content,
  .registration-skill > input:checked + .registration-skill-content .registration-skill-indicator { border: 2px solid Highlight; }
  .registration-skill > input:checked + .registration-skill-content .registration-skill-indicator { color: ButtonText; }
}

.demo-bar {
  position: relative;
  max-width: 1180px;
  margin: 24px 50px 28px calc(var(--left-width, 70px) + 50px);
  padding: 10px 13px;
  border: 1px solid var(--store-panel-border);
  border-radius: 8px;
  background: var(--store-panel);
  color: var(--store-muted);
  font-size: 12px;
}
.demo-bar summary { width: fit-content; color: var(--text); font-weight: 650; }
.demo-bar .demo-label { display: grid; align-content: center; gap: 2px; margin: 8px 0; }
.demo-label strong { color: var(--text); font-weight: 650; }
.demo-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.demo-tools label { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.demo-tools select, .demo-tools .button { min-height: 36px; width: auto; font-size: 12px; }
.demo-tools select { max-width: 100%; padding-block: 5px; }
body.loading { cursor: progress; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
}
.page-head .page-copy { display: grid; gap: 6px; min-width: 0; }
.page-head h1 { margin: 0; color: var(--store-ink); font-weight: 500; }
.page-head .page-copy > p { margin: 0; color: var(--store-muted); font-size: 14px; }
.admin-shell .page-head h1 {
  color: var(--heading);
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.eyebrow, .page-head .page-copy > .eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.page-actions, .actions, .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-actions { justify-content: flex-end; }
.row > *, .page-actions > * { min-width: 0; }

.stack { display: grid; align-content: start; gap: 12px; min-width: 0; }
.content > .page-head + *, .content > .stats + *, .content > .card + * { margin-top: 16px; }
.grid, .stats, .field-grid, .two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  align-items: start;
}
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); align-items: stretch; }
:is(.grid, .stats, .field-grid, .two-col) > * { min-width: 0; }

.card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--store-panel-border);
  border-radius: 8px;
  background: var(--store-panel);
  color: var(--store-ink);
  font-size: 14px;
  line-height: 1.45;
}
.card :where(h2, h3, p, dl, ol) { margin: 0; }
.card :where(h2, h3, p, dd, li, small), .page-copy :where(h1, p) { overflow-wrap: anywhere; }
.card h2 { color: var(--store-ink); font-size: 18px; line-height: 1.25; }
.card h3 { color: var(--store-ink); font-size: 15px; line-height: 1.25; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 14px;
}
.card-head > * { min-width: 0; }
.section-title { margin: 0 0 8px; }
.muted { color: var(--store-muted); }

.stat {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 108px;
  padding: 14px;
}
.stat .row { justify-content: space-between; align-items: center; }
.stat > strong { color: var(--store-ink); font-size: 27px; line-height: 1.1; }
.stat :is(small, .muted) { color: var(--store-muted); font-size: 12px; }
.store-camera-stats, .finance-page .finance-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.store-camera-stats article { min-width: 0; }
.store-camera-stats small { display: block; margin-top: 4px; color: var(--store-muted); font-size: 12px; overflow-wrap: anywhere; }
.cameras-page > .page-head, .workspaces-page > .page-head { margin-bottom: 0; }
.workspaces-page > .workspaces-grid { margin-top: 24px; }
.workspaces-card, .admin-shell :is(.panel, .work-item-heading) { overflow-wrap: anywhere; }
.workspaces-card :is(h2, p) { margin: 0; }
.workspaces-card > header { margin-bottom: 6px; }
.store-finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.store-finance-grid > .finance-panel { min-width: 0; }
.store-finance-grid .finance-table { min-width: 0; }
.icon-box {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid var(--store-panel-border);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
}
.icon-box svg { width: 18px; height: 18px; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid #d2cec5;
  border-radius: 8px;
  background: #fff;
  color: #343434;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}
.button svg { width: 17px; height: 17px; flex: 0 0 17px; }
.button:hover { background: #f3f2ef; }
.button.ghost { border-color: transparent; background: transparent; }
.button.ghost:hover { background: #f3f2ef; }
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 16px rgba(229, 57, 53, .18);
}
.button.primary:not(:disabled, [aria-disabled="true"]):hover {
  background: color-mix(in srgb, var(--accent) 90%, #000);
}
.button.danger { border-color: #a72122; background: #a72122; color: #fff; }
.button:is(:disabled, [aria-disabled="true"]:not([data-action-pending])) {
  border-color: #d2cec5;
  background: #e9e6e0;
  color: #66625c;
  box-shadow: none;
  cursor: not-allowed;
}
.button:disabled { cursor: not-allowed; }

.field { display: grid; gap: 6px; min-width: 0; }
.field > :where(span, label), label.field, legend { font-weight: 650; }
.field > small { color: var(--store-muted); font-weight: 400; }
fieldset.stack { min-width: 0; padding: 0; margin: 0; border: 0; }
fieldset.stack legend { padding: 0; margin-bottom: 8px; }
:where(.field, .demo-tools) :is(input:not([type="checkbox"], [type="radio"]), select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #c5c0b7;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 450;
}
.field input[type="color"] { max-width: 115px; padding: 4px; }
.field textarea { min-height: 80px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #a72122; }

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--store-panel-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.checkbox-card:has(:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.checkbox-card input { width: 16px; height: 16px; flex: 0 0 16px; margin: 2px 0 0; accent-color: var(--accent); }
.checkbox-card :where(strong, small) { display: block; }
.checkbox-card small { color: var(--store-muted); }

.callout {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--store-panel-border);
  border-radius: 8px;
  background: #fff;
  color: var(--store-muted);
  font-size: 13px;
}
.callout > p { margin: 3px 0 0; }
.callout > .button { margin-top: 8px; }
.callout:is(.warning, [data-tone="warning"]) { border-color: #e5cf9d; background: #fff8e8; color: #65440f; }
.callout:is(.danger, .error, [data-tone="danger"]) { border-color: #edc2c0; background: #fff2f2; color: #921f20; }
.callout:is(.success, [data-tone="success"]) { border-color: #bdd8c9; background: #edf8f0; color: #214d34; }
.callout:is(.info, [data-tone="info"]) { border-color: #bfcee5; background: #f1f6ff; color: #254872; }

.badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid #ddd8cf;
  border-radius: 999px;
  background: #f2f1ef;
  color: #54524d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.badge-success { border-color: #bed9c5; background: #eaf6ed; color: #215837; }
.badge-warning { border-color: #ead19d; background: #fff4dc; color: #754608; }
.badge-danger { border-color: #ebc5c6; background: #fdf0f0; color: #97252a; }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
:is(.table-wrap, .finance-table-wrap):focus-visible { outline: 3px solid var(--store-focus); outline-offset: -3px; }
.table-wrap table { width: 100%; border-collapse: collapse; text-align: left; }
.table-wrap :is(th, td) { padding: 9px; border-bottom: 1px solid var(--store-rule); }
.table-wrap th { background: #f2f1ef; color: #4f4b44; font-size: 12px; white-space: nowrap; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.empty {
  display: grid;
  min-height: 130px;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--store-panel-border);
  border-radius: 8px;
  background: var(--store-panel);
  color: var(--store-muted);
}
.status-list, .check-list { list-style: none; margin: 0; padding: 0; }
.status-list li { padding: 8px 0; border-bottom: 1px solid var(--store-rule); }
.status-list li:last-child { border-bottom: 0; }

.brand-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--store-panel-border);
  border-radius: 8px;
  background: #fff;
}
.brand-strip > :last-child { min-width: 0; overflow-wrap: anywhere; }
.logo-preview, .store-login-brand > strong {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.brand-strip .logo-preview { border: 1px solid var(--accent); background: var(--store-panel); color: var(--text); }
.store-login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 42px;
  color: var(--store-ink);
  font-size: 13px;
  font-weight: 700;
}
.store-login-brand > strong {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  background: var(--shop-color, var(--accent));
  color: var(--shop-ink, #fff);
}
.store-login-brand > span { min-width: 0; overflow-wrap: anywhere; }

.brand-surface { overflow-wrap: anywhere; }
.brand-surface .skills-page { grid-template-columns: minmax(0, 1fr); }
.brand-surface .skills-availability > div { min-width: 0; }
.brand-surface .input-item:has(:focus-visible) { outline: 3px solid var(--store-focus); outline-offset: 2px; }
.brand-surface .input-item input:focus-visible { outline: none; }
.brand-surface .login-card .ghost-button { color: var(--shop-accent-readable, var(--accent)); }
.brand-surface .login-footer { flex-wrap: wrap; gap: 12px 20px; margin-top: 26px; }
.brand-surface .login-footer > span {
  max-width: none;
  color: var(--store-muted);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: normal;
  text-align: start;
}
.brand-surface .login-footer a {
  color: var(--shop-accent-readable, var(--accent));
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .16em;
}
.brand-surface .login-footer a:hover { text-decoration-thickness: 2px; }
.brand-surface .panel-header > p,
.brand-surface .cameras-header span,
.brand-surface .camera-step-title span,
.brand-surface .skills-header span,
.brand-surface .skills-section-header > div > span {
  color: var(--shop-accent-readable, var(--accent));
}
.brand-surface :is(.fill-button, .camera-primary-button):not(:disabled, [aria-disabled="true"]:not([data-action-pending])) {
  border-color: var(--shop-color, var(--accent));
  background: var(--shop-color, var(--accent));
  color: var(--shop-ink, #fff);
  box-shadow: none;
}
.brand-surface :is(.fill-button, .camera-primary-button):not(:disabled, [aria-disabled="true"]):hover {
  box-shadow: inset 0 0 0 2px var(--shop-ink, #fff);
}
.brand-surface a:is(.camera-primary-button, .camera-secondary-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.brand-surface .camera-modal-panel.store-camera-flow { width: 100%; max-height: none; margin: 0; }
#top-profile a { display: grid; place-items: center; width: 100%; height: 100%; border-radius: inherit; color: inherit; }
.customer-summary dt { color: var(--store-muted); }
.customer-summary dd { margin: 0; font-weight: 650; }
.customer-summary .row { justify-content: space-between; }
.form-message:empty, .form-alert:empty { display: none; }
.form-message { color: #921f20; font-weight: 650; }

.sr-only, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.toast {
  position: fixed;
  z-index: 12000;
  right: 18px;
  bottom: 18px;
  width: max-content;
  max-width: min(390px, calc(100vw - 36px));
  padding: 13px 15px;
  border: 1px solid #a8d8ba;
  border-radius: 8px;
  background: #f0fbf4;
  color: #286b43;
  box-shadow: 0 16px 35px rgba(20, 24, 32, .18);
  font-size: 12px;
  font-weight: 700;
}
.toast:empty { display: none; }
.toast-error { border-color: #edc2c0; background: #fff2f2; color: #921f20; }

@media (max-width: 760px) {
  html:has(#leftbar, .admin-shell .sidebar) { scroll-padding-bottom: calc(var(--mobile-nav-height) + 12px + env(safe-area-inset-bottom)); }
  html:has(.admin-shell) { scroll-padding-top: 12px; }
  .admin-shell { --top-height: 0px; }
  .admin-shell .topbar { display: none; }
  aside#leftbar { column-gap: 4px; }
  aside#leftbar section#left-menu { min-width: 0; flex: 1 1 auto; }
  aside#leftbar section:is(#left-menu, #left-footer) ul li {
    width: auto;
    min-width: 52px;
    flex: 1 1 0;
  }
  aside#leftbar section:is(#left-menu, #left-footer) ul li a,
  .admin-shell .sidebar nav a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    border-radius: 12px;
  }
  aside#leftbar section:is(#left-menu, #left-footer) ul li a:focus-visible,
  .admin-shell .sidebar nav a:focus-visible { outline-offset: -2px; }
  aside#leftbar section:is(#left-menu, #left-footer) ul li::after { display: none; }
  .admin-shell .sidebar nav a { width: auto; min-width: 52px; flex: 1 1 0; }
  aside#leftbar section:is(#left-menu, #left-footer) ul li a > span,
  .admin-shell .sidebar nav a > span {
    display: block;
    position: static;
    width: auto;
    padding: 0;
    color: #fff;
    font-size: .75rem;
    line-height: 1;
    text-align: center;
    white-space: normal;
    transform: none;
  }
  .workspaces-page { padding-inline: 0; }
  .workspaces-card { padding: clamp(14px, 5vw, 22px); }
  .page-head { flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  .page-actions { justify-content: flex-start; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .store-finance-grid { grid-template-columns: minmax(0, 1fr); }
  .card-head { flex-wrap: wrap; }
  .demo-bar { margin: 12px 16px calc(var(--mobile-nav-height, 68px) + 18px + env(safe-area-inset-bottom)); }
  .app-shell:has(.demo-bar) .main.content:not(:has(.login-screen)) { padding-bottom: 18px !important; }
  body:has(#leftbar, .admin-shell .sidebar) .toast {
    bottom: calc(var(--mobile-nav-height, 68px) + 10px + env(safe-area-inset-bottom));
  }
  #topbar #top-right { gap: 8px; }
  .login-card .store-login-brand { margin-bottom: 25px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-camera-stats, .finance-page .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 12px; }
  .demo-tools .button { min-height: 40px; }
}

button[data-action-pending] { cursor: progress; }
.action-spinner {
  display: inline-block;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  flex: none;
  margin-inline-end: .4em;
  vertical-align: -.14em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: action-spin .7s linear infinite;
  pointer-events: none;
}
@keyframes action-spin { to { transform: rotate(1turn); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
