/* Let working screens use the available workspace. Keep the Guide readable. */
.main > .dashboard-page,
.main > .items-page-shell {
    width: 100%;
    max-width: none;
}
.main > .guide {
    width: min(100%, 1760px);
    max-width: 1760px;
    margin-inline: auto;
}

/* Registers show identification and working values first. Secondary reference
   fields remain available through the adjacent column control. */
.items-register-table.register-compact [data-optional-column],
.lots-register-table.register-compact [data-optional-column] { display: none; }
.items-page-shell .items-register-table.register-compact { min-width: 930px; table-layout: auto; }
.lots-register-table.register-compact { min-width: 1080px; }
.register-column-toggle { margin: 10px 0 4px; }
.active-filter-summary { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.active-filter-summary span { padding: 5px 9px; border: 1px solid #d8ccbb; border-radius: 999px; background: #f7f3eb; }
.stock-action-chooser { margin: 12px 0 20px; padding: 16px; border: 1px solid #d9e8e7; border-left: 4px solid #14727a; border-radius: 10px; background: #f2faf9; }
.stock-action-chooser > .field-help { margin: 4px 0 12px; }
.stock-action-chooser-links { display: flex; flex-wrap: wrap; gap: 8px; }
.stock-action-chooser-links .btn { background: #fff; }

/* Daily task paths stay readable on wide workstations and narrow phones. */
.main > .workflow-guide-page { width: min(100%, 1480px); margin-inline: auto; }
.workflow-guide-page .page-header { margin-bottom: 16px; }
.workflow-guide-page .page-header .muted { max-width: 750px; }
.workflow-guide-page > .notice { margin: 0 0 18px; }
.workflow-task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.workflow-task-card { display: flex; gap: 16px; align-items: flex-start; min-width: 0; padding: 22px; color: var(--ink); text-decoration: none; }
.workflow-task-card:hover, .workflow-task-card:focus-visible { border-color: var(--teal); box-shadow: 0 10px 28px rgba(20, 45, 43, .12); }
.workflow-task-number { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; background: #e5f0ef; color: var(--teal); font-weight: 800; }
.workflow-task-copy { display: grid; gap: 8px; min-width: 0; }
.workflow-task-copy strong { font-size: 1.1rem; }
.workflow-task-copy small { font-size: .9rem; line-height: 1.5; color: var(--muted); }
.workflow-task-link { margin-top: 5px; color: var(--teal); font-weight: 800; }
.workflow-guide-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; align-items: start; }
.workflow-guide-steps, .workflow-guide-launch, .workflow-guide-result { padding: 22px; }
.workflow-guide-page h2 { margin: 0 0 14px; font-size: 1.12rem; }
.workflow-guide-steps ol { list-style: none; counter-reset: workflow-step; display: grid; gap: 0; margin: 0; padding: 0; }
.workflow-guide-steps li { counter-increment: workflow-step; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.workflow-guide-steps li::before { content: counter(workflow-step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e5f0ef; color: var(--teal); font-weight: 800; }
.workflow-guide-steps li strong, .workflow-guide-steps li p { grid-column: 2; }
.workflow-guide-steps li strong { align-self: end; }
.workflow-guide-steps li p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.workflow-guide-side { display: grid; gap: 16px; }
.workflow-guide-launch { display: grid; gap: 10px; }
.workflow-guide-launch h2 { margin-bottom: 2px; }
.workflow-guide-launch p { margin: 0 0 4px; color: var(--muted); line-height: 1.5; }
.workflow-guide-launch .btn { justify-content: flex-start; text-align: left; white-space: normal; }
.workflow-guide-result p { margin: 0; line-height: 1.55; }
.workflow-empty-state { padding: 22px; }
.workflow-guided-entry { margin-bottom: 16px; }
.workflow-guided-entry p { margin: 5px 0; }
.workflow-current-step { display: grid; gap: 3px; padding: 10px 12px; border-left: 3px solid var(--teal); background: #f2faf9; border-radius: 0 8px 8px 0; }
.workflow-current-step small { color: var(--teal); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.workflow-current-step strong { color: var(--ink); }
.workflow-current-step span { color: var(--muted); line-height: 1.45; }
.stock-finder-card-list[hidden] { display: none; }
.stock-finder-card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 370px; overflow: auto; margin: 8px 0 16px; padding: 4px; }
.stock-finder-result-card { display: grid; gap: 4px; width: 100%; min-height: 64px; text-align: left; white-space: normal; }
.stock-finder-result-card strong { overflow-wrap: anywhere; }
.stock-finder-result-card small { color: var(--muted); font-weight: 500; }
.stock-finder-result-card[aria-pressed="true"] { border-color: var(--teal); background: #f2faf9; }
@media (max-width: 720px) { .stock-finder-card-list { grid-template-columns: minmax(0, 1fr); } }
.workflow-document-path { grid-column: 1 / -1; display: grid; gap: 10px; padding: 14px 0 4px; border-top: 1px solid var(--line); }
.workflow-document-path ol { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: document-step; }
.workflow-document-path li { counter-increment: document-step; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; color: var(--muted); }
.workflow-document-path li::before { content: counter(document-step); display: grid; place-items: center; width: 21px; height: 21px; flex: none; border-radius: 50%; background: #eee9df; color: var(--ink); font-size: .75rem; font-weight: 800; }
.workflow-document-path li.complete { color: var(--ink); border-color: #b8d5d1; background: #f2faf9; }
.workflow-document-path li.complete::before { content: '✓'; color: #fff; background: var(--teal); }
.workflow-document-path .btn { justify-self: start; }
.workflow-status-card .workflow-status-main, .workflow-status-card .workflow-custody-summary { grid-column: 1 / -1; }
@media (max-width: 800px) { .workflow-guide-layout { grid-template-columns: minmax(0, 1fr); } }

/* Keep the Guide's instructional copy readable inside the wider shared shell. */
.main > .guide .guide-hero > p,
.main > .guide .guide-data-language-notice {
    max-width: 900px;
}

/* The Products page has three primary filters; fill their row evenly. */
.items-page-shell .filter-panel .filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
}

.items-page-shell .filter-panel .filter-actions {
    grid-column: 1 / -1;
    align-self: start;
}

/* Keep the long Products register columns aligned instead of letting the
   browser compress each one differently as names and translated labels vary. */
.items-page-shell .items-register-table {
    min-width: 1500px;
    table-layout: fixed;
}

.items-page-shell .items-register-table th,
.items-page-shell .items-register-table td {
    vertical-align: middle;
}

.items-page-shell .items-register-table th:nth-child(1),
.items-page-shell .items-register-table td:nth-child(1) { width: 68px; }
.items-page-shell .items-register-table th:nth-child(2),
.items-page-shell .items-register-table td:nth-child(2) { width: 132px; }
.items-page-shell .items-register-table th:nth-child(3),
.items-page-shell .items-register-table td:nth-child(3) { width: 230px; }
.items-page-shell .items-register-table th:nth-child(4),
.items-page-shell .items-register-table td:nth-child(4) { width: 145px; }
.items-page-shell .items-register-table th:nth-child(5),
.items-page-shell .items-register-table td:nth-child(5) { width: 140px; }
.items-page-shell .items-register-table th:nth-child(6),
.items-page-shell .items-register-table td:nth-child(6),
.items-page-shell .items-register-table th:nth-child(7),
.items-page-shell .items-register-table td:nth-child(7) { width: 80px; }
.items-page-shell .items-register-table th:nth-child(8),
.items-page-shell .items-register-table td:nth-child(8) { width: 95px; }
.items-page-shell .items-register-table th:nth-child(9),
.items-page-shell .items-register-table td:nth-child(9) { width: 100px; }
.items-page-shell .items-register-table th:nth-child(10),
.items-page-shell .items-register-table td:nth-child(10) { width: 90px; }
.items-page-shell .items-register-table th:nth-child(11),
.items-page-shell .items-register-table td:nth-child(11) { width: 170px; }
.items-page-shell .items-register-table th:nth-child(12),
.items-page-shell .items-register-table td:nth-child(12) { width: 90px; }
.items-page-shell .items-register-table th:nth-child(13),
.items-page-shell .items-register-table td:nth-child(13) { width: 100px; }

.items-page-shell .items-register-table th:nth-child(1),
.items-page-shell .items-register-table th:nth-child(2),
.items-page-shell .items-register-table th:nth-child(6),
.items-page-shell .items-register-table th:nth-child(7),
.items-page-shell .items-register-table th:nth-child(8),
.items-page-shell .items-register-table th:nth-child(9),
.items-page-shell .items-register-table th:nth-child(10),
.items-page-shell .items-register-table th:nth-child(12),
.items-page-shell .items-register-table th:nth-child(13) {
    white-space: nowrap;
}

.items-page-shell .items-register-table td:nth-child(2),
.items-page-shell .items-register-table td:nth-child(6),
.items-page-shell .items-register-table td:nth-child(7),
.items-page-shell .items-register-table td:nth-child(8),
.items-page-shell .items-register-table td:nth-child(9),
.items-page-shell .items-register-table td:nth-child(10),
.items-page-shell .items-register-table td:nth-child(12),
.items-page-shell .items-register-table td:nth-child(13) {
    white-space: nowrap;
}

.items-page-shell .items-register-table td:nth-child(3),
.items-page-shell .items-register-table td:nth-child(11) {
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .items-page-shell .filter-panel .filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .items-page-shell .filter-panel .filter-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Stock list on laptops (2026-11-27): see more records at once. */
.selection-summary-disclosure { margin: 0 0 12px; border: 1px solid var(--line, #e2d7c5); border-radius: 12px; background: #fffdf9; }
.selection-summary-disclosure > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.selection-summary-disclosure > summary .selection-summary-label { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #6f6559); }
.selection-summary-disclosure > summary .selection-summary-line { font-weight: 700; }
.selection-summary-disclosure[open] > summary { border-bottom: 1px solid var(--line, #e2d7c5); }
.selection-summary-disclosure > .selection-summary { margin: 12px; }
.lots-sort-toolbar { padding: 8px 12px !important; margin-bottom: 10px; }
.lots-sort-toolbar .sort-toolbar-form { gap: 8px; }
.bulk-lot-toolbar:not(.is-active) { display: none !important; }
.bulk-lot-toolbar.is-active { position: sticky; top: 0; z-index: 6; }
.lots-select-hint { margin: 0 0 6px; font-size: 12px; }
.lots-select-hint[hidden] { display: none; }
@media (min-width: 721px) {
    .lots-register-scroll { max-height: calc(100vh - 120px) !important; }
    .lots-scroll-note { display: none; }
    .lots-register-table td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
    .lots-register-table .lot-card-code strong { white-space: nowrap; }
    .lots-register-table .lot-card-item { min-width: 240px; max-width: 360px; }
    .lots-register-table .lot-card-item small { display: -webkit-box !important; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    .lots-register-table td[data-sticky-action] .action-group { flex-wrap: nowrap; gap: 4px; }
    .lots-register-table td[data-sticky-action] .btn { min-height: 32px; padding: 4px 9px; font-size: 12px; }
    .lots-register-table td[data-sticky-action], .lots-register-table th[data-sticky-action] { min-width: 0 !important; }
}
@media (min-width: 900px) {
    nav.stock-type-switcher { display: none !important; }
}
/* Pairing button sits in the search row instead of taking its own row (2026-11-27). */
@media (min-width: 1100px) {
    .layout > .main { position: relative; }
    .layout > .main > .phone-scanner-pair[data-placement="floating"] { position: absolute; top: 47px; left: 31px; width: auto; max-width: calc(100% - 720px); margin: 0; justify-items: start; }
}

.lot-actions-subhead { margin: 10px 0 2px; padding-top: 8px; border-top: 1px solid var(--line, #e2d7c5); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #6f6559); }

/* Stock finder (2026-11-27): results under the search, full width; chosen record marked. */
.stock-finder-card-list { grid-column: 1 / -1; align-self: start; max-height: 300px; }
.stock-finder-result-card { min-height: 0; padding: 8px 12px; }
select.stock-finder-chosen { border: 2px solid var(--teal, #1f6f6b) !important; background-color: #f2faf9 !important; font-weight: 700; }

.stock-finder-chosen-note { margin: 6px 0 0; color: var(--teal, #1f6f6b); font-weight: 700; font-size: 14px; }
.stock-finder-chosen-note[hidden] { display: none; }
.movement-product-filter, .transfer-product-filter { align-self: start; }
label > .stock-finder-card-list { grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 8px 0 4px; padding: 0; }
label > .stock-finder-card-list .stock-finder-result-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
label > .stock-finder-card-list .stock-finder-result-card small { text-align: right; flex: 0 0 auto; max-width: 45%; }

.inactive-record-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 14px; }
.inactive-record-banner strong { display: block; }
.inactive-record-banner form { margin: 0; }

/* Home screen by role (2026-11-27) */
.dashboard-today { margin-bottom: 16px; }
.dashboard-today-head h2 { margin: 0 0 10px; }
.dashboard-today-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dashboard-today-card { display: block; padding: 12px 14px; border: 1px solid var(--line, #e2d7c5); border-radius: 12px; background: #fffdf9; color: inherit; text-decoration: none; }
a.dashboard-today-card:hover { border-color: var(--teal, #1f6f6b); }
.dashboard-today-card span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #6f6559); }
.dashboard-today-card strong { display: block; margin: 4px 0 2px; font-size: 20px; }
.dashboard-today-card small { display: block; color: var(--muted, #6f6559); }
.dashboard-today-card.is-warning { border-color: #e3b4ab; background: #fdf0ed; }
.dashboard-today-table-wrap { overflow-x: auto; margin-top: 12px; }
.dashboard-today-table td, .dashboard-today-table th { white-space: nowrap; }
.dashboard-today-recent { margin-top: 12px; }
.dashboard-today-recent > summary { cursor: pointer; font-weight: 700; }
.dashboard-today-recent ul { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.dashboard-today-recent li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
