/*==============================================================
  OrderAdvance theme  (loads after style.css and primary_style.css)

  1. Colour variables (light + dark)      8. Forms
  2. Base, fonts, page transitions        9. Popups, dropdowns, toasts
  3. Header                              10. Status badges, empty + loading states
  4. Sidebar                             11. POS (cards, cart panel)
  5. Page content, bottom bar            12. User Management
  6. Buttons                             13. Animations (shine, sheen)
  7. Tables                              14. Responsive + dark-mode extras
==============================================================*/

/*--------------------------------------------------------------
# 1. Colour variables
--------------------------------------------------------------*/
:root {
    /* brand gold */
    --gold: #d4a62a;
    --gold-2: #e0b23a;
    --gold-light: #f5d87a;
    --btn-grad: linear-gradient(135deg, #f5d87a 0%, #e0b23a 100%);
    --btn-text: #5e3f03;
    --btn-shadow: 0 2px 8px rgba(185, 138, 18, 0.35);

    /* text */
    --accent-text: #9a6a06;      /* main text colour (gold-brown) */
    --text-strong: #7a5304;
    --text-soft: #b8a06a;
    --text-input: #5e3f03;
    --text-body: #444444;
    --heading: #020202;

    /* surfaces */
    --page-bg: #fffdf0;
    --surface: #ffffff;
    --surface-2: #fffdf5;
    --surface-3: #fffaeb;
    --surface-4: #fff1cc;
    --surface-hover: #fff8e1;

    /* lines */
    --line: #eadfc4;
    --line-soft: #f0e4c0;
    --line-row: #f3ead2;
    --input-border: #e6e6e6; /* border colour of every input / select / textarea */

    /* status colours */
    --danger: #d93e3e;
    --danger-bg: #fdecec;
    --success: #2f8a57;
    --success-bg: #eaf6ef;
    --info: #3c86eb;
    --info-bg: #e8f1fd;
    --warn-bg: #fff4d6;

    /* scrollbars */
    --scroll-thumb: #9a6a06;
    --scroll-track: #fffaf0;

    /* shadows */
    --shadow-card: 0 4px 14px rgba(185, 138, 18, 0.10);
    --shadow-pop: 0 12px 30px rgba(185, 138, 18, 0.22);

    /* layout */
    --sidebar-w: 250px;
    --bar-h: 72px;
    --header-h: 60px;
}

html[data-theme="dark"] {
    --accent-text: #e8c466;
    --text-strong: #f1d16a;
    --text-soft: #b39a5c;
    --text-input: #f3e2b3;
    --text-body: #e6dcc0;
    --heading: #f3e2b3;

    --page-bg: #14110a;
    --surface: #1f1a10;
    --surface-2: #251f13;
    --surface-3: #2b2416;
    --surface-4: #3a2f1a;
    --surface-hover: #30281a;

    --line: #43391f;
    --line-soft: #3a311b;
    --line-row: #342d19;
    --input-border: #43391f;

    --danger-bg: #3b1f1f;
    --success-bg: #1c3025;
    --info-bg: #1b2a40;
    --warn-bg: #3a2f14;

    --scroll-thumb: #c99716;
    --scroll-track: #2b2416;

    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* the header and sidebar read their colours from these (theme variables of the old template) */
#header,
#sidebar {
    --primary-color: var(--surface);
    --primary-dark-color: var(--surface-3);
    --secondary-color: var(--accent-text);
    --dark-secondary-color: var(--accent-text);
}

/*--------------------------------------------------------------
# 2. Base, fonts, page transitions
--------------------------------------------------------------*/
html {
    font-size: 15px;
}
html body {
    font-size: 14.5px;
    color: var(--text-body);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
html body:has(#header) {
    background: var(--page-bg);
}
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6 {
    color: var(--heading);
}

/* one font everywhere; icon fonts live on <i>/::before and are not touched */
html body,
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body p, html body span, html body a, html body li, html body td, html body th,
html body label, html body input, html body select, html body textarea, html body button,
html body .btn, html body .button, html body .card-title, html body .alert-heading,
html body .breadcrumb, html body .logo span, html body .dropdown-menu, html body .modal,
html body .table, html body .dataTables_wrapper, html body .form-control, html body .form-select,
html body .select2-container, html body .toast, html body .swal2-popup {
    font-family: var(--primary-family, "Montserrat", sans-serif);
}

/* soft fade-in when a page opens */
@keyframes opFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
html body #main > .wrapper,
html body #main > .d-flex,
html body #main > .dashboard,
html body #main > section {
    animation: opFadeUp .35s ease both;
}

/*--------------------------------------------------------------
# 3. Header
--------------------------------------------------------------*/
html body .header {
    background-color: var(--surface);
    box-shadow: 0 2px 20px rgba(1, 41, 112, 0.1);
}
html body .header .toggle-sidebar-btn {
    order: -1;
    padding: 0 6px 0 16px;
    margin: 0;
    line-height: 1;
    color: var(--accent-text);
}
html body .header .logo-section {
    margin-right: 0;
    padding-left: 8px;
}
html body span.version {
    color: var(--text-soft);
}
/* dark-mode toggle button (in the header) */
html body .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--accent-text);
    font-size: 17px;
    cursor: pointer;
    transition: transform .2s, background .2s;
}
html body .theme-toggle:hover {
    background: var(--surface-4);
    transform: rotate(18deg);
}

/*--------------------------------------------------------------
# 4. Sidebar  (width, padding, menu, user card, scrollbar)
--------------------------------------------------------------*/
@media (min-width: 601px) {
    html body .sidebar {
        width: var(--sidebar-w);
        padding: 15px;
    }
}
@media (min-width: 1200px) {
    html body #main,
    html body #footer {
        margin-left: var(--sidebar-w);
    }
    html body .toggle-sidebar #main,
    html body .toggle-sidebar #footer {
        margin-left: 0;
    }
    html body .toggle-sidebar .sidebar {
        left: calc(-1 * var(--sidebar-w));
    }
}
@media (min-width: 601px) and (max-width: 1199px) {
    html body .sidebar {
        left: calc(-1 * var(--sidebar-w));
    }
    html body .toggle-sidebar .sidebar {
        left: 0;
    }
}

/* the sidebar include is nested inside another .sidebar: shadow once, inner one is a flex column */
html body aside.sidebar {
    overflow: hidden;
    box-shadow: 2px 0 20px rgba(1, 41, 112, 0.1);
}
html body aside.sidebar aside.sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
}
html body aside.sidebar aside.sidebar .company-profile-sidebar {
    flex: 0 0 auto;
}

/* menu list: the only part that scrolls */
html body aside.sidebar aside.sidebar #sidebar-nav {
    margin-right: -10px;   /* push the scrollbar out to the sidebar's outer edge */
    padding-right: 10px;   /* ...while the menu items keep their place */
    flex: 1 1 auto;
    min-height: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
html body aside.sidebar:hover aside.sidebar #sidebar-nav {
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
html body #sidebar-nav::-webkit-scrollbar {
    width: 7px;
    background: transparent;
}
html body #sidebar-nav::-webkit-scrollbar-track,
html body #sidebar-nav::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}
html body aside.sidebar:hover aside.sidebar #sidebar-nav::-webkit-scrollbar-track {
    background: var(--scroll-track);
}
html body aside.sidebar:hover aside.sidebar #sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
}
html body aside.sidebar:hover aside.sidebar #sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-strong);
}

@media (min-width: 601px) {
    html body aside.sidebar aside.sidebar #sidebar-nav {
        margin-right: -15px;
        padding-right: 15px;
    }
}
/* no little arrow buttons at the ends of the scrollbar */
html body #sidebar-nav::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}
/* menu items */
html body .sidebar-nav .nav-item {
    margin-bottom: 3px;
}
html body .sidebar-nav .nav-link,
html body .sidebar-nav .nav-link.collapsed {
    padding: 9px 13px;
    font-size: 14px;
    letter-spacing: 0;
    border-radius: 9px;
    color: var(--accent-text);
    background: transparent;
    border: 0;
}
html body .sidebar-nav .nav-link > i.bi:first-child {
    font-size: 16.5px;
    width: 21px;
    margin-right: 8px !important;
    color: var(--accent-text);
}
html body .sidebar-nav .nav-link:hover,
html body .sidebar-nav .nav-link.collapsed:hover {
    padding-left: 16px;
    background: var(--surface-4);
}
html body .sidebar-nav .nav-link.active {
    color: var(--text-strong);
    font-weight: 700;
    background: linear-gradient(135deg, #fbe9a6 0%, #f1cf63 100%);
    box-shadow: 0 2px 8px rgba(212, 166, 42, 0.25);
}
html body .sidebar-nav .nav-link.active,
html body .sidebar-nav .nav-link.active > i.bi:first-child {
    color: #7a5304;
}
html body .sidebar-nav .nav-link .bi-chevron-down {
    font-size: 12px;
}
html body .sidebar-nav .nav-content a {
    padding: 7px 0 7px 36px;
    font-size: 13.5px;
    color: var(--accent-text);
}
html body .sidebar-nav .nav-content a i {
    font-size: 15px;
    width: 20px;
    margin-right: 8px;
    line-height: 1;
    border-radius: 0;
    color: var(--accent-text);
}
html body .sidebar-nav .nav-content a.active,
html body .sidebar-nav .nav-content a.active i {
    background: transparent;
    color: var(--text-strong);
}

/* user card pinned at the bottom of the sidebar */
html body aside.sidebar aside.sidebar .sidebar-user {
    position: static;
    flex: 0 0 auto;
    box-sizing: border-box;
    height: var(--bar-h);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px -15px -15px;
    padding: 0 16px;
    background: var(--surface);
    border-top: 1px solid var(--line-soft);
    box-shadow: 0 -6px 14px rgba(185, 138, 18, 0.08);
}
html body .sidebar .su-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--btn-text);
    background: var(--btn-grad);
    box-shadow: 0 2px 8px rgba(185, 138, 18, .3);
}
html body .sidebar .su-info {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}
html body .sidebar .su-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html body .sidebar .su-role {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html body .sidebar .su-dot {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(47, 138, 87, .18);
}

/*--------------------------------------------------------------
# 5. Page content, page heading, cards, bottom bar
--------------------------------------------------------------*/
html body #main {
    flex: 1 0 auto;
    padding: 18px 26px;
}
html body .pagetitle {
    background-color: var(--surface);
    padding: 6px 12px !important;
    margin-bottom: 10px;
    border: 0;
    border-left: 5px solid var(--accent-text) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 12px rgba(15, 31, 77, 0.08);
}
html body .pagetitle h4,
html body .pagetitle h4 i,
html body .pagetitle .breadcrumb a,
html body .pagetitle .breadcrumb .active,
html body .pagetitle .breadcrumb-item,
html body .pagetitle .breadcrumb .breadcrumb-item::before {
    color: var(--accent-text);
}
html body h4.contitle,
html body .pagetitle h4 {
    font-size: 18px;
}
html body .pagetitle h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-text);
}
html body .breadcrumb {
    font-size: 13.5px;
}
html body .card {
    background-color: var(--surface);
}
html body .card-body {
    padding: 12px;
}
html body .card-title {
    font-size: 16px;
    padding: 16px 0 10px;
}

/* dashboard stat cards: white card, gold accent bar, rounded-square icon tile, big number */
html body .card.info-card,
html body .dashboard .info-card {
    position: relative;
    overflow: hidden;
    background: var(--surface) !important;
    background-image: none !important;
    border: 1px solid var(--line-soft) !important;
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    animation: none !important;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
/* no left bar (this also switches off the template's old full-card gradient layer) */
html body .card.info-card::before,
html body .card.info-card.customers-card::before {
    content: none !important;
}
/* soft decorative glow in the corner */
html body .card.info-card::after {
    content: "";
    position: absolute;
    top: -34px;
    right: -34px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 207, 99, .38) 0%, rgba(241, 207, 99, 0) 70%);
    pointer-events: none;
}
html body .card.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-2) !important;
    box-shadow: var(--shadow-pop);
}
/* icon tile */
html body .info-card .card-icon,
html body .dashboard .info-card .card-icon {
    flex: 0 0 58px;
    width: 58px !important;
    height: 58px !important;
    border: 0;
    border-radius: 16px !important;
    font-size: 26px;
    color: var(--btn-text);
    background: var(--btn-grad);
    box-shadow: 0 6px 14px rgba(185, 138, 18, .35);
    transition: transform .2s;
}
html body .card.info-card:hover .card-icon {
    transform: scale(1.08) rotate(-4deg);
}
/* number + label */
html body .info-card h6 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--accent-text);
}
html body .info-card .card-title,
html body .info-card .card-title span,
html body .info-card .ps-3 > span,
html body .info-card .ps-2 > span {
    padding: 0;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-soft);
}
/* bottom bar: page footer shares height and top line with the sidebar user card */
html body #footer {
    box-sizing: border-box;
    height: var(--bar-h);
    margin-top: auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: static;
    background: var(--surface);
    border-top: 1px solid var(--line-soft);
    box-shadow: 0 -6px 14px rgba(185, 138, 18, 0.08);
    font-size: 13.5px;
}
html body #footer .copyright,
html body #footer .credits {
    color: var(--accent-text);
    font-size: 13.5px;
    padding-top: 0;
}

/*--------------------------------------------------------------
# 6. Buttons  (one gold look for every button type)
--------------------------------------------------------------*/
html body .button,
html body a.button,
html body .btn-primary,
html body .btn.btn-primary,
html body .btn-secondary,
html body a.cta-button,
html body .modal-footer .btn,
html body .add-to-cart,
html body .pos-source-tab.active,
html body .add-new-customer-btn,
html body .placeOrder-btn,
html body .primary-btn,
html body .btn-um,
html body .btn-warning,
html body .btn_upload,
html body .filter-btn,
html body .custom-button,
html body .save-board-rate,
html body .btn-refresh {
    background: var(--btn-grad) !important;
    color: var(--btn-text) !important;
    border: 0 !important;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: var(--btn-shadow) !important;
    transition: filter .2s, transform .1s;
}
html body .button:hover,
html body .btn-primary:hover,
html body .btn.btn-primary:hover,
html body .btn-secondary:hover,
html body a.cta-button:hover,
html body .add-to-cart:hover,
html body .add-new-customer-btn:hover,
html body .placeOrder-btn:hover,
html body .primary-btn:hover,
html body .btn-um:hover,
html body .btn-warning:hover,
html body .btn_upload:hover,
html body .filter-btn:hover,
html body .custom-button:hover,
html body .save-board-rate:hover,
html body .btn-refresh:hover {
    background: var(--btn-grad) !important;
    color: var(--btn-text) !important;
    filter: brightness(1.05);
}
html body .button:active,
html body .btn-primary:active,
html body .dt-button:active {
    transform: scale(.98);
}
html body .button,
html body a.button {
    display: inline-block;
    padding: 7px 18px;
    font-size: 14px;
    margin-bottom: 10px;
}
html body .btn {
    font-size: 14px;
}
html body .btn-um-outline {
    background: var(--surface) !important;
    color: var(--accent-text) !important;
    border: 1px solid var(--gold-2) !important;
    border-radius: 8px;
}
html body .btn-um-outline:hover {
    background: var(--btn-grad) !important;
    color: var(--btn-text) !important;
}
html body .back-to-top {
    background: var(--btn-grad);
}
html body .back-to-top i {
    color: var(--btn-text);
}

/*--------------------------------------------------------------
# 7. Tables  (DataTables)
--------------------------------------------------------------*/
/* only the table scrolls: buttons, search, info and pagination stay put (see init.dt in footer.blade.php) */
html body div.dataTables_wrapper {
    overflow: visible;
    padding: 4px 2px;
}
html body .dt-scroll-x {
    width: 100%;
    max-height: calc(100vh - 340px);
    min-height: 120px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
html body .dt-scroll-x::-webkit-scrollbar {
    height: 8px;
    width: 8px;
    background: var(--scroll-track);
}
html body .dt-scroll-x::-webkit-scrollbar-track {
    background: var(--scroll-track);
    border-radius: 10px;
}
html body .dt-scroll-x::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 10px;
}
html body .dt-scroll-x::-webkit-scrollbar-thumb:hover {
    background: var(--text-strong);
}
html body table.dataTable,
html body .MasterTable {
    width: 100%;
    margin: 0 !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}
html body .dataTables_wrapper table.dataTable.no-footer {
    border-bottom: 0 !important;
}

/* header row: light cream, stays visible while the table scrolls */
html body table.dataTable thead th,
html body table.dataTable thead td,
html body .table > thead > tr > th,
html body .tablehead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--surface-3) !important;
    color: var(--accent-text) !important;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
    padding: 11px 24px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
}
/* sort arrows: our own gold arrows instead of the default images */
html body table.dataTable thead th.sorting,
html body table.dataTable thead th.sorting_asc,
html body table.dataTable thead th.sorting_desc,
html body table.dataTable thead th.sorting_asc_disabled,
html body table.dataTable thead th.sorting_desc_disabled {
    background-image: none !important;
    cursor: pointer;
}
html body table.dataTable thead th.sorting::before,
html body table.dataTable thead th.sorting_asc::before,
html body table.dataTable thead th.sorting_desc::before {
    content: none !important;
}
html body table.dataTable thead th.sorting::after,
html body table.dataTable thead th.sorting_asc::after,
html body table.dataTable thead th.sorting_desc::after {
    content: "\2195";
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    opacity: 1;
    color: var(--line);
}
html body table.dataTable thead th.sorting_asc::after  { content: "\2191"; color: var(--accent-text); }
html body table.dataTable thead th.sorting_desc::after { content: "\2193"; color: var(--accent-text); }
html body table.dataTable thead th.sorting:hover::after { color: var(--gold); }

/* body rows */
html body table.dataTable tbody td,
html body table.dataTable tbody th {
    padding: 9px 10px !important;
    font-size: 14px;
    vertical-align: middle;
    color: var(--text-body);
    background-color: var(--surface);
    border: 0 !important;
    border-bottom: 1px solid var(--line-row) !important;
}
html body table.dataTable tbody tr:last-child td {
    border-bottom: 0 !important;
}
html body table.dataTable tbody tr:hover > td {
    background-color: var(--surface-hover) !important;
}

/* toolbar above the table */
html body div.dt-buttons {
    display: inline-flex;
    gap: 6px;
}
html body .dataTables_wrapper div.dt-buttons .dt-button,
html body .dataTables_wrapper div.dt-buttons button.dt-button,
html body .dataTables_wrapper div.dt-buttons .btn.btn-secondary,
html body .dataTables_wrapper .dt-button.buttons-html5,
html body .dataTables_wrapper .dt-button.buttons-print,
html body .dt-buttons .dt-button:not(.disabled) {
    margin: 0 !important;
    padding: 5px 16px !important;
    font-size: 14px;
    background: var(--surface) !important;
    background-image: none !important;
    color: var(--accent-text) !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(185, 138, 18, 0.12) !important;
    --bs-btn-bg: var(--surface);
    --bs-btn-color: var(--accent-text);
    --bs-btn-border-color: var(--line);
}
html body .dataTables_wrapper div.dt-buttons .dt-button:hover,
html body .dt-buttons .dt-button:not(.disabled):hover {
    background: var(--surface-hover) !important;
    color: var(--text-strong) !important;
    border-color: var(--gold) !important;
    filter: none !important;
}
html body .dataTables_wrapper .dataTables_filter label,
html body .dataTables_wrapper .dataTables_info {
    font-size: 14px;
    color: var(--accent-text);
}
html body .dataTables_wrapper .dataTables_filter input {
    width: 290px !important;
    padding: 5px 12px !important;
    font-size: 14px;
    color: var(--text-input);
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 20px !important;
    outline: none;
}
html body .dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(201, 151, 28, .22);
}
html body .dataTables_wrapper .dataTables_info,
html body .dataTables_wrapper .dataTables_paginate {
    margin-top: 12px;
}

/* pagination */
html body .dataTables_wrapper .dataTables_paginate .paginate_button,
html body .dataTables_wrapper .dataTables_paginate a.paginate_button {
    padding: 4px 12px !important;
    margin: 0 2px !important;
    font-size: 14px;
    background: var(--surface) !important;
    color: var(--accent-text) !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    box-shadow: none;
}
html body .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
html body .dataTables_wrapper .dataTables_paginate a.paginate_button:hover {
    background: var(--surface-4) !important;
    color: var(--text-strong) !important;
    border-color: var(--gold) !important;
}
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
html body .dataTables_wrapper .dataTables_paginate a.paginate_button.current,
html body .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover {
    background: var(--btn-grad) !important;
    color: var(--btn-text) !important;
    border: 0 !important;
    font-weight: 700;
    box-shadow: var(--btn-shadow);
}
html body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: var(--surface-3) !important;
    color: var(--text-soft) !important;
    border-color: var(--line-soft) !important;
    opacity: .7;
    cursor: default;
}

/* row action buttons: soft round icon buttons */
html body .edit-btn,
html body .view-btn,
html body .delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 3px;
    padding: 0;
    border: 0 !important;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
html body .edit-btn   { background: var(--surface-4);  color: var(--accent-text); }
html body .view-btn   { background: var(--success-bg); color: var(--success); }
html body .delete-btn { background: var(--danger-bg);  color: var(--danger); }
html body .edit-btn:hover   { background: var(--gold);    color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(185, 138, 18, .35); }
html body .view-btn:hover   { background: var(--success); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(47, 138, 87, .35); }
html body .delete-btn:hover { background: var(--danger);  color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(217, 62, 62, .35); }

/*--------------------------------------------------------------
# 8. Forms
--------------------------------------------------------------*/
html body .input-field {
    margin-bottom: 12px;
}
html body .input-field label,
html body .form-group label,
html body form .form-label,
html body form .col-form-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--accent-text);
}
html body .input-field input:not([type=file]):not([type=checkbox]):not([type=radio]):not([type=range]),
html body .input-field select,
html body .input-field .form-select,
html body .input-field .form-control,
html body form input.form-control:where(:not([type=file],[type=checkbox],[type=radio],[type=color],[type=range])),
html body form select.form-select {
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-input);
    background-color: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: 6px;
}
html body .input-field select,
html body .input-field .form-select,
html body form select.form-select {
    padding-right: 2.25rem;
}
html body .input-field textarea,
html body .input-field .custom-textarea,
html body form textarea.form-control {
    width: 100%;
    box-sizing: border-box;
    min-height: 84px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-input);
    background-color: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: 6px;
}
html body .input-field input[type=file],
html body form input[type=file].form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
}
html body .input-field input:focus,
html body .input-field select:focus,
html body .input-field textarea:focus,
html body form .form-control:focus,
html body form .form-select:focus {
    outline: 0;
    border-color: #b98a12;
    box-shadow: 0 0 0 0.2rem rgba(212, 166, 42, .25);
}
html body form .form-control::placeholder {
    color: #c2ad78;
    font-size: 13.5px;
}
html body form .form-control:disabled,
html body form .form-control[readonly],
html body .input-field input[readonly] {
    background-color: var(--surface-3);
}
html body .select2-container {
    width: 100% !important;
}
html body .select2-container--default .select2-selection--single {
    height: 38px;
    border-radius: 6px;
}
html body .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    font-size: 14px;
}
html body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
/* one border colour for every input-type field, including those outside .input-field
   (filters, selectize, select2). Focus and validation-error colours are left alone. */
html body .form-control:not(:focus):not(.error),
html body .form-select:not(:focus):not(.error),
html body textarea:not(:focus):not(.error),
html body select:not(:focus):not(.error),
html body input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=button]):not([type=submit]):not([type=hidden]):not(:focus):not(.error),
html body .selectize-input:not(.focus),
html body .selectize-control.single .selectize-input:not(.focus),
html body .select2-container--default .select2-selection--single,
html body .select2-container--default .select2-selection--multiple {
    border-color: var(--input-border);
}

/* validation messages: always red */
html body label.error,
html body .input-field label.error,
html body .form-group label.error,
html body .pos-model label.error,
html body .modal-body label.error,
html body span.error,
html body div.error,
html body .invalid-feedback,
html body .text-danger {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--danger) !important;
}
html body input.error,
html body select.error,
html body textarea.error,
html body .input-field input.error,
html body .input-field select.error,
html body .input-field textarea.error,
html body .form-control.error {
    border-color: var(--danger) !important;
}
html body input.error:focus,
html body select.error:focus,
html body textarea.error:focus,
html body .form-control.error:focus {
    box-shadow: 0 0 0 0.2rem rgba(217, 62, 62, .18) !important;
}

/*--------------------------------------------------------------
# 9. Popups, dropdowns, toasts, delete confirmation
--------------------------------------------------------------*/
html body .modal-content {
    background-color: var(--surface);
    color: var(--text-body);
}
html body .modal-header {
    padding: 12px 18px;
    background: var(--surface-4);
    border-bottom: 2px solid var(--gold);
}
html body .modal-title {
    font-size: 17px;
    color: var(--accent-text);
}
html body .modal-body {
    padding: 16px 18px;
}
html body .modal-footer {
    border-top: 1px solid var(--line-soft);
}
/* gentle open animation */
html body .modal.fade .modal-dialog {
    transform: translateY(14px) scale(.98);
    transition: transform .25s ease, opacity .25s ease;
}
html body .modal.show .modal-dialog {
    transform: none;
}
html body .dropdown-menu {
    background-color: var(--surface);
    border: 1px solid var(--line-soft);
}
html body .dropdown-item {
    color: var(--accent-text);
}
html body .dropdown-item:hover {
    background: var(--surface-4);
}

/* toasts (toastr): white card, coloured left bar, icon */
html body #toast-container > div {
    width: 340px;
    padding: 14px 16px 14px 52px;
    border-radius: 12px;
    border-left: 5px solid var(--gold);
    background-color: var(--surface) !important;
    background-image: none !important;
    color: var(--text-strong);
    opacity: 1;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
html body #toast-container > div::before {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "bootstrap-icons";
    font-size: 22px;
    line-height: 1;
}
html body #toast-container > .toast-success { border-left-color: var(--success); }
html body #toast-container > .toast-error   { border-left-color: var(--danger); }
html body #toast-container > .toast-warning { border-left-color: var(--gold-2); }
html body #toast-container > .toast-info    { border-left-color: var(--info); }
html body #toast-container > .toast-success::before { content: "\f26a"; color: var(--success); }
html body #toast-container > .toast-error::before   { content: "\f622"; color: var(--danger); }
html body #toast-container > .toast-warning::before { content: "\f33a"; color: var(--gold-2); }
html body #toast-container > .toast-info::before    { content: "\f430"; color: var(--info); }
html body #toast-container .toast-title   { font-weight: 700; }
html body #toast-container .toast-message { font-size: 13.5px; font-weight: 500; }
html body #toast-container .toast-close-button { color: var(--text-soft); text-shadow: none; opacity: .8; }

/* delete confirmation popup */
html body #deleteConfirmationModal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
html body #deleteConfirmationModal .modal-header {
    background: transparent;
    border: 0;
    padding: 10px 12px 0;
    justify-content: flex-end;
}
html body #deleteConfirmationModal .del-body {
    padding: 4px 28px 8px;
    text-align: center;
}
html body #deleteConfirmationModal .del-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--danger);
    background: var(--danger-bg);
    box-shadow: 0 0 0 8px rgba(217, 62, 62, .08);
}
html body #deleteConfirmationModal .del-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: var(--heading);
}
html body #deleteConfirmationModal .del-text {
    margin: 0;
    font-size: 14px;
    color: var(--text-soft);
}
html body #deleteConfirmationModal .modal-footer {
    justify-content: center;
    border: 0;
    padding: 18px 28px 26px;
}
html body #deleteConfirmationModal .button-wrapper {
    float: none !important;
    display: flex;
    flex-direction: row-reverse;
    gap: 12px;
    width: 100%;
}
html body #deleteConfirmationModal .button-wrapper .btn {
    flex: 1;
    margin: 0 !important;
    padding: 10px 14px;
    font-weight: 700;
    border-radius: 10px;
}
html body #deleteConfirmationModal #confirmDelete {
    background: var(--danger) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(217, 62, 62, .35) !important;
}
html body #deleteConfirmationModal #cancelDelete {
    background: var(--surface) !important;
    color: var(--accent-text) !important;
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
}

/*--------------------------------------------------------------
# 10. Status badges, empty states, loading skeletons
--------------------------------------------------------------*/
/* order status + order type badges */
html body .status-badge,
html body .order-type-badge,
html body .badge.pending,
html body .badge.confirmed,
html body .badge.delivered,
html body .stock-status .pending,
html body .stock-status .delivered {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .2px;
    border: 1px solid transparent;
}
html body .status-badge::before,
html body .badge.pending::before,
html body .badge.confirmed::before,
html body .badge.delivered::before,
html body .stock-status .pending::before,
html body .stock-status .delivered::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
html body .status-pending,
html body .badge.pending,
html body .stock-status .pending     { color: #a86a00; background: var(--warn-bg);    border-color: #f1d79a; }
html body .status-confirmed,
html body .badge.confirmed           { color: var(--info);    background: var(--info-bg);    border-color: #bcd5f7; }
html body .status-delivered,
html body .badge.delivered,
html body .stock-status .delivered   { color: var(--success); background: var(--success-bg); border-color: #b7dcc6; }
html body .status-cancelled          { color: var(--danger);  background: var(--danger-bg);  border-color: #f3b9b9; }
/* order type (All Orders) */
html body .badge-custom-order { color: #a86a00; background: var(--warn-bg);    border-color: #f1d79a; }
html body .badge-mixed-order  { color: var(--info);    background: var(--info-bg);    border-color: #bcd5f7; }
html body .badge-pos-order    { color: var(--success); background: var(--success-bg); border-color: #b7dcc6; }

/* empty states (DataTables emptyTable / zeroRecords) */
html body .empty-state {
    padding: 34px 12px;
    text-align: center;
    color: var(--text-soft);
}
html body .empty-state .es-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--gold);
    background: var(--surface-3);
    border: 1px dashed var(--gold-2);
}
html body .empty-state .es-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-text);
}
html body .empty-state .es-sub {
    margin-top: 2px;
    font-size: 13px;
}
html body table.dataTable tbody td.dataTables_empty {
    background: var(--surface) !important;
    padding: 6px !important;
}

/* loading skeleton (DataTables loadingRecords and POS grid) */
@keyframes opSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
html body .skeleton,
html body .skeleton-rows span {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-4) 50%, var(--surface-3) 75%);
    background-size: 200% 100%;
    animation: opSkeleton 1.3s linear infinite;
}
html body .skeleton-rows {
    padding: 14px 10px;
}
html body .skeleton-rows span {
    height: 16px;
    margin: 12px 0;
}
html body .skeleton-rows span:nth-child(3n+1) { width: 92%; }
html body .skeleton-rows span:nth-child(3n+2) { width: 78%; }
html body .skeleton-rows span:nth-child(3n)   { width: 86%; }
html body .skeleton-card {
    height: 330px;
    border-radius: 18px;
}
/* page loader (layouts/loader.blade.php): gold arcs spinning around a pulsing diamond */
@keyframes opSpinCW  { to { transform: rotate(360deg); } }
@keyframes opSpinCCW { to { transform: rotate(-360deg); } }
@keyframes opGemPulse {
    0%, 100% { transform: scale(.85); filter: drop-shadow(0 0 2px rgba(224, 178, 58, .5)); }
    50%      { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(224, 178, 58, .95)); }
}
@keyframes opDotBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .35; }
    40%           { transform: translateY(-5px); opacity: 1; }
}
html body .op-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}
html body .op-gem-spin {
    position: relative;
    width: 84px;
    height: 84px;
}
html body .op-gem-spin .op-arc {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
}
html body .op-gem-spin .op-arc-1 {
    border-top-color: var(--gold-2);
    border-right-color: var(--gold-2);
    animation: opSpinCW 1.1s linear infinite;
}
html body .op-gem-spin .op-arc-2 {
    inset: 11px;
    border-bottom-color: #b98a12;
    border-left-color: #b98a12;
    animation: opSpinCCW 1.5s linear infinite;
}
html body .op-gem-spin .op-gem {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    background: linear-gradient(135deg, #ffffff 0%, #ffe9a8 45%, #d9a521 100%);
    clip-path: polygon(50% 0, 100% 35%, 50% 100%, 0 35%);
    animation: opGemPulse 1.4s ease-in-out infinite;
}
html body .op-loading-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-text);
}
html body .op-loading-text .op-dot {
    display: inline-block;
    animation: opDotBounce 1.2s ease-in-out infinite;
}
html body .op-loading-text .op-dot:nth-child(2) { animation-delay: .15s; }
html body .op-loading-text .op-dot:nth-child(3) { animation-delay: .3s; }
html body .op-loading-text .op-dot:nth-child(4) { animation-delay: .45s; }
@media (prefers-reduced-motion: reduce) {
    html body .op-gem-spin .op-arc,
    html body .op-gem-spin .op-gem,
    html body .op-loading-text .op-dot { animation-duration: 3s; }
}
/*--------------------------------------------------------------
# 11. POS  (filters, product cards, cart panel, popups)
--------------------------------------------------------------*/
html body .pagetitle-filter-section select,
html body .pagetitle-filter-section .form-select {
    min-width: 175px;
    padding-right: 2.2rem;
    color: var(--accent-text);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}
html body .pagetitle-filter-section .search-form {
    border: 1px solid var(--line);
    border-radius: 10px;
}

/* product cards */
html body .pos-card .product-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    padding: 12px;
    box-shadow: var(--shadow-card);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
html body .pos-card .product-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-2);
    box-shadow: var(--shadow-pop);
}
html body .pos-card .product-image {
    height: 240px;
    margin-bottom: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-3);
}
html body .pos-card .product-image img { border-radius: 12px; }
html body .pos-card h3.product-name {
    min-height: 0;
    margin: 4px 0 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
    text-align: center;
    text-transform: capitalize;
    color: var(--accent-text);
}
html body .pos-card .product-card-main { display: flex; align-items: center; gap: 8px; }
html body .pos-card .add-to-cart {
    flex: 1;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 10px;
}
html body .quantity,
html body .quantity-quick {
    padding: 2px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    border-radius: 30px;
}
html body .quantity input,
html body .quantity-quick input {
    width: 34px;
    color: var(--accent-text);
    font-weight: 700;
}
html body .quantity button,
html body .quantity-quick button {
    background: var(--btn-grad);
    color: var(--btn-text);
    font-weight: 700;
}
html body .pos-card .quick-view {
    top: 22px;
    left: 22px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(185, 138, 18, .25);
    transition: transform .15s, background .15s;
}
html body .pos-card .quick-view:hover { transform: scale(1.1); background: var(--surface-4); }
html body .pos-card .quick-view img { width: 18px; }

/* cart side panel */
html body .offcanvas.pos-canvas {
    width: 440px;
    max-width: 100vw;
    right: -440px;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    background: var(--surface-2);
    border-radius: 18px 0 0 18px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .18);
}
html body .offcanvas.pos-canvas.show { right: 0; }
html body .pos-canvas .offcanvas-header {
    margin: 0 !important;
    padding: 16px 20px !important;
    background: var(--surface);
    border-bottom: 1px solid var(--line-soft);
    border-radius: 18px 0 0 0;
}
html body .pos-canvas .offcanvas-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-text);
}
html body .pos-canvas .close-btn {
    float: none;
    font-size: 24px;
    line-height: 1;
    color: var(--gold);
    transition: transform .15s, color .15s;
}
html body .pos-canvas .close-btn:hover { color: #b98a12; transform: rotate(90deg); }
html body .pos-canvas .offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px !important;
}
html body .pos-canvas .offcanvas-filter-section { border-bottom: 0; padding-bottom: 14px; gap: 10px; }
html body .pos-canvas .offcanvas-filter-section .form-select {
    height: 44px;
    color: var(--accent-text);
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}
html body .pos-canvas .add-new-customer-btn { height: 44px; padding: 0 14px; white-space: nowrap; font-size: 14px; }
html body .pos-canvas h4 {
    display: flex;
    align-items: center;
    margin: 14px 0 10px;
    padding-left: 10px;
    border-left: 4px solid var(--gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--accent-text);
}
html body .pos-canvas #customer-info-table {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    overflow: hidden;
}
html body .pos-canvas #customer-info-table td { padding: 6px 12px !important; font-size: 13px; color: var(--accent-text); }
html body .pos-canvas .product-section-canvas { border-top: 0; padding-top: 0; }

/* cart item card */
html body .pos-canvas .product-section-canvas-card {
    position: relative;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(185, 138, 18, .08);
}
html body .pos-canvas .product-section-canvas-car-top { display: flex; gap: 12px; padding-right: 28px; }
html body .pos-canvas .product-image-section {
    flex: 0 0 76px;
    width: 76px !important;
    height: 76px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-3);
}
html body .pos-canvas .product-image-section img { width: 76px !important; height: 76px !important; object-fit: cover; }
html body .pos-canvas .product-details-section-offcanvas h2 { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--accent-text); }
html body .pos-canvas .product-details-section-offcanvas p  { margin: 0 0 4px; font-size: 11px; font-weight: 600; color: var(--text-soft); }
html body .pos-canvas .weight-details { margin-bottom: 6px; color: var(--text-soft) !important; }
html body .pos-canvas .cart-source-badge {
    background: var(--surface-4) !important;
    color: var(--text-strong) !important;
    border: 1px solid var(--line);
}
html body .pos-canvas .delete-product {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: var(--danger-bg);
    color: var(--danger);
    transition: background .15s, color .15s;
}
html body .pos-canvas .delete-product:hover { background: var(--danger); color: #fff; }
html body .pos-canvas .addRemark-product {
    float: right;
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface);
    color: var(--accent-text);
    border: 1px solid var(--gold-2);
    border-radius: 20px;
    transition: background .15s;
}
html body .pos-canvas .addRemark-product:hover { background: var(--surface-4); }
html body .pos-canvas .date-container { margin-top: 10px; padding: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--accent-text); }
html body .pos-canvas .date-picker {
    height: 30px !important;
    width: auto;
    padding: 2px 8px;
    font-size: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
html body .pos-canvas .remark-section textarea {
    background: var(--surface-2);
    border: 1px solid var(--line) !important;
    border-radius: 10px;
}
html body .pos-canvas .totals-section {
    padding: 12px 14px !important;
    background: var(--surface-hover) !important;
    border: 1px solid var(--line-soft);
    border-radius: 14px !important;
}
html body .pos-canvas .totals-section h5 {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--accent-text);
}
html body .pos-canvas .totals-section > div { display: flex !important; flex-wrap: wrap; gap: 6px 16px; }
html body .pos-canvas .totals-section span { font-size: 13px; font-weight: 600; color: var(--text-strong); }
html body .pos-canvas .offcanvas-footer {
    position: static !important;
    display: flex;
    gap: 12px;
    padding: 14px 20px !important;
    background: var(--surface);
    border-top: 1px solid var(--line-soft);
}
html body .pos-canvas .offcanvas-footer .cancel-btn {
    flex: 1;
    padding: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--surface);
    color: var(--accent-text);
    border: 1px solid var(--line);
    border-radius: 10px;
}
html body .pos-canvas .offcanvas-footer .cancel-btn:hover {
    background: var(--danger-bg);
    border-color: #f3b9b9;
    color: var(--danger);
}
html body .pos-canvas .offcanvas-footer .placeOrder-btn {
    flex: 1.4;
    padding: 11px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* POS popups: add customer + quick view */
html body .pos-model .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
html body .pos-model .modal-header {
    padding: 14px 20px !important;
    background: var(--surface);
    border-bottom: 1px solid var(--line-soft);
}
html body .pos-model h1.modal-title { font-size: 18px; font-weight: 700; color: var(--accent-text); }
html body .pos-model .model-close-btn {
    margin-left: auto;
    border: 0;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: var(--gold);
    transition: transform .15s, color .15s;
}
html body .pos-model .model-close-btn:hover { color: #b98a12; transform: rotate(90deg); }
html body .pos-model .modal-body { padding: 20px !important; background: var(--surface-2); }
html body .pos-model .modal-footer { background: var(--surface); border-top: 1px solid var(--line-soft); }
html body .pos-model label { font-weight: 600; color: var(--accent-text); }
html body .pos-model .form-control,
html body .pos-model .form-select { height: 44px; border: 1px solid var(--line); border-radius: 10px; }
html body .quick-view-model .modal-header { padding-bottom: 0 !important; background: var(--surface-2); border-bottom: 0; }
html body .quick-view-section .slider {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
}
html body .quick-view-section .arrow {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #9a6a06;
    box-shadow: 0 2px 8px rgba(185, 138, 18, .3);
}
html body .quick-view-section .thumbnails img {
    border: 2px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, transform .15s;
}
html body .quick-view-section .thumbnails img:hover,
html body .quick-view-section .thumbnails img.active { border-color: var(--gold); transform: translateY(-2px); }
html body .product-details-quick-view {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(185, 138, 18, .08);
}
html body .product-details-quick-view h5#product-code { font-size: 18px; font-weight: 700; color: var(--accent-text); }
html body .product-details-quick-view #product-description { font-size: 13px; color: var(--text-soft); }
html body .product-details-quick-view td {
    padding: 6px 0 !important;
    font-size: 13px;
    color: var(--text-strong);
    border-bottom: 1px dashed var(--line-soft);
}
html body .product-details-quick-view tr:last-child td { border-bottom: 0; }
html body .product-details-quick-view hr { border-color: var(--line-soft); opacity: 1; }

/*--------------------------------------------------------------
# 12. User Management
--------------------------------------------------------------*/
html body .um {
    --um-primary: var(--accent-text);
    --um-accent: var(--gold);
    --um-soft: var(--surface-3);
    --um-border: var(--line);
    --um-muted: var(--text-soft);
}
html body .um .um-card,
html body .um .perm-tile { background: var(--surface); border-radius: 12px; }
html body .um .role-avatar {
    background: var(--btn-grad);
    color: var(--btn-text);
    box-shadow: 0 2px 8px rgba(185, 138, 18, .3);
}
html body .um .role-item.active .role-avatar { background: linear-gradient(135deg, #e8bf4a 0%, #c99716 100%); color: #3f2a02; }
html body .um .role-name,
html body .um .perm-tile .perm-name { font-weight: 600; color: var(--accent-text); }
html body .um .perm-tile.on { background: var(--surface-3); border-color: var(--gold-2); }
html body .um .form-check-input:checked { background-color: var(--gold); border-color: var(--gold); }
html body .um .form-check-input:focus { border-color: var(--gold); box-shadow: 0 0 0 .2rem rgba(212, 166, 42, .25); }
html body .um .um-tab.active { color: var(--accent-text); border-bottom-color: var(--gold); }
html body .um .icon-btn:hover { background: var(--surface-4); color: var(--accent-text); }
html body .um #UsersTable thead th { background: var(--surface-3); color: var(--accent-text); }
html body .um .key-badge { background: var(--surface-4); color: var(--text-strong); }
html body .um .um-footer { background: var(--surface-2); }

/*--------------------------------------------------------------
# 13. Animations: moving shine (buttons) and soft sheen (cards, header)
--------------------------------------------------------------*/
@keyframes opBtnShine {
    0%        { left: -60%; }
    60%, 100% { left: 130%; }
}
@keyframes opSheen {
    0%        { background-position: 160% 0; }
    60%, 100% { background-position: -60% 0; }
}
html body .button,
html body .btn-primary,
html body .btn.btn-primary,
html body .btn-secondary,
html body .dt-button,
html body a.cta-button {
    position: relative;
    overflow: hidden;
}
html body .button::after,
html body .btn-primary::after,
html body .btn-secondary::after,
html body .dt-button::after,
html body a.cta-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent);
    transform: skewX(-20deg);
    animation: opBtnShine 3.5s ease-in-out infinite;
    pointer-events: none;
}
/* background-only sheen, so dropdowns are never clipped */
html body .card:not(.info-card),
html body .pagetitle,
html body .header {
    background-image: linear-gradient(110deg, transparent 40%, rgba(241, 207, 99, .22) 50%, transparent 60%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    animation: opSheen 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    html body .button::after, html body .btn-primary::after, html body .btn-secondary::after,
    html body .dt-button::after, html body a.cta-button::after,
    html body .card, html body .pagetitle, html body .header,
    html body .dashboard .info-card, html body .card.info-card.customers-card::before,
    html body #main > .wrapper, html body #main > .d-flex, html body #main > .dashboard, html body #main > section,
    html body .skeleton, html body .skeleton-rows span {
        animation: none !important;
    }
    html body .modal.fade .modal-dialog { transition: none; }
}

/*--------------------------------------------------------------
# 14. Responsive
--------------------------------------------------------------*/
@media (max-width: 991px) {
    html body #main { padding: 14px 16px; }
    html body .dataTables_wrapper .dataTables_filter input { width: 220px !important; }
}
@media (max-width: 767px) {
    html { font-size: 14px; }
    html body #main { padding: 12px; }
    html body .pagetitle { flex-wrap: wrap; padding: 6px 10px !important; }
    html body h4.contitle,
    html body .pagetitle h4 { font-size: 16px; }
    html body .header .version { display: none; }
    html body .theme-toggle { width: 32px; height: 32px; margin-right: 6px; font-size: 15px; }

    /* forms: one field per row, full-width action buttons */
    html body .AddForm .button-wrapper { flex-direction: column; float: none !important; width: 100%; gap: 8px; }
    html body .custom-button,
    html body .AddForm .button-wrapper .button { width: 100% !important; margin-right: 0 !important; }

    /* tables */
    html body .dataTables_wrapper .dataTables_filter { float: none !important; width: 100%; margin-bottom: 8px; }
    html body .dataTables_wrapper .dataTables_filter label { width: 100%; }
    html body .dataTables_wrapper .dataTables_filter input { width: 100% !important; }
    html body div.dt-buttons { margin-bottom: 8px; }
    html body table.dataTable thead th,
    html body table.dataTable thead td { padding: 10px 18px !important; font-size: 13px; }
    html body table.dataTable tbody td { padding: 8px !important; font-size: 13px; }
    html body .dt-scroll-x { max-height: calc(100vh - 300px); }
    html body .dataTables_wrapper .dataTables_paginate { float: none !important; text-align: center; }
    html body .dataTables_wrapper .dataTables_info { float: none !important; text-align: center; }

    /* popups */
    html body .modal-dialog { margin: .5rem; }
    html body .modal-xl,
    html body .modal-lg { max-width: calc(100vw - 1rem); }
    html body .modal-body { padding: 12px; }

    /* footer */
    html body #footer { height: auto; min-height: 56px; padding: 8px 12px; text-align: center; }
    html body #toast-container > div { width: calc(100vw - 24px); }
}
@media (max-width: 600px) {
    html body .pos-card .product-image { height: 200px; }
    html body .offcanvas.pos-canvas { width: 100vw; right: -100vw; border-radius: 0; }
    html body .pos-canvas .offcanvas-header { border-radius: 0; }
}

/*--------------------------------------------------------------
# 14b. Dark-mode extras (components that use their own colours)
--------------------------------------------------------------*/
/* logo: coloured version in light mode, white version in dark mode (no background box) */
html body .header .logo-dark { display: none; }
html[data-theme="dark"] body .header .logo-light { display: none; }
html[data-theme="dark"] body .header .logo-dark { display: block; }
html[data-theme="dark"] .logo-section { background: transparent; }
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer { background-color: var(--surface); border-color: var(--line-soft); }
html[data-theme="dark"] .table,
html[data-theme="dark"] table.dataTable { --bs-table-bg: transparent; --bs-table-color: var(--text-body); color: var(--text-body); }
html[data-theme="dark"] .form-control::placeholder { color: var(--text-soft); }
html[data-theme="dark"] select option { background: var(--surface); color: var(--text-input); }
html[data-theme="dark"] .select2-container--default .select2-selection--single,
html[data-theme="dark"] .select2-container--default .select2-selection--multiple,
html[data-theme="dark"] .select2-dropdown { background-color: var(--surface); border-color: var(--gold); }
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text-input); }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.4); }
html[data-theme="dark"] .breadcrumb .breadcrumb-item::before { color: var(--text-soft); }
html[data-theme="dark"] .text-muted { color: var(--text-soft) !important; }
html[data-theme="dark"] hr { border-color: var(--line-soft); }
html[data-theme="dark"] .accordion-button { background: var(--surface-3); color: var(--accent-text); }
html[data-theme="dark"] .list-group-item { background: var(--surface); color: var(--text-body); border-color: var(--line-soft); }
html[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-theme="dark"] .dataTables_wrapper .dataTables_length select { background: var(--surface) !important; color: var(--text-input) !important; }

/* popup widths: large = 760px (two-column forms), extra-large = 1000px (three-column forms) */
@media (min-width: 992px) {
    html body .modal-lg {
        --bs-modal-width: 760px;
        max-width: 760px;
    }
    html body .modal-xl {
        --bs-modal-width: 1000px;
        max-width: 1000px;
    }
}

/*--------------------------------------------------------------
# Image preview box (every form with an image upload)
--------------------------------------------------------------*/
html body .image-preview {
    position: relative;
    width: 130px;
    height: 130px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    background: var(--surface-3) !important;
    background-image: none !important;
    border: 2px dashed var(--gold-2);
    border-radius: 14px;
    transition: border-color .2s, box-shadow .2s;
}
html body .image-preview::before {
    content: "\f42a";
    font-family: "bootstrap-icons";
    font-size: 36px;
    line-height: 1;
    color: var(--gold);
}
html body .image-preview p {
    margin: 0 !important;
    font-size: 12px;
    text-align: center;
    text-transform: capitalize;
}
html body .image-preview p i {
    font-style: normal;
    font-weight: 600;
    color: var(--text-soft);
}
html body .image-preview img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    background: var(--surface);
}
html body .image-preview img[src="#"] {
    display: none !important;
}
/* when a picture is showing: solid gold frame, hide the icon and the hint */
html body .image-preview:has(img:not([src="#"]):not([style*="none"])) {
    border-style: solid;
    border-color: var(--gold);
    box-shadow: var(--shadow-card);
}
html body .image-preview:has(img:not([src="#"]):not([style*="none"]))::before,
html body .image-preview:has(img:not([src="#"]):not([style*="none"])) p {
    display: none;
}

/*--------------------------------------------------------------
# Board Rate page: category cards with one rate tile per karat
--------------------------------------------------------------*/
html body .br-hint {
    margin: 0 0 14px;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text-strong);
    background: var(--surface-3);
    border: 1px dashed var(--gold-2);
    border-radius: 10px;
}
html body .br-card {
    overflow: hidden;
    margin-bottom: 0;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    transition: transform .2s, box-shadow .2s;
}
html body .br-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-pop);
}
/* card header */
html body .br-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #fbe9a6 0%, #f1cf63 100%);
}
html body .br-head-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fbe9a6;
    background: #9a6a06;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .45);
}
html body .br-head-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: #5e3f03;
}
html body .br-head-sub {
    font-size: 12px;
    font-weight: 600;
    color: #7a5304;
    opacity: .85;
}
/* card body: rate tiles */
html body .br-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 16px 6px;
    background: var(--surface);
}
html body .br-tile {
    margin: 0;
    padding: 12px 10px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
}
html body .br-tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
html body .br-karat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
    background: var(--surface-4);
    border: 1px solid var(--line);
    border-radius: 20px;
}
html body .br-karat i {
    color: var(--gold);
}
html body .br-flags {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
html body .br-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
}
html body .br-flag .form-check-input {
    margin: 0;
    cursor: pointer;
}
html body .br-flag input[type=checkbox]:not(.toggle-switch):checked {
    background-color: var(--gold);
    border-color: var(--gold);
}
/* the Visible switch (replaces the near-black custom switch) */
html body .br-card .toggle-switch {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 40px;
    height: 22px;
    margin: 0;
    border: 0;
    border-radius: 22px;
    background-color: var(--line);
    box-shadow: none;
    transition: background-color .25s;
}
html body .br-card .toggle-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .25s;
}
html body .br-card .toggle-switch:checked {
    background-color: var(--gold);
}
html body .br-card .toggle-switch:checked::before {
    transform: translateX(18px);
}
html body .br-tile .form-label {
    font-size: 12.5px;
    color: var(--accent-text);
}
/* rate input with the rupee sign */
html body .br-rate {
    position: relative;
}
html body .br-rate .br-rupee {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    color: var(--gold);
    pointer-events: none;
}
html body .br-rate .form-control {
    padding-left: 28px;
    font-weight: 700;
    color: var(--accent-text);
}
/* save */
html body .br-foot {
    padding: 8px 16px 16px;
    background: var(--surface);
}
html body .br-foot .btn {
    padding: 10px 14px;
}
html body .br-foot .btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* Visible switch: no tick mark on the knob (Bootstrap draws one on checked checkboxes) */
html body .br-card .toggle-switch,
html body .br-card .toggle-switch:checked,
html body .br-card .toggle-switch:focus {
    background-image: none !important;
}

/* Board Rate: the Default tick box is hidden for now. It stays in the page (not removed), so the saved
   value is still loaded and saved back unchanged. To show it again, delete this rule. */
html body .br-flag-default {
    display: none;
}
