:root {
    --ops-bg: #f3f4f5;
    --ops-surface: #ffffff;
    --ops-surface-soft: #f7f7f8;
    --ops-ink: #111315;
    --ops-muted: #6d7278;
    --ops-soft: #9ca1a7;
    --ops-line: #e3e5e7;
    --ops-line-strong: #d2d5d8;
    --ops-success: #16784a;
    --ops-success-soft: #eaf6ef;
    --ops-warning: #a35c00;
    --ops-warning-soft: #fff2df;
    --ops-danger: #b2352d;
    --ops-danger-soft: #fff0ef;
    --ops-focus: #246bce;
    --ops-radius-sm: 10px;
    --ops-radius-md: 16px;
    --ops-radius-lg: 24px;
    --ops-shadow-sm: 0 1px 2px rgba(17, 19, 21, 0.06);
    --ops-shadow-md: 0 18px 45px rgba(17, 19, 21, 0.12);
    --ops-max: 1560px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--ops-bg);
    color: var(--ops-ink);
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-synthesis: none;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 80% -20%, rgba(255, 255, 255, 0.9), transparent 32%),
        var(--ops-bg);
}

body.is-dialog-open {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

button,
select,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

:focus-visible {
    outline: 3px solid rgba(36, 107, 206, 0.28);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.ops-header {
    position: sticky;
    top: 0;
    z-index: 500;
    border-bottom: 1px solid rgba(227, 229, 231, 0.92);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
}

.ops-header__inner {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    width: min(var(--ops-max), 100%);
    min-height: 70px;
    margin: 0 auto;
    padding: 8px 28px;
    gap: 22px;
}

.ops-brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 11px;
    text-decoration: none;
}

.ops-brand__mark {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: var(--ops-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ops-brand > span:last-child {
    display: grid;
    gap: 1px;
}

.ops-brand strong {
    font-size: 14px;
    letter-spacing: -0.02em;
}

.ops-header--dropshipper .ops-brand strong,
.ops-header--admin .ops-brand strong,
.ops-header--worker .ops-brand strong {
    font-size: 15px;
}

.ops-header--dropshipper .ops-brand__mark,
.ops-header--admin .ops-brand__mark,
.ops-header--worker .ops-brand__mark {
    display: none;
}

.ops-brand small {
    color: var(--ops-muted);
    font-size: 10px;
}

.ops-nav {
    display: flex;
    align-items: center;
    padding: 4px;
    gap: 2px;
    border-radius: 13px;
    background: var(--ops-surface-soft);
}

.ops-nav__link {
    min-height: 40px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--ops-muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ops-nav__link:hover {
    color: var(--ops-ink);
}

.ops-nav__link.is-active {
    background: var(--ops-surface);
    color: var(--ops-ink);
    box-shadow: var(--ops-shadow-sm);
}

.ops-nav__link--secondary {
    color: var(--ops-soft);
}

.ops-logout {
    justify-self: end;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ops-muted);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.ops-logout:hover {
    background: var(--ops-surface-soft);
    color: var(--ops-ink);
}

.ops-shell {
    width: min(var(--ops-max), 100%);
    margin: 0 auto;
    padding: 30px 28px 90px;
}

.ops-action-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.ops-primary-action,
.ops-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.ops-primary-action {
    background: var(--ops-ink);
    color: #fff;
    box-shadow: 0 10px 24px rgba(17, 19, 21, 0.16);
}

.ops-primary-action:hover {
    background: #292c2f;
}

.ops-primary-action span {
    font-size: 19px;
    font-weight: 400;
}

.ops-secondary-action {
    border: 1px solid var(--ops-line-strong);
    background: var(--ops-surface);
    color: var(--ops-ink);
}

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

.ops-stat {
    display: grid;
    min-height: 104px;
    padding: 18px 20px;
    align-content: space-between;
    border: 1px solid var(--ops-line);
    border-radius: var(--ops-radius-md);
    background: var(--ops-surface);
    box-shadow: var(--ops-shadow-sm);
}

.ops-stat span {
    color: var(--ops-muted);
    font-size: 11px;
}

.ops-stat strong {
    font-size: 27px;
    font-weight: 760;
    letter-spacing: -0.045em;
}

.ops-stat--attention {
    background: linear-gradient(145deg, #fff 0%, var(--ops-warning-soft) 150%);
}

.ops-stat--attention strong {
    color: var(--ops-warning);
}

.ops-controls {
    position: sticky;
    top: 82px;
    z-index: 90;
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) repeat(4, minmax(135px, 1fr)) auto;
    align-items: end;
    padding: 11px;
    gap: 8px;
    border: 1px solid rgba(227, 229, 231, 0.94);
    border-radius: var(--ops-radius-md);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 35px rgba(17, 19, 21, 0.08);
    backdrop-filter: blur(16px);
}

.ops-field {
    display: grid;
    gap: 6px;
}

.ops-search {
    position: relative;
}

.ops-search > .ops-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ops-field > span {
    padding-left: 3px;
    color: var(--ops-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.ops-field select,
.ops-date-input,
.ops-search__box input {
    width: 100%;
    min-height: 46px;
    padding: 0 36px 0 13px;
    border: 1px solid var(--ops-line);
    border-radius: 11px;
    background: var(--ops-surface-soft);
    color: var(--ops-ink);
    font-size: 12px;
}

.ops-field select:hover,
.ops-date-input:hover,
.ops-search__box input:hover {
    border-color: var(--ops-line-strong);
}

.ops-search__box {
    position: relative;
    display: block;
}

.ops-search__box input {
    padding-right: 42px;
    font-weight: 400;
}

.ops-search__box input::placeholder {
    font-weight: 400;
}

.ops-search__box input::-webkit-search-cancel-button {
    display: none;
}

.ops-search__box button {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ops-muted);
    font-size: 18px;
    transform: translateY(-50%);
}

.ops-search__box button:hover {
    background: var(--ops-surface);
    color: var(--ops-ink);
}

.ops-reset {
    min-height: 46px;
    padding: 0 15px;
    border: 1px solid var(--ops-line);
    border-radius: 11px;
    background: var(--ops-surface);
    color: var(--ops-muted);
    font-size: 11px;
    font-weight: 750;
}

.warehouse-filter-trigger,
.warehouse-filter-panel__header,
.warehouse-filter-backdrop,
.warehouse-size-picker-trigger,
.warehouse-size-picker,
.warehouse-size-picker-backdrop,
.warehouse-option-picker-trigger,
.warehouse-option-picker,
.warehouse-option-picker-backdrop {
    display: none;
}

.warehouse-filter-panel,
.warehouse-filter-fields,
.warehouse-filter-actions {
    display: contents;
}

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

.warehouse-list-head {
    display: grid;
    grid-template-columns:
        88px
        minmax(220px, 1.5fr)
        minmax(220px, 1.4fr)
        minmax(110px, 0.6fr);
    margin-top: 20px;
    padding: 0 12px 8px 0;
    gap: 12px;
    color: var(--ops-soft);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.warehouse-card {
    position: relative;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    height: 88px;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ops-line);
    border-radius: 12px;
    background: var(--ops-surface);
    box-shadow: none;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.warehouse-card:hover {
    border-color: var(--ops-line-strong);
    background: #fbfbfc;
}

.warehouse-card__media {
    position: relative;
    display: block;
    width: 88px;
    height: 88px;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-right: 1px solid var(--ops-line);
    background: #eceeef;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.warehouse-card__media img {
    width: 100%;
    height: 100%;
    padding: 4px;
    background: #f1f2f3;
    object-fit: contain;
}

.warehouse-card__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--ops-soft);
    font-size: 38px;
    font-weight: 750;
}

.warehouse-card__body {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.5fr)
        minmax(220px, 1.4fr)
        minmax(110px, 0.6fr);
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    gap: 12px;
    cursor: pointer;
}

.warehouse-card__identity {
    min-width: 0;
}

.warehouse-card__category {
    margin: 0 0 4px;
    color: var(--ops-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.warehouse-card__name {
    display: block;
    margin: 0;
    overflow: hidden;
    color: var(--ops-ink);
    font-size: 13px;
    font-weight: 720;
    letter-spacing: -0.02em;
    line-height: 1.32;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: text;
    user-select: text;
}

.warehouse-card__barcode {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--ops-soft);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: text;
    user-select: text;
}

.warehouse-card__category,
.warehouse-card__price,
.warehouse-size {
    cursor: text;
    user-select: text;
}

.warehouse-card__variants {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 27px;
    margin: 0;
    overflow: hidden;
    gap: 5px;
}

.warehouse-size {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 9px;
    gap: 6px;
    border: 1px solid var(--ops-line);
    border-radius: 8px;
    background: var(--ops-surface-soft);
    color: var(--ops-ink);
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.warehouse-size small {
    color: inherit;
    font-size: 9px;
    font-weight: 800;
    opacity: 0.68;
}

.warehouse-size.is-low {
    border-color: #f3d3a9;
    background: var(--ops-warning-soft);
}

.warehouse-size.is-out {
    border-color: #f1c8c5;
    background: var(--ops-danger-soft);
    color: var(--ops-danger);
}

.warehouse-card__footer {
    display: contents;
}

.warehouse-card__price {
    display: grid;
    gap: 3px;
}

.warehouse-card__price span {
    color: var(--ops-muted);
    font-size: 9px;
}

.warehouse-card__price strong {
    font-size: 15px;
    letter-spacing: -0.025em;
}

.ops-empty {
    padding: 70px 24px;
    border: 1px dashed var(--ops-line-strong);
    border-radius: var(--ops-radius-md);
    background: rgba(255, 255, 255, 0.58);
    color: var(--ops-muted);
    text-align: center;
}

.ops-empty strong {
    display: block;
    margin-bottom: 7px;
    color: var(--ops-ink);
    font-size: 15px;
}

.ops-empty p {
    margin: 0;
    font-size: 12px;
}

.ops-mobile-nav {
    display: none;
}

.ops-toast-region {
    position: fixed;
    top: 86px;
    right: 20px;
    z-index: 2000;
    display: grid;
    width: min(360px, calc(100vw - 40px));
    gap: 8px;
    pointer-events: none;
}

.ops-toast {
    padding: 13px 15px;
    border: 1px solid var(--ops-line);
    border-radius: 12px;
    background: var(--ops-surface);
    box-shadow: var(--ops-shadow-md);
    font-size: 12px;
    font-weight: 700;
}

.ops-toast.is-error {
    border-color: #efc4c1;
    background: var(--ops-danger-soft);
    color: var(--ops-danger);
}

/* Sales history */
.history-controls {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 11px;
    gap: 14px;
    border: 1px solid var(--ops-line);
    border-radius: var(--ops-radius-md);
    background: var(--ops-surface);
}

.history-periods {
    display: flex;
    padding: 4px;
    gap: 3px;
    border-radius: 12px;
    background: var(--ops-surface-soft);
}

.history-period {
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ops-muted);
    font-size: 11px;
    font-weight: 750;
}

.history-period.is-active {
    background: var(--ops-surface);
    color: var(--ops-ink);
    box-shadow: var(--ops-shadow-sm);
}

.history-range {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.history-range .ops-field {
    width: 150px;
}

.history-range__apply {
    min-height: 46px;
    padding: 0 15px;
    border: 0;
    border-radius: 11px;
    background: var(--ops-ink);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
}

.history-state {
    min-height: 360px;
}

.history-loader {
    display: grid;
    min-height: 300px;
    place-items: center;
    color: var(--ops-muted);
    font-size: 12px;
}

.history-loader::before {
    width: 28px;
    height: 28px;
    border: 3px solid var(--ops-line);
    border-top-color: var(--ops-ink);
    border-radius: 50%;
    content: "";
    animation: ops-spin 700ms linear infinite;
}

@keyframes ops-spin {
    to {
        transform: rotate(360deg);
    }
}

.history-table-wrap {
    overflow: visible;
    border: 1px solid var(--ops-line);
    border-radius: var(--ops-radius-md);
    background: var(--ops-surface);
    box-shadow: var(--ops-shadow-sm);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.history-table th {
    height: 45px;
    padding: 0 14px;
    border-bottom: 1px solid var(--ops-line);
    color: var(--ops-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
}

.history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ops-line);
    font-size: 11px;
    vertical-align: middle;
}

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

.history-table tbody tr:hover {
    background: #fafafa;
}

.history-product {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

.history-product__image {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    overflow: hidden;
    place-items: center;
    border-radius: 11px;
    background: var(--ops-surface-soft);
    color: var(--ops-muted);
    font-weight: 800;
}

.history-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-product__text {
    min-width: 0;
}

.history-product__text strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-product__text small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--ops-muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-seller,
.history-amount,
.history-quantity,
.history-date {
    font-weight: 700;
}

.history-date {
    display: grid;
    gap: 3px;
}

.history-date small {
    color: var(--ops-muted);
    font-size: 9px;
    font-weight: 500;
}

.history-cancel {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--ops-danger);
    font-size: 10px;
    font-weight: 750;
}

.history-cancel:hover {
    border-color: #efcfcc;
    background: var(--ops-danger-soft);
}

.history-mobile {
    display: none;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
}

.history-mobile-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--ops-line);
    border-radius: 15px;
    background: var(--ops-surface);
    box-shadow: var(--ops-shadow-sm);
}

.history-mobile-card__top,
.history-mobile-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 12px;
}

.history-mobile-card__bottom {
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--ops-line);
}

.history-mobile-card__meta {
    display: grid;
    gap: 4px;
    color: var(--ops-muted);
    font-size: 10px;
}

.history-mobile-card__amount {
    font-size: 15px;
    font-weight: 800;
}

.ops-dialog-backdrop {
    position: fixed;
    z-index: 1500;
    display: flex;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 19, 21, 0.52);
    backdrop-filter: blur(6px);
}

.ops-dialog {
    width: min(440px, 100%);
    padding: 22px;
    border-radius: var(--ops-radius-lg);
    background: var(--ops-surface);
    box-shadow: var(--ops-shadow-md);
}

.ops-dialog__eyebrow {
    margin: 0 0 8px;
    color: var(--ops-danger);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.ops-dialog h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.04em;
}

.ops-dialog p {
    margin: 12px 0 0;
    color: var(--ops-muted);
    font-size: 12px;
    line-height: 1.55;
}

.ops-dialog__summary {
    margin-top: 16px;
    padding: 13px;
    border-radius: 12px;
    background: var(--ops-surface-soft);
    font-size: 11px;
    font-weight: 700;
}

.ops-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 20px;
    gap: 8px;
}

.ops-dialog__actions button {
    min-height: 46px;
    border: 0;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 750;
}

.ops-dialog__cancel {
    background: var(--ops-surface-soft);
    color: var(--ops-ink);
}

.ops-dialog__confirm {
    background: var(--ops-danger);
    color: #fff;
}

@media (max-width: 1280px) {
    .ops-header__inner {
        grid-template-columns: auto 1fr auto;
    }

    .ops-nav {
        justify-self: center;
    }

}

@media (max-width: 980px) {
    .ops-header__inner {
        min-height: 62px;
        padding-inline: 18px;
    }

    .ops-nav {
        position: fixed;
        right: 14px;
        bottom: 14px;
        left: 14px;
        z-index: 700;
        display: none;
    }

    .ops-header--dropshipper .ops-logout,
    .ops-header--admin .ops-logout,
    .ops-header--worker .ops-logout {
        grid-column: 3;
        margin-right: 0;
        padding-right: 0;
    }

    .ops-mobile-nav {
        position: fixed;
        right: 12px;
        bottom: 12px;
        left: 12px;
        z-index: 700;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        padding: 5px;
        border: 1px solid var(--ops-line);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 14px 40px rgba(17, 19, 21, 0.18);
        backdrop-filter: blur(18px);
    }

    .ops-mobile-nav a {
        display: grid;
        min-height: 46px;
        padding: 5px;
        place-items: center;
        border-radius: 11px;
        color: var(--ops-muted);
        font-size: 10px;
        font-weight: 750;
        text-align: center;
        text-decoration: none;
    }

    .ops-mobile-nav--dropshipper a,
    .ops-mobile-nav--admin a,
    .ops-mobile-nav--worker a {
        font-size: 12px;
    }

    .ops-mobile-nav--admin a {
        padding: 0;
    }

    .ops-mobile-nav--admin svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.8;
    }

    .ops-mobile-nav a.is-active {
        background: var(--ops-ink);
        color: #fff;
    }

    .ops-shell {
        padding-bottom: 130px;
    }

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

    .ops-search {
        grid-column: 1 / -1;
    }

    .ops-reset {
        grid-column: 1 / -1;
    }

    .warehouse-list-head {
        grid-template-columns:
            72px
            minmax(180px, 1.5fr)
            minmax(170px, 1.2fr)
            minmax(90px, 0.7fr);
        gap: 8px;
    }

    .warehouse-card {
        grid-template-columns: 72px minmax(0, 1fr);
        height: 80px;
        min-height: 0;
    }

    .warehouse-card__media {
        width: 72px;
        height: 80px;
        min-height: 0;
    }

    .warehouse-card__body {
        grid-template-columns:
            minmax(180px, 1.5fr)
            minmax(170px, 1.2fr)
            minmax(90px, 0.7fr);
        padding: 9px 10px;
        gap: 8px;
    }

    .history-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .history-range {
        display: grid;
        grid-template-columns: 1fr 1fr auto;
    }

    .history-range .ops-field {
        width: auto;
    }
}

@media (max-width: 700px) {
    .ops-header__inner {
        min-height: 60px;
        padding-inline: 12px;
    }

    .ops-brand__mark {
        width: 35px;
        height: 35px;
        border-radius: 10px;
    }

    .ops-brand small {
        display: none;
    }

    .ops-logout {
        padding-inline: 9px;
    }

    .ops-shell {
        padding: 28px 12px 120px;
    }

    .ops-primary-action {
        width: 100%;
    }

    .ops-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .ops-stat {
        min-height: 88px;
        padding: 13px 11px;
        border-radius: 13px;
    }

    .ops-stat span {
        font-size: 9px;
        line-height: 1.25;
    }

    .ops-stat strong {
        font-size: 21px;
    }

    .ops-controls {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        padding: 9px;
        gap: 7px;
        border-radius: 14px;
        backdrop-filter: none;
    }

    .ops-page-warehouse .ops-search {
        grid-column: auto;
    }

    .warehouse-filter-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 13px;
        gap: 7px;
        border: 1px solid var(--ops-line);
        border-radius: 11px;
        background: var(--ops-surface-soft);
        color: var(--ops-ink);
        font-size: 11px;
        font-weight: 750;
        white-space: nowrap;
    }

    .warehouse-filter-trigger svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-width: 1.8;
    }

    .warehouse-filter-trigger__count {
        display: grid;
        min-width: 19px;
        height: 19px;
        padding-inline: 5px;
        place-items: center;
        border-radius: 999px;
        background: var(--ops-ink);
        color: #fff;
        font-size: 9px;
    }

    .warehouse-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 880;
        display: block;
        padding: 0;
        border: 0;
        background: rgba(17, 19, 21, 0.34);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .warehouse-filter-panel {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 900;
        display: flex;
        max-height: min(76vh, 620px);
        padding: 17px 14px max(14px, env(safe-area-inset-bottom));
        flex-direction: column;
        gap: 18px;
        overflow: auto;
        border-radius: 22px 22px 0 0;
        background: var(--ops-surface);
        box-shadow: 0 -20px 54px rgba(17, 19, 21, 0.2);
        visibility: hidden;
        transform: translateY(calc(100% + 24px));
        transition:
            transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
            visibility 220ms;
    }

    .warehouse-filter-panel.is-open {
        visibility: visible;
        transform: translateY(0);
    }

    body.is-filter-sheet-open .warehouse-filter-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .warehouse-filter-panel__header {
        position: relative;
        display: flex;
        min-height: 42px;
        align-items: center;
        justify-content: space-between;
    }

    .warehouse-filter-panel__handle {
        position: absolute;
        top: -9px;
        left: 50%;
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: var(--ops-line-strong);
        transform: translateX(-50%);
    }

    .warehouse-filter-panel__header h2 {
        margin: 0;
        font-size: 19px;
        letter-spacing: -0.035em;
    }

    .warehouse-filter-panel__close {
        display: grid;
        width: 40px;
        height: 40px;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: 50%;
        background: var(--ops-surface-soft);
        color: var(--ops-muted);
    }

    .warehouse-filter-panel__close svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-width: 1.8;
    }

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

    .warehouse-filter-fields .ops-field:nth-child(n + 3) {
        grid-column: 1 / -1;
    }

    .warehouse-filter-fields .ops-field > span {
        font-size: 10px;
    }

    .warehouse-filter-fields .ops-field select {
        min-height: 48px;
        padding-inline: 13px 34px;
        background: var(--ops-surface-soft);
        font-size: 12px;
    }

    .warehouse-size-filter > select {
        display: none;
    }

    .warehouse-option-filter > select {
        display: none;
    }

    .warehouse-size-picker-trigger,
    .warehouse-option-picker-trigger {
        display: flex;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        padding: 0 12px 0 13px;
        gap: 8px;
        border: 1px solid var(--ops-line);
        border-radius: 11px;
        background: var(--ops-surface-soft);
        color: var(--ops-ink);
        font-size: 12px;
        text-align: left;
    }

    .warehouse-size-picker-trigger svg,
    .warehouse-option-picker-trigger svg {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.8;
    }

    .warehouse-size-picker-backdrop {
        position: fixed;
        inset: 0;
        z-index: 920;
        display: block;
        background: rgba(17, 19, 21, 0.3);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.is-size-picker-open .warehouse-size-picker-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .warehouse-size-picker {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 940;
        display: flex;
        max-height: min(82vh, 690px);
        padding: 17px 14px max(14px, env(safe-area-inset-bottom));
        flex-direction: column;
        gap: 16px;
        border-radius: 22px 22px 0 0;
        background: var(--ops-surface);
        box-shadow: 0 -20px 54px rgba(17, 19, 21, 0.22);
        visibility: hidden;
        transform: translateY(calc(100% + 24px));
        transition:
            transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
            visibility 220ms;
    }

    .warehouse-size-picker.is-open {
        visibility: visible;
        transform: translateY(0);
    }

    .warehouse-size-picker__header {
        position: relative;
        display: flex;
        min-height: 42px;
        align-items: center;
        justify-content: space-between;
    }

    .warehouse-size-picker__handle {
        position: absolute;
        top: -9px;
        left: 50%;
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: var(--ops-line-strong);
        transform: translateX(-50%);
    }

    .warehouse-size-picker__header h2 {
        margin: 0;
        font-size: 19px;
        letter-spacing: -0.035em;
    }

    .warehouse-size-picker__close {
        display: grid;
        width: 40px;
        height: 40px;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: 50%;
        background: var(--ops-surface-soft);
        color: var(--ops-muted);
    }

    .warehouse-size-picker__close svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-width: 1.8;
    }

    .warehouse-size-picker__content {
        display: grid;
        min-height: 0;
        gap: 18px;
        overflow: auto;
        overscroll-behavior: contain;
        padding: 1px 2px 4px;
    }

    .warehouse-size-choice--all {
        justify-self: start;
    }

    .warehouse-size-picker__group {
        display: grid;
        gap: 9px;
    }

    .warehouse-size-picker__group h3 {
        margin: 0;
        color: var(--ops-muted);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.11em;
        text-transform: uppercase;
    }

    .warehouse-size-picker__choices {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .warehouse-size-choice {
        min-width: 46px;
        min-height: 38px;
        padding: 0 13px;
        border: 1px solid var(--ops-line);
        border-radius: 999px;
        background: var(--ops-surface);
        color: var(--ops-ink);
        font-size: 12px;
        font-weight: 650;
    }

    .warehouse-size-choice.is-selected {
        border-color: var(--ops-ink);
        background: var(--ops-ink);
        color: #fff;
    }

    .warehouse-size-picker__done {
        min-height: 48px;
        flex: 0 0 auto;
        border: 0;
        border-radius: 12px;
        background: var(--ops-ink);
        color: #fff;
        font-size: 12px;
        font-weight: 750;
    }

    .warehouse-option-picker-backdrop {
        position: fixed;
        inset: 0;
        z-index: 920;
        display: block;
        background: rgba(17, 19, 21, 0.3);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.is-option-picker-open .warehouse-option-picker-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .warehouse-option-picker {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 940;
        display: flex;
        max-height: min(76vh, 620px);
        padding: 17px 14px max(14px, env(safe-area-inset-bottom));
        flex-direction: column;
        gap: 14px;
        border-radius: 22px 22px 0 0;
        background: var(--ops-surface);
        box-shadow: 0 -20px 54px rgba(17, 19, 21, 0.22);
        visibility: hidden;
        transform: translateY(calc(100% + 24px));
        transition:
            transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
            visibility 220ms;
    }

    .warehouse-option-picker.is-open {
        visibility: visible;
        transform: translateY(0);
    }

    .warehouse-option-picker__header {
        position: relative;
        display: flex;
        min-height: 42px;
        align-items: center;
        justify-content: space-between;
    }

    .warehouse-option-picker__handle {
        position: absolute;
        top: -9px;
        left: 50%;
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: var(--ops-line-strong);
        transform: translateX(-50%);
    }

    .warehouse-option-picker__header h2 {
        margin: 0;
        font-size: 19px;
        letter-spacing: -0.035em;
    }

    .warehouse-option-picker__close {
        display: grid;
        width: 40px;
        height: 40px;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: 50%;
        background: var(--ops-surface-soft);
        color: var(--ops-muted);
    }

    .warehouse-option-picker__close svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-width: 1.8;
    }

    .warehouse-option-picker__list {
        display: grid;
        min-height: 0;
        gap: 7px;
        overflow: auto;
        overscroll-behavior: contain;
    }

    .warehouse-option-choice {
        display: flex;
        width: 100%;
        min-height: 50px;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        gap: 12px;
        border: 1px solid transparent;
        border-radius: 12px;
        background: var(--ops-surface-soft);
        color: var(--ops-ink);
        font-size: 13px;
        font-weight: 650;
        text-align: left;
    }

    .warehouse-option-choice svg {
        display: none;
        width: 19px;
        height: 19px;
        flex: 0 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 2;
    }

    .warehouse-option-choice.is-selected {
        border-color: var(--ops-ink);
        background: var(--ops-ink);
        color: #fff;
    }

    .warehouse-option-choice.is-selected svg {
        display: block;
    }

    .warehouse-filter-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding-top: 14px;
        border-top: 1px solid var(--ops-line);
    }

    .warehouse-filter-actions .ops-reset {
        width: 100%;
        min-height: 48px;
        padding: 0 16px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 750;
    }

    body.is-filter-sheet-open,
    body.is-size-picker-open,
    body.is-option-picker-open {
        overflow: hidden;
    }

    .ops-field select,
    .ops-date-input,
    .ops-search__box input {
        min-height: 44px;
        padding-left: 10px;
    }

    .ops-search__box input {
        font-size: 16px;
    }

    .warehouse-list-head {
        display: none;
    }

    .warehouse-grid {
        margin-top: 10px;
        gap: 7px;
    }

    .warehouse-card {
        grid-template-columns: 70px minmax(0, 1fr);
        height: 82px;
        min-height: 0;
        border-radius: 10px;
    }

    .warehouse-card:hover {
        background: var(--ops-surface);
    }

    .warehouse-card__media {
        width: 70px;
        height: 82px;
        min-height: 0;
    }

    .warehouse-card__body {
        position: relative;
        grid-template-columns: minmax(0, 1fr) auto;
        align-content: center;
        padding: 6px 8px;
        gap: 4px 8px;
    }

    .warehouse-card__identity {
        grid-column: 1 / -1;
    }

    .warehouse-card__name {
        font-size: 13px;
        line-height: 1.25;
    }

    .warehouse-card__category {
        display: none;
    }

    .warehouse-card__barcode {
        margin-top: 2px;
        font-size: 10px;
    }

    .warehouse-card__variants {
        grid-row: 2;
        grid-column: 1;
        min-height: 20px;
        margin: 0;
    }

    .warehouse-size {
        height: 26px;
        padding-inline: 8px;
        font-size: 10px;
    }

    .warehouse-size small {
        font-size: 9px;
        opacity: 0.74;
    }

    .warehouse-card__footer {
        display: flex;
        grid-row: 2;
        grid-column: 2;
        align-self: center;
        justify-self: end;
    }

    .warehouse-card__price {
        display: flex;
        align-items: baseline;
        justify-content: flex-end;
        gap: 3px;
        white-space: nowrap;
    }

    .warehouse-card__price span {
        font-size: 7px;
    }

    .warehouse-card__price strong {
        font-size: 12px;
    }

    .history-periods {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .history-period {
        padding: 0 8px;
    }

    .history-range {
        grid-template-columns: 1fr 1fr;
    }

    .history-range__apply {
        grid-column: 1 / -1;
    }

    .history-table-wrap {
        display: none;
    }

    .history-mobile {
        display: grid;
        gap: 8px;
    }

    .ops-dialog-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .ops-dialog {
        width: 100%;
        padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
    }

    .ops-toast-region {
        top: 70px;
        right: 12px;
        width: calc(100vw - 24px);
    }
}

@media (max-width: 380px) {
    .ops-stat span {
        font-size: 8px;
    }

    .warehouse-card__footer {
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
