:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --surface-2: #f8fafb;
    --ink: #17212b;
    --muted: #77818d;
    --line: #e1e8ed;
    --blue: #3178c6;
    --green: #0f7c68;
    --accent: #0f7c68;
    --accent-2: #13a584;
    --amber: #c98622;
    --red: #ce4d4d;
    --teal: #0f7c68;
    --nav: #15222a;
    --nav-soft: #203039;
    --shadow: 0 12px 35px rgba(31, 49, 62, 0.07);
    --shadow-soft: 0 4px 15px rgba(23, 33, 43, 0.035);
    --focus: rgba(19, 165, 132, 0.26);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    letter-spacing: 0;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 6px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.button,
.nav-link,
.activity-row,
.brand,
.help-trigger {
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #132027;
    color: #e7eef4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(15, 29, 36, 0.12);
}

.site-header-inner {
    width: min(1500px, 100%);
    min-height: 76px;
    margin: 0 auto;
    padding: 14px clamp(18px, 3vw, 38px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(280px, 430px);
    gap: 18px;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    min-width: 218px;
    padding: 6px 8px;
    border-radius: 8px;
    outline-offset: 3px;
}

.brand:hover,
.brand:active {
    text-decoration: none;
}

.brand:active {
    background: rgba(255, 255, 255, 0.05);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    aspect-ratio: 1;
    border-radius: 8px;
    background: linear-gradient(135deg, #19a383, #0e6f62);
    color: #06231c;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13), 0 8px 20px rgba(0, 0, 0, 0.15);
    font-weight: 850;
}

.brand small {
    display: block;
    color: #8da3ae;
    margin-top: 2px;
    font-size: 11px;
}

.nav {
    display: flex;
    gap: 5px;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    scrollbar-width: thin;
}

.nav-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    color: #b8c4ca;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(19, 165, 132, 0.17);
    color: #fff;
    text-decoration: none;
}

.nav-link.active {
    box-shadow: inset 0 -3px 0 #25b997;
}

.nav-link:active {
    transform: translateY(1px);
    background: rgba(19, 165, 132, 0.24);
}

.nav-link-scan {
    color: #d8f8ef;
}

.main {
    flex: 1;
    min-width: 0;
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 28px clamp(18px, 3vw, 38px) 32px;
}

.topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.scan-mini {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px;
    width: 100%;
}

.scan-mini input,
.filters input,
.filters select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.scan-input {
    width: 100%;
    border: 1px solid #d5e0e8;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(17, 24, 39, 0.02);
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.header-scan input {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.96);
}

.header-scan button {
    background: #18a986;
    border-color: #18a986;
    color: #fff;
    box-shadow: 0 8px 18px rgba(7, 20, 24, 0.18);
}

.scan-mini input:focus,
.filters input:focus,
.filters select:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.scan-input:focus {
    outline: 3px solid var(--focus);
    border-color: var(--accent);
}

.scan-mini button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 14px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    box-shadow: var(--shadow-soft);
    outline-offset: 3px;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.button:hover,
.scan-mini button:hover {
    text-decoration: none;
    border-color: #b8c6cf;
    box-shadow: 0 8px 20px rgba(31, 49, 62, 0.08);
    transform: translateY(-1px);
}

.button:active,
.scan-mini button:active {
    box-shadow: 0 2px 8px rgba(31, 49, 62, 0.08);
    transform: translateY(1px);
}

.button:focus-visible,
.scan-mini button:focus-visible,
.nav-link:focus-visible,
.brand:focus-visible,
.help-trigger:focus-visible {
    outline: 3px solid var(--focus);
}

.button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 8px 16px rgba(15, 124, 104, 0.18);
}

.button.primary:hover {
    background: #0b6d5b;
    border-color: #0b6d5b;
    box-shadow: 0 10px 22px rgba(15, 124, 104, 0.22);
}

.button.danger {
    background: #fff;
    border-color: #f2b8b5;
    color: var(--red);
}

.button.danger:hover {
    background: #fff1f0;
    border-color: #e3847d;
}

.button.danger:active {
    background: #ffe6e3;
}

.button.small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 13px;
}

.button.large {
    min-height: 54px;
    font-size: 18px;
}

.icon-button {
    width: 54px;
    aspect-ratio: 1;
    padding: 0;
}

.icon-button svg {
    width: 24px;
    height: 24px;
}

.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;
}

.panel-head > a:not(.button) {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--accent);
    font-size: 13px;
    font-weight: 750;
    box-shadow: var(--shadow-soft);
    transition: background-color 140ms ease, border-color 140ms ease, transform 120ms ease;
}

.panel-head > a:not(.button):hover {
    text-decoration: none;
    border-color: #b8cfc8;
    background: #f4fbf8;
    transform: translateY(-1px);
}

.panel-head > a:not(.button):active {
    transform: translateY(1px);
}

.site-footer {
    margin-top: auto;
    color: #8a949b;
}

.site-footer-inner {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 16px clamp(18px, 3vw, 38px) 24px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.site-footer strong {
    color: #2d383f;
}

.footer-status {
    white-space: nowrap;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 22px;
    padding: 2px 0 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.page-head h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.08;
    letter-spacing: 0;
}

.page-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.page-subtitle {
    max-width: 900px;
    font-size: 15px;
    line-height: 1.55;
}

.title-row,
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.title-row h1 {
    margin: 0;
}

.section-title h2 {
    min-width: 0;
}

.help-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.help-trigger {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #b8c6d3;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.help-trigger:hover,
.help-wrap.open .help-trigger {
    border-color: var(--accent);
    color: var(--accent);
    background: #e8f6f2;
}

.help-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 20;
    width: min(300px, 82vw);
    padding: 12px 13px;
    border: 1px solid #cbdad8;
    border-radius: 8px;
    background: #ffffff;
    color: #263443;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    font-size: 13px;
    line-height: 1.45;
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease;
}

.help-wrap.open .help-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card {
    min-height: 118px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    background: linear-gradient(145deg, #fff 72%, #f8fbfa);
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.stat-card-link {
    color: var(--ink);
}

.stat-card-link:hover {
    text-decoration: none;
    border-color: #a9cfc3;
    box-shadow: 0 14px 30px rgba(15, 124, 104, 0.1);
    transform: translateY(-1px);
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.stat-card strong {
    font-size: 34px;
    line-height: 1;
    letter-spacing: 0;
}

.stat-card:hover,
.panel:hover {
    border-color: #c4d1dc;
}

.stat-card:active {
    transform: translateY(1px);
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.metric-strip div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface-2);
}

.metric-strip span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.metric-strip strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.split-grid,
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 16px;
    margin-bottom: 16px;
}

.detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
}

.panel {
    padding: 20px;
    margin-bottom: 18px;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.panel.narrow {
    max-width: 920px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.panel-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0;
}

.panel-head form {
    margin: 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #edf0f2;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.table-actions {
    text-align: right;
}

.compact-filters {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
}

.form-grid.one-column {
    grid-template-columns: 1fr;
}

.stat-card .stat-text {
    font-size: 24px;
}

th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    background: var(--surface-2);
    letter-spacing: 0.4px;
}

td {
    font-size: 14px;
}

td a:not(.button) {
    color: #236f60;
    font-weight: 760;
}

td a:not(.button):hover {
    color: #0b6d5b;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #f8fbfa;
}

tbody tr:active {
    background: #eef8f5;
}

.mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.empty,
.muted {
    color: var(--muted);
}

.activity-list {
    display: grid;
    gap: 8px;
}

.activity-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #edf0f2;
    border-radius: 8px;
    color: var(--ink);
    background: var(--surface-2);
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.activity-row:hover {
    text-decoration: none;
    background: #fff;
    border-color: var(--line);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.activity-row:active {
    transform: translateY(1px);
    background: #eef8f5;
}

.activity-type {
    color: var(--teal);
    font-weight: 800;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #eef2f5;
    color: #33424f;
}

.badge-available,
.badge-imported,
.badge-created,
.badge-entry,
.badge-received,
.badge-stock_ok {
    background: #e6f5ed;
    color: var(--green);
}

.badge-consumed,
.badge-exit,
.badge-failed,
.badge-error,
.badge-cancelled,
.badge-stock_low,
.badge-stock_empty {
    background: #fff0ee;
    color: var(--red);
}

.badge-reserved,
.badge-pending,
.badge-skipped,
.badge-stock_minimum,
.badge-stock_incoming {
    background: #fff7e8;
    color: var(--amber);
}

.badge-partial {
    background: #eaf4ff;
    color: #2f6fa8;
}

.badge-reviewed {
    background: #eef2f8;
    color: #516072;
}

.badge-done {
    background: #e6f5ed;
    color: var(--green);
}

.badge-stock_no_minimum {
    background: #eef2f5;
    color: #64717d;
}

.cell-note {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.stock-level-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.stock-level-note strong {
    font-size: 14px;
}

.stock-level-note span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.stock-level-stock_ok {
    border-color: #b8e4ce;
    background: #eefaf4;
}

.stock-level-stock_minimum,
.stock-level-stock_incoming {
    border-color: #f1d6a8;
    background: #fffaf0;
}

.stock-level-stock_low,
.stock-level-stock_empty {
    border-color: #f0b8b2;
    background: #fff5f3;
}

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(180px, 260px) auto;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.report-filters {
    grid-template-columns: minmax(150px, 180px) minmax(180px, 220px) minmax(220px, 1fr) minmax(150px, 180px) minmax(140px, 170px) minmax(140px, 170px) auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid label {
    display: grid;
    gap: 6px;
    color: #33424f;
    font-weight: 700;
    font-size: 13px;
}

.filters .button,
.form-grid .button {
    min-height: 42px;
}

textarea {
    resize: vertical;
}

.field-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.form-grid label.check-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #cfe0e5;
    border-radius: 14px;
    background: #f8fbfc;
    color: var(--ink);
    font-weight: 500;
}

.check-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 18px;
    accent-color: #2f7d83;
}

.check-card strong,
.check-card small {
    display: block;
}

.check-card strong {
    font-weight: 700;
}

.check-card small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.span-2 {
    grid-column: span 2;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.permission-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.permission-card input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}

.permission-card strong,
.permission-card small {
    display: block;
}

.permission-card small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.settings-grid {
    display: grid;
    gap: 16px;
}

.option-create,
.option-main {
    display: grid;
    gap: 8px;
    align-items: center;
}

.option-create {
    grid-template-columns: minmax(86px, 110px) minmax(150px, 1fr) minmax(160px, 1.2fr) minmax(110px, 140px) auto;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.option-list {
    display: grid;
    gap: 8px;
}

.option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #edf0f2;
    border-radius: 8px;
    background: var(--surface-2);
}

.option-main {
    grid-template-columns: minmax(86px, 110px) minmax(150px, 1fr) minmax(160px, 1.2fr) minmax(110px, 140px) minmax(92px, auto) auto;
}

.option-create input,
.option-create select,
.option-main input,
.option-main select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #d5e0e8;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.option-create input[type="color"],
.option-main input[type="color"] {
    padding: 3px;
}

.option-used {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.spec-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.spec-list div {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.spec-list dt {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.spec-list dd {
    margin: 3px 0 0;
    font-weight: 750;
}

.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
}

.notice.success {
    background: #eaf8f1;
    color: #16603f;
    border-color: #b8e4ce;
}

.notice.error {
    background: #fff1f0;
    color: #9f1f17;
    border-color: #ffc6c2;
}

.notice ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.scan-screen {
    min-height: calc(100vh - 230px);
    display: grid;
    place-items: center;
}

.manual-intro p {
    max-width: 980px;
    margin: 14px 0 0;
    color: #3b4a57;
    line-height: 1.65;
}

.manual-keyline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.manual-keyline span,
.manual-card,
.note-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.manual-keyline span {
    padding: 12px;
    color: #285247;
    background: #f2fbf8;
    font-size: 13px;
    font-weight: 800;
}

.manual-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.manual-card {
    padding: 18px;
}

.manual-number {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e7f4f0;
    color: var(--accent);
    font-weight: 900;
}

.manual-card h2 {
    margin: 13px 0 8px;
    font-size: 20px;
}

.manual-card p {
    margin: 0 0 12px;
    color: #455766;
    line-height: 1.55;
}

.manual-list {
    margin: 0;
    padding-left: 18px;
    color: #33424f;
    line-height: 1.55;
}

.manual-list li + li {
    margin-top: 7px;
}

.manual-list.roomy li + li {
    margin-top: 11px;
}

.manual-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.manual-flow div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.manual-flow strong,
.manual-flow span {
    display: block;
}

.manual-flow strong {
    color: #22313d;
}

.manual-flow span {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.5;
}

.note-list {
    display: grid;
    gap: 10px;
}

.note-card {
    padding: 14px;
}

.note-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.note-head strong,
.note-head small {
    display: block;
}

.note-head small {
    margin-top: 4px;
    color: var(--muted);
}

.note-card p {
    margin: 0 0 12px;
    color: #33424f;
    line-height: 1.55;
    white-space: pre-wrap;
}

.note-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.note-actions form {
    margin: 0;
}

.scan-panel {
    width: min(780px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 42px;
    box-shadow: var(--shadow);
}

.scan-panel h1 {
    margin: 0;
    font-size: 54px;
    line-height: 1.03;
    letter-spacing: 0;
}

.scan-panel .title-row {
    margin-bottom: 10px;
}

.scan-panel .page-subtitle {
    margin: 0 0 18px;
}

.scan-panel form {
    display: grid;
    gap: 12px;
}

.scan-input {
    min-height: 70px;
    font-size: 34px;
    font-weight: 800;
}

.camera-tools {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.camera-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
}

.camera-actions .button[hidden] {
    display: none;
}

.camera-view {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0f1b22;
    aspect-ratio: 16 / 10;
}

.camera-view[hidden] {
    display: none;
}

.camera-view video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-reticle {
    position: absolute;
    inset: 22% 10%;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25);
}

.camera-reticle::before {
    content: "";
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 2px;
    background: rgba(37, 185, 151, 0.9);
    transform: translateY(-50%);
}

.camera-status {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.label-body {
    background: #f3f4f6;
}

.label-sheet {
    min-height: 100vh;
    display: grid;
    place-items: center;
    gap: 18px;
    padding: 24px;
}

.label {
    width: 60mm;
    height: 30mm;
    background: #fff;
    color: #000;
    border: 1px dashed #a1a1aa;
    padding: 3mm;
    display: grid;
    align-content: space-between;
}

.label-top,
.label-info {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    font-size: 9px;
    overflow: hidden;
}

.label-top strong {
    font-size: 12px;
}

.barcode-svg svg {
    width: 100%;
    height: 13mm;
    display: block;
}

.label-code {
    text-align: center;
    font: 700 11px Consolas, monospace;
}

main nav[role="navigation"] {
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
}

main nav[role="navigation"] svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 1180px) {
    .site-header-inner {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .header-scan {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .split-grid,
    .detail-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .filters .button {
        width: 100%;
    }

    .manual-grid,
    .manual-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manual-keyline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .permission-grid {
        grid-template-columns: 1fr;
    }

    .option-create,
    .option-main,
    .option-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    table {
        min-width: 0;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    tbody {
        display: grid;
        gap: 10px;
    }

    tbody tr {
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow-soft);
        overflow: hidden;
    }

    tbody tr:hover {
        background: #fff;
    }

    td {
        display: grid;
        grid-template-columns: minmax(112px, 42%) minmax(0, 1fr);
        gap: 12px;
        min-height: 42px;
        padding: 10px 12px;
        white-space: normal;
        overflow-wrap: anywhere;
        border-bottom: 1px solid #edf0f2;
        text-align: right;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 850;
        letter-spacing: 0.35px;
        text-align: left;
        text-transform: uppercase;
    }

    td[colspan] {
        display: block;
        text-align: left;
    }

    td[colspan]::before {
        content: none;
    }

    .table-actions {
        text-align: right;
    }

    .table-actions .button {
        justify-self: end;
        min-width: 120px;
    }
}

@media (max-width: 640px) {
    .site-header {
        position: static;
    }

    .site-header-inner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 16px;
    }

    .brand {
        order: 1;
        min-width: 0;
    }

    .nav {
        order: 3;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 5px;
        overflow: visible;
    }

    .nav-link {
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
        justify-content: center;
        text-align: center;
    }

    .nav-link.active {
        box-shadow: inset 0 0 0 1px rgba(37, 185, 151, 0.55);
    }

    .header-scan {
        order: 2;
    }

    .main {
        padding: 20px 16px 28px;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .page-head h1 {
        font-size: 32px;
        overflow-wrap: anywhere;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .title-row,
    .section-title {
        align-items: flex-start;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .help-popover {
        position: fixed;
        inset: auto 14px 14px;
        left: 14px;
        width: auto;
        max-width: none;
        transform: translateY(10px);
    }

    .help-wrap.open .help-popover {
        transform: translateY(0);
    }

    .panel,
    .stat-card {
        box-shadow: var(--shadow-soft);
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        min-height: 104px;
        padding: 15px;
    }

    .stat-card strong {
        font-size: 29px;
    }

    .actions,
    .page-head > .button {
        width: 100%;
    }

    .actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .actions .button,
    .page-head > .button,
    .panel-head > a:not(.button),
    .panel-head form,
    .panel-head form .button {
        width: 100%;
    }

    .site-footer-inner {
        flex-direction: column;
        gap: 6px;
        padding: 16px;
    }

    .footer-status {
        white-space: normal;
    }

    .form-grid,
    .spec-list {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .activity-row {
        grid-template-columns: 1fr;
    }

    .manual-grid,
    .manual-flow,
    .manual-keyline {
        grid-template-columns: 1fr;
    }

    .note-head {
        flex-direction: column;
    }

    .stock-level-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .stock-level-note span {
        text-align: left;
    }

    .scan-mini {
        grid-template-columns: 1fr auto;
    }

    .scan-panel {
        padding: 26px;
    }

    .scan-panel h1 {
        font-size: 38px;
    }

    .scan-input {
        min-height: 58px;
        font-size: 26px;
    }

    .camera-actions {
        grid-template-columns: auto minmax(0, 1fr);
    }
}

@media (max-width: 460px) {
    .site-header-inner {
        padding: 12px;
    }

    .brand {
        padding-left: 0;
        padding-right: 0;
    }

    .brand-mark {
        width: 38px;
    }

    .header-scan,
    .scan-mini {
        grid-template-columns: 1fr;
    }

    .scan-mini button {
        width: 100%;
    }

    .main {
        padding: 18px 12px 24px;
    }

    .page-head h1 {
        font-size: 28px;
    }

    .stat-grid,
    .metric-strip {
        grid-template-columns: 1fr;
    }

    td {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 4px;
    }

    .table-actions .button {
        justify-self: stretch;
        width: 100%;
    }
}

@media print {
    body {
        background: #fff;
    }

    .print-button {
        display: none;
    }

    .label-sheet {
        min-height: auto;
        padding: 0;
    }

    .label {
        border: 0;
    }
}

/* Stockway formal visual refresh */
:root {
    --bg: #eef3f7;
    --panel: #ffffff;
    --surface-2: #f6f8fb;
    --surface-3: #eef4f8;
    --ink: #16212c;
    --muted: #687786;
    --line: #dbe4ec;
    --line-strong: #c7d4df;
    --blue: #356fc2;
    --green: #0d806f;
    --accent: #0d806f;
    --accent-2: #16a085;
    --amber: #b7791f;
    --red: #c84848;
    --teal: #0d806f;
    --nav: #ffffff;
    --nav-soft: #f2f6f8;
    --shadow: 0 18px 48px rgba(26, 39, 54, 0.09);
    --shadow-soft: 0 8px 22px rgba(26, 39, 54, 0.06);
    --focus: rgba(53, 111, 194, 0.22);
}

html {
    background: var(--bg);
}

body {
    color: var(--ink);
    background:
        linear-gradient(180deg, #f8fafc 0, #eef3f7 36%, #e8eff4 100%);
}

a {
    color: #176f83;
}

a:hover {
    color: #0b5f72;
}

.site-header {
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    border-bottom: 1px solid rgba(199, 212, 223, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.site-header-inner {
    min-height: 82px;
    gap: 22px;
}

.brand {
    color: var(--ink);
    min-width: 230px;
    padding: 7px;
}

.brand:hover {
    color: var(--ink);
    background: #f5f8fa;
}

.brand:active {
    background: #edf3f6;
}

.brand-mark {
    width: 44px;
    background: linear-gradient(135deg, #0f766e, #178f7d);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(13, 128, 111, 0.24);
}

.brand strong {
    font-size: 15px;
}

.brand small {
    color: #6d7b87;
}

.nav {
    gap: 4px;
    padding: 6px;
    border: 1px solid #dbe5ec;
    background: #f7f9fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.nav-link {
    gap: 7px;
    min-height: 40px;
    color: #506171;
    padding: 0 12px;
    border: 1px solid transparent;
    font-weight: 760;
}

.nav-link .button-icon {
    width: 16px;
    height: 16px;
    color: #718293;
}

.nav-link.active,
.nav-link:hover {
    color: #0f2f3a;
    background: #ffffff;
    border-color: #d6e2ea;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.nav-link.active {
    color: #0b6f63;
    box-shadow: inset 0 -3px 0 #13a085, 0 6px 16px rgba(15, 23, 42, 0.06);
}

.nav-link.active .button-icon,
.nav-link:hover .button-icon {
    color: currentColor;
}

.nav-link:active {
    transform: translateY(1px);
    background: #eef6f4;
}

.header-scan input {
    height: 44px;
    border-color: #d7e2ea;
    background: #f9fbfc;
    color: #263340;
}

.header-scan button {
    background: #16212c;
    border-color: #16212c;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(22, 33, 44, 0.12);
}

.main {
    padding-top: 36px;
}

.page-head {
    align-items: center;
    margin-bottom: 24px;
    padding: 4px 0 20px;
    border-bottom: 1px solid rgba(150, 166, 181, 0.26);
}

.page-head h1 {
    font-size: 36px;
    font-weight: 850;
    color: #111c27;
}

.page-subtitle {
    color: #586a7a;
}

.eyebrow {
    color: #176f83;
    letter-spacing: 0.35px;
}

.help-trigger {
    width: 25px;
    height: 25px;
    border-color: #b6c9d8;
    background: #ffffff;
    color: #386072;
    box-shadow: 0 4px 10px rgba(26, 39, 54, 0.06);
}

.help-trigger:hover,
.help-wrap.open .help-trigger {
    background: #eaf6f3;
    border-color: #73b7ab;
    color: #087061;
    transform: translateY(-1px);
}

.help-popover {
    border-color: #c4d5df;
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

.button,
.scan-mini button,
.panel-head > a:not(.button) {
    gap: 8px;
    min-height: 42px;
    border-color: #cad8e3;
    background: #ffffff;
    color: #1e2c39;
    font-weight: 780;
    box-shadow: 0 8px 18px rgba(26, 39, 54, 0.06);
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease,
        transform 140ms ease;
}

.button-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.button-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button.primary .button-icon,
.button.primary .button-icon svg {
    color: #ffffff;
    stroke: #ffffff;
}

.button:hover,
.scan-mini button:hover,
.panel-head > a:not(.button):hover {
    background: #f8fbfc;
    border-color: #aebfcb;
    color: #101b26;
    box-shadow: 0 12px 24px rgba(26, 39, 54, 0.1);
    transform: translateY(-1px);
}

.button:active,
.scan-mini button:active,
.panel-head > a:not(.button):active {
    background: #eef4f7;
    box-shadow: 0 5px 12px rgba(26, 39, 54, 0.08);
    transform: translateY(1px);
}

.button.primary {
    border-color: #0d806f;
    background: linear-gradient(180deg, #108d79, #0b6f63);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(13, 128, 111, 0.22);
}

.button.primary:hover {
    border-color: #096357;
    background: linear-gradient(180deg, #0f7f70, #095f55);
    box-shadow: 0 16px 30px rgba(13, 128, 111, 0.28);
}

.button.danger {
    border-color: #efb1aa;
    background: #fff8f7;
    color: #b93232;
}

.button.danger:hover {
    background: #fff0ee;
    border-color: #dc7d75;
}

.button.small {
    min-height: 34px;
    padding: 7px 11px;
}

.button.large {
    min-height: 56px;
    font-size: 16px;
}

.icon-button {
    width: 56px;
    gap: 0;
}

.panel,
.stat-card,
.manual-card,
.note-card,
.manual-keyline span {
    border-color: #dbe5ec;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
}

.panel {
    padding: 22px;
}

.panel:hover {
    border-color: #cbd9e4;
    box-shadow: 0 14px 34px rgba(26, 39, 54, 0.08);
}

.panel-head {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e6edf2;
}

.panel-head h2 {
    font-size: 18px;
    font-weight: 820;
    color: #111c27;
}

.stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.stat-card {
    position: relative;
    min-height: 124px;
    overflow: hidden;
    padding: 19px;
    background: #ffffff;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #0d806f, #356fc2);
}

.stat-card span {
    color: #5e6f7e;
    font-weight: 820;
}

.stat-card strong {
    font-size: 36px;
    font-weight: 850;
    color: #0f1a24;
}

.stat-card:hover {
    border-color: #c7d7e1;
    box-shadow: 0 16px 34px rgba(26, 39, 54, 0.1);
    transform: translateY(-1px);
}

.stat-card-link:hover {
    color: var(--ink);
}

.filters {
    gap: 12px;
    padding: 14px;
    border-color: #dbe5ec;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
}

.scan-mini input,
.filters input,
.filters select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.scan-input,
.option-create input,
.option-create select,
.option-main input,
.option-main select {
    border-color: #cbd8e3;
    background: #ffffff;
    color: #172331;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.025);
}

.scan-mini input:hover,
.filters input:hover,
.filters select:hover,
.form-grid input:hover,
.form-grid select:hover,
.form-grid textarea:hover,
.scan-input:hover,
.option-create input:hover,
.option-create select:hover,
.option-main input:hover,
.option-main select:hover {
    border-color: #b5c7d4;
}

.scan-mini input:focus,
.filters input:focus,
.filters select:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.scan-input:focus,
.option-create input:focus,
.option-create select:focus,
.option-main input:focus,
.option-main select:focus {
    border-color: #356fc2;
    box-shadow: 0 0 0 4px rgba(53, 111, 194, 0.12);
    outline: 0;
}

.form-grid label {
    color: #283746;
    font-weight: 780;
}

.table-wrap {
    overflow-x: auto;
    border-color: #dce6ed;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    border-bottom-color: #e2eaf0;
}

th {
    padding: 13px 14px;
    background: #f5f8fa;
    color: #5f7182;
    font-weight: 850;
}

td {
    padding: 14px;
    color: #172331;
}

td a:not(.button) {
    color: #006f64;
    font-weight: 850;
}

td a:not(.button):hover {
    color: #064f49;
}

tbody tr {
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

tbody tr:hover {
    background: #f6fbfa;
}

tbody tr:active {
    background: #eef7f5;
}

.cell-note {
    color: #728292;
    font-weight: 680;
}

.activity-row {
    border-color: #dfe8ef;
    background: #f8fafc;
    box-shadow: 0 5px 14px rgba(26, 39, 54, 0.04);
}

.activity-row:hover {
    border-color: #cbd9e4;
    box-shadow: 0 12px 24px rgba(26, 39, 54, 0.09);
}

.badge {
    min-height: 27px;
    padding: 5px 9px;
    border: 1px solid transparent;
    font-weight: 850;
}

.badge-available,
.badge-imported,
.badge-created,
.badge-entry,
.badge-received,
.badge-stock_ok,
.badge-done {
    border-color: #b8dfd3;
    background: #e9f7f3;
    color: #087061;
}

.badge-consumed,
.badge-exit,
.badge-failed,
.badge-error,
.badge-cancelled,
.badge-stock_low,
.badge-stock_empty {
    border-color: #f0bab3;
    background: #fff1ef;
    color: #b93232;
}

.badge-reserved,
.badge-pending,
.badge-skipped,
.badge-stock_minimum,
.badge-stock_incoming {
    border-color: #efd39f;
    background: #fff7e8;
    color: #9a6417;
}

.badge-partial {
    border-color: #b9d6f5;
    background: #ecf6ff;
    color: #2f6fa8;
}

.badge-reviewed,
.badge-stock_no_minimum {
    border-color: #d2dde7;
    background: #f1f5f8;
    color: #566777;
}

.metric-strip div,
.manual-flow div,
.permission-card,
.option-row {
    border-color: #dce6ed;
    background: #f8fafc;
    box-shadow: 0 5px 14px rgba(26, 39, 54, 0.035);
}

.manual-number {
    background: #eaf6f3;
    color: #087061;
    box-shadow: inset 0 0 0 1px #bee1d8;
}

.manual-card {
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}

.manual-card:hover {
    border-color: #cbd9e4;
    box-shadow: 0 14px 30px rgba(26, 39, 54, 0.08);
    transform: translateY(-1px);
}

.scan-screen {
    align-items: start;
    padding-top: 24px;
}

.scan-panel {
    width: min(840px, 100%);
    padding: 38px;
    border-color: #d7e2ea;
    background: #ffffff;
    box-shadow: 0 22px 54px rgba(26, 39, 54, 0.12);
}

.scan-panel h1 {
    font-size: 44px;
    color: #111c27;
}

.scan-panel form {
    gap: 14px;
}

.scan-input {
    min-height: 72px;
    padding: 12px 16px;
    border-width: 2px;
    font-size: 32px;
    letter-spacing: 0;
}

.camera-view {
    border-color: #cbd9e4;
    background: #111c27;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.camera-reticle {
    border-color: rgba(255, 255, 255, 0.9);
}

.notice {
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.site-footer {
    color: #667482;
}

.site-footer-inner {
    align-items: center;
    border-top-color: #d7e2ea;
}

.label {
    border-radius: 6px;
}

@media (max-width: 1180px) {
    .site-header-inner {
        gap: 14px;
    }
}

@media (max-width: 980px) {
    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .report-filters,
    .filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-header {
        position: static;
    }

    .site-header-inner {
        min-height: auto;
    }

    .table-wrap {
        background: transparent;
        box-shadow: none;
    }

    tbody tr {
        border-color: #dbe5ec;
        box-shadow: 0 8px 18px rgba(26, 39, 54, 0.06);
    }

    td {
        grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
        padding: 11px 12px;
    }

    td::before {
        color: #657789;
    }
}

@media (max-width: 640px) {
    .site-header-inner {
        padding: 14px;
    }

    .brand {
        min-width: 0;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 8px;
    }

    .nav-link {
        min-height: 42px;
        gap: 6px;
    }

    .main {
        padding: 22px 14px 28px;
    }

    .page-head h1 {
        font-size: 30px;
    }

    .panel {
        padding: 16px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat-card {
        min-height: 108px;
        padding: 16px 15px;
    }

    .stat-card strong {
        font-size: 30px;
    }

    .actions .button,
    .page-head > .button,
    .panel-head > a:not(.button),
    .panel-head form .button,
    .scan-mini button {
        justify-content: center;
    }

    .scan-panel {
        padding: 24px 18px;
    }

    .scan-panel h1 {
        font-size: 34px;
    }

    .scan-input {
        min-height: 62px;
        font-size: 24px;
    }
}

@media (max-width: 460px) {
    .nav {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .button,
    .scan-mini button,
    .panel-head > a:not(.button) {
        min-height: 44px;
    }

    td {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: #fff;
    }

    .site-header,
    .site-footer,
    .print-button,
    .button-icon {
        display: none;
    }

    .label-sheet {
        min-height: auto;
        padding: 0;
    }

    .label {
        border: 0;
        box-shadow: none;
    }
}

/* Stockway complete redesign */
:root {
    --bg: #f4f7f8;
    --panel: #ffffff;
    --surface-2: #f8fbfc;
    --surface-3: #eef4f6;
    --ink: #24343d;
    --muted: #667780;
    --line: #dce4e7;
    --line-strong: #c4d1d6;
    --petrol: #183b4e;
    --petrol-2: #2f6473;
    --accent: #2f7d83;
    --accent-2: #235f65;
    --blue: #3e78a8;
    --green: #3e8e68;
    --amber: #d69232;
    --red: #c95050;
    --purple: #80679b;
    --dark-status: #69757b;
    --teal: #2f7d83;
    --nav: #183b4e;
    --nav-soft: #2f6473;
    --shadow: 0 18px 42px rgba(36, 52, 61, 0.08);
    --shadow-soft: 0 10px 24px rgba(36, 52, 61, 0.055);
    --shadow-hover: 0 20px 34px rgba(36, 52, 61, 0.13);
    --focus: rgba(47, 125, 131, 0.24);
}

html {
    background: var(--bg);
}

body {
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0, rgba(244, 247, 248, 0.96) 260px),
        var(--bg);
    overflow-x: clip;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-2);
}

.app-shell {
    min-width: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    color: #ffffff;
    background:
        radial-gradient(circle at 10% 0%, rgba(72, 160, 166, 0.32), transparent 28%),
        linear-gradient(120deg, rgba(47, 100, 115, 0.36), rgba(24, 59, 78, 0) 38%),
        linear-gradient(180deg, #183b4e 0%, #102f3f 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 22px 44px rgba(24, 59, 78, 0.24),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    overflow: visible;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 42%);
    background-size: 86px 100%, 100% 100%;
    opacity: 0.28;
}

.site-header::after {
    content: "";
    position: absolute;
    left: clamp(18px, 3vw, 38px);
    right: clamp(18px, 3vw, 38px);
    bottom: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(142, 212, 212, 0.44), transparent);
}

.site-header-inner {
    position: relative;
    width: min(1520px, 100%);
    min-height: 0;
    margin: 0 auto;
    padding: 14px clamp(18px, 3vw, 38px) 13px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
}

.header-topline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    min-width: 0;
}

.brand {
    min-width: 0;
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    padding: 5px 8px 5px 5px;
    color: #ffffff;
    border-radius: 18px;
    transition:
        background-color 180ms ease,
        transform 160ms ease;
}

.brand:hover,
.brand:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.brand:hover {
    transform: translateY(-1px);
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: linear-gradient(145deg, #3c9aa0, #2f7d83 48%, #235f65);
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 14px 30px rgba(4, 20, 29, 0.3);
}

.brand-box-icon {
    position: relative;
    z-index: 1;
    width: 58%;
    height: 58%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 9px;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand strong {
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.brand small {
    color: rgba(255, 255, 255, 0.68);
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
}

.header-account {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    margin-left: auto;
}

.header-welcome {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 10px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 6px 12px 6px 8px;
    background: rgba(8, 28, 39, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    color: #ffffff;
    text-align: left;
    backdrop-filter: blur(12px);
}

.header-user-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(142, 212, 212, 0.2);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
}

.header-user-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-welcome-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.header-welcome-copy span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.42px;
    text-transform: uppercase;
}

.header-welcome strong {
    max-width: 230px;
    overflow: hidden;
    color: #ffffff;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-form {
    display: flex;
    margin: 0;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    min-width: 0;
    width: 100%;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scrollbar-width: none;
    backdrop-filter: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 46px;
    display: inline-flex;
    flex: 1 1 122px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    overflow: hidden;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.76);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
    white-space: normal;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 1px 0 rgba(255, 255, 255, 0.03);
    transition:
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 160ms ease;
}

.nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 120%, rgba(142, 212, 212, 0.24), transparent 42%),
        linear-gradient(120deg, transparent 0, rgba(255, 255, 255, 0.16) 42%, transparent 70%);
    opacity: 0;
    transform: translateX(-55%);
    transition: opacity 180ms ease, transform 420ms ease;
}

.nav-link::after {
    display: none;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    border-color: rgba(142, 212, 212, 0.2);
    background:
        linear-gradient(180deg, rgba(47, 100, 115, 0.78), rgba(47, 125, 131, 0.74));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 10px 18px rgba(2, 18, 27, 0.16);
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
    transform: translateX(55%);
}

.nav-link.active {
    background:
        linear-gradient(180deg, rgba(47, 100, 115, 0.9), rgba(47, 125, 131, 0.84));
}

.nav-link:active {
    background: rgba(35, 95, 101, 0.82);
    transform: translateY(1px);
}

.nav-link .button-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: currentColor;
    opacity: 0.94;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        transform 160ms ease;
}

.nav-link .button-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-link:hover .button-icon,
.nav-link.active .button-icon {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

@media (min-width: 1280px) {
    .site-header-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 16px;
        align-items: center;
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .header-topline {
        display: contents;
    }

    .nav {
        grid-column: 1;
        grid-row: 1;
        flex-wrap: nowrap;
        padding: 0;
        border-radius: 0;
    }

    .nav-link {
        flex: 1 1 0;
        min-height: 44px;
        padding: 0 9px;
        font-size: 12px;
        white-space: nowrap;
    }

    .nav-link .button-icon {
        width: 27px;
        height: 27px;
    }

    .header-account {
        grid-column: 2;
        grid-row: 1;
    }
}

.main {
    width: min(1520px, 100%);
    padding: 34px clamp(18px, 3vw, 38px) 36px;
}

.page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
    margin: 0 0 24px;
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
}

.page-head h1 {
    color: var(--ink);
    font-size: clamp(30px, 3.2vw, 46px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

.page-head p {
    color: var(--muted);
}

.page-subtitle {
    max-width: 920px;
    color: var(--muted);
    font-size: 15px;
}

.eyebrow {
    color: var(--petrol-2);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.72px;
}

.title-row,
.section-title {
    align-items: center;
    gap: 10px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.button,
.scan-mini button,
.panel-head > a:not(.button),
.logout-button {
    position: relative;
    isolation: isolate;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    padding: 10px 15px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(36, 52, 61, 0.06);
    font-weight: 850;
    line-height: 1.12;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease,
        transform 160ms ease;
}

.button::before,
.scan-mini button::before,
.panel-head > a:not(.button)::before,
.logout-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(120deg, transparent, rgba(47, 125, 131, 0.12), transparent);
    opacity: 0;
    transform: translateX(-55%);
    transition: opacity 180ms ease, transform 420ms ease;
}

.button:hover,
.scan-mini button:hover,
.panel-head > a:not(.button):hover,
.logout-button:hover {
    border-color: rgba(47, 125, 131, 0.54);
    background: #f8fbfc;
    color: var(--accent-2);
    box-shadow: 0 14px 24px rgba(36, 52, 61, 0.12);
    text-decoration: none;
    transform: translateY(-1px);
}

.button:hover::before,
.scan-mini button:hover::before,
.panel-head > a:not(.button):hover::before,
.logout-button:hover::before {
    opacity: 1;
    transform: translateX(55%);
}

.button:active,
.scan-mini button:active,
.panel-head > a:not(.button):active,
.logout-button:active {
    background: #edf4f5;
    box-shadow: 0 6px 14px rgba(36, 52, 61, 0.09);
    transform: translateY(1px);
}

.button.primary,
.scan-mini button[type="submit"]:not(.logout-button) {
    border-color: #2f7d83;
    background: linear-gradient(180deg, #34898f, #2f7d83 55%, #286d73);
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(47, 125, 131, 0.25);
}

.button.primary:hover,
.scan-mini button[type="submit"]:not(.logout-button):hover {
    border-color: #235f65;
    background: linear-gradient(180deg, #2f747a, #235f65);
    color: #ffffff;
    box-shadow: 0 18px 30px rgba(35, 95, 101, 0.32);
}

.button.danger {
    border-color: rgba(201, 80, 80, 0.34);
    background: #fff8f8;
    color: #b83e3e;
}

.button.danger:hover {
    border-color: rgba(201, 80, 80, 0.62);
    background: #fff0f0;
    color: #9f3030;
}

.logout-button {
    min-height: 38px;
    padding: 8px 13px;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logout-button:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.button.small {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.button.large {
    min-height: 56px;
    border-radius: 14px;
    font-size: 16px;
}

.button-icon {
    width: 18px;
    height: 18px;
}

.icon-button {
    width: 56px;
    min-width: 56px;
    padding: 0;
}

.panel,
.stat-card,
.manual-card,
.note-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.panel {
    margin-bottom: 20px;
    padding: clamp(16px, 2vw, 24px);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.panel:hover {
    border-color: #cbd9dd;
    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 {
    color: var(--ink);
    font-size: 19px;
    font-weight: 900;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(188px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    position: relative;
    min-height: 126px;
    display: grid;
    align-content: space-between;
    overflow: hidden;
    padding: 20px;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(47, 100, 115, 0.08), transparent 56%),
        #ffffff;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 160ms ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #2f7d83, #2f6473);
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
}

.stat-card strong {
    color: #1b2b34;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 900;
}

.stat-card:hover {
    border-color: #bfcfd4;
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.stat-card:active {
    transform: translateY(0);
}

.stat-card-link:hover {
    color: var(--ink);
    text-decoration: none;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 14px;
}

.metric-strip div,
.manual-flow div,
.permission-card,
.option-row,
.manual-keyline span {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
    box-shadow: none;
}

.metric-strip div {
    padding: 16px;
}

.metric-strip span {
    color: var(--muted);
    font-weight: 800;
}

.metric-strip strong {
    color: var(--petrol);
    font-weight: 900;
}

.filters,
.report-filters {
    display: grid;
    gap: 12px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.compact-filters {
    grid-template-columns: minmax(220px, 1fr) auto;
}

.scan-mini input,
.filters input,
.filters select,
.report-filters input,
.report-filters select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.scan-input,
.option-create input,
.option-create select,
.option-main input,
.option-main select {
    min-width: 0;
    border: 1px solid #cad8dc;
    border-radius: 12px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: inset 0 1px 2px rgba(36, 52, 61, 0.03);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.scan-mini input:hover,
.filters input:hover,
.filters select:hover,
.report-filters input:hover,
.report-filters select:hover,
.form-grid input:hover,
.form-grid select:hover,
.form-grid textarea:hover,
.scan-input:hover,
.option-create input:hover,
.option-create select:hover,
.option-main input:hover,
.option-main select:hover {
    border-color: #aebfc5;
}

.scan-mini input:focus,
.filters input:focus,
.filters select:focus,
.report-filters input:focus,
.report-filters select:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.scan-input:focus,
.option-create input:focus,
.option-create select:focus,
.option-main input:focus,
.option-main select:focus {
    border-color: #2f7d83;
    box-shadow: 0 0 0 4px rgba(47, 125, 131, 0.16);
    outline: 0;
}

.select-search {
    position: relative;
    min-width: 0;
}

.select-search > select {
    width: 100%;
}

.select-search.is-enhanced > select {
    position: absolute;
    left: 12px;
    bottom: 8px;
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.select-search-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid #cad8dc;
    border-radius: 12px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(36, 52, 61, 0.03);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.select-search-toggle:hover,
.select-search.is-open .select-search-toggle {
    border-color: #91adb4;
    background: #f9fcfc;
    box-shadow: 0 0 0 4px rgba(47, 125, 131, 0.11);
}

.select-search-toggle:focus {
    border-color: #2f7d83;
    box-shadow: 0 0 0 4px rgba(47, 125, 131, 0.16);
    outline: 0;
}

.select-search-toggle.is-invalid {
    border-color: #c95050;
    box-shadow: 0 0 0 4px rgba(201, 80, 80, 0.14);
}

.select-search-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-search-chevron {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--muted);
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.select-search-chevron svg {
    display: block;
    width: 100%;
    height: 100%;
}

.select-search.is-open .select-search-chevron {
    color: #2f7d83;
    transform: rotate(180deg);
}

.select-search-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    padding: 10px;
    border: 1px solid #c9d8dc;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 22px 44px rgba(24, 59, 78, 0.17);
}

.select-search-input {
    width: 100%;
    min-height: 40px;
    margin-bottom: 8px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
}

.select-search-options {
    display: grid;
    gap: 4px;
    max-height: 230px;
    overflow-y: auto;
    padding-right: 2px;
}

.select-search-option {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.select-search-option:hover,
.select-search-option:focus {
    background: #edf6f7;
    color: #235f65;
    outline: 0;
    transform: translateX(2px);
}

.select-search-option[aria-selected="true"] {
    background: #dff0f2;
    color: #183b4e;
}

.select-search-option:disabled {
    color: #97a5ab;
    cursor: not-allowed;
    transform: none;
}

.select-search-empty {
    margin: 0;
    padding: 8px 10px 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.form-grid label {
    color: var(--ink);
    font-weight: 850;
}

.arrival-grid {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(160px, 1.1fr);
    gap: 12px;
    align-items: end;
}

.arrival-total {
    display: grid;
    gap: 6px;
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid #cfe0e5;
    border-radius: 14px;
    background: #f8fbfc;
}

.arrival-total span,
.form-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.arrival-total strong {
    color: var(--petrol);
    font-size: 24px;
    line-height: 1;
}

.form-note {
    margin: -2px 0 2px;
    line-height: 1.45;
}

.arrival-history {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.arrival-history h3 {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
}

.help-trigger {
    width: 25px;
    height: 25px;
    border-color: #b9c9cf;
    background: #ffffff;
    color: var(--petrol-2);
    box-shadow: 0 5px 14px rgba(36, 52, 61, 0.08);
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.help-trigger:hover,
.help-wrap.open .help-trigger {
    border-color: #2f7d83;
    background: #eaf5f6;
    color: #235f65;
    box-shadow: 0 10px 18px rgba(47, 125, 131, 0.16);
    transform: translateY(-1px);
}

.help-popover {
    border-color: #c4d4da;
    border-radius: 14px;
    color: var(--ink);
    box-shadow: 0 22px 48px rgba(36, 52, 61, 0.18);
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}

table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: #eef4f6;
}

th,
td {
    min-width: 0;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

th {
    color: #667780;
    background: #eef4f6;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.28px;
    text-transform: uppercase;
}

td {
    font-size: 14px;
    line-height: 1.35;
}

td a:not(.button) {
    color: #006b68;
    font-weight: 900;
}

td a:not(.button):hover {
    color: #235f65;
}

tbody tr {
    background: #ffffff;
    transition:
        background-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

tbody tr:hover {
    background: #f5fafb;
}

tbody tr:active {
    background: #edf6f7;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.table-actions {
    text-align: right;
}

.cell-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    letter-spacing: 0;
}

.badge {
    min-height: 28px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.badge-available,
.badge-created,
.badge-imported,
.badge-received,
.badge-entry,
.badge-stock_ok,
.badge-done {
    border-color: rgba(62, 142, 104, 0.24);
    background: rgba(62, 142, 104, 0.13);
    color: #2b704f;
}

.badge-reserved,
.badge-skipped,
.badge-stock_minimum,
.badge-stock_incoming {
    border-color: rgba(214, 146, 50, 0.28);
    background: rgba(214, 146, 50, 0.15);
    color: #9f651b;
}

.badge-partial,
.badge-pending {
    border-color: rgba(62, 120, 168, 0.24);
    background: rgba(62, 120, 168, 0.14);
    color: #2d638e;
}

.badge-quarantine {
    border-color: rgba(128, 103, 155, 0.24);
    background: rgba(128, 103, 155, 0.14);
    color: #644f7f;
}

.badge-consumed,
.badge-scrap,
.badge-lost,
.badge-cancelled,
.badge-reviewed {
    border-color: rgba(105, 117, 123, 0.22);
    background: rgba(105, 117, 123, 0.13);
    color: #515c62;
}

.badge-exit,
.badge-failed,
.badge-error,
.badge-stock_low,
.badge-stock_empty {
    border-color: rgba(201, 80, 80, 0.26);
    background: rgba(201, 80, 80, 0.13);
    color: #a83b3b;
}

.badge-stock_no_minimum {
    border-color: rgba(102, 119, 128, 0.2);
    background: #eef3f5;
    color: #667780;
}

.activity-list {
    gap: 10px;
}

.activity-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(36, 52, 61, 0.045);
}

.activity-row:hover {
    border-color: #c3d2d7;
    background: #f8fbfc;
    box-shadow: 0 14px 26px rgba(36, 52, 61, 0.1);
}

.activity-type {
    color: var(--accent);
}

.scan-screen {
    min-height: calc(100vh - 220px);
    display: grid;
    place-items: start center;
    padding-top: 26px;
}

.scan-panel {
    width: min(880px, 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: clamp(22px, 4vw, 42px);
    background:
        linear-gradient(135deg, rgba(47, 100, 115, 0.08), transparent 48%),
        #ffffff;
    box-shadow: 0 24px 58px rgba(36, 52, 61, 0.14);
}

.scan-panel h1 {
    color: var(--petrol);
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 900;
}

.scan-panel form {
    gap: 14px;
}

.scan-input {
    min-height: 70px;
    border-width: 2px;
    border-radius: 16px;
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 780;
    text-align: center;
}

.camera-tools {
    margin-top: 14px;
}

.camera-view {
    border-color: rgba(47, 100, 115, 0.42);
    border-radius: 18px;
    background: #102c3b;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.camera-reticle {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 999px rgba(13, 31, 42, 0.26);
}

.camera-status,
.muted,
.empty {
    color: var(--muted);
}

.notice {
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.manual-card,
.note-card {
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 160ms ease;
}

.manual-card:hover,
.note-card:hover {
    border-color: #c8d6db;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.manual-number {
    background: #dceff1;
    color: #235f65;
}

.site-footer {
    margin-top: auto;
    color: #d6e2e6;
    background: #183b4e;
}

.site-footer-inner {
    width: min(1520px, 100%);
    margin: 0 auto;
    padding: 18px clamp(18px, 3vw, 38px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.68);
}

.site-footer strong {
    color: #ffffff;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-links a,
.footer-made a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(47, 125, 131, 0.34);
    transform: translateY(-1px);
}

.footer-link-icon {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: currentColor;
}

.footer-link-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-made {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 700;
    white-space: nowrap;
}

.footer-made img {
    display: block;
    width: auto;
    height: 28px;
    max-width: 124px;
    object-fit: contain;
}

.footer-year {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.mobile-scroll-top {
    display: none;
}

main nav[role="navigation"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

main nav[role="navigation"] > * {
    max-width: 100%;
}

@media (min-width: 1120px) {
    .split-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    }

    .detail-grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
    }
}

@media (max-width: 1180px) {
    .nav-link {
        flex-basis: 106px;
    }

    .header-welcome strong {
        max-width: 180px;
    }
}

@media (max-width: 920px) {
    .site-header {
        position: static;
    }

    .site-header-inner {
        padding: 14px;
        gap: 12px;
    }

    .header-topline {
        align-items: flex-start;
    }

    .header-account {
        gap: 10px;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        border-radius: 16px;
    }

    .nav-link {
        flex: none;
        width: 100%;
        min-height: 44px;
        padding: 0 10px;
        font-size: 12px;
    }

    .page-head {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .actions {
        justify-content: stretch;
    }

    .actions .button,
    .page-head > .button {
        flex: 1 1 150px;
    }

    .split-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .arrival-grid {
        grid-template-columns: 1fr;
    }

    .filters,
    .report-filters,
    .compact-filters {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
        width: 100%;
    }

    table {
        border-collapse: separate;
        border-spacing: 0;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    tbody {
        display: grid;
        gap: 12px;
    }

    tbody tr {
        display: grid;
        gap: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 10px 22px rgba(36, 52, 61, 0.065);
    }

    tbody tr:hover {
        background: #ffffff;
        transform: none;
    }

    th {
        display: none;
    }

    td {
        display: grid;
        grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
        text-align: left;
    }

    td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0.28px;
        text-transform: uppercase;
    }

    td.empty {
        display: block;
    }

    td.empty::before {
        content: "";
        display: none;
    }

    .table-actions {
        text-align: left;
    }

    .table-actions .button,
    td .button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 24px 14px 30px;
    }

    .header-topline {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .brand {
        width: 100%;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .brand strong {
        font-size: 18px;
    }

    .header-account {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .header-welcome {
        justify-items: start;
        text-align: left;
    }

    .header-welcome strong {
        max-width: min(58vw, 260px);
    }

    .logout-button {
        min-width: 104px;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 7px;
    }

    .nav-link {
        min-height: 46px;
        border-radius: 12px;
    }

    .page-head h1 {
        font-size: 32px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .stat-card {
        min-height: 112px;
        padding: 16px;
    }

    .stat-card strong {
        font-size: 31px;
    }

    .panel {
        border-radius: 14px;
        padding: 15px;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel-head > a:not(.button),
    .panel-head form,
    .panel-head form .button {
        width: 100%;
    }

    .button,
    .scan-mini button,
    .panel-head > a:not(.button) {
        min-height: 44px;
        width: auto;
    }

    .actions .button,
    .page-head > .button {
        flex-basis: 100%;
    }

    td {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .scan-panel {
        border-radius: 18px;
    }

    .scan-input {
        min-height: 62px;
    }

    .site-footer-inner {
        display: grid;
        justify-items: center;
        gap: 10px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-made {
        white-space: normal;
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .nav {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .header-account {
        display: grid;
        grid-template-columns: 1fr;
    }

    .logout-button {
        width: 100%;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .site-header,
    .site-footer,
    .print-button,
    .button-icon {
        display: none;
    }

    .table-wrap {
        overflow: visible;
    }
}

/* Login redesign */
.login-page {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(10, 34, 45, 0.24), rgba(10, 34, 45, 0.04) 42%, rgba(10, 34, 45, 0.24)),
        url("/images/stockway-login-bg.png") center / cover no-repeat fixed;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.65), transparent 72%);
}

.login-page .site-header,
.login-page .site-footer {
    display: none;
}

.login-page .main {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    padding: clamp(18px, 4vw, 52px);
    display: grid;
    align-items: center;
}

.login-hero {
    position: relative;
    width: min(1180px, 100%);
    min-height: min(760px, calc(100vh - 104px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.68fr);
    align-items: center;
    gap: clamp(22px, 5vw, 58px);
}

.login-brand-panel {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 28px;
    padding: clamp(8px, 2vw, 18px) 0;
    color: #ffffff;
}

.login-logo {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    text-decoration: none;
}

.login-logo:hover {
    color: #ffffff;
    text-decoration: none;
}

.login-logo-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(145deg, #44a6ac, #2f7d83 52%, #235f65);
    color: #ffffff;
    font-weight: 950;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.24),
        0 18px 40px rgba(0, 0, 0, 0.22);
}

.login-logo-mark::after {
    content: "";
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
}

.login-logo strong {
    display: block;
    color: #ffffff;
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

.login-logo small {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.login-copy {
    max-width: 720px;
}

.login-copy .eyebrow {
    color: #8ed4d4;
}

.login-kicker {
    width: fit-content;
    border: 1px solid rgba(142, 212, 212, 0.32);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(8, 31, 42, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.login-copy h1 {
    margin: 0;
    max-width: 660px;
    color: #ffffff;
    font-size: clamp(36px, 5.1vw, 66px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: 0;
    text-wrap: balance;
    text-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}

.login-copy p:not(.eyebrow) {
    max-width: 580px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(15px, 1.45vw, 18px);
    line-height: 1.55;
}

.login-flow {
    width: min(620px, 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.login-flow span {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 7px 13px;
    background: rgba(8, 31, 42, 0.32);
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.login-metrics {
    width: min(690px, 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-metrics div {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 17px;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
        rgba(8, 31, 42, 0.36);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 30px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(12px);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.login-metrics div:hover {
    transform: translateY(-2px);
    border-color: rgba(142, 212, 212, 0.3);
    background-color: rgba(8, 31, 42, 0.48);
}

.login-metrics span {
    display: block;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.52px;
    text-transform: uppercase;
}

.login-metrics strong {
    display: block;
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.login-card {
    align-self: center;
    position: relative;
    overflow: hidden;
    width: min(430px, 100%);
    justify-self: end;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 30px;
    padding: clamp(24px, 3.2vw, 36px);
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 248, 0.92)),
        rgba(255, 255, 255, 0.94);
    box-shadow:
        0 34px 90px rgba(4, 19, 28, 0.38),
        0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 7px;
    background: linear-gradient(90deg, #183b4e, #2f7d83 46%, #65b7b5);
}

.login-card::after {
    content: "";
    position: absolute;
    inset: 7px 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47, 125, 131, 0.32), transparent);
}

.login-card-head {
    position: relative;
    z-index: 1;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(220, 228, 231, 0.9);
}

.login-card-brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
}

.login-card-brand .login-logo-mark {
    width: 60px;
    height: 60px;
    border-radius: 19px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.24),
        0 16px 34px rgba(47, 125, 131, 0.32);
}

.login-card-head .eyebrow {
    margin-bottom: 7px;
    color: #2f6473;
}

.login-card h2 {
    margin: 0;
    color: #183b4e;
    font-size: clamp(27px, 2.4vw, 34px);
    line-height: 1.08;
    font-weight: 950;
}

.login-card-head p:not(.eyebrow) {
    margin: 12px 0 0;
    color: #667780;
    font-size: 14px;
}

.login-card-head p strong {
    color: #24343d;
}

.login-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 17px;
}

.login-form label {
    display: grid;
    gap: 8px;
    color: #24343d;
    font-size: 13px;
    font-weight: 900;
}

.login-field-label {
    color: #334852;
}

.login-input-wrap {
    position: relative;
    display: block;
}

.login-input-wrap svg {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    fill: none;
    stroke: #66838d;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition:
        stroke 180ms ease,
        transform 180ms ease;
}

.login-form input {
    width: 100%;
    min-height: 58px;
    border: 1px solid #c5d4d9;
    border-radius: 17px;
    padding: 0 16px 0 52px;
    background:
        linear-gradient(180deg, #ffffff, #fbfcfc);
    color: #24343d;
    font-size: 15px;
    font-weight: 800;
    box-shadow:
        inset 0 1px 2px rgba(36, 52, 61, 0.04),
        0 10px 24px rgba(36, 52, 61, 0.04);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        transform 160ms ease;
}

.login-form input:hover {
    border-color: #95b2ba;
}

.login-form input:focus {
    border-color: #2f7d83;
    box-shadow:
        0 0 0 4px rgba(47, 125, 131, 0.15),
        0 16px 30px rgba(47, 125, 131, 0.1),
        inset 0 1px 2px rgba(36, 52, 61, 0.04);
    outline: 0;
}

.login-input-wrap:focus-within svg {
    stroke: #2f7d83;
    transform: translateY(-50%) scale(1.04);
}

.login-form .button {
    width: 100%;
    margin-top: 6px;
}

.login-submit {
    min-height: 58px;
    gap: 10px;
    border-radius: 17px;
    font-size: 15px;
    box-shadow:
        0 18px 34px rgba(35, 95, 101, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.login-submit .button-icon,
.login-submit .button-icon svg {
    color: #ffffff;
    fill: none;
    stroke: #ffffff;
}

.login-submit .button-icon svg path {
    stroke: #ffffff;
}

.login-card-foot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.login-card-foot span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid #dce4e7;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f4f7f8;
    color: #667780;
    font-size: 12px;
    font-weight: 850;
}

.login-page .notice {
    width: min(1180px, 100%);
    margin: 0 auto 16px;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
}

@media (max-width: 980px) {
    .login-page {
        background-position: center left;
    }

    .login-page .main {
        align-items: start;
    }

    .login-hero {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .login-brand-panel {
        padding-top: 0;
        gap: 24px;
    }

    .login-copy h1 {
        font-size: clamp(32px, 7vw, 54px);
    }

    .login-card {
        align-self: stretch;
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .login-page {
        background:
            linear-gradient(180deg, rgba(10, 34, 45, 0.18), rgba(10, 34, 45, 0.6)),
            url("/images/stockway-login-bg.png") 24% center / cover no-repeat fixed;
    }

    .login-page .main {
        padding: 16px;
    }

    .login-logo-mark {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .login-logo strong {
        font-size: 24px;
    }

    .login-copy h1 {
        font-size: 34px;
        line-height: 1;
    }

    .login-copy p:not(.eyebrow) {
        margin-top: 16px;
        font-size: 15px;
    }

    .login-metrics {
        grid-template-columns: 1fr;
    }

    .login-card {
        border-radius: 22px;
        padding: 24px;
    }

    .login-card h2 {
        font-size: 27px;
    }

    .login-card-foot {
        display: grid;
        grid-template-columns: 1fr;
    }

    .login-card-foot span {
        justify-content: center;
    }
}

/* Compact mobile navigation */
.mobile-menu-toggle,
.mobile-nav-logout {
    display: none;
}

@media (max-width: 920px) {
    .site-header {
        position: sticky;
        top: 0;
    }

    .site-header-inner {
        padding: 10px 12px 11px;
        gap: 9px;
    }

    .header-topline {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .brand {
        flex: 0 0 auto;
        width: auto;
        max-width: 50vw;
        gap: 10px;
        padding: 4px 6px 4px 4px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .brand-mark::after {
        inset: 7px;
        border-radius: 8px;
    }

    .brand strong {
        font-size: 17px;
    }

    .brand small {
        display: none;
    }

    .site-footer .brand small {
        display: block;
    }

    .header-account {
        flex: 1 1 auto;
        width: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        min-width: 0;
    }

    .header-welcome {
        display: grid;
        justify-items: start;
        min-width: 0;
        max-width: min(34vw, 190px);
        margin-right: 24px;
        min-height: 40px;
        border-radius: 13px;
        padding: 5px 9px;
        text-align: left;
    }

    .header-welcome-copy > span {
        display: none;
    }

    .header-welcome strong {
        max-width: 100%;
    }

    .header-welcome strong {
        font-size: 12px;
    }

    .logout-form {
        display: none;
    }

    .mobile-menu-toggle {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgba(142, 212, 212, 0.22);
        border-radius: 14px;
        padding: 0 13px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
        color: #ffffff;
        font-weight: 900;
        cursor: pointer;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.09),
            0 10px 20px rgba(4, 20, 29, 0.15);
        transition:
            background-color 180ms ease,
            border-color 180ms ease,
            transform 160ms ease;
    }

    .mobile-menu-toggle:hover,
    .site-header.menu-open .mobile-menu-toggle {
        border-color: rgba(142, 212, 212, 0.48);
        background:
            linear-gradient(180deg, #3e9da4, #2f7d83);
    }

    .mobile-menu-toggle:active {
        transform: translateY(1px);
    }

    .mobile-menu-icon {
        width: 18px;
        display: grid;
        gap: 4px;
    }

    .mobile-menu-icon span {
        display: block;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .site-header.menu-open .mobile-menu-icon span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .site-header.menu-open .mobile-menu-icon span:nth-child(2) {
        opacity: 0;
    }

    .site-header.menu-open .mobile-menu-icon span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav {
        display: none;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transform-origin: top;
    }

    .site-header.menu-open .nav {
        display: grid;
        animation: mobileMenuIn 180ms ease both;
    }

    .nav-link {
        width: 100%;
        min-height: 50px;
        justify-content: flex-start;
        padding: 0 12px;
        border-radius: 14px;
        font-size: 13px;
        flex-basis: auto;
        white-space: nowrap;
    }

    .nav-link::after {
        display: none;
    }

    .mobile-nav-logout {
        display: block;
        margin: 0;
    }

    .mobile-nav-logout .logout-button {
        width: 100%;
        justify-content: flex-start;
        min-height: 50px;
        border-radius: 14px;
        padding: 0 13px;
    }

    .main {
        padding-top: 22px;
    }

    .mobile-scroll-top {
        position: fixed;
        right: 16px;
        bottom: 18px;
        z-index: 80;
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, 0.26);
        border-radius: 999px;
        background:
            linear-gradient(180deg, rgba(62, 157, 164, 0.95), rgba(47, 125, 131, 0.95));
        color: #ffffff;
        box-shadow:
            0 16px 30px rgba(4, 20, 29, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
        opacity: 0;
        pointer-events: none;
        transform: translateY(12px) scale(0.94);
        transition:
            opacity 180ms ease,
            transform 180ms ease,
            background-color 180ms ease,
            box-shadow 180ms ease;
    }

    .mobile-scroll-top.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .mobile-scroll-top:active {
        transform: translateY(1px) scale(0.98);
        background:
            linear-gradient(180deg, rgba(47, 125, 131, 0.96), rgba(35, 95, 101, 0.96));
    }

    .mobile-scroll-top svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
}

@keyframes mobileMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scaleY(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

@media (max-width: 640px) {
    .login-page .main {
        min-height: 100svh;
        display: grid;
        place-items: center;
        padding: 18px;
    }

    .login-hero {
        width: min(360px, 100%);
        min-height: calc(100svh - 36px);
        display: grid;
        place-items: center;
    }

    .login-brand-panel,
    .login-card-foot {
        display: none;
    }

    .login-card {
        width: 100%;
        align-self: center;
        justify-self: center;
        border-color: rgba(255, 255, 255, 0.68);
        border-radius: 22px;
        padding: 22px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow:
            0 20px 48px rgba(4, 19, 28, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.84);
        transform: none;
    }

    .login-card::before,
    .login-card::after {
        display: none;
    }

    .login-card-head {
        margin-bottom: 18px;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .login-card-brand {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
    }

    .login-card-brand .login-logo-mark {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .login-card-head .eyebrow {
        margin-bottom: 5px;
        font-size: 10px;
    }

    .login-card h2 {
        font-size: 25px;
    }

    .login-form {
        gap: 14px;
    }

    .login-form input,
    .login-submit {
        min-height: 54px;
        border-radius: 15px;
    }
}

@media (max-width: 640px) and (max-height: 720px) {
    .login-card {
        transform: none;
    }
}

@media (max-width: 430px) {
    .brand-copy {
        display: none;
    }

    .site-footer .brand-copy {
        display: grid;
    }

    .brand {
        max-width: none;
    }

    .header-welcome {
        max-width: min(42vw, 170px);
    }
}

/* Scanner quantity field */
.scan-quantity-field {
    position: relative;
    width: min(340px, 100%);
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: center;
    gap: 12px;
    margin: 2px auto 4px;
    border: 1px solid rgba(47, 125, 131, 0.24);
    border-radius: 18px;
    padding: 9px 10px 9px 16px;
    background:
        linear-gradient(135deg, rgba(47, 125, 131, 0.1), transparent 58%),
        #f8fbfc;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 12px 24px rgba(36, 52, 61, 0.07);
    color: #24343d;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 160ms ease;
}

.scan-quantity-field::before {
    content: "";
    position: absolute;
    inset: 8px auto 8px 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2f7d83, #2f6473);
}

.scan-quantity-field:focus-within {
    border-color: rgba(47, 125, 131, 0.62);
    box-shadow:
        0 0 0 4px rgba(47, 125, 131, 0.13),
        0 16px 28px rgba(36, 52, 61, 0.1);
    transform: translateY(-1px);
}

.scan-quantity-field span {
    display: grid;
    gap: 2px;
    color: #2f6473;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.54px;
    line-height: 1;
    text-transform: uppercase;
}

.scan-quantity-field span::after {
    content: "unidades por lectura";
    color: #667780;
    font-size: 11px;
    font-weight: 780;
    letter-spacing: 0;
    text-transform: none;
}

.scan-quantity-field input {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(47, 100, 115, 0.2);
    border-radius: 14px;
    padding: 0 8px;
    background: #ffffff;
    color: #183b4e;
    box-shadow:
        inset 0 1px 2px rgba(36, 52, 61, 0.04),
        0 8px 16px rgba(36, 52, 61, 0.06);
    font-size: 24px;
    font-weight: 950;
    text-align: center;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.scan-quantity-field input:hover {
    border-color: rgba(47, 125, 131, 0.48);
}

.scan-quantity-field input:focus {
    border-color: #2f7d83;
    background: #ffffff;
    box-shadow:
        0 0 0 3px rgba(47, 125, 131, 0.13),
        0 10px 18px rgba(36, 52, 61, 0.1);
    outline: 0;
}

@media (max-width: 640px) {
    .scan-quantity-field {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) 92px;
        justify-items: stretch;
        gap: 10px;
        margin-top: 2px;
        padding: 9px 9px 9px 15px;
    }

    .scan-quantity-field input {
        min-height: 44px;
        text-align: center;
    }
}

/* Scanner workspace redesign */
.scanner-workspace {
    min-height: auto;
    align-items: start;
    place-items: start center;
    padding-top: 8px;
}

.scanner-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(360px, 1fr);
    gap: 18px;
    align-items: stretch;
    border: 1px solid rgba(220, 228, 231, 0.96);
    border-radius: 22px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(47, 100, 115, 0.08), transparent 42%),
        rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(36, 52, 61, 0.11);
}

.scanner-main,
.scanner-camera {
    min-width: 0;
    border: 1px solid rgba(220, 228, 231, 0.96);
    border-radius: 18px;
    background: #ffffff;
}

.scanner-main {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: clamp(18px, 3vw, 28px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.scanner-heading {
    display: grid;
    gap: 10px;
}

.scanner-mode {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(47, 125, 131, 0.2);
    border-radius: 999px;
    padding: 6px 11px;
    background: rgba(47, 125, 131, 0.1);
    color: #2f6473;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.58px;
    line-height: 1;
    text-transform: uppercase;
}

.scanner-workspace-exit .scanner-mode {
    border-color: rgba(201, 80, 80, 0.22);
    background: rgba(201, 80, 80, 0.1);
    color: #9f3e3e;
}

.scanner-shell .title-row {
    align-items: flex-start;
}

.scanner-shell h1 {
    max-width: 500px;
    color: #183b4e;
    font-size: clamp(32px, 4.2vw, 50px);
    line-height: 0.98;
    font-weight: 950;
}

.scanner-form {
    display: grid;
    gap: 14px;
}

.scan-code-control {
    display: grid;
    gap: 12px;
}

.scanner-shell .scan-input {
    min-height: 62px;
    border: 2px solid rgba(47, 100, 115, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff, #f8fbfc);
    color: #183b4e;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 12px 22px rgba(36, 52, 61, 0.08);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    letter-spacing: 0;
}

.scanner-shell .scan-input::placeholder {
    color: rgba(36, 52, 61, 0.62);
}

.scanner-shell .scan-input:focus {
    border-color: #2f7d83;
    box-shadow:
        0 0 0 5px rgba(47, 125, 131, 0.16),
        0 16px 26px rgba(36, 52, 61, 0.11);
}

.scanner-shell .button.primary.large {
    min-height: 58px;
    border-radius: 17px;
    box-shadow: 0 16px 28px rgba(47, 125, 131, 0.24);
}

.scanner-camera {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    background:
        linear-gradient(150deg, rgba(24, 59, 78, 0.06), transparent 54%),
        #f8fbfc;
}

.scanner-camera .camera-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.camera-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.camera-title span {
    color: #2f6473;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.58px;
    line-height: 1;
    text-transform: uppercase;
}

.camera-title strong {
    color: #183b4e;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.1;
}

.scanner-camera .icon-button {
    width: 54px;
    min-width: 54px;
    height: 54px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 248, 0.96));
}

.scanner-camera .button.danger {
    min-height: 54px;
    border-radius: 16px;
}

.scanner-camera .camera-view {
    width: 100%;
    min-height: 380px;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(47, 100, 115, 0.34);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 50%, rgba(47, 125, 131, 0.28), transparent 30%),
        #102c3b;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.07),
        0 18px 34px rgba(16, 44, 59, 0.2);
}

.scanner-camera .camera-view[hidden] {
    display: none;
}

.scanner-camera .camera-reticle {
    inset: 28% 8%;
    border-radius: 14px;
    border-width: 3px;
    box-shadow: 0 0 0 999px rgba(9, 27, 38, 0.28);
}

.scanner-camera .camera-status {
    margin: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(220, 228, 231, 0.96);
    border-radius: 12px;
    padding: 8px 11px;
    background: #ffffff;
    color: #667780;
    font-size: 13px;
    line-height: 1.35;
}

.scanner-shell .scan-quantity-field {
    width: 100%;
    margin: 0;
}

@media (max-width: 980px) {
    .scanner-shell {
        grid-template-columns: 1fr;
    }

    .scanner-camera .camera-view {
        min-height: 420px;
    }
}

@media (max-width: 640px) {
    .scanner-workspace {
        padding-top: 0;
    }

    .scanner-shell {
        width: 100%;
        gap: 12px;
        border-radius: 18px;
        padding: 10px;
        box-shadow: 0 12px 30px rgba(36, 52, 61, 0.09);
    }

    .scanner-main {
        gap: 14px;
        border-radius: 16px;
        padding: 18px;
    }

    .scanner-shell h1 {
        font-size: 32px;
        line-height: 1;
    }

    .scanner-shell .scan-input {
        min-height: 58px;
        font-size: 24px;
    }

    .scanner-shell .button.primary.large {
        min-height: 54px;
    }

    .scanner-camera {
        border-radius: 16px;
        padding: 12px;
    }

    .scanner-camera .camera-actions {
        grid-template-columns: minmax(0, 1fr) 52px;
    }

    .scanner-camera .button.danger {
        grid-column: 1 / -1;
        width: 100%;
    }

    .scanner-camera .camera-view {
        min-height: min(58svh, 470px);
        aspect-ratio: 3 / 4;
        border-radius: 16px;
    }

    .scanner-camera .camera-reticle {
        inset: 34% 7%;
    }

    .scanner-camera .camera-status {
        font-size: 12px;
    }
}

/* Compact scanner camera action */
.scanner-shell-compact {
    width: min(760px, 100%);
    grid-template-columns: 1fr;
    gap: 0;
}

.scanner-shell-compact .scanner-main {
    gap: 16px;
}

.scanner-shell-compact .scan-code-control {
    grid-template-columns: minmax(0, 1fr) 58px;
    align-items: stretch;
    gap: 10px;
}

.scanner-shell-compact .scan-camera-button {
    width: 58px;
    min-width: 58px;
    min-height: 62px;
    height: auto;
    border-radius: 18px;
    padding: 0;
    background:
        linear-gradient(145deg, #3a9097, #2f7d83 58%, #235f65);
    color: #ffffff;
    box-shadow:
        0 14px 24px rgba(47, 125, 131, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.scanner-shell-compact .scan-camera-button:hover {
    background:
        linear-gradient(145deg, #347f86, #286f75 58%, #1f555b);
    border-color: #235f65;
    box-shadow:
        0 16px 26px rgba(35, 95, 101, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.scanner-shell-compact .scan-camera-button:active {
    transform: translateY(1px) scale(0.98);
}

.scanner-shell-compact .scan-camera-button svg {
    width: 25px;
    height: 25px;
}

.scanner-shell-compact .scanner-camera {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    justify-items: center;
}

.scanner-shell-compact .scanner-camera .camera-actions {
    display: flex;
    width: min(420px, 100%);
    justify-content: center;
}

.scanner-shell-compact .scanner-camera .button.danger {
    min-height: 38px;
    border-radius: 12px;
}

.scanner-shell-compact .scanner-camera .camera-view {
    width: min(420px, 100%);
    max-width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    margin-inline: auto;
}

.scanner-shell-compact .scanner-camera .camera-status {
    width: min(420px, 100%);
    min-height: 34px;
    border-radius: 12px;
    padding: 8px 11px;
    background: #f8fbfc;
    justify-content: center;
    text-align: center;
}

@media (max-width: 640px) {
    .scanner-shell-compact {
        padding: 8px;
        border-radius: 16px;
    }

    .scanner-shell-compact .scanner-main {
        padding: 16px;
    }

    .scanner-shell-compact .scan-code-control {
        grid-template-columns: minmax(0, 1fr) 50px;
        gap: 7px;
    }

    .scanner-shell-compact .scan-camera-button {
        width: 50px;
        min-width: 50px;
        min-height: 58px;
        border-radius: 16px;
    }

    .scanner-shell-compact .scan-camera-button svg {
        width: 22px;
        height: 22px;
    }

    .scanner-shell-compact .scanner-camera {
        padding: 0;
    }

    .scanner-shell-compact .scanner-camera .camera-actions,
    .scanner-shell-compact .scanner-camera .camera-status {
        width: min(300px, 100%);
    }

    .scanner-shell-compact .scanner-camera .camera-view {
        width: min(300px, 100%);
        aspect-ratio: 4 / 3;
        border-radius: 14px;
    }
}

/* Label sheets */
.label-body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: #e8eef2;
    color: #24343d;
}

.label-toolbar {
    width: min(1120px, 100%);
    margin: 0 auto 18px;
    border: 1px solid #dce4e7;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(36, 52, 61, 0.1);
}

.label-toolbar > div {
    display: grid;
    gap: 3px;
    margin-bottom: 12px;
}

.label-toolbar strong {
    color: #183b4e;
    font-size: 18px;
    font-weight: 950;
}

.label-toolbar span,
.label-toolbar p {
    color: #667780;
    font-size: 13px;
}

.label-toolbar p {
    margin: 10px 0 0;
}

.label-toolbar form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(100px, 130px) minmax(120px, 150px) auto auto;
    gap: 10px;
    align-items: end;
}

.label-toolbar label {
    display: grid;
    gap: 5px;
    color: #2f6473;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.label-toolbar select,
.label-toolbar input {
    min-height: 42px;
    border: 1px solid #cbd8dd;
    border-radius: 10px;
    padding: 0 11px;
    background: #f8fbfc;
    color: #24343d;
    font: inherit;
}

.label-print-stack {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 18px;
    overflow: hidden;
    padding: 0 12px 40px;
}

.label-sheet-preview {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: var(--label-preview-height, auto);
    display: grid;
    justify-items: start;
    overflow: visible;
}

.label-sheet-page {
    width: 210mm;
    height: 297mm;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(var(--label-cols), var(--label-width));
    grid-template-rows: repeat(var(--label-rows), var(--label-height));
    column-gap: var(--label-gap-x);
    row-gap: var(--label-gap-y);
    align-content: start;
    justify-content: start;
    padding:
        var(--label-margin-top)
        var(--label-margin-right)
        var(--label-margin-bottom)
        var(--label-margin-left);
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(36, 52, 61, 0.16);
    overflow: hidden;
    transform: translateX(var(--label-preview-offset, 0)) scale(var(--label-preview-scale, 1));
    transform-origin: top left;
    break-after: page;
    page-break-after: always;
}

.label-sheet-page:last-child {
    break-after: auto;
    page-break-after: auto;
}

.label-print-card,
.label.label-print-card {
    width: var(--label-width);
    height: var(--label-height);
    min-width: 0;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    align-content: space-between;
    gap: 1.2mm;
    border: 1px dashed #aebdc4;
    border-radius: 0;
    padding: 2.2mm 2.8mm;
    background: #ffffff;
    color: #000000;
    overflow: hidden;
    box-shadow: none;
}

.label-print-empty {
    border-color: transparent;
    background: transparent;
}

.label-print-card .label-top,
.label-print-card .label-info {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    gap: 2mm;
    color: #000000;
    font-size: 9px;
    line-height: 1.1;
}

.label-print-card .label-top strong,
.label-print-card .label-top span,
.label-print-card .label-info span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.label-print-card .label-top strong {
    font-size: 12px;
    font-weight: 900;
}

.label-print-card .barcode-svg {
    min-height: 0;
    display: grid;
    align-items: center;
}

.label-print-card .barcode-svg svg {
    width: 100%;
    height: 13mm;
    max-height: 100%;
    display: block;
}

.label-print-card .label-code {
    color: #000000;
    text-align: center;
    font: 800 11px Consolas, "SFMono-Regular", monospace;
    line-height: 1;
    letter-spacing: 0;
}

.label-sheet-small .label-print-card {
    padding: 1.8mm 2.4mm;
}

.label-sheet-small .label-print-card .label-top,
.label-sheet-small .label-print-card .label-info {
    font-size: 8px;
}

.label-sheet-small .label-print-card .label-top strong {
    font-size: 10px;
}

.label-sheet-small .label-print-card .label-code {
    font-size: 9px;
}

.label-sheet-small .label-print-card .barcode-svg svg {
    height: 12mm;
}

@media (max-width: 900px) {
    .label-toolbar {
        width: 100%;
        margin-bottom: 12px;
        border-right: 0;
        border-left: 0;
        border-radius: 0 0 14px 14px;
        padding: 12px;
    }

    .label-toolbar form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .label-toolbar form {
        grid-template-columns: 1fr;
    }

    .label-toolbar .button {
        width: 100%;
    }

    .label-toolbar p {
        font-size: 12px;
        line-height: 1.45;
    }

    .label-print-stack {
        padding-right: 8px;
        padding-left: 8px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 0;
    }

    .label-body {
        background: #ffffff;
    }

    .label-toolbar,
    .print-button {
        display: none !important;
    }

    .label-print-stack {
        display: block;
        padding: 0;
        overflow: visible;
    }

    .label-sheet-preview {
        min-height: auto !important;
        display: block;
        overflow: visible;
    }

    .label-sheet-page {
        margin: 0;
        box-shadow: none;
        transform: none !important;
    }

    .label-print-card,
    .label.label-print-card {
        border-color: transparent;
    }
}
