.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

:root {
    color-scheme: light;
    --bg: #f3f7f8;
    --dark-background: #191423;
    --dark-sidebar: #211a2c;
    --sidebar: #fff;
    --surface: #fff;
    --surface2: #e9f2f5;
    --text: #122930;
    --body-text: #314851;
    --muted: #526971;
    --line: #d6e5e9;
    --teal: #096f84;
    --teal-dark: #085d70;
    --teal-soft: #ddf3f7;
    --button-text: #fff;
    --avatar-bg: #d7eff4;
    --shadow: 0 2px 5px rgba(14,46,57,.06);
    --success: #16803c;
    --warning: #a16207;
    --error: #b42318;
    --info: #2563eb;
    --red: #b42318;
    --amber: #a16207
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: var(--dark-background);
    --sidebar: var(--dark-sidebar);
    --surface: #1a262b;
    --surface2: #22343a;
    --text: #eef6f8;
    --body-text: #d2e1e5;
    --muted: #a5bac2;
    --line: #344a52;
    --teal: #6ddceb;
    --teal-dark: #8fe7f0;
    --teal-soft: #203d45;
    --button-text: #09272e;
    --avatar-bg: #23444d;
    --shadow: 0 2px 7px rgba(0,0,0,.18);
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    --info: #60a5fa;
    --red: #f87171;
    --amber: #fbbf24
}
* {
    box-sizing: border-box
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--body-text);
    font: 14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif
}
h1,h2,h3 {
    color: var(--text)
}
button,input,select {
    font: inherit
}
button {
    cursor: pointer
}
.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px 1fr
}
.sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    height: 100vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 10px 22px;
    font-weight: 750;
    font-size: 17px;
    letter-spacing: -.3px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    width: 100%;
    cursor: pointer;
}
.brand-mark {
    height: 36px;
    width: 36px;
    flex: 0 0 36px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 3px 5px rgba(9,111,132,.18))
}
.depot-tools {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
}
.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nav-group {
    display: flex;
    flex-direction: column;
}
.nav-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: 1.1px;
    padding: 9px 10px 5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px;
    transition: color .15s ease, background .15s ease;
}
.nav-category-header:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--surface2) 60%, transparent);
}
.category-chevron {
    width: 12px;
    height: 12px;
    transition: transform .2s cubic-bezier(.2,.8,.2,1);
    opacity: 0.7;
    flex-shrink: 0;
}
.nav-group.collapsed .category-chevron {
    transform: rotate(-90deg);
}
.nav-category-items {
    display: grid;
    gap: 3px;
    margin-top: 2px;
}
.nav-group.collapsed .nav-category-items {
    display: none;
}
.nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: left;
    border-radius: 10px;
    padding: 9px 12px;
    font-weight: 550;
    cursor: pointer;
}
.nav button:hover,.nav button.active {
    background: var(--surface2);
    color: var(--teal-dark)
}
.nav .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: inherit;
}
.nav-svg {
    width: 18px;
    height: 18px;
}
.sidebar-bottom {
    margin-top: auto
}
.user {
    border-top: 1px solid var(--line);
    padding: 17px 8px 0;
    display: flex;
    align-items: center;
    gap: 10px
}
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--avatar-bg);
    color: var(--teal-dark);
    display: grid;
    place-items: center;
    font-weight: 700
}
.user small,.subtle {
    color: var(--muted)
}
main {
    min-width: 0
}
.topbar {
    height: 70px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 38px
}
.crumb {
    color: var(--muted)
}
.top-right {
    display: flex;
    align-items: center;
    gap: 12px
}
.select {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    padding: 9px 12px
}
.content {
    max-width: 1320px;
    margin: auto;
    padding: 32px 38px 56px
}
.heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 24px
}
.heading h1 {
    font-size: 27px;
    letter-spacing: -.7px;
    margin: 0 0 4px
}
.heading p {
    margin: 0;
    color: var(--muted)
}
.btn {
    border: 0;
    border-radius: 9px;
    background: var(--teal);
    color: var(--button-text);
    padding: 10px 15px;
    font-weight: 650;
    box-shadow: 0 2px 4px rgba(34,211,238,.2)
}
.btn:hover {
    filter: brightness(.96)
}
.btn.secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none
}
.cards {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px
}
.card,.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow)
}
.stat {
    padding: 18px
}
.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600
}
.stat-icon {
    height: 32px;
    width: 32px;
    border-radius: 9px;
    background: var(--teal-soft);
    display: grid;
    place-items: center;
    color: var(--teal-dark);
    font-size: 16px
}
.stat-num {
    font-size: 27px;
    font-weight: 730;
    letter-spacing: -.6px;
    margin: 13px 0 1px
}
.stat-foot {
    font-size: 11px;
    color: var(--muted)
}
.grid-main {
    display: grid;
    grid-template-columns: minmax(0,1.55fr) minmax(270px,.9fr);
    gap: 16px;
    margin-top: 18px
}
.panel {
    padding: 20px
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px
}
.panel-head h2 {
    margin: 0;
    font-size: 15px
}
.text-btn {
    background: none;
    border: 0;
    color: var(--teal-dark);
    font-weight: 650;
    padding: 4px
}
.warehouse-list {
    display: grid;
    gap: 10px
}
.warehouse {
    padding: 13px;
    border-radius: 11px;
    background: var(--surface);
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 12px
}
.wh-icon {
    height: 38px;
    width: 38px;
    border-radius: 10px;
    background: var(--teal-soft);
    display: grid;
    place-items: center;
    font-size: 18px;
    color: var(--teal-dark)
}
.warehouse strong {
    display: block;
    font-size: 13px
}
.warehouse small {
    color: var(--muted)
}
.badge {
    font-size: 11px;
    background: var(--surface2);
    color: var(--teal-dark);
    padding: 5px 9px;
    border-radius: 99px;
    white-space: nowrap
}
.activity {
    display: grid;
    gap: 0
}
.activity-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    align-items: start
}
.activity-row:last-child {
    border: 0
}
.activity-icon {
    height: 28px;
    width: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--teal-soft);
    color: var(--teal-dark)
}
.activity-row strong {
    font-size: 12px;
    display: block
}
.activity-row small {
    font-size: 11px;
    color: var(--muted)
}
.activity-row time {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap
}
.quick {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
    margin-top: 16px
}
.quick .panel {
    padding: 15px
}
.quick strong {
    display: block;
    margin-top: 8px;
    font-size: 12px
}
.quick span {
    font-size: 19px;
    color: var(--teal-dark)
}
.page-placeholder {
    padding: 28px
}
.page-placeholder h2 {
    margin-top: 0
}
.warehouse-manage {
    display: grid;
    gap: 14px
}
.manage-card {
    padding: 18px
}
.manage-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px
}
.manage-title h3 {
    margin: 0 0 3px;
    font-size: 15px
}
.location-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px
}
.chip {
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 12px
}
.empty {
    color: var(--muted);
    padding: 25px;
    text-align: center
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px
}
.data-table th,.data-table td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left
}
.data-table th {
    color: var(--muted);
    font-weight: 650
}
.table-wrap {
    overflow: auto
}
.tag-entry {
    color: var(--teal-dark)
}
.tag-exit {
    color: var(--red)
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}
.notice {
    border-radius: 10px;
    background: color-mix(in srgb,var(--info) 10%,var(--surface));
    color: var(--info);
    padding: 11px 13px;
    font-size: 12px;
    margin-bottom: 14px;
    border: 1px solid color-mix(in srgb,var(--info) 24%,var(--line))
}
.notice.warning {
    background: color-mix(in srgb,var(--warning) 12%,var(--surface));
    border-color: color-mix(in srgb,var(--warning) 30%,var(--line));
    color: var(--warning)
}
.notice.error {
    background: color-mix(in srgb,var(--error) 12%,var(--surface));
    border-color: color-mix(in srgb,var(--error) 30%,var(--line));
    color: var(--error)
}
.notice.success {
    background: color-mix(in srgb,var(--success) 12%,var(--surface));
    border-color: color-mix(in srgb,var(--success) 30%,var(--line));
    color: var(--success)
}
.badge.success,.stock-status.success {
    background: color-mix(in srgb,var(--success) 14%,var(--surface));
    color: var(--success)
}
.badge.warning,.stock-status.warning {
    background: color-mix(in srgb,var(--warning) 14%,var(--surface));
    color: var(--warning)
}
.badge.error,.stock-status.error {
    background: color-mix(in srgb,var(--error) 14%,var(--surface));
    color: var(--error)
}
.badge.info,.stock-status.info {
    background: color-mix(in srgb,var(--info) 14%,var(--surface));
    color: var(--info)
}
.stock-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap
}
.stock-alert-panel {
    margin-top: 16px
}
.stock-alert-heading,.stock-alert-item {
    display: flex;
    align-items: center;
    gap: 12px
}
.stock-alert-heading {
    justify-content: space-between;
    margin-bottom: 12px
}
.stock-alert-heading h2 {
    margin: 0
}
.stock-alert-list {
    display: grid;
    gap: 8px
}
.stock-alert-item {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface2)
}
.stock-alert-item.warning {
    border-color: color-mix(in srgb,var(--warning) 28%,var(--line))
}
.stock-alert-item.error {
    border-color: color-mix(in srgb,var(--error) 28%,var(--line))
}
.stock-alert-item.info {
    border-color: color-mix(in srgb,var(--info) 28%,var(--line))
}
.stock-alert-mark {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-weight: 800
}
.stock-alert-mark > .icon {
    width: 17px;
    height: 17px;
}
.stock-alert-item.warning .stock-alert-mark {
    background: color-mix(in srgb,var(--warning) 16%,var(--surface));
    color: var(--warning)
}
.stock-alert-item.error .stock-alert-mark {
    background: color-mix(in srgb,var(--error) 16%,var(--surface));
    color: var(--error)
}
.stock-alert-item.info .stock-alert-mark {
    background: color-mix(in srgb,var(--info) 16%,var(--surface));
    color: var(--info)
}
.stock-alert-details {
    min-width: 0;
    flex: 1
}
.stock-alert-details strong,.stock-alert-details small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis
}
.stock-alert-details strong {
    color: var(--text)
}
.stock-alert-details small {
    color: var(--muted)
}
.stock-alert-empty {
    margin: 0
}
.toast {
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: var(--text);
    color: var(--surface);
    padding: 11px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow)
}
dialog {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    width: min(440px,calc(100% - 30px));
    padding: 0;
    box-shadow: 0 22px 80px #0003
}
dialog::backdrop {
    background: #0b1d1dcc
}
.modal {
    padding: 23px
}
.modal h2 {
    font-size: 18px;
    margin: 0 0 5px
}
.modal p {
    color: var(--muted);
    margin: 0 0 18px
}
.field {
    display: grid;
    gap: 6px;
    margin: 13px 0
}
.field label {
    font-size: 12px;
    font-weight: 650
}
.field input,.field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface2);
    color: var(--text);
    padding: 10px 11px;
    outline-color: var(--teal)
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px
}
.hide {
    display: none!important
}

.form-error {
    border: 1px solid color-mix(in srgb,var(--error) 35%,var(--line));
    border-radius: 10px;
    background: color-mix(in srgb,var(--error) 10%,var(--surface));
    color: var(--error);
    font-size: 13px;
    margin: 14px 0 0;
    padding: 10px 12px
}

.toast {
    z-index: 20;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    width: min(440px,calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    padding: 14px 16px;
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
    animation: toast-in .18s ease-out
}

.toast.hide {
    display: none!important
}

.toast-icon {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb,var(--info) 14%,var(--surface));
    color: var(--info);
    font-size: 14px;
    font-weight: 800
}


.toast[data-type="error"] {
    border-color: color-mix(in srgb,var(--error) 32%,var(--line))
}

.toast[data-type="error"] .toast-icon {
    background: color-mix(in srgb,var(--error) 14%,var(--surface));
    color: var(--error)
}


.toast[data-type="success"] .toast-icon {
    background: color-mix(in srgb,var(--success) 14%,var(--surface));
    color: var(--success)
}


.toast #toastMessage {
    min-width: 0;
    padding-top: 1px;
    overflow-wrap: anywhere
}

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

.product-entry-heading {
    align-items: flex-start;
    flex-direction: column
}

.product-household-picker {
    display: grid;
    gap: 5px;
    min-width: min(250px,100%);
    color: var(--muted);
    font-size: 11px;
    font-weight: 650
}

.product-household-picker .select {
    width: 100%
}

.product-entry-controls {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%
}

.product-entry-controls>.btn {
    min-height: 42px;
    max-width: 100%;
    white-space: normal
}

.product-catalog {
    display: grid;
    gap: 20px
}

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

.product-summary-card {
    display: grid;
    gap: 5px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow)
}

.product-summary-card span {
    color: var(--muted);
    font-size: 12px
}

.product-summary-card strong {
    color: var(--text);
    font-size: 24px;
    line-height: 1.15
}

.product-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px
}

.product-catalog-toolbar h2 {
    margin: 0 0 3px;
    font-size: 18px
}

.product-catalog-toolbar p {
    margin: 0;
    font-size: 12px
}

.product-search {
    flex: 0 1 320px
}

.product-category-filter {
    display: grid;
    flex: 0 1 210px;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 650
}

.product-category-filter .select {
    width: 100%;
    min-height: 42px
}

.product-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: 9px 12px
}

.product-search input:focus {
    outline: none;
    border-color: var(--teal-dark);
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--teal) 22%,transparent)
}

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(min(100%,290px),1fr));
    gap: 14px
}

.product-category-sections {
    display: grid;
    gap: 22px
}

.product-category-section {
    display: grid;
    gap: 12px
}

.product-category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line)
}

.product-category-heading>div:first-child {
    display: flex;
    align-items: baseline;
    gap: 9px;
    min-width: 0
}

.product-category-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px
}

.product-category-heading span,.product-category-empty {
    color: var(--muted);
    font-size: 12px
}

.product-category-empty {
    margin: 0;
    padding: 14px 0
}

.product-category-actions {
    display: flex;
    align-items: center;
    gap: 12px
}

.product-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color .16s,transform .16s
}

.product-photo {
    display: grid;
    width: 100%;
    height: 160px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: color-mix(in srgb,var(--surface2) 58%,var(--surface))
}

.product-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.product-photo-placeholder {
    color: var(--muted);
    font-size: 34px
}

.product-card:hover {
    border-color: color-mix(in srgb,var(--teal-dark) 45%,var(--line));
    transform: translateY(-2px)
}

.product-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.product-sku,.product-unit {
    border-radius: 7px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700
}

.product-sku {
    background: var(--surface2);
    color: var(--teal-dark);
    overflow-wrap: anywhere
}

.product-unit {
    background: color-mix(in srgb,var(--surface2) 68%,transparent);
    color: var(--muted)
}

.product-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    overflow-wrap: anywhere
}

.product-category {
    align-self: flex-start;
    max-width: 100%;
    padding: 4px 9px;
    border: 1px solid color-mix(in srgb,var(--teal-dark) 20%,var(--line));
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 650;
    overflow-wrap: anywhere
}

.product-card-depots {
    display: grid;
    gap: 8px;
    min-height: 56px
}

.product-card-section-title,.product-depot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.product-card-section-title {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700
}

.product-card-section-title>span:last-child {
    color: var(--text)
}

.product-depot {
    border-top: 1px solid var(--line);
    padding-top: 8px;
    font-size: 12px
}

.product-depot-name {
    color: var(--text);
    min-width: 0;
    overflow-wrap: anywhere
}

.product-depot-name small,.product-depot strong small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500
}

.product-depot strong {
    color: var(--text);
    white-space: nowrap
}

.product-unassigned {
    margin: 0;
    border: 1px dashed var(--line);
    border-radius: 9px;
    color: var(--muted);
    padding: 9px;
    font-size: 12px
}

.product-card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 12px
}

.product-card-actions .btn {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px
}

.product-photo-upload {
    position: relative;
    overflow: hidden;
    cursor: pointer
}

.product-photo-upload input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer
}

.product-photo-upload[aria-busy="true"] {
    opacity: .65;
    pointer-events: none
}

.product-card-actions .text-btn {
    margin-left: auto
}

.product-catalog-empty {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 42px 18px;
    border: 1px dashed var(--line);
    border-radius: 15px;
    background: var(--surface);
    text-align: center
}

.product-empty-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 24px
}

.product-catalog-empty h3,.product-catalog-empty p {
    margin: 0
}

.product-catalog-empty p {
    max-width: 440px;
    color: var(--muted);
    font-size: 13px
}

.product-search-empty {
    margin: 0;
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    text-align: center
}

.product-advanced {
    margin: 15px 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px
}

.product-advanced summary {
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650
}

.product-advanced .form-row {
    margin-top: 8px
}

.product-create-hint {
    margin: 14px 0 0
}

dialog:has(.product-form) {
    width: min(760px,calc(100% - 30px));
    max-height: calc(100vh - 32px);
    overflow: auto
}

#haneProductUnit {
    align-self: start;
    width: min(8rem, 100%);
    min-height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background-color: color-mix(in srgb, var(--surface2) 48%, var(--surface));
}

@media (max-width: 620px) {
    #haneProductUnit {
        min-height: 44px;
    }
}

.distribution-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 10px
}

.distribution-product-mark {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 19px
}

.distribution-intro>div {
    display: grid;
    min-width: 0
}

.distribution-intro strong {
    color: var(--text);
    overflow-wrap: anywhere
}

.distribution-intro small {
    color: var(--muted)
}

.distribution-help {
    margin: 0 0 14px!important;
    font-size: 12px
}

.distribution-table-head,.distribution-row {
    display: grid;
    grid-template-columns: minmax(110px,1.15fr) minmax(82px,.7fr) minmax(100px,.8fr) minmax(130px,1fr);
    align-items: center;
    gap: 10px
}

.distribution-table-head {
    padding: 0 12px 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .45px
}

.distribution-list {
    display: grid;
    gap: 8px;
    max-height: min(44vh,360px);
    overflow: auto;
    padding: 1px 2px 3px
}

.distribution-row {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    transition: background .16s,border-color .16s,opacity .16s
}

.distribution-row.selected {
    border-color: color-mix(in srgb,var(--teal-dark) 45%,var(--line));
    background: color-mix(in srgb,var(--teal-soft) 38%,var(--surface))
}

.distribution-depot-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    cursor: pointer
}

.distribution-depot-check input {
    flex: 0 0 auto;
    accent-color: var(--teal-dark)
}

.distribution-depot-check span {
    display: grid;
    min-width: 0
}

.distribution-depot-check strong {
    color: var(--text);
    font-size: 12px;
    overflow-wrap: anywhere
}

.distribution-depot-check small,.distribution-current span {
    color: var(--muted);
    font-size: 10px
}

.distribution-current {
    display: grid;
    gap: 2px
}

.distribution-current strong {
    color: var(--text);
    font-size: 11px;
    overflow-wrap: anywhere
}

.distribution-field {
    display: grid;
    gap: 4px;
    min-width: 0
}

.distribution-field>span {
    color: var(--muted);
    font-size: 10px
}

.distribution-field>span small {
    display: block;
    font-size: 9px
}

.distribution-field input,.distribution-field select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface2);
    color: var(--text);
    font: inherit;
    font-size: 12px
}

.distribution-field input:focus,.distribution-field select:focus {
    outline: none;
    border-color: var(--teal-dark);
    box-shadow: 0 0 0 2px color-mix(in srgb,var(--teal) 20%,transparent)
}

.distribution-field input:disabled,.distribution-field select:disabled {
    opacity: .48;
    cursor: not-allowed
}

.distribution-no-locations {
    grid-column: 3/-1;
    margin: -4px 0 0;
    color: var(--warning);
    font-size: 10px
}

.distribution-total {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: fit-content;
    max-width: 100%;
    margin-top: 12px;
    margin-inline-start: auto;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface2) 48%, var(--surface));
    color: var(--muted);
    font-size: 12px
}

.distribution-total strong {
    color: var(--text);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere
}

.distribution-total small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500
}

:root[data-theme="dark"] .auth-card {
    box-shadow: 0 24px 80px rgba(0,0,0,.34)
}

:root[data-theme="dark"] .topbar {
    background: color-mix(in srgb,var(--surface) 94%,transparent)
}

:root[data-theme="dark"] .chip,
:root[data-theme="dark"] .account-menu,
:root[data-theme="dark"] .notification-panel,
:root[data-theme="dark"] .chat-sidebar,
:root[data-theme="dark"] .chat-main {
    background: var(--surface)
}

:root[data-theme="dark"] .data-table th {
    background: var(--surface)
}

:root[data-theme="dark"] .toast {
    box-shadow: 0 18px 48px rgba(0,0,0,.42)
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px) }
    to { opacity: 1; transform: translateY(0) }
}

@media(max-width:900px) {
    .shell {
        grid-template-columns: 76px 1fr
    }
    .sidebar {
        padding: 20px 10px
    }
    .brand {
        justify-content: center;
        padding: 0 0 25px
    }
    .brand-name,.section-label,.nav-section-title,.nav-label,.user-info {
        display: none
    }
    .nav button {
        justify-content: center;
        padding: 11px
    }
    .nav .ico {
        font-size: 19px
    }
    .user {
        justify-content: center;
        padding: 16px 0 0
    }
    .cards {
        grid-template-columns: repeat(2,1fr)
    }
    .content {
        padding: 26px 24px
    }
    .topbar {
        padding: 0 24px
    }
}
@media(max-width:620px) {
    .shell {
        display: block;
        padding-bottom: 65px
    }
    .sidebar {
        position: fixed;
        z-index: 5;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        padding: 5px 7px;
        border: 0;
        border-top: 1px solid var(--line);
        display: block
    }
    .brand,.section-label,.nav-section-title,.sidebar-bottom {
        display: none
    }
    .nav {
        height: 100%;
        display: flex;
        justify-content: space-around;
        align-items: center
    }
    .nav button {
        width: 48px;
        height: 48px
    }
    .nav button {
        flex: 1;
        min-width: 0
    }
    .nav .ico {
        font-size: 18px
    }
    .topbar {
        height: 58px;
        padding: 0 16px
    }
    .content {
        padding: 22px 15px
    }
    .heading {
        align-items: flex-start;
        flex-direction: column
    }
    .heading h1 {
        font-size: 23px
    }
    .cards {
        gap: 9px
    }
    .stat {
        padding: 13px
    }
    .stat-num {
        font-size: 23px
    }
    .grid-main {
        grid-template-columns: 1fr
    }
    .quick {
        grid-template-columns: 1fr 1fr
    }
    .select {
        max-width: 170px;
        padding: 8px;
        font-size: 12px
    }
    .product-catalog-summary {
        gap: 8px
    }
    .product-summary-card {
        padding: 12px
    }
    .product-summary-card span {
        font-size: 10px
    }
    .product-summary-card strong {
        font-size: 20px
    }
    .product-catalog-toolbar {
        align-items: stretch;
        flex-direction: column
    }
    .product-search {
        flex-basis: auto
    }
    .product-category-filter {
        flex-basis: auto;
        width: 100%
    }
    .product-card-actions {
        align-items: stretch;
        flex-wrap: wrap
    }
    .product-entry-controls {
        align-items: stretch;
        flex-direction: column
    }
    .product-household-picker {
        min-width: 0;
        width: 100%
    }
    .distribution-table-head {
        display: none
    }
    .distribution-row {
        grid-template-columns: minmax(0,1fr) minmax(94px,.8fr);
        gap: 9px
    }
    .distribution-depot-check {
        grid-column: 1
    }
    .distribution-current {
        grid-column: 2;
        justify-self: end;
        text-align: right
    }
    .distribution-field {
        grid-column: span 1
    }
    .distribution-no-locations {
        grid-column: 1/-1
    }
}
.stock-toolbar {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 0 16px 14px
}
.stock-search input,
.movement-product-picker input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text)
}
.stock-low-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--body-text);
    font-size: 12px;
    white-space: nowrap
}
.stock-low-filter input {
    width: 18px;
    height: 18px;
    accent-color: var(--teal-dark)
}
#stockFilterSummary {
    font-size: 12px
}
.stock-level-warning td {
    background: color-mix(in srgb,var(--warning) 5%,var(--surface))
}
.stock-level-error td {
    background: color-mix(in srgb,var(--error) 6%,var(--surface))
}
.movement-product-picker {
    display: grid;
    gap: 6px
}
.movement-product-picker label:not(:first-child) {
    margin-top: 4px
}
@media(max-width:620px) {
    .stock-toolbar {
        grid-template-columns: minmax(0,1fr);
        align-items: stretch;
        gap: 10px;
        padding: 0 12px 12px
    }
    .stock-low-filter {
        white-space: normal;
        min-height: 40px
    }
    #stockFilterSummary {
        font-size: 12px
    }
    .form-row {
        grid-template-columns: minmax(0,1fr)
    }
    .page-placeholder .btn,
    .page-placeholder .field input,
    .page-placeholder .field select,
    .movement-product-picker input,
    .movement-product-picker select {
        min-height: 44px
    }
    .table-wrap {
        max-width: 100%;
        overscroll-behavior-inline: contain
    }
    .data-table {
        min-width: 640px
    }
}
body {
    letter-spacing: .005em
}
.sidebar {
    padding: 24px 15px
}
.brand {
    padding-bottom: 30px
}
.brand-mark {
    box-shadow: 0 5px 16px rgba(34,211,238,.17)
}
.nav {
    gap: 6px
}
.nav button {
    position: relative;
    min-height: 43px;
    transition: background .16s ease,color .16s ease,transform .16s ease
}
.nav button:hover {
    transform: translateX(2px)
}
.nav button.active {
    font-weight: 700
}
.nav button.active:before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--teal-dark)
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 4;
    background: color-mix(in srgb,var(--surface) 92%,transparent);
    backdrop-filter: blur(14px)
}
.crumb {
    font-size: 12px;
    font-weight: 600
}
.select {
    transition: border-color .15s,box-shadow .15s
}
.select:focus,.field input:focus,.field select:focus {
    outline: none;
    border-color: var(--teal-dark);
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--teal) 25%,transparent)
}
.content {
    max-width: 1440px;
    padding-top: 34px
}
.heading {
    margin-bottom: 25px
}
.heading h1 {
    font-size: 29px;
    letter-spacing: -.9px
}
.heading p {
    font-size: 13px
}
.btn {
    transition: transform .15s,box-shadow .15s,filter .15s
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(34,211,238,.18)
}
.btn:focus-visible,.text-btn:focus-visible,.nav button:focus-visible {
    outline: 3px solid color-mix(in srgb,var(--teal) 55%,white);
    outline-offset: 2px
}
.stat {
    position: relative;
    overflow: hidden;
    transition: transform .18s,box-shadow .18s
}
.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(14,60,62,.09)
}
.stat:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--teal);
    opacity: .4
}
.stat-num {
    color: var(--text);
    font-variant-numeric: tabular-nums
}
.stat-icon {
    background: var(--teal-soft)
}
.panel {
    box-shadow: var(--shadow)
}
.panel-head {
    gap: 10px
}
.panel-head h2 {
    font-size: 14px;
    letter-spacing: -.15px
}
.warehouse {
    transition: border-color .15s,background .15s
}
.warehouse:hover {
    border-color: color-mix(in srgb,var(--teal-dark) 35%,var(--line));
    background: var(--surface2)
}
.data-table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .65px;
    background: var(--surface);
    position: sticky;
    top: 0
}
.data-table tbody tr {
    transition: background .12s
}
.data-table tbody tr:hover {
    background: var(--surface2)
}
.data-table td {
    vertical-align: middle
}
.tag-transfer {
    color: var(--info);
}
.tag-entry,.tag-exit,.tag-transfer {
    white-space: nowrap
}
.chip {
    background: var(--surface);
    color: var(--text)
}
.badge {
    font-weight: 700
}
.notice {
    border: 1px solid color-mix(in srgb,var(--info) 24%,var(--line))
}
dialog {
    animation: dialog-in .18s ease-out
}
@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.99)
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}
.modal {
    padding: 26px
}
.modal h2 {
    letter-spacing: -.35px
}
.field label {
    color: var(--text)
}
@media(max-width:900px) {
    .content {
        padding: 27px 22px
    }
    .heading h1 {
        font-size: 26px
    }
}
@media(max-width:620px) {
    .content {
        padding: 22px 14px 28px
    }
    .topbar {
        padding: 0 14px
    }
    .topbar .subtle {
        display: none
    }
    .heading {
        gap: 14px
    }
    .heading h1 {
        font-size: 24px
    }
    .sidebar {
        padding: 4px 5px calc(4px + env(safe-area-inset-bottom));
        height: calc(62px + env(safe-area-inset-bottom))
    }
    .nav {
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none
    }
    .nav::-webkit-scrollbar {
        display: none
    }
    .nav button {
        flex: 1;
        min-width: 43px;
        width: auto;
        height: 48px;
        padding: 8px
    }
    .nav button.active:before {
        left: 8px;
        right: 8px;
        top: auto;
        bottom: 0;
        width: auto;
        height: 3px;
        border-radius: 4px 4px 0 0
    }
    .cards {
        gap: 9px
    }
    .stat {
        min-height: 112px
    }
    .panel {
        padding: 16px
    }
    .data-table th,.data-table td {
        padding: 10px 8px
    }
    .quick {
        gap: 9px
    }
}
@media(prefers-reduced-motion:reduce) {
    *,*::before,*::after {
        scroll-behavior: auto!important;
        animation-duration: .01ms!important;
        transition-duration: .01ms!important
    }
}
.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    transition: background .15s,border-color .15s,transform .15s
}
.google-button:hover {
    background: var(--surface2);
    border-color: var(--teal-dark);
    transform: translateY(-1px)
}
.google-button > .icon {
    width: 18px;
    height: 18px;
    stroke: none;
}
.google-note {
    border: 1px dashed var(--line);
    padding: 11px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 11px;
    text-align: center
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 10px;
    margin: 18px 0
}
.auth-divider:before,.auth-divider:after {
    content: "";
    height: 1px;
    background: var(--line);
    flex: 1
}
.auth-view {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    background: radial-gradient(ellipse at 50% 0%,rgba(34,211,238,.14),transparent 34rem),var(--bg)
}
:root[data-theme="dark"] .auth-view {
    background: radial-gradient(ellipse at 50% 0%,rgba(34,211,238,.07),transparent 34rem),var(--bg)
}
.auth-card {
    width: min(100%,440px);
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(12,54,56,.12)
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 17px;
    font-weight: 750;
    margin-bottom: 38px
}
.auth-brand .brand-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}
.auth-kicker {
    color: var(--teal-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px
}
.auth-card h1 {
    font-size: 27px;
    letter-spacing: -.7px;
    margin: 7px 0
}
.auth-description {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 22px
}
.auth-card .field {
    margin: 15px 0
}
.auth-card .field input {
    padding: 12px
}
.auth-submit {
    width: 100%;
    margin-top: 16px;
    padding: 12px
}
.auth-switch {
    margin-top: 9px
}
.auth-foot {
    border-top: 1px solid var(--line);
    margin-top: 22px;
    padding-top: 16px;
    color: var(--muted);
    font-size: 11px;
    text-align: center
}
.auth-error {
    background: color-mix(in srgb,var(--error) 10%,var(--surface));
    color: var(--error);
    border: 1px solid color-mix(in srgb,var(--error) 24%,var(--line));
    border-radius: 9px;
    padding: 10px 12px;
    font-size: 12px;
    margin: 14px 0
}
.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px
}
.remember input {
    accent-color: var(--teal-dark)
}
.auth-caption {
    position: absolute;
    bottom: 17px;
    color: var(--muted);
    font-size: 11px
}
.auth-caption span {
    color: var(--teal-dark);
    padding: 0 5px
}
@media(max-width:520px) {
    .auth-card {
        padding: 28px 22px;
        border-radius: 17px
    }
    .auth-brand {
        margin-bottom: 30px
    }
    .auth-card h1 {
        font-size: 24px
    }
    .top-right {
        gap: 6px
    }
    .top-right .text-btn {
        font-size: 11px;
        padding: 5px
    }
    .top-right .select {
        max-width: 140px
    }
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 15px;
    white-space: nowrap
}
.topbar-brand .brand-mark {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
}
.site-admin-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-weight: 650;
    white-space: nowrap;
    transition: background .15s,border-color .15s,color .15s
}
.site-admin-button:hover,.site-admin-button.active {
    background: var(--surface2);
    border-color: color-mix(in srgb,var(--teal-dark) 38%,var(--line));
    color: var(--teal-dark)
}
.site-admin-button span {
    color: var(--teal-dark)
}
.eyebrow {
    color: var(--teal-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    margin-bottom: 6px
}
.site-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 15px
}
.site-admin-card {
    width: 100%;
    min-height: 120px;
    padding: 19px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    color: var(--text);
    transition: transform .16s,border-color .16s,background .16s
}
.site-admin-card[onclick] {
    cursor: pointer
}
.site-admin-card[onclick]:hover {
    transform: translateY(-2px);
    border-color: var(--teal-dark);
    background: var(--surface2)
}
.site-admin-card>span:nth-child(2) {
    display: grid;
    gap: 5px;
    flex: 1
}
.site-admin-card strong {
    font-size: 14px
}
.site-admin-card small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5
}
.site-admin-card>b {
    color: var(--teal-dark);
    font-size: 18px
}
.site-admin-icon {
    height: 40px;
    width: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 19px;
    font-weight: 750
}
.site-admin-info {
    cursor: default
}
.site-subnav {
    display: flex;
    gap: 7px;
    padding: 5px;
    margin-bottom: 23px;
    width: max-content;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface)
}
.site-tab {
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 8px 13px;
    color: var(--muted);
    font-weight: 650;
    white-space: nowrap
}
.site-tab:hover,.site-tab.active {
    background: var(--surface2);
    color: var(--teal-dark)
}
@media(max-width:900px) {
    .topbar-left {
        gap: 12px
    }
    .topbar-brand strong {
        font-size: 14px
    }
    .top-right {
        gap: 8px
    }
    .site-admin-button {
        padding: 8px 10px;
        font-size: 12px
    }
}
@media(max-width:620px) {
    .topbar {
        height: auto;
        min-height: 58px;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 9px 14px
    }
    .topbar-left {
        min-height: 32px
    }
    .topbar-brand {
        font-size: 14px
    }
    .topbar-brand .brand-mark {
        width: 29px;
        height: 29px
    }
    .topbar-left .crumb {
        display: none
    }
    .top-right {
        width: 100%;
        justify-content: space-between;
        gap: 5px
    }
    .site-admin-button {
        padding: 7px 9px;
        font-size: 11px
    }
    .top-right .select {
        max-width: 120px
    }
    .site-admin-grid {
        grid-template-columns: 1fr;
        gap: 10px
    }
    .site-admin-card {
        min-height: 96px;
        padding: 15px
    }
    .site-subnav {
        width: 100%
    }
    .site-tab {
        flex: 1;
        padding: 8px 9px;
        font-size: 12px
    }
}
/* Keep the navigation groups and selectors anchored under the brand at the top. */
.depot-tools {
    margin-top: 0
}
.nav .nav-category-header {
    min-height: 34px;
}
.nav-category-header .nav-category-title {
    display: block;
}
.warehouse-scope {
    border-top: 1px solid var(--line);
    margin-top: 13px;
    padding: 13px 5px 0;
    display: grid;
    gap: 7px
}
.scope-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--muted)
}
.warehouse-scope .select {
    width: 100%;
    min-width: 0
}
.warehouse-scope .select {
    padding: 8px 9px;
    font-size: 12px
}
.section-heading {
    margin: 26px 0 12px;
    font-size: 16px
}
.hane-manage {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 14px
}
.hane-manage-card {
    padding: 17px
}
.hane-manage-card h3 {
    margin: 0 0 5px
}
.hane-card-actions,.invitation-actions {
    display: flex;
    align-items: center;
    gap: 8px
}
.warehouse-section-heading {
    margin: 27px 0 12px
}
.team-heading {
    margin-top: 26px
}
.invite-table-heading {
    margin-top: 22px
}
.danger-text {
    color: var(--error)
}
.invitation-panel {
    margin-bottom: 16px
}
.invitation-list {
    display: grid;
    gap: 10px
}
.invitation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface2)
}
.invitation-row strong,.invitation-row small {
    display: block
}
.invitation-row small {
    color: var(--muted);
    margin-top: 3px
}
.chat-panel {
    padding: 16px
}
.chat-messages {
    height: min(62vh,640px);
    min-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--surface2);
    border: 1px solid var(--line);
    border-radius: 12px
}
.chat-message {
    max-width: min(78%,640px);
    align-self: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px 12px 12px 3px;
    background: var(--surface)
}
.chat-message.own {
    align-self: flex-end;
    border-color: color-mix(in srgb,var(--teal) 35%,var(--line));
    background: var(--teal-soft);
    border-radius: 12px 12px 3px 12px
}
.chat-message-meta {
    display: flex;
    align-items: baseline;
    gap: 12px
}
.chat-message-meta strong {
    color: var(--text);
    font-size: 12px
}
.chat-message-meta time {
    color: var(--muted);
    font-size: 10px
}
.chat-message p {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    white-space: normal
}
.chat-empty {
    margin: auto;
    color: var(--muted)
}
.chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 10px;
    margin-top: 12px
}
.chat-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 44px;
    max-height: 180px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface2);
    color: var(--text)
}
.chat-form textarea:focus {
    outline: none;
    border-color: var(--teal-dark);
    box-shadow: 0 0 0 3px color-mix(in srgb,var(--teal) 25%,transparent)
}
.nav-group.has-active-page>.nav-category-header {
    color: var(--teal-dark);
    background: var(--teal-soft);
}
.nav-group.has-active-page>.nav-category-header .category-chevron {
    opacity: 1;
}
.nav button[data-page].active {
    background: color-mix(in srgb, var(--teal) 17%, var(--surface));
    color: var(--teal-dark);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--teal-dark) 18%, transparent);
}
.chat-page-heading {
    margin-bottom: 16px;
}
.chat-page-heading .select {
    width: min(100%, 240px);
}
.chat-layout {
    display: grid;
    grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
    gap: 0;
    min-height: 540px;
    padding: 0;
    overflow: hidden;
}
.chat-sidebar {
    min-width: 0;
    padding: 17px 12px;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface2) 45%, var(--surface));
}
.chat-conversation-list {
    display: grid;
    gap: 4px;
}
.chat-conversation {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 9px 8px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: var(--body-text);
    text-align: left;
    transition: background .15s, border-color .15s, color .15s;
}
.chat-conversation:hover {
    background: var(--surface);
}
.chat-conversation.active {
    border-color: color-mix(in srgb, var(--teal-dark) 20%, var(--line));
    background: var(--surface);
    color: var(--teal-dark);
    box-shadow: 0 3px 10px rgba(14,60,62,.06);
}
.chat-avatar {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid color-mix(in srgb, var(--teal-dark) 14%, var(--line));
    border-radius: 50%;
    background: var(--avatar-bg);
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 750;
}
.chat-avatar.group-avatar {
    border-radius: 12px;
    background: var(--teal);
    color: var(--button-text);
    font-size: 18px;
}
.chat-conversation-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}
.chat-conversation-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-conversation-copy small {
    color: var(--muted);
    font-size: 10px;
}
.chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0 17px 16px;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 74px;
    border-bottom: 1px solid var(--line);
}
.chat-header>div {
    min-width: 0;
}
.chat-header h2 {
    overflow: hidden;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-header p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}
.chat-member-count {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 20px;
    background: var(--surface2);
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}
.chat-main .chat-messages {
    width: 100%;
    height: min(58vh, 570px);
    min-height: 280px;
    flex: 1;
    margin-top: 13px;
    background: transparent;
    border: 0;
    padding: 8px 2px;
}
.chat-day-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 5px 0;
    color: var(--muted);
    font-size: 10px;
}
.chat-day-divider::before,.chat-day-divider::after {
    height: 1px;
    flex: 1;
    background: var(--line);
    content: "";
}
.chat-day-divider span {
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    white-space: nowrap;
}
.chat-main .chat-message {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    max-width: min(86%, 640px);
    padding: 0;
    border: 0;
    background: transparent;
}
.chat-main .chat-message.own {
    border: 0;
    background: transparent;
}
.message-avatar {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    font-size: 9px;
}
.chat-message-content {
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 13px 13px 13px 4px;
    background: var(--surface);
}
.chat-message.own .chat-message-content {
    border-color: color-mix(in srgb,var(--teal) 35%,var(--line));
    border-radius: 13px 13px 4px 13px;
    background: var(--teal-soft);
}
.chat-main .chat-message-meta {
    justify-content: space-between;
    gap: 15px;
}
.chat-main .chat-message-meta strong {
    font-size: 10px;
}
.chat-main .chat-message-meta time {
    font-size: 9px;
}
.chat-main .chat-message p {
    margin-top: 3px;
    font-size: 12px;
}
.chat-main .chat-form {
    margin-top: 8px;
}
@media(max-width:900px) {
    .chat-layout {
        grid-template-columns: 200px minmax(0,1fr);
    }
}
@media(max-width:620px) {
    .chat-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .chat-sidebar {
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .chat-conversation-list {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 3px;
    }
    .chat-conversation {
        width: auto;
        min-width: 150px;
        max-width: 210px;
        flex: 0 0 auto;
        padding: 7px;
    }
    .chat-main {
        min-height: 440px;
        padding: 0 12px 12px;
    }
    .chat-header {
        min-height: 66px;
    }
    .chat-main .chat-messages {
        height: 48vh;
        min-height: 240px;
    }
    .chat-main .chat-message {
        max-width: 92%;
    }
}
.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0
}
.topbar {
    justify-content: space-between
}
.account-menu-wrap {
    position: relative
}
.account-menu-button {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 11px;
    padding: 5px 10px 5px 6px;
    font-weight: 650;
    max-width: 240px
}
.account-menu-button:hover,.account-menu-button.active {
    background: var(--surface2);
    border-color: var(--teal-dark)
}
.account-menu-button .avatar {
    width: 31px;
    height: 31px;
    flex: 0 0 31px
}
.menu-chevron {
    color: var(--muted);
    width: 12px;
    height: 12px;
    transition: transform .2s ease;
}
.account-menu-button[aria-expanded="true"] .menu-chevron {
    transform: rotate(180deg);
}
.menu-svg {
    width: 16px;
    height: 16px;
}
.account-menu {
    position: absolute;
    z-index: 100;
    right: 49px;
    top: calc(100% + 9px);
    width: 244px;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 45px rgba(0,0,0,0.18);
    animation: menu-pop .15s ease-out;
}
@keyframes menu-pop {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.account-menu-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 11px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
    word-break: break-word;
}
.account-menu-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.menu-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    font-size: 13px;
}
.account-menu-heading strong {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}
.account-menu-heading small {
    font-size: 11.5px;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.account-menu-section {
    padding: 4px 0;
}
.account-menu-label {
    display: block;
    padding: 5px 12px 3px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .09em;
}
.account-menu button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 550;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.account-menu button:hover {
    background: var(--surface2);
    color: var(--teal-dark);
}
.account-menu .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    font-size: 14px;
    opacity: 0.85;
    flex-shrink: 0;
}
.account-menu>button.account-logout {
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 10px;
    border-radius: 0 0 8px 8px;
    color: var(--error);
}
.account-menu>button.account-logout:hover {
    background: color-mix(in srgb, var(--error) 10%, var(--surface));
    color: var(--error);
}
@media(max-width:900px) {
    .warehouse-scope {
        padding: 11px 0 0
    }
    .warehouse-scope .select {
        font-size: 10px;
        padding: 7px 5px
    }
    .site-admin-button,.topbar-brand {
        display: none
    }
}
@media(max-width:900px) {
    .shell {
        grid-template-columns: 220px minmax(0,1fr)
    }
    .sidebar {
        padding: 20px 12px;
        align-items: stretch
    }
    .brand {
        justify-content: flex-start;
        padding: 0 8px 22px
    }
    .brand-name,.nav-label {
        display: inline
    }
    .nav button:not(.nav-category-header) {
        justify-content: flex-start;
        padding: 9px 10px
    }
    .nav-category-header {
        justify-content: space-between;
        padding: 8px 8px 5px
    }
}
@media(max-width:620px) {
    .shell {
        padding-bottom: calc(118px + env(safe-area-inset-bottom))
    }
    .sidebar {
        height: calc(118px + env(safe-area-inset-bottom));
        padding: 5px 7px calc(4px + env(safe-area-inset-bottom))
    }
    .sidebar .brand {
        display: none
    }
    .depot-tools {
        height: 100%;
        margin: 0;
        display: grid;
        grid-template-rows: 1fr 43px
    }
    .depot-tools .section-label,.depot-tools .nav-section-title {
        display: none
    }
    .nav {
        height: auto;
        grid-row: 1;
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 2px;
        overflow-x: auto
    }
    .nav button {
        flex: 1;
        min-width: 43px;
        width: auto;
        height: 48px;
        padding: 8px
    }
    .nav button .nav-label {
        display: none
    }
    .nav button.active:before {
        left: 8px;
        right: 8px;
        top: auto;
        bottom: 0;
        width: auto;
        height: 3px;
        border-radius: 4px 4px 0 0
    }
    .warehouse-scope {
        grid-row: 2;
        display: flex;
        align-items: center;
        gap: 9px;
        border: 0;
        border-top: 1px solid var(--line);
        margin: 0;
        padding: 4px 10px 0
    }
    .scope-label {
        display: block;
        font-size: 8px;
        white-space: nowrap
    }
    .warehouse-scope .select {
        width: auto;
        max-width: 210px;
        font-size: 11px;
        padding: 5px 8px
    }
    .topbar {
        height: auto;
        min-height: 58px;
        align-items: center;
        flex-direction: row;
        padding: 9px 14px
    }
    .topbar-left {
        display: none
    }
    .top-right {
        width: auto;
        justify-content: flex-end
    }
    .account-menu-button {
        max-width: 195px;
        font-size: 12px
    }
    .account-menu {
        right: 0
    }
}
.account-menu-wrap {
    display: flex;
    align-items: center;
    gap: 8px
}
.site-gear {
    height: 41px;
    width: 41px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--teal-dark);
    font-size: 18px;
    transition: background .15s,border-color .15s,transform .15s
}
.site-gear:hover,.site-gear.active {
    background: var(--surface2);
    border-color: var(--teal-dark);
    transform: rotate(12deg)
}
@media(max-width:620px) {
    .shell {
        display: block;
        padding-bottom: 0
    }
    .sidebar {
        position: sticky;
        z-index: 20;
        top: 0;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: 50vh;
        overflow-y: auto;
        padding: 12px 14px;
        border: 0;
        border-bottom: 1px solid var(--line);
        display: flex
    }
    .sidebar .brand {
        display: flex;
        padding: 0 6px 12px
    }
    .depot-tools {
        height: auto;
        margin: 0;
        display: flex
    }
    .nav {
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        overflow: visible
    }
    .nav-group {
        width: 100%;
        flex-direction: column
    }
    .nav .nav-category-header {
        flex: initial;
        width: 100%;
        height: 34px;
        min-width: 0;
        text-align: left
    }
    .nav-category-items {
        width: 100%;
        overflow: visible
    }
    .nav-category-items>button {
        flex: initial;
        width: 100%;
        min-width: 0;
        height: auto;
        justify-content: flex-start;
        padding: 7px 10px
    }
    .nav button .nav-label {
        display: inline
    }
    .nav .ico {
        font-size: initial
    }
    .nav button.active:before {
        left: 0;
        right: auto;
        top: 9px;
        bottom: 9px;
        width: 3px;
        height: auto;
        border-radius: 0 4px 4px 0
    }
    .warehouse-scope {
        grid-row: auto;
        display: grid;
        grid-template-columns: auto minmax(0,1fr);
        align-items: center;
        gap: 7px 10px;
        border-top: 1px solid var(--line);
        margin-top: 9px;
        padding: 10px 5px 0
    }
    .warehouse-scope .select {
        width: 100%;
        max-width: none;
        font-size: 12px;
        padding: 7px 9px
    }
}
.chat-read-receipt {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
    text-align: right;
}
.chat-read-receipt .icon {
    width: 13px;
    height: 13px;
}
.chat-read-receipt.is-read {
    color: var(--teal-dark);
}
.notification-wrap {
    position: relative;
}
.notification-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 41px;
    height: 41px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background .15s,border-color .15s;
}
.notification-button > .icon {
    width: 19px;
    height: 19px;
}
.notification-button:hover,
.notification-button[aria-expanded="true"] {
    background: var(--surface2);
    border-color: var(--teal-dark);
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid var(--surface);
    border-radius: 12px;
    background: var(--error);
    color: #fff;
    font-size: 9px;
    font-weight: 750;
    line-height: 14px;
    text-align: center;
}
.notification-panel {
    position: absolute;
    z-index: 120;
    top: calc(100% + 9px);
    right: 0;
    width: min(370px, calc(100vw - 28px));
    max-height: min(500px, calc(100vh - 90px));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 16px 45px rgba(0,0,0,.18);
}
.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 15px 11px;
    border-bottom: 1px solid var(--line);
}
.notification-panel-header>div {
    display: grid;
    gap: 3px;
}
.notification-panel-header strong {
    color: var(--text);
    font-size: 14px;
}
.notification-panel-header small {
    color: var(--muted);
    font-size: 11px;
}
.notification-mark-all {
    border: 0;
    background: transparent;
    color: var(--teal-dark);
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
}
.notification-mark-all:disabled {
    color: var(--muted);
    cursor: default;
}
.notification-list {
    max-height: min(420px, calc(100vh - 155px));
    overflow-y: auto;
}
.notification-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}
.notification-item:hover,
.notification-item.unread {
    background: var(--surface2);
}
.notification-icon {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--avatar-bg);
    color: var(--teal-dark);
    font-size: 16px;
}
.notification-icon.invite {
    background: color-mix(in srgb, var(--info) 12%, var(--surface));
    color: var(--info);
}
.notification-icon.warning {
    background: color-mix(in srgb, var(--warning) 14%, var(--surface));
    color: var(--warning);
}
.notification-scopes {
    display: flex;
    gap: 8px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
}
.notification-scopes button {
    flex: 1;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--body-text);
    font-weight: 650;
    cursor: pointer;
}
.notification-scopes button[aria-pressed="true"] {
    border-color: var(--teal-dark);
    background: var(--teal-soft);
    color: var(--text);
}
.assignment-options {
    display: grid;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.assignment-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
}
.assignment-warehouses {
    padding-inline-start: 22px;
}
.assignment-options + .assignment-options {
    margin-top: 12px;
}
.hane-role-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 12px;
}
.hane-role-menu .btn[aria-pressed="true"] {
    background: var(--teal-soft);
    border-color: var(--teal-dark);
    color: var(--text);
}
.hane-brand {
    margin: 3px 0;
    overflow-wrap: anywhere;
}
.hane-brand a {
    color: var(--teal-dark);
    text-decoration: underline;
}
.data-table .hane-member-remove {
    text-align: right;
    white-space: nowrap;
}
.warehouse-task-heading {
    margin-top: 16px;
}
.warehouse-task-heading h3 {
    margin: 0;
}
.warehouse-task-list {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}
.warehouse-task {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-wrap: anywhere;
}
.warehouse-task p {
    margin: 4px 0 0;
}
.warehouse-task-note {
    white-space: pre-wrap;
}
.warehouse-task-actions,
.stock-alert-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.stock-alert-focus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.stock-alert-focus p {
    margin: 4px 0 0;
}
.warehouse-alert-marker {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    margin-inline-start: 4px;
    vertical-align: middle;
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 15%, var(--surface));
}
.warehouse-alert-marker.depleted {
    color: var(--error);
    background: color-mix(in srgb, var(--error) 15%, var(--surface));
}
.chat-message-meta {
    flex-wrap: wrap;
}
.chat-nicknames {
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}
.chat-nicknames:empty {
    display: none;
}
.notification-content {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 3px;
}
.notification-content strong {
    font-size: 12px;
}
.notification-content>span {
    color: var(--body-text);
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.notification-content small,
.notification-content time {
    color: var(--muted);
    font-size: 10px;
}
.notification-unread-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--teal-dark);
}
.notification-empty {
    padding: 28px 16px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.warehouse-checkbox-list {
    display: grid;
    gap: 7px;
    max-height: 220px;
    overflow-y: auto;
}
.warehouse-checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    cursor: pointer;
}
.warehouse-checkbox:has(input:checked) {
    border-color: var(--teal-dark);
    background: var(--surface2);
}
.warehouse-checkbox input {
    accent-color: var(--teal-dark);
}
.warehouse-checkbox span {
    display: grid;
    gap: 2px;
}
.warehouse-checkbox strong {
    color: var(--text);
    font-size: 12px;
}
.warehouse-checkbox small {
    color: var(--muted);
    font-size: 10px;
}
.product-warehouse-list {
    display: grid;
    gap: 7px;
    min-width: 180px;
}
.product-warehouse-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.product-warehouse-row strong {
    font-size: 11px;
}
.product-warehouse-row small {
    color: var(--muted);
    font-size: 10px;
    text-align: right;
}
.product-entry-actions {
    white-space: nowrap;
}
.product-entry-actions .text-btn {
    margin-right: 8px;
}
.management-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.profile-details {
    display: grid;
    gap: 0
}
.profile-details>div {
    display: grid;
    grid-template-columns: minmax(100px,.5fr) 1fr;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line)
}
.profile-details>div:last-child {
    border-bottom: 0
}
.profile-details strong {
    font-size: 12px
}
.profile-details span {
    color: var(--muted);
    font-size: 12px
}
@media(max-width:620px) {
    .account-menu-wrap {
        gap: 6px
    }
    .site-gear {
        height: 37px;
        width: 37px;
        font-size: 16px
    }
    .account-menu {
        right: 0
    }
}
@media(max-width:620px) {
    .shell {
        padding-bottom: 0
    }
    .sidebar {
        position: sticky;
        top: 0;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: 50vh;
        overflow-y: auto;
        padding: 12px 14px;
        border: 0;
        border-bottom: 1px solid var(--line);
        display: flex
    }
    .sidebar .brand {
        display: flex;
        padding: 0 6px 12px
    }
    .depot-tools {
        height: auto;
        margin: 0;
        display: flex
    }
    .nav {
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        overflow: visible
    }
    .nav-group {
        width: 100%;
        flex-direction: column
    }
    .nav .nav-category-header {
        flex: initial;
        width: 100%;
        height: 34px;
        min-width: 0;
        text-align: left
    }
    .nav-category-items {
        width: 100%;
        overflow: visible
    }
    .nav-category-items>button {
        flex: initial;
        width: 100%;
        min-width: 0;
        height: auto;
        justify-content: flex-start;
        padding: 7px 10px
    }
    .nav button .nav-label {
        display: inline
    }
    .nav button.active:before {
        left: 0;
        right: auto;
        top: 9px;
        bottom: 9px;
        width: 3px;
        height: auto;
        border-radius: 0 4px 4px 0
    }
    .warehouse-scope {
        grid-row: auto;
        display: grid;
        grid-template-columns: auto minmax(0,1fr);
        align-items: center;
        gap: 7px 10px;
        border-top: 1px solid var(--line);
        margin-top: 9px;
        padding: 10px 5px 0
    }
    .warehouse-scope .select {
        width: 100%;
        max-width: none;
        font-size: 12px;
        padding: 7px 9px
    }
}
.depot-tools {
    flex: 1;
    min-height: 0;
}
.depot-tools .nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.warehouse-scope {
    margin-top: auto;
}
.product-catalog-summary {
    display: grid;
    grid-template-columns: minmax(180px,.6fr) minmax(0,1.4fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.product-summary-total {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 4px 18px 4px 4px;
    border-right: 1px solid var(--line);
}
.product-summary-total span {
    color: var(--muted);
    font-size: 12px;
}
.product-summary-total strong {
    color: var(--text);
    font-size: 28px;
    line-height: 1.15;
}
.product-summary-status {
    display: grid;
    align-content: center;
    gap: 10px;
}
.product-summary-status>div {
    display: grid;
    grid-template-columns: 9px minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
}
.product-summary-status strong {
    color: var(--text);
    font-size: 16px;
}
.summary-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.summary-status-dot.assigned {
    background: var(--teal-dark);
}
.summary-status-dot.pending {
    background: var(--warning);
}
.operations-location-panel {
    margin-top: 16px;
}
.operations-warehouse-list {
    display: grid;
    gap: 9px;
}
.operations-warehouse-row {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}
.operations-warehouse-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.operations-warehouse-heading>div,
.operations-location-row>div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}
.operations-warehouse-row small,
.operations-location-row small {
    color: var(--muted);
    font-size: 11px;
}
.operations-location-list {
    display: grid;
    border-top: 1px solid var(--line);
}
.operations-location-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
}
.operations-location-row+.operations-location-row {
    border-top: 1px solid var(--line);
}
.operations-location-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
@media(max-width:620px) {
    .depot-tools,
    .depot-tools .nav {
        flex: none;
    }
    .depot-tools .nav {
        overflow: visible;
    }
    .warehouse-scope {
        margin-top: 9px;
    }
    .invitation-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .invitation-actions {
        flex-wrap: wrap;
    }
    .product-catalog-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .product-summary-total {
        padding: 0 0 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .operations-warehouse-heading {
        flex-direction: column;
        align-items: stretch;
    }
    .operations-warehouse-heading .btn {
        width: 100%;
    }
    .operations-location-row {
        align-items: flex-start;
    }
}
.stat-icon svg,
.wh-icon svg,
.activity-icon svg,
.user-settings-icon svg {
    width: 19px;
    height: 19px;
}
.wh-icon svg {
    width: 21px;
    height: 21px;
}
.activity-icon.entry {
    color: var(--success);
    background: color-mix(in srgb,var(--success) 12%,var(--surface));
}
.activity-icon.exit {
    color: var(--error);
    background: color-mix(in srgb,var(--error) 10%,var(--surface));
}
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 18px 20px;
}
.user-profile-avatar {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    font-size: 17px;
}
.user-profile-identity {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.user-profile-identity h2 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 17px;
}
.user-profile-identity>span {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.user-settings-panel {
    margin-bottom: 16px;
}
.user-settings-panel:last-child {
    margin-bottom: 0;
}
.user-settings-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.user-settings-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--teal-soft);
    color: var(--teal-dark);
}
.user-settings-section-heading h2 {
    margin: 0;
    font-size: 16px;
}
.user-settings-section-heading p {
    margin: 3px 0 0;
    font-size: 12px;
}
.profile-details {
    margin-top: 2px;
}
.security-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.security-action>div {
    display: grid;
    gap: 3px;
}
.security-action strong {
    color: var(--text);
    font-size: 12px;
}
.security-action small {
    color: var(--muted);
    font-size: 11px;
}
.user-settings-note {
    margin-top: 14px;
}
@media(max-width:620px) {
    .user-profile-card {
        gap: 10px;
        padding: 14px;
    }
    .user-profile-avatar {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
    .user-profile-identity h2 {
        font-size: 15px;
    }
    .user-profile-card>.badge {
        padding: 4px 7px;
        font-size: 10px;
    }
    .security-action {
        align-items: stretch;
        flex-direction: column;
    }
}

.error-panel {
    display: grid;
    justify-items: start;
    gap: 12px;
}
.error-panel h1,
.error-panel h2,
.error-panel p {
    margin: 0;
}
.error-panel-icon {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 24px;
}
.error-home-link {
    display: inline-block;
    text-decoration: none;
}
.error-panel-reference,
.error-panel-reference code {
    overflow-wrap: anywhere;
}

.inventory-heading {
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}
.inventory-download {
    text-decoration: none;
}
.operations-location-panel > summary {
    cursor: pointer;
    font-weight: 700;
}
.operations-location-panel[open] > summary {
    margin-bottom: 16px;
}
.stock-count-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 16px;
}
.stock-count-summary > div {
    padding: 10px 12px;
    background: var(--surface2);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.stock-count-summary dt {
    color: var(--muted);
    font-size: .85em;
}
.stock-count-summary dd {
    margin: 4px 0 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.report-panel {
    min-width: 0;
}
.report-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}
.report-filters .field {
    margin: 0;
    min-width: 0;
    color: var(--muted);
}
.report-filter-actions,
.report-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.report-pagination {
    justify-content: flex-end;
    margin-top: 14px;
}


#countReason {
    width: 100%;
    resize: vertical;
    min-height: 64px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
}


.mobile-nav-toggle {
    display: none;
}
@media (max-width: 620px) {
    .sidebar-brand-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .sidebar-brand-row > .brand {
        width: auto;
        padding: 0;
    }
    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .sidebar:not(.mobile-nav-open) > .depot-tools {
        display: none;
    }
    .sidebar.mobile-nav-open > .depot-tools {
        margin-top: 10px;
    }
}

#goodsReceipt,
.receipt-heading {
    max-width: 1200px;
}

.receipt-panel {
    min-width: 0;
    margin-bottom: 16px;
    padding: clamp(16px, 2.4vw, 28px);
}

.receipt-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.receipt-section-heading h2 {
    margin: 0;
    font-size: 17px;
}

.receipt-section-heading p {
    margin: 3px 0 0;
    color: var(--muted);
}

.receipt-section-icon {
    display: grid;
    flex: 0 0 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    background: var(--teal-soft);
    color: var(--teal-dark);
    font-size: 18px;
}

.receipt-source-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 12px;
}

.receipt-upload,
.receipt-source-options {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: color-mix(in srgb, var(--surface2) 35%, var(--surface));
}

.receipt-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: start;
}

.receipt-upload-picker {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 9px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 9px;
    background: var(--surface);
    cursor: pointer;
}

.receipt-upload-picker:focus-within {
    outline: 2px solid var(--teal-dark);
    outline-offset: 2px;
}

.receipt-upload-button {
    color: var(--teal-dark);
    font-weight: 700;
}

.receipt-file-name {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.receipt-source-options .receipt-actions {
    margin-top: 7px;
}

.receipt-source-options .text-btn {
    text-decoration: none;
}

.receipt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
    align-items: start;
    gap: 0 16px;
}

.receipt-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px 12px;
}

#receiptMapping,
#receiptDetails:not(:empty) {
    margin-top: 16px;
}

#receiptMapping {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

#receiptForm {
    scroll-margin-top: 86px;
}

.receipt-paste summary {
    cursor: pointer;
    font-weight: 650;
}

#receiptAddCategory {
    justify-self: start;
}

.receipt-summary {
    margin: 12px 0;
    padding: 9px 11px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface2) 56%, var(--surface));
    font-weight: 600;
}

.receipt-count-tools {
    border-top: 1px solid var(--line);
}

.receipt-count-actions {
    margin-top: 3px;
}

.receipt-scan-status:empty {
    display: none;
}

.receipt-table td:first-child {
    min-width: 190px;
}

.receipt-table input,
.receipt-table select,
#receiptPaste {
    width: 100%;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface2);
    color: var(--text);
    font: inherit;
    outline-color: var(--teal);
}

.receipt-table input[data-field="counted"] {
    min-width: 68px;
}

.receipt-unit-control {
    display: grid;
    justify-items: start;
    gap: 5px;
}

.receipt-table .receipt-unit-select,
.receipt-table .receipt-unit-custom,
.field .receipt-unit-select,
.field .receipt-unit-custom {
    width: min(8.5rem, 100%);
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--surface2) 48%, var(--surface));
}

.receipt-unit-value {
    display: inline-block;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 2px 7px;
    background: color-mix(in srgb, var(--surface2) 35%, var(--surface));
}

.receipt-unit-warning {
    display: block;
    margin-top: 4px;
    color: var(--warning);
}

.receipt-table td[data-difference] {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.receipt-table td[data-level="shortage"] {
    color: var(--error);
}

.receipt-table td[data-level="surplus"] {
    color: var(--success);
}

.receipt-table td:last-child {
    min-width: 160px;
}

.receipt-table .badge {
    display: inline-block;
    margin-inline-start: 4px;
}

.receipt-history-table {
    max-height: 62vh;
    overflow: auto;
}

#receiptSaveError {
    margin-block: 12px;
}

.receipt-form-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.receipt-form-footer .report-pagination {
    margin: 0;
}

@media (max-width: 620px) {
    .receipt-source-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .receipt-upload {
        flex-wrap: wrap;
    }

    .receipt-upload-picker {
        min-width: min(100%, 160px);
    }

    .receipt-table .receipt-unit-select,
    .receipt-table .receipt-unit-custom,
    .field .receipt-unit-select,
    .field .receipt-unit-custom {
        min-height: 44px;
    }

    .receipt-form-footer > .btn {
        width: 100%;
    }

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

    .receipt-grid .field:has(#receiptReference, #receiptScan) {
        grid-column: 1 / -1;
    }

    .receipt-recent-table,
    .receipt-table .data-table {
        min-width: 0;
    }

    .receipt-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        clip-path: inset(50%);
    }

    .receipt-table tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .receipt-table .data-table td {
        min-width: 0;
        padding: 0;
        border: 0;
        overflow-wrap: anywhere;
    }

    .receipt-table td:first-child,
    .receipt-table td:nth-child(2),
    .receipt-table td:last-child {
        grid-column: 1 / -1;
    }

    .receipt-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        margin-bottom: 4px;
    }
}

.product-workspace-heading {
    gap: 16px;
}

.product-workspace-heading .product-entry-controls {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.catalog-view-switch {
    display: inline-flex;
    align-self: end;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.catalog-view-switch button {
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    padding: 5px 11px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.catalog-view-switch button[aria-pressed="true"] {
    background: var(--teal-soft);
    color: var(--teal-dark);
}

.catalog-view-switch button span {
    margin-inline-start: 3px;
    font-variant-numeric: tabular-nums;
}

.product-catalog[data-view="archived"] .product-active-only {
    display: none;
}

.product-photo-compact {
    height: 76px;
}

.product-photo-compact .product-photo-placeholder {
    font-size: 24px;
}

.product-archive-date {
    align-self: start;
    margin: 0;
    padding: 4px 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--warning) 12%, var(--surface));
    color: var(--warning);
    font-size: 12px;
}

.product-card-options {
    margin-top: -3px;
}

.product-card-options summary {
    width: fit-content;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.product-card-menu {
    display: grid;
    justify-items: start;
    gap: 5px;
    margin-top: 7px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface2) 35%, var(--surface));
}

.product-card-menu .text-btn {
    text-align: start;
}

.product-card-menu small {
    padding: 3px 6px;
}

.stock-view-panel {
    margin-bottom: 16px;
    min-width: 0;
}

.stock-view-panel .table-wrap {
    margin: 0 12px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.stock-view-panel .data-table th {
    background: color-mix(in srgb, var(--surface2) 55%, var(--surface));
}

.stock-view-panel .data-table tbody tr:last-child td {
    border-bottom: 0;
}

.inventory-overview-cards .stat-num,
.stock-view-panel .data-table strong {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
    .catalog-view-switch {
        align-self: stretch;
    }

    .catalog-view-switch button {
        flex: 1;
        min-height: 44px;
    }

    .product-card-options summary {
        padding-block: 6px;
    }
}
