:root {
    --ink: #0f172a;
    --ink-soft: #475569;
    --navy: #0b3a4a;
    --navy-deep: #072d3a;
    --teal: #0d9488;
    --teal-bright: #14b8a6;
    --sky: #0ea5e9;
    --emerald: #10b981;
    --amber: #f59e0b;
    --rose: #f43f5e;
    --violet: #8b5cf6;
    --gold: var(--teal);
    --gold-deep: #0f766e;
    --gold-light: #5eead4;
    --ivory: #f8fafc;
    --cream: #eef2f6;
    --burgundy: var(--rose);
    --line: #d7e0ea;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    --radius: 0.75rem;
}

html, body {
    min-height: 100%;
}

body {
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
}

.brand-serif {
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
}

.auth-shell--centered {
    grid-template-columns: 1fr;
    background:
        radial-gradient(circle at top, rgba(20, 184, 166, 0.12), transparent 42%),
        #eef2f6;
}

.brand-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.brand-logo--auth-hero {
    width: min(280px, 100%);
    max-height: 280px;
}

.brand-logo--auth-card {
    width: min(180px, 72%);
    margin-inline: auto;
}

.auth-shell--centered .auth-form {
    min-height: 100vh;
    background: transparent;
}

.brand-logo--sidebar {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.brand-logo--topbar {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-sidebar-brand-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.auth-panel-lead {
    max-width: 28rem;
    color: rgba(248, 250, 252, 0.88);
    line-height: 1.55;
}

.auth-panel {
    background:
        linear-gradient(160deg, rgba(20, 184, 166, 0.22), transparent 55%),
        linear-gradient(180deg, #0b3a4a 0%, #072d3a 100%);
    color: #f8fafc;
    padding: 4rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.auth-panel .eyebrow {
    color: #5eead4;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}

.auth-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background: #eef2f6;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
}

.form-control, .form-select {
    border-color: #cbd5e1;
    background: #fff;
    padding: 0.7rem 0.9rem;
    border-radius: 0.55rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.2);
}

.btn {
    border-radius: 0.55rem;
    font-weight: 600;
}

.btn-gold {
    background: var(--teal);
    color: #fff;
    border: 1px solid var(--teal);
    letter-spacing: 0.02em;
    font-size: 0.9rem;
    padding: 0.65rem 1.15rem;
}

.btn-gold:hover, .btn-gold:focus {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
}

.btn-outline-dark {
    background: #fff;
    color: var(--navy);
    border: 1px solid #94a3b8;
}

.btn-outline-dark:hover, .btn-outline-dark:focus {
    background: #f1f5f9;
    color: var(--navy);
    border-color: var(--teal);
}

.app-shell {
    min-height: 100vh;
}

.app-sidebar {
    background: var(--navy-deep);
    color: #e2e8f0;
    min-height: 100vh;
    width: 264px;
    min-width: 264px;
    flex: 0 0 264px;
    position: sticky;
    top: 0;
    align-self: stretch;
    max-height: 100vh;
    overflow-y: auto;
}

.app-sidebar .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--teal-bright);
    color: #042f2e;
}

.app-sidebar .page-kicker {
    color: #5eead4;
}

.app-sidebar .brand-serif {
    color: #fff;
}

.app-sidebar a {
    color: #cbd5e1;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.1rem 0.7rem;
    padding: 0.58rem 0.8rem;
    border-radius: 0.55rem;
    font-size: 0.92rem;
}

.app-sidebar a i {
    width: 1.15rem;
    text-align: center;
    color: #5eead4;
}

.app-sidebar a:hover {
    color: #fff;
    background: rgba(20, 184, 166, 0.16);
}

.app-sidebar a.active {
    color: #042f2e;
    background: var(--teal-bright);
    font-weight: 600;
}

.app-sidebar a.active i {
    color: #042f2e;
}

.app-sidebar a.disabled {
    opacity: 0.38;
    pointer-events: none;
}

.app-main {
    background: var(--cream);
    min-width: 0;
}

.app-shell-cashier .app-main {
    width: 100%;
    background:
        radial-gradient(1200px 420px at 8% -10%, rgba(59, 130, 246, 0.16), transparent 55%),
        radial-gradient(900px 380px at 100% 0%, rgba(16, 185, 129, 0.12), transparent 50%),
        #eef2fb;
}

.app-shell-cashier .app-main > .p-4 {
    padding: 0.9rem 1rem 1.4rem;
}

.app-shell-cashier .app-topbar {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 0;
    margin: 0.75rem 1rem 0;
    border-radius: 1.15rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.app-shell-cashier .app-topbar .page-kicker {
    color: #2563eb;
}

.app-shell-cashier .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #60a5fa, #2563eb);
    color: #fff;
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    padding: 0.25rem 0.65rem 0.25rem 0.25rem;
}

.user-chip .avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.gold-rule {
    height: 3px;
    width: 4rem;
    background: var(--teal-bright);
    border-radius: 99px;
}

.stat-card,
.data-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.15rem;
    box-shadow: var(--shadow);
}

.stat-card {
    border-left: 4px solid var(--teal-bright);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #ccfbf1;
    color: #0f766e;
    font-size: 1.1rem;
}

.chart-card {
    min-height: 280px;
    min-width: 0;
}

.chart-card canvas {
    max-width: 100%;
}

.row {
    min-width: 0;
}

.min-w-0 {
    min-width: 0;
}

.data-table {
    width: 100%;
    font-size: 0.92rem;
}

.data-table th {
    font-weight: 650;
    color: var(--ink-soft);
    border-bottom: 2px solid var(--line);
    padding: 0.65rem 0.5rem;
    background: #f8fafc;
    white-space: nowrap;
}

.sort-th {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.sort-th:hover,
.sort-th.is-active {
    color: var(--teal);
}

.sort-th-label {
    min-width: 0;
}

.sort-th .bi {
    font-size: 0.78rem;
    opacity: 0.4;
    flex-shrink: 0;
}

.sort-th.is-active .bi {
    opacity: 1;
}

.data-table td {
    padding: 0.62rem 0.5rem;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
}

.data-table td.article-summary {
    vertical-align: top;
    min-width: 12rem;
}

.article-summary-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    line-height: 1.35;
}

.data-table tbody tr:hover td {
    background: #f0fdfa;
}

.data-table tbody tr.data-table-row--aggregate td {
    font-weight: 650;
    color: var(--ink);
}

.data-table tbody tr.data-table-row--detail td {
    font-size: 0.86rem;
    color: var(--ink-soft);
    background: #fafbfc;
}

.data-table tbody tr.data-table-row--detail td:first-child {
    padding-left: 1.35rem;
}

.data-table tbody tr.data-table-row--detail:hover td {
    background: #f3f6f8;
}

.data-table tbody tr:has(a) {
    cursor: pointer;
}

.data-table a {
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.occurred-at-elapsed {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.badge-gold {
    background: #ccfbf1;
    color: #0f766e;
    border-radius: 0.4rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    border-radius: 0.4rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.status-badge--neutral {
    background: #e2e8f0;
    color: #334155;
}

.status-badge--wait {
    background: #fef3c7;
    color: #b45309;
}

.status-badge--assigned {
    background: #ccfbf1;
    color: #0f766e;
}

.status-badge--stock {
    background: #ffedd5;
    color: #c2410c;
}

.status-badge--ready {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge--progress {
    background: #ede9fe;
    color: #6d28d9;
}

.status-badge--prepared {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge--ship {
    background: #f3e8ff;
    color: #7e22ce;
}

.status-badge--transit {
    background: #e0f2fe;
    color: #0369a1;
}

.status-badge--delivery {
    background: #cffafe;
    color: #0e7490;
}

.status-badge--done {
    background: #d1fae5;
    color: #047857;
}

.status-badge--cancel {
    background: #f1f5f9;
    color: #475569;
}

.status-badge--refused {
    background: #ffe4e6;
    color: #be123c;
}

.status-badge--returned {
    background: #fce7f3;
    color: #be185d;
}

.badge-alert {
    background: #ffe4e6;
    color: #be123c;
}

.threshold-warn {
    color: #eab308;
    font-size: 0.95rem;
    line-height: 1;
}

.alert {
    border: none;
    border-radius: 0.65rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #ffe4e6;
    color: #9f1239;
}

.page-kicker {
    color: var(--teal);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
}

a {
    color: #0f766e;
}

a:hover {
    color: #0d9488;
}

[x-cloak] {
    display: none !important;
}

.prince-confirm {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.prince-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 45, 58, 0.52);
}

.prince-confirm-card {
    position: relative;
    width: min(100%, 26rem);
    background: var(--ivory);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 48px rgba(7, 45, 58, 0.2);
    padding: 1.5rem 1.5rem 1.25rem;
}

.prince-confirm-kicker {
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.prince-confirm-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
}

.prince-confirm-card p {
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
}

.prince-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.nav-toggle,
.nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    background: #fff;
    color: #0f172a;
    flex-shrink: 0;
}

.nav-toggle {
    font-size: 1.45rem;
    line-height: 1;
}

.nav-close {
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.nav-backdrop {
    display: none;
}

.app-sidebar-mobile-head {
    display: none;
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        min-height: 200px;
        padding: 2rem 1.5rem;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1040;
        width: min(280px, 86vw);
        min-width: 0;
        flex: none;
        max-height: 100vh;
        min-height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 8px 0 28px rgba(2, 12, 27, 0.28);
        padding-top: 0.75rem !important;
    }

    body.nav-open .app-sidebar {
        transform: translateX(0);
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1035;
        background: rgba(15, 23, 42, 0.48);
    }

    body.nav-open .nav-backdrop {
        display: block;
    }

    body.nav-open {
        overflow: hidden;
    }

    .app-sidebar-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.85rem 1rem 0.5rem;
    }

    .app-main > .p-4 {
        padding: 1rem !important;
    }
}

.pos-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pos-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.pos-pill i {
    font-size: 0.95rem;
}

.pos-pill:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.pos-pill.is-active {
    background: #2563eb;
    color: #fff;
}

.pos-desk {
    max-width: 1280px;
    margin: 0 auto;
}

.pos-desk--compact {
    padding-bottom: 0.5rem;
}

.pos-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.pos-hero--compact {
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.pos-hero-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.pos-hero--compact .pos-title {
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
}

.pos-hero-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.pos-seller-switch {
    display: inline-flex;
    align-items: stretch;
    gap: 0.3rem;
    max-width: 100%;
}

.pos-seller-avatar {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-width: 3.1rem;
    padding: 0.28rem 0.4rem;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    background: transparent;
    color: #94a3b8;
    line-height: 1.05;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    opacity: 0.55;
}

.pos-seller-avatar:hover {
    opacity: 0.85;
    color: #475569;
    background: #f8fafc;
}

.pos-seller-avatar.is-active {
    opacity: 1;
    color: #0f172a;
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.pos-seller-avatar__circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pos-seller-avatar.is-active .pos-seller-avatar__circle {
    background: #0f172a;
    color: #fff;
}

.pos-seller-avatar__name {
    max-width: 3.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    font-weight: 600;
}

.pos-ticket-seller {
    color: #64748b;
    font-weight: 500;
    font-size: 0.85em;
}

.pos-recent-seller {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
}

.pos-recent-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.1rem;
}

.pos-recent-when {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}

.pos-demo-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pos-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 0.2rem;
}

.pos-title {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
}

.pos-sub,
.pos-hint,
.pos-cash-note {
    color: var(--ink-soft);
    margin: 0.25rem 0 0;
}

.pos-hero .pos-btn-add,
.pos-hero .pos-charge {
    flex: 0 0 auto;
    padding: 0.55rem 1.1rem;
}

.pos-alert {
    border-radius: 1rem;
}

.pos-collection-panel {
    position: relative;
    margin-bottom: 1.15rem;
    padding: 1.15rem 1.25rem 1.25rem;
    border-radius: 1.35rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at top right, rgba(13, 148, 136, 0.12), transparent 46%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.pos-collection-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #0f766e, #14b8a6);
}

.pos-collection-panel--colored {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.12), transparent 46%);
}
.pos-collection-panel--colored::before {
    background: linear-gradient(180deg, #be185d, #ec4899);
}
.pos-collection-panel--signature {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.14), transparent 46%);
}
.pos-collection-panel--signature::before {
    background: linear-gradient(180deg, #92400e, #d97706);
}

.pos-collection-panel__head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.95rem;
    padding-left: 0.35rem;
}

.pos-collection-panel__eyebrow {
    margin: 0 0 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    font-weight: 700;
    color: #0f766e;
}

.pos-collection-panel--colored .pos-collection-panel__eyebrow { color: #be185d; }
.pos-collection-panel--signature .pos-collection-panel__eyebrow { color: #b45309; }

.pos-collection-panel__title {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.15;
}

.pos-collection-panel__note {
    margin: 0;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.pos-collection-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0.4rem;
    border-radius: 1.1rem;
    background: rgba(15, 23, 42, 0.035);
    margin-bottom: 1rem;
}

button.pos-collection-switch__btn {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 4.1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    background: transparent;
    color: #334155;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

button.pos-collection-switch__btn:hover:not(:disabled):not(.is-active) {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(15, 23, 42, 0.06);
}

button.pos-collection-switch__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pos-collection-switch__mark {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    flex-shrink: 0;
    background: #94a3b8;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.pos-collection-switch__btn--generic .pos-collection-switch__mark { background: #0f766e; }
.pos-collection-switch__btn--colored .pos-collection-switch__mark { background: #db2777; }
.pos-collection-switch__btn--signature .pos-collection-switch__mark { background: #b45309; }

button.pos-collection-switch__btn--generic.is-active {
    background: linear-gradient(145deg, #0f766e, #14b8a6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.26);
    transform: translateY(-1px);
}
button.pos-collection-switch__btn--colored.is-active {
    background: linear-gradient(145deg, #9d174d, #ec4899);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(190, 24, 93, 0.26);
    transform: translateY(-1px);
}
button.pos-collection-switch__btn--signature.is-active {
    background: linear-gradient(145deg, #78350f, #d97706);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px rgba(146, 64, 14, 0.26);
    transform: translateY(-1px);
}

button.pos-collection-switch__btn.is-active .pos-collection-switch__name,
button.pos-collection-switch__btn.is-active .pos-collection-switch__hint {
    color: #fff;
}

button.pos-collection-switch__btn.is-active .pos-collection-switch__mark {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.pos-collection-switch__copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.pos-collection-switch__name {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.28rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.pos-collection-switch__hint {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.72;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-tariff {
    padding: 0.85rem 0.9rem 0.95rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.pos-tariff__label {
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.pos-tariff__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

.pos-collection-panel--colored .pos-tariff__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pos-collection-panel--signature .pos-tariff__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pos-tariff__tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 5.4rem;
    padding: 0.7rem 0.75rem;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #f8fafc, #eef2f6);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.pos-collection-panel--generic .pos-tariff__tile {
    background: linear-gradient(180deg, #f0fdfa, #ecfeff);
}
.pos-collection-panel--colored .pos-tariff__tile {
    background: linear-gradient(180deg, #fff1f2, #fdf2f8);
}
.pos-collection-panel--signature .pos-tariff__tile {
    background: linear-gradient(180deg, #fffbeb, #fef3c7);
}

.pos-tariff__qty {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.7rem;
    font-weight: 600;
    line-height: 1;
    color: var(--ink);
}

.pos-tariff__unit,
.pos-tariff__name {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.pos-tariff__name {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.15;
}

.pos-tariff__price {
    margin-top: auto;
    padding-top: 0.55rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.pos-tariff__price span {
    margin-left: 0.15rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
}

.pos-collection-panel--compact {
    margin-bottom: 0.55rem;
    padding: 0.55rem 0.65rem 0.65rem;
    border-radius: 1rem;
}

.pos-collection-panel--compact .pos-collection-switch {
    gap: 0.4rem;
    padding: 0.3rem;
    margin-bottom: 0.45rem;
}

.pos-collection-panel--compact button.pos-collection-switch__btn {
    min-height: 2.45rem;
    padding: 0.4rem 0.65rem;
    gap: 0.45rem;
    justify-content: center;
}

.pos-collection-panel--compact .pos-collection-switch__name {
    font-size: 1.05rem;
}

.pos-collection-panel--compact .pos-collection-switch__hint {
    display: none;
}

.pos-tariff--compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.75rem;
}

.pos-tariff--compact .pos-tariff__label {
    margin: 0;
    flex: 0 0 auto;
}

.pos-tariff--compact .pos-tariff__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1 1 auto;
    grid-template-columns: none;
}

.pos-tariff--compact .pos-tariff__tile {
    min-height: 0;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    flex-direction: row;
    align-items: center;
}

.pos-tariff__line {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
}

.pos-tariff__line strong {
    color: var(--ink);
    font-weight: 700;
}

.pos-kpis--compact {
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.pos-kpis--compact .pos-kpi {
    gap: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.55rem 0.7rem;
    border-radius: 0.85rem;
    min-height: 0;
}

.pos-kpis--compact .pos-kpi-icon {
    display: none;
}

.pos-kpis--compact .pos-kpi-label {
    font-size: 0.68rem;
}

.pos-kpis--compact .pos-kpi-value-row {
    width: 100%;
}

.pos-kpis--compact .pos-kpi-value {
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .pos-tariff__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .pos-collection-switch {
        grid-template-columns: 1fr;
    }

    .pos-collection-panel--compact .pos-collection-switch {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pos-tariff__grid,
    .pos-collection-panel--colored .pos-tariff__grid,
    .pos-collection-panel--signature .pos-tariff__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.pos-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.pos-kpi {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #fff;
    border-radius: 1.15rem;
    padding: 1rem 1.05rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.pos-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.pos-kpi-body {
    min-width: 0;
    flex: 1;
}

.pos-kpi-label {
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-weight: 600;
}

.pos-kpi-value-row {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    padding-right: 1.85rem;
}

.pos-kpi-value {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.pos-kpi-reveal {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
    display: inline-grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(176, 190, 204, 0.95);
    opacity: 0.85;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.pos-kpi-reveal:hover,
.pos-kpi-reveal:focus-visible {
    opacity: 1;
    color: rgba(148, 163, 184, 1);
    background: transparent;
    outline: none;
}

.pos-kpi-reveal i {
    font-size: 1.08rem;
    font-weight: 300;
}

.pos-kpi-blue .pos-kpi-icon { background: linear-gradient(160deg, #60a5fa, #2563eb); }
.pos-kpi-gold .pos-kpi-icon { background: linear-gradient(160deg, #fbbf24, #f59e0b); }
.pos-kpi-green .pos-kpi-icon { background: linear-gradient(160deg, #34d399, #059669); }
.pos-kpi-violet .pos-kpi-icon { background: linear-gradient(160deg, #a78bfa, #7c3aed); }

.pos-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.pos-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.pos-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.pos-card-head h2 {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 700;
}

.pos-card-head span,
.pos-link {
    color: #64748b;
    font-size: 0.82rem;
}

.pos-link {
    background: none;
    border: 0;
    padding: 0;
    font-weight: 600;
}

.pos-link:disabled {
    opacity: 0.4;
}

.pos-input,
.pos-select {
    border-radius: 0.9rem;
    min-height: 48px;
}

.pos-picker-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.pos-picker-tools .pos-input {
    flex: 1 1 180px;
}

.pos-product-list {
    margin-top: 0.55rem;
    max-height: min(58vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.15rem 0.35rem 0.15rem 0.1rem;
}

.pos-desk--compact .pos-grid {
    gap: 0.75rem;
    align-items: stretch;
}

.pos-desk--compact .pos-card {
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
}

.pos-desk--compact .pos-card-head {
    margin-bottom: 0.55rem;
}

.pos-desk--compact .pos-product-list {
    max-height: calc(100vh - 270px);
    min-height: 220px;
}

.pos-desk--compact .pos-ticket .pos-lines {
    max-height: calc(100vh - 400px);
    min-height: 140px;
    overflow-y: auto;
}

.pos-desk--compact .pos-product-row {
    padding: 0.5rem 0.7rem;
    border-radius: 0.8rem;
}

.pos-desk--compact .pos-input,
.pos-desk--compact .pos-select {
    min-height: 40px;
}

.pos-desk--compact .pos-recent {
    margin-top: 0.75rem;
    padding: 0.7rem 0.9rem;
}

.pos-desk--compact .pos-desk-nav {
    margin-bottom: 0.35rem !important;
}

.pos-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 0.75rem 0.9rem;
}

.pos-product-row:hover:not(:disabled) {
    border-color: #93c5fd;
    background: #eff6ff;
}

.pos-product-row.is-selected {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: inset 0 0 0 1px #2563eb;
}

.pos-product-row.is-empty .pos-product-row-stock {
    color: #be123c;
}

.pos-product-row-main,
.pos-product-row-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pos-product-row-meta {
    text-align: right;
    flex-shrink: 0;
}

.pos-product-row-name {
    font-weight: 700;
}

.pos-product-row-ref,
.pos-product-row-stock {
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.pos-product-row-price {
    font-weight: 700;
    color: #1d4ed8;
}

.pos-empty-list {
    padding: 1.1rem 0.5rem;
}

.pos-preview {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #eff6ff, #f0fdf4);
}

.pos-preview.is-empty {
    background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.pos-preview-name {
    font-weight: 700;
}

.pos-preview-meta,
.pos-preview-stock span {
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.pos-preview-stock {
    text-align: right;
}

.pos-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

.pos-stepper,
.pos-line-qty {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.pos-stepper-btn {
    width: 40px;
    height: 42px;
    border: 0;
    background: transparent;
    font-size: 1.15rem;
    color: #1e3a8a;
    font-weight: 700;
}

.pos-stepper-input,
.pos-price-input {
    width: 4.2rem;
    text-align: center;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.35rem 0.15rem;
}

.pos-stepper-input:focus,
.pos-price-input:focus {
    box-shadow: none;
}

.pos-btn-add,
.pos-charge {
    flex: 1 1 180px;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 700;
}

.pos-btn-add:hover,
.pos-charge:hover,
.pos-btn-add:focus,
.pos-charge:focus {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.pos-lines {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    max-height: min(46vh, 420px);
    overflow: auto;
}

.pos-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 1rem;
    background: #f8fafc;
}

.pos-line-name {
    font-weight: 700;
}

.pos-line-meta {
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.pos-line-price {
    text-align: right;
}

.pos-line-total {
    font-size: 0.78rem;
    color: #2563eb;
    font-weight: 700;
}

.pos-line-remove {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #be123c;
    font-size: 1.1rem;
}

.pos-empty {
    text-align: center;
    color: var(--ink-soft);
    padding: 1.6rem 0.5rem;
}

.pos-empty i {
    font-size: 1.6rem;
    color: #93c5fd;
}

.pos-pay {
    margin-top: 1rem;
}

.pos-pay-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 0.45rem;
}

.pos-pay-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.pos-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 46px;
    border-radius: 0.95rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-weight: 700;
}

.pos-pay-cash.is-active {
    background: #ecfdf5;
    border-color: #34d399;
    color: #047857;
}

.pos-pay-card.is-active {
    background: #eff6ff;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.pos-checkout {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid #eef2f6;
}

.pos-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.pos-pack-note {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.pos-btn-add:disabled,
.pos-charge:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pos-charge {
    width: 100%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.pos-charge:hover,
.pos-charge:focus {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.pos-recent {
    margin-top: 1rem;
}

.pos-recent-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.55rem;
}

.pos-recent-item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.88rem;
}

.pos-recent-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.pos-manage.pos-card,
.pos-card.pos-manage {
    margin-top: 1rem;
}

@media (max-width: 991.98px) {
    .pos-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .pos-grid {
        grid-template-columns: 1fr;
    }

    .pos-checkout {
        position: sticky;
        bottom: 0.5rem;
        background: #fff;
        z-index: 5;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
        margin-left: -0.4rem;
        margin-right: -0.4rem;
        padding: 0.9rem 0.4rem 0.2rem;
        border-radius: 1rem;
    }
}

@media (max-width: 575.98px) {
    .pos-kpis {
        grid-template-columns: 1fr;
    }

    .pos-line {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "main remove"
            "qty price";
    }

    .pos-line-main { grid-area: main; }
    .pos-line-remove { grid-area: remove; justify-self: end; }
    .pos-line-qty { grid-area: qty; }
    .pos-line-price { grid-area: price; }

    .pos-picker-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .pos-product-row {
        align-items: flex-start;
    }
}

.delivery-desk { position: relative; }
.delivery-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1040;
}
.delivery-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 2rem));
    z-index: 1050;
    margin: 0;
}

.searchable-select {
    position: relative;
    display: block;
    width: 100%;
}

.searchable-select__panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.searchable-select__list {
    max-height: 15rem;
    overflow-y: auto;
}

.transfer-lines {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    overflow: visible;
}

.transfer-lines__head,
.transfer-lines__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem 2.75rem;
    gap: 0.65rem;
    align-items: center;
}

.transfer-lines__head {
    padding: 0 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.transfer-lines__row {
    position: relative;
    padding: 0.7rem 0.75rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.transfer-lines__row:focus-within {
    z-index: 5;
    background: #fff;
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.transfer-lines__actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .transfer-lines__head {
        display: none;
    }

    .transfer-lines__row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "article actions"
            "qty actions";
    }

    .transfer-lines__article { grid-area: article; }
    .transfer-lines__qty { grid-area: qty; max-width: 8rem; }
    .transfer-lines__actions { grid-area: actions; align-self: start; }
}

