body.auth-body,
body.panel-body {
  --muted: rgba(242, 242, 244, 0.58);
  --soft: rgba(255, 255, 255, 0.045);
  --bg-deep: #0d0d0d;
  --radius-pill: 999px;
}

h1, h2, h3 { line-height: 1.12; }
.auth-body h1,
.auth-body h2,
.panel-body h1,
.panel-body h2 {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.btn-dark { background: var(--fg); color: var(--bg); }
.btn-dark:hover { background: #fff; }
.btn-light { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-light:hover { border-color: var(--fg); }
.btn:disabled,
.btn[disabled] { opacity: 0.45; cursor: default; }

input,
select,
textarea { color: var(--fg); }
.field::placeholder,
.search::placeholder { color: var(--fg-3); }
input[type="checkbox"],
input[type="radio"] { accent-color: var(--accent); }
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.85); }
select.field option { background: var(--bg-raised); color: var(--fg); }

.auth-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
}

.auth-body .site-nav .wrap { justify-content: space-between; }

.auth-main {
  position: relative;
  min-height: calc(100vh - var(--nav));
  display: grid;
  place-items: start center;
  padding: clamp(40px, 7vw, 88px) 16px 72px;
}
.auth-main::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background:
    radial-gradient(50% 45% at 80% 10%, rgba(227, 28, 61, 0.1), transparent 70%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 88px;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  pointer-events: none;
}

.auth-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
  width: min(100% - var(--gutter) * 2, 1180px);
  margin-inline: auto;
  padding-inline: 0;
  place-items: initial;
}

.auth-aside { position: relative; padding-top: 12px; }
.auth-aside h2 { font-size: clamp(40px, 5vw, 72px); margin: 22px 0 24px; line-height: 1; }
.auth-aside > p:not(.label) { color: var(--fg-2); font-size: 18px; max-width: 460px; }
.auth-facts {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--line-soft);
  max-width: 460px;
}
.auth-facts li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.auth-facts strong { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.auth-facts span { color: var(--fg-3); font-size: 15px; }

.auth-card {
  position: relative;
  width: min(100%, 440px);
  background: var(--bg-raised);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}

.auth-card h1 {
  font-size: 32px;
  line-height: 1.05;
}

.auth-card .eyebrow { margin-bottom: 14px; }

.auth-card .lead {
  color: var(--fg-2);
  margin: 10px 0 26px;
  font-size: 15px;
  line-height: 1.5;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 22px;
}

.seg button {
  min-height: 40px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color 0.2s, background 0.2s;
}
.seg button:hover { color: var(--fg); }
.seg button[aria-selected="true"] { background: var(--fg); color: var(--bg); }

.field {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--fg);
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  margin-bottom: 10px;
}
textarea.field {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

select.field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
select.field:disabled {
  opacity: 0.55;
}

.field:focus {
  outline: none;
  border-color: rgba(227, 28, 61, 0.7);
  box-shadow: 0 0 0 3px rgba(227, 28, 61, 0.18);
}

.link-row {
  display: block;
  text-align: right;
  width: 100%;
  margin: 4px 0 12px;
}

.link-row button,
.text-btn {
  border: 0;
  background: none;
  color: var(--fg-2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.link-row button:hover,
.text-btn:hover { color: var(--fg); }

.auth-error {
  color: #ff6b82;
  font-size: 14px;
  margin: 0 0 12px;
}

.auth-ok {
  color: #62d593;
  font-size: 14px;
  margin: 0 0 12px;
}

.auth-card .btn {
  width: 100%;
  margin-top: 6px;
}

.auth-hint {
  color: var(--fg-3);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}

.btn-demo {
  background: transparent;
  color: var(--fg-2);
  border-color: var(--line);
}
.btn-demo:hover { border-color: var(--fg); color: var(--fg); }
.auth-card .btn-demo { margin-top: 10px; }

.or-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--fg-3);
}

.or-row span:first-child,
.or-row span:last-child {
  height: 1px;
  background: var(--line);
  flex: 1;
}

.btn-apple,
.btn-google {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-google:hover { background: #fff; }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; justify-items: center; }
  .auth-aside { display: none; }
}

.nav-cta {
  margin-left: auto;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  transition: border-color 0.2s;
}
.nav-cta:hover { border-color: var(--fg); }

.panel-body {
  min-height: 100vh;
  background: var(--soft);
  color: var(--fg);
}

.panel-nav {
  border-bottom: 3px solid var(--accent);
}
.panel-nav .wrap {
  width: min(100% - 32px, 920px);
}
.panel-nav .shop {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 600;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.panel-actions button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.panel-wrap {
  width: min(100% - 32px, 920px);
  margin: 32px auto 88px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 28px;
}

.panel-head h1 {
  font-size: 34px;
  line-height: 1.1;
}

.panel-head .eyebrow {
  margin-bottom: 12px;
}

.panel-lead {
  color: var(--muted);
  margin: -12px 0 28px;
  max-width: 42ch;
  line-height: 1.5;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  font-weight: 700;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--fg);
  color: var(--bg);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filters button,
.chip {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.filters button[aria-pressed="true"],
.filters button[aria-selected="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.search {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  font: inherit;
  margin-bottom: 14px;
  background: var(--bg-raised);
}

.card-list { display: grid; gap: 12px; }

.row-card {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: left;
  border: 0;
  width: 100%;
  cursor: pointer;
  font: inherit;
  box-shadow: none;
}

.row-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.row-card:hover { box-shadow: none; }

.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 6px 0 8px;
}
.password-wrap { position: relative; }
.password-wrap .field { padding-right: 88px; }
.password-wrap .text-btn {
  position: absolute;
  right: 12px;
  top: auto;
  bottom: 13px;
  min-height: 44px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--fg-3);
  margin: 8px 0 14px;
  line-height: 1.45;
}
.check-row input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.check-row a { color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

.panel-note {
  background: var(--bg-raised);
  border-radius: 12px;
  padding: 14px 16px;
  margin: -8px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  box-shadow: none;
}

.empty {
  text-align: center;
  padding: 36px 20px;
  background: var(--bg-raised);
  border-radius: var(--radius);
}
.empty p { margin-bottom: 14px; color: var(--muted); }

.ok-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  transform: translateX(-50%) translateY(12px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  background: #232323;
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 10px 18px 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.ok-toast.is-in {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ok-toast-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #1f9d57;
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.ok-toast.is-error .ok-toast-icon {
  background: var(--accent);
}

.sheet { cursor: pointer; }
.sheet-card { cursor: default; }
.row-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.plate {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: var(--soft);
  border-radius: 8px;
  padding: 2px 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.empty, .state {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 36px 24px;
  color: var(--muted);
  text-align: center;
  box-shadow: none;
}

.choice-grid { display: grid; gap: 16px; }
.choice-card {
  background: var(--bg-raised);
  border: 0;
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  box-shadow: none;
}
.choice-card strong { display: block; font-size: 20px; margin-bottom: 6px; }
.choice-card span { color: var(--muted); }

.sheet {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: grid;
  place-items: end center;
  z-index: 50;
  padding: 16px;
}

.sheet-card {
  width: min(100%, 640px);
  max-height: 88vh;
  overflow: auto;
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 22px 20px 28px;
}

.sheet-card h2 { font-size: 26px; margin-bottom: 8px; }
.sheet-card p { color: var(--muted); margin-bottom: 10px; }
.item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.hidden { display: none !important; }

.panel-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  flex-wrap: wrap;
  position: sticky;
  top: var(--nav);
  z-index: 20;
  background: var(--soft);
  padding: 8px 0 14px;
}
.panel-tabs a {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-raised);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
.panel-tabs a[aria-current="page"] {
  background: var(--fg);
  color: var(--bg);
}

.detail-page { display: grid; gap: 18px; }
.detail-card {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: none;
}
.detail-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.detail-card h3 { font-size: 16px; margin: 0 0 14px; line-height: 1.3; }
.kv { display: grid; gap: 8px; }
.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}
.kv-row span { color: var(--muted); }
.plate-lg {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 22px;
  background: #232323;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  display: inline-block;
  margin-bottom: 4px;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}
.pay-pill {
  display: inline-flex;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  align-items: center;
}
.pay-pill.unpaid { background: rgba(227, 28, 61, 0.14); color: #ff6b82; }
.pay-pill.paid { background: rgba(52, 199, 110, 0.13); color: #62d593; }
.sticky-bar {
  position: sticky;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(27, 27, 27, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.invite-lead {
  margin: 0 0 18px;
  padding: 0 2px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}
.invite-box {
  text-align: center;
  margin-top: 18px;
  padding: 16px 8px 4px;
}
.invite-box img { margin: 0 auto 16px; }
.invite-box .muted {
  max-width: 42ch;
  margin: 0 auto 16px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}
.invite-box .form-grid,
.invite-box .chip-row {
  padding: 0 8px 4px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.field-hint {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  padding: 0 0 20px;
}
.addr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.workshop-map {
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
}
.workshop-map .leaflet-container {
  height: 100%;
  width: 100%;
  font: inherit;
}
.map-hint {
  min-height: 20px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.logo-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.logo-avatar {
  position: relative;
  width: 88px;
  height: 88px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--soft);
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
}
.logo-avatar img,
.logo-avatar span[data-logo-initials] {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--muted);
}
.logo-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg-raised);
}
.photo-editor {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.photo-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.72);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.photo-add {
  border: 1.5px dashed var(--line);
  background: var(--bg-raised);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px;
}
.photo-add:disabled {
  opacity: 0.5;
  cursor: default;
}
.chip-toggle {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  font-weight: 600;
  cursor: pointer;
}
.chip-toggle[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.form-grid { display: grid; gap: 16px; }
.form-grid label { font-size: 14px; font-weight: 700; }
label:has(> .field) {
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
}
label:has(> .field) > .field { margin-bottom: 0; }
.muted { color: var(--muted); }
.back-link {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 0;
  justify-self: start;
}

@media (max-width: 700px) {
  .panel-nav .shop { display: none; }
  .addr-row { grid-template-columns: 1fr; }
  .photo-editor { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-cta { display: inline-flex; }
}
