/* =========================================================
   S&Z Dienstleistungen – Design System
   Mobile first. Dunkles Erscheinungsbild mit Creme-Akzent.
   ========================================================= */

:root {
  --bg: #050505;
  --bg-2: #0d0d0d;
  --card: #151515;
  --card-2: #1c1c1c;
  --line: #262626;
  --line-soft: #1e1e1e;
  --text: #ffffff;
  --muted: #9b9b9b;
  --muted-2: #6f6f6f;
  --cream: #f1e2cb;
  --cream-2: #e4d1b4;
  --cream-ink: #17130d;
  --green: #35d07f;
  --amber: #f0b429;
  --red: #ff6b5e;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --pad: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;

  /* Der Fußbereich sitzt immer unten am Fenster, auch wenn eine Seite
     wenig Inhalt hat. Sonst bliebe darunter schwarze Fläche. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

main { flex: 1 0 auto; }
.site-footer { flex: none; }

img, svg { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cream); color: var(--cream-ink); padding: 10px 16px; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; border-radius: 6px; }

/* ---------- Kopfbereich ---------- */
.topbar { position: relative; z-index: 30; padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 0; }

.topbar-in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
  min-height: 62px;
}

.brand { display: block; justify-self: center; line-height: 0; }
.logo { width: clamp(96px, 30vw, 132px); height: auto; display: block; }

.topbar-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 8px 2px; cursor: pointer;
  color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none;
  min-height: 44px;
}
.topbar-back { justify-self: start; }
.topbar-menu { justify-self: end; flex-direction: column; gap: 4px; font-size: 11px; letter-spacing: .3px; }
.topbar-spacer { justify-self: start; width: 44px; }

.burger { display: grid; gap: 4px; width: 22px; }
.burger i { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .22s, opacity .22s; }
[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Menü ---------- */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(6px);
  display: flex; justify-content: flex-end;
}
.menu[hidden] { display: none; }
.menu-panel {
  width: min(340px, 86vw); height: 100%;
  background: var(--bg-2); border-left: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + 84px) 20px 24px;
  overflow-y: auto;
  animation: slideIn .22s ease-out;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li + li { border-top: 1px solid var(--line-soft); }
.menu-panel a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 2px; text-decoration: none; font-weight: 600; font-size: 15px;
}
.menu-panel a .icn { color: var(--muted-2); }
.menu-call {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 22px; padding: 14px; border-radius: var(--r);
  background: var(--cream); color: var(--cream-ink) !important; font-weight: 800; text-decoration: none;
}

/* ---------- Layout-Container ---------- */
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 var(--pad) 40px; }
.wrap-wide { max-width: 1080px; }

/* ---------- Verfügbarkeits-Badge ---------- */
.avail {
  display: flex; align-items: center; gap: 10px;
  margin: 14px auto 0; padding: 11px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 14px; width: fit-content; max-width: 100%;
}
.avail .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted-2); }
.avail.on .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(53, 208, 127, .18); animation: pulse 2s infinite; }
.avail.on .avail-main { color: var(--green); font-weight: 800; }
.avail.off .avail-main { color: var(--amber); font-weight: 800; }
.avail .avail-sub { color: var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(53, 208, 127, 0); } }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 20px 0 22px; }
.hero h1 {
  margin: 0 0 8px; font-size: clamp(28px, 8.4vw, 40px); line-height: 1.1;
  font-weight: 800; letter-spacing: -.5px;
}
.hero p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Leistungskacheln ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 212px; padding: 16px 14px 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card); color: var(--text); text-decoration: none;
  overflow: hidden; isolation: isolate;
  transition: transform .18s ease, border-color .18s ease;
}
.tile:active { transform: scale(.985); }
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  background-image: var(--tile-img, none);
  opacity: .72;
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.58) 52%, rgba(0,0,0,.9) 100%);
}
/* Dezente Einfärbung, solange keine eigenen Fotos hinterlegt sind */
.tile[data-s="tueroeffnung"], .service-head[data-s="tueroeffnung"] { background-image: radial-gradient(135% 105% at 12% -5%, #4a3c26 0%, #211b12 38%, #0f0f0f 78%); }
.tile[data-s="verstopfung"], .service-head[data-s="verstopfung"] { background-image: radial-gradient(135% 105% at 12% -5%, #2c3d4c 0%, #16202a 38%, #0f0f0f 78%); }
.tile[data-s="sanierung"], .service-head[data-s="sanierung"] { background-image: radial-gradient(135% 105% at 12% -5%, #4b3a2c 0%, #241c15 38%, #0f0f0f 78%); }
.tile[data-s="sonstiges"], .service-head[data-s="sonstiges"] { background-image: radial-gradient(135% 105% at 12% -5%, #363c45 0%, #1b1f24 38%, #0f0f0f 78%); }

.tile h2 { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.15; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.tile .price { margin-top: 3px; font-size: 14px; color: var(--cream); font-weight: 600; }
.tile .go { position: absolute; right: 12px; bottom: 12px; color: rgba(255,255,255,.85); }
.tile.wide { grid-column: 1 / -1; min-height: 150px; }

/* ---------- Vertrauensleiste ---------- */
.trust {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.trust div { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.trust .icn { color: var(--cream); }

/* ---------- Karten & Abschnitte ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; margin-top: 14px;
}
.card-flat { background: var(--bg-2); }

.service-head {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  padding: 20px 16px; margin-top: 6px;
}
.service-head::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--tile-img, none); background-size: cover; background-position: center; opacity: .5;
}
.service-head::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(0,0,0,.94) 30%, rgba(0,0,0,.55) 100%);
}
.service-head .head-row { display: flex; align-items: center; gap: 12px; }
.service-head h1 { margin: 0; font-size: clamp(24px, 7vw, 32px); font-weight: 800; letter-spacing: -.4px; }
.service-head p { margin: 6px 0 0; color: #d6d6d6; font-size: 15px; }

/* ---------- Hinweisbox ---------- */
.note {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 14px; margin-top: 12px; font-size: 13.5px; line-height: 1.5; color: #ccc;
}
.note .icn { flex: none; color: var(--cream); margin-top: 1px; }
.note strong { color: #fff; }
.note.warn { border-color: rgba(240, 180, 41, .35); background: rgba(240, 180, 41, .07); }
.note.ok { border-color: rgba(53, 208, 127, .3); background: rgba(53, 208, 127, .07); }

/* ---------- Formularelemente ---------- */
.field { margin-top: 18px; }
/* Beschriftung über einem Eingabefeld – gilt nicht für Ankreuzfelder */
.field > label:not(.check), .legend {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; margin-bottom: 9px;
}
.legend .icn, .field > label:not(.check) .icn { color: var(--cream); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; }

.input, textarea.input, select.input {
  width: 100%; background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 14px; font-size: 16px; color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--muted-2); }
.input:focus { border-color: var(--cream); outline: none; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; }
.input-zip { max-width: 118px; flex: none !important; }

/* Spam-Falle: sicher unsichtbar, auch wenn Inline-Styles blockiert werden */
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

.hint { margin: 7px 0 0; font-size: 12.5px; color: var(--muted-2); line-height: 1.45; }
.err { display: none; margin-top: 7px; font-size: 13px; color: var(--red); font-weight: 600; }
.field.invalid .err { display: block; }
.field.invalid .input, .field.invalid .opt, .field.invalid .seg { border-color: var(--red); }

/* Auswahlkarten (Varianten) */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts.one { grid-template-columns: 1fr; }
.opt {
  position: relative; display: block; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 13px; transition: background .16s, border-color .16s;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .mark {
  width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--muted-2);
  display: inline-block; position: relative; flex: none; margin-top: 1px;
}
.opt .opt-top { display: flex; align-items: flex-start; gap: 9px; min-height: 38px; }
.opt .opt-name { display: block; font-weight: 800; font-size: 14.5px; line-height: 1.25; }
.opt .opt-price { display: block; margin-top: 10px; font-size: 27px; font-weight: 800; letter-spacing: -.6px; line-height: 1; }
.opt .opt-sub { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
/* Ausgewählter Zustand – .is-on wird zusätzlich per JavaScript gesetzt,
   damit die Auswahl auch in älteren Handy-Browsern sichtbar ist. */
.opt:has(input:checked), .opt.is-on { background: var(--cream); border-color: var(--cream); color: var(--cream-ink); }
.opt:has(input:checked) .mark, .opt.is-on .mark { border-color: var(--cream-ink); }
.opt:has(input:checked) .mark::after, .opt.is-on .mark::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--cream-ink);
}
.opt:has(input:checked) .opt-sub, .opt.is-on .opt-sub { color: #5a4d3b; }
.opt:has(input:focus-visible) { outline: 2px solid var(--cream); outline-offset: 2px; }

/* Segment-Auswahl (Sofort / Termin) */
.segs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 12px; transition: background .16s, border-color .16s;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .icn { flex: none; }
.seg b { display: block; font-size: 14.5px; }
.seg span { display: block; font-size: 11.5px; color: var(--muted); }
.seg:has(input:checked), .seg.is-on { background: var(--cream); border-color: var(--cream); color: var(--cream-ink); }
.seg:has(input:checked) span, .seg.is-on span { color: #5a4d3b; }

/* Checkbox */
.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: 13px; line-height: 1.5; color: #cfcfcf; margin-top: 14px; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid var(--muted-2);
  display: grid; place-items: center; margin-top: 1px;
}
.check .box svg { width: 14px; height: 14px; opacity: 0; color: var(--cream-ink); }
.check:has(input:checked) .box, .check.is-on .box { background: var(--cream); border-color: var(--cream); }
.check:has(input:checked) .box svg, .check.is-on .box svg { opacity: 1; }
.check a { color: var(--cream); }

/* ---------- Unterschrift ---------- */
.sig-wrap { margin-top: 10px; border: 1px dashed #3a3a3a; border-radius: var(--r); background: #fbf8f3; position: relative; overflow: hidden; }
.sig-wrap.signed { border-style: solid; border-color: var(--cream); }
.sig-canvas { display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair; }
.sig-ph {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  color: #a89880; font-size: 13.5px; text-align: center; padding: 0 20px;
}
.sig-wrap.signed .sig-ph { display: none; }
.sig-line { position: absolute; left: 22px; right: 22px; bottom: 38px; height: 1px; background: #ddd2bf; pointer-events: none; }
.sig-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.sig-clear {
  background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px;
  padding: 7px 14px; font-size: 12.5px; cursor: pointer;
}

/* ---------- Preisübersicht ---------- */
.summary { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-top: 18px; }
.summary h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sum-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.sum-row:last-child { border-bottom: 0; }
.sum-row span:first-child { color: var(--muted); }
.sum-row span:last-child { font-weight: 700; text-align: right; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.sum-total span { font-size: 14px; color: var(--muted); }
.sum-total b { font-size: 30px; font-weight: 800; letter-spacing: -.6px; }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 16px 20px; margin-top: 18px;
  border: 0; border-radius: var(--r-lg); cursor: pointer;
  background: var(--cream); color: var(--cream-ink);
  font-size: 16px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  text-decoration: none; text-align: center;
  transition: transform .14s ease, opacity .14s ease;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.busy { pointer-events: none; opacity: .75; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); text-transform: none; font-weight: 700; min-height: 50px; }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 13.5px; margin-top: 0; width: auto; }
.btn-danger { background: rgba(255, 107, 94, .12); color: var(--red); border: 1px solid rgba(255, 107, 94, .35); }

.legal-note {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 14px; padding: 14px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line-soft);
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
}
.legal-note .icn { flex: none; color: var(--muted-2); }

/* ---------- Fußbereich ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft); margin-top: 10px;
  padding: 24px var(--pad) calc(env(safe-area-inset-bottom) + 28px); text-align: center;
}
.footer-brand { font-size: 11px; letter-spacing: 2.2px; color: var(--muted-2); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 14px; }
.footer-links a { font-size: 12.5px; color: var(--muted); text-decoration: none; }

/* ---------- Verfolgungsseite ---------- */
.track-head { text-align: center; padding: 8px 0 4px; }
.track-ref { font-size: 12px; letter-spacing: 2px; color: var(--muted-2); text-transform: uppercase; }
.track-head h1 { margin: 8px 0 4px; font-size: 26px; font-weight: 800; }

.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: var(--card-2);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.badge.wait { color: var(--amber); border-color: rgba(240,180,41,.3); } .badge.wait .dot { background: var(--amber); }
.badge.ok { color: var(--green); border-color: rgba(53,208,127,.3); } .badge.ok .dot { background: var(--green); }
.badge.done { color: var(--cream); border-color: rgba(241,226,203,.3); } .badge.done .dot { background: var(--cream); }
.badge.stop { color: var(--red); border-color: rgba(255,107,94,.3); } .badge.stop .dot { background: var(--red); }

.steps { list-style: none; margin: 4px 0 0; padding: 0; }
.steps li { position: relative; padding: 0 0 22px 38px; }
.steps li::before {
  content: ""; position: absolute; left: 10px; top: 22px; bottom: -2px; width: 2px; background: var(--line);
}
.steps li:last-child::before { display: none; }
.steps .bullet {
  position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--bg-2); display: grid; place-items: center;
}
.steps .bullet svg { width: 12px; height: 12px; opacity: 0; color: var(--cream-ink); }
.steps li.done .bullet { background: var(--cream); border-color: var(--cream); }
.steps li.done .bullet svg { opacity: 1; }
.steps li.current .bullet { border-color: var(--cream); box-shadow: 0 0 0 4px rgba(241,226,203,.14); }
.steps li.done::before, .steps li.current::before { background: var(--cream); opacity: .5; }
.steps b { display: block; font-size: 15px; }
.steps span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.steps li.todo b, .steps li.todo span { color: var(--muted-2); }

/* ---------- Erfolgsseite ---------- */
.done-hero { text-align: center; padding: 26px 0 6px; }
.done-mark {
  width: 78px; height: 78px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--cream); color: var(--cream-ink); display: grid; place-items: center;
  animation: pop .35s cubic-bezier(.2,1.4,.5,1) both;
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done-hero h1 { margin: 0 0 8px; font-size: 27px; font-weight: 800; }
.done-hero p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Statische Textseiten ---------- */
.prose h1 { font-size: 27px; margin: 18px 0 14px; font-weight: 800; }
.prose h2 { font-size: 17px; margin: 26px 0 8px; font-weight: 700; }
.prose p, .prose li { color: #c4c4c4; font-size: 14.5px; line-height: 1.65; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--cream); }
.prose .todo { color: var(--amber); }

/* ---------- Admin ---------- */
.admin-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px;
  background: rgba(5,5,5,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.admin-bar .a-brand { font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: 9px; font-size: 15px; }
.admin-bar .a-brand .tag { font-size: 10px; letter-spacing: 1.6px; color: var(--muted-2); text-transform: uppercase; }
.admin-nav { display: flex; gap: 4px; }
.admin-nav a { padding: 9px 12px; border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--muted); }
.admin-nav a.on { background: var(--card-2); color: var(--text); font-weight: 700; }

.switch-card {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-top: 14px;
}
.switch-card.on { border-color: rgba(53,208,127,.4); background: linear-gradient(180deg, rgba(53,208,127,.08), var(--card)); }
.switch-card h2 { margin: 0 0 3px; font-size: 16px; font-weight: 800; }
.switch-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.switch {
  flex: none; width: 68px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card-2); position: relative; cursor: pointer; transition: background .2s, border-color .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--muted-2); transition: transform .2s, background .2s;
}
.switch[aria-checked="true"] { background: rgba(53,208,127,.2); border-color: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(30px); background: var(--green); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; }
.stat b { display: block; font-size: 24px; font-weight: 800; }
.stat span { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; }

.tabs { display: flex; gap: 8px; margin-top: 20px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.tabs a {
  flex: none; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; text-decoration: none; color: var(--muted); background: var(--card);
}
.tabs a.on { background: var(--cream); color: var(--cream-ink); border-color: var(--cream); font-weight: 700; }

.job {
  display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; margin-top: 10px;
}
.job-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.job-ref { font-size: 11.5px; letter-spacing: 1.3px; color: var(--muted-2); }
.job h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.job .meta { font-size: 13px; color: var(--muted); line-height: 1.5; }
.job .money { color: var(--cream); font-weight: 800; }
.job .new-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; }

.kv { display: grid; grid-template-columns: 128px 1fr; gap: 9px 12px; font-size: 14px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.kv dd a { color: var(--cream); }

.sig-view { background: #fbf8f3; border-radius: var(--r); padding: 10px; margin-top: 10px; }
.sig-view img { display: block; width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions form { display: contents; }

.login-wrap { max-width: 380px; margin: 40px auto; padding: 0 var(--pad); }
.flash { padding: 12px 14px; border-radius: var(--r); font-size: 13.5px; margin-top: 14px; }
.flash.error { background: rgba(255,107,94,.1); border: 1px solid rgba(255,107,94,.35); color: #ffb3ab; }
.flash.success { background: rgba(53,208,127,.1); border: 1px solid rgba(53,208,127,.35); color: #93e9be; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted-2); font-size: 14px; }

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  body { font-size: 17px; }
  .wrap { padding-bottom: 60px; }
  .tiles { gap: 16px; }
  .tile { min-height: 240px; }
  .hero { padding: 28px 0 26px; }
  .opts { gap: 12px; }
  .kv { grid-template-columns: 170px 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .admin-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
}

@media (min-width: 900px) {
  .topbar { padding-top: 18px; }
  .wrap { max-width: 620px; }
  .wrap-wide { max-width: 1080px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
