/* Production dashboard for NovaDTF, August5 Print and Moniart Print. A work tool: quiet surfaces, hairline borders, numbers that line up.
   Color is reserved for status and for orders that are waiting too long. */
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/DMSans.ttf') format('truetype'); font-weight: 100 1000; font-display: swap; }

:root {
  --navy: #161d5e;
  --canvas: #f2f3f7;
  --surface: #ffffff;
  --ink: #171b34;
  --ink-2: #464b66;
  --mute: #7c8199;
  --line: #e1e3ea;
  --line-2: #cfd2dd;
  --sun: #ffd21a;
  --warn: #c76a00;   --warn-bg: #fff3e0;
  --late: #d12c4f;   --late-bg: #fde8ed;
  --c-received: #3f63e0; --c-on_hold: #d9480f; --c-prep: #7b55d6; --c-production: #e07a1a; --c-ready: #1c9466; --c-picked_up: #5f6478; --c-shipped: #2f7d9c; --c-cancelled: #a2a6b8;
  --r: 8px;
  /* Brand theme: top bar, accent line and avatar. Each shop overrides these. */
  --bar: #161d5e; --accent: #ffd21a; --accent-ink: #171b34;
}
body[data-brand="august5"] { --bar: #2b2523; --accent: #e20613; --accent-ink: #fff; }
body[data-brand="moniart"] { --bar: #1c3160; --accent: #d31f46; --accent-ink: #fff; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'DM Sans', system-ui, sans-serif; font-size: 14px; color: var(--ink); background: var(--canvas); display: flex; flex-direction: column; overflow: hidden; font-feature-settings: 'tnum'; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-received); outline-offset: 2px; }
h1 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; }

/* buttons */
.btn { height: 34px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13.5px; }
.btn:hover { border-color: var(--mute); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.accent { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.btn.accent:hover { filter: brightness(.96); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Top bar ---------- */
.topbar { height: 56px; flex: 0 0 auto; background: var(--bar); transition: background .3s; color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.brand-switch { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border-radius: 8px; color: #fff; }
.brand-switch:hover { background: rgba(255,255,255,.08); }
.brand-switch img { height: 34px; max-width: 150px; object-fit: contain; }
.tb-word { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.tb-word:empty { display: none; }
.chev { width: 8px; height: 8px; border: solid rgba(255,255,255,.6); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.push-state { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 2px 9px; cursor: help; }
.push-state:empty { display: none; }
.tabs { display: flex; gap: 2px; height: 100%; }
.tabs button { color: rgba(255,255,255,.7); font-weight: 600; padding: 0 12px; height: 100%; border-bottom: 3px solid transparent; border-top: 3px solid transparent; display: flex; align-items: center; gap: 7px; }
.tabs button:hover { color: #fff; }
.tabs .on { color: #fff; border-bottom-color: var(--accent); }
.count { background: rgba(255,255,255,.16); border-radius: 10px; padding: 0 7px; font-size: 12px; line-height: 18px; }
.count:empty { display: none; }
.search { position: relative; display: flex; align-items: center; }
.search input { width: 260px; height: 34px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237c8199' stroke-width='1.7'%3E%3Ccircle cx='7' cy='7' r='4.8'/%3E%3Cpath d='m10.6 10.6 3.4 3.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center; color: var(--ink); padding: 0 34px 0 34px; }
.search input::placeholder { color: var(--mute); }
.search input:focus { outline: none; border-color: var(--c-received); box-shadow: 0 0 0 3px rgba(63,99,224,.15); }
.search.big input { width: 380px; height: 38px; font-size: 14.5px; }
.search kbd { position: absolute; right: 8px; font: 11px 'DM Sans'; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; color: var(--mute); }
.search input:focus + kbd { display: none; }
.tb-link { color: rgba(255,255,255,.75); font-weight: 600; font-size: 13px; text-decoration: none; }
.tb-link:hover { color: #fff; }
.me { display: flex; align-items: center; gap: 9px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.15); height: 30px; }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.me-name { font-weight: 600; font-size: 13px; color: #fff; border-bottom: 1px dashed rgba(255,255,255,.35); }
.me-name:hover { border-bottom-color: #fff; }

/* ---------- Main ---------- */
.main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 20px 18px; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 0; flex-wrap: wrap; }
.spacer { flex: 1; }
.seg { display: inline-flex; background: #e6e8ef; border-radius: 8px; padding: 3px; }
.seg button { padding: 5px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(23,27,52,.12); }
.toggle { height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--ink-2); background: var(--surface); }
.toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.summary { color: var(--mute); font-size: 13px; }
.summary b { color: var(--ink); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--c-ready); }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(28,148,102,.15); }
.live.off { color: var(--mute); }

/* ---------- Board ---------- */
.board { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 12px; overflow-x: auto; }
.lane { display: flex; flex-direction: column; min-height: 0; background: #e9ebf1; border-radius: 10px; }
.lane-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 10px; border-top: 3px solid var(--lane); border-radius: 10px 10px 0 0; }
.lane-head h3 { font-size: 14px; font-weight: 700; }
.lane-head .n { font-weight: 700; color: var(--mute); }
.lane-head .oldest { margin-left: auto; font-size: 12px; color: var(--mute); }
.cards { flex: 1; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.empty { color: var(--mute); font-size: 13px; padding: 18px 6px; text-align: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.card:hover { border-color: var(--line-2); box-shadow: 0 2px 6px rgba(23,27,52,.06); }
.card.is-new { box-shadow: inset 3px 0 0 var(--sun); }
.card .no { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.flag { font-size: 11.5px; font-weight: 700; color: var(--late); }
.flag.new { color: #8a6a00; }
.flag.muted { color: var(--mute); font-weight: 600; }
.age { font-size: 12px; font-weight: 600; color: var(--mute); padding: 1px 7px; border-radius: 5px; align-self: center; white-space: nowrap; }
.age.warn { background: var(--warn-bg); color: var(--warn); }
.age.late { background: var(--late-bg); color: var(--late); }
.card .who { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); }
.card .what { grid-column: 1 / -1; font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.card .meta { font-size: 12px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv { margin-left: auto; height: 28px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--next); white-space: nowrap; }
.adv:hover { filter: brightness(1.08); }

/* ---------- Order panel ---------- */
.scrim { position: fixed; inset: 0; background: rgba(22,29,94,.28); z-index: 10; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(500px, 100vw); background: var(--surface); z-index: 11; overflow-y: auto; box-shadow: -12px 0 32px rgba(23,27,52,.14); }
.dr-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dr-head .close { position: absolute; top: 16px; right: 18px; width: 30px; height: 30px; border-radius: 6px; font-size: 18px; color: var(--mute); }
.dr-head .close:hover { background: var(--canvas); }
.dr-sub { color: var(--mute); font-size: 12.5px; }
.dr-title { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.dr-title h2 { font-size: 24px; }
.dr-body { padding: 4px 24px 30px; }
.dr-sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.dr-sec:last-child { border-bottom: 0; }
.dr-sec h4 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.stepper button { text-align: left; padding: 8px 8px 7px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--mute); position: relative; }
.stepper button::before { content: ''; display: block; height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 7px; }
.stepper button.past { color: var(--ink-2); }
.stepper button.past::before { background: var(--step); opacity: .45; }
.stepper button.now { color: var(--ink); border-color: var(--step); background: color-mix(in srgb, var(--step) 8%, white); }
.stepper button.now::before { background: var(--step); }
.stepper button:hover:not(.now) { border-color: var(--line-2); }
.cancel-link { margin-top: 10px; font-size: 12.5px; color: var(--late); font-weight: 600; }
.cancelled-note { margin-top: 10px; font-size: 13px; color: var(--late); font-weight: 600; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--mute); }
.kv a { color: var(--c-received); text-decoration: none; }
.kv a:hover { text-decoration: underline; }
.line-items { display: grid; gap: 0; }
.line-items div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f0f1f5; font-size: 13.5px; }
.line-items div:last-child { border: 0; }
.line-items small { color: var(--mute); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields label, .form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.fields .full { grid-column: 1 / -1; }
input:not([type=checkbox]):not([type=search]), select, textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 7px; padding: 8px 10px; font-size: 14px; background: #fff; color: var(--ink); font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c-received); box-shadow: 0 0 0 3px rgba(63,99,224,.15); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13.5px; }
.history { list-style: none; display: grid; gap: 8px; }
.history li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; font-size: 13px; color: var(--mute); }
.history li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--line-2)); margin-top: 5px; }
.history b { color: var(--ink); font-weight: 600; }

/* ---------- Tables, forms, stores ---------- */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mute); padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; position: sticky; top: 0; }
.table td { padding: 10px 14px; border-bottom: 1px solid #f0f1f5; vertical-align: top; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #f8f9fb; }
.table .sub { color: var(--mute); font-size: 12.5px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--s); }
.split { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; align-items: start; min-height: 0; overflow: auto; }
.form { display: flex; flex-direction: column; gap: 12px; }
.sheet.form { padding: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .actions { display: flex; justify-content: flex-end; gap: 8px; }
.form .hint { color: var(--mute); font-size: 13px; margin-top: -6px; }
.form-error { color: var(--late); font-weight: 600; font-size: 13px; min-height: 18px; }
.stores { display: grid; gap: 12px; overflow: auto; }
.store { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.store h3 { font-size: 15px; display: flex; gap: 10px; align-items: center; }
.store dl { grid-column: 1; display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 13px; margin-top: 6px; }
.store dt { color: var(--mute); }
.store code { font-size: 12.5px; background: var(--canvas); border-radius: 4px; padding: 1px 6px; }
.store .btn { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.ok { color: var(--c-ready); font-size: 13px; font-weight: 600; }
.bad { color: var(--late); font-size: 13px; font-weight: 600; }

/* ---------- Modal, toast ---------- */
.modal { border: 0; border-radius: 12px; padding: 22px; width: min(540px, 94vw); margin: auto; box-shadow: 0 24px 60px rgba(23,27,52,.25); }
.modal::backdrop { background: rgba(22,29,94,.35); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 9px; padding: 10px 14px; font-size: 13.5px; display: flex; gap: 16px; align-items: center; z-index: 30; box-shadow: 0 10px 30px rgba(23,27,52,.3); }
.toast button { color: var(--sun); font-weight: 700; }
.toast.warn { background: #7a1a2e; }

/* ---------- Login ---------- */
.login-page { align-items: center; justify-content: center; background: #1b1f33; }
.login-card { background: var(--surface); border-radius: 14px; padding: 32px; width: 400px; display: flex; flex-direction: column; gap: 14px; }
.login-logos { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.login-logos img { width: 100%; height: 34px; object-fit: contain; }
.ll-nova { background: #141c63; border-radius: 8px; padding: 6px 10px; }
.login-card h1 { text-align: center; font-size: 20px; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.login-card .btn { height: 40px; }

@media (max-width: 960px) {
  .topbar { gap: 10px; padding: 0 12px; overflow-x: auto; }
  .search input, .search.big input { width: 200px; }
  .me-name, .tb-link[href="/kiosk"] { display: none; }
  .split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Customer files (thumbnails, links) ---------- */
.files { grid-column: 1 / -1; display: flex; gap: 5px; margin-top: 7px; align-items: center; }
.files img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); background: repeating-conic-gradient(#f1f2f6 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.file-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 5px; background: #eef0f5; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.files .more { font-size: 12px; font-weight: 700; color: var(--mute); }
.items-list { display: grid; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.item-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.item-head small { color: var(--mute); }
.item-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); max-width: 100%; }
.file:hover { border-color: var(--c-received); background: #f6f8ff; }
.file img { width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#eceef3 0 25%, #fff 0 50%) 0 0 / 12px 12px; border: 1px solid var(--line); }
.file .file-chip { width: 56px; height: 56px; }
.file-txt { display: grid; min-width: 0; }
.file-txt b { font-size: 13px; color: var(--c-received); }
.file-txt small { font-size: 12px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.props { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin-top: 10px; font-size: 12.5px; }
.props dt { color: var(--mute); }
.props dd { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.props dd.long { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--mute); }
address { font-style: normal; line-height: 1.45; }
.addr-actions { display: flex; gap: 14px; margin-top: 4px; font-size: 12.5px; }
.link-btn { color: var(--c-received); font-weight: 600; font-size: 12.5px; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--late); }

/* ---------- Ready-by picker ---------- */
.picker-field { position: relative; display: flex; flex-direction: column; gap: 5px; grid-column: 1 / -1; }
.picker-field .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.picker-btn { height: 38px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 12px 0 36px; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237c8199' stroke-width='1.6'%3E%3Ccircle cx='8' cy='8' r='6.2'/%3E%3Cpath d='M8 4.6V8l2.4 1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; }
.picker-btn.empty { color: var(--mute); font-weight: 500; }
.picker-btn:hover { border-color: var(--mute); }
.picker { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(23,27,52,.18); padding: 14px; }
.pk-quick { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pk-quick button { height: 30px; padding: 0 11px; border-radius: 15px; background: #eef1fd; color: #2c47b8; font-weight: 700; font-size: 12.5px; }
.pk-quick button:hover { background: #dfe5fc; }
.pk-label { font-size: 12px; font-weight: 700; color: var(--mute); margin: 12px 0 6px; }
.pk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pk-days button { display: grid; justify-items: center; padding: 6px 0 5px; border-radius: 8px; border: 1px solid var(--line); line-height: 1.15; }
.pk-days small { font-size: 10.5px; color: var(--mute); font-weight: 600; }
.pk-days b { font-size: 16px; }
.pk-days button:hover { border-color: var(--line-2); }
.pk-days .on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pk-days .on small { color: rgba(255,255,255,.75); }
.pk-times { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; max-height: 176px; overflow-y: auto; padding-right: 2px; }
.pk-times button { height: 32px; border-radius: 7px; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pk-times button:hover:not(:disabled) { border-color: var(--c-received); color: var(--c-received); }
.pk-times button:disabled { color: #c3c6d3; background: #fafbfc; cursor: default; }
.pk-times .on { background: var(--c-received); border-color: var(--c-received); color: #fff !important; }
.pk-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pk-sel { flex: 1; text-align: right; font-size: 13px; font-weight: 600; }

/* Move back + drag between columns */
.back { height: 28px; width: 30px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 700; font-size: 14px; background: #fff; margin-left: auto; }
.back:hover { border-color: var(--ink-2); color: var(--ink); }
.back + .adv { margin-left: 6px; }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: .45; }
.lane.drop { outline: 2px dashed var(--lane); outline-offset: -2px; background: #e2e6f0; }

/* ---------- Shells ---------- */
.app, .home { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nowrap { white-space: nowrap; }
.btn.danger { background: var(--c-on_hold); border-color: var(--c-on_hold); color: #fff; }
.btn.danger:hover { filter: brightness(1.06); }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.form .hint.warn { color: var(--warn); background: var(--warn-bg); border-radius: 7px; padding: 8px 10px; margin-top: 0; font-weight: 600; }
.form .actions.stack { flex-wrap: wrap; }

/* ---------- Company picker (first page) ---------- */
.home { background: #191c2c; color: #fff; overflow: auto; }
.home-top { display: flex; align-items: center; gap: 18px; padding: 16px 28px; }
.home-title { font-weight: 700; font-size: 15px; color: rgba(255,255,255,.85); }
.home-link { color: rgba(255,255,255,.75); font-weight: 600; font-size: 13px; text-decoration: none; }
.home-link:hover { color: #fff; }
.home-me { font-size: 13px; color: rgba(255,255,255,.6); padding-left: 18px; border-left: 1px solid rgba(255,255,255,.15); }
.home-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 20px 40px 60px; max-width: 1280px; width: 100%; margin: 0 auto; }
.home-body h1 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 26px; }
.brand-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.tile { display: flex; flex-direction: column; text-align: left; border-radius: 16px; overflow: hidden; background: #fff; color: var(--ink); box-shadow: 0 16px 40px rgba(0,0,0,.35); transition: transform .15s, box-shadow .15s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(0,0,0,.45); }
.tile:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tile-face { height: 220px; display: flex; align-items: center; justify-content: center; padding: 30px; }
.tile[data-tile="nova"] .tile-face { background: radial-gradient(120% 120% at 30% 20%, #26339c, #141c63 70%); border-bottom: 6px solid #ffd21a; }
.tile[data-tile="august5"] .tile-face { background: #2b2523; border-bottom: 6px solid #e20613; }
.tile[data-tile="moniart"] .tile-face { background: #1c3160; border-bottom: 6px solid #d31f46; }
.tile-face img { max-width: 80%; max-height: 120px; object-fit: contain; }
.tile-word { font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.tile-body { display: grid; gap: 4px; padding: 18px 22px 22px; }
.tile-name { font-size: 19px; font-weight: 700; }
.tile-stats { font-size: 14px; color: var(--ink-2); }
.tile-stats b { color: var(--ink); margin-left: 4px; }
.tile-stats b:first-child { margin-left: 0; }
.tile-stats b.hold { color: var(--c-on_hold); }
.tile-stats.muted { color: var(--mute); }

/* ---------- Dropdown (replaces native selects) ---------- */
.dd { position: relative; display: inline-flex; min-width: 0; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 32px 0 12px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; font-weight: 600; font-size: 13.5px; color: var(--ink); white-space: nowrap; position: relative; max-width: 100%; }
.dd-btn::after { content: ''; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border: solid var(--mute); border-width: 0 1.7px 1.7px 0; transform: translateY(-70%) rotate(45deg); }
.dd-btn:hover { border-color: var(--mute); }
.dd-btn[aria-expanded="true"] { border-color: var(--c-received); box-shadow: 0 0 0 3px rgba(63,99,224,.15); }
.dd-val { overflow: hidden; text-overflow: ellipsis; }
.dd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--s); flex: 0 0 auto; }
.form .dd, .field .dd { display: flex; }
.form .dd-btn, .field .dd-btn { width: 100%; height: 38px; font-weight: 500; font-size: 14px; }
.dd-menu { position: fixed; z-index: 50; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgba(23,27,52,.2); padding: 5px; max-height: 340px; overflow-y: auto; }
.dd-menu li { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.dd-menu li > span:only-child, .dd-menu li > span:first-child:not(.dd-dot) { grid-column: 1 / -1; }
.dd-menu li small { grid-column: 1 / -1; color: var(--mute); font-size: 12px; font-weight: 400; }
.dd-menu li .dd-dot + span + small { grid-column: 2; }
.dd-menu li.active { background: #f1f3f9; }
.dd-menu li.sel { font-weight: 700; }
.dd-menu li.sel::after { content: ''; position: absolute; }
.stage-dd .dd-btn { height: 30px; font-size: 13px; width: 178px; }

/* ---------- Orders tab ---------- */
.orders-bar { gap: 12px; }
.table.orders td { vertical-align: middle; }
.table .items-cell { max-width: 340px; }
.table .stage-col { width: 200px; }
.row-actions { text-align: right; white-space: nowrap; }

/* ---------- Board extras ---------- */
.board-empty { grid-column: 1 / -1; align-self: start; background: var(--surface); border: 1px dashed var(--line-2); border-radius: 12px; padding: 40px; text-align: center; color: var(--ink-2); }
.board-empty h2 { margin-bottom: 6px; color: var(--ink); }
.lane-hold { background: #f7ebe5; }
.card.is-hold { box-shadow: inset 3px 0 0 var(--c-on_hold); }
.hold-line { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--c-on_hold); }
.tag { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; }
.tag.ship { background: #e3f1f6; color: var(--c-shipped); }

/* ---------- Order panel extras ---------- */
.dr-title .status { margin-left: auto; }
.stepper button.blocked { border-color: var(--c-on_hold); color: var(--c-on_hold); background: #fdf0ea; }
.stepper button.blocked::before { background: var(--c-on_hold); }
.stage-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.stage-actions .cancel-link, .stage-actions .cancelled-note { margin-top: 0; }
.warn-btn { color: var(--c-on_hold); border-color: #f0c4b3; }
.warn-btn:hover { border-color: var(--c-on_hold); }
.hold-box { margin-top: 12px; border: 1px solid #f0c4b3; background: #fdf3ee; border-radius: 9px; padding: 12px 14px; display: grid; gap: 8px; justify-items: start; }
.hold-top { display: flex; justify-content: space-between; gap: 10px; width: 100%; color: var(--c-on_hold); }
.hold-box p { font-size: 13.5px; white-space: pre-wrap; color: var(--ink-2); }
.push-fail { margin-top: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--late-bg); color: var(--late); border-radius: 8px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.tracking { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.tracking a { color: var(--c-received); }
.seg.small { padding: 2px; }
.seg.small button { padding: 3px 10px; font-size: 12.5px; }

/* ---------- Dialog chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff; }
.chip:hover { border-color: var(--mute); }
.chip[aria-pressed="true"] { background: var(--c-on_hold); border-color: var(--c-on_hold); color: #fff; }

/* Sound toggle in the dark top bar */
.toggle.dark { height: 28px; font-size: 12px; background: transparent; color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.25); }
.toggle.dark[aria-pressed="true"] { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.toggle.dark::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: rgba(255,255,255,.4); vertical-align: 1px; }
.toggle.dark[aria-pressed="true"]::before { background: #3ddc97; }
.brand-switch.single { cursor: default; }
.brand-switch.single .chev { display: none; }
.brand-switch.single:hover { background: none; }
.chips.small .chip { height: 28px; padding: 0 10px; font-size: 12.5px; }
.chips.small .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.no-shops { color: rgba(255,255,255,.8); font-size: 16px; }

/* Checkboxes (Rush, email the customer, ...) */
label.check { cursor: pointer; font-weight: 600; }
label.check input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 20px; height: 20px; margin: 0; padding: 0; border: 1.5px solid var(--line-2); border-radius: 6px; background: #fff; display: inline-grid; place-content: center; cursor: pointer; transition: background .12s, border-color .12s; }
label.check input[type="checkbox"]::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: translateY(-1px) rotate(45deg) scale(0); transition: transform .12s; }
label.check input[type="checkbox"]:checked { background: var(--ink); border-color: var(--ink); }
label.check input[type="checkbox"]:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
label.check input[type="checkbox"]:hover { border-color: var(--mute); }
label.check input[type="checkbox"]:focus-visible { outline: 2px solid var(--c-received); outline-offset: 2px; }
label.check input[type="checkbox"]:disabled { background: #eef0f5; cursor: not-allowed; }
/* Rush is a switch: red when on */
label.check.rush input[type="checkbox"] { width: 38px; height: 22px; border-radius: 11px; background: #d9dce6; border-color: transparent; place-content: center start; padding: 0 2px; }
label.check.rush input[type="checkbox"]::after { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; transform: none; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
label.check.rush input[type="checkbox"]:checked { background: var(--late); }
label.check.rush input[type="checkbox"]:checked::after { transform: translateX(16px); }
.warn-text { color: var(--late); font-weight: 600; }
