:root {
    --bg: #eef4f7;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #17202a;
    --muted: #6b7280;
    --line: #d9e2ea;
    --green: #16835a;
    --green-soft: #e8f6ef;
    --blue: #2563eb;
    --blue-soft: #e8efff;
    --orange: #c66a17;
    --orange-soft: #fff3e6;
    --purple: #6d4cc2;
    --purple-soft: #f0ecff;
    --danger: #c53333;
    --danger-soft: #ffecec;
    --shadow: 0 18px 50px rgba(23, 32, 42, .08);
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: #142433;
    color: #eef7f5;
    padding: 18px 14px;
    overflow-y: auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 18px;
}
.brand strong { display: block; font-size: 17px; }
.brand small { color: #b8c8d3; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f2c94c;
    color: #142433;
    font-weight: 800;
}
.brand-mark.large {
    width: 62px;
    height: 62px;
    font-size: 20px;
}
.main-menu { display: grid; gap: 4px; }
.menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 7px;
    color: #dce9ef;
}
.menu-link:hover,
.menu-link.is-active {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.menu-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 7px;
    background: rgba(255,255,255,.1);
    font-size: 12px;
    font-weight: 800;
}
.main { min-width: 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 14px 28px;
    background: rgba(238, 244, 247, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(217, 226, 234, .8);
}
.topbar h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}
.topbar p { margin: 4px 0 0; color: var(--muted); }
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}
.content {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 24px 28px 42px;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
}
.panel.narrow { max-width: 980px; }
.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); }
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card {
    display: grid;
    gap: 8px;
    min-height: 116px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--green);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.metric-card span { color: var(--muted); }
.metric-card strong { font-size: 26px; line-height: 1; }
.metric-card small { color: var(--muted); }
.accent-green { border-left-color: var(--green); background: linear-gradient(90deg, var(--green-soft), #fff 55%); }
.accent-blue { border-left-color: var(--blue); background: linear-gradient(90deg, var(--blue-soft), #fff 55%); }
.accent-orange { border-left-color: var(--orange); background: linear-gradient(90deg, var(--orange-soft), #fff 55%); }
.accent-purple { border-left-color: var(--purple); background: linear-gradient(90deg, var(--purple-soft), #fff 55%); }
.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
    gap: 18px;
    align-items: start;
}
.pos-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(420px, .8fr);
    gap: 18px;
    align-items: start;
}
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    padding: 10px 11px;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.filter-bar input,
.filter-bar select { width: auto; min-width: 180px; }
.compact-input { max-width: 240px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}
.button:hover { border-color: #aebdca; }
.button.primary {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}
.button.ghost { background: var(--surface-2); }
.button.danger {
    border-color: var(--danger-soft);
    background: var(--danger-soft);
    color: var(--danger);
}
.button.full { width: 100%; }
.icon-button {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 7px;
    width: 40px;
    height: 40px;
}
.only-mobile { display: none; }
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.table-wrap.compact table { min-width: 0; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}
th, td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    text-align: left;
}
th {
    background: var(--surface-2);
    color: #44515f;
    font-size: 12px;
    text-transform: uppercase;
}
td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
tr:last-child td { border-bottom: 0; }
.text-right { text-align: right; }
.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.empty {
    color: var(--muted);
    text-align: center;
    padding: 26px;
}
.alert {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
}
.alert.success { border-color: #bfe4cf; background: var(--green-soft); color: #145c41; }
.alert.danger { border-color: #ffc9c9; background: var(--danger-soft); color: var(--danger); }
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.form-grid.single { grid-template-columns: 1fr; }
label span {
    display: block;
    margin-bottom: 6px;
    color: #3c4652;
    font-weight: 700;
}
.full-row { grid-column: 1 / -1; }
.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}
.check-row input { width: auto; }
.check-row span { margin: 0; }
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.summary-strip span {
    display: grid;
    gap: 5px;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
}
.summary-strip strong {
    color: var(--text);
    font-size: 16px;
}
.product-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-height: calc(100vh - 190px);
    overflow-y: auto;
    padding-right: 4px;
}
.product-tile {
    display: grid;
    gap: 7px;
    min-height: 118px;
    text-align: left;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.product-tile:hover {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 131, 90, .12);
}
.product-tile span { color: var(--muted); font-size: 12px; }
.product-tile em { font-style: normal; color: var(--green); font-weight: 800; }
.checkout-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 16px;
}
.checkout-total strong { font-size: 24px; color: var(--green); }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf1f5;
    color: #596575;
    font-size: 12px;
    font-weight: 800;
}
.badge.green {
    background: var(--green-soft);
    color: var(--green);
}
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    background: radial-gradient(circle at top left, #d8f0e7, transparent 32%), var(--bg);
}
.auth-panel {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(320px, 420px);
    gap: 26px;
    width: min(920px, 100%);
    align-items: center;
}
.auth-copy h1 {
    margin: 18px 0 10px;
    font-size: 48px;
    line-height: 1;
}
.auth-copy p {
    color: var(--muted);
    font-size: 17px;
    max-width: 430px;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
}
.auth-card h2 { margin: 0 0 18px; font-size: 22px; }
.auth-card label { display: block; margin-bottom: 14px; }

nav[role="navigation"] { margin-top: 14px; }
nav[role="navigation"] > div { display: flex; justify-content: space-between; gap: 10px; }
nav[role="navigation"] a,
nav[role="navigation"] span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
}

.staff-pos {
    --pos-blue: #0b55d9;
    --pos-blue-2: #0877f2;
    margin: -14px -14px 0;
}
.staff-pos-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 410px) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.staff-search {
    display: flex;
    align-items: center;
    min-height: 42px;
    border: 1px solid #b6c5d6;
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
}
.staff-search span {
    padding: 0 10px;
    color: #637083;
    font-weight: 800;
}
.staff-search input {
    border: 0;
    box-shadow: none;
    min-height: 40px;
    padding-left: 0;
}
.staff-search button {
    width: 42px;
    height: 40px;
    border: 0;
    border-left: 1px solid var(--line);
    background: #f6f8fb;
    font-size: 22px;
}
.staff-search.small { min-height: 36px; }
.staff-search.small input { min-height: 34px; }
.invoice-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
}
.invoice-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    font-weight: 800;
}
.invoice-tab.is-active {
    border-color: var(--pos-blue);
    background: var(--pos-blue);
    color: #fff;
}
.invoice-tab button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 16px;
}
.staff-pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 10px;
    min-height: calc(100vh - 160px);
}
.staff-sale-area {
    display: grid;
    grid-template-rows: auto minmax(210px, 1fr) auto auto;
    gap: 10px;
    min-width: 0;
}
.staff-cart-card,
.staff-product-drawer,
.staff-payment-panel,
.staff-note {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.72);
}
.staff-cart-card {
    min-height: 230px;
    overflow: hidden;
}
.staff-cart-head,
.staff-cart-row {
    display: grid;
    grid-template-columns: 48px 110px minmax(220px, 1fr) 92px 86px 120px 130px 42px;
    gap: 8px;
    align-items: center;
}
.staff-cart-head {
    padding: 10px 12px;
    background: #d9e5f3;
    color: #1e3147;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.staff-cart-lines {
    display: grid;
    gap: 8px;
    padding: 8px;
    max-height: 310px;
    overflow-y: auto;
}
.staff-cart-row {
    min-height: 48px;
    padding: 8px;
    border: 1px solid #ccd8e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(23, 32, 42, .06);
}
.staff-cart-row input,
.staff-cart-row select {
    min-height: 30px;
    padding: 5px 7px;
}
.staff-cart-row strong { font-size: 13px; }
.staff-cart-row small {
    display: inline-flex;
    margin-left: 6px;
    padding: 2px 5px;
    border-radius: 5px;
    background: #fff0d6;
    color: #b45309;
}
.staff-cart-remove {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 7px;
    background: var(--danger-soft);
    color: var(--danger);
}
.staff-product-drawer {
    padding: 12px;
    min-height: 0;
}
.staff-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.staff-section-title span { color: var(--muted); }
.staff-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}
.staff-product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: left;
}
.staff-product:hover {
    border-color: var(--pos-blue);
    box-shadow: 0 0 0 3px rgba(11, 85, 217, .12);
}
.staff-product small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}
.staff-product em {
    color: var(--pos-blue);
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}
.staff-note {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    padding: 10px 12px;
}
.staff-note span { font-weight: 800; color: var(--muted); }
.staff-note input { border: 0; background: transparent; box-shadow: none; }
.staff-modebar {
    display: flex;
    gap: 12px;
}
.staff-modebar button {
    min-height: 40px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #1f2937;
    font-weight: 800;
}
.staff-modebar button.is-active {
    color: var(--pos-blue);
    border-bottom-color: var(--pos-blue);
}
.staff-payment-panel {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(120px, 1fr) auto;
    gap: 14px;
    padding: 14px;
}
.staff-panel-head,
.staff-customer-result,
.staff-combo-pay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.staff-panel-head small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}
.staff-panel-head span,
.staff-customer-result {
    color: var(--pos-blue);
    font-weight: 900;
}
.staff-customer-box {
    position: relative;
}
.staff-customer-list {
    position: absolute;
    z-index: 12;
    inset: 42px 0 auto;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.staff-customer-list button {
    display: block;
    width: 100%;
    padding: 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    text-align: left;
}
.staff-customer-list button:hover { background: var(--surface-2); }
.staff-customer-list small {
    display: block;
    color: var(--muted);
}
.staff-total-lines {
    display: grid;
    gap: 10px;
}
.staff-total-lines > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px 120px;
    align-items: center;
    gap: 8px;
}
.staff-total-lines > div:not(:first-child) {
    grid-template-columns: minmax(0, 1fr) 140px;
}
.staff-total-lines input {
    min-height: 32px;
    padding: 5px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    text-align: right;
    box-shadow: none;
}
.staff-total-lines strong {
    text-align: right;
}
.staff-total-lines .payable strong {
    color: var(--pos-blue);
    font-size: 18px;
}
.staff-pay-methods {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
.staff-pay-methods button,
.split-methods button,
.quick-amounts button {
    min-height: 34px;
    border: 1px solid #b9c6d4;
    border-radius: 999px;
    background: #fff;
}
.staff-pay-methods button.is-active,
.split-methods button.is-active {
    border-color: var(--pos-blue);
    background: var(--pos-blue);
    color: #fff;
}
.staff-combo-pay {
    min-height: 36px;
    padding: 9px 10px;
    border-radius: 8px;
    background: #edf2f7;
    font-size: 12px;
}
.staff-checkout {
    min-height: 48px;
    border-color: var(--pos-blue);
    background: var(--pos-blue);
    text-transform: uppercase;
}
.staff-floating-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.staff-floating-actions button {
    min-height: 36px;
    border: 1px solid var(--pos-blue);
    border-radius: 7px;
    background: #fff;
    color: var(--pos-blue);
    font-weight: 800;
}
.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .62);
}
.pos-modal {
    width: min(640px, 100%);
    max-height: min(720px, 92vh);
    overflow-y: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0,0,0,.35);
}
.pos-modal.wide { width: min(1030px, 100%); }
.pos-modal header,
.pos-modal footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 24px;
}
.pos-modal header { border-bottom: 1px solid var(--line); }
.pos-modal footer { border-top: 1px solid var(--line); justify-content: flex-end; }
.pos-modal h2 { margin: 0; font-size: 18px; }
.pos-modal header button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 7px;
    background: var(--surface-2);
    font-size: 24px;
}
.modal-tabs {
    display: flex;
    gap: 28px;
    padding: 12px 24px 0;
    border-bottom: 1px solid var(--line);
}
.modal-tabs span {
    padding: 0 0 10px;
    font-weight: 800;
}
.modal-tabs .is-active {
    color: var(--pos-blue);
    border-bottom: 2px solid var(--pos-blue);
}
.customer-form-grid {
    display: grid;
    grid-template-columns: 90px repeat(2, minmax(0, 1fr));
    gap: 14px 22px;
    padding: 20px 24px;
}
.avatar-placeholder {
    grid-row: span 3;
    display: grid;
    place-items: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #eef2f6;
    color: #18324b;
    font-weight: 900;
}
.split-box {
    display: grid;
    gap: 14px;
    padding: 18px 28px;
}
.quick-amounts,
.split-methods {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.quick-amounts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split-summary {
    display: grid;
    gap: 10px;
    padding-top: 6px;
}
.split-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.split-row {
    padding: 9px 0;
    border-top: 1px dashed #b8c4d0;
}
.split-row button {
    border: 0;
    background: transparent;
    color: var(--danger);
}
.return-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 18px;
    padding: 16px 20px 20px;
}
.return-layout aside {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}
.return-layout table { min-width: 760px; }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two-column,
    .pos-grid,
    .staff-pos-layout { grid-template-columns: 1fr; }
    .staff-payment-panel { grid-template-rows: auto; }
}

@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        z-index: 30;
        inset: 0 auto 0 0;
        width: min(300px, 88vw);
        transform: translateX(-104%);
        transition: transform .2s ease;
    }
    .sidebar.is-open { transform: translateX(0); }
    .only-mobile { display: inline-grid; place-items: center; }
    .topbar { padding: 12px 16px; }
    .content { padding: 18px 16px 32px; }
    .topbar-actions { gap: 6px; }
    .user-pill { display: none; }
    .metric-grid,
    .metric-grid.three,
    .summary-strip,
    .form-grid { grid-template-columns: 1fr; }
    .filter-bar input,
    .filter-bar select,
    .filter-bar .button { width: 100%; }
    .auth-panel { grid-template-columns: 1fr; }
    .auth-copy h1 { font-size: 36px; }
    .staff-pos { margin: 0; }
    .staff-pos-toolbar { grid-template-columns: 1fr; }
    .staff-cart-head { display: none; }
    .staff-cart-row {
        grid-template-columns: 1fr 70px;
        align-items: start;
    }
    .staff-cart-row > * { min-width: 0; }
    .staff-products { grid-template-columns: 1fr; }
    .staff-pay-methods,
    .quick-amounts,
    .split-methods,
    .customer-form-grid,
    .return-layout { grid-template-columns: 1fr; }
    .avatar-placeholder { grid-row: auto; }
}

body.pos-staff-screen {
    overflow: hidden;
    background: #c6c9cd;
}

body.pos-staff-screen .topbar {
    display: none;
}

body.pos-staff-screen .main {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body.pos-staff-screen .content {
    width: 100%;
    max-width: none;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.pos-staff-screen .alert {
    position: fixed;
    z-index: 140;
    top: 12px;
    right: 420px;
    max-width: 520px;
    box-shadow: var(--shadow);
}

.pos-staff-screen .staff-pos {
    --pos-blue: #0d56d9;
    --pos-blue-dark: #0846b8;
    --pos-panel: #d1d3d6;
    --pos-panel-soft: #e8edf2;
    display: grid;
    height: 100vh;
    margin: 0;
    background: var(--pos-panel);
}

.pos-staff-screen .staff-pos > form {
    display: grid;
    grid-template-rows: 46px minmax(0, 1fr);
    min-height: 0;
}

.pos-staff-screen .staff-pos-toolbar {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(260px, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 46px;
    margin: 0;
    padding: 5px 8px;
    background: var(--pos-blue);
    color: #fff;
}

.pos-staff-screen .staff-search {
    min-height: 36px;
    border: 0;
    border-radius: 5px;
    background: #eef4fb;
}

.pos-staff-screen .staff-search span {
    color: #566477;
}

.pos-staff-screen .staff-search input {
    min-height: 36px;
    color: #111827;
}

.pos-staff-screen .staff-search input::placeholder {
    color: #667085;
}

.pos-staff-screen .staff-search button {
    width: 38px;
    height: 36px;
    color: #111827;
    background: #dfe7ef;
}

.pos-staff-screen .invoice-tabs {
    align-self: stretch;
}

.pos-staff-screen .invoice-tab {
    min-height: 36px;
    border: 0;
    border-radius: 5px 5px 0 0;
    background: rgba(255, 255, 255, .18);
    color: #eaf2ff;
}

.pos-staff-screen .invoice-tab.is-active {
    background: #fff;
    color: #111827;
}

.pos-staff-screen .staff-pos-toolbar > .button {
    min-height: 36px;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 5px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-weight: 900;
}

.pos-staff-screen .staff-pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 6px;
    min-height: 0;
    height: 100%;
    padding: 6px;
}

.pos-staff-screen .staff-sale-area {
    display: grid;
    grid-template-rows: minmax(220px, 1fr) minmax(158px, .58fr) 50px 42px;
    gap: 6px;
    min-width: 0;
    min-height: 0;
}

.pos-staff-screen .staff-cart-card,
.pos-staff-screen .staff-product-drawer,
.pos-staff-screen .staff-payment-panel,
.pos-staff-screen .staff-note {
    border: 1px solid #b9c0c8;
    border-radius: 7px;
    background: #f7fafc;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.pos-staff-screen .staff-cart-card {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.pos-staff-screen .staff-cart-head {
    background: #eef4fb;
    border-bottom: 1px solid #c9d3df;
    color: #2f3b4a;
}

.pos-staff-screen .staff-cart-lines {
    min-height: 0;
    max-height: none;
    align-content: start;
    background: #c6c9cd;
}

.pos-staff-screen .staff-cart-lines .empty,
.pos-staff-screen .staff-products .empty {
    display: grid;
    place-items: center;
    min-height: 140px;
    color: #667085;
    font-weight: 700;
}

.pos-staff-screen .staff-cart-row {
    min-height: 48px;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .12);
}

.pos-staff-screen .staff-product-drawer {
    min-height: 0;
    overflow: hidden;
    padding: 10px;
}

.pos-staff-screen .staff-products {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    max-height: none;
    height: calc(100% - 30px);
}

.pos-staff-screen .staff-product {
    border-radius: 6px;
    min-height: 60px;
}

.pos-staff-screen .staff-note {
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 50px;
    padding: 0 12px;
    background: #eef2f7;
}

.pos-staff-screen .staff-modebar {
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 2px;
}

.pos-staff-screen .staff-modebar button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #aeb9c6;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
}

.pos-staff-screen .staff-modebar button.is-active {
    border-color: var(--pos-blue);
    background: #eaf2ff;
    color: var(--pos-blue);
}

.pos-staff-screen .staff-payment-panel {
    display: grid;
    grid-template-rows: auto auto auto auto minmax(80px, 1fr) 52px;
    gap: 12px;
    min-height: 0;
    padding: 12px;
    background: #eef2f7;
}

.pos-staff-screen .staff-panel-head {
    min-height: 36px;
    padding-bottom: 8px;
    border-bottom: 1px solid #cad3df;
}

.pos-staff-screen .staff-panel-head strong,
.pos-staff-screen .staff-panel-head span {
    color: #111827;
}

.pos-staff-screen .staff-customer-result {
    min-height: 34px;
    padding: 0 6px;
}

.pos-staff-screen .staff-total-lines {
    gap: 8px;
}

.pos-staff-screen .staff-total-lines > div {
    min-height: 30px;
}

.pos-staff-screen .staff-total-lines span {
    color: #111827;
    font-weight: 800;
}

.pos-staff-screen .staff-total-lines input {
    font-weight: 900;
}

.pos-staff-screen .staff-pay-methods {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 38px;
    gap: 7px;
}

.pos-staff-screen .staff-pay-methods button,
.pos-staff-screen .split-methods button,
.pos-staff-screen .quick-amounts button {
    min-height: 34px;
    border-radius: 999px;
    background: #fff;
    font-weight: 800;
}

.pos-staff-screen .staff-pay-methods button.is-active,
.pos-staff-screen .split-methods button.is-active {
    border-color: var(--pos-blue);
    background: var(--pos-blue);
    color: #fff;
}

.pos-staff-screen .staff-combo-pay {
    grid-row: 5;
}

.pos-staff-screen .staff-checkout {
    grid-row: 6;
    align-self: end;
    min-height: 52px;
    border: 0;
    border-radius: 7px;
    background: var(--pos-blue);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0;
}

.pos-staff-screen .staff-checkout:hover {
    background: var(--pos-blue-dark);
}

.pos-staff-screen .staff-floating-actions {
    position: fixed;
    z-index: 12;
    right: 402px;
    bottom: 12px;
    margin: 0;
}

.pos-staff-screen .staff-floating-actions button {
    min-height: 34px;
    border-radius: 6px;
    background: #fff;
}

@media (max-width: 1240px) {
    .pos-staff-screen .staff-pos-layout {
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .pos-staff-screen .staff-cart-head,
    .pos-staff-screen .staff-cart-row {
        grid-template-columns: 38px 92px minmax(180px, 1fr) 76px 74px 104px 112px 34px;
    }
}

@media (max-width: 1040px) {
    body.pos-staff-screen {
        overflow: auto;
    }

    body.pos-staff-screen .main,
    body.pos-staff-screen .content,
    .pos-staff-screen .staff-pos {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .pos-staff-screen .staff-pos > form,
    .pos-staff-screen .staff-pos-layout,
    .pos-staff-screen .staff-sale-area {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .pos-staff-screen .staff-pos-toolbar {
        grid-template-columns: 1fr;
    }

    .pos-staff-screen .staff-floating-actions {
        position: static;
        justify-content: flex-start;
        padding: 0 6px 8px;
    }
}
