/*
 * GannaKhatabook shared stylesheet + theme system.
 *
 * Themes recolor the whole site (navbar/footer gradient, links, primary
 * buttons/badges, form focus rings, pagination, dropdown highlights, etc.)
 * via the --theme-* custom properties below. Bootstrap here is v5.1.3, which
 * predates its own --bs-* variable system, so "theme everything" is done by
 * overriding the relevant Bootstrap classes directly (.btn-primary,
 * .bg-primary, .page-link, ...) further down in the SITE-WIDE THEME section,
 * rather than by redefining Bootstrap variables. Financial status colors
 * (profit=green, loss=red, warning=amber on the stat tiles) are deliberately
 * NOT themed -- they carry meaning in a money-tracking app that shouldn't
 * shift with a color scheme choice.
 *
 * To add an 11th theme: copy one [data-theme="..."] block, pick a new name,
 * and change the 6 --theme-* values. Card/table surface colors (--theme-surface,
 * --theme-surface-border, --theme-table-stripe, --theme-table-hover) are derived
 * automatically from --theme-nav-3 via color-mix(), so new themes get them for free.
 */

:root {
    --pro-border: #e9ecef;
    --pro-muted: #6c757d;
    --card-radius: .6rem;
    --card-shadow: 0 6px 18px rgba(18,38,63,0.06);

    /* Default theme: Sugarcane Green */
    --theme-nav-1: #0d3d2e;
    --theme-nav-2: #1e6b46;
    --theme-nav-3: #3a7a4c;
    --theme-accent: #d99a2b;
    --theme-accent-light: #ffc857;
    --theme-accent-soft: #ffd88a;
}

/* Derived surface tints -- computed from the 6 --theme-* values above via
   color-mix() so every theme automatically gets a matching card/table/border
   treatment without needing 4 more hand-picked colors per [data-theme] block. */
:root, [data-theme] {
    --theme-surface: color-mix(in srgb, var(--theme-nav-3) 4%, #ffffff);
    --theme-surface-header: color-mix(in srgb, var(--theme-nav-3) 8%, #ffffff);
    --theme-surface-border: color-mix(in srgb, var(--theme-nav-3) 20%, #ffffff);
    --theme-table-stripe: color-mix(in srgb, var(--theme-nav-3) 5%, #ffffff);
    --theme-table-hover: color-mix(in srgb, var(--theme-nav-3) 9%, #ffffff);
}

/* ============ THEMES ============ */
[data-theme="sugarcane-green"] {
    --theme-nav-1: #0d3d2e; --theme-nav-2: #1e6b46; --theme-nav-3: #3a7a4c;
    --theme-accent: #d99a2b; --theme-accent-light: #ffc857; --theme-accent-soft: #ffd88a;
}
[data-theme="royal-indigo"] {
    --theme-nav-1: #241654; --theme-nav-2: #3d2a7a; --theme-nav-3: #5b3fa0;
    --theme-accent: #f2b705; --theme-accent-light: #ffd23f; --theme-accent-soft: #f7dc6f;
}
[data-theme="ocean-blue"] {
    --theme-nav-1: #062a4a; --theme-nav-2: #0e4a7b; --theme-nav-3: #1a6ba8;
    --theme-accent: #2dd4c8; --theme-accent-light: #5eead4; --theme-accent-soft: #99f6e4;
}
[data-theme="sunset-orange"] {
    --theme-nav-1: #5c1a08; --theme-nav-2: #9c3a12; --theme-nav-3: #d9631f;
    --theme-accent: #ffce54; --theme-accent-light: #ffe08a; --theme-accent-soft: #ffedbb;
}
[data-theme="ruby-red"] {
    --theme-nav-1: #4a0d1a; --theme-nav-2: #7a1530; --theme-nav-3: #a8203f;
    --theme-accent: #f2a65a; --theme-accent-light: #ffc98a; --theme-accent-soft: #ffdfb0;
}
[data-theme="emerald-teal"] {
    --theme-nav-1: #033b3a; --theme-nav-2: #0a5c56; --theme-nav-3: #128a77;
    --theme-accent: #7fffd4; --theme-accent-light: #a8ffe5; --theme-accent-soft: #ccfff0;
}
[data-theme="midnight-dark"] {
    --theme-nav-1: #0a0e1a; --theme-nav-2: #141b30; --theme-nav-3: #1f2a4a;
    --theme-accent: #4ea8ff; --theme-accent-light: #7cc4ff; --theme-accent-soft: #b3ddff;
}
[data-theme="earth-brown"] {
    --theme-nav-1: #2e1a0e; --theme-nav-2: #4f2f1a; --theme-nav-3: #75471f;
    --theme-accent: #e0a458; --theme-accent-light: #f0c583; --theme-accent-soft: #f8ddb0;
}
[data-theme="rose-berry"] {
    --theme-nav-1: #3d0e26; --theme-nav-2: #641a41; --theme-nav-3: #8f2a5e;
    --theme-accent: #ff9ecb; --theme-accent-light: #ffc1e0; --theme-accent-soft: #ffd9ec;
}
[data-theme="slate-gray"] {
    --theme-nav-1: #1c2126; --theme-nav-2: #33393f; --theme-nav-3: #4a5158;
    --theme-accent: #7fd1ff; --theme-accent-light: #a9e2ff; --theme-accent-soft: #cdeeff;
}

/* ============ BASE LAYOUT ============ */
/* Bootstrap's default 16px root makes headings, buttons, and table padding
   feel oversized on a typical desktop screen (users reported the app only
   "looks right" at 80% browser zoom). Dropping the root size to 14px scales
   every rem-based font-size/spacing value down proportionally -- matching
   what 80-87.5% zoom does -- without relying on the user manually zooming. */
html { font-size: 87.5%; }
html, body { height: 100%; }
body {
    background: #f8f9fb;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Safety net: nothing on the page (esp. the navbar row) should ever be able
       to push the whole page into horizontal scroll -- if a child is too wide
       it clips instead, rather than shifting all page content sideways. */
    overflow-x: hidden;
}
.main-content {
    flex: 1 0 auto;
    width: 100%;
}
.app-footer {
    flex-shrink: 0;
}

/* ============ SITE-WIDE THEME (links, buttons, forms, etc.) ============
 * Bootstrap 5.1.3 predates its own CSS-variable theming, so these override
 * the Bootstrap classes directly instead of redefining --bs-* variables.
 * Kept deliberately separate from the STATUS COLORS section below, which
 * stays fixed across all themes on purpose.
 */
a { color: var(--theme-nav-2); }
a:hover { color: var(--theme-nav-1); }

.btn-primary {
    background: linear-gradient(135deg, var(--theme-nav-2) 0%, var(--theme-nav-1) 100%);
    border-color: var(--theme-nav-1);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, var(--theme-nav-1) 0%, var(--theme-nav-1) 100%);
    border-color: var(--theme-nav-1);
}
.btn-primary:focus,
.btn-check:focus + .btn-primary,
.btn-primary:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(0,0,0,0.15);
}
.btn-outline-primary {
    color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
}
.btn-outline-primary:hover,
.btn-outline-primary:active {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
}
/* Bootstrap's own stylesheet has a separate, more specific rule for the
   literal ".active" toggle class (used for a persistently-selected tab,
   e.g. audit_logs.php's Data Changes/Login Attempts switch) that isn't
   covered by the :hover/:active pseudo-classes above -- without this it
   falls back to Bootstrap's default blue instead of the theme color. */
.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
    color: #fff;
}

/* Most of the app's primary action buttons (Save, New Entry, etc.) use
   .btn-success rather than .btn-primary -- theme it the same way so picking
   a theme actually recolors the buttons users interact with the most. */
.btn-success {
    background: linear-gradient(135deg, var(--theme-nav-2) 0%, var(--theme-nav-1) 100%);
    border-color: var(--theme-nav-1);
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background: linear-gradient(135deg, var(--theme-nav-1) 0%, var(--theme-nav-1) 100%);
    border-color: var(--theme-nav-1);
}
.btn-success:focus,
.btn-check:focus + .btn-success,
.btn-success:focus-visible {
    box-shadow: 0 0 0 .25rem rgba(0,0,0,0.15);
}
.btn-outline-success {
    color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
}
.btn-outline-success:hover,
.btn-outline-success:active {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
}
.btn-outline-success.active,
.btn-check:checked + .btn-outline-success {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
    color: #fff;
}

/* Export CSV, Cancel, Reset, Back, Regenerate Codes, etc. all use
   .btn-outline-secondary -- theme it too so those aren't left in
   Bootstrap's stock grey regardless of the chosen palette. */
.btn-outline-secondary {
    color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:active {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
    color: #fff;
}
.btn-outline-secondary.active,
.btn-check:checked + .btn-outline-secondary {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
    color: #fff;
}

/* Secondary action buttons (Save Farmer/Profile use .btn-dark, Save
   Transaction uses .btn-warning, Log Expense uses .btn-danger) also need
   theming, or picking a theme leaves them stuck on Bootstrap's stock
   black/yellow/red regardless of the chosen palette. */
.btn-dark {
    background: linear-gradient(135deg, var(--theme-nav-3) 0%, var(--theme-nav-1) 100%);
    border-color: var(--theme-nav-1);
}
.btn-dark:hover,
.btn-dark:focus,
.btn-dark:active {
    background: var(--theme-nav-1);
    border-color: var(--theme-nav-1);
}
.btn-danger {
    background: linear-gradient(135deg, var(--theme-nav-2) 0%, var(--theme-nav-1) 100%);
    border-color: var(--theme-nav-1);
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background: linear-gradient(135deg, var(--theme-nav-1) 0%, var(--theme-nav-1) 100%);
    border-color: var(--theme-nav-1);
}
.btn-warning {
    background: linear-gradient(135deg, var(--theme-accent-light) 0%, var(--theme-accent) 100%);
    border-color: var(--theme-accent);
    color: #2b1a00;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
    color: #2b1a00;
}

.bg-primary { background-color: var(--theme-nav-2) !important; }
.text-primary { color: var(--theme-nav-2) !important; }
.border-primary { border-color: var(--theme-accent) !important; }
.badge.bg-primary { background-color: var(--theme-nav-2) !important; }

.form-control:focus,
.form-select:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--theme-accent) 25%, transparent);
}
.form-check-input:checked {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
}
.form-check-input:focus {
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--theme-accent) 25%, transparent);
}

.page-link { color: var(--theme-nav-2); }
.page-link:hover { color: var(--theme-nav-1); }
.page-item.active .page-link {
    background-color: var(--theme-nav-2);
    border-color: var(--theme-nav-2);
}

.dropdown-item:active,
.dropdown-item.active {
    background-color: var(--theme-nav-2);
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--theme-accent) !important;
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--theme-accent) 25%, transparent) !important;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--theme-nav-2) !important;
}

/* ============ CARDS ============ */
.card {
    border-color: var(--theme-surface-border);
}
.card > .card-header {
    background-color: var(--theme-surface-header);
    border-bottom-color: var(--theme-surface-border);
}
.soft-card {
    margin-bottom: 1.5rem;
    border: 1px solid var(--theme-surface-border);
    border-radius: var(--card-radius);
    background: linear-gradient(180deg, #ffffff 0%, var(--theme-surface) 100%);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.soft-card .card-header {
    background: var(--theme-surface-header);
    border-bottom: 1px solid var(--theme-surface-border);
    font-weight: 600;
    font-size: 1rem;
}
.stat-icon { font-size: 28px; opacity: .95; }
.stat-sub { font-size: 0.85rem; color: var(--pro-muted); }
.badge-subtle { padding: .35em .6em; border-radius: .35rem; }

.btn-pro {
    border-radius: 0.5rem;
    padding: .5rem .75rem;
    font-weight: 600;
}

.select2-container--bootstrap-5 .select2-selection--single {
    min-height: calc(1.5em + 0.75rem + 2px);
    border-radius: .5rem;
    padding: .375rem .75rem;
}
.select2-container--bootstrap-5 .select2-selection__rendered {
    line-height: 1.7;
}
.select2-container--bootstrap-5 .select2-selection__arrow {
    top: 50%;
    transform: translateY(-50%);
}

.nav-link { color: #495057; }

/* ============ APP NAVBAR (themed) ============ */
.app-navbar {
    background: linear-gradient(90deg, var(--theme-nav-1) 0%, var(--theme-nav-2) 55%, var(--theme-nav-3) 100%);
    border-bottom: 3px solid var(--theme-accent);
    padding-top: .6rem;
    padding-bottom: .6rem;
}
/* At lg+ the collapse renders as a single flex row. With this many items
   (11 page links + 7 right-side controls) that's too wide to fit as-is below
   a very wide monitor, so below 2100px everything shrinks to icon-only
   (see the nav-label / badge-text rules below) so the whole row keeps
   fitting on one line without wrapping, scrolling, or clipping. */
@media (min-width: 992px) {
    .app-navbar .navbar-collapse {
        flex-wrap: nowrap;
        /* No overflow-x/y here: an overflow value other than visible on this
           ancestor clips any dropdown-menu (More, theme picker, notifications)
           that opens inside it, since absolutely-positioned children are still
           clipped by an ancestor's overflow box. The priority-nav script below
           keeps this row's content within the available width itself; body
           has overflow-x:hidden as the page-level fallback if it ever can't. */
    }
    .app-navbar .navbar-nav {
        flex-wrap: nowrap;
    }
    .app-navbar .navbar-nav .nav-item,
    .app-navbar .navbar-nav .icon-btn,
    .app-navbar .navbar-nav .badge-user,
    .app-navbar .navbar-nav .badge-billing,
    .app-navbar .navbar-nav .badge-role,
    .app-navbar .navbar-nav .btn-logout {
        flex-shrink: 0;
    }
}
.app-navbar .navbar-brand {
    font-size: 1.3rem;
    letter-spacing: .2px;
}
.app-navbar .navbar-brand i {
    color: var(--theme-accent-soft);
}
.app-navbar .navbar-brand .nav-brand-icon {
    font-size: 1.7rem;
    line-height: 1;
    display: inline-block;
}
.app-navbar .navbar-nav .nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: .92rem;
    padding: .5rem .55rem;
    margin: 0;
    border-radius: .5rem;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
@media (max-width: 991.98px) {
    .app-navbar .navbar-nav .nav-link {
        white-space: normal;
    }
}
/* Page links (left) always keep their icon + name label -- only the
   right-side cluster (billing/user/role/logout) collapses to icon-only
   below a wide screen, to leave room for the labeled links. If the row
   still doesn't fit at a given width, the navbar-collapse rule above lets
   it scroll horizontally rather than clipping or wrapping. */
@media (min-width: 992px) and (max-width: 2099.98px) {
    /* Same reasoning for the right-side cluster: collapse the billing/user/logout
       badges to icon-only (tooltip carries the text) so the row keeps fitting. */
    .app-navbar .badge-text {
        display: none;
    }
    .app-navbar .badge-user,
    .app-navbar .badge-billing,
    .app-navbar .badge-role {
        padding: .45rem .55rem;
        border-radius: 50%;
    }
    .app-navbar .badge-user i,
    .app-navbar .badge-billing i,
    .app-navbar .badge-role i {
        margin-right: 0 !important;
    }
    .app-navbar .btn-logout {
        padding: .45rem .6rem;
        border-radius: 50%;
    }
    .app-navbar .btn-logout i {
        margin-right: 0 !important;
    }
}
.app-navbar .navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.09);
}
.app-navbar .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255,255,255,0.16);
    box-shadow: inset 0 -3px 0 var(--theme-accent-light);
}
/* Links moved into the "More" overflow dropdown sit on a light dropdown-menu
   background, so they need the ordinary dark dropdown-item look instead of
   the white-on-transparent styling the same .nav-link class gets in the bar. */
.app-navbar #moreNavMenu {
    min-width: 200px;
}
.app-navbar #moreNavMenu .nav-link {
    color: #212529;
    border-radius: 0;
    padding: .5rem 1rem;
}
.app-navbar #moreNavMenu .nav-link:hover {
    color: #212529;
    background-color: #f1f3f5;
}
.app-navbar #moreNavMenu .nav-link.active {
    color: #212529;
    background-color: #eef6f1;
    box-shadow: none;
    font-weight: 600;
}
.app-navbar .icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    transition: background-color .15s ease, transform .15s ease;
}
.app-navbar .icon-btn:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
    transform: translateY(-1px);
}
.app-navbar .icon-btn.active {
    background: rgba(255,255,255,0.22);
    box-shadow: inset 0 -3px 0 var(--theme-accent-light);
}
.app-navbar .badge-user {
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-weight: 600;
    font-size: .88rem;
    padding: .45rem .75rem;
    border-radius: 2rem;
    border: 1px solid rgba(255,255,255,0.18);
    display: inline-block;
    white-space: nowrap;
}
.app-navbar .badge-billing {
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    padding: .42rem .7rem;
    border-radius: 2rem;
    display: inline-block;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.2);
}
.app-navbar .badge-role {
    font-weight: 700;
    font-size: .88rem;
    padding: .42rem .7rem;
    border-radius: 2rem;
    display: inline-block;
    white-space: nowrap;
}
/* Role badge colors stay fixed across all themes -- a consistent "who is this"
   visual language regardless of the chosen color scheme, same reasoning as
   the financial status colors below. */
.app-navbar .badge-role-admin {
    background: linear-gradient(135deg,#ffc35a,#d99a2b);
    color: #2b1a00;
}
.app-navbar .badge-role-operator {
    background: linear-gradient(135deg,#6cb3f2,#3b7fc4);
    color: #fff;
}
.app-navbar .btn-logout {
    border-radius: 2rem;
    padding: .45rem .9rem;
    font-size: .9rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    background: rgba(255,255,255,0.06);
    white-space: nowrap;
}
.app-navbar .btn-logout:hover {
    background: rgba(255,255,255,0.16);
    color: #fff;
}

/* ============ THEME SWITCHER ============ */
.theme-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(255,255,255,0.5);
    flex-shrink: 0;
}
.theme-picker-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem .75rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.theme-picker-item:hover {
    background-color: #f1f3f5;
}
.theme-picker-item.active {
    background-color: #eef6f1;
    font-weight: 600;
}
.theme-picker-item .theme-check {
    margin-left: auto;
    opacity: 0;
}
.theme-picker-item.active .theme-check {
    opacity: 1;
}

/* ============ APP FOOTER (themed to match navbar) ============ */
.app-footer {
    background: linear-gradient(90deg, var(--theme-nav-1) 0%, var(--theme-nav-2) 55%, var(--theme-nav-3) 100%);
    border-top: 3px solid var(--theme-accent);
    color: rgba(255,255,255,0.85);
}
.app-footer .app-footer-brand {
    font-size: 1.05rem;
    color: var(--theme-accent-soft);
    margin-bottom: .3rem;
}
.app-footer small {
    color: rgba(255,255,255,0.75);
}

/* ============ LOGIN / AUTH PAGES (themed background) ============ */
body.login-bg {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 35%, rgba(255,255,255,0.06), rgba(255,255,255,0) 45%),
        linear-gradient(135deg, var(--theme-nav-1) 0%, var(--theme-nav-2) 45%, var(--theme-nav-3) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='white' stroke-width='2' stroke-linecap='round' opacity='0.09'%3E%3Cpath d='M12 140 L30 0'/%3E%3Cpath d='M65 140 L83 0'/%3E%3Cpath d='M118 140 L136 0'/%3E%3Cpath d='M18 46 Q33 39 40 22'/%3E%3Cpath d='M71 96 Q86 89 93 72'/%3E%3Cpath d='M124 30 Q139 23 146 6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover, cover, 140px 140px;
    background-repeat: no-repeat, no-repeat, repeat;
    background-attachment: fixed, fixed, fixed;
}
.login-watermark {
    position: fixed;
    bottom: -40px;
    right: -30px;
    font-size: 260px;
    opacity: 0.08;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.login-card {
    backdrop-filter: blur(2px);
    border: none;
}
.login-brand-icon {
    font-size: 2.2rem;
    line-height: 1;
}

/* ============ USERS TABLE ============ */
#usersTable_wrapper {
    max-width: 100%;
    overflow-x: hidden;
}
#usersTable th,
#usersTable td {
    white-space: normal;
    vertical-align: middle;
}
#usersTable .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
#usersTable .action-buttons form {
    margin: 0;
}
#usersTable .action-buttons button {
    min-width: 0;
}

/* ============ TABLES ============ */
.table thead th { border-bottom: 1px solid var(--theme-surface-border); background: var(--theme-surface-header); }
.table tbody tr:hover { background: var(--theme-table-hover); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background-color: var(--theme-table-stripe); }

/* ============ STATUS COLORS (never themed -- see file header comment) ============ */
.bg-success-subtle { background-color: rgba(25,135,84,0.12); }
.text-success { color: #198754 !important; }
.bg-danger-subtle { background-color: rgba(220,53,69,0.08); }
.text-danger { color: #dc3545 !important; }

.card-pro-success { background: linear-gradient(180deg,#198754,#17a673); color: #fff; }
.card-pro-primary { background: linear-gradient(180deg,#0d6efd,#0b5ed7); color: #fff; }
.card-pro-warning { background: linear-gradient(180deg,#ffc107,#ffbf00); color: #111; }
.card-pro-danger { background: linear-gradient(180deg,#dc3545,#c82333); color: #fff; }

.card-pro-success .stat-sub, .card-pro-primary .stat-sub, .card-pro-danger .stat-sub { color: rgba(255,255,255,0.9); }
.card-pro-warning .stat-sub { color: #222; }

@media print {
    .receipt {
        width: 80mm;
        height: 100mm;
        font-size: 12px;
    }
}
