/* =====================================================================
   SR POS v2 — design system
   Palette is taken from the sweet counter:
     raspberry  = selling (money in)      pistachio = purchase (money out)
     saffron    = attention / low stock   plum ink  = chrome / navigation
   Old variable names are kept so every existing page still works.
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
    --ink: #1B1033;
    --ink-2: #2A1C4A;
    --bg: #F4F5FA;
    --surface: #FFFFFF;
    --line: #E6E8F0;
    --line-2: #F0F1F6;
    --text: #1E2033;
    --muted: #6B7085;

    --rasp: #E0245E;
    --rasp-dark: #B8164A;
    --rasp-soft: #FDE8EF;
    --pista: #1F9D63;
    --pista-dark: #157A4B;
    --pista-soft: #E3F6EC;
    --saffron: #F2A516;
    --saffron-soft: #FEF4DD;
    --red: #E5484D;
    --red-soft: #FDECEC;
    --blue: #3B6FE0;
    --blue-soft: #E8EFFD;

    /* legacy names used across the old pages */
    --primary: var(--rasp);
    --primary-dark: var(--rasp-dark);
    --secondary: var(--saffron);
    --success: var(--pista);
    --danger: var(--red);
    --warning: var(--saffron);
    --info: var(--blue);
    --dark: var(--text);
    --light: var(--bg);
    --gray: var(--muted);
    --border: var(--line);

    --shadow: 0 1px 2px rgba(27,16,51,.05), 0 2px 8px rgba(27,16,51,.04);
    --shadow-lg: 0 18px 50px rgba(27,16,51,.18);
    --ring: 0 0 0 3px rgba(224,36,94,.18);

    --r-lg: 18px;
    --r-md: 12px;
    --r-sm: 9px;

    --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-num: 'Sora', 'Figtree', system-ui, sans-serif;

    --sidebar-w: 248px;
    --topbar-h: 64px;
    --bottomnav-h: 68px;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 15px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { color: var(--rasp); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--rasp); outline-offset: 2px; }
::selection { background: var(--rasp-soft); }

.num, .stat-value, .money { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* =====================================================================
   App shell
   ===================================================================== */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--ink);
    color: #fff;
    position: fixed; inset: 0 auto 0 0;
    height: 100vh; height: 100dvh;
    overflow-y: auto;
    z-index: 1000;
    display: flex; flex-direction: column;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar-header {
    padding: 20px 18px 16px;
    display: flex; align-items: center; gap: 12px;
    position: relative;
}
.logo-circle {
    width: 42px; height: 42px; flex-shrink: 0;
    border-radius: 13px;
    background: var(--rasp);
    display: grid; place-items: center;
    font-size: 20px; color: #fff;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.shop-name { font-weight: 800; font-size: 15px; line-height: 1.2; letter-spacing: -.01em; }
.user-info { font-size: 12.5px; color: rgba(255,255,255,.55); margin-top: 2px; }
.close-sidebar {
    display: none; position: absolute; right: 12px; top: 18px;
    width: 34px; height: 34px; border-radius: 10px; border: 0;
    background: rgba(255,255,255,.08); color: #fff; font-size: 16px; cursor: pointer;
}

.sidebar-nav { padding: 6px 10px 18px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group-label {
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,.4);
    padding: 0 12px 6px;
}
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; margin: 1px 0;
    color: rgba(255,255,255,.78);
    text-decoration: none; font-size: 14.5px; font-weight: 500;
    border-radius: 11px;
    transition: background .15s, color .15s;
}
.sidebar-nav a i { font-size: 17px; width: 20px; text-align: center; opacity: .9; }
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.11); color: #fff; font-weight: 700; }
.sidebar-nav a.active i { color: #FF7DA3; opacity: 1; }
.sidebar-nav a.is-buy.active i { color: #6FE0A6; }
.sidebar-nav .nav-pill {
    margin-left: auto; font-size: 11px; font-weight: 800;
    background: var(--saffron); color: var(--ink);
    padding: 1px 8px; border-radius: 99px;
}
.logout-link { color: rgba(255,255,255,.55) !important; }
.sidebar-foot {
    padding: 14px 18px calc(16px + var(--safe-b));
    border-top: 1px solid rgba(255,255,255,.07);
    font-size: 12px; color: rgba(255,255,255,.4);
    display: flex; justify-content: space-between; align-items: center;
}

.main-col { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* Top bar */
.topbar {
    position: sticky; top: 0; z-index: 900;
    height: var(--topbar-h);
    display: flex; align-items: center; gap: 12px;
    padding: 0 24px;
    background: rgba(244,245,250,.86);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 18px; font-weight: 800; letter-spacing: -.02em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    display: inline-grid; place-items: center; font-size: 17px; cursor: pointer;
    text-decoration: none; transition: border-color .15s, background .15s;
    flex-shrink: 0;
}
.icon-btn:hover { border-color: #cfd2de; }
.icon-btn.is-off { color: var(--muted); }
.hamburger { display: none; }

.main-content { flex: 1; padding: 24px; min-width: 0; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(27,16,51,.45); z-index: 999;
    backdrop-filter: blur(2px);
}
.mobile-topbar { display: none; }
.bottom-nav { display: none; }

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); width: 284px; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .close-sidebar { display: grid; place-items: center; }
    .sidebar-overlay.show { display: block; }
    .main-col { margin-left: 0; }
    .topbar { padding: 0 12px; height: 58px; background: var(--surface); }
    .topbar-title { font-size: 17px; }
    .hamburger { display: inline-grid; }
    .topbar .hide-sm { display: none; }
    .main-content { padding: 14px 12px calc(var(--bottomnav-h) + 18px + var(--safe-b)); }

    .bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
        height: calc(var(--bottomnav-h) + var(--safe-b));
        padding-bottom: var(--safe-b);
        background: var(--surface);
        border-top: 1px solid var(--line);
        box-shadow: 0 -6px 24px rgba(27,16,51,.06);
    }
    .bottom-nav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none;
    }
    .bottom-nav a i { font-size: 21px; line-height: 1; }
    .bottom-nav a.active { color: var(--text); }
    .bottom-nav a.active i { color: var(--rasp); }
    .bottom-nav a.bn-buy.active i { color: var(--pista); }
    .bottom-nav .bn-fab {
        width: 54px; height: 54px; margin-top: -26px; border-radius: 18px;
        background: var(--rasp); color: #fff;
        display: grid; place-items: center;
        box-shadow: 0 8px 20px rgba(224,36,94,.38), inset 0 -3px 0 rgba(0,0,0,.15);
        border: 4px solid var(--surface);
    }
    .bottom-nav .bn-fab i { font-size: 22px; color: #fff !important; }
    .bottom-nav .bn-sell.active { color: var(--rasp); }
}

/* =====================================================================
   Page structure
   ===================================================================== */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px;
    margin-bottom: 18px;
}
.card-header {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    margin: -20px -20px 16px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line-2);
    font-weight: 700; font-size: 15.5px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-header { margin: 0; }

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px; margin-bottom: 20px;
}
.stat-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 16px 18px;
    border-radius: var(--r-lg);
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; color: inherit;
    transition: border-color .15s, transform .15s;
}
a.stat-card:hover { border-color: #cfd2de; transform: translateY(-1px); }
.stat-icon {
    width: 46px; height: 46px; flex-shrink: 0;
    border-radius: 14px;
    display: grid; place-items: center;
    background: var(--rasp-soft); color: var(--rasp);
    font-size: 21px;
}
.stat-card.success .stat-icon { background: var(--pista-soft); color: var(--pista); }
.stat-card.warning .stat-icon { background: var(--saffron-soft); color: #B97A00; }
.stat-card.info .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat-card.danger .stat-icon { background: var(--red-soft); color: var(--red); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.25; }
.stat-go { position: absolute; top: 12px; right: 12px; color: #c4c7d4; font-size: 15px; }

/* =====================================================================
   Forms
   ===================================================================== */
.form-group { margin-bottom: 14px; }
.form-label, .form-group > label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13.5px; color: var(--text); }
.form-control, .form-select {
    width: 100%;
    padding: 10px 13px;
    font: inherit; font-size: 14.5px;
    color: var(--text);
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background-color: var(--surface);
    transition: border-color .15s, box-shadow .15s;
}
select.form-control, select.form-select {
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7085' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
textarea.form-control { min-height: 80px; resize: vertical; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--rasp); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--rasp); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 17px;
    font: inherit; font-size: 14px; font-weight: 700;
    border: 1.5px solid transparent;
    border-radius: 11px;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
    user-select: none; -webkit-user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--rasp); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); }
.btn-primary:hover { background: var(--rasp-dark); }
.btn-success, .btn-buy { background: var(--pista); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); }
.btn-success:hover, .btn-buy:hover { background: var(--pista-dark); }
.btn-danger { background: var(--red); color: #fff; }
.btn-warning { background: var(--saffron); color: var(--ink); }
.btn-info { background: var(--blue); color: #fff; }
.btn-secondary { background: #EEF0F5; color: var(--text); }
.btn-secondary:hover { background: #E3E6EE; }
.btn-outline {
    background: var(--surface); border: 1.5px solid var(--line); color: var(--text);
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
    border-radius: 11px; font-weight: 700; cursor: pointer;
}
a.btn-outline:not(.btn) { padding: 6px 12px; font-size: 13px; }
.btn-outline:hover { border-color: #cfd2de; background: #FAFBFD; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #EEF0F5; color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

/* =====================================================================
   Tables
   ===================================================================== */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table thead th {
    background: #FAFBFD; font-weight: 700; font-size: 12.5px; color: var(--muted);
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #FAFBFD; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
tr.row-link { cursor: pointer; }

/* =====================================================================
   Badges, alerts, chips
   ===================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; font-size: 12px; font-weight: 700;
    border-radius: 99px; text-transform: capitalize; white-space: nowrap;
}
.badge-success { background: var(--pista-soft); color: var(--pista-dark); }
.badge-warning { background: var(--saffron-soft); color: #9A6500; }
.badge-danger  { background: var(--red-soft); color: #B4262B; }
.badge-info    { background: var(--blue-soft); color: #2A55B8; }
.badge-muted   { background: #EEF0F5; color: var(--muted); }
.badge-rasp    { background: var(--rasp-soft); color: var(--rasp-dark); }

.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 44px 12px 14px; margin-bottom: 16px;
    border-radius: var(--r-md); position: relative;
    font-size: 14px; font-weight: 500; text-decoration: none;
    border: 1px solid transparent;
}
.alert-success { background: var(--pista-soft); color: #11603C; border-color: #BFE8D2; }
.alert-danger  { background: var(--red-soft); color: #9B1C20; border-color: #F6C9CA; }
.alert-warning { background: var(--saffron-soft); color: #7A5100; border-color: #F7DFA6; }
.alert-info    { background: var(--blue-soft); color: #1F4398; border-color: #C9D8F8; }
.alert-dead    { background: #F2EEFB; color: #4B2E83; border-color: #DDD3F3; }
.close-alert { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 22px; line-height: 1; opacity: .6; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
    border-radius: 99px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; white-space: nowrap;
}
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* =====================================================================
   Modal — centred on desktop, bottom sheet on phones
   ===================================================================== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(27,16,51,.5);
    backdrop-filter: blur(3px);
    z-index: 2000;
    align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; animation: fadeIn .15s ease; }
.modal {
    background: var(--surface);
    border-radius: 20px;
    max-width: 600px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: popIn .2s cubic-bezier(.2,.9,.3,1.2);
}
.modal-header {
    padding: 16px 20px; border-bottom: 1px solid var(--line-2);
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 800; font-size: 16px;
    position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; }
.modal-close {
    width: 34px; height: 34px; border-radius: 10px; border: 0;
    background: #EEF0F5; font-size: 20px; cursor: pointer; line-height: 1; color: var(--muted);
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px) } to { opacity: 1; transform: none } }
@keyframes sheetUp { from { transform: translateY(100%) } to { transform: none } }
@media (max-width: 640px) {
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal { border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheetUp .25s cubic-bezier(.2,.9,.3,1); padding-bottom: var(--safe-b); }
    .modal-header { padding-top: 20px; }
    .modal-header::before {
        content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
        width: 40px; height: 4px; border-radius: 4px; background: #D9DCE6;
    }
}

/* =====================================================================
   Toasts (stacked)
   ===================================================================== */
.toast-stack {
    position: fixed; z-index: 5000; right: 20px; bottom: 20px;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex; align-items: center; gap: 10px;
    background: var(--ink); color: #fff;
    padding: 11px 16px 11px 12px;
    border-radius: 14px;
    font-size: 14px; font-weight: 600;
    box-shadow: 0 10px 30px rgba(27,16,51,.28);
    max-width: 380px;
    animation: toastIn .25s cubic-bezier(.2,.9,.3,1.2);
}
.toast .t-ico {
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 14px;
    background: rgba(255,255,255,.14);
}
.toast.success .t-ico { background: var(--pista); }
.toast.error .t-ico   { background: var(--red); }
.toast.warning .t-ico { background: var(--saffron); color: var(--ink); }
.toast.info .t-ico    { background: var(--blue); }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96) } to { opacity: 1; transform: none } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) } }
@media (max-width: 900px) {
    .toast-stack { right: 12px; left: 12px; bottom: auto; top: calc(66px + env(safe-area-inset-top, 0px)); align-items: center; }
    .toast { max-width: 100%; }
}

/* =====================================================================
   Install banner (PWA / APK)
   ===================================================================== */
.install-banner {
    position: fixed; z-index: 4500;
    left: 50%; transform: translateX(-50%) translateY(160%);
    bottom: 22px; width: min(470px, calc(100% - 24px));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px 14px 14px 14px;
    box-shadow: var(--shadow-lg);
    display: flex; align-items: center; gap: 12px;
    transition: transform .35s cubic-bezier(.2,.9,.3,1.1);
}
.install-banner.show { transform: translateX(-50%) translateY(0); }
.install-banner img { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; }
.install-banner .ib-text { flex: 1; min-width: 0; }
.install-banner .ib-title { font-weight: 800; font-size: 15px; }
.install-banner .ib-sub { font-size: 13px; color: var(--muted); line-height: 1.35; }
.install-banner .ib-actions { display: flex; flex-direction: column; gap: 6px; }
.install-banner .ib-x { position: absolute; top: 4px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px; }
@media (max-width: 900px) { .install-banner { bottom: calc(var(--bottomnav-h) + 12px + var(--safe-b)); } }
.login-page .install-banner { bottom: 22px; }

.ios-steps { display: grid; gap: 12px; font-size: 14.5px; }
.ios-steps div { display: flex; gap: 12px; align-items: center; }
.ios-steps i { width: 36px; height: 36px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }

/* =====================================================================
   Receipt motif — perforated paper edge on totals panels
   ===================================================================== */
.receipt { position: relative; background: var(--surface); --tooth: 8px; }
.receipt-top::before, .receipt-bottom::after {
    content: ''; position: absolute; left: 0; right: 0; height: var(--tooth);
    background-size: calc(var(--tooth) * 2) var(--tooth);
    background-repeat: repeat-x;
    pointer-events: none;
}
.receipt-top::before {
    top: calc(var(--tooth) * -1 + 1px);
    background-image:
        linear-gradient(135deg, transparent 50%, var(--surface) 50%),
        linear-gradient(225deg, transparent 50%, var(--surface) 50%);
    background-position: 0 0, var(--tooth) 0;
}
.receipt-bottom::after {
    bottom: calc(var(--tooth) * -1 + 1px);
    background-image:
        linear-gradient(45deg, transparent 50%, var(--surface) 50%),
        linear-gradient(-45deg, transparent 50%, var(--surface) 50%);
    background-position: 0 0, var(--tooth) 0;
}

/* =====================================================================
   Login
   ===================================================================== */
.login-wrapper {
    min-height: 100vh; min-height: 100dvh;
    display: grid; grid-template-columns: 1.05fr 1fr;
    background: var(--surface);
}
.login-art {
    background: var(--ink); color: #fff;
    padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
    position: relative; overflow: hidden;
}
.login-art .la-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; }
.login-art h1 { font-family: var(--font-num); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; max-width: 13ch; }
.login-art p { color: rgba(255,255,255,.62); max-width: 40ch; margin-top: 14px; font-size: 15.5px; }
.login-slip {
    background: #fff; color: var(--text); width: 290px;
    padding: 18px 18px 20px; font-size: 13px; transform: rotate(-3deg);
    box-shadow: 0 30px 60px rgba(0,0,0,.35); align-self: flex-end; margin: 0 6% 12px 0;
}
.login-slip .ls-head { text-align: center; font-weight: 800; font-size: 14px; padding-bottom: 8px; border-bottom: 1px dashed #D9DCE6; margin-bottom: 6px; }
.login-slip .ls-row { display: flex; justify-content: space-between; padding: 4px 0; color: #4A4E63; }
.login-slip .ls-total { display: flex; justify-content: space-between; font-family: var(--font-num); font-weight: 700; font-size: 20px; padding-top: 10px; margin-top: 6px; border-top: 1px dashed #D9DCE6; }
.login-slip .ls-total span:last-child { color: var(--rasp); }
.login-pane { display: flex; align-items: center; justify-content: center; padding: 32px 22px; }
.login-card { width: 100%; max-width: 380px; }
.login-logo { margin-bottom: 26px; }
.login-logo .icon { width: 56px; height: 56px; border-radius: 17px; background: var(--rasp); color: #fff; display: grid; place-items: center; font-size: 26px; margin-bottom: 18px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.login-logo h2 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.login-logo p { color: var(--muted); margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 44px; }
.pw-wrap .pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 17px; cursor: pointer; padding: 6px 8px; }
@media (max-width: 860px) {
    .login-wrapper { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .login-art { padding: 22px 22px 26px; gap: 18px; }
    .login-art h1 { font-size: 27px; }
    .login-slip, .login-art p { display: none; }
    .login-pane { align-items: flex-start; padding-top: 26px; }
}

/* =====================================================================
   Utilities
   ===================================================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-success { color: var(--pista-dark); }
.text-danger { color: var(--red); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; } .gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.flex-1 { flex: 1; } .flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state i { font-size: 40px; display: block; margin-bottom: 8px; color: #C9CCD8; }
.empty-state .btn { margin-top: 14px; }

kbd {
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; line-height: 1;
    background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px;
    border-radius: 5px; padding: 2px 6px; color: var(--muted);
}

/* Old POS classes kept for any page still using them */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.product-tile { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: center; }
.product-tile .price { color: var(--rasp); font-weight: 800; }
.qty-btn { background: #EEF0F5; border: none; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.summary-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.summary-row.total { font-size: 18px; font-weight: 800; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; color: var(--rasp); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
    body { background: #fff; }
    .no-print, .sidebar, .topbar, .bottom-nav, .toast-stack, .install-banner, .sc-fab { display: none !important; }
    .main-col { margin: 0; }
    .main-content { padding: 0; }
    .app-wrapper { display: block; }
    .card { border: 0; }
}

/* Phones: 16px inputs stop iOS from zooming the page when a box is tapped */
@media (max-width: 900px) {
    input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }
    .btn { min-height: 42px; }
    .btn-sm { min-height: 36px; }
}
