/* WeArchive client portal */
:root {
  --navy: #0B2540; --navy-900: #071A2E; --navy-800: #0F2D4C; --navy-700: #163A5F;
  --teal: #17A398; --teal-ink: #0B746A; --teal-ink-hover: #085F57; --teal-light: #2EC4B6; --teal-wash: #E3F5F2;
  --ink: #0B2540; --body: #3E4F61; --muted: #5F7082; --line: #DDE4EB; --line-strong: #C9D4DF; --paper: #F4F7FA;
  --danger: #B42318; --danger-wash: #FDECEA;
  --font-head: Manrope, "Segoe UI", system-ui, sans-serif;
  --font-body: Inter, "Segoe UI", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(11,37,64,.05), 0 4px 16px rgba(11,37,64,.06);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.55 var(--font-body); color: var(--body); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--teal-ink-hover); }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); letter-spacing: -.015em; line-height: 1.2; margin: 0; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 2px; border-radius: 4px; }
.icon { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; letter-spacing: .01em; }
.pre { white-space: pre-line; }
.overdue { color: var(--danger); font-weight: 600; }
.danger { color: var(--danger) !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .9rem/1 var(--font-body); padding: 11px 16px; border-radius: 9px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--teal-ink); color: #fff; }
.btn-primary:hover { background: var(--teal-ink-hover); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--navy); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #912018; color: #fff; }
.btn-danger-ghost { background: #fff; border-color: #F1B8B2; color: var(--danger); }
.btn-danger-ghost:hover { border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 8px 12px; font-size: .84rem; }
.btn-block { width: 100%; padding: 13px 16px; font-size: .95rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--teal-ink); cursor: pointer; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 700; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: var(--paper); color: var(--ink); }
.icon-btn .icon { width: 18px; height: 18px; }

/* App shell */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #B4C4D4; display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { padding: 4px 10px 22px; }
.side-brand img { width: 150px; height: auto; }
.side-org { padding: 12px; margin: 0 0 14px; border-radius: 10px; background: rgba(255,255,255,.05); }
.side-org small { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-light); font-weight: 600; }
.side-org b { color: #fff; font-weight: 600; font-size: .92rem; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: #C9D6E3; text-decoration: none; font-weight: 500; }
.sidebar nav a .icon { width: 19px; height: 19px; opacity: .85; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a[aria-current="page"] { background: rgba(46,196,182,.14); color: #fff; box-shadow: inset 3px 0 0 var(--teal-light); }
.sidebar nav a[aria-current="page"] .icon { color: var(--teal-light); opacity: 1; }
.side-out { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 6px; }
.side-out span { color: #fff; font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-out button { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; color: #9FB3C8; font: inherit; font-size: .88rem; cursor: pointer; }
.side-out button:hover { color: #fff; }
.side-out .icon { width: 17px; height: 17px; }
.main { min-width: 0; }
.topbar { display: none; }
.content { max-width: 1240px; margin: 0 auto; padding: 32px 36px 64px; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar.open { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .menu-btn { background: none; border: 0; padding: 8px; margin-left: -8px; cursor: pointer; color: var(--ink); }
  .menu-btn .icon { width: 24px; height: 24px; }
  .top-logo { width: 128px; height: auto; }
  .content { padding: 22px 16px 48px; }
}
.scrim { position: fixed; inset: 0; background: rgba(7,26,46,.45); z-index: 55; }

/* Page furniture */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.alert { border-radius: 10px; padding: 13px 16px; margin-bottom: 18px; font-size: .92rem; word-break: break-word; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-success { background: #E6F4EA; color: #1E6B34; }
.alert-error { background: var(--danger-wash); color: var(--danger); }
.alert-info { background: #E8F0FB; color: #1D4F91; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--body); display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: #B8C6D4; box-shadow: var(--shadow); color: var(--body); }
.stat > span { grid-row: span 2; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-wash); color: var(--teal-ink); }
.stat b { font: 800 1.6rem/1.1 var(--font-head); color: var(--ink); }
.stat small { color: var(--muted); font-size: .82rem; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* Panels */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head a { font-size: .87rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.panel-head a .icon { width: 16px; height: 16px; }
.panel-foot { margin: 16px -22px -20px; padding: 14px 22px; border-top: 1px solid var(--line); background: #FAFBFD; border-radius: 0 0 14px 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.panel-foot.stack { display: grid; }
p.panel-foot { display: block; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols > .panel { margin-bottom: 20px; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; gap: 0; } }
.empty { text-align: center; padding: 22px 12px; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; margin: 0 auto 10px; color: #9FB0C1; }
.empty p { max-width: 380px; margin: 0 auto 12px; }

/* Lists */
.list { list-style: none; margin: 0 -10px; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li > a, .list.plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 10px; text-decoration: none; color: var(--body); border-radius: 8px; }
.list li > a:hover { background: var(--paper); color: var(--body); }
.list b { display: block; color: var(--ink); font-weight: 600; font-size: .93rem; }
.list small { display: block; color: var(--muted); font-size: .8rem; }
.list .date { font-size: .85rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.list .date.overdue { color: var(--danger); }
.with-icon { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--teal-wash); color: var(--teal-ink); flex: none; }
.file-ico .icon { width: 18px; height: 18px; }
.link-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .85rem; color: var(--teal-ink); white-space: nowrap; }
.link-label .icon { width: 15px; height: 15px; }
.inactive { opacity: .55; }
.history { list-style: none; margin: 0; padding: 0; position: relative; }
.history::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.history li { position: relative; padding: 0 0 16px 26px; }
.history li::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); }
.history li:first-child::before { background: var(--teal); }
.history b { display: block; color: var(--ink); font-weight: 600; font-size: .92rem; }
.history small { color: var(--muted); font-size: .8rem; }
.details { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0; font-size: .93rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .details { grid-template-columns: 1fr; gap: 2px; } .details dd { margin-bottom: 10px; } }

/* Badges */
.badge { display: inline-block; font-size: .73rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: #EEF2F6; color: var(--ink); vertical-align: middle; }
.badge-in_storage { background: #E6F4EA; color: #1E6B34; }
.badge-with_client { background: #E8F0FB; color: #1D4F91; }
.badge-in_transit, .badge-in_progress { background: #FFF4E0; color: #8A5300; }
.badge-pending_collection, .badge-submitted { background: #F1ECFB; color: #5B3A9B; }
.badge-received { background: #FFF4E0; color: #8A5300; }
.badge-scheduled { background: var(--teal-wash); color: var(--teal-ink); }
.badge-completed { background: #E6F4EA; color: #1E6B34; }
.badge-destroyed, .badge-cancelled { background: #EEF2F6; color: var(--muted); }
.badge-urgent { background: var(--danger-wash); color: var(--danger); }

/* Tables */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; margin-bottom: 16px; }
.table-wrap.flush { border: 0; border-radius: 0 0 14px 14px; margin: 0 -22px -20px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FAFBFD; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFD; }
.table .cb { width: 44px; padding-right: 0; }
.table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--teal-ink); }
.table a { text-decoration: none; }
.row-title { color: var(--ink); font-weight: 600; }
.row-title:hover { color: var(--teal-ink); }
.show-sm { display: none; }
@media (max-width: 760px) { .hide-sm { display: none; } .show-sm { display: block; } }

/* Filters & forms */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.search-field { flex: 1 1 280px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 9px; padding: 0 12px; }
.search-field:focus-within { border-color: var(--teal-ink); box-shadow: 0 0 0 4px rgba(23,163,152,.15); }
.search-field .icon { width: 17px; height: 17px; color: var(--muted); }
.search-field input { border: 0 !important; box-shadow: none !important; padding: 10px 0 !important; background: transparent; }
.small-field { margin-bottom: 10px; max-width: 360px; }
label, legend { display: block; font-weight: 600; color: var(--ink); font-size: .88rem; margin-bottom: 6px; }
label .muted, legend .muted { font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line-strong); border-radius: 9px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
.filters select { width: auto; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 4px rgba(23,163,152,.15); }
.stack { display: grid; gap: 14px; }
.stack small { display: block; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.align-end { display: flex; align-items: flex-end; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr 180px auto; gap: 12px; align-items: end; margin-bottom: 10px; }
.inline-form.compact { grid-template-columns: 1fr auto; }
@media (max-width: 760px) { .inline-form { grid-template-columns: 1fr; } }
.check-inline { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 0; }
.check-inline input { width: 17px; height: 17px; accent-color: var(--teal-ink); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: .85rem; font-weight: 600; }
.form-panel { padding: 24px; }
.field { margin-bottom: 18px; }
.field.narrow { max-width: 260px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.confirm { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--danger-wash); color: #7A1A12; font-weight: 500; margin-bottom: 18px; }
.confirm input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--danger); flex: none; }

/* New request */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .type-grid { grid-template-columns: 1fr; } }
.type-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 20px; text-decoration: none; color: var(--body); display: grid; gap: 6px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.type-card:hover { border-color: var(--teal-ink); box-shadow: var(--shadow); color: var(--body); transform: translateY(-1px); }
.type-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-wash); color: var(--teal-ink); margin-bottom: 6px; }
.type-card b { color: var(--ink); font-size: 1rem; }
.type-card small { color: var(--muted); }
.box-pick { max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-row { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); margin: 0; font-weight: 400; cursor: pointer; }
.pick-row:first-child { border-top: 0; }
.pick-row:hover { background: var(--paper); }
.pick-row:has(input:checked) { background: var(--teal-wash); }
.pick-row input { width: 17px; height: 17px; accent-color: var(--teal-ink); }
.pick-title { color: var(--ink); min-width: 0; }
@media (max-width: 560px) { .pick-row { grid-template-columns: auto 1fr; } .pick-row .pick-title { grid-column: 2; } .pick-row > small { grid-column: 2; } }
.radio-cards { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.radio-card { display: flex; gap: 8px; align-items: center; padding: 11px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; font-weight: 500; cursor: pointer; margin: 0; }
.radio-card:has(input:checked) { border-color: var(--teal-ink); background: var(--teal-wash); }
.radio-card input { accent-color: var(--teal-ink); }

/* Request progress */
.progress { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.progress li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.progress li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-size: .8rem; flex: none; }
.progress li.done { color: var(--teal-ink); }
.progress li.done span { background: var(--teal-wash); color: var(--teal-ink); }
.progress li.current { border-color: var(--teal-ink); color: var(--ink); box-shadow: 0 0 0 3px rgba(23,163,152,.12); }
.progress li.current span { background: var(--teal-ink); color: #fff; }
@media (max-width: 700px) { .progress { grid-template-columns: 1fr 1fr; } }

/* Bulk action bar */
.bulkbar { position: sticky; top: 12px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; box-shadow: 0 10px 30px rgba(7,26,46,.25); }
.bulkbar span { margin-right: auto; }
.bulkbar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.bulkbar .btn-ghost:hover { border-color: #fff; }
.bulkbar .btn-danger-ghost { background: transparent; color: #FFB4AB; border-color: rgba(255,180,171,.5); }
@media (max-width: 960px) { .bulkbar { top: 64px; } }

/* Tabs, pager, menus */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--teal-ink); }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 8px 0 24px; font-size: .9rem; }
.pager a { font-weight: 600; text-decoration: none; }
.pager-info { color: var(--muted); }
.menu { position: relative; display: inline-block; }
.menu-pop { position: absolute; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(11,37,64,.16); padding: 6px; min-width: 210px; }
.menu-pop form { margin: 0; }
.menu-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 7px; font: inherit; font-size: .88rem; color: var(--ink); cursor: pointer; }
.menu-pop button:hover { background: var(--paper); }
.list.plain li { padding: 11px 10px; }

/* Upload */
.dropzone { position: relative; border: 2px dashed var(--line-strong); border-radius: 14px; padding: 28px; text-align: center; background: #FAFBFD; transition: border-color .15s, background-color .15s; }
.dropzone.drag { border-color: var(--teal-ink); background: var(--teal-wash); }
.dropzone .icon { width: 30px; height: 30px; margin: 0 auto 8px; color: var(--teal-ink); }
.dropzone label { font-weight: 400; margin: 0; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-names { display: block; margin-top: 8px; }

/* Sign-in screens */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; background:
  radial-gradient(800px 400px at 50% -10%, rgba(46,196,182,.16), transparent 60%), linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 34px 32px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.auth-card h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-card .stack { margin: 20px 0; }
.auth-logo { display: block; margin-bottom: 26px; }
.auth-logo img { width: 176px; height: auto; }
.auth-foot { margin-top: 20px; font-size: .88rem; }
.auth-foot a { color: #B4C4D4; }
@media (max-width: 480px) { .auth-card { padding: 26px 20px; } }

/* Printing (job sheets) */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  .sidebar, .topbar, .page-head .head-actions, .filters, .pager, .alert, .bulkbar, .panel-foot { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .panel, .table-wrap { border-color: #999; break-inside: avoid; }
}
.label-prompt { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.label-prompt span { display: flex; align-items: center; gap: 8px; }
}

/* Check in */
.setup-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr auto; gap: 12px; align-items: end; }
@media (max-width: 900px) { .setup-row { grid-template-columns: 1fr; } }
.checkin-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .checkin-grid { grid-template-columns: 1fr; } }
.scan-box { background: var(--navy); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; color: #C9D6E3; }
.scan-box label { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.scan-box.compact { padding: 14px 18px; }
.scan-box.compact label { font-size: .85rem; margin-bottom: 8px; }
.scan-input { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 11px; padding: 6px 6px 6px 14px; }
.scan-input .icon { width: 26px; height: 26px; color: var(--teal-ink); }
.scan-input input { border: 0 !important; box-shadow: none !important; font: 600 1.35rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; padding: 8px 4px !important; text-transform: uppercase; min-width: 0; }
.scan-input input::placeholder { color: #B0BCC8; font-weight: 400; }
.scan-box.compact .scan-input input { font-size: 1.05rem; }
.scan-flash { margin-top: 12px; border-radius: 10px; padding: 0 14px; max-height: 0; overflow: hidden; font-weight: 600; transition: max-height .2s, padding .2s; }
.scan-flash.show { max-height: 120px; padding: 12px 14px; }
.scan-flash.f-ok { background: #1E6B34; color: #fff; }
.scan-flash.f-warn { background: #FFF4E0; color: #6B4100; }
.scan-flash.f-error { background: #B42318; color: #fff; }
.tally { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tally span { flex: 1 1 120px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .85rem; color: var(--muted); }
.tally b { display: block; font: 800 1.6rem/1.1 var(--font-head); }
.t-ok b { color: #1E6B34; } .t-warn b { color: #8A5300; } .t-error b { color: var(--danger); }
.scan-log { list-style: none; margin: 0 -10px; padding: 0; max-height: 520px; overflow-y: auto; }
.scan-log li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 10px; border-top: 1px solid var(--line); }
.scan-log li:first-child { border-top: 0; }
.scan-log small { display: block; color: var(--muted); font-size: .82rem; }
.scan-log .r-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--muted); }
.scan-log .r-ok .r-dot { background: #2E9E55; }
.scan-log .r-warn .r-dot { background: #E5A00D; }
.scan-log .r-error .r-dot { background: var(--danger); }
.scan-log .r-error small { color: var(--danger); }
.scan-log li.fresh { animation: fresh 1.6s ease-out; }
@keyframes fresh { from { background: var(--teal-wash); } to { background: transparent; } }
.expected { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; font-size: .87rem; }
.expected li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 7px 0 7px 26px; border-top: 1px solid var(--line); position: relative; color: var(--ink); }
.expected li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--line-strong); }
.expected li.in { color: var(--muted); }
.expected li.in::before { background: #2E9E55; border-color: #2E9E55; }
.expected li.in span:last-child { text-decoration: line-through; }

.new-box { margin-bottom: 16px; }
.new-box-row { display: grid; grid-template-columns: 1fr 1fr 90px auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .new-box-row { grid-template-columns: 1fr; } }
.print-frame { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; }

/* Staff */
.level-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .level-pick { grid-template-columns: 1fr; } }
.level-card { align-items: flex-start; }
.level-card input { margin-top: 3px; }
.level-card span b { display: block; color: var(--ink); }
.level-card span small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.level-form select { width: auto; padding: 7px 10px; font-size: .88rem; }
.activity li { padding: 9px 10px; font-size: .88rem; }
fieldset[disabled] input, fieldset[disabled] textarea { background: var(--paper); color: var(--muted); }

/* Invoices */
.lines-table input { padding: 7px 9px; font-size: .88rem; }
.lines-table input.num { text-align: right; width: 110px; }
.lines-table input.short { width: 90px; }
.lines-table td:first-child { min-width: 260px; }
.lines-table .new-line td { background: #FAFBFD; }
.inv-bottom { display: grid; grid-template-columns: 1fr 300px; gap: 24px; margin-top: 18px; align-items: start; }
@media (max-width: 800px) { .inv-bottom { grid-template-columns: 1fr; } }
.inv-totals { width: 100%; border-collapse: collapse; font-size: .95rem; }
.inv-totals td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.inv-totals .grand td { font-weight: 800; font-size: 1.1rem; color: var(--ink); border-bottom: 0; border-top: 2px solid var(--ink); }
.invoice-preview .inv { max-width: 820px; margin: 0 auto; padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
@media (max-width: 700px) { .invoice-preview .inv { padding: 14px; font-size: 9pt; } }
.usage-card { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.usage-card div { background: var(--paper); border-radius: 12px; padding: 14px 16px; }
.usage-card b { display: block; font: 800 1.4rem/1.2 var(--font-head); color: var(--ink); }
.usage-card small { color: var(--muted); font-size: .8rem; }
@media (max-width: 900px) { .usage-card { grid-template-columns: 1fr 1fr; } }

/* Intake */
.stepper { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: none; }
.stepper li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.stepper li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-size: .82rem; flex: none; }
.stepper li.done { color: var(--teal-ink); }
.stepper li.done span { background: var(--teal-wash); color: var(--teal-ink); }
.stepper li.current { border-color: var(--teal-ink); color: var(--ink); box-shadow: 0 0 0 3px rgba(23,163,152,.12); }
.stepper li.current span { background: var(--teal-ink); color: #fff; }
@media (max-width: 760px) { .stepper { grid-template-columns: 1fr 1fr; } }
.client-filter { margin-bottom: 14px; max-width: 520px; }
.client-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.client-card { display: grid; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--body); background: #fff; transition: border-color .15s, box-shadow .15s; }
.client-card:hover, .client-card:focus-visible { border-color: var(--teal-ink); box-shadow: var(--shadow); color: var(--body); }
.client-card b { color: var(--ink); }
.client-card small { color: var(--muted); }
.intake-form .stack { gap: 18px; }
.qty-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qty-field input { width: 120px; font: 800 2rem/1 var(--font-head); text-align: center; padding: 10px; }
.qty-step { width: 52px; height: 56px; font-size: 1.5rem; padding: 0; }
.btn-lg { padding: 15px 22px; font-size: 1rem; }
.intake-progress { margin-bottom: 16px; }
.intake-progress p { margin: 8px 0 0; font-size: .92rem; }
.ip-bar { height: 10px; border-radius: 6px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.ip-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-ink), var(--teal)); transition: width .3s; }
.batch-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--teal-wash); color: #084F48; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: .92rem; }
.batch-banner span { display: flex; align-items: center; gap: 8px; }
.batch-banner a { font-weight: 700; }
.finish-box { border-color: var(--teal-ink); }

/* Scan station */
.box-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.box-card-main { display: flex; gap: 14px; align-items: center; }
.box-card-main .type-ico { margin: 0; }
.box-card h2 { font-size: 1.2rem; }
.box-card p { margin: 4px 0 0; font-size: .9rem; }
.scan-station { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.scan-right { position: sticky; top: 20px; }
@media (max-width: 1100px) { .scan-station { grid-template-columns: 1fr; } .scan-right { position: static; } }
.source-status { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border-radius: 10px; padding: 12px 14px; font-size: .87rem; margin-bottom: 14px; }
.source-status .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: #2E9E55; }
.source-status .dot.off { background: #9FB0C1; }
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.q-item.selected { border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(23,163,152,.12); }
.q-thumb { width: 64px; height: 84px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); overflow: hidden; padding: 0; cursor: pointer; display: grid; place-items: center; }
.q-thumb img { width: 100%; height: 100%; object-fit: cover; }
.q-thumb span { font: 700 .75rem/1 var(--font-head); color: var(--danger); letter-spacing: .05em; }
.q-fields { display: grid; gap: 8px; min-width: 0; }
.q-file { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); }
.q-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-file small { white-space: nowrap; }
.q-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
@media (max-width: 520px) { .q-row { grid-template-columns: 1fr; } }
.q-fields input { padding: 8px 10px; font-size: .9rem; }
.q-msg { font-size: .82rem; color: var(--muted); }
.q-msg:empty { display: none; }
.q-bar { height: 4px; border-radius: 2px; background: var(--paper); overflow: hidden; display: none; }
.q-bar span { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.q-uploading .q-bar { display: block; }
.q-saved { background: #F3FAF5; border-color: #B9E0C4; }
.q-saved .q-msg { color: #1E6B34; font-weight: 600; }
.q-failed { border-color: #F1B8B2; }
.q-failed .q-msg, .q-invalid .q-msg { color: var(--danger); font-weight: 600; }
.q-invalid { opacity: .6; }
.q-remove { font-size: .9rem; color: var(--muted); border: 0; background: none; }
.preview-panel { padding-bottom: 14px; }
.preview-frame { height: min(78vh, 900px); border-radius: 10px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.preview-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 1100px) { .preview-frame { height: 60vh; } }

/* Staff guide */
.guide { max-width: 860px; }
.guide h2 { font-size: 1.25rem; margin: 8px 0 12px; }
.guide h3 { font-size: 1rem; margin: 18px 0 6px; }
.guide ol, .guide ul { padding-left: 22px; margin: 0 0 12px; }
.guide li { margin: 6px 0; }
.guide .panel { padding: 24px 26px; }
.guide kbd { font: 600 .8rem/1 ui-monospace, Consolas, monospace; background: var(--paper); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; }
.guide .toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.guide .toc a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 600; text-decoration: none; }
.tip { background: var(--teal-wash); color: #084F48; border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin: 12px 0; }
[hidden] { display: none !important; }
