/* Zivo shared marketplace foundation. Page layouts remain in their own stylesheets. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf9f6;
  --surface: #fff;
  --card: #fff;
  --bg-main: #faf9f6;
  --bg-card: #fff;
  --text-main: #242823;
  --text-muted: #686d64;
  --surface2: #f4f2ed;
  --surface-2: #f4f2ed;
  --surface-soft: #f8f6f2;
  --surface-strong: #fff0e4;
  --text: #242823;
  --muted: #686d64;
  --border: #e5e6df;
  --line: #e5e6df;
  --line-strong: #d5d8ce;
  --brand: #b94b10;
  --brand-2: #983c0b;
  --brand-soft: #fff0e4;
  --accent: #b94b10;
  --primary: #b94b10;
  --primary2: #983c0b;
  --accent1: #b94b10;
  --accent2: #983c0b;
  --accent3: #d66a25;
  --accentGlow: rgb(185 75 16 / 12%);
  --shadow: 0 12px 32px rgb(36 40 35 / 6%);
  --shadow2: 0 4px 16px rgb(36 40 35 / 4%);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171a17;
  --surface: #20251f;
  --card: #20251f;
  --bg-main: #171a17;
  --bg-card: #20251f;
  --text-main: #f2f3ed;
  --text-muted: #b4bdac;
  --surface2: #2a3028;
  --surface-2: #2a3028;
  --surface-soft: #252b23;
  --surface-strong: #3a2c21;
  --text: #f2f3ed;
  --muted: #b4bdac;
  --border: #394234;
  --line: #394234;
  --line-strong: #4b5644;
  --brand: #ffa86c;
  --brand-2: #ffc79f;
  --brand-soft: #3a2c21;
  --accent: #ffa86c;
  --primary: #ffa86c;
  --primary2: #ffc79f;
  --accent1: #b94b10;
  --accent2: #983c0b;
  --accent3: #d66a25;
  --accentGlow: rgb(255 168 108 / 15%);
  --shadow: 0 12px 32px rgb(0 0 0 / 18%);
  --shadow2: 0 4px 16px rgb(0 0 0 / 12%);
}
body { font-family: var(--font-sans); }
body[data-page] { background: var(--bg); color: var(--text); }
body[data-page] :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="hidden"]), textarea, select) {
  background-color: var(--field); color: var(--fieldText); border-color: var(--fieldBorder);
}
:root, :root[data-theme] {
  --bg2: var(--bg);
  --panel: var(--surface);
  --panelSoft: var(--surface-soft);
  --panelBg: var(--surface);
  --topbarBg: var(--surface);
  --field: var(--surface);
  --fieldText: var(--text);
  --fieldBorder: var(--border);
  --brand2: var(--brand-2);
  --brandSoft: var(--brand-soft);
  --p: var(--brand);
  --p2: var(--brand-2);
  --btnBg: var(--surface2);
  --btnText: var(--text);
  --shadow-sm: var(--shadow2);
}
button, input, select, textarea { font: inherit; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}
button, a { -webkit-tap-highlight-color: transparent; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary, .btn-primary { background: #b94b10; color: #fff; border-color: #b94b10; }
.top-action.primary, .button.primary, .mnav.primary, .nav-item.primary, .btnSolid {
  background: #b94b10; color: #fff; border-color: #b94b10;
}
.btn:hover { border-color: var(--brand); }
button:disabled { cursor: wait; opacity: .65; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 9999; padding: 12px 20px; background: var(--surface); color: var(--text); }
.skip-link:focus { top: 12px; }
/* Layout refinements are scoped to their pages to avoid selector collisions. */
body[data-page="login"] { background: var(--bg); color: var(--text); }
body[data-page="login"] .page { max-width: 440px; }
body[data-page="login"] .card { padding: 38px 32px; border-radius: 20px; box-shadow: var(--shadow); }
body[data-page="login"] .btn { background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); min-height: 48px; }
body[data-page="login"] .btn:hover { box-shadow: var(--shadow2); border-color: var(--brand); }
body[data-page="login"] .consent { background: var(--surface2); }
body[data-page="login"] input[type="checkbox"] { accent-color: #b94b10; }
body[data-page="dashboard"] .dashboard-grid { align-items: start; }
body[data-page="dashboard"] .left-stack { align-content: start; }
body[data-page="dashboard"] .hero-grid { align-items: start; }
body[data-page="dashboard"] .card { border-radius: 14px; box-shadow: var(--shadow2); }
body[data-page="dashboard"] .brand-logo { background: var(--surface2); border-color: var(--border); }
body[data-page="dashboard"] .nav-item { border-radius: 10px; }
body[data-page="dashboard"] .nav-item.active { background: var(--brand-soft); border-color: var(--border); color: var(--brand); }
body[data-page="dashboard"] .nav-item.active .icon { color: var(--brand); }
body[data-page="search"] .search-shell { padding: 26px; box-shadow: none; border-radius: 16px; }
body[data-page="search"] .item { border-radius: 14px; box-shadow: var(--shadow2); }
body[data-page="search"] .searchbar button { background: #b94b10; color: #fff; }
body[data-page="search"] .searchbar input { min-width: 0; }
body[data-page="search"] .searchbar button { box-shadow: none; }
body[data-page="listing_view"] .card { border-radius: 16px; box-shadow: var(--shadow2); }
body[data-page="listing_create"], body[data-page="listing_create"].light-mode { background: var(--bg); }
body[data-page="listing_create"] .panel { border-radius: 14px; box-shadow: var(--shadow2); }
body[data-page="listing_create"] .btn.primary { background: #b94b10; color: #fff; box-shadow: none; }
body[data-page="listing_create"] .note,
body[data-page="listing_create"] .uploader,
body[data-page="listing_create"] .counter { background: var(--surface2); color: var(--muted); border-color: var(--border); }
body[data-page="listing_create"] label { color: var(--text); }
body[data-page="listing_edit"] .err { color: #a33228; }
@media (max-width: 480px) {
  body[data-page="search"] .search-shell { padding: 16px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
