/* Laundry Management System (same theme as the Hospital and Queuing systems)
   Layout: phones (drawer menu, stacked cards) → tablets portrait/landscape → desktop (fixed sidebar). */

/* ---------- Tokens ----------
   The Advance Ledger (Sage) look: a black menu where the open page is a solid block of the accent colour,
   white cards on a cool grey page, forest green accent. Dark mode: [data-theme="dark"], near-black neutrals.
   --primary* come from the theme colour: Hospital Settings → Appearance overrides them (see theme_style() in functions.php).
   The cross logo is always red on white. */
:root {
    --bg: #f1f5fb; --surface: #ffffff; --surface-2: #f6f8fc; --surface-3: #e8eef7;
    --border: #e0e7f1; --text: #0f172a; --text-2: #334155; --muted: #475569;
    --primary: #2563eb; --primary-strong: #1d4fbf; --on-primary: #ffffff; --primary-soft: #e4ecfd;
    --side-bg: #0f2557; --side-border: rgba(255, 255, 255, .1); --side-text: #ffffff; --side-muted: #ffffff;
    --side-strong: #ffffff; --side-hover: rgba(255, 255, 255, .1); --side-active-bg: #2f6ff0; --side-active: #ffffff;
    --side-top: #13306b; --side-bottom: #0a1a40;   /* the menu and brand band below are worked out from the theme colour by theme_style() */
    /* the brand band (menu, sign-in card, phone top line); the name is historical */
    --brand-red: #0f2557; --brand-red-strong: #0a1a40; --on-brand-red: #ffffff;
    --logo-bg: #ffffff; --logo-cross: #d32f2f;
    --side-logo-bg: var(--logo-bg); --side-logo: var(--logo-cross);
    --green: #0f7a55; --green-soft: #e2f5ec;
    --amber: #a55a05; --amber-soft: #fdf0d9;
    --red: #c22f2f; --red-soft: #fde7e7;
    --blue: #1d4ed8; --blue-soft: #dbeafe;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .05);
    --radius: 12px; --radius-sm: 9px;
    --side-w: 256px; --side-mini: 72px; --top-h: 60px;
    color-scheme: light;
}
:root[data-theme="dark"] {
    --bg: #0e0e10; --surface: #18181b; --surface-2: #202024; --surface-3: #26262b;
    --border: #2e2e34; --text: #ececef; --text-2: #d4d4da; --muted: #b8b8c0;
    --primary: #85bd9a; --primary-strong: #b0d4bd; --on-primary: #04170b; --primary-soft: #173123;
    --side-bg: #0a1a3d; --side-border: rgba(255, 255, 255, .08); --side-text: #ffffff; --side-muted: #ffffff;
    --side-strong: #ffffff; --side-hover: rgba(255, 255, 255, .08); --side-active-bg: #2f6ff0; --side-active: #ffffff;
    --side-top: #0f2556; --side-bottom: #0a1a3d;
    --brand-red: #0d2f73; --brand-red-strong: #0a2459; --on-brand-red: #ffffff;
    --green: #3fc28f; --green-soft: #12322a;
    --amber: #f0b23f; --amber-soft: #3a2c10;
    --red: #f07a7a; --red-soft: #3c1b1e;
    --blue: #7ab0ff; --blue-soft: #14274a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh; min-height: 100dvh;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; text-wrap: balance; }
p { margin: 0 0 .8rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: .88em; background: var(--surface-3); padding: .1em .35em; border-radius: 5px; }
small { font-size: .84em; }
.icon { flex: none; vertical-align: -4px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
    background: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; transition: transform .2s ease, width .2s ease;
}
.side-top { display: flex; align-items: center; gap: .25rem; min-height: var(--top-h); padding: .45rem .5rem .45rem 1rem; border-bottom: 1px solid var(--border); flex: none; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); font-weight: 700; min-width: 0; flex: 1; }
.brand:hover { text-decoration: none; }
/* The shop name wraps onto up to 3 lines instead of being cut off */
.brand-text { font-size: .86rem; line-height: 1.18; letter-spacing: -.005em; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--logo-bg); color: var(--logo-cross); box-shadow: inset 0 0 0 1px var(--border); display: grid; place-items: center; flex: none; }
.side-nav { flex: 1; overflow-y: auto; padding: .5rem .6rem 1rem; scrollbar-width: thin; }
.nav-group { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .9rem .6rem .3rem; white-space: nowrap; overflow: hidden; }
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .58rem .7rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }
.side-user { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border-top: 1px solid var(--border); flex: none; }
.side-user-info { min-width: 0; flex: 1; line-height: 1.25; }
.side-user-info strong, .side-user-info small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-info small { color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.avatar:hover { text-decoration: none; }
.avatar-sm { width: 34px; height: 34px; }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 35; }

.main { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; transition: margin-left .2s ease; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: .75rem;
    padding: 0 1.25rem; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 1.05rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: .35rem; }
.clock { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88rem; margin-right: .4rem; white-space: nowrap; }
.icon-btn.menu-btn { display: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
:root[data-theme="dark"] .i-moon, :root:not([data-theme="dark"]) .i-sun { display: none; }
.content { flex: 1; padding: 1.5rem 1.25rem 2rem; width: 100%; max-width: 1500px; margin: 0 auto; }
.site-footer { text-align: center; color: var(--muted); font-size: .84rem; padding: 1rem 1rem 1.4rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1rem; margin-bottom: .35rem; }

/* Collapsed sidebar (desktop) */
@media (min-width: 1024px) {
    .nav-mini .sidebar { width: var(--side-mini); }
    .nav-mini .main { margin-left: var(--side-mini); }
    .nav-mini .brand-text, .nav-mini .side-nav a span, .nav-mini .side-user-info, .nav-mini .side-user .icon-btn { display: none; }
    .nav-mini .nav-group { height: 1px; padding: 0; margin: .6rem .4rem; background: var(--border); }
    .nav-mini .side-top { padding: 0; justify-content: center; flex-direction: column; height: auto; gap: 0; padding: .6rem 0; }
    .nav-mini .brand { flex: none; }
    .nav-mini .side-nav a { justify-content: center; padding: .65rem 0; }
    .nav-mini .side-user { justify-content: center; }
    .nav-mini .collapse-btn { transform: rotate(180deg); }
}
/* Tablets and phones: the menu becomes a drawer */
@media (max-width: 1023.98px) {
    .sidebar { transform: translateX(-100%); width: min(300px, 86vw); box-shadow: var(--shadow); }
    .nav-open .sidebar { transform: none; }
    .nav-open .backdrop { display: block; }
    .main { margin-left: 0; }
    .icon-btn.menu-btn { display: inline-grid; }
    .icon-btn.collapse-btn { display: none; }
}

/* ---------- Sign-in & public pages ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem 1rem; }
.auth-card { width: 100%; max-width: 430px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1.75rem; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 900px; }
.auth-card h2 { margin-bottom: 1rem; font-size: 1.25rem; }
.auth-logo { display: flex; align-items: center; gap: .8rem; color: var(--text); margin-bottom: 1.4rem; }
.auth-logo:hover { text-decoration: none; }
.auth-logo .logo-mark { width: 48px; height: 48px; border-radius: 13px; }
.auth-logo strong { display: block; font-size: 1.1rem; line-height: 1.2; }
.auth-logo small { color: var(--muted); }

/* ---------- Page head ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.page-head h2 { font-size: 1.35rem; }
.page-head p { color: var(--muted); margin: .2rem 0 0; max-width: 70ch; }
.page-head .actions, .btn-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.1rem; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .9rem 1.15rem; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 1.02rem; display: flex; align-items: center; gap: .5rem; }
.card-head small { color: var(--muted); }
.card-body { padding: 1.15rem; }
.grid { display: grid; gap: 1.1rem; }
.grid > * { min-width: 0; }
.grid-2, .grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; } .grid-half { grid-template-columns: 1fr 1fr; align-items: start; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; gap: .85rem; align-items: center; color: var(--text); box-shadow: var(--shadow); min-width: 0; }
a.stat:hover { border-color: var(--primary); text-decoration: none; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-strong); display: grid; place-items: center; flex: none; }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .86rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .5rem 1rem;
    border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--primary); color: var(--on-primary);
    font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--primary-strong); text-decoration: none; }
.btn-light { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-light:hover { background: var(--surface-3); }
.btn-danger { background: var(--red); color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #1a0606; }
.btn-danger:hover { background: var(--red); filter: brightness(1.1); }
.btn-success { background: var(--green); color: #fff; }
:root[data-theme="dark"] .btn-success { color: #04130d; }
.btn-success:hover { background: var(--green); filter: brightness(1.1); }
/* Every action has its colour: blue (theme) save · green add / new · teal print / open · amber edit · red delete · grey back / cancel */
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-info { background: #0e7490; color: #fff; }
.btn-info:hover { background: #155e75; }
.btn-warning { background: #b45309; color: #fff; }
.btn-warning:hover { background: #92400e; }
:root[data-theme="dark"] .btn-info { background: #22d3ee; color: #062a33; }
:root[data-theme="dark"] .btn-warning { background: #fbbf24; color: #2a1a02; }
:root[data-theme="dark"] .btn-info:hover, :root[data-theme="dark"] .btn-warning:hover { filter: brightness(1.1); }
/* small buttons in lists and tables: a soft tint of the same colour, so a row of them stays calm but readable */
.btn-sm.btn-info, .btn-sm.btn-warning, .btn-sm.btn-danger, .btn-sm.btn-success { --c: #0e7490; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, var(--surface)); filter: none; }
.btn-sm.btn-warning { --c: #b45309; }
.btn-sm.btn-danger { --c: #c22f2f; }
.btn-sm.btn-success { --c: #0f7a55; }
.btn-sm.btn-info:hover, .btn-sm.btn-warning:hover, .btn-sm.btn-danger:hover, .btn-sm.btn-success:hover { background: var(--c); color: #fff; }
:root[data-theme="dark"] .btn-sm.btn-info { --c: #22d3ee; }
:root[data-theme="dark"] .btn-sm.btn-warning { --c: #fbbf24; }
:root[data-theme="dark"] .btn-sm.btn-danger { --c: #f07a7a; }
:root[data-theme="dark"] .btn-sm.btn-success { --c: #3fc28f; }
:root[data-theme="dark"] .btn-sm.btn-info:hover, :root[data-theme="dark"] .btn-sm.btn-warning:hover, :root[data-theme="dark"] .btn-sm.btn-danger:hover, :root[data-theme="dark"] .btn-sm.btn-success:hover { color: #0e0e10; }
.btn-sm { min-height: 32px; padding: .28rem .65rem; font-size: .86rem; border-radius: 8px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-lg { min-height: 48px; padding: .7rem 1.4rem; font-size: 1.02rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
form.inline { display: inline; }

/* ---------- Forms ---------- */
.field { margin-bottom: .9rem; min-width: 0; }
.field label, .label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: .3rem; color: var(--text-2); }
label.req::after { content: " *"; color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local],
input[type=tel], input[type=url], input[type=search], select, textarea {
    width: 100%; min-height: 42px; padding: .5rem .75rem; background: var(--surface-2); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
input[type=file] { width: 100%; padding: .5rem; background: var(--surface-2); border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-2); font: inherit; }
input[readonly] { opacity: .85; }
::placeholder { color: var(--muted); opacity: .8; }
.hint { display: block; color: var(--muted); font-size: .82rem; margin-top: .25rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }
@media (min-width: 1100px) { .form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { flex: 1 1 160px; margin-bottom: 0; }
.filters .btn { flex: none; }
.input-row { display: flex; gap: .5rem; }
.input-row > input, .input-row > select { flex: 1; min-width: 0; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num, .text-right { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: .25rem; }
.table td small { color: var(--muted); display: block; }
/* Phones: rows become cards (add class "table-cards" and data-label on each td) */
@media (max-width: 639.98px) {
    .table-cards thead { display: none; }
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
    .table-cards tr { padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
    .table-cards td { border: 0; padding: .18rem 0; text-align: left !important; }
    .table-cards td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 7.5em; color: var(--muted); font-size: .8rem; font-weight: 600; }
    .table-cards td.actions { padding-top: .5rem; white-space: normal; }
    .table-cards td.actions > * { margin: 0 .3rem .3rem 0; }
}

/* ---------- Small parts ---------- */
.badge { display: inline-block; padding: .14rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.alert { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid transparent; font-weight: 600; overflow-wrap: anywhere; }
.alert-success { background: var(--green-soft); color: var(--green); border-color: var(--green-soft); }
.alert-error { background: var(--red-soft); color: var(--red); border-color: var(--red-soft); }
.alert-warning { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-soft); }
.alert-info { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-soft); }
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.15rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.list-item:last-child { border-bottom: 0; }
.list-item .title { font-weight: 700; overflow-wrap: anywhere; }
.list-item .sub { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.grow { flex: 1; min-width: 0; }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty .icon { width: 40px; height: 40px; opacity: .6; margin-bottom: .5rem; }
.pager { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; padding: .8rem 1.15rem; border-top: 1px solid var(--border); }
.pager a, .pager span.disabled { padding: .3rem .7rem; border-radius: 8px; border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: .88rem; }
.pager a.current { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.pager span.disabled { opacity: .45; }
.pager .count { margin-left: auto; color: var(--muted); font-size: .86rem; }
.tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 1.1rem; scrollbar-width: none; }
.tabs a { padding: .6rem .95rem; color: var(--muted); font-weight: 700; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary-strong); border-bottom-color: var(--primary); }
.kv { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: .4rem .9rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.log-box { background: #0a1020; color: #d5def0; font: .84rem/1.6 Consolas, "Cascadia Mono", monospace; padding: .9rem 1rem; border-radius: var(--radius-sm); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow-y: auto; }
.diff-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); font: .84rem/1.5 Consolas, monospace; }
.diff-list li { padding: .3rem .7rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.diff-list li:last-child { border-bottom: 0; }
.tag { display: inline-block; min-width: 68px; margin-right: .5rem; font-weight: 700; font-size: .72rem; }
.tag-new { color: var(--green); } .tag-changed { color: var(--amber); } .tag-deleted { color: var(--red); }
.doc { line-height: 1.65; }
.doc h3 { margin: 1.4rem 0 .5rem; font-size: 1.08rem; }
.doc h4 { margin: 1rem 0 .35rem; font-size: .98rem; }
.doc ol, .doc ul { padding-left: 1.25rem; margin: 0 0 .8rem; }
.doc li { margin-bottom: .3rem; }
details.faq { border-bottom: 1px solid var(--border); padding: .2rem 0; }
details.faq summary { cursor: pointer; font-weight: 700; padding: .7rem 0; }
details.faq p { color: var(--text-2); }
.toc { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }

/* Dialogs */
dialog.dialog { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); padding: 1.4rem; width: min(560px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
dialog.dialog.wide { width: min(860px, calc(100vw - 2rem)); }
dialog.dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog.dialog h3 { margin-bottom: .9rem; display: flex; align-items: center; gap: .5rem; }

/* Simple bar chart (reports) */
.bars { display: grid; gap: .45rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.bar-row .track { background: var(--surface-3); border-radius: 6px; height: 12px; overflow: hidden; }
.bar-row .fill { background: var(--primary); height: 100%; border-radius: 6px; min-width: 2px; }
.bar-row .val { font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ---------- Utilities ---------- */
.muted { color: var(--muted); } .nowrap { white-space: nowrap; } .strong { font-weight: 700; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem !important; } .mb-2 { margin-bottom: 1rem !important; }
.mt-1 { margin-top: .5rem !important; } .mt-2 { margin-top: 1rem !important; }
.text-center { text-align: center; } .text-red { color: var(--red); } .text-green { color: var(--green); }
.hide-mobile { } @media (max-width: 639.98px) { .hide-mobile { display: none !important; } }
[hidden] { display: none !important; }

/* ---------- Phones ---------- */
@media (max-width: 639.98px) {
    body { font-size: 15px; }
    .content { padding: 1rem .8rem 1.5rem; }
    .topbar { padding: 0 .6rem; }
    .clock { display: none; }
    .card-body { padding: .95rem; }
    .card-head { padding: .8rem .95rem; }
    .list-item { padding: .75rem .95rem; }
    .page-head h2 { font-size: 1.2rem; }
    .page-head .actions { width: 100%; }
    .page-head .actions .btn { flex: 1; }
    .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .stat { padding: .8rem; flex-direction: column; align-items: flex-start; gap: .5rem; }
    .form-actions .btn { flex: 1 1 auto; }
    .auth-card { padding: 1.25rem; }
    .kv { grid-template-columns: 1fr; gap: 0; }
    .kv dd { margin-bottom: .5rem; }
    input, select, textarea { font-size: 16px !important; }   /* stops iOS zooming into fields */
}

/* ---------- Print (receipts, results, tickets) ---------- */
.print-only { display: none; }
@media print {
    :root, :root[data-theme] { --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #f1f1f1; --border: #bbb; --text: #000; --text-2: #222; --muted: #444; --primary: #000; --primary-strong: #000; --shadow: none; color-scheme: light; }
    body { background: #fff; color: #000; font-size: 12pt; }
    .sidebar, .topbar, .site-footer, .backdrop, .no-print, .alert, .pager, .tabs { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0; max-width: none; }
    .card { box-shadow: none; border: 0; margin: 0 0 .5rem; break-inside: avoid; }
    .print-only { display: block; }
    .badge { background: none !important; color: #000 !important; border: 1px solid #999; }
    a { color: #000; text-decoration: none; }
}
.print-sheet { max-width: 820px; margin: 0 auto; }
.print-header { text-align: center; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 2px solid var(--border); }
.print-header h2 { font-size: 1.3rem; }
.print-header p { margin: 0; color: var(--text-2); font-size: .9rem; }
.sign-line { margin-top: 2.5rem; display: flex; justify-content: space-between; gap: 2rem; }
.sign-line div { flex: 1; border-top: 1px solid var(--text); padding-top: .3rem; text-align: center; font-size: .86rem; }

/* Customer picker (search as you type) */
.picker { position: relative; }
.picker-results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; }
.picker-results button { display: block; width: 100%; text-align: left; padding: .55rem .8rem; background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text); font: inherit; cursor: pointer; }
.picker-results button:last-child { border-bottom: 0; }
.picker-results button:hover, .picker-results button:focus { background: var(--surface-2); }
.picker-results small { display: block; color: var(--muted); }
.picker-empty { padding: .7rem .8rem; color: var(--muted); }

/* ---------- The menu: its own colours (green band in light mode) ---------- */
.sidebar { background: var(--side-bg); border-right-color: var(--side-border); scrollbar-color: rgba(255, 255, 255, .4) transparent; }
.sidebar .side-top { border-bottom-color: var(--side-border); }
.sidebar .brand { color: var(--side-strong); }
.sidebar .logo-mark { background: var(--side-logo-bg); color: var(--side-logo); box-shadow: none; }
.sidebar .nav-group { color: var(--side-muted); }
.sidebar .side-nav a { color: var(--side-text); }
.sidebar .side-nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.sidebar .side-nav a.active { background: var(--side-active-bg); color: var(--side-active); }
.sidebar .side-user { border-top-color: var(--side-border); }
.sidebar .side-user-info strong { color: var(--side-strong); }
.sidebar .side-user-info small { color: var(--side-muted); }
.sidebar .icon-btn { color: var(--side-text); }
.sidebar .icon-btn:hover { background: var(--side-hover); color: var(--side-strong); }
.sidebar .avatar { background: var(--side-active-bg); color: var(--side-strong); }
.sidebar :focus-visible { outline-color: var(--side-strong); }
@media (min-width: 1024px) { .nav-mini .sidebar .nav-group { background: var(--side-border); } }
.topbar { background: color-mix(in srgb, var(--surface) 90%, transparent); }
/* Sign-in and public help pages: a soft wash of the theme colour behind the card */
.auth-wrap { background: radial-gradient(1100px 520px at 50% -8%, var(--primary-soft), transparent 70%), var(--bg); }

/* The washing-machine mark fills its tile (it brings its own colours) */
.logo-mark.app-mark, .sidebar .logo-mark.app-mark { background: transparent; box-shadow: none; padding: 0; }
.logo-mark.app-mark svg { width: 100%; height: 100%; display: block; }

/* ---------- Red, green and white ----------
   The navy band (menu, sign-in card, phone top line) comes from the theme colour;
   green (the theme colour) is for actions; everything else is white on a light neutral page. */
.sidebar { background: linear-gradient(180deg, var(--side-top) 0%, var(--side-bg) 50%, var(--side-bottom) 100%); }   /* deep shade of the theme colour (navy for blue) */
:root[data-theme="dark"] .sidebar { background: linear-gradient(180deg, var(--side-top) 0%, var(--side-bg) 100%); }
.sidebar .side-top { background: transparent; border-bottom-color: var(--side-border); }
.sidebar .brand { color: var(--on-brand-red); }
.sidebar .logo-mark { box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.sidebar .collapse-btn { color: rgba(255, 255, 255, .85); }
.sidebar .collapse-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.sidebar .avatar { background: var(--primary-soft); color: var(--primary-strong); }
:root[data-theme="dark"] .sidebar .avatar { background: var(--primary-soft); color: var(--primary); }
/* Phones and tablets (menu hidden): keep a red line at the top so the brand is always there */
@media (max-width: 1023.98px) { .topbar { border-top: 4px solid var(--brand-red); } }
.auth-card { border-top: 5px solid var(--brand-red); }

/* The client's own logo in the square mark (menu, sign-in page) */
.logo-mark.has-logo, .sidebar .logo-mark.has-logo { background: #fff; padding: 3px; overflow: hidden; }
.logo-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Dashboard: colourful summary tiles (blue, green, purple, orange) ---------- */
.dash-tiles .stat { color: #fff; border: 0; box-shadow: 0 6px 16px rgba(15, 40, 90, .12); }
.dash-tiles .stat:nth-child(4n+1) { background: linear-gradient(135deg, #2f80ed, #1d5fd1); }
.dash-tiles .stat:nth-child(4n+2) { background: linear-gradient(135deg, #2bb673, #179c5b); }
.dash-tiles .stat:nth-child(4n+3) { background: linear-gradient(135deg, #8b5cf6, #6d3fe0); }
.dash-tiles .stat:nth-child(4n+4) { background: linear-gradient(135deg, #f7a531, #ec8a12); }
.dash-tiles .stat .stat-icon { background: rgba(255, 255, 255, .2) !important; color: #fff !important; }
.dash-tiles .stat .stat-label { color: rgba(255, 255, 255, .9); }
.dash-tiles .stat:hover { filter: brightness(1.05); border: 0; }
.topbar-title { color: var(--primary-strong); }
:root[data-theme="dark"] .topbar-title { color: var(--text); }

/* =================================================================== */
/* Laundry screens                                                     */
/* =================================================================== */

/* Pipeline: one tile per status (dashboard, orders) */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.pipe { display: flex; flex-direction: column; gap: .2rem; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--c, var(--primary)); border-radius: var(--radius); padding: .75rem .9rem; color: var(--text); box-shadow: var(--shadow); min-width: 0; }
a.pipe:hover { text-decoration: none; border-color: var(--c, var(--primary)); }
.pipe .pipe-head { display: flex; align-items: center; gap: .45rem; color: var(--c, var(--primary)); font-weight: 700; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe .pipe-n { font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pipe small { color: var(--muted); }
.st-received { --c: #2f80ed; } .st-washing { --c: #0284c7; } .st-drying { --c: #7c4dea; } .st-folding { --c: #d97706; } .st-ready { --c: #15925a; } .st-claimed { --c: #64748b; } .st-cancelled { --c: #c22f2f; }
:root[data-theme="dark"] .st-received { --c: #7ab0ff; } :root[data-theme="dark"] .st-washing { --c: #38bdf8; } :root[data-theme="dark"] .st-drying { --c: #b49cff; }
:root[data-theme="dark"] .st-folding { --c: #f7b955; } :root[data-theme="dark"] .st-ready { --c: #3fc28f; } :root[data-theme="dark"] .st-claimed { --c: #a1a1aa; } :root[data-theme="dark"] .st-cancelled { --c: #f07a7a; }
@media (max-width: 899.98px) { .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 519.98px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe .pipe-n { font-size: 1.35rem; } }

/* Laundry board: one column per status. Phones and portrait tablets: columns scroll sideways (snap). */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: .6rem; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.board-col { background: var(--surface-2); border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 220px; max-height: calc(100dvh - 210px); scroll-snap-align: start; min-width: 0; }
.board-col-head { display: flex; align-items: center; gap: .45rem; padding: .65rem .8rem; font-weight: 700; color: var(--c); border-bottom: 1px solid var(--border); }
.board-col-head .count { margin-left: auto; background: var(--surface); color: var(--text-2); border-radius: 999px; padding: .05rem .55rem; font-size: .8rem; border: 1px solid var(--border); }
.board-list { flex: 1; overflow-y: auto; padding: .55rem; display: grid; gap: .55rem; align-content: start; }
.board-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: var(--radius-sm); padding: .6rem .7rem; box-shadow: var(--shadow); min-width: 0; }
.board-card.overdue { border-color: var(--red); border-left-color: var(--red); }
.board-card .bc-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.board-card .bc-no { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.board-card .bc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card .bc-meta { color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: .1rem .6rem; }
.board-card .bc-actions { display: flex; gap: .35rem; margin-top: .5rem; flex-wrap: wrap; }
.board-card .bc-actions .btn { flex: 1 1 auto; }
.board-empty { color: var(--muted); text-align: center; padding: 1.2rem .5rem; font-size: .88rem; }
@media (min-width: 1280px) { .board { grid-auto-flow: initial; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow-x: visible; } }
@media (max-width: 639.98px) { .board { grid-auto-columns: 86%; } .board-col { max-height: calc(100dvh - 190px); } }
@media (orientation: landscape) and (max-height: 520px) { .board-col { max-height: none; } }

/* New / edit order (point of sale): services on the left, the order on the right */
.pos { display: grid; gap: 1.1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1000px) { .pos { grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); } .pos-side { position: sticky; top: calc(var(--top-h) + 1rem); } }
.svc-cats { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; margin-bottom: .4rem; }
.svc-cats button { flex: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: .35rem .85rem; font: inherit; font-weight: 700; font-size: .84rem; cursor: pointer; white-space: nowrap; }
.svc-cats button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.svc-btn { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: .65rem .75rem; min-height: 78px; font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.svc-btn:hover, .svc-btn:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.svc-btn strong { font-size: .9rem; line-height: 1.25; }
.svc-btn .price { color: var(--primary-strong); font-weight: 800; font-variant-numeric: tabular-nums; margin-top: auto; }
.svc-btn small { color: var(--muted); }
.svc-btn.addon { border-style: dashed; }
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: .45rem .35rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.lines .l-desc { font-weight: 600; line-height: 1.25; }
.lines .l-desc small { display: block; color: var(--muted); font-weight: 500; }
.lines input.qty { width: 84px; min-height: 38px; text-align: right; padding: .35rem .5rem; }
.lines input.lprice { width: 92px; min-height: 38px; text-align: right; padding: .35rem .5rem; }
.lines .l-amt { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines .l-x { width: 36px; text-align: right; }
.lines .l-x button { width: 32px; height: 32px; }
@media (max-width: 479.98px) {
    .lines tr { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: .3rem .5rem; padding: .5rem 0; border-bottom: 1px solid var(--border); align-items: center; }
    .lines td { border: 0; padding: 0; }
    .lines .l-desc { grid-column: 1 / -1; }
    .lines input.qty, .lines input.lprice { width: 100%; }
}
.totals { display: grid; gap: .3rem; margin: .8rem 0; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 1rem; }
.totals .grand { font-size: 1.35rem; font-weight: 800; border-top: 2px solid var(--border); padding-top: .45rem; margin-top: .2rem; color: var(--primary-strong); }
.totals .bal { font-weight: 800; color: var(--red); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); flex-wrap: wrap; }
.seg label { margin: 0; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--text-2); }
.seg input:checked + span { background: var(--primary); color: var(--on-primary); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: -2px; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-weight: 700; font-size: .84rem; }

/* Order page: progress steps and timeline */
.steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .3rem; margin: 0 0 1.1rem; padding: 0; list-style: none; }
.steps li { position: relative; text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding-top: 2.4rem; min-width: 0; overflow-wrap: anywhere; }
.steps li::before { content: ""; position: absolute; top: .3rem; left: 50%; transform: translateX(-50%); width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--border); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 1.2rem; left: -50%; width: 100%; height: 3px; background: var(--border); }
.steps li:first-child::after { display: none; }
.steps li.done, .steps li.now { color: var(--text); }
.steps li.done::before { background: var(--green); border-color: var(--green); }
.steps li.done::after, .steps li.now::after { background: var(--green); }
.steps li.now::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.steps li .icon { position: absolute; top: .55rem; left: 50%; transform: translateX(-50%); width: 15px; height: 15px; z-index: 2; color: var(--muted); }
.steps li.done .icon, .steps li.now .icon { color: #fff; }
:root[data-theme="dark"] .steps li.done .icon, :root[data-theme="dark"] .steps li.now .icon { color: #0e0e10; }
@media (max-width: 519.98px) { .steps li { font-size: .68rem; } }
.timeline { list-style: none; margin: 0; padding: .3rem 1.15rem 1rem; }
.timeline li { position: relative; padding: .55rem 0 .55rem 1.4rem; border-left: 2px solid var(--border); margin-left: .35rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .85rem; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--primary)); border: 2px solid var(--surface); }
.timeline .t-when { color: var(--muted); font-size: .8rem; }
.order-head { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--c, var(--primary)); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); }
.order-head .o-no { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.order-head .o-meta { color: var(--text-2); font-size: .9rem; }
.big-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .55rem; }
.big-actions .btn, .big-actions form .btn { min-height: 50px; width: 100%; }

/* Machines */
.machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.machine { --c: var(--green); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; display: flex; flex-direction: column; gap: .55rem; border-top: 4px solid var(--c); min-width: 0; }
.machine.in_use { --c: #0284c7; } .machine.maintenance { --c: var(--red); } .machine.finished { --c: #d97706; }
:root[data-theme="dark"] .machine.in_use { --c: #38bdf8; } :root[data-theme="dark"] .machine.finished { --c: #f7b955; }
.machine .m-head { display: flex; align-items: center; gap: .6rem; }
.machine .m-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); flex: none; }
.machine.in_use .m-icon svg { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .machine.in_use .m-icon svg { animation: none; } }
.machine .m-name { font-weight: 800; }
.machine .m-sub { color: var(--muted); font-size: .84rem; }
.machine .m-timer { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--c); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--c, var(--primary)); border-radius: 99px; transition: width 1s linear; }
.machine .m-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; }
.machine .m-actions > .btn, .machine .m-actions > form { flex: 1 1 auto; }
.machine .m-actions form .btn { width: 100%; }

/* Lists of orders with a coloured edge per status */
.table tr.st-row td:first-child { box-shadow: inset 4px 0 0 var(--c); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.overdue-tag { color: var(--red); font-weight: 700; font-size: .8rem; }

/* Public tracking page */
.track-status { --c: var(--primary); text-align: center; padding: .5rem 0 1rem; }
.track-status .ts-icon { width: 64px; height: 64px; margin: 0 auto .5rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--c); }
.track-status .ts-icon .icon { width: 32px; height: 32px; }
.track-status h3 { font-size: 1.4rem; color: var(--c); }

/* Phones in landscape: tighter tiles */
@media (orientation: landscape) and (max-height: 520px) {
    .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat { padding: .65rem .8rem; flex-direction: row; }
    .content { padding-top: 1rem; }
}
.order-head > .grow { flex: 1 1 280px; }
@media (max-width: 639.98px) { .order-head .o-no { font-size: 1.15rem; } .order-head .btn-group { width: 100%; } .order-head .btn-group .btn { flex: 1 1 auto; } }
/* Laundry board: search and "New order" side by side, right-aligned */
.page-head .actions.board-actions { flex-wrap: nowrap; margin-left: auto; }
.board-actions input[type=search] { width: 240px; min-width: 0; flex: 0 1 240px; }
.page-head .board-actions .btn { flex: none; min-height: 42px; }
.page-head .actions.board-actions { align-items: stretch; }
@media (max-width: 639.98px) { .board-actions input[type=search] { flex: 1 1 auto; width: auto; } }
