html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f6f8;
    color: #1f2933;
}

a {
    color: inherit;
}

.topbar {
    background: #172026;
    color: #fff;
    border-bottom: 4px solid #2f9e44;
}

.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

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

.nav form {
    margin: 0;
}

.nav a,
.nav button {
    border: 0;
    border-radius: 6px;
    padding: 9px 11px;
    background: transparent;
    color: #f8fafc;
    text-decoration: none;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
}

.nav a:hover,
.nav button:hover {
    background: rgba(255, 255, 255, .12);
}

.mobile-focus-menu {
    display: none;
}

.mobile-focus-menu summary {
    list-style: none;
}

.mobile-focus-menu summary::-webkit-details-marker {
    display: none;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 18px 44px;
    width: 100%;
    min-width: 0;
}

.page-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-header > :first-child {
    min-width: 0;
    flex: 1 1 auto;
}

.page-title {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.15;
}

.muted {
    color: #607080;
}

.grid {
    display: grid;
    gap: 16px;
    min-width: 0;
}

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

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

.panel,
.card {
    background: #fff;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.action-card {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    border-left: 5px solid #2f9e44;
}

.action-card strong {
    font-size: 21px;
    margin-bottom: 6px;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
    max-width: 760px;
}

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

.single-form-shell {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
    overflow-x: hidden;
}

.single-form-header {
    margin-bottom: 20px;
}

.single-form-panel {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.payout-shell {
    max-width: 980px;
}

.payout-workspace {
    display: grid;
    gap: 16px;
    align-items: start;
}

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

.payout-workspace.single-column {
    grid-template-columns: minmax(0, 620px);
}

.payout-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.payout-panel-heading h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
}

.payout-balance-pill {
    min-width: 120px;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #f8fafc;
    text-align: right;
}

.payout-balance-pill span {
    color: #607080;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.payout-balance-pill strong {
    color: #172026;
    line-height: 1;
}

.warehouse-payout-panel {
    border-color: #ffd8a8;
    background: #fffaf2;
}

.auth-shell {
    max-width: 440px;
    margin: clamp(20px, 8vh, 88px) auto 0;
}

.auth-header {
    justify-content: center;
    text-align: center;
}

.auth-panel {
    width: 100%;
}

.store-closing-shell,
.store-closing-form {
    max-width: 760px;
    margin: 0 auto;
}

.store-section-panel {
    padding: 20px;
}

.store-section-title {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.2;
}

.store-field-stack {
    display: grid;
    gap: 14px;
}

.store-submit-row {
    justify-content: flex-end;
}

.store-submit-row .button {
    min-width: 180px;
}

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

.summary-item {
    background: #fff;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    padding: 16px;
}

.summary-value {
    display: block;
    font-size: 30px;
    font-weight: 800;
}

.completion-card {
    padding: 24px;
}

.completion-lead {
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 800;
}

.completion-meta {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 0;
}

.completion-item {
    background: #f8fafc;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    padding: 14px 16px;
}

.completion-item strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
}

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

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.form-row.full {
    grid-column: 1 / -1;
}

.date-field-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #b8c4d0;
    border-radius: 7px;
    background: #fff;
}

.date-field-wrap:focus-within {
    outline: 3px solid rgba(47, 158, 68, .22);
    border-color: #2f9e44;
}

.filter-stack {
    display: grid;
    gap: 14px;
    max-width: 560px;
}

.filter-actions .button {
    width: 100%;
}

label {
    font-weight: 700;
    color: #344054;
}

.label-with-help {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.help-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.help-tip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    width: 180px;
    max-width: calc(100vw - 56px);
    box-sizing: border-box;
    padding: 6px 9px;
    border: 1px solid #d9e1e8;
    border-radius: 7px;
    background: #fcfcfd;
    color: #344054;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
    white-space: normal;
    overflow-wrap: anywhere;
    transition: opacity .12s ease, visibility .12s ease;
}

.help-tip::before {
    content: "";
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    z-index: 19;
    width: 10px;
    height: 10px;
    background: #fcfcfd;
    border-left: 1px solid #d9e1e8;
    border-bottom: 1px solid #d9e1e8;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .12s ease, visibility .12s ease;
}

.help-tip-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: help;
}

.help-tip-button:focus {
    outline: 3px solid rgba(47, 158, 68, .22);
    border-color: #2f9e44;
}

.help-tip:hover::after,
.help-tip:hover::before,
.help-tip:focus-within::after,
.help-tip:focus-within::before {
    opacity: 1;
    visibility: visible;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 1px solid #b8c4d0;
    border-radius: 7px;
    padding: 10px 12px;
    min-height: 42px;
    font: inherit;
    background: #fff;
}

form {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

textarea {
    min-height: 90px;
}

input::placeholder,
textarea::placeholder {
    color: #9aa7b2;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(47, 158, 68, .22);
    border-color: #2f9e44;
}

input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    display: none;
}

.input-warning {
    background: #fff7e6;
    border-color: #ffd589;
}

.input-warning:focus {
    outline: 3px solid rgba(255, 213, 137, .45);
    border-color: #d99c1f;
}

input[type="date"] {
    min-width: 0;
    max-width: 100%;
    display: block;
    inline-size: 100%;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
}

input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    min-height: 42px;
    background: #2f9e44;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.button.secondary {
    background: #32485a;
}

.button.warning {
    background: #b7791f;
}

.button.danger {
    background: #c92a2a;
}

.button.small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 14px;
}

.button.ghost {
    background: #eef2f6;
    color: #243746;
}

.button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}

.page-action-button {
    min-width: 148px;
}

.page-actions .inline-form,
.page-actions > .button {
    flex: 0 0 auto;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert.success {
    background: #e9f8ee;
    border-color: #b7e4c7;
    color: #1b6b31;
}

.alert.warning {
    background: #fff7e6;
    border-color: #ffd589;
    color: #8a5a00;
}

.alert.danger {
    background: #fff0f0;
    border-color: #ffc9c9;
    color: #9b1c1c;
}

.table-wrap {
    overflow-x: auto;
}

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

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

.money {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e5ebf0;
    vertical-align: top;
}

th {
    background: #eef2f6;
    font-size: 13px;
    color: #465a69;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 13px;
    font-weight: 800;
    background: #e9ecef;
    color: #344054;
}

.badge.ok {
    background: #d8f5df;
    color: #1b6b31;
}

.badge.warn {
    background: #fff0c2;
    color: #8a5a00;
}

.badge.bad {
    background: #ffd8d8;
    color: #9b1c1c;
}

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

.total-box {
    padding: 14px;
    border-radius: 8px;
    background: #eef2f6;
}

.total-box strong {
    display: block;
    font-size: 22px;
    margin-top: 4px;
}

.hidden {
    display: none !important;
}

.pagination {
    margin-top: 16px;
}

.warehouse-kicker {
    margin: 0 0 7px;
    color: #2f7a45;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.warehouse-lead {
    max-width: 680px;
    margin: 0;
    color: #526373;
    font-size: 17px;
    line-height: 1.55;
}

.warehouse-home-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 10px 0 24px;
    padding: 8px 0 22px;
    border-bottom: 1px solid #dce5ec;
}

.warehouse-home-balance {
    min-width: 138px;
    display: grid;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #fff;
    color: #243746;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .07);
}

.warehouse-home-balance span {
    color: #607080;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.warehouse-home-balance strong {
    font-size: 23px;
    line-height: 1;
}

.warehouse-action-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.warehouse-action {
    position: relative;
    min-height: 182px;
    display: grid;
    align-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #fff;
    color: #243746;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.warehouse-action::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 4px;
    border-radius: 8px 8px 0 0;
    background: #2f9e44;
}

.warehouse-action:hover,
.warehouse-sale-row:hover {
    border-color: #a9bdcb;
}

.warehouse-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(16, 24, 40, .1);
}

.warehouse-action-icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #e9f8ee;
    color: #1b6b31;
    font-size: 24px;
    font-weight: 900;
}

.warehouse-action-phone .warehouse-action-icon {
    background: #edf2ff;
    color: #364fc7;
}

.warehouse-action-cash .warehouse-action-icon {
    background: #fff4de;
    color: #946200;
}

.warehouse-action-log .warehouse-action-icon {
    background: #eef2f6;
    color: #172026;
}

.warehouse-action strong {
    display: block;
    font-size: 22px;
    line-height: 1.15;
}

.warehouse-action span:last-child {
    color: #607080;
    line-height: 1.35;
}

.warehouse-workbench {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.warehouse-sales-list,
.warehouse-sale-detail,
.warehouse-checkout-panel,
.warehouse-mobile-panel,
.warehouse-scanner-card,
.warehouse-stock-card {
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.warehouse-sales-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    position: sticky;
    top: 16px;
}

.warehouse-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 2px 8px;
}

.warehouse-panel-heading h2,
.warehouse-sale-header h2,
.warehouse-checkout-panel h2,
.warehouse-mobile-panel h2,
.warehouse-stock-card h2,
.warehouse-stock-detail h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.2;
}

.warehouse-sale-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e5ebf0;
    border-radius: 8px;
    color: #243746;
    text-decoration: none;
}

.warehouse-sale-row.active {
    border-color: #2f9e44;
    background: #f2fbf4;
}

.warehouse-sale-row span {
    display: grid;
    gap: 3px;
}

.warehouse-sale-row span:last-child {
    text-align: right;
}

.warehouse-sale-row small,
.warehouse-desktop-item small,
.warehouse-cart-main small,
.warehouse-mobile-sale-list small {
    color: #607080;
}

.warehouse-sale-detail {
    padding: 16px;
    min-height: 520px;
}

.warehouse-sale-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5ebf0;
}

.warehouse-sale-total {
    min-width: 170px;
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #172026;
    color: #fff;
}

.warehouse-sale-total span {
    color: #b7c5d1;
    font-size: 13px;
    font-weight: 800;
}

.warehouse-sale-total strong {
    font-size: 28px;
    line-height: 1;
}

.warehouse-sale-summary-actions {
    min-width: 170px;
    display: grid;
    gap: 10px;
    justify-items: stretch;
}

.warehouse-sale-summary-actions .button {
    width: 100%;
}

.warehouse-desktop-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: 16px 0;
}

.warehouse-add-form,
.warehouse-code-form {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.warehouse-suggest-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    max-height: min(380px, 58vh);
    overflow-y: auto;
    display: grid;
    gap: 4px;
    padding: 6px;
    border: 1px solid #cbd8e3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16, 24, 40, .18);
}

.warehouse-suggest-item {
    width: 100%;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #243746;
    text-align: left;
    cursor: pointer;
}

.warehouse-suggest-item:hover,
.warehouse-suggest-item.active {
    border-color: #b9c9d7;
    background: #f4f8fb;
}

.warehouse-suggest-thumb {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e5ebf0;
    border-radius: 8px;
    background: #f8fafc;
    color: #607080;
    font-size: 13px;
    font-weight: 900;
}

.warehouse-suggest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.warehouse-suggest-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.warehouse-suggest-main strong,
.warehouse-suggest-main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.warehouse-suggest-main small {
    color: #607080;
    font-size: 12px;
    font-weight: 700;
}

.warehouse-suggest-amount {
    color: #172026;
    font-weight: 900;
    white-space: nowrap;
}

.warehouse-suggest-empty {
    padding: 12px;
    color: #607080;
    font-weight: 800;
}

.warehouse-items {
    display: grid;
    gap: 10px;
}

.warehouse-desktop-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 95px 122px 95px 38px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5ebf0;
    border-radius: 8px;
    background: #fcfcfd;
}

.warehouse-product-thumb {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e5ebf0;
    border-radius: 8px;
    background: #f8fafc;
    color: #607080;
    font-weight: 900;
}

.warehouse-product-thumb.large {
    width: 86px;
    height: 86px;
}

.warehouse-product-thumb.xl {
    width: 108px;
    height: 108px;
}

.warehouse-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.warehouse-desktop-item-main,
.warehouse-cart-main {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.warehouse-info-link {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #b8c4d0;
    border-radius: 999px;
    background: #fff;
    color: #243746;
    font-weight: 900;
    cursor: pointer;
}

.warehouse-qty-form {
    display: grid;
    grid-template-columns: 68px 42px;
    gap: 6px;
}

.warehouse-qty-form input {
    min-height: 36px;
    padding: 7px 8px;
    text-align: center;
}

.warehouse-line-total {
    font-size: 18px;
    font-weight: 900;
    text-align: right;
}

.warehouse-checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.warehouse-checkout-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.warehouse-cash-summary {
    display: grid;
    grid-template-columns: 1.2fr 1fr .6fr;
    gap: 14px;
}

.warehouse-negative {
    color: #c92a2a;
}

.warehouse-empty {
    padding: 18px;
    border: 1px dashed #b8c4d0;
    border-radius: 8px;
    background: #f8fafc;
    color: #607080;
}

.warehouse-empty-large {
    min-height: 360px;
    display: grid;
    place-content: center;
    gap: 6px;
    text-align: center;
}

.warehouse-mobile-shell {
    max-width: 430px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.warehouse-phone-home,
.warehouse-phone-tool {
    display: grid;
    gap: 14px;
}

.warehouse-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.warehouse-phone-titlebar .page-title {
    margin-bottom: 0;
    font-size: 30px;
}

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

.warehouse-mode-button {
    width: 100%;
    min-height: 176px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 18px 12px;
    border: 1px solid #dbe4ec;
    border-radius: 8px;
    background: #fff;
    color: #243746;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .07);
}

.warehouse-mode-button span {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 32px;
    font-weight: 900;
}

.warehouse-mode-sale span {
    background: #e7f8ec;
    color: #1b6b31;
}

.warehouse-mode-stock span {
    background: #edf2ff;
    color: #364fc7;
}

.warehouse-mode-button strong {
    font-size: 24px;
    line-height: 1;
}

.warehouse-mode-button small {
    color: #607080;
    font-size: 13px;
    font-weight: 800;
}

.warehouse-mobile-panel {
    margin-top: 2px;
    padding: 15px;
}

.warehouse-mobile-sale-list {
    display: grid;
    gap: 8px;
}

.warehouse-mobile-sale-list a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e5ebf0;
    border-radius: 8px;
    background: #fbfcfd;
    text-decoration: none;
}

.warehouse-scanner-card {
    position: relative;
    min-height: 298px;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background: #101820;
    box-shadow: 0 14px 34px rgba(16, 24, 40, .18);
    isolation: isolate;
}

.warehouse-scanner-video {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.warehouse-scanner-idle {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, .04) 1px, transparent 1px),
        #101820;
    background-size: 32px 32px;
}

.warehouse-scanner-idle span {
    position: absolute;
    left: 18%;
    right: 18%;
    top: 49%;
    height: 2px;
    background: #53d36a;
    box-shadow: 0 0 18px rgba(83, 211, 106, .65);
}

.warehouse-scanner-frame {
    position: absolute;
    left: 13%;
    right: 13%;
    top: 33%;
    z-index: 3;
    height: 32%;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, .19);
    pointer-events: none;
}

.warehouse-scanner-frame::before,
.warehouse-scanner-frame::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: #53d36a;
}

.warehouse-scanner-frame::before {
    top: -2px;
    left: -2px;
    border-top: 4px solid;
    border-left: 4px solid;
    border-radius: 8px 0 0;
}

.warehouse-scanner-frame::after {
    right: -2px;
    bottom: -2px;
    border-right: 4px solid;
    border-bottom: 4px solid;
    border-radius: 0 0 8px;
}

.warehouse-scanner-toolbar {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.warehouse-scanner-toolbar .button {
    min-width: 0;
    white-space: nowrap;
}

.warehouse-scanner-status {
    max-width: min(42vw, 172px);
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    color: #243746;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-align: center;
}

.warehouse-code-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 10px;
    margin: 0;
    padding: 10px;
    border: 1px solid #dbe4ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}

.warehouse-code-form input {
    border-color: transparent;
    background: #f4f7fa;
}

.warehouse-mobile-cart {
    display: grid;
    gap: 10px;
}

.warehouse-cart-item {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 11px;
    padding: 12px;
    border: 1px solid #e2e9ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
}

.warehouse-cart-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 44px minmax(58px, 1fr) 44px 44px;
    gap: 8px;
}

.warehouse-cart-controls input {
    min-height: 40px;
    text-align: center;
}

.warehouse-cart-controls button,
.warehouse-icon-button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #fff;
    color: #243746;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.warehouse-cart-controls button {
    width: 100%;
}

.warehouse-cart-controls .danger,
.warehouse-icon-button.danger {
    border-color: #ffc9c9;
    background: #fff0f0;
    color: #c92a2a;
}

.warehouse-cart-price {
    grid-column: 1 / -1;
    font-size: 23px;
    font-weight: 900;
    text-align: right;
}

.warehouse-cart-readonly {
    grid-column: 1 / -1;
    padding: 9px 10px;
    border: 1px solid #e5ebf0;
    border-radius: 8px;
    color: #607080;
    font-weight: 800;
}

.warehouse-cancel-form {
    margin-top: 0;
}

.warehouse-mobile-total {
    position: sticky;
    bottom: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 2px;
    padding: 16px 17px;
    border: 1px solid #1f7a35;
    border-radius: 8px;
    background: #121d24;
    color: #fff;
    box-shadow: 0 16px 38px rgba(16, 24, 40, .22);
}

.warehouse-mobile-total span {
    color: #c7d2da;
    font-weight: 900;
}

.warehouse-mobile-total strong {
    font-size: 28px;
    line-height: 1;
}

.warehouse-stock-result {
    margin-top: 0;
}

.warehouse-stock-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    align-items: center;
    border: 1px solid #dbe4ec;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .07);
}

.warehouse-stock-card.warning {
    border-color: #ffd43b;
    background: #fff8db;
    box-shadow: 0 12px 30px rgba(148, 98, 0, .13);
}

.warehouse-stock-warning {
    margin: 10px 0 0;
    color: #c92a2a;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
}

.warehouse-stock-metric {
    margin-top: 16px;
    display: grid;
    gap: 6px;
}

.warehouse-stock-metric span {
    color: #607080;
    font-weight: 900;
}

.warehouse-stock-metric strong,
.warehouse-stock-number {
    display: block;
    font-size: 40px;
    line-height: 1;
    color: #172026;
}

.warehouse-stock-sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.warehouse-stock-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 32, 38, .38);
}

.warehouse-stock-sheet-panel {
    position: absolute;
    left: 50%;
    bottom: 18px;
    width: min(560px, calc(100vw - 28px));
    transform: translateX(-50%);
    padding: 18px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(16, 24, 40, .25);
}

.warehouse-stock-sheet-panel > .warehouse-icon-button {
    position: absolute;
    top: 12px;
    right: 12px;
}

.warehouse-stock-detail {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    padding-right: 42px;
}

@media (max-width: 760px) {
    .page {
        padding: 22px 14px 36px;
        overflow-x: hidden;
    }

    .panel,
    .card {
        padding: 14px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .grid > *,
    .form-grid > *,
    .single-form-shell,
    .single-form-panel,
    .payout-workspace,
    .filter-stack,
    .store-closing-shell,
    .store-closing-form {
        min-width: 0;
        max-width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-inner {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 14px;
    }

    .grid-2,
    .grid-3,
    .payout-workspace,
    .dashboard-grid-2,
    .summary,
    .completion-meta,
    .form-grid,
    .totals {
        grid-template-columns: 1fr;
    }

    .store-section-panel {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .nav {
        width: 100%;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .nav form {
        flex: 0 0 auto;
    }

    .nav a,
    .nav button {
        flex: 0 0 auto;
        width: auto;
        border: 1px solid rgba(255, 255, 255, .08);
        background: rgba(255, 255, 255, .06);
        padding: 8px 10px;
        font-size: 14px;
    }

    body.warehouse-focus-page .topbar {
        border-bottom: 0;
        background: transparent;
        color: #172026;
    }

    body.warehouse-focus-page .topbar-inner {
        max-width: 430px;
        display: flex;
        justify-content: flex-end;
        padding: max(8px, env(safe-area-inset-top)) 14px 0;
    }

    body.warehouse-focus-page .brand,
    body.warehouse-focus-page .topbar > .topbar-inner > .nav {
        display: none;
    }

    body.warehouse-focus-page .mobile-focus-menu {
        position: relative;
        z-index: 80;
        display: block;
    }

    body.warehouse-focus-page .mobile-focus-menu summary {
        width: 46px;
        height: 46px;
        display: grid;
        align-content: center;
        justify-content: center;
        gap: 5px;
        border-radius: 8px;
        background: #172026;
        box-shadow: 0 10px 24px rgba(16, 24, 40, .18);
        cursor: pointer;
    }

    body.warehouse-focus-page .mobile-focus-menu summary span {
        width: 23px;
        height: 3px;
        display: block;
        border-radius: 999px;
        background: #fff;
    }

    body.warehouse-focus-page .mobile-focus-menu:not([open]) .mobile-focus-menu-panel {
        display: none;
    }

    body.warehouse-focus-page .mobile-focus-menu[open] .mobile-focus-menu-panel {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: min(308px, calc(100vw - 28px));
        display: grid;
        gap: 4px;
        padding: 8px;
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 8px;
        background: #172026;
        box-shadow: 0 20px 44px rgba(16, 24, 40, .28);
    }

    body.warehouse-focus-page .mobile-focus-menu-panel form {
        margin: 0;
    }

    body.warehouse-focus-page .mobile-focus-menu-panel a,
    body.warehouse-focus-page .mobile-focus-menu-panel button {
        width: 100%;
        display: block;
        padding: 11px 12px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: #f8fafc;
        font: inherit;
        text-align: left;
        text-decoration: none;
        white-space: normal;
        cursor: pointer;
    }

    body.warehouse-focus-page .mobile-focus-menu-panel a:hover,
    body.warehouse-focus-page .mobile-focus-menu-panel button:hover {
        background: rgba(255, 255, 255, .1);
    }

    body.warehouse-focus-page .page {
        padding-top: 8px;
    }

    .button {
        width: 100%;
    }

    .warehouse-mobile-top .button {
        width: auto;
        min-width: 96px;
    }

    .page-actions {
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: wrap;
        flex: 1 1 auto;
    }

    .page-actions .inline-form,
    .page-actions .button {
        width: auto;
    }

    .page-action-button {
        width: auto;
        min-width: 148px;
    }

    input[type="date"] {
        font-size: 16px;
    }

    .warehouse-action-grid,
    .warehouse-workbench,
    .warehouse-checkout-grid,
    .warehouse-cash-summary {
        grid-template-columns: 1fr;
    }

    .warehouse-home-hero,
    .warehouse-sale-header,
    .warehouse-desktop-actions {
        display: grid;
    }

    .warehouse-sales-list {
        position: static;
    }

    .warehouse-sale-total {
        min-width: 0;
    }

    .warehouse-desktop-item {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .warehouse-desktop-item > .money,
    .warehouse-desktop-item > .inline-form,
    .warehouse-qty-form {
        grid-column: 1 / -1;
    }

    .warehouse-line-total {
        text-align: left;
    }

    .warehouse-mode-grid {
        grid-template-columns: 1fr 1fr;
    }

    .warehouse-code-form {
        grid-template-columns: minmax(0, 1fr) 82px;
    }

    .warehouse-code-form .button {
        width: 100%;
    }

    .warehouse-suggest-menu {
        max-height: min(330px, 52vh);
    }

    .warehouse-suggest-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .warehouse-suggest-amount {
        grid-column: 2;
    }

    .warehouse-stock-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .warehouse-stock-detail {
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .warehouse-scanner-card {
        min-height: 274px;
    }

    .warehouse-product-thumb.xl,
    .warehouse-product-thumb.large {
        width: 96px;
        height: 96px;
    }
}
