:root {
    color-scheme: light;

    /* HAS BossOne brand palette sampled from logo.jpg. */
    --brand-primary: #0090d0;
    --brand-primary-hover: #007bb3;
    --brand-primary-active: #00699a;
    --brand-primary-soft: #e6f6fc;
    --brand-primary-ring: rgba(0, 144, 208, .18);
    --brand-ink: #17445d;
    --brand-accent: #1080c0;

    /* Theme aliases: future themes should remap these values, not component CSS. */
    --theme-primary: var(--brand-primary);
    --theme-primary-hover: var(--brand-primary-hover);
    --theme-primary-active: var(--brand-primary-active);
    --theme-primary-soft: var(--brand-primary-soft);
    --theme-primary-ring: var(--brand-primary-ring);
    --theme-accent: var(--brand-accent);

    --bg: #f6f8fb;
    --panel: #ffffff;
    --text: #18202f;
    --muted: #667085;
    --line: #d9e0ea;
    --primary: var(--theme-primary);
    --primary-dark: var(--theme-primary-hover);
    --primary-active: var(--theme-primary-active);
    --accent: var(--theme-accent);
    --soft: var(--theme-primary-soft);
    --danger: #b42318;
    --shadow: 0 16px 40px rgba(24, 32, 47, .08);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.login-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 9% 12%, rgba(255, 255, 255, .95) 0 1px, transparent 2px),
        radial-gradient(circle at 14% 26%, rgba(255, 255, 255, .55) 0 1px, transparent 2px),
        radial-gradient(circle at 21% 22%, rgba(255, 255, 255, .7) 0 1px, transparent 2px),
        radial-gradient(circle at 35% 10%, rgba(255, 255, 255, .85) 0 1px, transparent 2px),
        radial-gradient(circle at 41% 20%, rgba(255, 255, 255, .58) 0 1px, transparent 2px),
        radial-gradient(circle at 48% 27%, rgba(255, 255, 255, .65) 0 1px, transparent 2px),
        radial-gradient(circle at 62% 15%, rgba(255, 255, 255, .95) 0 1px, transparent 2px),
        radial-gradient(circle at 70% 7%, rgba(255, 255, 255, .62) 0 1px, transparent 2px),
        radial-gradient(circle at 77% 24%, rgba(255, 255, 255, .72) 0 1px, transparent 2px),
        radial-gradient(circle at 91% 11%, rgba(255, 255, 255, .88) 0 1px, transparent 2px),
        radial-gradient(circle at 96% 29%, rgba(255, 255, 255, .58) 0 1px, transparent 2px),
        linear-gradient(to bottom, #02050b 0%, #050914 34%, #013b5f 69%, var(--brand-primary) 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}
.login-shell::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: 46vh;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .9) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, .62) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, .78) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, .5) 0 1px, transparent 2px);
    background-size: 150px 110px, 230px 170px, 320px 210px, 410px 260px;
    background-position: 24px 14px, 90px 42px, 36px 82px, 180px 20px;
    opacity: .95;
}
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}
.login-card {
    width: min(100%, 440px);
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    padding: 28px;
    backdrop-filter: none;
}
.login-language-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}
.login-brand {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}
.login-brand h1 { margin: 0 0 6px; font-size: 28px; color: #f6fbff; }
.login-brand p { margin: 0; color: #b8d7e8; line-height: 1.45; }
.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}
.login-logo {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: contain;
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: 0 12px 32px rgba(0, 6, 14, .34);
}.login-form { display: grid; gap: 12px; }
.password-fields,
.otp-fields {
    display: grid;
    gap: 12px;
}
.login-method-label {
    color: #eaf7ff;
    font-weight: 400;
    margin-bottom: -4px;
}
.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 5px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(148, 224, 255, .18);
    border-radius: 8px;
}
.segmented label {
    display: grid;
    place-items: center;
    min-height: 40px;
    border-radius: 6px;
    color: #b8d7e8;
    cursor: pointer;
}
.segmented label.active { background: rgba(0, 144, 208, .82); color: #fff; box-shadow: 0 10px 24px rgba(0, 144, 208, .28); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.field-label {
    display: block;
    color: #eaf7ff;
    font-weight: 400;
    margin: 0;
}
.text-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    outline: none;
    background: #fff;
    color: var(--text);
}
.text-input::placeholder { color: #98a2b3; }
.text-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--theme-primary-ring); }
.login-shell .text-input {
    border-color: rgba(148, 224, 255, .28);
    background: rgba(2, 16, 28, .58);
    color: #f6fbff;
}
.login-shell .text-input::placeholder { color: rgba(232, 247, 255, .56); }
.login-shell .text-input:focus { border-color: #65d8ff; box-shadow: 0 0 0 3px rgba(101, 216, 255, .18); }
.field-error, .validation-summary { color: var(--danger); font-size: 14px; }
.hidden { display: none !important; }
.notice, .dev-otp {
    padding: 10px 12px;
    border-radius: 7px;
    background: rgba(0, 144, 208, .14);
    color: #dff7ff;
    border: 1px solid rgba(148, 224, 255, .22);
}
.dev-otp { border-style: dashed; }
.check-line { display: flex; align-items: center; gap: 8px; color: #b8d7e8; }
.check-line input { accent-color: var(--brand-primary); }
.primary-button {
    min-height: 46px;
    border: 1px solid rgba(148, 224, 255, .28);
    border-radius: 7px;
    background: linear-gradient(135deg, #00a7dc, #007bb3);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(0, 144, 208, .24);
}
.primary-button:hover { background: linear-gradient(135deg, #16c2f5, #008fca); }
.primary-button.compact { min-height: 40px; padding: 0 14px; }
.primary-link { color: #65d8ff; font-weight: 700; }
.forgot-link,
.secondary-link {
    color: #65d8ff;
    font-weight: 400;
    justify-self: start;
    margin: 0 0 4px;
}
.secondary-link { justify-self: center; }
.login-hint { margin: 4px 0 0; color: #b8d7e8; font-size: 14px; line-height: 1.45; }
.login-copyright { margin: 4px 0 0; color: #b8d7e8; font-size: 13px; line-height: 1.45; text-align: center; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--brand-ink);
    color: #f9fafb;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand small { display: block; color: #9ca3af; margin-top: 2px; }
.nav-list { display: grid; gap: 6px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 7px;
    color: #d1d5db;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255,255,255,.1);
    font-size: 13px;
    font-weight: 800;
}
.main-panel { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    min-height: 68px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
}
.topbar-title span { color: var(--muted); margin-left: 8px; }
.topbar form { display: flex; align-items: center; gap: 10px; }
.user-name { color: var(--text) !important; font-weight: 650; }
.icon-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}
.account-menu {
    position: relative;
}
.account-menu summary {
    list-style: none;
}
.account-menu summary::-webkit-details-marker {
    display: none;
}
.account-trigger {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(24, 32, 47, .06);
}
.user-avatar {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-ink));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 auto;
}
.user-avatar.large {
    width: 40px;
    height: 40px;
}
.account-trigger-text {
    display: grid;
    line-height: 1.15;
    min-width: 0;
}
.account-trigger-text strong,
.account-dropdown-head strong {
    color: var(--text);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-trigger-text small,
.account-dropdown-head small {
    color: var(--muted);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    z-index: 20;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(24, 32, 47, .16);
}
.account-menu[open] .account-dropdown {
    display: grid;
    gap: 4px;
}
.account-dropdown-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}
.account-dropdown-head span:last-child {
    display: grid;
    min-width: 0;
}
.account-dropdown-item {
    min-height: 38px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    text-align: left;
}
.account-dropdown-item:hover {
    background: var(--soft);
    color: var(--brand-ink);
}
.account-dropdown-item.logout {
    color: var(--danger);
}
.account-dropdown-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 auto;
}
.content-wrap { padding: 24px; }
.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}
.toolbar-row h1 { margin: 0 0 6px; font-size: 26px; }
.toolbar-row p { margin: 0; color: var(--muted); }
.branch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.branch-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(24, 32, 47, .04);
}
.card-head { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 99px; background: #98a2b3; }
.status-dot.on { background: #12b76a; }
.status-dot.off { background: #f04438; }
.branch-card h2 { margin: 12px 0 16px; font-size: 20px; }
.operation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.operation-card,
.data-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(24, 32, 47, .04);
}
.operation-card h2 {
    margin: 12px 0 14px;
    font-size: 19px;
}
.compact-card h2 { font-size: 17px; }
.order-workspace {
    display: grid;
    gap: 14px;
}
.dashboard-page {
    display: grid;
    gap: 16px;
}
.dashboard-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 32, 47, .04);
}
.dashboard-filters label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.dashboard-filters input,
.dashboard-filters select {
    min-height: 38px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    padding: 7px 9px;
}
.dashboard-filters button {
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.metric-card {
    min-height: 100px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 32, 47, .04);
}
.metric-card span {
    color: var(--muted);
    font-weight: 700;
}
.metric-card strong {
    color: var(--brand-ink);
    font-size: 24px;
    line-height: 1.1;
}
.metric-primary { border-top: 3px solid var(--primary); }
.metric-info { border-top: 3px solid #0ba5ec; }
.metric-success { border-top: 3px solid #12b76a; }
.metric-warning { border-top: 3px solid #f79009; }
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.dashboard-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(24, 32, 47, .04);
}
.dashboard-panel-wide {
    grid-column: 1 / -1;
}
.panel-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.panel-heading h2 {
    margin: 0;
    font-size: 18px;
}
.panel-heading span {
    color: var(--muted);
    font-size: 13px;
}
.trend-chart {
    min-height: 240px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(34px, 1fr);
    gap: 8px;
    align-items: end;
    overflow-x: auto;
    padding-top: 24px;
}
.trend-column {
    min-width: 34px;
    height: 210px;
    display: grid;
    grid-template-rows: 20px 1fr 18px;
    align-items: end;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}
.trend-column i {
    display: block;
    width: 100%;
    min-height: 8px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #18b7e8, var(--primary));
}
.trend-value {
    opacity: 0;
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}
.trend-column:hover .trend-value {
    opacity: 1;
}
.bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}
.bar-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}
.bar-row b {
    color: var(--brand-ink);
}
.bar-row i {
    grid-column: 1 / -1;
    height: 8px;
    border-radius: 999px;
    background: #edf2f7;
    overflow: hidden;
}
.bar-row em {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}
.dashboard-table th,
.dashboard-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
}
.dashboard-table th {
    color: var(--muted);
    font-size: 13px;
}
.dashboard-table td:last-child,
.dashboard-table th:last-child {
    text-align: right;
}
.order-context {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}
.context-tile {
    min-width: 150px;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.context-tile.active {
    border-color: rgba(0, 144, 208, .28);
    background: var(--soft);
    color: var(--brand-ink);
}
.context-tile span { color: var(--muted); }
.order-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: start;
}
.order-side,
.order-products,
.order-cart {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(24, 32, 47, .04);
}
.order-side h2,
.order-cart h2 {
    margin: 0 0 12px;
    font-size: 18px;
}
.table-map,
.side-list {
    display: grid;
    gap: 8px;
}
.table-chip,
.side-list span {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    padding: 8px 10px;
    color: var(--text);
    text-align: left;
}
.table-chip.active {
    border-color: var(--primary);
    background: var(--soft);
    color: var(--brand-ink);
    font-weight: 750;
}
.side-list.staff { margin-top: 12px; }
.category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 12px;
}
.category-strip span {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--brand-ink);
    font-weight: 700;
}
.product-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.product-pick-card {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.product-pick-grid.selectable .product-pick-card {
    cursor: pointer;
}
.product-pick-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.product-pick-card:has(input:checked),
.product-pick-card.selected {
    border-color: rgba(0, 144, 208, .45);
    background: var(--soft);
    box-shadow: inset 0 0 0 1px rgba(0, 144, 208, .16);
}
.product-pick-card span { color: var(--muted); font-size: 13px; }
.product-pick-card em { color: var(--primary); font-style: normal; font-weight: 800; }
.product-pick-card button,
.order-submit {
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
}
.order-submit {
    width: 100%;
    margin-top: 12px;
}
.cart-empty {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
}
.cart-empty strong { color: var(--text); }
.order-cart h3 {
    margin: 16px 0 8px;
    font-size: 15px;
}
.recent-orders {
    display: grid;
    gap: 6px;
}
.recent-orders span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
    border-radius: 7px;
    background: #f8fbfd;
}
.recent-orders small {
    color: var(--muted);
    grid-column: 1;
}
.recent-orders em {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-style: normal;
    font-weight: 800;
    color: var(--primary);
}
dl { display: grid; gap: 10px; margin: 0; }
dl div { display: grid; gap: 2px; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; }
.empty-state {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}
.empty-state h2 { margin-top: 0; }

@media (max-width: 780px) {
    .app-shell { display: block; }
    .sidebar { position: sticky; top: 0; z-index: 5; padding: 12px; gap: 12px; }
    .brand small { display: none; }
    .nav-list { display: flex; overflow-x: auto; padding-bottom: 4px; }
    .nav-link { flex: 0 0 auto; }
    .topbar { align-items: flex-start; padding: 14px; }
    .topbar-title span { display: block; margin-left: 0; margin-top: 4px; }
    .content-wrap { padding: 14px; }
    .toolbar-row { align-items: stretch; flex-direction: column; }
    .login-card { padding: 20px; }
}
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
}
.secondary-button,
.danger-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-weight: 700;
    padding: 0 12px;
    cursor: pointer;
}
.secondary-button:hover { border-color: var(--primary); color: var(--primary); }
.danger-button { color: var(--danger); }
.danger-button:hover:not(:disabled) { background: #fff1f0; border-color: #fda29b; }
.danger-button:disabled { opacity: .45; cursor: not-allowed; }
.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: #fff;
}
.alert.success { background: var(--theme-primary-soft); border-color: rgba(0, 144, 208, .22); color: var(--brand-ink); }
.alert.danger { background: #fff1f0; border-color: #fda29b; color: var(--danger); }
.status-label {
    margin-left: auto;
    font-size: 18px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 8px;
}
.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}
.card-actions form { margin: 0; }
.form-panel {
    max-width: 860px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(24, 32, 47, .04);
}
.entity-form { display: grid; gap: 18px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-field {
    display: grid;
    gap: 7px;
    font-weight: 650;
    color: #344054;
}
.form-field.wide { grid-column: 1 / -1; }
.form-check { margin-top: 2px; }
.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}
.account-panel h2 {
    margin-top: 0;
}
.user-list-panel {
    margin-top: 18px;
}
.temporary-password-box {
    max-width: 860px;
}
.temporary-password-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 14px;
    margin: 12px 0;
}
.temporary-password-grid code {
    font-size: 16px;
    font-weight: 800;
}
.table-wrap {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}
.data-table th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}
.table-actions {
    text-align: right !important;
}
.table-actions form {
    margin: 0;
}
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    background: #eef2f6;
    color: var(--muted);
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 700;
}
.badge.success {
    background: #ecfdf3;
    color: #027a48;
}
.badge.warning {
    background: #fffaeb;
    color: #b54708;
}
.badge.danger {
    background: #fff1f0;
    color: var(--danger);
}

@media (max-width: 780px) {
    .card-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }
    .card-actions > *,
    .card-actions button,
    .form-actions > *,
    .form-actions button {
        width: 100%;
    }
    .form-grid { grid-template-columns: 1fr; }
    .form-panel { padding: 16px; }
    .account-trigger-text { display: none; }
    .account-dropdown { right: 0; width: min(86vw, 260px); }
    .order-layout { grid-template-columns: 1fr; }
    .order-side,
    .order-products,
    .order-cart { padding: 12px; }
    .product-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-pick-card { padding: 10px; }
}
 .public-language {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 4px;
    border: 1px solid rgba(148, 224, 255, .22);
    border-radius: 999px;
    background: rgba(3, 18, 31, .5);
    box-shadow: 0 10px 24px rgba(0, 5, 12, .22);
    backdrop-filter: blur(10px);
}
.language-option {
    min-height: 34px;
    width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--muted);
    padding: 4px;
    font-size: 18px;
    font-weight: 750;
    transition: background .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.language-option.active {
    background: rgba(0, 144, 208, .34);
    box-shadow: inset 0 0 0 1px rgba(148, 224, 255, .24);
}
.language-flag {
    width: 30px;
    height: 22px;
    display: block;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(24, 32, 47, .12);
    filter: saturate(.72);
    opacity: .62;
}
.language-option.active .language-flag {
    filter: saturate(1.08);
    opacity: 1;
}
.language-option:hover .language-flag {
    opacity: 1;
}@media (max-width: 780px) {
    .public-language { top: 10px; right: 10px; }
    .topbar-actions { width: 100%; justify-content: space-between; }
    .language-option { padding: 4px; }
}
.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;
}
/* Hierarchical application menu */
.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.sidebar-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 7px;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}
.sidebar-toggle.mobile {
    display: none;
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}
.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.menu-group {
    border-radius: 8px;
}
.menu-group-title {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: #e5e7eb;
    cursor: pointer;
    padding: 7px 8px;
    border-radius: 8px;
    font-weight: 750;
    list-style: none;
}
.menu-group-title::-webkit-details-marker { display: none; }
.menu-group-title::after {
    content: '›';
    margin-left: auto;
    transform: rotate(90deg);
    transition: transform .18s ease;
}
.menu-group:not([open]) .menu-group-title::after { transform: rotate(0deg); }
.menu-group-items {
    display: grid;
    gap: 4px;
    padding: 2px 0 8px 12px;
}
.menu-icon-img {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    object-fit: contain;
    border-radius: 4px;
}
.nav-link {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 13px;
}
.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.topbar-title > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.current-branch-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 220px;
    min-width: 0;
    color: var(--brand-ink);
    font-size: 15px;
    font-weight: 750;
}
.topbar-title .current-branch-pill,
.topbar-title .current-branch-pill span {
    margin-left: 0;
    margin-top: 0;
    color: var(--brand-ink);
}
.current-branch-pill img,
.current-branch-logo {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    color: var(--primary);
    font-size: 10px;
    font-weight: 850;
    box-shadow: none;
}
.current-branch-pill > span:last-child {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}
.page-title-with-tip {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    cursor: help;
    white-space: nowrap;
}
.page-title-text {
    color: var(--brand-primary) !important;
    white-space: nowrap;
}
.shortcut-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.shortcut-bar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(24, 32, 47, .06);
    min-width: 0;
}
.shortcut-next-indicator {
    display: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.shortcut-scroll {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}
.shortcut-scroll::-webkit-scrollbar { height: 4px; }
.shortcut-scroll::-webkit-scrollbar-thumb { background: #b8d7e8; border-radius: 999px; }
.shortcut-icon-shell {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    scroll-snap-align: start;
}
.shortcut-icon-link {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--brand-ink);
    background: transparent;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.shortcut-icon-link:hover,
.shortcut-icon-link.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 8px 18px rgba(0, 144, 208, .22);
}
.shortcut-icon-link svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}
.shortcut-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 17px;
    height: 17px;
    display: none;
    place-items: center;
    border: 1px solid #fff;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.shortcut-icon-shell:hover .shortcut-remove {
    display: grid;
}
.shortcut-manager {
    position: relative;
    flex: 0 0 auto;
}
.shortcut-manager summary {
    list-style: none;
}
.shortcut-manager summary::-webkit-details-marker {
    display: none;
}
.shortcut-manage-button {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: var(--soft);
    color: var(--brand-ink);
    cursor: pointer;
}
.shortcut-manage-button:hover,
.shortcut-manager[open] .shortcut-manage-button {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.shortcut-manage-button svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}
.shortcut-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(420px, 88vw);
    display: none;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(24, 32, 47, .16);
}
.shortcut-manager[open] .shortcut-panel {
    display: grid;
}
.shortcut-search {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 10px;
    outline: none;
}
.shortcut-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--theme-primary-ring);
}
.shortcut-menu-list {
    display: grid;
    gap: 6px;
    max-height: min(54vh, 440px);
    overflow-y: auto;
}
.shortcut-menu-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 6px;
    border-radius: 7px;
}
.shortcut-menu-row:hover {
    background: var(--soft);
}
.shortcut-row-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--brand-ink);
    background: #eef7fb;
}
.shortcut-row-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.shortcut-row-text {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}
.shortcut-row-text strong,
.shortcut-row-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shortcut-row-text small {
    color: var(--muted);
}
.shortcut-row-button {
    min-height: 32px;
    border: 1px solid var(--primary);
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    padding: 0 10px;
}
.shortcut-row-button.remove {
    border-color: var(--line);
    background: #fff;
    color: var(--danger);
}
.language-switcher.compact {
    background: #f8fbfd;
    border-color: var(--line);
    box-shadow: none;
    backdrop-filter: none;
}
.account-language-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
    color: var(--muted);
    font-weight: 650;
}
.account-shortcut-manager {
    position: relative;
}
.account-branch-manager {
    position: relative;
}
.account-shortcut-manager summary {
    list-style: none;
}
.account-branch-manager summary {
    list-style: none;
}
.account-shortcut-manager summary::-webkit-details-marker {
    display: none;
}
.account-branch-manager summary::-webkit-details-marker {
    display: none;
}
.account-shortcut-trigger::after {
    content: '›';
    margin-left: auto;
    color: var(--muted);
    font-size: 18px;
}
.account-branch-trigger::after {
    content: '›';
    margin-left: auto;
    color: var(--muted);
    font-size: 18px;
}
.account-shortcut-manager[open] .account-shortcut-trigger {
    background: var(--soft);
    color: var(--brand-ink);
}
.account-branch-manager[open] .account-branch-trigger {
    background: var(--soft);
    color: var(--brand-ink);
}
.account-shortcut-manager[open] .account-shortcut-trigger::after {
    transform: rotate(90deg);
}
.account-branch-manager[open] .account-branch-trigger::after {
    transform: rotate(90deg);
}
.account-branch-panel {
    display: none;
    gap: 6px;
    padding: 8px;
    margin: 0 0 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.account-branch-manager[open] .account-branch-panel {
    display: grid;
}
.branch-choice {
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    padding: 6px 8px;
    text-align: left;
}
.branch-choice:hover,
.branch-choice.active {
    border-color: rgba(0, 144, 208, .28);
    background: var(--soft);
    color: var(--brand-ink);
}
.branch-choice:disabled {
    cursor: default;
}
.branch-choice img,
.branch-choice > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: #fff;
    object-fit: contain;
    color: var(--primary);
    font-size: 10px;
    font-weight: 850;
    box-shadow: 0 0 0 1px var(--line);
}
.branch-choice strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-shortcut-panel {
    position: static;
    width: 100%;
    display: none;
    padding: 8px;
    margin: 0 0 4px;
    border-radius: 8px;
    box-shadow: none;
}
.account-shortcut-manager[open] .account-shortcut-panel {
    display: grid;
}
.account-shortcut-panel .shortcut-menu-list {
    max-height: min(48vh, 360px);
}
.notification-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-ink);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(24, 32, 47, .06);
}
.notification-button:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.notification-button svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}
.notification-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #f04438;
}
.menu-backdrop {
    display: none;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, .38);
}

body.menu-collapsed.app-shell {
    grid-template-columns: 76px 1fr;
}
body.menu-collapsed .sidebar {
    padding: 14px 10px;
}
body.menu-collapsed .brand-text,
body.menu-collapsed .brand-logo,
body.menu-collapsed .menu-group-title span,
body.menu-collapsed .nav-link span {
    display: none;
}
body.menu-collapsed .menu-group-title,
body.menu-collapsed .nav-link {
    justify-content: center;
    padding-left: 7px;
    padding-right: 7px;
}
body.menu-collapsed .menu-group-title::after { display: none; }
body.menu-collapsed .menu-group-items { padding-left: 0; }

@media (max-width: 780px) {
    .dashboard-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-filters button {
        grid-column: 1 / -1;
    }
    .dashboard-metrics,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .metric-card {
        min-height: 82px;
    }
    .metric-card strong {
        font-size: 20px;
    }
    .panel-heading {
        align-items: start;
        flex-direction: column;
    }
    .trend-chart {
        min-height: 210px;
    }
    .dashboard-table {
        font-size: 13px;
    }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 320px);
        transform: translateX(-105%);
        transition: transform .2s ease;
        overflow-y: auto;
    }
    body.menu-open .sidebar { transform: translateX(0); }
    body.menu-collapsed .sidebar { transform: translateX(-105%); }
    body.menu-open .menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 4;
    }
    body.menu-collapsed.app-shell { display: block; }
    .sidebar-toggle.mobile { display: inline-grid; place-items: center; }
    .sidebar .sidebar-toggle { display: inline-grid; place-items: center; }
    .nav-list { display: grid; overflow: visible; padding-bottom: 0; }
    .nav-link { flex: unset; }
    .topbar {
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px;
        z-index: 16;
    }
    .topbar-title {
        flex: 1 1 calc(100% - 98px);
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 6px;
        min-height: 42px;
    }
    .topbar-title > div {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        min-width: 0;
        gap: 12px;
        height: 42px;
        white-space: nowrap;
    }
    .topbar-title span {
        display: inline-flex !important;
        align-items: center;
        margin: 0 !important;
        line-height: 42px;
    }
    .sidebar-toggle.mobile {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        align-self: center;
    }
    .current-branch-pill {
        display: inline-flex !important;
        align-items: center;
        flex-wrap: nowrap;
        flex: 0 0 auto;
        max-width: none;
        min-width: 0;
        overflow: visible;
        position: relative;
        z-index: 2;
        font-size: 15px;
        line-height: 1;
        gap: 6px;
        height: 42px;
    }
    .topbar-title .current-branch-pill > span:last-child {
        display: inline-flex !important;
        align-items: center;
        margin: 0;
        white-space: nowrap;
        height: 42px;
        line-height: 42px;
        align-self: center;
        transform: translateY(0);
        color: var(--brand-ink) !important;
        font-weight: 750;
    }
    .current-branch-pill img,
    .current-branch-logo {
        width: 42px;
        height: 42px;
        border-radius: 0;
        align-self: center;
    }
    .page-title-with-tip {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        font-size: 15px;
        line-height: 1;
        height: 42px;
        position: relative;
        z-index: 1;
    }
    .topbar-title .page-title-with-tip,
    .topbar-title .page-title-text {
        display: inline-flex;
        align-items: center;
        height: 42px;
        margin: 0;
        line-height: 42px;
        white-space: nowrap;
    }
    .topbar-actions {
        display: contents;
    }
    .shortcut-wrap {
        order: 3;
        width: 100%;
        max-width: none;
        flex: 1 0 100%;
        justify-content: stretch;
        gap: 4px;
        min-width: 0;
    }
    .shortcut-bar {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .shortcut-scroll {
        flex: 1 1 auto;
        max-width: 100%;
    }
    .shortcut-icon-link {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
    }
    .shortcut-manage-button,
    .account-trigger,
    .notification-button {
        width: 38px;
        height: 38px;
        min-height: 38px;
        padding: 2px;
    }
    .shortcut-manage-button {
        flex: 0 0 38px;
        width: 34px;
        height: 34px;
        min-height: 34px;
    }
    .account-menu {
        order: 2;
        flex: 0 0 auto;
    }
    .notification-button {
        order: 1;
        flex: 0 0 38px;
    }
    .notification-dot {
        top: 7px;
        right: 8px;
    }
    .shortcut-panel {
        right: -94px;
        width: calc(100vw - 28px);
        max-height: calc(100vh - 92px);
    }
    .shortcut-menu-row {
        grid-template-columns: 32px minmax(0, 1fr) 66px;
        align-items: center;
    }
    .shortcut-menu-row form {
        grid-column: auto;
        justify-self: end;
    }
    .shortcut-row-button {
        width: 62px;
        min-height: 30px;
        padding: 0 6px;
        font-size: 12px;
    }
    .account-dropdown {
        right: -4px;
        width: min(96vw, 360px);
    }
    .account-shortcut-panel .shortcut-menu-row {
        width: 100%;
        grid-template-columns: 34px minmax(0, 1fr) 78px;
        align-items: center;
        gap: 8px;
    }
    .account-shortcut-panel .shortcut-menu-row form {
        grid-column: auto;
        justify-self: end;
        width: 78px;
        display: flex;
        justify-content: flex-end;
    }
    .account-shortcut-panel .shortcut-row-button {
        position: relative;
        z-index: 1;
        width: 74px;
        min-width: 74px;
    }
}

@media (max-width: 780px) {
    .account-menu .account-dropdown {
        overflow: visible;
    }
    .account-menu .account-shortcut-panel {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden;
    }
    .account-menu .account-shortcut-panel .shortcut-menu-list {
        width: 100%;
        overflow-x: hidden;
    }
    .account-menu .account-shortcut-panel .shortcut-menu-row {
        display: grid !important;
        width: 100%;
        grid-template-columns: 34px minmax(0, 1fr) 82px !important;
        align-items: center;
        gap: 8px;
    }
    .account-menu .account-shortcut-panel .shortcut-row-text {
        min-width: 0;
    }
    .account-menu .account-shortcut-panel .shortcut-menu-row form {
        display: flex !important;
        width: 82px !important;
        min-width: 82px !important;
        justify-content: flex-end;
        grid-column: auto !important;
    }
    .account-menu .account-shortcut-panel .shortcut-row-button {
        width: 78px !important;
        min-width: 78px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        visibility: visible !important;
    }
}
