/* ============================================================
   Relay — Work orders 2.0 board and work order header (wo2.js). Only shows in shops Relay switched on.
   Uses the app's shared colours (--panel, --ink, --line, --accent), so it fits today's look and Design 2.0
   (where the progress pipes become liquid: design.css .d2-pipe).
   ============================================================ */
.wo2-wrap{ margin:0 0 18px; }
.wo2-head{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:4px 0 12px; }
.wo2-views{ display:inline-flex; padding:3px; border-radius:999px; background:var(--panel-2); border:1px solid var(--line); }
.wo2-view{ border:0; background:none; min-height:36px; padding:0 16px; border-radius:999px; font-weight:600; color:var(--ink-soft); cursor:pointer; }
.wo2-view.is-on{ background:var(--panel); color:var(--ink); box-shadow:0 1px 4px rgba(0,0,0,.08); }
.wo2-how{ margin:0; flex:1 1 260px; }
.wo2-auto{ display:inline-flex; align-items:center; gap:8px; font-weight:600; color:var(--ink-soft); font-size:.9rem; min-height:44px; }
.wo2-auto input{ width:18px; height:18px; accent-color:var(--accent); }
.wo2-scroll{ overflow-x:auto; padding-bottom:8px; }
.wo2-board{ display:grid; grid-template-columns:repeat(6, minmax(232px, 1fr)); gap:12px; min-width:1440px; }
.wo2-col{ display:flex; flex-direction:column; gap:8px; padding:12px; border-radius:16px; background:var(--panel-2); border:1px solid var(--line); min-height:360px; transition:box-shadow .15s ease, border-color .15s ease; }
.wo2-col.is-over{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.wo2-col-head{ display:flex; align-items:center; gap:8px; }
.wo2-col-head h3{ margin:0; font-size:.95rem; font-weight:700; color:var(--ink); }
.wo2-count{ font-size:.78rem; font-weight:700; color:var(--ink-soft); }
.wo2-sum{ margin-left:auto; font-size:.78rem; color:var(--ink-soft); font-variant-numeric:tabular-nums; }
.wo2-dot{ width:10px; height:10px; border-radius:3px; background:#7C8B90; }
.wo2-dot.st-progress{ background:#2F8FD8; } .wo2-dot.st-waiting{ background:#E0A21A; } .wo2-dot.st-done{ background:#2BA36B; }
.wo2-dot.st-invoiced{ background:#7A5AD6; } .wo2-dot.st-paid{ background:var(--accent); }
.wo2-col-how{ margin:0 0 4px; font-size:.75rem; color:var(--ink-soft); line-height:1.35; }
.wo2-cards{ display:flex; flex-direction:column; gap:10px; }
.wo2-empty{ margin:8px 0; font-size:.8rem; color:var(--ink-faint); text-align:center; }
.wo2-card{ position:relative; display:flex; flex-direction:column; gap:7px; padding:12px; border-radius:14px; background:var(--panel); border:1px solid var(--line);
  cursor:pointer; text-align:left; transition:transform .15s ease, box-shadow .15s ease; }
.wo2-card:hover{ transform:translateY(-2px); box-shadow:0 8px 20px rgba(8,40,48,.10); }
.wo2-card:focus-visible{ outline:3px solid var(--accent-soft); outline-offset:2px; }
.wo2-card.is-drag{ opacity:.55; }
.wo2-card-top{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.wo2-no{ font:700 .78rem ui-monospace, SFMono-Regular, Menlo, monospace; color:var(--accent); }
.wo2-age{ margin-left:auto; font-size:.74rem; color:var(--ink-soft); }
.wo2-unit{ font-weight:700; color:var(--ink); }
.wo2-problem{ font-size:.84rem; color:var(--ink-soft); line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.wo2-tag{ align-self:flex-start; display:inline-block; padding:2px 8px; border-radius:999px; font-size:.72rem; font-weight:700; background:var(--accent-soft); color:var(--accent); }
.wo2-tag.road{ background:#E6E9FB; color:#33409A; } .wo2-tag.hot{ background:#FBE3DC; color:#9C2A14; }
.wo2-tag.warn{ background:#FFF1D6; color:#7A4A00; } .wo2-tag.good{ background:#DDF3E8; color:#0A6B47; }
[data-theme="dark"] .wo2-tag.road{ background:#252B55; color:#B8C0FF; } [data-theme="dark"] .wo2-tag.hot{ background:#45201A; color:#F7A08B; }
[data-theme="dark"] .wo2-tag.warn{ background:#3A2A0A; color:#F7C977; } [data-theme="dark"] .wo2-tag.good{ background:#123D2E; color:#6FDDAF; }
/* the progress line on each card (a liquid pipe when Design 2.0 is on) */
.wo2 .d2-pipe{ display:block; height:6px; border-radius:999px; background:var(--line); overflow:hidden; }
.wo2 .d2-pipe > i{ display:block; height:100%; width:var(--level, 0%); background:var(--accent); border-radius:999px; }
.wo2-card-foot{ display:flex; align-items:center; gap:8px; padding-top:7px; border-top:1px solid var(--line); }
.wo2-av{ width:24px; height:24px; flex:none; border-radius:50%; background:var(--accent-soft); color:var(--accent); font-size:.66rem; font-weight:800; display:flex; align-items:center; justify-content:center; }
.wo2-cust{ flex:1; min-width:0; font-size:.76rem; color:var(--ink-soft); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wo2-money{ font-size:.8rem; font-weight:700; color:var(--ink); font-variant-numeric:tabular-nums; }
.wo2-move{ border:1px solid var(--line); background:var(--panel); color:var(--ink-soft); min-height:30px; padding:0 9px; border-radius:9px; font-size:.75rem; font-weight:700; cursor:pointer; }
.wo2-menu{ position:absolute; right:8px; bottom:44px; z-index:30; display:flex; flex-direction:column; min-width:190px; padding:6px; border-radius:12px; background:var(--panel); border:1px solid var(--line); box-shadow:0 12px 30px rgba(0,0,0,.16); }
.wo2-menu button{ border:0; background:none; text-align:left; min-height:38px; padding:0 10px; border-radius:8px; font-weight:600; color:var(--ink); cursor:pointer; }
.wo2-menu button:hover, .wo2-menu button:focus{ background:var(--accent-soft); color:var(--accent); outline:0; }
/* the work order page header */
.wo2-order{ margin:0 0 16px; padding:14px 16px; border-radius:16px; background:var(--panel); border:1px solid var(--line); display:flex; flex-direction:column; gap:12px; }
.wo2-steps{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:8px; }
.wo2-steps li{ display:flex; flex-direction:column; gap:6px; font-size:.78rem; color:var(--ink-soft); }
.wo2-steps li b{ font-weight:600; } .wo2-steps li.is-now b{ color:var(--ink); font-weight:800; } .wo2-steps li.is-past b{ color:var(--ink); }
.wo2-order-row{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.wo2-lines{ flex:1 1 280px; font-size:.9rem; color:var(--ink-soft); }
.wo2-lines b{ color:var(--ink); }
.wo2-order-acts{ display:flex; gap:8px; flex-wrap:wrap; }
.wo2-order-acts button{ min-height:42px; padding:0 18px; flex:none; white-space:nowrap; }
@media (max-width:760px){ .wo2-steps{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce){ .wo2-card, .wo2-col{ transition:none; } .wo2-card:hover{ transform:none; } }
