/* ==========================================================================
   RP BATTERY ERP - premium glass theme
   Colours come from a battery: red (+), green (charged) on deep navy-black.
   Change the colours here and the whole panel follows.
   ========================================================================== */

:root {
    --rp-red: #e5484d;
    --rp-red-dark: #c8343a;
    --rp-red-soft: #fdecec;
    --rp-green: #1fa65a;
    --rp-green-dark: #15803d;
    --rp-green-soft: #e6f6ec;
    --rp-navy: #0b1324;
    --rp-navy-2: #15203b;
    --rp-black: #0f1420;
    --rp-text: #1c2333;
    --rp-muted: #6b7385;
    --rp-border: rgba(15, 23, 42, .08);
    --glass: rgba(255, 255, 255, .64);
    --glass-strong: rgba(255, 255, 255, .82);
    --glass-border: rgba(255, 255, 255, .9);
    --shadow: 0 12px 32px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);
    --radius: 18px;
    --sidebar-width: 262px;
    --sidebar-small: 78px;
    --topbar-height: 62px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14.5px;
    color: var(--rp-text);
    background:
        radial-gradient(900px 520px at 105% -10%, rgba(229, 72, 77, .22), transparent 60%),
        radial-gradient(820px 540px at -8% 108%, rgba(31, 166, 90, .22), transparent 60%),
        radial-gradient(700px 500px at 55% 45%, rgba(56, 88, 190, .09), transparent 70%),
        linear-gradient(160deg, #f5f7fc, #eceff7);
    background-attachment: fixed;
}

a { color: var(--rp-red-dark); text-decoration: none; }
a:hover { color: var(--rp-navy); }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    overflow: hidden;
    color: #aeb7cb;
    background:
        radial-gradient(260px 200px at 0 0, rgba(229, 72, 77, .28), transparent 70%),
        radial-gradient(280px 240px at 100% 100%, rgba(31, 166, 90, .24), transparent 70%),
        linear-gradient(180deg, var(--rp-navy) 0%, var(--rp-navy-2) 60%, #0c1529 100%);
    box-shadow: 10px 0 40px rgba(11, 19, 36, .18);
    transition: width .2s ease, transform .2s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    height: 72px;
    padding: 0 18px;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: .6px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand:hover { color: #fff; }
.brand b { font-weight: 800; color: #ff6b70; }
.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 21px;
    color: #fff;
    background: linear-gradient(135deg, var(--rp-red), var(--rp-green));
    box-shadow: 0 8px 22px rgba(229, 72, 77, .4);
}
.brand-logo { flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; border-radius: 12px; background: #000; padding: 2px; }

.menu { flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; padding: 10px 12px 24px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }

/* Section title with a line above it */
.menu-section {
    margin: 12px 4px 6px;
    padding: 12px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, .09);
    color: #6f7b96;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    margin-bottom: 3px;
    border-radius: 12px;
    color: #c3cadb;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.menu-link > .bi:first-child { flex: 0 0 22px; font-size: 18px; text-align: center; }
.menu-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.menu-link.active {
    color: #fff;
    background: linear-gradient(90deg, var(--rp-red), rgba(229, 72, 77, .7));
    box-shadow: 0 10px 22px rgba(229, 72, 77, .35);
}
.menu-link.has-sub.active { background: rgba(255, 255, 255, .09); box-shadow: inset 3px 0 0 var(--rp-red); }
.menu-link .arrow { margin-left: auto; font-size: 11px; transition: transform .18s ease; }
.menu-link.collapsed .arrow { transform: rotate(-90deg); }
.menu-link.logout { color: #ff8a8e; }
.menu-link.logout:hover { color: #fff; background: rgba(229, 72, 77, .25); }

.submenu { margin: 2px 0 6px 25px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .12); }
.submenu a {
    display: block;
    padding: 7px 12px;
    border-radius: 9px;
    color: #96a1ba;
    font-size: 13.5px;
    white-space: nowrap;
}
.submenu a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.submenu a.active { color: #4ade80; font-weight: 600; background: rgba(31, 166, 90, .14); }

/* ==========================================================================
   Main area and top bar
   ========================================================================== */
.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: margin-left .2s ease;
}

.topbar {
    position: sticky;
    top: 12px;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--topbar-height);
    margin: 12px 18px 0;
    padding: 0 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass-strong);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--shadow);
}
.page-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .2px; }

.btn-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    font-size: 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--rp-navy), var(--rp-navy-2));
    box-shadow: 0 6px 16px rgba(11, 19, 36, .25);
}
.btn-icon:hover { background: linear-gradient(135deg, var(--rp-red), var(--rp-red-dark)); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--rp-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
}
.user-chip small { display: block; color: var(--rp-muted); font-weight: 400; }
.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--rp-red), var(--rp-green));
}

.dropdown-menu {
    padding: 8px;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-lg);
}
.dropdown-item { border-radius: 9px; padding: 8px 12px; }

.content { flex: 1; padding: 20px 18px; }
.footer { padding: 12px 18px 16px; color: var(--rp-muted); font-size: 12.5px; text-align: center; }

/* ---------- Sidebar small (desktop) ---------- */
@media (min-width: 992px) {
    body.sidebar-collapsed .sidebar { width: var(--sidebar-small); }
    body.sidebar-collapsed .main { margin-left: var(--sidebar-small); }
    body.sidebar-collapsed .sidebar:not(:hover) .brand-text,
    body.sidebar-collapsed .sidebar:not(:hover) .menu-link span,
    body.sidebar-collapsed .sidebar:not(:hover) .menu-link .arrow,
    body.sidebar-collapsed .sidebar:not(:hover) .submenu { display: none; }
    body.sidebar-collapsed .sidebar:not(:hover) .menu-section { font-size: 0; padding-top: 0; }
    /* Move the mouse over the small sidebar to open it for a moment. */
    body.sidebar-collapsed .sidebar:hover { width: var(--sidebar-width); box-shadow: 14px 0 50px rgba(11, 19, 36, .35); }
}

/* ---------- Sidebar on mobile: hidden, slides in ---------- */
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1030;
        background: rgba(11, 19, 36, .5);
        backdrop-filter: blur(3px);
    }
    .topbar { top: 8px; margin: 8px 10px 0; }
    .content { padding: 14px 10px; }
    .page-title { font-size: 16px; }
}

/* ==========================================================================
   Glass cards
   ========================================================================== */
.card, .glass {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: var(--shadow);
}
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--rp-border);
    background: transparent;
    font-weight: 700;
}
.card-header::before {
    content: "";
    flex: 0 0 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--rp-red), var(--rp-green));
}
.card-header:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.card-body { padding: 18px; }

/* ---------- Dashboard ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 26px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(420px 260px at 100% 0, rgba(229, 72, 77, .55), transparent 70%),
        radial-gradient(380px 260px at 70% 130%, rgba(31, 166, 90, .45), transparent 70%),
        linear-gradient(120deg, var(--rp-navy), var(--rp-navy-2));
    box-shadow: 0 22px 48px rgba(11, 19, 36, .28);
}
.hero h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.hero p { margin: 0; color: #c3cadb; }
.hero .btn-light { border: 1px solid rgba(255, 255, 255, .35); color: #fff; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); }
.hero .btn-light:hover { background: rgba(255, 255, 255, .26); }

.stat {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 18px;
    border-radius: 20px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 24px;
    color: #fff;
}
.stat-icon.red { background: linear-gradient(135deg, #ff6b70, var(--rp-red-dark)); box-shadow: 0 10px 22px rgba(229, 72, 77, .38); }
.stat-icon.green { background: linear-gradient(135deg, #34d27b, var(--rp-green-dark)); box-shadow: 0 10px 22px rgba(31, 166, 90, .38); }
.stat-icon.black { background: linear-gradient(135deg, #2a3a63, var(--rp-navy)); box-shadow: 0 10px 22px rgba(11, 19, 36, .32); }
.stat-label { color: var(--rp-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .2px; }
.stat-value { font-size: 24px; font-weight: 800; line-height: 1.2; }

.stock-bar { height: 9px; border-radius: 9px; background: rgba(31, 166, 90, .14); overflow: hidden; }
.stock-bar span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--rp-green), #34d27b); }

/* ==========================================================================
   Buttons and forms
   ========================================================================== */
.btn { border-radius: 11px; font-weight: 600; }
.btn-primary {
    border: 0;
    background: linear-gradient(135deg, #f0575c, var(--rp-red-dark));
    box-shadow: 0 8px 18px rgba(229, 72, 77, .3);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: linear-gradient(135deg, var(--rp-red), #b12c32) !important; }
.btn-primary:disabled { background: #e79a9d; box-shadow: none; }
.btn-success {
    border: 0;
    background: linear-gradient(135deg, #2bbd6c, var(--rp-green-dark));
    box-shadow: 0 8px 18px rgba(31, 166, 90, .3);
}
.btn-success:hover, .btn-success:focus, .btn-success:active { background: linear-gradient(135deg, var(--rp-green), #126c33) !important; }
.btn-dark {
    border: 0;
    background: linear-gradient(135deg, var(--rp-navy-2), var(--rp-navy));
    box-shadow: 0 8px 18px rgba(11, 19, 36, .22);
}
.btn-light { border: 1px solid var(--rp-border); background: rgba(255, 255, 255, .85); }
.btn-outline-dark { --bs-btn-color: var(--rp-navy); --bs-btn-border-color: rgba(11, 19, 36, .25); --bs-btn-hover-bg: var(--rp-navy); --bs-btn-active-bg: var(--rp-navy); }

.text-bg-success { background-color: var(--rp-green) !important; }
.text-bg-danger { background-color: var(--rp-red) !important; }
.text-bg-dark { background-color: var(--rp-navy) !important; }
.badge { padding: .45em .7em; border-radius: 8px; font-weight: 600; }

.form-label { margin-bottom: 5px; font-size: 12.5px; font-weight: 700; color: #3a4257; letter-spacing: .2px; }
.form-control, .form-select {
    border-color: rgba(15, 23, 42, .14);
    border-radius: 11px;
    background-color: rgba(255, 255, 255, .85);
    font-size: 14.5px;
}
.form-control:focus, .form-select:focus { border-color: var(--rp-green); background-color: #fff; box-shadow: 0 0 0 .22rem rgba(31, 166, 90, .16); }
.input-group > .btn { border-color: rgba(15, 23, 42, .14); background: rgba(255, 255, 255, .85); color: var(--rp-muted); box-shadow: none; }
.form-check-input:checked { background-color: var(--rp-green); border-color: var(--rp-green); }
.text-uppercase::placeholder { text-transform: none; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table { --bs-table-bg: transparent; margin-bottom: 0; font-size: 14px; vertical-align: middle; }
.table > :not(caption) > * > * { padding: 11px 12px; border-bottom-color: var(--rp-border); }
.table thead th {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--rp-navy), var(--rp-navy-2));
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    white-space: nowrap;
}
.table thead th:first-child { border-radius: 12px 0 0 12px; }
.table thead th:last-child { border-radius: 0 12px 12px 0; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(31, 166, 90, .06); }
.table tfoot th { border: 0; background: rgba(11, 19, 36, .05); }
.table tfoot th:first-child { border-radius: 12px 0 0 12px; }
.table tfoot th:last-child { border-radius: 0 12px 12px 0; }
.thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 12px; background: rgba(11, 19, 36, .06); }
.page-link { margin: 0 2px; border: 0; border-radius: 9px !important; color: var(--rp-navy); background: rgba(255, 255, 255, .7); }
.active > .page-link, .page-link.active { background: var(--rp-navy); }
div.dataTables_wrapper div.dataTables_filter input, div.dataTables_wrapper div.dataTables_length select { border-radius: 10px; }

.totals-box {
    padding: 20px;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(260px 160px at 100% 0, rgba(229, 72, 77, .4), transparent 70%),
        radial-gradient(240px 160px at 0 100%, rgba(31, 166, 90, .35), transparent 70%),
        linear-gradient(135deg, var(--rp-navy), var(--rp-navy-2));
    box-shadow: 0 18px 40px rgba(11, 19, 36, .28);
}
.totals-box .line { display: flex; justify-content: space-between; padding: 4px 0; color: #c3cadb; }
.totals-box .grand { margin-top: 8px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .16); color: #fff; font-size: 21px; font-weight: 800; }

.note-covered, .note-not-covered { padding: 10px 12px; border-radius: 10px; white-space: pre-line; font-size: 13.5px; }
.note-covered { border-left: 4px solid var(--rp-green); background: var(--rp-green-soft); }
.note-not-covered { border-left: 4px solid var(--rp-red); background: var(--rp-red-soft); }

.col-product { min-width: 230px; }
.col-serial { min-width: 220px; }
.col-qty { width: 100px; }
.col-rate { width: 140px; }
.service-photo { max-width: 220px; border-radius: 12px; }
.logo-preview { max-height: 70px; max-width: 220px; padding: 6px; border-radius: 12px; background: #000; border: 1px solid var(--rp-border); }

/* ==========================================================================
   Toast messages (top right)
   ========================================================================== */
.toast-container { z-index: 1090; }
.app-toast {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    color: #fff;
    background: rgba(11, 19, 36, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
}
.app-toast .toast-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.app-toast .toast-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.app-toast.toast-success { border-left: 4px solid var(--rp-green); }
.app-toast.toast-success .toast-icon { background: rgba(31, 166, 90, .25); color: #4ade80; }
.app-toast.toast-error { border-left: 4px solid var(--rp-red); }
.app-toast.toast-error .toast-icon { background: rgba(229, 72, 77, .25); color: #ff8a8e; }

/* ==========================================================================
   Printable invoice (A4)
   ========================================================================== */
.invoice-sheet { max-width: 210mm; margin: 0 auto; padding: 0; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; overflow: hidden; color: #111; }
.invoice-sheet > *:not(.invoice-top):not(.invoice-stripe):not(.invoice-foot) { margin-left: 10mm; margin-right: 10mm; }
.invoice-sheet .row { margin-left: calc(10mm - .75rem); margin-right: calc(10mm - .75rem); }
.invoice-sheet > .table { width: calc(100% - 20mm); }

/* Black header band + red stripe, like the logo */
.invoice-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 10mm; background: #fff; color: #111; border-bottom: 1px solid #e3e5ea; }
.invoice-brand { display: inline-block; background: #111114; border-radius: 10px; padding: 8px 14px; }
.invoice-logo { max-height: 56px; max-width: 220px; display: block; }
.invoice-brand-name { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff; }
.invoice-meta { text-align: right; font-size: 12.5px; line-height: 1.55; }
.invoice-meta span { color: #6b7280; }
.invoice-meta .doc-title { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #111; padding-bottom: 4px; margin-bottom: 4px; border-bottom: 2px solid #e11d1d; }
.invoice-stripe { height: 3px; background: #e11d1d; margin-bottom: 12px; }

/* Sold by / Bill to */
.invoice-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.party-box { padding: 8px 12px; background: #f6f7f9; border-left: 3px solid #e11d1d; line-height: 1.5; font-size: 12.5px; }
.party-label { font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #d40000; margin-bottom: 2px; }
.invoice-delivery { font-size: 12px; margin-bottom: 8px; padding: 5px 12px; border: 1px dashed #999; }

.invoice-sheet .table { font-size: 12.5px; margin-bottom: 8px; }
.invoice-sheet .table th, .invoice-sheet .table td { padding: 5px 7px; border: 1px solid #d3d5db; background: transparent; }
.invoice-sheet .table thead th { border-radius: 0 !important; background: #f1f2f5; color: #111; border-color: #d3d5db; border-bottom: 2px solid #e11d1d; text-transform: none; letter-spacing: 0; font-size: 12px; }
.invoice-sheet .table tbody tr:nth-child(even) td { background: #f7f7f9; }
.invoice-sheet .table .grand-row th { background: #fdeceb; color: #b91414; border-color: #d3d5db; font-size: 14px; }

/* Black footer band */
.invoice-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding: 9px 10mm; background: #f6f7f9; color: #333; border-top: 2px solid #e11d1d; font-size: 12px; }
.invoice-foot .tagline { font-weight: 700; letter-spacing: 2px; }
.invoice-note { white-space: pre-line; font-size: 12px; }
.invoice-sign { margin-top: 34px; display: flex; justify-content: space-between; font-size: 12.5px; }

@media print {
    @page { size: A4; margin: 8mm; }
    body { background: #fff; }
    .sidebar, .topbar, .footer, .no-print, .sidebar-backdrop, .toast-container { display: none !important; }
    .main { margin: 0 !important; }
    .content { padding: 0; }
    .card { border: 0; box-shadow: none; background: #fff; backdrop-filter: none; }
    .invoice-sheet { max-width: none; padding: 0; box-shadow: none; }
    .invoice-sheet, .invoice-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .invoice-sheet { border-radius: 0; overflow: visible; }
}

/* ==========================================================================
   Login page (dark glass)
   ========================================================================== */
.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 16px;
    background:
        radial-gradient(620px 420px at 12% 12%, rgba(229, 72, 77, .5), transparent 65%),
        radial-gradient(640px 460px at 90% 92%, rgba(31, 166, 90, .45), transparent 65%),
        linear-gradient(135deg, var(--rp-navy), #101a33);
}
.login-card {
    width: 100%;
    max-width: 410px;
    padding: 34px 30px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 26px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
}
.login-card .brand-mark { width: 62px; height: 62px; flex: none; margin: 0 auto 14px; border-radius: 18px; font-size: 30px; }
.login-card .login-logo { display: block; width: 100%; max-width: 250px; max-height: 150px; object-fit: contain; margin: 0 auto 16px; padding: 12px 16px; border-radius: 16px; background: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 26, 26, .35); }
.catalogue-logo { height: 56px; width: auto; padding: 6px 10px; border-radius: 12px; background: #000; }
.login-card .text-soft { color: #aeb7cb; }
.login-card .form-label { color: #d5dbe9; }
.login-card .form-control, .login-card .input-group > .btn {
    border-color: rgba(255, 255, 255, .2);
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
}
.login-card .form-control:focus { border-color: #4ade80; background-color: rgba(255, 255, 255, .16); box-shadow: 0 0 0 .22rem rgba(74, 222, 128, .2); }
.login-card .form-check-label, .login-card a { color: #d5dbe9; }
.login-card a:hover { color: #fff; }
.login-card .form-check-input { background-color: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .35); }
.login-card .form-check-input:checked { background-color: var(--rp-green); border-color: var(--rp-green); }

/* ==========================================================================
   Public catalogue
   ========================================================================== */
.catalogue-head {
    padding: 28px 0;
    color: #fff;
    background:
        radial-gradient(420px 220px at 100% 0, rgba(229, 72, 77, .55), transparent 70%),
        linear-gradient(120deg, var(--rp-navy), var(--rp-navy-2));
}
.product-card { height: 100%; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card img, .product-card .no-photo { width: 100%; height: 190px; object-fit: cover; background: rgba(11, 19, 36, .05); }
.product-card .no-photo { display: grid; place-items: center; font-size: 46px; color: #c3cadb; }
.product-card .mrp { font-size: 18px; font-weight: 800; color: var(--rp-red-dark); }

/* ==========================================================================
   Update 02: report dashboard, delivery tracking, QR code
   ========================================================================== */
.report-card {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 18px;
    border-radius: 20px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.report-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.report-text { flex: 1; }
.report-title { display: block; font-size: 16px; font-weight: 800; }
.report-info { display: block; color: var(--rp-muted); font-size: 12.5px; }
.report-arrow { color: var(--rp-muted); }
.report-heading td { font-weight: 800; letter-spacing: .5px; background: rgba(11, 19, 36, .05); }

/* Delivery steps: Invoice Made > Dispatched > Delivered > Received */
.track { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.track-step { display: flex; align-items: center; gap: 8px; color: var(--rp-muted); font-weight: 600; }
.track-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(11, 19, 36, .08); }
.track-step.done { color: var(--rp-green-dark); }
.track-step.done .track-dot { color: #fff; background: linear-gradient(135deg, #2bbd6c, var(--rp-green-dark)); box-shadow: 0 6px 14px rgba(31, 166, 90, .35); }

.qr-preview { width: 120px; height: 120px; object-fit: contain; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--rp-border); }
.invoice-qr { width: 90px; height: 90px; object-fit: contain; }
.text-bg-info { background-color: #0ea5e9 !important; color: #fff !important; }
.text-bg-primary { background-color: #6366f1 !important; }

/* Sale type toggle (Customer / Outlet) */
.sale-type-pills { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 2rem; background: rgba(0, 0, 0, .06); }
.sale-type-pills .pill { padding: .4rem 1.1rem; border-radius: 2rem; color: inherit; text-decoration: none; font-weight: 500; }
.sale-type-pills .pill.active { background: #c8102e; color: #fff; }

/* ---------- searchable multi-select (reports, zone picker) ---------- */
.ms-box { position: relative; }
.ms-toggle { background-color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ms-panel { display: none; position: absolute; z-index: 60; left: 0; right: 0; margin-top: 4px; padding: 8px; background: #fff; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.ms-actions { font-size: 12px; margin: 6px 2px; }
.ms-list { max-height: 240px; overflow: auto; }
.ms-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; margin: 0; }
.ms-item:hover { background: #f3f4f7; }
.zone-list { max-height: 260px; overflow: auto; }

.cat-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }

/* ---------- Select2 (searchable dropdowns) ---------- */
.select2-container--bootstrap-5 .select2-selection { border-color: rgba(15, 23, 42, .14); border-radius: 11px; background-color: rgba(255, 255, 255, .85); font-size: 14.5px; }
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection { border-color: var(--rp-green); box-shadow: 0 0 0 .22rem rgba(31, 166, 90, .16); }
.select2-container--bootstrap-5 .select2-dropdown { border-color: var(--rp-green); border-radius: 11px; overflow: hidden; z-index: 2000; }
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options { max-height: 260px; }
.select2-container--bootstrap-5 .select2-results__option--highlighted { background-color: var(--rp-green-soft); color: var(--rp-text); }
.select2-container--bootstrap-5 .select2-results__option--selected { background-color: var(--rp-green); color: #fff; }
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field { border-radius: 8px; }
.select2-container.select2-sm .select2-selection { min-height: calc(1.5em + .5rem + 2px); font-size: 13px; }
.select2-container.select2-lg .select2-selection { min-height: calc(1.5em + 1rem + 2px); font-size: 16px; }
.select2-container { max-width: 100%; }
.input-group > .select2-container { flex: 1 1 auto; width: 1% !important; }
