.warehouse-console { display: none; }

@media (min-width: 821px) {
    body.role-warehouse_worker { background: #eef2f7; }
    body.role-warehouse_worker .topbar,
    body.role-warehouse_worker .mobile-action-bar { display: none; }
    body.role-warehouse_worker .site-shell { min-height: 100vh; }
    body.role-warehouse_worker .warehouse-dashboard { width: 100%; margin: 0; padding: 0; }
    body.role-warehouse_worker .warehouse-dashboard > .mobile-dashboard-summary { display: none; }

    .warehouse-console {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        min-height: 100vh;
        color: #17243a;
        background: #eef2f7;
    }

    .warehouse-console svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .warehouse-console__rail {
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column;
        height: 100vh;
        padding: 22px 16px 18px;
        overflow-y: auto;
        color: #eef3fa;
        background: #263b59;
        box-shadow: 12px 0 32px rgba(35, 52, 78, 0.13);
        z-index: 3;
    }

    .warehouse-console__brand {
        display: grid;
        width: 108px;
        height: 108px;
        margin: 0 auto 22px;
        overflow: hidden;
        border-radius: 16px;
        box-shadow: 0 12px 28px rgba(8, 18, 34, 0.24);
    }

    .warehouse-console__brand img { width: 100%; height: 100%; object-fit: cover; }

    .warehouse-console__role {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 11px;
        border: 1px solid rgba(219, 228, 241, 0.22);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.07);
    }

    .warehouse-console__role-icon {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        border-radius: 12px;
        color: #ffffff;
        background: #526783;
    }

    .warehouse-console__role-icon svg { width: 21px; height: 21px; }
    .warehouse-console__role > span:last-child { display: grid; min-width: 0; }
    .warehouse-console__role strong { overflow: hidden; color: #fff; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
    .warehouse-console__role small { color: #c4cfdd; font-size: 0.69rem; }

    .warehouse-console__nav { display: grid; gap: 4px; margin-top: 18px; }
    .warehouse-console__nav a {
        display: grid;
        grid-template-columns: 22px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 9px 12px;
        border-radius: 12px;
        color: #d6dfeb;
        font-size: 0.82rem;
        font-weight: 600;
        transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
    }

    .warehouse-console__nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.09); transform: translateX(2px); }
    [dir="rtl"] .warehouse-console__nav a:hover { transform: translateX(-2px); }
    .warehouse-console__nav a.is-active { color: #263b59; background: #fff; box-shadow: 0 9px 22px rgba(10, 24, 44, 0.2); }
    .warehouse-console__nav svg { width: 20px; height: 20px; }
    .warehouse-console__product-group { display: grid; gap: 3px; margin-block: 4px; }
    .warehouse-console__nav .warehouse-console__product-parent { color: #fff; background: rgba(255, 255, 255, 0.08); }
    .warehouse-console__product-children {
        display: grid;
        gap: 1px;
        margin-inline-start: 21px;
        padding-inline-start: 8px;
        border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
    }
    .warehouse-console__nav .warehouse-console__product-child { min-height: 34px; padding: 5px 8px; color: #cbd7e5; font-size: 0.75rem; }
    .warehouse-console__nav .warehouse-console__product-child svg { width: 17px; height: 17px; }

    .warehouse-console__rail-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 18px; color: #d6dfeb; font-size: 0.76rem; }
    .warehouse-console__rail-footer form { margin: 0; }
    .warehouse-console__rail-footer button { min-height: 36px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; color: #fff; background: transparent; box-shadow: none; font-size: 0.72rem; }
    .warehouse-console__rail-footer button:hover { background: rgba(255,255,255,.1); transform: none; }

    .warehouse-console__workspace { min-width: 0; padding: 0 clamp(20px, 3vw, 42px) 38px; }
    .warehouse-console__topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 74px; }

    .warehouse-search { position: relative; width: min(480px, 55%); margin: 0; }
    .warehouse-search label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .warehouse-search svg { position: absolute; inset-inline-start: 15px; top: 50%; width: 18px; height: 18px; color: #5c6e87; transform: translateY(-50%); pointer-events: none; }
    .warehouse-search input { width: 100%; min-height: 44px; padding: 10px 16px 10px 44px; border: 1px solid #cfd8e5; border-radius: 12px; color: #17243a; background: #fff; box-shadow: 0 8px 20px rgba(50, 69, 96, 0.06); }
    [dir="rtl"] .warehouse-search input { padding: 10px 44px 10px 16px; }

    .warehouse-console__account { display: flex; align-items: center; gap: 9px; min-width: 0; }
    .warehouse-console__avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; background: #465a78; font-size: 0.78rem; font-weight: 800; }
    .warehouse-console__account > span:last-child { display: grid; }
    .warehouse-console__account strong { color: #22344f; font-size: 0.82rem; }
    .warehouse-console__account small { color: #66758b; font-size: 0.68rem; }
    .warehouse-language { margin: 0; }
    .warehouse-language details { position: relative; }
    .warehouse-language summary { min-width: 40px; padding: 8px 10px; border: 1px solid #d2dbe7; border-radius: 10px; color: #40526e; background: #fff; cursor: pointer; font-size: 0.72rem; font-weight: 700; list-style: none; }
    .warehouse-language details > div { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; display: grid; min-width: 130px; padding: 6px; border: 1px solid #d2dbe7; border-radius: 12px; background: #fff; box-shadow: 0 16px 34px rgba(35, 52, 78, 0.16); z-index: 10; }
    .warehouse-language button { min-height: 38px; padding: 8px 10px; border: 0; border-radius: 8px; color: #334967; background: transparent; box-shadow: none; text-align: start; }
    .warehouse-language button:hover { color: #fff; background: #526783; transform: none; }

    .warehouse-welcome {
        position: relative;
        display: flex;
        min-height: 160px;
        align-items: center;
        justify-content: flex-start;
        gap: 28px;
        overflow: hidden;
        padding: 24px clamp(24px, 4vw, 52px);
        border-radius: 16px;
        color: #17243a;
        background: #eaf1fb;
        box-shadow: 0 16px 38px rgba(57, 75, 103, 0.11);
    }

    .warehouse-welcome::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #eef4fc 0%, rgba(238, 244, 252, 0.96) 31%, rgba(238, 244, 252, 0) 64%); z-index: 1; }
    [dir="rtl"] .warehouse-welcome::after { background: linear-gradient(270deg, #eef4fc 0%, rgba(238, 244, 252, 0.96) 31%, rgba(238, 244, 252, 0) 64%); }
    .warehouse-welcome > div { position: relative; width: min(48%, 530px); z-index: 2; }
    .warehouse-welcome h1 { display: grid; margin: 0; color: #17243a; font-size: clamp(1.7rem, 3.2vw, 2.7rem); line-height: 1.02; letter-spacing: -0.035em; }
    .warehouse-welcome h1 span { font-size: 0.72em; font-weight: 500; letter-spacing: -0.02em; }
    .warehouse-welcome p { margin: 10px 0 0; color: #5d6c83; font-size: 0.9rem; }
    .warehouse-welcome__photo { position: absolute; inset: 0 0 0 auto; width: 62%; height: 100%; object-fit: cover; object-position: center top; }
    [dir="rtl"] .warehouse-welcome__photo { inset: 0 auto 0 0; transform: scaleX(-1); }

    .warehouse-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
    .warehouse-kpi { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 116px; padding: 16px; border: 1px solid #d9e1eb; border-radius: 15px; color: #17243a; background: #fff; transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
    .warehouse-kpi:hover { border-color: #93a3b9; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(57, 75, 103, 0.1); }
    .warehouse-kpi__icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; color: #405a82; background: #e5edf9; }
    .warehouse-kpi__icon svg { width: 28px; height: 28px; }
    .warehouse-kpi > span:last-child { display: grid; min-width: 0; }
    .warehouse-kpi strong { color: #17243a; font-size: clamp(1.45rem, 2.4vw, 2rem); font-variant-numeric: tabular-nums; line-height: 1; }
    .warehouse-kpi b { margin-top: 5px; color: #334967; font-size: 0.78rem; }
    .warehouse-kpi small { margin-top: 2px; overflow: hidden; color: #66758b; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
    .warehouse-kpi--warning .warehouse-kpi__icon { color: #9a5a27; background: #fff0df; }
    .warehouse-kpi--receipt .warehouse-kpi__icon { color: #1f7865; background: #e1f4ef; }
    .warehouse-kpi--location .warehouse-kpi__icon { color: #6a4b92; background: #efe9f8; }

    .warehouse-board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
    .warehouse-panel { min-width: 0; padding: 18px; border: 1px solid #d9e1eb; border-radius: 15px; background: #fff; }
    .warehouse-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
    .warehouse-panel > header h2 { margin: 0; color: #22344f; font-size: 1rem; letter-spacing: -0.02em; }
    .warehouse-panel > header p { margin: 3px 0 0; color: #66758b; font-size: 0.72rem; }
    .warehouse-panel > header > a { flex: 0 0 auto; color: #465a78; font-size: 0.7rem; font-weight: 700; }
    .warehouse-panel--trend { grid-column: span 6; }
    .warehouse-panel--outgoing { grid-column: span 3; }
    .warehouse-panel--alerts { grid-column: span 3; background: #fffafa; border-color: #efd9dc; }
    .warehouse-panel--categories { grid-column: span 4; }
    .warehouse-panel--actions { grid-column: span 4; }
    .warehouse-panel--activity { grid-column: span 4; }

    .warehouse-trend-chart { min-height: 190px; }
    .warehouse-trend-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
    .warehouse-trend-chart__grid path { fill: none; stroke: #dfe6ef; stroke-width: 1; }
    .warehouse-trend-chart polyline { fill: none; stroke: #526f9c; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 5px 8px rgba(70, 90, 120, 0.18)); }
    .warehouse-trend-chart__point circle { fill: #fff; stroke: #465a78; stroke-width: 3; }
    .warehouse-trend-chart__point text { fill: #6a7890; font-size: 11px; text-anchor: middle; }

    .warehouse-ranking,
    .warehouse-alert-list,
    .warehouse-category-list,
    .warehouse-activity-list { margin: 0; padding: 0; list-style: none; }
    .warehouse-ranking { display: grid; gap: 12px; }
    .warehouse-ranking li { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
    .warehouse-ranking__index { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; color: #465a78; background: #e8edf4; font-size: 0.7rem; font-weight: 800; }
    .warehouse-ranking li > div { display: grid; gap: 5px; min-width: 0; }
    .warehouse-ranking a { overflow: hidden; color: #2a3c58; font-size: 0.76rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
    .warehouse-ranking li > div > span { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #e7ecf3; }
    .warehouse-ranking i { display: block; width: var(--value); height: 100%; border-radius: inherit; background: #6f82a0; }
    .warehouse-ranking strong { color: #465a78; font-size: 0.74rem; font-variant-numeric: tabular-nums; }

    .warehouse-alert-list { display: grid; gap: 8px; }
    .warehouse-alert-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; padding: 9px; border-radius: 10px; background: rgba(169, 67, 76, 0.055); }
    .warehouse-alert-list li > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #a9434c; background: #f8e4e6; }
    .warehouse-alert-list svg { width: 17px; height: 17px; }
    .warehouse-alert-list div { display: grid; min-width: 0; }
    .warehouse-alert-list a { overflow: hidden; color: #672f35; font-size: 0.74rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
    .warehouse-alert-list small { color: #81575c; font-size: 0.66rem; }

    .warehouse-category-list { display: grid; gap: 12px; }
    .warehouse-category-list li > span { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
    .warehouse-category-list a { color: #334967; font-size: 0.74rem; font-weight: 750; }
    .warehouse-category-list a:hover { color: #17243a; text-decoration: underline; text-underline-offset: 3px; }
    .warehouse-category-list small { color: #5d6c83; font-size: 0.7rem; font-variant-numeric: tabular-nums; }
    .warehouse-category-list li > i { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: #e7ecf3; }
    .warehouse-category-list em { display: block; width: var(--value); height: 100%; border-radius: inherit; background: #6f82a0; }

    .warehouse-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
    .warehouse-action-grid a { display: grid; min-height: 102px; place-items: center; align-content: center; gap: 9px; padding: 12px 8px; border-radius: 12px; color: #fff; background: #465a78; text-align: center; transition: background-color 180ms ease, transform 180ms ease; }
    .warehouse-action-grid a:hover { background: #354863; transform: translateY(-2px); }
    .warehouse-action-grid svg { width: 28px; height: 28px; }
    .warehouse-action-grid span { font-size: 0.68rem; font-weight: 700; line-height: 1.2; }

    .warehouse-activity-list { display: grid; gap: 0; }
    .warehouse-activity-list li { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid #e5eaf1; }
    .warehouse-activity-list li:last-child { border-bottom: 0; }
    .warehouse-activity-list__dot { width: 10px; height: 10px; margin-top: 4px; border: 3px solid #d7e7e2; border-radius: 50%; background: #36705a; }
    .warehouse-activity-list li.is-out .warehouse-activity-list__dot { border-color: #f3d9dc; background: #a9434c; }
    .warehouse-activity-list div { display: grid; min-width: 0; }
    .warehouse-activity-list strong { overflow: hidden; color: #2a3c58; font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
    .warehouse-activity-list small { overflow: hidden; color: #66758b; font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }
    .warehouse-activity-list bdi { color: #40526e; font-size: 0.72rem; font-weight: 800; font-variant-numeric: tabular-nums; }

    .warehouse-empty { display: grid; min-height: 120px; place-items: center; margin: 0; padding: 18px; border-radius: 12px; color: #66758b; background: #f5f7fa; font-size: 0.78rem; text-align: center; }
    .warehouse-empty--success { color: #2d6854; background: #eaf5f1; }

    .warehouse-console .dashboard-search-results { margin-top: 14px; }
}

@media (min-width: 821px) and (max-width: 1180px) {
    .warehouse-console { grid-template-columns: 192px minmax(0, 1fr); }
    .warehouse-console__rail { padding-inline: 12px; }
    .warehouse-console__brand { width: 84px; height: 84px; }
    .warehouse-console__role { grid-template-columns: 34px minmax(0, 1fr); padding: 9px; }
    .warehouse-console__role-icon { width: 34px; height: 34px; }
    .warehouse-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .warehouse-panel--trend { grid-column: span 8; }
    .warehouse-panel--outgoing { grid-column: span 4; }
    .warehouse-panel--alerts,
    .warehouse-panel--categories,
    .warehouse-panel--actions,
    .warehouse-panel--activity { grid-column: span 6; }
    .warehouse-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .warehouse-welcome > div { width: 52%; }
    .warehouse-welcome__photo { width: 58%; }
}

@media (min-width: 821px) and (max-height: 900px), (min-width: 821px) and (max-width: 1180px) {
    body.role-warehouse_worker:has(.warehouse-console) { overflow: hidden; }
    .warehouse-console {
        grid-template-columns: clamp(148px, 15vw, 192px) minmax(0, 1fr);
        height: 100vh;
        min-height: 0;
        overflow: hidden;
    }
    .warehouse-console__rail { height: 100vh; padding: 10px 8px 8px; overflow: hidden; }
    .warehouse-console__brand { width: 68px; height: 68px; margin-bottom: 8px; border-radius: 13px; }
    .warehouse-console__role { grid-template-columns: 30px minmax(0, 1fr); gap: 7px; padding: 6px; border-radius: 11px; }
    .warehouse-console__role-icon { width: 30px; height: 30px; border-radius: 9px; }
    .warehouse-console__role-icon svg { width: 17px; height: 17px; }
    .warehouse-console__role strong { font-size: 0.66rem; }
    .warehouse-console__role small { font-size: 0.57rem; }
    .warehouse-console__nav { gap: 1px; margin-top: 7px; }
    .warehouse-console__nav a { grid-template-columns: 18px minmax(0, 1fr); gap: 7px; min-height: 31px; padding: 4px 8px; border-radius: 9px; font-size: 0.66rem; }
    .warehouse-console__nav svg { width: 16px; height: 16px; }
    .warehouse-console__product-group { gap: 1px; margin-block: 2px; }
    .warehouse-console__product-children { gap: 0; margin-inline-start: 15px; padding-inline-start: 5px; }
    .warehouse-console__nav .warehouse-console__product-child { min-height: 25px; padding: 2px 6px; font-size: 0.59rem; }
    .warehouse-console__nav .warehouse-console__product-child svg { width: 14px; height: 14px; }
    .warehouse-console__rail-footer { padding-top: 5px; font-size: 0.6rem; }
    .warehouse-console__rail-footer button { min-height: 27px; padding: 4px 6px; border-radius: 8px; font-size: 0.58rem; }

    .warehouse-console__workspace { height: 100vh; padding: 0 12px 8px; overflow: hidden; }
    .warehouse-console__topbar { min-height: 44px; gap: 14px; }
    .warehouse-search { width: min(420px, 55%); }
    .warehouse-search input { min-height: 34px; padding-block: 6px; border-radius: 10px; font-size: 0.72rem; }
    .warehouse-search svg { width: 15px; height: 15px; }
    .warehouse-console__avatar { width: 30px; height: 30px; font-size: 0.64rem; }
    .warehouse-console__account strong { font-size: 0.7rem; }
    .warehouse-console__account small { font-size: 0.58rem; }
    .warehouse-language summary { min-width: 34px; padding: 6px 8px; font-size: 0.62rem; }

    .warehouse-welcome { min-height: 110px; height: 110px; padding: 13px 22px; border-radius: 14px; }
    .warehouse-welcome > div { width: 48%; }
    .warehouse-welcome h1 { font-size: clamp(1.25rem, 2.2vw, 1.8rem); }
    .warehouse-welcome p { margin-top: 6px; font-size: 0.7rem; }
    .warehouse-welcome__photo { inset-block-start: -34px; inset-block-end: auto; width: 62%; height: calc(100% + 34px); }

    .warehouse-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
    .warehouse-kpi { grid-template-columns: 36px minmax(0, 1fr); gap: 8px; height: 70px; min-height: 0; padding: 7px; border-radius: 13px; box-sizing: border-box; }
    .warehouse-kpi__icon { width: 36px; height: 36px; }
    .warehouse-kpi__icon svg { width: 19px; height: 19px; }
    .warehouse-kpi strong { font-size: clamp(1.2rem, 2vw, 1.55rem); }
    .warehouse-kpi b { margin-top: 3px; font-size: 0.67rem; }
    .warehouse-kpi small { font-size: 0.57rem; }

    .warehouse-board {
        height: calc(100vh - 248px);
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 8px;
        overflow: hidden;
    }
    .warehouse-panel { min-height: 0; overflow: hidden; padding: 10px; border-radius: 13px; }
    .warehouse-panel > header { gap: 8px; margin-bottom: 7px; }
    .warehouse-panel > header h2 { font-size: 0.76rem; }
    .warehouse-panel > header p { margin-top: 1px; font-size: 0.57rem; }
    .warehouse-panel > header > a { font-size: 0.58rem; }
    .warehouse-panel--trend { display: flex; grid-column: span 6; flex-direction: column; }
    .warehouse-panel--outgoing { grid-column: span 3; }
    .warehouse-panel--alerts { grid-column: span 3; }
    .warehouse-panel--categories,
    .warehouse-panel--actions,
    .warehouse-panel--activity { grid-column: span 4; }
    .warehouse-trend-chart { flex: 1; min-height: 0; }
    .warehouse-trend-chart svg { width: 100%; height: 100%; }
    .warehouse-ranking { gap: 7px; }
    .warehouse-ranking li { grid-template-columns: 21px minmax(0, 1fr) auto; gap: 6px; }
    .warehouse-ranking__index { width: 21px; height: 21px; font-size: 0.6rem; }
    .warehouse-ranking a, .warehouse-ranking strong { font-size: 0.62rem; }
    .warehouse-alert-list { gap: 5px; }
    .warehouse-alert-list li { grid-template-columns: 24px minmax(0, 1fr); gap: 6px; padding: 5px; }
    .warehouse-alert-list li > span { width: 24px; height: 24px; border-radius: 7px; }
    .warehouse-alert-list svg { width: 14px; height: 14px; }
    .warehouse-alert-list a { font-size: 0.62rem; }
    .warehouse-alert-list small { font-size: 0.55rem; }
    .warehouse-panel--categories { padding: 8px 10px; }
    .warehouse-panel--categories > header { margin-bottom: 5px; }
    .warehouse-category-list { gap: 3px; }
    .warehouse-category-list li > span { margin-bottom: 1px; }
    .warehouse-category-list a, .warehouse-category-list small { font-size: 0.59rem; }
    .warehouse-category-list li > i { height: 4px; }
    .warehouse-action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .warehouse-action-grid a { min-height: 58px; gap: 4px; padding: 6px 4px; border-radius: 10px; }
    .warehouse-action-grid svg { width: 21px; height: 21px; }
    .warehouse-action-grid span { font-size: 0.56rem; }
    .warehouse-activity-list li { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 5px; padding: 3px 0; }
    .warehouse-activity-list__dot { width: 8px; height: 8px; margin-top: 3px; border-width: 2px; }
    .warehouse-activity-list strong, .warehouse-activity-list bdi { font-size: 0.61rem; }
    .warehouse-activity-list small { font-size: 0.53rem; }
    .warehouse-empty { min-height: 76px; padding: 10px; font-size: 0.64rem; }
}

@media (max-width: 820px) {
    body.role-warehouse_worker .warehouse-dashboard { width: min(calc(100% - 24px), 560px); margin: 0 auto; padding: 20px 0 92px; }
    body.role-warehouse_worker .warehouse-dashboard > .mobile-dashboard-summary { display: grid; }
}

/* Compact warehouse navigation, aligned with the Roactive stock console. */
@media (min-width: 821px) {
    .warehouse-console { grid-template-columns: 176px minmax(0, 1fr); }

    .warehouse-console__rail {
        padding: 14px 10px 12px;
        overflow: hidden;
        color: #eef4fb;
        background: linear-gradient(180deg, #102846 0%, #0b1f3a 100%);
        box-shadow: 10px 0 28px rgba(17, 37, 63, 0.16);
    }

    .warehouse-console__brand {
        width: 82px;
        height: 82px;
        margin-bottom: 12px;
        border-radius: 14px;
        box-shadow: 0 10px 24px rgba(3, 13, 27, 0.28);
    }

    .warehouse-console__role {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 8px;
        padding: 7px 8px;
        border-color: rgba(224, 234, 246, 0.14);
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.045);
    }

    .warehouse-console__role-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        color: #102846;
        background: #eef4fb;
    }

    .warehouse-console__role-icon svg { width: 18px; height: 18px; }
    .warehouse-console__role strong { font-size: 0.69rem; }
    .warehouse-console__role small { color: #aebed1; font-size: 0.58rem; }

    .warehouse-console__nav {
        gap: 2px;
        margin-top: 10px;
    }

    .warehouse-console__nav a {
        grid-template-columns: 20px minmax(0, 1fr) auto;
        gap: 8px;
        min-height: 38px;
        padding: 7px 9px;
        border-radius: 10px;
        color: #e3ebf5;
        font-size: 0.7rem;
        font-weight: 600;
        box-shadow: none;
        transform: none;
    }

    .warehouse-console__nav a:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.085);
        transform: none;
    }

    .warehouse-console__nav a.is-active {
        color: #fff;
        background: #526f9c;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 7px 18px rgba(4, 17, 34, 0.22);
    }

    .warehouse-console__nav a:focus-visible,
    .warehouse-console__rail-footer button:focus-visible {
        outline: 3px solid #9eb4d3;
        outline-offset: 2px;
    }

    .warehouse-console__nav svg { width: 18px; height: 18px; }
    .warehouse-console__nav .warehouse-console__nav-chevron { width: 13px; height: 13px; color: #b9c7d8; }
    [dir="rtl"] .warehouse-console__nav-chevron { transform: scaleX(-1); }

    .warehouse-console__nav-badge {
        display: grid;
        min-width: 18px;
        height: 18px;
        place-items: center;
        padding-inline: 4px;
        border-radius: 999px;
        color: #fff;
        background: #e6505a;
        font-size: 0.58rem;
        font-variant-numeric: tabular-nums;
        line-height: 1;
    }

    .warehouse-console__rail-visual {
        flex: 1 1 90px;
        min-height: 58px;
        max-height: 150px;
        margin: 8px 2px 6px;
        border-top: 1px solid rgba(211, 224, 239, 0.16);
        background-image: linear-gradient(180deg, rgba(12, 32, 58, 0.72), rgba(12, 32, 58, 0.08)), url("../images/roactive-warehouse-hero.png");
        background-position: center 29%;
        background-size: cover;
        filter: grayscale(1);
        opacity: 0.2;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28%, #000 100%);
        mask-image: linear-gradient(to bottom, transparent 0, #000 28%, #000 100%);
    }

    .warehouse-console__rail-footer {
        display: block;
        margin-top: 0;
        padding-top: 0;
    }

    .warehouse-console__rail-footer form { width: 100%; }
    .warehouse-console__rail-footer button {
        display: flex;
        width: 100%;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        gap: 9px;
        padding: 8px 12px;
        border-color: rgba(216, 228, 242, 0.28);
        border-radius: 999px;
        color: #f4f7fb;
        font-size: 0.67rem;
    }

    .warehouse-console__rail-footer button svg { width: 17px; height: 17px; }
}

@media (min-width: 821px) and (max-height: 900px), (min-width: 821px) and (max-width: 1180px) {
    .warehouse-console { grid-template-columns: 164px minmax(0, 1fr); }
    .warehouse-console__rail { padding: 8px 8px 7px; }
    .warehouse-console__brand { width: 62px; height: 62px; margin-bottom: 6px; border-radius: 11px; }
    .warehouse-console__role { grid-template-columns: 28px minmax(0, 1fr); gap: 6px; padding: 5px 6px; }
    .warehouse-console__role-icon { width: 28px; height: 28px; }
    .warehouse-console__role-icon svg { width: 16px; height: 16px; }
    .warehouse-console__role strong { font-size: 0.63rem; }
    .warehouse-console__role small { font-size: 0.54rem; }
    .warehouse-console__nav { gap: 1px; margin-top: 6px; }
    .warehouse-console__nav a { grid-template-columns: 17px minmax(0, 1fr) auto; gap: 7px; min-height: 32px; padding: 5px 7px; border-radius: 9px; font-size: 0.64rem; }
    .warehouse-console__nav svg { width: 16px; height: 16px; }
    .warehouse-console__nav .warehouse-console__nav-chevron { width: 11px; height: 11px; }
    .warehouse-console__nav-badge { min-width: 16px; height: 16px; font-size: 0.53rem; }
    .warehouse-console__rail-visual { flex-basis: 62px; min-height: 42px; max-height: 86px; margin-block: 5px 4px; }
    .warehouse-console__rail-footer { padding-top: 0; }
    .warehouse-console__rail-footer button { min-height: 34px; padding: 5px 9px; border-radius: 999px; font-size: 0.59rem; }
    .warehouse-console__rail-footer button svg { width: 15px; height: 15px; }
}

/* Product demand and stock-alert panels, based on the approved catalogue model. */
@media (min-width: 821px) {
    .warehouse-panel--outgoing,
    .warehouse-panel--alerts {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    .warehouse-panel--alerts {
        border-color: #f0d7dc;
        background: #fff7f8;
    }

    .warehouse-panel-heading {
        display: flex;
        min-width: 0;
        align-items: flex-start;
        gap: 8px;
    }

    .warehouse-panel-heading > div { min-width: 0; }
    .warehouse-panel-heading__icon {
        display: grid;
        flex: 0 0 26px;
        width: 26px;
        height: 26px;
        place-items: center;
        color: #405f98;
    }

    .warehouse-panel-heading__icon svg { width: 22px; height: 22px; }
    .warehouse-panel-heading--danger .warehouse-panel-heading__icon,
    .warehouse-panel-heading--danger h2 { color: #d83b4b; }

    .warehouse-alert-count {
        display: grid;
        flex: 0 0 30px !important;
        width: 30px;
        height: 30px;
        place-items: center;
        border-radius: 50%;
        color: #fff !important;
        background: #e84050;
        font-size: 0.72rem !important;
        font-variant-numeric: tabular-nums;
        text-decoration: none;
    }

    .warehouse-alert-count:hover { background: #c92f40; }

    .warehouse-ranking {
        flex: 1 1 auto;
        align-content: start;
        gap: 9px;
    }

    .warehouse-ranking li {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 9px;
    }

    .warehouse-product-thumb {
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        overflow: hidden !important;
        border-radius: 9px;
        color: #526783 !important;
        background: #eef2f7;
    }

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

    .warehouse-product-thumb > span { display: grid; place-items: center; }
    .warehouse-product-thumb svg { width: 22px; height: 22px; }
    .warehouse-ranking__body { display: grid; min-width: 0; gap: 5px; }
    .warehouse-ranking__body > span {
        display: block;
        height: 6px;
        overflow: hidden;
        border-radius: 999px;
        background: #e6ebf5;
    }

    .warehouse-ranking__body i { background: #4b72c8; }
    .warehouse-ranking strong { white-space: nowrap; }

    .warehouse-alert-list {
        flex: 1 1 auto;
        align-content: start;
        gap: 7px;
    }

    .warehouse-alert-list li {
        grid-template-columns: 52px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 8px;
        border-radius: 12px;
        background: #ffedf0;
    }

    .warehouse-product-thumb--alert {
        width: 52px;
        height: 52px;
        background: #fff7f8;
    }

    .warehouse-alert-list div { align-content: center; gap: 2px; }
    .warehouse-alert-list a:not(.warehouse-product-thumb) { color: #4d3042; }
    .warehouse-alert-list strong {
        overflow: hidden;
        color: #d63245;
        font-size: 0.7rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .warehouse-alert-list small { line-height: 1.25; }
}

@media (min-width: 821px) and (max-height: 900px), (min-width: 821px) and (max-width: 1180px) {
    .warehouse-panel-heading { gap: 4px; }
    .warehouse-panel-heading__icon { flex-basis: 18px; width: 18px; height: 18px; }
    .warehouse-panel-heading__icon svg { width: 16px; height: 16px; }
    .warehouse-alert-count { flex-basis: 20px !important; width: 20px; height: 20px; font-size: 0.55rem !important; }
    .warehouse-ranking { gap: 4px; }
    .warehouse-ranking li { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 5px; }
    .warehouse-product-thumb { width: 28px; height: 28px; border-radius: 7px; }
    .warehouse-product-thumb svg { width: 15px; height: 15px; }
    .warehouse-ranking__body { gap: 3px; }
    .warehouse-ranking__body > span { height: 4px; }
    .warehouse-ranking strong { font-size: 0.57rem; }
    .warehouse-alert-list { gap: 4px; }
    .warehouse-alert-list li { grid-template-columns: 34px minmax(0, 1fr); gap: 5px; padding: 4px; border-radius: 8px; }
    .warehouse-product-thumb--alert { width: 34px; height: 34px; }
    .warehouse-alert-list div { gap: 1px; }
    .warehouse-alert-list a:not(.warehouse-product-thumb) { font-size: 0.6rem; }
    .warehouse-alert-list strong { font-size: 0.53rem; }
    .warehouse-alert-list small { font-size: 0.5rem; }
}

@media print {
    .warehouse-console__rail,
    .warehouse-console__topbar { display: none !important; }
    .warehouse-console { display: block; }
    .warehouse-console__workspace { padding: 0; }
}
