:root {
    --brand-gold: #D4AF37;
    --brand-gold-light: #E8CD7A;
    /* Structural/chrome color - navbar text, solid dark buttons, avatars. Matches the
       landing page's own "slate" (the workhorse dark neutral there), kept distinct from
       gold so gold stays reserved for accents/highlights rather than being used as a
       full-surface color. */
    --brand-slate: #2C3E50;
    --brand-slate-dark: #1A2B4C;
    --brand-amber: #E67E22;
    --brand-bg: #FFFFFF;

    /* Re-point Bootstrap's own "primary" variables at the brand palette instead of its
       default blue - this alone re-themes focus rings, links, and any bg-primary/
       text-primary/badge usage across every page, without having to touch each one. */
    --bs-primary: var(--brand-slate);
    --bs-primary-rgb: 44, 62, 80;
    --bs-link-color: var(--brand-slate);
    --bs-link-color-rgb: 44, 62, 80;
    --bs-link-hover-color: var(--brand-slate-dark);
    --bs-link-hover-color-rgb: 26, 43, 76;
}
body {
    background: var(--brand-bg);
}
.app-navbar {
    background: var(--brand-bg);
    border-bottom: 3px solid var(--brand-gold);
}
.app-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-slate);
}
.app-navbar .navbar-brand img {
    height: 32px;
    width: auto;
}
.app-navbar .nav-link,
.app-navbar a.text-muted {
    color: var(--brand-slate) !important;
}
.app-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}
.app-sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e2e2e2;
    padding: 1rem 0;
    flex-shrink: 0;
}
.app-sidebar .nav-link {
    color: #333;
    padding: 0.6rem 1.25rem;
}
.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
    background: #FBF6E8;
    color: var(--brand-slate);
    font-weight: 600;
    border-right: 3px solid var(--brand-gold);
}
/* Collapsible "Reports" nav group (reportsNavGroup() in includes/sidebar.php) */
.app-sidebar .nav-group-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.app-sidebar .nav-caret {
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}
.app-sidebar .nav-group-toggle.collapsed .nav-caret {
    transform: rotate(-90deg);
}
.app-sidebar .nav-group-sub {
    padding-left: 0.75rem;
    border-left: 2px solid #eee;
    margin: 0.15rem 0 0.15rem 1.75rem;
}
.app-sidebar .nav-group-sub .nav-link {
    padding: 0.4rem 1rem;
    font-size: 0.92rem;
}
.app-content {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
}
.card-stat {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Open-tabs grid on dashboard.php - each card is a plain link, so this is the only visual cue
   that it's clickable. */
.tab-card {
    transition: box-shadow 0.15s, transform 0.1s;
}
.tab-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Themed table headers site-wide - plain white tables previously had no visual identity. */
.table thead th {
    background: var(--brand-slate);
    color: #fff;
    font-weight: 600;
    border-color: var(--brand-slate);
    vertical-align: middle;
}
.table thead th a {
    color: #fff;
}
.table-hover tbody tr:hover {
    --bs-table-accent-bg: #FBF6E8;
}
.badge-overdue {
    background: #dc3545;
}
.table-tabs th {
    white-space: nowrap;
}

/* Buttons themed to the brand palette */
.btn-dark {
    background-color: var(--brand-slate);
    border-color: var(--brand-slate);
}
.btn-dark:hover, .btn-dark:focus, .btn-dark:active {
    background-color: var(--brand-slate-dark) !important;
    border-color: var(--brand-slate-dark) !important;
}
.btn-outline-dark {
    color: var(--brand-slate);
    border-color: var(--brand-slate);
}
.btn-outline-dark:hover {
    background-color: var(--brand-slate);
    border-color: var(--brand-slate);
    color: #fff;
}
/* "Success" stays its own semantic green, independent of the brand palette - it means
   a positive/completed state, and that convention shouldn't shift just because the
   brand's secondary color changed. */
.btn-success {
    background-color: #5CBB94;
    border-color: #5CBB94;
}
.btn-success:hover, .btn-success:focus {
    background-color: #4aa47f !important;
    border-color: #4aa47f !important;
}
.btn-brand-orange {
    background-color: var(--brand-amber);
    border-color: var(--brand-amber);
    color: #fff;
}
.btn-brand-orange:hover {
    background-color: #C4680F;
    border-color: #C4680F;
    color: #fff;
}

/* Sauna checkpoint result banner (sauna_checkpoint.php) */
.checkpoint-result {
    text-align: center;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.checkpoint-result-icon {
    font-size: 2.5rem;
    line-height: 1;
}
.checkpoint-result-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0.25rem;
}
.checkpoint-result-detail {
    margin-top: 0.4rem;
}
.checkpoint-ok {
    background: #E8F5EE;
    border: 2px solid #5CBB94;
    color: #1e6b4a;
}
.checkpoint-fail {
    background: #FDECEB;
    border: 2px solid #dc3545;
    color: #8a1f2b;
}
#qrReaderWrap {
    border-radius: 8px;
    overflow: hidden;
}

/* Drill-down toggle rows (reports/sales.php's "Payments received, by mode") */
.mode-toggle-row { cursor: pointer; }
.mode-toggle-row:hover { background: #FBF6E8; }
.mode-toggle-row .nav-caret {
    display: inline-block;
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}
.mode-toggle-row[aria-expanded="true"] .nav-caret {
    transform: rotate(180deg);
}

/* Department tabs above the "Add item" product picker (tab_view.php) */
.dept-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.dept-tab {
    border: 1px solid #dfe3e8;
    background: #fff;
    color: var(--brand-slate);
    border-radius: 999px;
    padding: 0.32rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.dept-tab:hover {
    border-color: var(--brand-gold);
}
.dept-tab.active {
    background: var(--brand-slate);
    border-color: var(--brand-slate);
    color: #fff;
}

/* Category sub-tabs (e.g. Beers/Soft Drinks/Whiskeys & Wines within Bar) - one row per
   department that has more than one category, shown/hidden by app.js as the department tabs
   above switch. Lighter/smaller than .dept-tab so the two-level hierarchy still reads clearly. */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.category-tab {
    border: 1px solid #e5e2dc;
    background: #faf9f6;
    color: var(--brand-subtitle, #6b7280);
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.category-tab:hover {
    border-color: var(--brand-gold);
}
.category-tab.active {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: #fff;
}

/* Tap-to-add product tiles - the tenant-configurable alternative to the "Product" dropdown on
   tab_view.php's Add item form (see tenants.product_picker_style). */
.product-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}
.product-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.15rem;
    min-height: 92px;
    border: 1.5px solid #dfe3e8;
    border-left-width: 5px;
    background-color: #fff;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
}
/* An author `display` rule on the same element always beats the browser's own [hidden]
   default, so the department-tab filter's `tile.hidden = true` (assets/js/app.js) would
   otherwise leave every tile visibly on-screen no matter which department is selected. */
.product-tile[hidden] {
    display: none;
}
.product-tile:hover {
    border-color: var(--brand-gold);
}
.product-tile:active {
    transform: scale(0.97);
}
/* Selected state is a ring/glow, not a background swap - it has to stay visible whether the
   tile underneath is a photo, a color palette, or (in a moment before either loads) plain. */
.product-tile.active {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.55);
}
.product-tile-name {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.25;
    word-break: break-word;
}
.product-tile-price {
    position: relative;
    z-index: 1;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-slate);
}

/* A real product photo: a bottom-heavy dark gradient keeps the name/price legible over any
   image regardless of how bright or busy the photo itself is. */
.product-tile.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.4) 55%, rgba(0,0,0,0.85) 100%);
}

/* No photo (or this tenant has photos turned off entirely, see business_settings.
   show_product_images): a plain light card - NOT a colored background - with just a thin left
   accent border, assigned per product by a stable hash (see tab_view.php's crc32 pick) so the
   same product always lands on the same accent rather than shuffling on every reload. A wall of
   loud gradient tiles reads as messy/carnival-like at real menu sizes (a Bar alone can be 20-30
   tiles) and the white-on-color text needed reduced-opacity price text to avoid looking heavier
   than the product name - a light card with full-strength dark text is both tidier and easier to
   scan at a glance, which matters most here since this is exactly the state a tenant with photos
   off lives in for every single tile, not just the occasional one missing a photo.
   Deliberately not using .text-light - dark text-on-light stays the palette tiles' own default. */
.product-tile.palette-0 { border-left-color: #2C3E50; }
.product-tile.palette-1 { border-left-color: #7b4397; }
.product-tile.palette-2 { border-left-color: #0f9b8e; }
.product-tile.palette-3 { border-left-color: #e65c00; }
.product-tile.palette-4 { border-left-color: #4568dc; }
.product-tile.palette-5 { border-left-color: #c33764; }
.product-tile.palette-6 { border-left-color: #203a43; }
.product-tile.palette-7 { border-left-color: #b8860b; }

/* Only a real product photo needs light, shadowed text (see .has-image above) - it's the one
   case where the tile's own background is unpredictable (any photo, any brightness). */
.product-tile.text-light .product-tile-name,
.product-tile.text-light .product-tile-price {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.55);
}

/* Checkboxes/radios default to Bootstrap's pale gray border, which all but disappears on a
   white card - give them a visible brand-colored border and checked state everywhere. */
.form-check-input {
    border-color: var(--brand-slate);
}
.form-check-input:checked {
    background-color: var(--brand-slate);
    border-color: var(--brand-slate);
}
.form-check-input:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

/* Close-tab card (tab_close.php) */
.close-tab-card {
    overflow: hidden;
}
.close-tab-total {
    background: linear-gradient(135deg, var(--brand-slate-dark) 0%, var(--brand-slate) 100%);
    color: #fff;
    padding: 1.25rem 1.5rem;
}
.close-tab-total-label {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}
.close-tab-total-amount {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--brand-gold-light);
}
.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-slate);
    margin-bottom: 0.5rem;
}
.debt-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.debt-toggle:hover {
    border-color: var(--brand-gold);
}
.debt-toggle.is-active {
    background: #FBF3E7;
    border-color: var(--brand-amber);
}
.debt-toggle .form-check-input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.debt-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
}
.debt-toggle-text {
    line-height: 1.3;
}

/* Shift / switch-user controls in the navbar */
.shift-btn.is-open {
    background-color: var(--brand-amber);
    border-color: var(--brand-amber);
}

/* PIN pad (switch-user screen) */
.pin-dots {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1rem 0;
}
.pin-dots span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--brand-slate);
    background: transparent;
}
.pin-dots span.filled {
    background: var(--brand-slate);
}
.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 320px;
    margin: 0 auto;
}
.pin-pad button {
    font-size: 1.5rem;
    padding: 1rem 0;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
}
.pin-pad button:active {
    background: var(--brand-gold-light);
}
.user-tile {
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.user-tile:hover, .user-tile.selected {
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    border-color: var(--brand-gold-light);
}
.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-slate);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 0.5rem;
}
.shake {
    animation: shake 0.4s;
}
@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-8px); }
    40%, 60% { transform: translateX(8px); }
}

/* ==========================================================
   Login pages (auth/login.php, platform/login.php) - shared split-screen shell.
   Brand panel mirrors the landing page's own gradient/label language so the very
   first and very last screens a user sees feel like the same product.
   ========================================================== */
.auth-shell {
    min-height: 100vh;
    display: flex;
    font-family: 'Inter', sans-serif;
}
.auth-brand-panel {
    flex: 1 1 42%;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    color: #fff;
    background: linear-gradient(155deg, var(--brand-slate-dark) 0%, var(--brand-slate) 62%, #24384a 100%);
    overflow: hidden;
}
.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 12%, rgba(212, 175, 55, 0.16) 0%, transparent 45%),
                radial-gradient(circle at 85% 88%, rgba(230, 126, 34, 0.12) 0%, transparent 50%);
}
.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 380px;
}
.auth-logo {
    max-width: 180px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}
.auth-tenant-logo {
    display: block;
    max-width: 140px;
    max-height: 90px;
    object-fit: contain;
    margin: 0 auto 1.5rem;
}
.auth-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-gold-light);
    margin-bottom: 0.75rem;
}
.auth-brand-title {
    font-family: 'Anton', 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-size: 1.9rem;
    line-height: 1.15;
    margin-bottom: 0.9rem;
}
.auth-brand-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.82);
    margin-bottom: 2.5rem;
}
.auth-layers {
    display: flex;
    gap: 0.4rem;
    align-items: flex-end;
    height: 34px;
}
.auth-layers span {
    display: block;
    width: 34px;
    border-radius: 3px;
}
.auth-layers span:nth-child(1) { height: 60%; background: var(--brand-gold); }
.auth-layers span:nth-child(2) { height: 100%; background: var(--brand-amber); }
.auth-layers span:nth-child(3) { height: 78%; background: rgba(255,255,255,0.35); }
.auth-form-panel {
    flex: 1 1 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: var(--brand-bg);
}
.auth-form-card {
    width: 100%;
    max-width: 380px;
}
.auth-form-card .auth-mobile-logo {
    display: none;
    max-width: 140px;
    margin: 0 auto 1.5rem;
}
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-slate);
    margin-bottom: 0.25rem;
}
.auth-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}
.auth-form-card .form-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand-slate);
    margin-bottom: 0.4rem;
}
.auth-form-card .form-control {
    border: 1.5px solid #e5e2dc;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    background: #fdfcfa;
}
.auth-form-card .form-control:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.18);
    background: #fff;
}
.auth-submit-btn {
    background: var(--brand-slate);
    border-color: var(--brand-slate);
    color: #fff;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.15s;
}
.auth-submit-btn:hover {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: var(--brand-slate);
}
.auth-footer-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}
.auth-footer-link a {
    color: var(--brand-slate);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--brand-gold);
}
.auth-footer-link a:hover {
    color: var(--brand-gold);
}

@media (max-width: 860px) {
    .auth-brand-panel {
        display: none;
    }
    .auth-form-card .auth-mobile-logo {
        display: block;
    }
    .auth-form-panel {
        padding: 3rem 1.5rem;
    }
}

/* Mobile: collapse the sidebar into a horizontal scrollable strip */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e2e2;
        padding: 0.5rem 0;
        overflow-x: auto;
        white-space: nowrap;
    }
    .app-sidebar .nav {
        flex-direction: row;
    }
    .app-sidebar .nav-link.active,
    .app-sidebar .nav-link:hover {
        border-right: none;
        border-bottom: 3px solid var(--brand-gold);
    }
    .app-content {
        padding: 1rem;
    }
    .app-navbar span.d-none-mobile {
        display: none;
    }
}

/* products.php - collapsible add/edit panel above a full-width, height-capped product table.
   Capping the height keeps the horizontal scrollbar (when there is one) on screen instead of
   at the bottom of a 50+ row table, and the sticky header keeps column names visible. */
.product-form-panel summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.product-form-panel summary::-webkit-details-marker { display: none; }
.product-form-panel .product-form-body {
    max-width: 720px;
}
.products-table-wrap {
    max-height: 75vh;
    overflow: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.products-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    white-space: nowrap;
    box-shadow: inset 0 -1px 0 #dee2e6;
}
.products-table td {
    vertical-align: middle;
}

/* ---- Till look (tabs.php cards, tab_view.php qty stepper, tab_close.php payment) - matches the
   Android app's Tabs / order / payment screens so both read as one product. ---- */
.tab-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
}
.tab-card {
    display: flex;
    flex-direction: column;
    min-height: 128px;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid #e5e2dc;
    border-radius: 12px;
    color: var(--brand-slate);
    text-decoration: none;
    transition: border-color 0.12s, background 0.12s;
}
.tab-card:hover {
    border-color: var(--brand-gold);
    background: #fbf3dc;
    color: var(--brand-slate);
}
.tab-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tab-card-sub {
    color: #6b7280;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tab-card-foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.5rem;
}
.tab-card-meta {
    color: #6b7280;
    font-size: 0.8rem;
}
.tab-card-total {
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
}
.tab-card-new {
    align-items: center;
    justify-content: center;
    background: var(--brand-slate);
    border-color: var(--brand-slate);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
}
.tab-card-new:hover {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
    color: #fff;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.qty-stepper form {
    margin: 0;
}
.qty-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid #e5e2dc;
    background: #fff;
    color: var(--brand-slate);
    font-size: 1.1rem;
    line-height: 1;
}
.qty-btn:hover:not(:disabled) {
    border-color: var(--brand-gold);
    background: #fbf3dc;
}
.qty-btn:disabled {
    opacity: 0.3;
}
.qty-value {
    min-width: 1.6rem;
    text-align: center;
    font-weight: 700;
}

.pay-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.pay-mode {
    margin: 0;
    cursor: pointer;
}
.pay-mode input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pay-mode span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border: 1px solid #e5e2dc;
    border-radius: 12px;
    background: #fff;
    color: var(--brand-slate);
    font-size: 1.05rem;
}
.pay-mode input:checked + span {
    border: 2px solid var(--brand-gold);
    background: #fbf3dc;
    font-weight: 700;
}
.pay-mode input:focus-visible + span {
    outline: 2px solid var(--brand-slate);
    outline-offset: 2px;
}
.quick-cash {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.5rem;
}
.change-due {
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
}
.change-due.is-change {
    color: #1e7f4f;
}
.change-due.is-credit {
    color: var(--brand-amber);
}

/* dashboard.php - headline figures for a chosen period, then small cards and charts. */
.dash-range .btn { border-radius: 999px !important; margin: 0 4px 4px 0; }
.kpi {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 14px;
    padding: 18px;
    height: 100%;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-label { font-size: .75rem; color: #667085; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; }
.kpi-value { font-size: 1.7rem; font-weight: 700; color: var(--brand-slate); line-height: 1.15; word-break: break-word; }
.kpi-sub { font-size: .8rem; color: #667085; margin-top: 4px; }
.kpi-delta { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 1px 8px; margin-right: 4px; }
.kpi-delta.up { color: #067647; background: #ecfdf3; }
.kpi-delta.down { color: #b42318; background: #fef3f2; }
.kpi-sales .kpi-icon { background: #eef4ff; }
.kpi-stock .kpi-icon { background: #ecfdf3; }
.kpi-spend .kpi-icon { background: #fef3f2; }
.kpi-net .kpi-icon { background: #fdf6e3; }
.mini-stat {
    display: block;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    padding: 12px 14px;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
a.mini-stat:hover { border-color: var(--brand-gold); }
.mini-stat .mini-label { font-size: .75rem; color: #667085; }
.mini-stat .mini-value { font-size: 1.1rem; font-weight: 700; color: var(--brand-slate); }
.mini-stat.warn { background: #fffaeb; border-color: #fedf89; }
.mini-stat.alert-red { background: #fef3f2; border-color: #fecdca; }
.dash-panel { background: #fff; border: 1px solid #eef0f3; border-radius: 14px; padding: 16px; height: 100%; }
.dash-panel h2 { font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
.top-products td { padding: 6px 4px; vertical-align: middle; }
.top-products .bar { height: 6px; border-radius: 3px; background: var(--brand-gold); opacity: .85; }
