:root {
  --navy-950: #0b1f33;
  --navy-900: #102a43;
  --navy-800: #243b53;
  --navy-600: #486581;
  --slate-500: #829ab1;
  --slate-300: #bcccdc;
  --slate-200: #d9e2ec;
  --slate-100: #eaf0f5;
  --paper: #ffffff;
  --canvas: #f4f7fa;
  --teal: #0f9488;
  --teal-soft: #d8f3ef;
  --amber: #d97706;
  --amber-soft: #fff3cf;
  --red: #c24141;
  --red-soft: #fde8e8;
  --green: #177245;
  --green-soft: #dcf4e6;
  --shadow: 0 12px 35px rgba(16, 42, 67, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-height: 100%; background: var(--canvas); color: var(--navy-950); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% -5%, rgba(15, 148, 136, 0.11), transparent 31rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-900); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.topbar {
  min-height: 70px;
  padding: 12px clamp(18px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: white;
  background: var(--navy-950);
}

.brand { display: flex; align-items: center; gap: 11px; color: white; }
.brand-mark { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 13px; background: var(--teal); font-weight: 900; font-size: 1.35rem; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--slate-300); font-size: .72rem; letter-spacing: .04em; }

.user-chip { display: flex; align-items: center; gap: 13px; color: var(--slate-200); font-size: .85rem; }
.user-chip form { margin: 0; }
.link-button { border: 0; padding: 5px 0; color: white; background: transparent; text-decoration: underline; text-underline-offset: 3px; }

.primary-nav {
  padding: 0 clamp(18px, 5vw, 64px);
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--slate-200);
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.primary-nav a { padding: 14px 17px 12px; border-bottom: 3px solid transparent; font-size: .9rem; font-weight: 750; }
.primary-nav a:hover { border-color: var(--teal); color: var(--teal); }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 76px; }
.narrow-shell { width: min(460px, calc(100% - 32px)); padding-top: 64px; }

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin-bottom: 8px; font-size: 1.16rem; letter-spacing: -.015em; }
.muted { color: var(--navy-600); line-height: 1.55; }
.eyebrow { margin-bottom: 8px; color: var(--teal); font-size: .72rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.optional { color: var(--slate-500); font-size: .75rem; font-weight: 600; }

.page-heading { margin-bottom: 28px; }
.split-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; }
.split-heading .muted { margin-bottom: 0; }

.card { border: 1px solid rgba(188, 204, 220, .72); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }

.button {
  min-height: 44px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  line-height: 1.15;
}
.button.primary { color: white; background: var(--navy-900); }
.button.primary:hover { background: var(--navy-800); }
.button.secondary { border-color: var(--slate-300); color: var(--navy-900); background: white; }
.button.secondary:hover { border-color: var(--teal); color: var(--teal); }
.button.approve { color: white; background: var(--green); }
.button.danger { color: var(--red); border-color: #efb5b5; background: var(--red-soft); }
.button.wide { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .45; }

.messages { margin-bottom: 22px; display: grid; gap: 8px; }
.message { padding: 13px 16px; border-radius: 12px; border: 1px solid var(--slate-300); background: white; }
.message.success { border-color: #9ad3b2; background: var(--green-soft); color: #0d5532; }
.message.error { border-color: #efb5b5; background: var(--red-soft); color: #8f2929; }
.message.warning { border-color: #efd28e; background: var(--amber-soft); color: #7b4b00; }

.stats-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.stats-grid article { min-height: 104px; padding: 17px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--slate-200); border-radius: 15px; background: rgba(255,255,255,.82); }
.stats-grid strong { font-size: 2rem; letter-spacing: -.04em; }
.stats-grid span { color: var(--navy-600); font-size: .78rem; font-weight: 700; }
.stats-grid .attention { border-color: #edcb73; background: var(--amber-soft); }

.quick-add, .export-strip { margin-bottom: 18px; padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.quick-add small, .export-strip small { margin-top: 3px; display: block; color: var(--navy-600); }
.baseline-guide { margin-bottom: 18px; padding: 18px 20px; }
.baseline-guide small { margin-top: 4px; display: block; color: var(--navy-600); }
.baseline-guide ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-actions a { padding: 9px 13px; border-radius: 999px; color: var(--navy-900); background: var(--slate-100); font-size: .82rem; font-weight: 800; }
.quick-actions a:hover { color: white; background: var(--teal); }

.count-start { margin-bottom: 20px; padding: 24px; }
.count-start-heading { margin-bottom: 19px; }
.count-start-heading h2 { font-size: 1.35rem; }
.count-start-heading p:last-child { margin-bottom: 0; }
.count-start-form { display: grid; grid-template-columns: minmax(190px, .65fr) minmax(0, 2fr); gap: 20px; align-items: end; }
.room-choice label, .item-choice-fieldset legend { margin-bottom: 7px; color: var(--navy-800); font-size: .8rem; font-weight: 850; }
.item-choice-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.count-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.count-choice { min-height: 92px; padding: 13px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 13px; text-align: left; }
.count-choice:hover { border-color: currentColor; transform: translateY(-1px); }
.count-choice-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--navy-900); font-weight: 900; }
.count-choice.type-asset .count-choice-icon { background: #174f8a; }
.count-choice.type-component .count-choice-icon { background: #7d4d00; }
.count-choice.type-bulk_bin .count-choice-icon { background: #0c665e; }
.count-choice strong, .count-choice small { display: block; }
.count-choice small { margin-top: 4px; color: var(--navy-600); font-size: .73rem; line-height: 1.3; }

.filter-bar { margin: 25px 0 13px; display: grid; grid-template-columns: minmax(200px, 1.7fr) repeat(3, minmax(125px, .8fr)) auto; gap: 8px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 11px;
  color: var(--navy-950);
  background: white;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,148,136,.13); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; accent-color: var(--teal); }

.asset-list { display: grid; gap: 9px; }
.asset-row { min-height: 92px; padding: 14px 16px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; border: 1px solid var(--slate-200); border-radius: 15px; background: white; box-shadow: 0 5px 20px rgba(16,42,67,.045); transition: transform .15s, border-color .15s; }
.asset-row:hover { transform: translateY(-2px); border-color: var(--teal); }
.type-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; font-weight: 900; }
.type-asset { color: #174f8a; background: #deecfa; }
.type-component { color: #7d4d00; background: var(--amber-soft); }
.type-bulk_bin { color: #0c665e; background: var(--teal-soft); }
.asset-main strong, .asset-main small { display: block; }
.asset-main strong { margin-bottom: 4px; }
.asset-main small { margin-top: 2px; color: var(--navy-600); }
.asset-meta { display: grid; justify-items: end; gap: 6px; }
.asset-meta small { color: var(--navy-600); }
.pagination { margin-top: 18px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pagination > span:last-child { display: flex; flex-wrap: wrap; gap: 8px; }

.status { width: max-content; padding: 6px 9px; border-radius: 999px; color: var(--navy-800); background: var(--slate-100); font-size: .71rem; font-weight: 900; }
.status-approved { color: var(--green); background: var(--green-soft); }
.status-submitted { color: #7b4b00; background: var(--amber-soft); }
.status-rejected { color: var(--red); background: var(--red-soft); }
.status-labelled { color: #0c665e; background: var(--teal-soft); }

.empty-state { padding: 60px 24px; text-align: center; }
.empty-icon { margin: 0 auto 15px; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-size: 2rem; }
.empty-state p { color: var(--navy-600); }
.export-strip { margin-top: 24px; }
.export-strip > div:last-child { display: flex; gap: 8px; }

.login-card { padding: 30px; }
.login-card h1 { font-size: 2.15rem; }
.stack-form { display: grid; gap: 15px; }
.stack-form label { display: grid; gap: 7px; font-weight: 800; }
.field-error, .errorlist { margin: 7px 0; padding: 10px 12px; border-radius: 9px; color: #8f2929; background: var(--red-soft); list-style: none; }

.asset-form { display: grid; gap: 14px; }
.form-section { padding: 22px; display: grid; grid-template-columns: 42px 1fr; gap: 17px; }
.section-number { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--navy-900); font-weight: 900; }
.section-content h2 { margin-top: 7px; margin-bottom: 18px; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; align-content: start; }
.field label { color: var(--navy-800); font-size: .8rem; font-weight: 850; }
.field small { color: var(--navy-600); line-height: 1.4; }
.field.span-two { grid-column: 1 / -1; }
.checkbox-field { align-self: end; }
.checkbox-field label { min-height: 44px; padding: 11px 13px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--slate-300); border-radius: 11px; background: white; }
.record-type-grid > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.record-type-grid label { padding: 13px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--slate-300); border-radius: 11px; font-weight: 800; }
.record-type-grid label:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 2px rgba(15,148,136,.08); }
.photo-input { min-height: 88px; padding: 24px; border: 2px dashed var(--slate-300); background: var(--canvas); }
.photo-input.has-files { border-color: var(--teal); background: var(--teal-soft); }
.notes-section { padding: 22px; }
.advanced-details { overflow: hidden; }
.advanced-details summary { padding: 19px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.advanced-details summary::-webkit-details-marker { display: none; }
.advanced-details summary::after { content: "+"; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--teal); background: var(--teal-soft); font-size: 1.35rem; font-weight: 900; }
.advanced-details[open] summary { border-bottom: 1px solid var(--slate-200); }
.advanced-details[open] summary::after { content: "−"; }
.advanced-details summary strong, .advanced-details summary small { display: block; }
.advanced-details summary small { margin-top: 4px; color: var(--navy-600); font-size: .78rem; font-weight: 500; }
.advanced-content { padding: 22px; }
.advanced-content h2 { margin-top: 24px; }
.advanced-content h2:first-child { margin-top: 0; }
.sticky-actions { padding: 14px 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; position: sticky; bottom: 0; z-index: 8; background: linear-gradient(transparent, var(--canvas) 28%); }

.detail-hero { margin-bottom: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; }
.continue-counting { margin-bottom: 17px; padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.continue-counting small { margin-top: 4px; display: block; color: var(--navy-600); }
.continue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.asset-code { width: max-content; padding: 8px 12px; border-radius: 9px; color: white; background: var(--navy-900); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 850; letter-spacing: .04em; }
.detail-grid { margin-bottom: 17px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.detail-card { padding: 22px; }
.detail-list { margin: 15px 0 0; }
.detail-list div { padding: 10px 0; display: grid; grid-template-columns: 135px 1fr; gap: 12px; border-bottom: 1px solid var(--slate-100); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--navy-600); font-size: .78rem; font-weight: 800; }
.detail-list dd { margin: 0; font-weight: 700; }
.evidence-note { margin: 15px 0 0; padding: 12px; border-radius: 10px; color: #6d4900; background: var(--amber-soft); font-size: .81rem; line-height: 1.45; }
.component-section, .photos-section, .action-panel, .notes-display { margin-top: 14px; padding: 22px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.section-heading p { margin-bottom: 0; color: var(--navy-600); font-size: .85rem; }
.component-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.component-grid a { padding: 13px; border-radius: 11px; background: var(--slate-100); }
.component-grid strong, .component-grid small { display: block; }
.component-grid small { margin-top: 4px; color: var(--navy-600); }
.photo-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.photo-grid a { overflow: hidden; position: relative; min-height: 150px; border-radius: 12px; background: var(--slate-100); }
.photo-item { display: grid; align-content: start; gap: 7px; }
.photo-item > a, .photo-item form .button { display: block; width: 100%; }
.photo-grid img { width: 100%; height: 180px; display: block; object-fit: cover; }
.photo-grid span { position: absolute; left: 8px; bottom: 8px; padding: 5px 8px; border-radius: 7px; color: white; background: rgba(11,31,51,.84); font-size: .7rem; font-weight: 800; }
.photo-choice { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--slate-200); border-radius: 9px; font-size: .78rem; font-weight: 800; background: white; }
.photo-choice input { width: auto; margin: 0; }
.photo-first-section { border-color: #8ac7bd; box-shadow: 0 10px 30px rgba(19,117,103,.08); }
.photo-first-section.is-complete { background: #f7fffc; }
.photo-session-launcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gallery-photo-button { cursor: pointer; }
.selected-photo-summary { margin-top: 14px; padding: 13px; border: 1px solid #8ac7bd; border-radius: 12px; background: white; }
.selected-photo-summary__header { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.selected-photo-strip, .camera-thumbnail-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.selected-photo-strip__image, .camera-thumbnail__image { width: 76px; height: 76px; flex: 0 0 76px; display: block; object-fit: cover; border-radius: 10px; background: var(--slate-100); }
.camera-dialog-open { overflow: hidden; }
.device-camera-dialog { width: min(760px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; border: 0; border-radius: 20px; color: white; background: #071522; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.device-camera-dialog::backdrop { background: rgba(4, 13, 22, .82); backdrop-filter: blur(5px); }
.device-camera-shell { max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow-y: auto; }
.device-camera-header { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.device-camera-header h2 { margin: 0; color: white; font-size: 1.2rem; }
.device-camera-header .eyebrow { margin-bottom: 4px; }
.camera-close { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; color: white; background: rgba(255,255,255,.1); font-size: 1.8rem; line-height: 1; }
#device-camera-capture-stage { min-height: 0; padding: 0 16px 17px; display: flex; flex: 1; flex-direction: column; }
.camera-viewport { min-height: 300px; display: grid; place-items: center; overflow: hidden; position: relative; border-radius: 15px; background: #000; }
.camera-viewport video { width: 100%; max-height: min(58dvh, 560px); display: block; object-fit: contain; background: #000; }
.camera-unavailable { padding: 28px; display: grid; justify-items: center; gap: 12px; text-align: center; color: white; }
.camera-unavailable span { color: var(--slate-300); line-height: 1.45; }
.camera-guidance { margin: 12px 0 5px; min-height: 24px; color: var(--slate-200); text-align: center; }
.camera-capture-actions { min-height: 78px; display: grid; place-items: center; }
.camera-shutter { width: 68px; height: 68px; padding: 5px; border: 3px solid white; border-radius: 50%; background: transparent; }
.camera-shutter span { width: 100%; height: 100%; display: block; border-radius: 50%; background: white; }
.camera-shutter:active:not(:disabled) span { transform: scale(.9); }
.camera-shutter:disabled { opacity: .4; }
.camera-thumbnail-strip { min-height: 76px; margin-bottom: 12px; }
.camera-thumbnail { flex: 0 0 76px; }
#device-camera-review-stage { flex: 1; padding: 18px; color: var(--navy-950); background: white; }
.camera-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.camera-review-photo { min-width: 0; overflow: hidden; position: relative; border: 3px solid var(--teal); border-radius: 12px; background: var(--slate-100); cursor: pointer; }
.camera-review-photo.is-deselected { border-color: transparent; opacity: .4; filter: grayscale(.75); }
.camera-review-photo__image { width: 100%; aspect-ratio: 1; display: block; object-fit: cover; }
.camera-review-photo input { width: 24px; height: 24px; margin: 0; position: absolute; top: 8px; right: 8px; accent-color: var(--teal); }
.camera-review-photo span { padding: 7px 9px; display: block; color: var(--navy-800); background: white; font-size: .76rem; font-weight: 800; }
.camera-review-count { margin: 13px 0; color: var(--navy-600); font-weight: 750; text-align: center; }
.camera-review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.photo-upload { margin-top: 15px; display: grid; grid-template-columns: 160px 1fr auto; gap: 8px; }
.ai-observation { margin-top: 12px; padding: 14px; border: 1px solid var(--slate-200); border-radius: 12px; }
.ai-observation h3, .ai-observation p { margin-top: 0; }
.ai-review-summary { margin: 16px 0; padding: 16px; border: 2px solid #8ac7bd; border-radius: 12px; background: #f2fbf8; }
.ai-review-summary h3 { margin-top: 0; }
.ai-review-summary li { margin-bottom: 7px; }
.action-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.action-panel p { margin-bottom: 0; color: var(--navy-600); }
.action-buttons { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.action-buttons form { margin: 0; }

.label-stage { min-height: 440px; display: grid; place-items: center; border-radius: var(--radius); background: #dce3e8; }
.label-image { width: min(760px, 94%); image-rendering: crisp-edges; background: white; box-shadow: 0 18px 45px rgba(11,31,51,.2); }
.label-actions { margin-top: 18px; display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.printer-hint { margin-top: 16px; text-align: center; color: var(--navy-600); }

.capture-wizard { max-width: 820px; margin: 0 auto; }
.wizard-progress { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.wizard-progress button { min-height: 54px; padding: 9px; border: 1px solid var(--slate-200); border-radius: 12px; color: var(--navy-600); background: white; font-weight: 750; }
.wizard-progress button span { width: 24px; height: 24px; margin-right: 5px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--slate-100); }
.wizard-progress button[aria-current="step"] { color: var(--navy-950); border-color: var(--teal); background: var(--teal-soft); }
.wizard-progress button[aria-current="step"] span { color: white; background: var(--teal); }
.wizard-page { padding: 26px; }
.wizard-page h2 { margin-top: 2px; }
.wizard-page > .field { margin-top: 18px; }
.wizard-actions { margin-top: 22px; display: flex; justify-content: space-between; gap: 10px; }
.wizard-actions .button { min-width: 145px; }
.capture-save-status { min-height: 24px; color: var(--navy-600); text-align: center; }
.photo-session-launcher.single-action { grid-template-columns: 1fr; }
.photo-fallback { text-align: center; }
.photo-fallback summary { color: var(--navy-600); cursor: pointer; font-size: .8rem; }
.photo-fallback .text-link { display: inline-block; margin-top: 8px; cursor: pointer; }
.kind-choice-grid { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kind-choice { min-height: 175px; padding: 20px; display: grid; align-content: start; gap: 9px; position: relative; border: 2px solid var(--slate-200); border-radius: 16px; background: white; cursor: pointer; }
.kind-choice:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 3px rgba(15,148,136,.1); }
.kind-choice input { position: absolute; top: 16px; right: 16px; }
.kind-choice .action-icon { width: 46px; height: 46px; }
.kind-choice strong { font-size: 1.15rem; }
.kind-choice small { color: var(--navy-600); line-height: 1.45; }
.location-button-grid { margin: 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.location-choice { min-height: 68px; padding: 14px; display: flex; align-items: center; gap: 10px; border: 2px solid var(--slate-200); border-radius: 14px; color: var(--navy-950); background: white; font-weight: 800; text-align: left; }
.location-choice[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); }
.location-choice .icon { width: 23px; height: 23px; }
.add-location-choice { color: var(--teal); border-style: dashed; }
.add-location-panel { margin: 12px 0 20px; padding: 16px; border-radius: 14px; background: var(--slate-100); }
.add-location-panel > label { display: block; margin-bottom: 8px; font-weight: 800; }
.location-detail-field { margin-top: 18px; }
.capture-final-summary { margin-top: 18px; padding: 14px; display: grid; gap: 4px; border-radius: 12px; background: var(--teal-soft); }
.capture-final-summary small { color: var(--navy-600); }
.lifecycle-card { padding: 22px; }
.lifecycle-state { width: max-content; margin-bottom: 10px; padding: 7px 12px; display: inline-block; border-radius: 999px; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.lifecycle-available, .lifecycle-office { color: #174f3f; background: var(--teal-soft); }
.lifecycle-deployed { color: #765000; background: var(--amber-soft); }
.lifecycle-sold { color: #7d2c2c; background: var(--red-soft); }
.assembly-summary { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.assembly-summary h2 { margin: 4px 0; }
.assembly-scan-form, .assembly-parts { margin-top: 15px; padding: 22px; }
.assembly-scan-form label strong, .assembly-scan-form label small { display: block; }
.assembly-scan-form label small { margin-top: 4px; color: var(--navy-600); }
.assembly-scan-form .quick-actions { margin-top: 14px; }
.assembly-parts .component-grid article { padding: 14px; border-radius: 12px; background: var(--slate-100); }
.assembly-parts .component-grid strong, .assembly-parts .component-grid small { display: block; }
.assembly-parts .component-grid small { color: var(--navy-600); }
.assembly-parts .component-grid .text-link { margin-top: 10px; display: inline-block; }
.assembly-done { justify-content: flex-end; }
.empty-state.compact { padding: 24px; }
.print-copy-control { margin-bottom: 16px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.print-copy-control label strong, .print-copy-control label small { display: block; }
.print-copy-control label small { margin-top: 3px; color: var(--navy-600); }
.copy-picker { display: flex; gap: 8px; }
.copy-picker input { width: 90px; }
.label-copy-list { display: grid; gap: 14px; }
.print-next { margin-top: 18px; padding: 22px; text-align: center; }
.operation-easy-form { margin-top: 15px; padding: 22px; }
.operation-choice-grid > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.operation-choice-grid label { min-height: 62px; padding: 14px; display: flex; align-items: center; gap: 9px; border: 2px solid var(--slate-200); border-radius: 13px; background: white; font-weight: 800; }
.operation-choice-grid label:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.operation-easy-form > p { display: grid; gap: 6px; }
.operation-easy-form > p > label { font-weight: 800; }
.confirmation-check { margin: 16px 0; padding: 14px; display: flex; gap: 10px; border-radius: 12px; background: var(--amber-soft); font-weight: 800; }

.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 14px; }
.settings-card { padding: 21px; }
.settings-card form > div { display: grid; gap: 5px; }
.settings-card form label { font-size: .78rem; font-weight: 800; }
.mini-list { margin-top: 19px; display: grid; gap: 6px; }
.mini-list span { padding: 9px; border-radius: 9px; background: var(--slate-100); }
.mini-list strong, .mini-list small { display: block; }
.mini-list small { margin-top: 3px; color: var(--navy-600); }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .count-start-form { grid-template-columns: 1fr; align-items: stretch; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar input[type="search"] { grid-column: 1 / -1; }
  .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .component-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  .topbar { padding: 11px 15px; }
  .brand small, .user-chip > span { display: none; }
  .primary-nav { padding: 0 8px; justify-content: space-around; }
  .primary-nav a { flex: 1; padding: 13px 7px 11px; text-align: center; }
  .shell { width: min(100% - 22px, 1180px); padding-top: 23px; }
  h1 { font-size: 2.25rem; }
  .split-heading { align-items: stretch; flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid article { min-height: 88px; }
  .quick-add, .export-strip { align-items: stretch; flex-direction: column; }
  .quick-actions, .export-strip > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .count-start { padding: 17px; }
  .count-choice-grid { grid-template-columns: 1fr; }
  .count-choice { min-height: 76px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar input[type="search"] { grid-column: auto; }
  .asset-row { grid-template-columns: 43px 1fr; }
  .asset-meta { grid-column: 2; justify-items: start; }
  .pagination { align-items: stretch; flex-direction: column; }
  .form-section { padding: 17px; grid-template-columns: 1fr; }
  .section-number { width: 34px; height: 34px; }
  .form-grid.two, .record-type-grid > div { grid-template-columns: 1fr; }
  .photo-session-launcher { grid-template-columns: 1fr; }
  .device-camera-dialog { width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .device-camera-shell { height: 100vh; height: 100dvh; max-height: none; overflow: hidden; }
  .device-camera-header { padding: max(10px, env(safe-area-inset-top)) 14px 8px; }
  #device-camera-capture-stage { padding: 0 12px max(10px, env(safe-area-inset-bottom)); overflow: hidden; }
  .camera-viewport { min-height: 150px; flex: 1 1 auto; }
  .camera-viewport video { height: 100%; max-height: 100%; object-fit: contain; }
  .camera-guidance { min-height: 18px; margin: 6px 0 2px; font-size: 12px; }
  .camera-capture-actions { min-height: 58px; }
  .camera-shutter { width: 54px; height: 54px; }
  .camera-thumbnail-strip { min-height: 52px; margin-bottom: 7px; }
  .camera-thumbnail, .camera-thumbnail__image { width: 52px; height: 52px; flex-basis: 52px; }
  /* Always visible at the bottom of the phone screen, whatever the viewport support. */
  #device-camera-capture-stage { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .camera-next-button, .camera-review-actions { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; }
  .camera-next-button { width: auto; min-height: 60px; font-size: 1.25rem; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
  #device-camera-review-stage { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .camera-review-actions { display: flex; gap: 10px; }
  .camera-review-actions .button { flex: 1; min-height: 56px; }
  .camera-review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field.span-two { grid-column: auto; }
  .detail-hero { align-items: flex-start; flex-direction: column; }
  .continue-counting { align-items: stretch; flex-direction: column; }
  .continue-actions { display: grid; grid-template-columns: 1fr; }
  .continue-actions .button { width: 100%; }
  .detail-list div { grid-template-columns: 105px 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .component-grid, .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid img { height: 145px; }
  .photo-upload { grid-template-columns: 1fr; }
  .action-panel { align-items: stretch; flex-direction: column; }
  .action-buttons { justify-content: stretch; }
  .action-buttons .button, .action-buttons form, .action-buttons form .button { width: 100%; }
  .sticky-actions { padding-top: 28px; }
  .sticky-actions .button { flex: 1 1 150px; }
  .wizard-progress { grid-template-columns: repeat(2, 1fr); }
  .wizard-progress button { min-height: 46px; }
  .wizard-page { padding: 19px; }
  .kind-choice-grid, .location-button-grid { grid-template-columns: 1fr; }
  .kind-choice { min-height: 135px; }
  .wizard-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .wizard-actions .button { min-width: 0; width: 100%; }
  .assembly-summary, .print-copy-control { align-items: stretch; flex-direction: column; }
  .assembly-scan-form .quick-actions { display: grid; grid-template-columns: 1fr; }
  .operation-choice-grid > div { grid-template-columns: 1fr; }
}

@media print {
  @page { size: 50mm 20mm; margin: 0; }
  body { background: white; }
  .topbar, .primary-nav, .no-print, .messages { display: none !important; }
  .shell { width: 50mm; margin: 0; padding: 0; }
  .label-stage { width: 50mm; height: 20mm; min-height: 0; display: flex; align-items: center; justify-content: center; background: white; }
  .label-image { width: 36mm; height: 18mm; display: block; box-shadow: none; }
  .label-copy-list { display: block; }
  .label-copy { break-after: page; page-break-after: always; }
  .label-copy:last-child { break-after: auto; page-break-after: auto; }
}
html .android-print-action[hidden] {
  display: none;
}

/* Calm, action-first workspace. Shared controls also cover setup and printing. */
:root {
  --navy-950: #202e2b; --navy-900: #274b40; --navy-800: #36574d;
  --navy-600: #63716b; --slate-500: #77847d; --slate-300: #cbd4cb;
  --slate-200: #e2e7df; --slate-100: #f1f4ee; --canvas: #f7f8f5;
  --teal: #376650; --teal-soft: #e8f0e5; --amber-soft: #faf0d9;
  --paper: #fff; --shadow: none; --radius: 18px;
}
body { background: var(--canvas); line-height: 1.5; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex-shrink: 0; vertical-align: middle; }
.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-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px; background: white; }
.skip-link:focus { top: 10px; }
:focus-visible { outline: 3px solid #668c37; outline-offset: 4px; }
.topbar { padding: 20px max(24px, calc((100vw - 1120px) / 2)); min-height: 90px; color: var(--navy-950); background: white; border-bottom: 1px solid var(--slate-200); }
.brand { color: var(--navy-950); gap: 13px; }
.brand-mark { background: var(--navy-900); width: 42px; height: 42px; border-radius: 14px; color: #fff; font-size: 30px; letter-spacing: -3px; padding-right: 4px; }
.brand strong { font-size: 18px; letter-spacing: -.6px; }
.brand small { color: var(--navy-600); letter-spacing: 0; font-size: 11px; }
.brand-divider { padding: 0 7px; color: #c4cdc4; font-weight: 400; }
.brand-product { font-weight: 500; color: var(--navy-600); }
.user-chip { color: var(--navy-600); gap: 20px; }
.link-button { color: var(--navy-600); font-size: 12px; text-decoration: none; min-height: 44px; }
.settings-link { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--slate-200); border-radius: 50%; }
.primary-nav { padding: 12px max(24px, calc((100vw - 1120px) / 2)); gap: 8px; background: var(--canvas); border: 0; position: static; }
.primary-nav a { display: flex; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 10px; padding: 10px 20px; font-size: 13px; font-weight: 600; color: var(--navy-600); }
.primary-nav a .icon { width: 18px; height: 18px; }
.primary-nav a[aria-current="page"] { background: #e7eddf; color: #294434; }
.primary-nav a:hover { background: var(--slate-100); border-color: var(--slate-200); }
.shell { width: min(1120px, calc(100% - 48px)); padding: 30px 0 72px; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.12; font-weight: 600; letter-spacing: -1.8px; }
h2 { font-size: 19px; font-weight: 600; letter-spacing: -.5px; }
.eyebrow { font-size: 10px; letter-spacing: 1.7px; font-weight: 700; color: var(--navy-600); margin-bottom: 10px; }
.muted { font-size: 14px; }
.page-heading { margin-bottom: 32px; }
.page-heading .muted { margin-bottom: 0; }
.welcome-heading { display: flex; align-items: center; justify-content: space-between; }
.date-chip { color: var(--navy-600); padding: 8px 13px; border-radius: 30px; border: 1px solid var(--slate-200); font-size: 12px; }
.button { min-height: 46px; padding: 12px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: background .15s; }
.button.primary { background: #315941; }
.button.primary:hover { background: #244632; }
.button.secondary { border-color: #d6ded2; }
.card { border-color: var(--slate-200); }
.home-actions { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; }
.home-action { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 25px; border-radius: 20px; border: 1px solid var(--slate-200); background: white; transition: border-color .15s, transform .15s; }
.home-action:hover { transform: translateY(-3px); border-color: #9daf91; }
.home-action h2 { color: var(--navy-950); margin-bottom: 9px; font-size: 21px; }
.home-action p { color: var(--navy-600); font-size: 13px; line-height: 1.7; margin: 0; }
.action-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--slate-100); }
.action-icon .icon { width: 23px; height: 23px; }
.action-footer { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: auto; padding-top: 17px; border-top: 1px solid var(--slate-200); font-size: 12px; font-weight: 600; }
.capture-action { background: #e6efdc; border-color: #d3e0c6; }
.capture-action .action-icon { background: #335640; color: white; }
.capture-action .action-footer { border-color: #cbdabb; }
.attention-action .action-icon { background: #faf0d9; color: #876220; }
.count-pill { display: inline-block; vertical-align: middle; padding: 2px 8px; margin-left: 3px; border-radius: 8px; background: #faf0d9; color: #805d22; font-size: 13px; }
.resume-strip { display: flex; align-items: center; gap: 17px; margin: 24px 0 34px; padding: 20px 23px; border: 1px solid #dfe5d8; background: #f0f3ea; border-radius: 16px; }
.resume-icon { color: #637858; }
.resume-strip > div { flex: 1; min-width: 0; }
.resume-strip .eyebrow { margin-bottom: 4px; font-size: 9px; }
.resume-strip strong { display: block; font-weight: 600; font-size: 14px; }
.resume-strip small { display: block; color: var(--navy-600); font-size: 12px; margin-top: 3px; }
.resume-strip .button { background: transparent; }
.list-heading { margin: 30px 0 16px; }
.list-heading h2 { margin: 0; }
.list-heading .eyebrow { margin-bottom: 5px; }
.text-link { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.text-link .icon { width: 16px; }
.asset-list { gap: 0; overflow: hidden; border: 1px solid var(--slate-200); border-radius: 16px; background: white; }
.asset-list .empty-state { border: 0; }
.asset-row { grid-template-columns: 58px minmax(0,1fr) auto; gap: 16px; border: 0; border-bottom: 1px solid #edf0e9; border-radius: 0; box-shadow: none; padding: 18px 22px; }
.asset-row:last-child { border-bottom: 0; }
.asset-row:hover { background: #f7faf3; transform: none; }
.asset-thumbnail { width: 58px; height: 58px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: #f0f2ec; color: #70846a; }
.asset-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.asset-main { min-width: 0; }
.asset-main strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.asset-main small { font-size: 12px; overflow-wrap: anywhere; }
.asset-main .asset-code-small { color: #778074; font-size: 10px; letter-spacing: .2px; }
.asset-meta { display: flex; align-items: center; gap: 24px; }
.asset-meta > .icon { width: 17px; color: #86917f; }
.status { font-size: 10px; font-weight: 600; padding: 5px 10px; white-space: normal; max-width: 190px; }
.status-draft { color: #71765f; background: #f0f1e8; }
.status-counted { color: #476437; background: #eef3e5; }
.next-action-label { color: #775b25; font-size: 12px; font-weight: 600; max-width: 200px; }
.quiet-summary { color: var(--navy-600); font-size: 12px; text-align: center; margin: 21px 0; }
.export-details { margin-top: 30px; background: transparent; }
.export-details summary strong { font-size: 13px; }
.search-panel { background: white; border: 1px solid var(--slate-200); border-radius: 16px; padding: 18px; }
.search-main { display: flex; align-items: center; gap: 12px; }
.search-main > .icon { margin-left: 5px; color: #77847d; }
.search-main input { border: 0; background: var(--canvas); min-width: 0; flex: 1; }
.search-filters { margin-top: 14px; }
.search-filters summary { cursor: pointer; font-size: 12px; color: var(--navy-600); }
.filter-bar { margin: 14px 0 0; grid-template-columns: repeat(3,minmax(0,1fr)) auto; align-items: end; }
.filter-bar label { display: grid; gap: 5px; color: var(--navy-600); font-size: 12px; }
.queue-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.queue-tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 15px; border: 1px solid var(--slate-200); border-radius: 10px; background: white; font-size: 12px; }
.queue-tabs a[aria-current="page"] { color: white; background: var(--navy-900); border-color: var(--navy-900); }
.queue-tabs span { font-size: 11px; opacity: .8; }
.capture-shell { max-width: 800px; }
.back-link { display: inline-block; font-size: 12px; color: var(--navy-600); margin-bottom: 20px; }
.form-section { padding: 25px; gap: 18px; grid-template-columns: 32px minmax(0,1fr); }
.section-number { width: 30px; height: 30px; background: #edf1e6; border-radius: 50%; color: #526546; font-size: 12px; }
.section-content h2 { margin-top: 3px; }
.spaced-heading { margin-top: 22px !important; }
input, select, textarea { font-size: 14px; border-color: #d6ded2; min-height: 46px; }
input::placeholder, textarea::placeholder { color: #8b9388; }
.field label { font-size: 12px; font-weight: 600; }
.field small { font-size: 11px; }
.record-type-grid label { font-size: 12px; padding: 12px 9px; min-height: 48px; font-weight: 500; }
.parent-field { margin-top: 14px; }
.photo-first-section { border: 1px solid var(--slate-200); box-shadow: none; }
.photo-session-launcher { padding: 22px; background: #f6f8f2; border: 1px dashed #c9d6be; border-radius: 13px; }
#device-photo-count { font-size: 12px; margin: 12px 0 0; }
.advanced-details summary { padding: 18px 24px; }
.advanced-details summary strong { font-weight: 600; }
.capture-save-bar { margin-top: 6px; border-top: 1px solid var(--slate-200); background: rgba(247,248,245,.97); padding: 16px 0; align-items: center; justify-content: space-between; }
.capture-save-bar p { margin: 0; color: var(--navy-600); font-size: 12px; flex: 1; }
.capture-save-buttons { display: flex; gap: 8px; }
.next-step-panel { border-color: #d3dfc8; background: #edf3e5; margin-bottom: 18px; }
.next-step-panel .eyebrow { margin-bottom: 5px; }
.next-step-panel h2 { margin-bottom: 5px; }
.next-step-panel p { font-size: 13px; }
.continue-counting { background: transparent; }
.continue-counting strong { font-size: 13px; font-weight: 600; }
.continue-counting small { font-size: 12px; }
.asset-code { color: #66765b; background: #edf1e7; font-size: 11px; font-weight: 500; padding: 5px 9px; }
.item-location { margin-bottom: 10px; }
.item-information { margin-top: 18px; }
.item-information .detail-card { border: 0; padding: 0; }
.detail-list dd { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.detail-list dt { font-weight: 500; }
#photos, #next-step, #ai-review { scroll-margin-top: 24px; }
#ai-review { margin-top: 16px; }
.evidence-note { background: #f4f2e7; color: #686344; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
@media (max-width: 900px) {
  .home-action { padding: 20px; }
  .home-action h2 { font-size: 18px; }
  .home-actions { gap: 12px; }
  .asset-meta { gap: 12px; }
}
@media (max-width: 620px) {
  .topbar { min-height: 72px; padding: 13px 20px; }
  .brand strong { font-size: 16px; }
  .brand-mark { width: 36px; height: 36px; font-size: 27px; }
  .brand small { display: none; }
  .brand-divider { padding: 0 3px; }
  .user-chip { gap: 8px; }
  .settings-link { width: 36px; height: 36px; border: 0; }
  .link-button { font-size: 11px; }
  .primary-nav { position: fixed; inset: auto 0 0; z-index: 20; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.98); border-top: 1px solid var(--slate-200); gap: 4px; }
  .primary-nav a { flex-direction: column; gap: 4px; padding: 7px 5px; font-size: 10px; border-radius: 10px; }
  .primary-nav a .icon { width: 20px; height: 20px; }
  .shell { width: calc(100% - 36px); padding: 28px 0 110px; }
  h1 { font-size: 33px; letter-spacing: -1.5px; }
  .page-heading { margin-bottom: 24px; }
  .date-chip { display: none; }
  .home-actions { grid-template-columns: 1fr 1fr; gap: 12px; }
  .home-action { border-radius: 16px; padding: 18px; gap: 13px; }
  .home-action h2 { font-size: 17px; }
  .home-action p { font-size: 12px; line-height: 1.6; }
  .home-action br { display: none; }
  .home-action .action-footer { font-size: 11px; gap: 5px; padding-top: 12px; }
  .capture-action { grid-column: 1 / -1; display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: start; gap: 14px; }
  .capture-action .action-footer { grid-column: 1 / -1; }
  .count-pill { margin-left: 0; font-size: 11px; }
  .resume-strip { margin: 18px 0 28px; padding: 16px; flex-wrap: wrap; gap: 10px; }
  .resume-icon { display: none; }
  .resume-strip .button { padding: 10px; min-height: 42px; font-size: 12px; }
  .resume-strip .button .icon { display: none; }
  .resume-strip small { font-size: 11px; }
  .list-heading { align-items: center; flex-direction: row; gap: 12px; }
  .list-heading h2 { font-size: 17px; }
  .list-heading p { font-size: 11px; }
  .asset-row { grid-template-columns: 48px minmax(0,1fr); gap: 10px 12px; padding: 15px; }
  .asset-thumbnail { width: 48px; height: 48px; grid-row: 1 / 3; align-self: start; }
  .asset-main strong { font-size: 13px; }
  .asset-main small { font-size: 11px; }
  .asset-meta { grid-column: 2; justify-content: space-between; }
  .status { font-size: 9px; }
  .next-action-label { font-size: 11px; }
  .search-panel { padding: 12px; }
  .search-main { gap: 7px; }
  .search-main > .icon { display: none; }
  .search-main .button { padding: 10px; }
  .filter-bar { grid-template-columns: 1fr; }
  .queue-tabs { gap: 7px; }
  .queue-tabs a { padding: 9px 11px; font-size: 11px; }
  .queue-tabs + .list-heading { align-items: flex-start; flex-direction: column; }
  .form-section { grid-template-columns: 1fr; padding: 18px; gap: 8px; }
  .section-number { width: 26px; height: 26px; }
  .section-content h2 { font-size: 18px; margin-bottom: 15px; }
  .record-type-grid > div { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
  .record-type-grid label { flex-direction: column; align-items: center; gap: 7px; text-align: center; font-size: 11px; padding: 11px 4px; }
  input, select, textarea { font-size: 16px; }
  .photo-session-launcher { padding: 14px; }
  .capture-save-bar { bottom: calc(72px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; padding: 12px 0; gap: 10px; }
  .capture-save-bar p { font-size: 11px; }
  .capture-save-buttons .button { flex: 1; font-size: 12px; padding: 12px; }
  .capture-save-buttons { width: 100%; }
  .advanced-details summary { padding: 17px 18px; }
  .advanced-content { padding: 18px; }
  .next-step-panel { padding: 18px; }
  .detail-hero { gap: 10px; }
  .continue-counting { padding: 16px; }
  .continue-actions { grid-template-columns: 1fr; }
  .detail-list div { grid-template-columns: 100px minmax(0,1fr); }
}
@media print { .primary-nav { display: none !important; } .topbar { display: none !important; } .shell { width: 50mm; padding: 0; } }
.component-section.advanced-details { padding: 0; }
.component-section .component-grid + .button { margin-top: 16px; }
/* Photograph a room, then record only what changes. */
.simple-home-actions { grid-template-columns: 1.2fr 1fr; }
.capture-place { margin-bottom: 18px; padding: 0; }
.capture-place > summary { padding: 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.capture-place > summary > span:nth-child(2) { flex: 1; min-width: 0; }
.capture-place small, .capture-place strong { display: block; }
.capture-place small { font-size: 10px; letter-spacing: .1em; color: var(--muted); margin-bottom: 4px; }
.capture-place .advanced-content { padding: 0 18px 18px; }
.simple-capture .photo-first-section { display: block; }
.capture-name, .capture-context { padding: 18px; margin: 18px 0; }
.simple-capture .capture-name .field { margin-bottom: 0; }
.simple-capture .page-heading { margin-bottom: 22px; }
.activity-form { padding: 24px; }
.activity-form .field { margin-bottom: 22px; }
.everyday-actions, .activity-section { padding: 22px; margin-bottom: 20px; }
.everyday-actions h2 { font-size: 18px; margin: 0 0 14px; }
.problem-strip { display: flex; align-items: center; gap: 16px; padding: 20px; margin: 18px 0; border: 1px solid #e8d6af; border-radius: 18px; background: #fff9ed; }
.problem-strip span { flex: 1; }
.problem-strip strong, .problem-strip small { display: block; }
.problem-strip small { margin-top: 5px; }
.problem-card { padding: 18px; margin-bottom: 18px; border-radius: 12px; background: #fff9ed; border: 1px solid #e8d6af; }
.problem-card .button { display: table; margin-top: 14px; }
.activity-history { padding-left: 22px; }
.activity-history li { margin: 18px 0; }
.activity-history p { margin: 4px 0; }
.activity-history small { color: var(--muted); }
.recorded-note { padding: 12px 18px; background: #edf3e7; border-radius: 12px; }
.simple-capture .capture-place, .simple-capture .capture-name { margin: 0; }
.simple-capture .photo-first-section.is-complete .section-content { display: flex; flex-direction: column; }
.simple-capture .is-complete .section-content > h2 { order: 0; }
.simple-capture .is-complete .section-content > p.muted { display: none; }
.simple-capture .is-complete .selected-photo-summary { order: 1; margin: 0; padding: 0; border: 0; background: transparent; }
.simple-capture .is-complete .photo-session-launcher { order: 2; grid-template-columns: 1fr 1fr; padding: 0; margin-top: 16px; border: 0; background: transparent; }
.simple-capture .is-complete .photo-session-launcher .button { padding: 10px 8px; font-size: 12px; }
.simple-capture .selected-photo-summary__header { font-size: 13px; }
.simple-capture .selected-photo-summary__header .button { padding: 9px; font-size: 12px; }
.simple-capture .is-complete #device-camera-error { order: 3; }
@media (max-width: 640px) {
  .simple-home-actions { grid-template-columns: 1fr; }
  .simple-home-actions .home-action { min-height: auto; }
  .simple-home-actions .action-footer { margin-top: 16px; }
  .simple-capture .page-heading h1 { font-size: 27px; }
  .simple-capture .back-link { margin-bottom: 12px; }
  .simple-capture .page-heading p { font-size: 13px; }
  .simple-capture.shell { padding-top: 16px; }
  .simple-capture .page-heading { margin-bottom: 16px; }
  .simple-capture .capture-place > summary { padding: 14px 18px; }
  .simple-capture .is-complete .section-content > h2 { margin-bottom: 8px; }
  .everyday-actions .quick-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .simple-capture .capture-save-buttons .button { font-size: 14px; }
}
/* Physical lifecycle screens */
.workspace-find { display:flex; align-items:center; gap:12px; padding:18px; margin-bottom:18px; }
.workspace-find span { flex:1; }
.workspace-modes { grid-template-columns:repeat(2,minmax(0,1fr)); }
.workspace-modes .home-action { grid-column:auto; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:12px; min-height:180px; }
.workflow-shell { max-width:900px; }
.workflow-shell .card { padding:22px; margin-bottom:18px; }
.workflow-shell form label { display:block; margin:12px 0 5px; }
.workflow-shell form .button { margin-top:12px; }
.workflow-shell .errorlist { color:var(--red); }
.skip-link:not(:focus) { clip-path:inset(50%); width:1px; height:1px; padding:0; overflow:hidden; }
.workflow-item-main { display: flex; align-items: flex-start; gap: 1rem; }
.workflow-thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; }
.workflow-item { overflow-wrap: anywhere; }
.workflow-item-link { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.workflow-item-link:hover, .workflow-item-link:focus-visible { border-color: var(--teal); outline: 3px solid rgba(55,102,80,.18); outline-offset: 2px; }
.count-result { padding: 1rem 0; border-bottom: 1px solid #dde2db; }
[data-scan-video] { width: 100%; max-height: 320px; object-fit: contain; }
audio { max-width: 100%; }
.primary-nav { overflow-x: auto; }
.primary-nav a { flex-shrink: 0; }
@media (max-width: 700px) {
  .primary-nav { display: flex; justify-content: flex-start; gap: .25rem; }
  .primary-nav a { min-width: 64px; }
  .workflow-item-main { flex-direction: column; }
  .workspace-modes .home-action { padding:18px; min-height:180px; }
  .workspace-modes .home-action h2 { font-size:17px; }
  .workspace-modes .home-action p { font-size:12px; }
  .workspace-modes .action-footer { display:none; }
}

/* Photos-only staff home: two large buttons. */
.staff-home { display: grid; gap: 16px; margin-top: 12px; }
.staff-home__button { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 6px; font-size: 2rem; font-weight: 800; letter-spacing: .04em; border-radius: 20px; }
.staff-home__button small { font-size: 1rem; font-weight: 500; letter-spacing: 0; opacity: .85; }
.staff-home__button svg { width: 34px; height: 34px; }

/* Simple app: bigger, fewer words. */
.staff-step-title { font-size: 1.7rem; margin: 0 0 4px; }
.staff-capture .location-detail-field:not(:has(input:required)) { display: none; }
.staff-capture #id_notes { min-height: 110px; font-size: 1.1rem; }
.capture-voice { display: grid; gap: 10px; margin: 12px 0; }
.capture-voice .button { min-height: 56px; font-size: 1.1rem; }
.staff-capture .wizard-actions .button { min-height: 56px; font-size: 1.15rem; }
.label-print-button { width: 100%; min-height: 64px; font-size: 1.5rem; font-weight: 800; letter-spacing: .05em; }
.label-actions { margin-bottom: 14px; }
.label-copy-list .label-stage { min-height: 180px; }
.label-next-actions .button { flex: 1; min-height: 56px; font-size: 1.1rem; }
.find-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 0 6px; }
.find-search input { min-height: 48px; font-size: 1rem; }
.find-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--slate-200, #e2e8f0); }
.find-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #e2e8f0; display: block; }
.find-text { display: grid; gap: 2px; min-width: 0; }
.find-text strong, .find-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-row .button { min-height: 48px; padding-inline: 18px; }
.camera-shutter { -webkit-tap-highlight-color: transparent; }
.camera-shutter:focus, .camera-shutter:active { background: transparent; outline: none; }
@media (max-width: 760px) {
  #review-device-photos.camera-next-button { left: 12px; right: auto; width: calc(100vw - 24px); background: #3ddc97; border-color: #3ddc97; color: #04261a; font-weight: 800; font-size: 1.4rem; }
  #review-device-photos.camera-next-button:disabled { opacity: .45; }
}
.staff-find { padding: 18px; }
.camera-thumbnail.is-saving { opacity: .7; }
.camera-flash::after { content: ""; position: absolute; inset: 0; background: white; opacity: 0; animation: camera-flash .25s ease-out; pointer-events: none; }
@keyframes camera-flash { from { opacity: .8; } to { opacity: 0; } }
