/* Werkhaus Auto — design system: chrome on black, light mode, status colours with icons */
:root, [data-theme="dark"] {
  --bg: #07080A; --surf: #0E1013; --surf2: #12151A; --tile: rgba(255,255,255,.04);
  --line: #1C1F24; --line2: #2A2E34; --line3: #3A3F46;
  --text: #F2F3F5; --text2: #C3C8CE; --muted: #9AA1AB;
  --head: linear-gradient(100deg,#FFFFFF 0%,#A9AEB5 45%,#F4F5F6 70%,#7D838A 100%);
  --btn: linear-gradient(100deg,#F7F8F9 0%,#B9BEC4 40%,#EEF0F2 62%,#8E949B 100%); --btnfg: #07080A;
  --hero: radial-gradient(120% 80% at 100% 0%,#1A1D22 0%,#07080A 60%);
  --photo: repeating-linear-gradient(135deg,#15181C 0 10px,#121418 10px 20px);
  --on: #E9EBED; --onfg: #07080A;
  --good: #4BE3A1; --good-bg: rgba(52,211,153,.12); --good-bd: rgba(52,211,153,.5); --good-c: #34D399;
  --mon: #FFD43B; --mon-bg: rgba(255,212,59,.12); --mon-bd: rgba(255,212,59,.55); --mon-c: #FFD43B;
  --work: #FF9A3D; --work-bg: rgba(255,140,26,.14); --work-bd: rgba(255,140,26,.6); --work-c: #FF8C1A;
  --urg: #FFFFFF; --urg-bg: #E5202E; --urg-bd: #FF5468; --urg-c: #FF3347; --urg-soft: rgba(229,32,46,.12); --urg-t: #FFB3BC;
  --info: #8EC5FF; --dock: 0 -12px 30px rgba(0,0,0,.5);
}
[data-theme="light"] {
  --bg: #F2F3F5; --surf: #FFFFFF; --surf2: #FFFFFF; --tile: #F2F3F5;
  --line: #E2E4E8; --line2: #D5D8DD; --line3: #BFC3C9;
  --text: #0B0C0E; --text2: #3A3F46; --muted: #585E67;
  --head: linear-gradient(100deg,#0B0C0E 0%,#4A5058 45%,#15181C 70%,#3A3F46 100%);
  --btn: linear-gradient(100deg,#3A3F46 0%,#0B0C0E 45%,#2A2E34 70%,#0B0C0E 100%); --btnfg: #FFFFFF;
  --hero: radial-gradient(120% 80% at 100% 0%,#FFFFFF 0%,#F2F3F5 60%);
  --photo: repeating-linear-gradient(135deg,#E6E8EB 0 10px,#EDEFF1 10px 20px);
  --on: #0B0C0E; --onfg: #FFFFFF;
  --good: #0B6B42; --good-bg: #DDF5E9; --good-bd: #7FD1AA; --good-c: #12A366;
  --mon: #6E4E00; --mon-bg: #FFF4C2; --mon-bd: #E8BE1E; --mon-c: #F2C200;
  --work: #A34100; --work-bg: #FFE8D4; --work-bd: #FF9F4A; --work-c: #F57C00;
  --urg: #FFFFFF; --urg-bg: #D0182B; --urg-bd: #D0182B; --urg-c: #D0182B; --urg-soft: #FFE8EA; --urg-t: #8A0E19;
  --info: #1F5FBF; --dock: 0 -12px 30px rgba(11,12,14,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surf); border: 1px solid var(--line3); border-radius: 10px; padding: 12px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
textarea { resize: vertical; }
label.f { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
label.f small { font-weight: 400; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mono { font-family: 'JetBrains Mono', monospace; }
.mi { font-family: Michroma, sans-serif; letter-spacing: .06em; }
.muted { color: var(--muted); } .t2 { color: var(--text2); }
.h1 { margin: 0; font: 400 21px/1.3 Michroma, sans-serif; letter-spacing: .06em; text-transform: uppercase; background: var(--head); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { font: 500 10.5px 'JetBrains Mono', monospace; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.sec-h { display: flex; align-items: center; gap: 10px; font: 400 11px Michroma, sans-serif; letter-spacing: .16em; text-transform: uppercase; margin: 6px 0 2px; }
.sec-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line3), transparent); }
.sec-h .r { order: 2; font: 500 10px 'JetBrains Mono'; color: var(--muted); letter-spacing: .08em; }

/* layout */
.wrap { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.wide { max-width: 1480px; margin: 0 auto; padding: 20px 24px 60px; }
.pad { padding: 0 20px; } .stack { display: flex; flex-direction: column; gap: 10px; } .stack-l { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrapf { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.hero { padding: 20px 20px 18px; background: var(--hero); display: flex; flex-direction: column; gap: 12px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surf); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand { color: var(--text); }
.brand .bm { height: 34px; width: auto; flex: none; }
.brand .bw { height: 23px; width: auto; flex: none; }
.brand .w { font: 400 12.5px Michroma; letter-spacing: .22em; } .brand .a { font: 400 7.5px Michroma; letter-spacing: .5em; color: transparent; -webkit-text-stroke: .6px var(--text2); }
.dock { position: sticky; bottom: 0; margin-top: auto; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--surf); border-top: 1px solid var(--line2); box-shadow: var(--dock); display: flex; flex-direction: column; gap: 10px; z-index: 10; }

/* surfaces */
.card { background: var(--surf); border: 1px solid var(--line); border-radius: 14px; }
.card.p { padding: 14px; } .card.alert { border-color: var(--urg-bd); }
.list > * { border-bottom: 1px solid var(--line); } .list > *:last-child { border-bottom: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 48px; text-decoration: none; background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer; }
.li .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li .t { font-weight: 600; } .li .s { font-size: 12px; color: var(--muted); }
.photo { background: var(--photo); display: flex; align-items: center; justify-content: center; color: var(--muted); position: relative; overflow: hidden; }
.photo img, .photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; }
.thumbs .th { width: 72px; height: 72px; border-radius: 10px; flex: none; overflow: hidden; border: 1px solid var(--line2); background: var(--photo); cursor: pointer; padding: 0; }
.thumbs .th img, .thumbs .th video { width: 100%; height: 100%; object-fit: cover; }
.skew { width: 38px; height: 32px; transform: skewX(-16deg); border: 1px solid var(--line3); background: var(--tile); display: flex; align-items: center; justify-content: center; flex: none; }
.skew > * { transform: skewX(16deg); }
.seg { display: grid; gap: 4px; padding: 0 4px; } .seg i { height: 6px; transform: skewX(-24deg); background: var(--line2); display: block; }
.seg i.done { background: #8E949B; } .seg i.on { background: var(--on); box-shadow: 0 0 12px rgba(255,255,255,.4); }
[data-theme="light"] .seg i.on { box-shadow: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--btn); color: var(--btnfg); font: 400 11.5px Michroma, sans-serif; letter-spacing: .13em; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.btn.full { width: 100%; } .btn.split { justify-content: space-between; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--line2); color: var(--muted); cursor: not-allowed; }
.btn2 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line3); background: transparent; color: var(--text); font: 600 13px Inter, sans-serif; cursor: pointer; text-decoration: none; }
.btn2.sm { min-height: 36px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn2.on { background: var(--on); color: var(--onfg); border-color: var(--on); }
.btn2.danger { color: var(--urg-c); border-color: var(--urg-bd); }
.btn3 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; background: transparent; color: var(--text); font: 600 13px Inter, sans-serif; cursor: pointer; text-decoration: none; }
.iconbtn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; text-decoration: none; flex: none; }
.iconbtn .badge { position: absolute; top: 5px; right: 5px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--text); color: var(--bg); font: 700 10px Inter; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line3); background: var(--surf); color: var(--text); font: 600 13px Inter; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--on); color: var(--onfg); border-color: var(--on); }
.chip.big { min-height: 56px; border-width: 2px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px 6px; min-height: 84px; border-radius: 12px; border: 2px solid var(--line2); background: var(--surf); color: var(--text); cursor: pointer; font: 600 12px Inter; text-align: center; }
.tile[aria-pressed="true"] { background: var(--on); color: var(--onfg); border-color: var(--on); }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font: 700 10px Inter; letter-spacing: .07em; text-transform: uppercase; padding: 5px 8px; border-radius: 4px; border: 1px solid; white-space: nowrap; }
.s-good { color: var(--good); background: var(--good-bg); border-color: var(--good-bd); }
.s-monitor { color: var(--mon); background: var(--mon-bg); border-color: var(--mon-bd); }
.s-work { color: var(--work); background: var(--work-bg); border-color: var(--work-bd); }
.s-urgent { color: var(--urg); background: var(--urg-bg); border-color: var(--urg-bd); }
.s-none { color: var(--muted); background: transparent; border-color: var(--line3); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--text); display: inline-block; }
.note { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.note.warn { border: 1px solid var(--urg-bd); background: var(--urg-soft); color: var(--urg-t); font-weight: 600; }
.note.ok { border: 1px solid var(--good-bd); background: var(--good-bg); color: var(--good); font-weight: 600; }
.note.plain { border: 1px dashed var(--line3); color: var(--text2); }
.flag { display: inline-flex; align-items: center; gap: 4px; font: 700 10.5px Inter; padding: 3px 6px; border-radius: 4px; border: 1px solid var(--line3); color: var(--text2); }
.flag.warn { color: var(--work); border-color: var(--work-bd); } .flag.bad { color: var(--urg-c); border-color: var(--urg-bd); } .flag.ok { color: var(--good); border-color: var(--good-bd); } .flag.info { color: var(--info); }

/* tables (staff) */
.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font: 500 10.5px 'JetBrains Mono'; letter-spacing: .1em; color: var(--muted); padding: 10px 12px; text-transform: uppercase; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--tile); }
.scroll-x { overflow-x: auto; }

/* staff layout */
.snav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.snav a { text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 600; color: var(--text2); font-size: 13.5px; }
.snav a.on { background: var(--line2); color: var(--text); }
.board { display: grid; grid-template-columns: repeat(6, minmax(220px,1fr)); gap: 12px; overflow-x: auto; }
.col { background: var(--surf); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 420px; }
.jc { text-decoration: none; border: 1px solid var(--line2); background: var(--surf2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.two { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; } .two > .main { flex: 999 1 560px; min-width: 0; } .two > .side { flex: 1 1 300px; max-width: 380px; }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal .sheet { background: var(--bg); border: 1px solid var(--line2); border-radius: 20px 20px 0 0; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 700px) { .modal { align-items: center; } .modal .sheet { border-radius: 20px; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; z-index: 200; max-width: 90vw; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 150; display: flex; align-items: center; justify-content: center; }
.lightbox img, .lightbox video { max-width: 96vw; max-height: 86vh; }
.pinrow { display: flex; gap: 10px; justify-content: center; }
.pinrow input { width: 56px; height: 62px; text-align: center; font: 400 22px Michroma; padding: 0; }
.empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.spin { width: 22px; height: 22px; border: 2px solid var(--line3); border-top-color: var(--text); border-radius: 50%; animation: sp 0.8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
@media print { .top, .dock, .noprint { display: none !important; } }
/* staff app: mobile header and selected condition chips */
.chip[aria-pressed="true"].s-good, .chip[aria-pressed="true"].s-monitor, .chip[aria-pressed="true"].s-work, .chip[aria-pressed="true"].s-urgent { background: var(--c-bg); color: var(--c); border-color: var(--c); box-shadow: none; }
.chip.s-good { --c: var(--good); --c-bg: var(--good-bg); } .chip.s-monitor { --c: var(--mon); --c-bg: var(--mon-bg); }
.chip.s-work { --c: var(--work); --c-bg: var(--work-bg); } .chip.s-urgent { --c: var(--urg); --c-bg: var(--urg-bg); }
main.wrap { padding: 0 16px; }
@media (max-width: 860px) {
  .top .snav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .top .snav::-webkit-scrollbar { display: none; }
  .snav a { white-space: nowrap; }
  .wide { padding: 16px 14px 60px; }
}
/* booking calendar */
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h span { text-align: center; font-size: 10.5px; color: var(--muted); font-family: var(--mono, monospace); letter-spacing: .04em; }
.cal-d { position: relative; aspect-ratio: 1; min-height: 38px; border-radius: 10px; border: 1px solid var(--line2); background: var(--tile); color: var(--text); font: 600 14px/1 inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.cal-d i { font-style: normal; font-size: 8.5px; font-weight: 600; color: var(--urg); letter-spacing: .02em; }
.cal-d.off { background: transparent; border-color: transparent; color: var(--muted); opacity: .35; cursor: default; }
.cal-d.closed { background: transparent; border-style: dashed; color: var(--muted); opacity: .55; cursor: not-allowed; text-decoration: line-through; }
.cal-d.full { background: var(--urg-bg); border-color: var(--urg-bd); color: var(--muted); cursor: not-allowed; }
.cal-d.open:hover { border-color: var(--line3); }
.cal-d.sel { background: var(--text); color: var(--bg); border-color: var(--text); }
.cal-k { width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--line2); background: var(--tile); display: inline-block; }
.cal-k.full { background: var(--urg-bg); border-color: var(--urg-bd); } .cal-k.closed { background: transparent; border-style: dashed; }
.chip[disabled] { opacity: .45; cursor: not-allowed; }
.iconbtn[disabled] { opacity: .3; cursor: default; }

/* never let a display rule override the hidden attribute */
[hidden] { display: none !important; }
