/* =============================================================================
   GOHUNTER ERP — OFFICIAL DESIGN SYSTEM v1.0
   Royal Violet Palette · Inter Font · Solid 8px Buttons · Subtle Violet Tables
   DO NOT EDIT hex values directly — all colours live in :root below.
   ============================================================================= */

/* ─── 0. GOOGLE FONTS ───────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ─── 1. DESIGN TOKENS (CSS VARIABLES) ─────────────────────────────────────── */
:root {
    /* Sidebar — LOCKED (Client Approved) */
    --sidebar-bg:           linear-gradient(0.07deg, #0E0E44 -31.63%, #4649C7 99.95%);
    --sidebar-text:         #FFFFFF;
    --sidebar-text-muted:   rgba(255,255,255,0.55);
    --sidebar-text-hover:   rgba(255,255,255,0.85);
    --sidebar-active:       #6DBFB8;
    --sidebar-active-bg:    rgba(255,255,255,0.08);
    --sidebar-active-border:#6DBFB8;
    --sidebar-width:        256px;

    /* Primary — Indigo Violet */
    --primary:              #6366F1;
    --primary-hover:        #4F46E5;
    --primary-active:       #4338CA;
    --primary-light:        #EDE9FE;
    --primary-lighter:      #F5F3FF;
    --primary-text-on-light:#4C1D95;
    --primary-shadow:       rgba(99,102,241,0.35);

    /* Success */
    --success:              #10B981;
    --success-hover:        #059669;
    --success-light:        #DCFCE7;
    --success-text:         #15803D;
    --success-shadow:       rgba(16,185,129,0.35);

    /* Warning */
    --warning:              #F59E0B;
    --warning-hover:        #D97706;
    --warning-light:        #FEF3C7;
    --warning-text:         #92400E;
    --warning-shadow:       rgba(245,158,11,0.35);

    /* Danger */
    --danger:               #EF4444;
    --danger-hover:         #DC2626;
    --danger-light:         #FEE2E2;
    --danger-text:          #991B1B;
    --danger-shadow:        rgba(239,68,68,0.35);

    /* Info */
    --info:                 #3B82F6;
    --info-hover:           #2563EB;
    --info-light:           #DBEAFE;
    --info-text:            #1E40AF;
    --info-shadow:          rgba(59,130,246,0.35);

    /* Purple — processing / in-progress states */
    --purple:               #7C3AED;
    --purple-light:         #EDE9FE;
    --purple-text:          #5B21B6;

    /* Neutrals */
    --text-primary:         #1E1B4B;
    --text-secondary:       #475569;
    --text-muted:           #64748B;
    --text-placeholder:     #9CA3AF;
    --text-disabled:        #94A3B8;

    /* Backgrounds */
    --bg-page:              #F8FAFC;
    --bg-card:              #FFFFFF;
    --bg-secondary:         #F1F5F9;
    --bg-tertiary:          #F8FAFC;
    --bg-hover-row:         #FAFAFF;
    --bg-disabled:          #F1F5F9;

    /* Borders */
    --border:               #E2E8F0;
    --border-input:         #E5E7EB;
    --border-focus:         #7C3AED;
    --border-light:         #F1F5F9;

    /* Border Radius */
    --radius-xs:            4px;
    --radius-sm:            6px;
    --radius-md:            8px;
    --radius-lg:            12px;
    --radius-xl:            16px;
    --radius-full:          9999px;

    /* Shadows */
    --shadow-xs:            0 1px 2px rgba(0,0,0,0.04);
    --shadow-card:          0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:            0 4px 12px rgba(0,0,0,0.08);
    --shadow-hover:         0 4px 16px rgba(99,102,241,0.1);
    --shadow-modal:         0 8px 40px rgba(0,0,0,0.15);
    --shadow-btn-primary:   0 4px 14px rgba(99,102,241,0.35);
    --shadow-btn-success:   0 4px 14px rgba(16,185,129,0.35);
    --shadow-btn-danger:    0 4px 14px rgba(239,68,68,0.35);
    --shadow-btn-warning:   0 4px 14px rgba(245,158,11,0.35);
    --shadow-btn-info:      0 4px 14px rgba(59,130,246,0.35);

    /* Typography */
    --font-family:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:            'JetBrains Mono', 'SF Mono', 'Consolas', 'Courier New', monospace;
    --font-size-xs:         11px;
    --font-size-sm:         12px;
    --font-size-base:       14px;
    --font-size-md:         16px;
    --font-size-lg:         18px;
    --font-size-xl:         24px;
    --font-size-2xl:        32px;
    --line-height:          1.6;

    /* Spacing */
    --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
    --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
    --space-8: 32px;  --space-10: 40px; --space-12: 48px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Table */
    --table-header-bg:      #EDE9FE;
    --table-header-text:    #4C1D95;
    --table-border:         #F1F5F9;
    --table-row-hover:      #FAFAFF;

    /* Modal */
    --modal-header-bg:      linear-gradient(135deg, #4649C7, #6366F1);
}

/* ─── 2. BASE / TYPOGRAPHY ──────────────────────────────────────────────────── */
body,
html {
    font-family: var(--font-family) !important;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-page);
}

/* Monospace for financial/invoice data */
.font-mono,
.invoice-number,
.order-number,
.amount-cell,
td.amount,
td.total,
td.price,
td.balance {
    font-family: var(--font-mono) !important;
}

/* ─── 3. SIDEBAR — LOCKED GRADIENT ─────────────────────────────────────────── */

/* Outer <aside> wrapper */
#gh-sidebar,
aside.side-bar {
    background: var(--sidebar-bg) !important;
    border-right: none !important;
    /* Subtle right edge so main content is visually separated */
    box-shadow: 2px 0 8px rgba(0,0,0,0.18) !important;
}

/* ── Logo / brand strip ────────────────────────────────────────────────────── */
.gh-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    text-decoration: none !important;
    flex-shrink: 0;
    background: transparent !important;
}

.gh-sidebar-logo:hover {
    background: transparent !important;
}

.gh-sidebar-logo img,
.gh-sidebar-logo p,
.gh-sidebar-logo span {
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.3px;
    text-align: center;
}

/* ── Scrollable nav container (#side-bar) ──────────────────────────────────── */
.gh-sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
    /* Override any templateData background injection */
    background: transparent !important;
}

/* Thin, teal-tinted scrollbar to match sidebar palette */
.gh-sidebar-nav::-webkit-scrollbar { width: 4px; }
.gh-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.gh-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(109,191,184,0.3);
    border-radius: 4px;
}
.gh-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(109,191,184,0.6);
}

/* ── Base nav item (leaf) ──────────────────────────────────────────────────── */
.gh-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255,255,255,0.55);         /* side-bar-normal default */
    text-decoration: none !important;
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
    /* Left border placeholder — 3px transparent keeps layout stable */
    border-left: 3px solid transparent;
    cursor: pointer;
}

.gh-nav-item:hover {
    color: rgba(255,255,255,0.88) !important;
    background: rgba(255,255,255,0.05) !important;
    text-decoration: none !important;
}

/* Active leaf item */
.gh-nav-item.side-bar-active {
    color: #6DBFB8 !important;
    background: rgba(255,255,255,0.08) !important;
    border-left: 3px solid #6DBFB8 !important;
    font-weight: 600 !important;
}

.gh-nav-item.side-bar-active:hover {
    background: rgba(255,255,255,0.12) !important;
}

/* Icons inside nav items */
.gh-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.60;
    transition: opacity var(--transition-fast);
}

.gh-nav-item:hover svg,
.gh-nav-item.side-bar-active svg {
    opacity: 1;
}

/* Nav label text */
.gh-nav-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Section header (non-clickable group label) ────────────────────────────── */
.gh-nav-section {
    padding: 14px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.28);
    white-space: nowrap;
}

/* ── Divider ───────────────────────────────────────────────────────────────── */
.gh-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 6px 4px;
}

/* ── Dropdown group wrapper ────────────────────────────────────────────────── */
.gh-nav-group {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* ── Dropdown toggle button (parent item) ──────────────────────────────────── */
.gh-nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255,255,255,0.55);
    text-decoration: none !important;
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
    border-left: 3px solid transparent;
    width: 100%;
    background: transparent;
    border-top: none;
    border-right: none;
    border-bottom: none;
    cursor: pointer;
    text-align: left;
    -webkit-appearance: none;
}

.gh-nav-group-toggle:hover {
    color: rgba(255,255,255,0.88) !important;
    background: rgba(255,255,255,0.05) !important;
    text-decoration: none !important;
}

/* Parent with an active child */
.gh-nav-group-toggle.gh-nav-group--open {
    color: rgba(255,255,255,0.88) !important;
    background: rgba(255,255,255,0.06) !important;
}

.gh-nav-group-toggle svg:first-child {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.60;
}

.gh-nav-group-toggle:hover svg:first-child,
.gh-nav-group-toggle.gh-nav-group--open svg:first-child {
    opacity: 1;
}

/* ── Chevron SVG ───────────────────────────────────────────────────────────── */
.gh-nav-chevron {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.40;
    transition: transform var(--transition-base), opacity var(--transition-fast);
    color: rgba(255,255,255,0.80) !important;
    stroke: rgba(255,255,255,0.80) !important;
}

.gh-nav-group-toggle.gh-nav-group--open .gh-nav-chevron {
    opacity: 0.80;
}

/* ── Children container ────────────────────────────────────────────────────── */
.gh-nav-children {
    position: relative;
    margin-top: 2px;
    margin-left: 18px;
    padding-left: 14px;
    padding-top: 2px;
    padding-bottom: 4px;
    /* Subtle vertical guide line */
    border-left: 1px solid rgba(255,255,255,0.10);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* ── Child nav item ────────────────────────────────────────────────────────── */
.gh-nav-child {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.48);
    text-decoration: none !important;
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
    border-left: 2px solid transparent;
}

.gh-nav-child:hover {
    color: rgba(255,255,255,0.88) !important;
    background: rgba(255,255,255,0.05) !important;
    text-decoration: none !important;
}

.gh-nav-child.side-bar-active {
    color: #6DBFB8 !important;
    border-left: 2px solid #6DBFB8 !important;
    font-weight: 600 !important;
}

/* ── Override any templateData inline color injections ─────────────────────── */
/* templateData may inject .side-bar-normal / #side-bar via inline <style>.
   The design system locks these — !important ensures we always win.          */

.side-bar-normal {
    color: rgba(255,255,255,0.55) !important;
}

.side-bar-normal:hover {
    color: rgba(255,255,255,0.88) !important;
}

#side-bar {
    background: transparent !important;
}

/* Override templateData sidebar background injection on #side-bar */
/* (templateData injects inline style on #side-bar; our gh-sidebar-nav wrapper
    has background:transparent so the aside gradient always shows through)     */

/* ─── 4. TOPBAR / HEADER ────────────────────────────────────────────────────── */
#header_main_app {
    background: linear-gradient(135deg, #0E0E44, #4649C7) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

/* ─── 5. PAGE BACKGROUND ────────────────────────────────────────────────────── */
#main_background,
section.tw-bg-white,
.content-wrapper,
.main-content {
    background: var(--bg-page) !important;
}

/* ─── 6. CARDS ──────────────────────────────────────────────────────────────── */
.card,
.box,
.widget-box {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
}

.card-header,
.box-header,
.widget-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 16px 20px !important;
    font-weight: 700;
    color: var(--text-primary);
}

/* ─── 7. TABLES ─────────────────────────────────────────────────────────────── */

/* Table wrapper — rounded border */
.table-responsive,
.dataTables_wrapper .table-responsive {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Base table reset */
.table,
table.dataTable {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    border-collapse: collapse !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* Table head — the signature subtle violet */
.table thead th,
.table thead td,
table.dataTable thead th,
table.dataTable thead td,
.table > thead > tr > th {
    background: var(--table-header-bg) !important;
    color: var(--table-header-text) !important;
    font-size: var(--font-size-xs) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 11px 16px !important;
    border-bottom: 1px solid #DDD6FE !important;
    border-top: none !important;
    white-space: nowrap;
}

/* Remove Bootstrap's default gradient + image on sorted columns */
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background: var(--table-header-bg) !important;
    background-image: none !important;
    color: var(--table-header-text) !important;
    position: relative;
    cursor: pointer;
    /* NO extra padding-right — arrows sit inside existing padding */
}

/* Sort arrows — pure CSS triangles (global)
   Compact 3px triangles positioned at right:4px inside existing cell padding.
   This avoids adding extra width that misaligns header vs body columns. */
table.dataTable thead .sorting::before,
table.dataTable thead .sorting::after {
    content: '';
    position: absolute;
    right: 4px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    opacity: 0.22;
}
table.dataTable thead .sorting::before {
    top: 50%;
    transform: translateY(-5px);
    border-bottom: 3.5px solid var(--table-header-text, #4C1D95);
}
table.dataTable thead .sorting::after {
    top: 50%;
    transform: translateY(1px);
    border-top: 3.5px solid var(--table-header-text, #4C1D95);
}
table.dataTable thead .sorting_asc::before,
table.dataTable thead .sorting_asc::after {
    content: '';
    position: absolute;
    right: 4px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
}
table.dataTable thead .sorting_asc::before {
    top: 50%;
    transform: translateY(-1px);
    border-bottom: 4px solid var(--table-header-text, #4C1D95);
    opacity: 0.85;
}
table.dataTable thead .sorting_asc::after {
    display: none;
}
table.dataTable thead .sorting_desc::before,
table.dataTable thead .sorting_desc::after {
    content: '';
    position: absolute;
    right: 4px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
}
table.dataTable thead .sorting_desc::before {
    display: none;
}
table.dataTable thead .sorting_desc::after {
    top: 50%;
    transform: translateY(-1px);
    border-top: 4px solid var(--table-header-text, #4C1D95);
    opacity: 0.85;
}

/* Table body cells */
.table tbody td,
.table tbody th,
table.dataTable tbody td,
table.dataTable tbody th,
.table > tbody > tr > td {
    padding: 11px 16px !important;
    border-bottom: 1px solid var(--table-border) !important;
    border-top: none !important;
    vertical-align: middle !important;
    color: var(--text-primary);
    font-size: 13px;
}

/* Row hover */
.table-hover tbody tr:hover,
.table tbody tr:hover,
table.dataTable tbody tr:hover {
    background-color: var(--table-row-hover) !important;
}

/* Remove Bootstrap's striped rows — replace with our hover-only style */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: transparent !important;
}

/* Last row no bottom border */
.table tbody tr:last-child td,
table.dataTable tbody tr:last-child td {
    border-bottom: none !important;
}

/* Table footer / DataTables info + pagination area */
.dataTables_info,
.dataTables_length,
.dataTables_filter {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-family: var(--font-family) !important;
}

/* DataTable dom wrapper layout (used with dom: '<"gh-table-top"lf>rt<"gh-table-bottom"ip>') */
.gh-table-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--table-border);
    gap: 12px;
    flex-wrap: wrap;
}
.gh-table-top .dataTables_length {
    margin: 0;
}
.gh-table-top .dataTables_length select {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-sm);
    padding: 4px 8px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-sm);
    outline: none;
}
.gh-table-top .dataTables_filter {
    margin: 0;
}
.gh-table-top .dataTables_filter input {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base);
    padding: 6px 12px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.gh-table-top .dataTables_filter input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.gh-table-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--table-border);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Pagination — global DS styled ───────────────────────────────── */
.dataTables_paginate .paginate_button {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-sm) !important;
    font-weight: 600 !important;
    padding: 5px 10px !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border) !important;
    margin: 0 2px;
    background: #FFFFFF !important;
    color: var(--text-secondary) !important;
    transition: all var(--transition-fast);
}
.dataTables_paginate .paginate_button.current {
    background: #3b82f6 !important;
    color: #FFFFFF !important;
    border-color: #3b82f6 !important;
}
.dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: #eff6ff !important;
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}
.dataTables_paginate .paginate_button.disabled {
    opacity: 0.35 !important;
    cursor: default !important;
}

/* ── Export / action buttons row — global DS ─────────────────────── */
.gh-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--table-border);
    gap: 12px;
    flex-wrap: wrap;
}
.gh-export-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.gh-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-family: var(--font-family) !important;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none !important;
    transition: all var(--transition-fast);
    line-height: 1.3;
}
.gh-export-btn:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
    color: var(--primary);
}
.gh-export-btn i {
    font-size: 11px;
    opacity: 0.7;
}
.gh-export-btn:hover i {
    opacity: 1;
}

/* ── Sticky table header — works inside gh-table-body scroll container ── */
.gh-table-body {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 70vh;
    width: 100%;
}

/* When gh-table-scroll is inside gh-table-body (via DataTables dom),
   let gh-table-scroll handle ALL scrolling — prevents duplicate sticky headers */
.gh-table-body:has(.gh-table-scroll) {
    overflow: visible !important;
    max-height: none !important;
}

.gh-table-body table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--table-header-bg) !important;
}

/* ── Fallback: if DataTables still uses scrollY on other pages ──── */
.dataTables_scrollHead {
    overflow: visible !important;
}
.dataTables_scrollBody thead {
    visibility: collapse !important;
    height: 0 !important;
    line-height: 0 !important;
}
.dataTables_scrollBody thead th,
.dataTables_scrollBody thead td {
    padding: 0 !important;
    height: 0 !important;
    border: none !important;
    font-size: 0 !important;
    visibility: collapse !important;
}
.dataTables_scrollBody thead th::before,
.dataTables_scrollBody thead th::after {
    display: none !important;
    content: none !important;
}

/* ─── 8. MODALS ─────────────────────────────────────────────────────────────── */
.modal-content {
    border: none !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-modal) !important;
    overflow: hidden;
}

.modal-header,
.modal-header.bg-primary,
.modal-header.bg-info,
.modal-header.bg-success,
.modal-header.bg-danger,
.modal-header.bg-warning {
    background: var(--modal-header-bg) !important;
    color: #FFFFFF !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    padding: 18px 24px !important;
}

.modal-header .modal-title,
.modal-title {
    color: #FFFFFF !important;
    font-size: 16px !important;
    font-weight: 600 !important;
}

.modal-header .close,
.modal-header button.close {
    background: rgba(255,255,255,0.2) !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
    border-radius: var(--radius-sm) !important;
    border: none !important;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: background var(--transition-fast);
}
#close_button {
    background: rgba(255,255,255,0.2) !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
    border-radius: var(--radius-sm) !important;
    border: none !important;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    line-height: 1.4;
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.modal-header .close:hover,
.modal-header button.close:hover {
    background: rgba(255,255,255,0.35) !important;
}

.modal-body {
    padding: 24px !important;
    background: var(--bg-card);
}

.modal-footer {
    padding: 16px 24px !important;
    border-top: 1px solid var(--border) !important;
    background: var(--bg-tertiary) !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ─── 9. BUTTONS ────────────────────────────────────────────────────────────── */

/* Base reset for all Bootstrap .btn */
.btn {
    font-family: var(--font-family) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: var(--radius-md) !important;
    padding: 9px 20px !important;
    line-height: 1 !important;
    border: none !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-base) !important;
    text-decoration: none !important;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none !important;
}
.btn:active {
    transform: translateY(0) !important;
}
.btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Primary */
.btn-primary,
.btn.btn-primary {
    background: var(--primary) !important;
    color: #FFFFFF !important;
    border-color: var(--primary) !important;
}
.btn-primary:hover,
.btn.btn-primary:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: var(--shadow-btn-primary) !important;
    color: #FFFFFF !important;
}
.btn-primary:active,
.btn-primary.active {
    background: var(--primary-active) !important;
    border-color: var(--primary-active) !important;
}

/* Success */
.btn-success,
.btn.btn-success {
    background: var(--success) !important;
    color: #FFFFFF !important;
    border-color: var(--success) !important;
}
.btn-success:hover,
.btn.btn-success:hover {
    background: var(--success-hover) !important;
    border-color: var(--success-hover) !important;
    box-shadow: var(--shadow-btn-success) !important;
    color: #FFFFFF !important;
}

/* Danger */
.btn-danger,
.btn.btn-danger {
    background: var(--danger) !important;
    color: #FFFFFF !important;
    border-color: var(--danger) !important;
}
.btn-danger:hover,
.btn.btn-danger:hover {
    background: var(--danger-hover) !important;
    border-color: var(--danger-hover) !important;
    box-shadow: var(--shadow-btn-danger) !important;
    color: #FFFFFF !important;
}

/* Warning */
.btn-warning,
.btn.btn-warning {
    background: var(--warning) !important;
    color: #FFFFFF !important;
    border-color: var(--warning) !important;
}
.btn-warning:hover,
.btn.btn-warning:hover {
    background: var(--warning-hover) !important;
    border-color: var(--warning-hover) !important;
    box-shadow: var(--shadow-btn-warning) !important;
    color: #FFFFFF !important;
}

/* Info */
.btn-info,
.btn.btn-info {
    background: var(--info) !important;
    color: #FFFFFF !important;
    border-color: var(--info) !important;
}
.btn-info:hover,
.btn.btn-info:hover {
    background: var(--info-hover) !important;
    border-color: var(--info-hover) !important;
    box-shadow: var(--shadow-btn-info) !important;
    color: #FFFFFF !important;
}

/* Secondary / Default */
.btn-default,
.btn-secondary,
.btn.btn-default,
.btn.btn-secondary {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
}
.btn-default:hover,
.btn-secondary:hover,
.btn.btn-default:hover,
.btn.btn-secondary:hover {
    background: var(--border) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

/* Link / Ghost */
.btn-link,
.btn.btn-link {
    background: transparent !important;
    color: var(--primary) !important;
    border: none !important;
    box-shadow: none !important;
    padding: 9px 12px !important;
}
.btn-link:hover,
.btn.btn-link:hover {
    color: var(--primary-hover) !important;
    text-decoration: underline !important;
    transform: none !important;
}

/* Sizes */
.btn-xs,
.btn.btn-xs {
    padding: 5px 10px !important;
    font-size: 11px !important;
    border-radius: var(--radius-sm) !important;
}
.btn-sm,
.btn.btn-sm {
    padding: 7px 14px !important;
    font-size: 12px !important;
}
.btn-lg,
.btn.btn-lg {
    padding: 12px 26px !important;
    font-size: 15px !important;
}

/* Disabled */
.btn[disabled],
.btn.disabled,
.btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Outline variants */
.btn-outline-primary {
    background: transparent !important;
    color: var(--primary) !important;
    border: 1.5px solid var(--primary) !important;
}
.btn-outline-primary:hover {
    background: var(--primary-lighter) !important;
    color: var(--primary) !important;
}

/* DaisyUI btn overrides — keep colours aligned */
.tw-dw-btn-primary {
    --tw-bg-opacity: 1;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-md) !important;
}
.tw-dw-btn-success {
    background-color: var(--success) !important;
    border-color: var(--success) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-md) !important;
}
.tw-dw-btn-error {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-md) !important;
}
.tw-dw-btn-warning {
    background-color: var(--warning) !important;
    border-color: var(--warning) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-md) !important;
}
.tw-dw-btn-info {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: #FFFFFF !important;
    border-radius: var(--radius-md) !important;
}

/* ─── 10. FORM CONTROLS ──────────────────────────────────────────────────────── */
.form-control,
.form-select,
input.form-control,
select.form-control,
textarea.form-control {
    font-family: var(--font-family) !important;
    font-size: var(--font-size-base) !important;
    color: var(--text-primary) !important;
    background-color: #FFFFFF !important;
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 14px !important;
    line-height: 1.5;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
    box-shadow: none !important;
    height: auto !important;
}

.form-control:focus,
.form-select:focus,
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.10) !important;
    background-color: #FFFFFF !important;
    outline: none !important;
}

.form-control::placeholder {
    color: var(--text-placeholder) !important;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--bg-disabled) !important;
    color: var(--text-disabled) !important;
    cursor: not-allowed;
}

/* Form labels */
.control-label,
label.control-label,
.form-label,
label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 6px !important;
}

/* Required star */
.required,
label .text-danger {
    color: var(--danger) !important;
}

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-md) !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    padding: 6px 10px !important;
    font-size: var(--font-size-base) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.10) !important;
    outline: none !important;
}

.select2-dropdown {
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    font-size: var(--font-size-base);
}

.select2-results__option--highlighted[aria-selected] {
    background: var(--primary) !important;
}

/* Input groups */
.input-group-addon,
.input-group-text {
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-md) !important;
    background: var(--bg-secondary) !important;
    color: var(--text-muted) !important;
    font-size: var(--font-size-base);
    /* Match the adjacent .form-control metrics so the glyph ($) sits on the
       same vertical center as the input's text. Bootstrap's `display: table`
       addon inherits its own defaults (padding: 6px 12px; line-height: 1),
       which are shorter than the form-control's (padding: 10px 14px;
       line-height: 1.5) and push the glyph above the input's text baseline. */
    padding: 10px 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Restore directional rounding for addons inside an .input-group so a prefix
   ($) rounds on the LEFT and butts flat against the input on the RIGHT, and
   vice versa for a suffix addon. Without these overrides the blanket rule
   above would fully round the addon, leaving a visible seam next to the input. */
.input-group > .input-group-addon:first-child,
.input-group > .input-group-text:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
}
.input-group > .input-group-addon:last-child,
.input-group > .input-group-text:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: 0 !important;
}
/* The adjacent .form-control must flatten on the side it touches an addon. */
.input-group > .form-control:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Form validation error state */
.has-error .form-control,
.form-control.error,
.is-invalid {
    border-color: var(--danger) !important;
}
.has-error .form-control:focus,
.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,0.10) !important;
}
.has-error .help-block,
.invalid-feedback,
.help-block.with-errors {
    color: var(--danger) !important;
    font-size: var(--font-size-xs) !important;
    margin-top: 4px;
}

/* ─── 11. BADGES / STATUS LABELS ─────────────────────────────────────────────── */

/* Reset Bootstrap badge base */
.badge,
.label {
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 12px !important;
    border-radius: var(--radius-full) !important;
    letter-spacing: 0.2px;
    display: inline-flex !important;
    align-items: center;
    line-height: 1.5;
}

/* Success — Paid, Completed, Active, Approved, Delivered */
.badge-success,
.label-success,
.badge.badge-success {
    background: var(--success-light) !important;
    color: var(--success-text) !important;
}

/* Warning — Pending, Partial, On Hold, In Transit */
.badge-warning,
.label-warning,
.badge.badge-warning {
    background: var(--warning-light) !important;
    color: var(--warning-text) !important;
}

/* Danger — Overdue, Cancelled, Voided, Rejected */
.badge-danger,
.label-danger,
.badge.badge-danger {
    background: var(--danger-light) !important;
    color: var(--danger-text) !important;
}

/* Info — Draft, Packed, Reconciled */
.badge-info,
.label-info,
.badge.badge-info {
    background: var(--info-light) !important;
    color: var(--info-text) !important;
}

/* Primary — general primary states */
.badge-primary,
.label-primary,
.badge.badge-primary {
    background: var(--primary-light) !important;
    color: var(--primary-text-on-light) !important;
}

/* Purple — Processing, Shipped, In Progress */
.badge-purple,
.label-purple,
.badge.badge-purple {
    background: var(--purple-light) !important;
    color: var(--purple-text) !important;
}

/* Default / Neutral — Closed, Archived */
.badge-default,
.label-default,
.badge.badge-default {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}

/* ─── 12. ALERTS ─────────────────────────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-md) !important;
    border: none !important;
    font-size: var(--font-size-base);
    padding: 14px 18px !important;
}
.alert-success  { background: var(--success-light) !important;  color: var(--success-text) !important; }
.alert-warning  { background: var(--warning-light) !important;  color: var(--warning-text) !important; }
.alert-danger   { background: var(--danger-light)  !important;  color: var(--danger-text)  !important; }
.alert-info     { background: var(--info-light)    !important;  color: var(--info-text)    !important; }

/* ─── 13. PAGINATION ─────────────────────────────────────────────────────────── */
.pagination .page-item .page-link,
.pagination > li > a,
.pagination > li > span {
    font-size: var(--font-size-sm) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    padding: 5px 10px !important;
    margin: 0 2px !important;
    background: #FFFFFF !important;
    transition: all var(--transition-fast) !important;
}
.pagination .page-item .page-link:hover,
.pagination > li > a:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: var(--primary-lighter) !important;
}
.pagination .page-item.active .page-link,
.pagination > li.active > a {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #FFFFFF !important;
}

/* ─── 14. TABS / NAV ─────────────────────────────────────────────────────────── */
.nav-tabs {
    border-bottom: 2px solid var(--border) !important;
}
.nav-tabs > li > a,
.nav-tabs .nav-link {
    font-size: var(--font-size-sm) !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
    margin-bottom: -2px;
    transition: color var(--transition-fast), border-color var(--transition-fast) !important;
}
.nav-tabs > li > a:hover,
.nav-tabs .nav-link:hover {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
    background: transparent !important;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover,
.nav-tabs .nav-link.active {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    background: transparent !important;
    font-weight: 700 !important;
}

/* ─── 15. STAT / SUMMARY BOXES ───────────────────────────────────────────────── */
.info-box,
.small-box {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
    border: 1px solid var(--border) !important;
}
.info-box .info-box-number,
.small-box h3 {
    font-family: var(--font-mono) !important;
    font-weight: 800 !important;
}

/* ─── 16. DROPDOWN MENUS ─────────────────────────────────────────────────────── */
.dropdown-menu {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 6px !important;
    font-size: var(--font-size-base);
}
.dropdown-menu > li > a,
.dropdown-item {
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all var(--transition-fast) !important;
}
.dropdown-menu > li > a:hover,
.dropdown-item:hover {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* ─── 17. UTILITY CLASSES (design system helpers) ────────────────────────────── */

/* Status badge helpers usable anywhere in blade views */
.ds-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.ds-badge-success  { background: var(--success-light); color: var(--success-text); }
.ds-badge-warning  { background: var(--warning-light); color: var(--warning-text); }
.ds-badge-danger   { background: var(--danger-light);  color: var(--danger-text);  }
.ds-badge-info     { background: var(--info-light);    color: var(--info-text);    }
.ds-badge-purple   { background: var(--purple-light);  color: var(--purple-text);  }
.ds-badge-neutral  { background: var(--bg-secondary);  color: var(--text-secondary); }

/* Page title */
.ds-page-title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}
.ds-page-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

/* Amount / number display */
.ds-amount {
    font-family: var(--font-mono) !important;
    font-weight: 600;
    font-size: 13px;
}

/* Table link */
.ds-table-link,
a.ds-table-link {
    color: var(--primary) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.ds-table-link:hover,
a.ds-table-link:hover {
    text-decoration: underline !important;
}

/* ─── 18. SCROLLBAR ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: 3px; }
::-webkit-scrollbar-thumb { background: #C4B5FD; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── 19. DATATABLES TOOLBAR — Global ───────────────────────────────────────── */

/* ── The .top wrapper produced by dom: '<"top"lBf>' ────────────────── */
/* Layout: [Show NN entries] [Filters][CSV][Excel][Print][ColVis] ···· [Search___] */
.dataTables_wrapper .top {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--table-border);
    background: var(--bg-tertiary);
}

/* Show entries — compact, no wrapping */
.dataTables_wrapper .top .dataTables_length {
    padding: 0 !important;
    margin: 0 !important;
    white-space: nowrap;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.dataTables_wrapper .top .dataTables_length label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    margin: 0 !important;
    font-size: var(--font-size-sm) !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
}

.dataTables_wrapper .top .dataTables_length select {
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-sm) !important;
    padding: 5px 8px !important;
    font-size: var(--font-size-sm) !important;
    color: var(--text-primary) !important;
    background: #FFFFFF !important;
    height: auto !important;
    min-height: unset !important;
    cursor: pointer;
}

/* Button group — sits between length and search */
.dataTables_wrapper .dt-buttons {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0 !important;
    margin: 0 !important;
}

/* Search — pushed to the right */
.dataTables_wrapper .top .dataTables_filter {
    margin-left: auto !important;
    padding: 0 !important;
}

.dataTables_wrapper .top .dataTables_filter label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
    margin: 0 !important;
    font-size: var(--font-size-sm) !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
}

/* ── The .bottom wrapper produced by dom: '<"bottom"ip>' ───────────── */
.dataTables_wrapper .bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--table-border);
    background: var(--bg-tertiary);
}

/* ── Toolbar buttons — gh-toolbar-btn (secondary style) ────────────── */
.gh-toolbar-btn {
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm) !important;
    border: 1.5px solid var(--border) !important;
    background: #FFFFFF !important;
    color: var(--text-secondary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    transition: all var(--transition-fast) !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    cursor: pointer;
}

.gh-toolbar-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: var(--primary-lighter) !important;
    transform: none !important;
}

.gh-toolbar-btn i {
    font-size: 12px;
    opacity: 0.7;
}

.gh-toolbar-btn:hover i {
    opacity: 1;
}

/* Add button — primary accent */
.gh-toolbar-btn-add,
.gh-toolbar-btn-add.btn-primary {
    background: var(--primary) !important;
    color: #FFFFFF !important;
    border-color: var(--primary) !important;
    font-weight: 700 !important;
}

.gh-toolbar-btn-add:hover {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px var(--primary-shadow) !important;
}

/* ── Search input ─────────────────────────────────────────────────────── */
.dataTables_filter input,
div.dataTables_wrapper div.dataTables_filter input {
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-md) !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
    color: var(--text-primary) !important;
    background: #FFFFFF !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base) !important;
    min-width: 180px;
    height: auto !important;
    min-height: unset !important;
}

.dataTables_filter input:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.10) !important;
    outline: none !important;
}

/* ── Show entries dropdown (standalone / non-.top contexts) ────────── */
.dataTables_length select {
    border: 1.5px solid var(--border-input) !important;
    border-radius: var(--radius-sm) !important;
    padding: 5px 8px !important;
    font-size: 13px !important;
    color: var(--text-primary) !important;
}

/* ── Table info line ──────────────────────────────────────────────────── */
.dataTables_info {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    padding: 0 !important;
}

/* ── Toolbar button color variants ─────────────────────────────────── */
.gh-toolbar-btn--danger {
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}
.gh-toolbar-btn--danger:hover {
    background: var(--danger-light) !important;
    border-color: var(--danger) !important;
    color: var(--danger-text) !important;
}

.gh-toolbar-btn--warning {
    border-color: var(--warning) !important;
    color: var(--warning-text) !important;
}
.gh-toolbar-btn--warning:hover {
    background: var(--warning-light) !important;
    border-color: var(--warning) !important;
    color: var(--warning-text) !important;
}

.gh-toolbar-btn--success {
    border-color: var(--success) !important;
    color: var(--success-text) !important;
}
.gh-toolbar-btn--success:hover {
    background: var(--success-light) !important;
    border-color: var(--success) !important;
    color: var(--success-text) !important;
}

.gh-toolbar-btn--primary {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}
.gh-toolbar-btn--primary:hover {
    background: var(--primary-lighter) !important;
    border-color: var(--primary) !important;
    color: var(--primary-text-on-light) !important;
}

/* ── Bulk actions row (tfoot) ──────────────────────────────────────── */
.gh-bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 0;
}

/* ─── 20. MODULE PAGE LAYOUT — Reusable across all modules ─────────────────── */

/* Page wrapper */
.gh-page {
    padding: 20px 24px;
    background: var(--bg-page);
    min-height: calc(100vh - 56px);
}

/* ── Page header ─────────────────────────────────────────────────── */
.gh-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gh-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #1E1B4B;
    margin: 0 0 2px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.gh-page-subtitle {
    font-size: 13px;
    color: #64748B;
    margin: 0;
    font-weight: 400;
}

/* ── KPI grid — 4 columns ────────────────────────────────────────── */
.gh-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 1100px) { .gh-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .gh-kpi-grid { grid-template-columns: 1fr; } }

.gh-kpi-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gh-kpi-card:hover {
    box-shadow: 0 4px 16px rgba(99,102,241,0.08);
    transform: translateY(-1px);
}

/* Icon circle */
.gh-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.gh-kpi-icon--blue   { background: #DBEAFE; color: #2563EB; }
.gh-kpi-icon--green  { background: #DCFCE7; color: #15803D; }
.gh-kpi-icon--orange { background: #FEF3C7; color: #D97706; }
.gh-kpi-icon--purple { background: #EDE9FE; color: #7C3AED; }
.gh-kpi-icon--red    { background: #FEE2E2; color: #DC2626; }
.gh-kpi-icon--teal   { background: #CCFBF1; color: #0D9488; }

/* KPI body */
.gh-kpi-body {
    flex: 1;
    min-width: 0;
}

.gh-kpi-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #1E1B4B;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-kpi-value--mono {
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.gh-kpi-label {
    display: block;
    font-size: 11.5px;
    color: #64748B;
    font-weight: 500;
    margin-top: 2px;
}

/* ── Charts grid — 2 columns ─────────────────────────────────────── */
.gh-charts-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) { .gh-charts-grid { grid-template-columns: 1fr; } }

.gh-chart-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.gh-chart-header {
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
}

.gh-chart-title {
    font-size: 13px;
    font-weight: 700;
    color: #1E1B4B;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gh-chart-title i {
    color: #6366F1;
    font-size: 14px;
}

.gh-chart-body {
    padding: 16px;
    min-height: 260px;
}

/* ─── 21. TABLE CARD — Reusable card wrapper for DataTables ────────────────── */

.gh-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: clip;                /* clip keeps border-radius rounding but does NOT
                                      create a scroll context — critical for sticky columns */
}

.gh-table-card-header {
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

/* Tabs inside table card */
.gh-table-card-header .gh-tabs,
.gh-table-card-header .nav-tabs {
    border-bottom: none !important;
    margin: 0;
    display: flex;
    gap: 4px;
}

.gh-table-card-header .nav-tabs > li > a {
    padding: 14px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    margin-bottom: -1px;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.gh-table-card-header .nav-tabs > li > a:hover {
    color: var(--primary) !important;
    border-bottom-color: rgba(99, 102, 241, 0.3) !important;
    background: transparent !important;
}

.gh-table-card-header .nav-tabs > li.active > a,
.gh-table-card-header .nav-tabs > li.active > a:focus,
.gh-table-card-header .nav-tabs > li.active > a:hover {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    background: transparent !important;
    font-weight: 700 !important;
}

.gh-table-card-header .nav-tabs > li > a i {
    font-size: 13px;
    opacity: 0.7;
}

.gh-table-card-header .nav-tabs > li.active > a i {
    opacity: 1;
}

/* Override .nav-tabs-custom inside product page */
.gh-table-card .nav-tabs-custom {
    margin-bottom: 0;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.gh-table-card .dataTables_wrapper .sell-table-toolbar,
.gh-table-card .dataTables_wrapper > .row:first-child {
    padding: 10px 15px 5px;
}

/* ── Page header actions row ────────────────────────────────────────── */
.gh-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── DataTable footer actions (mass delete, bulk edit, etc.) ──────── */
.gh-table-card .dataTables_wrapper table tfoot td {
    padding: 10px 16px !important;
    background: var(--bg-tertiary);
}

/* ── Product table column alignment helpers ─────────────────────────── */
#product_table td:nth-child(1),
#stock_report_table td:nth-child(1) {
    text-align: center;
}

#product_table td:nth-child(2),
#stock_report_table td:nth-child(1) {
    white-space: nowrap;
}

/* ─── 22. VARIATION CARDS & BADGES ─────────────────────────────────────────── */

/* Card list layout */
.gh-variation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual variation card */
.gh-variation-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: box-shadow var(--transition-base);
}

.gh-variation-card:hover {
    box-shadow: var(--shadow-hover);
}

/* Card header — name + actions */
.gh-variation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--table-border);
    background: var(--bg-tertiary);
}

.gh-variation-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gh-variation-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.gh-variation-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-lighter);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.gh-variation-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Card body — values badges */
.gh-variation-card-body {
    padding: 16px 20px;
}

/* Badge container */
.gh-variation-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Individual value badge */
.gh-variation-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--primary-lighter);
    color: var(--primary-text-on-light);
    border: 1px solid #DDD6FE;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    transition: all var(--transition-fast);
}

.gh-variation-badge:hover {
    background: var(--primary-light);
    border-color: #C4B5FD;
}

/* Hidden badges — shown when expanded */
.gh-variation-badge--hidden {
    display: none;
}

.gh-variation-values--expanded .gh-variation-badge--hidden {
    display: inline-flex;
}

/* Toggle button */
.gh-variation-toggle {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--bg-secondary);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    line-height: 1.4;
    font-family: var(--font-family);
}

.gh-variation-toggle:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .gh-variation-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .gh-variation-card-actions {
        width: 100%;
    }
}

/* ─── 24. GLOBAL STICKY HEADERS — ALL DATATABLES ──────────────────────────── */
/* Old-pattern pages use .table-responsive or direct .box-body as table container.
   Make ALL DataTable <thead th> sticky within their nearest scroll ancestor.
   For old-pattern pages, .table-responsive becomes the scroll container.           */

/* table-responsive — scroll container with sticky support */
.table-responsive {
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 280px);
    -webkit-overflow-scrolling: touch;
    overflow: clip clip; /* fallback for clip on y-axis */
    overflow-x: auto !important;
    overflow-y: auto !important;
}

/* box-body without table-responsive — also a scroll container */
.box-body:has(> table),
.box .box-body:has(> .table) {
    overflow-x: auto !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 280px);
    -webkit-overflow-scrolling: touch;
}

/* ALL DataTable thead th — sticky */
.table-responsive table thead th,
.table-responsive table thead td,
.box-body > table thead th,
.box-body > table thead td,
table.dataTable thead th,
table.dataTable thead td {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    background: var(--table-header-bg, #EDE9FE) !important;
}

/* Ensure .box / widget cards don't break sticky */
.box,
.box-primary,
.box-default {
    overflow: clip !important;
}

/* ─── 25. SALES MODULE — OLD-PATTERN ENHANCEMENTS ─────────────────────────── */

/* Widget box — DS card styling */
.box.box-primary,
.box.box-default {
    border-radius: var(--radius-lg, 12px) !important;
    border: 1px solid var(--border, #E2E8F0) !important;
    box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,0.06)) !important;
    background: var(--bg-card, #FFFFFF) !important;
    border-top: none !important;
}
.box .box-header {
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0 !important;
}
.box .box-header .box-title {
    font-family: var(--font-family, 'Inter', sans-serif) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-primary, #1E1B4B) !important;
}

/* Content header — DS page title */
.content-header h1 {
    font-family: var(--font-family, 'Inter', sans-serif) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--text-primary, #1E1B4B) !important;
}

/* Old-pattern action buttons — DS styling */
.box .tw-dw-btn {
    font-family: var(--font-family, 'Inter', sans-serif) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: var(--radius-sm, 6px) !important;
    transition: all 0.15s ease !important;
    line-height: 1.3 !important;
}

/* Action column buttons inside DataTables — prevent overflow */
table.dataTable td:last-child {
    white-space: nowrap !important;
}

/* Footer totals row — DS styling */
table.dataTable tfoot tr {
    background: var(--bg-tertiary, #F8FAFC) !important;
}
table.dataTable tfoot td {
    font-family: var(--font-family, 'Inter', sans-serif) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-primary, #1E1B4B) !important;
    padding: 10px 16px !important;
    border-top: 2px solid var(--border, #E2E8F0) !important;
}

/* Filter modal — DS form controls */
#filterModal .form-group label {
    font-family: var(--font-family, 'Inter', sans-serif) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--table-header-text, #4C1D95) !important;
    margin-bottom: 6px !important;
}
#filterModal .form-control {
    font-family: var(--font-family, 'Inter', sans-serif) !important;
    font-size: 13px !important;
    border: 1.5px solid var(--border-input, #E5E7EB) !important;
    border-radius: var(--radius-md, 8px) !important;
    padding: 8px 12px !important;
    color: var(--text-primary, #1E1B4B) !important;
    background: #FFFFFF !important;
    height: auto !important;
    min-height: 38px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
#filterModal .form-control:focus {
    border-color: var(--border-focus, #7C3AED) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
    outline: none !important;
}
#filterModal .modal-footer {
    border-top: none !important;
    padding: 12px 20px !important;
    background: #fff !important;
    box-shadow: none !important;
}


/* Box-tools — Add button in old widget pattern */
.box-tools .tw-dw-btn-sm,
.box-tools > a.tw-dw-btn {
    font-family: var(--font-family, 'Inter', sans-serif) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 9px 22px !important;
    border-radius: var(--radius-md, 8px) !important;
    background: var(--primary, #6366F1) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.box-tools .tw-dw-btn-sm:hover,
.box-tools > a.tw-dw-btn:hover {
    background: var(--primary-hover, #4F46E5) !important;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35) !important;
    transform: translateY(-1px) !important;
}

/* Filters component (old pattern) — DS card */
.box.box-solid.collapsed-box {
    border-radius: var(--radius-lg, 12px) !important;
    border: 1px solid var(--border, #E2E8F0) !important;
    box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,0.06)) !important;
    margin-bottom: 16px !important;
}

/* ─── 23. FROZEN COLUMNS ARCHITECTURE ──────────────────────────────────────── */
/* Sticky left columns + sticky top header for data-dense tables.
   Toolbar & pagination stay outside the scroll area.
   CRITICAL: border-collapse must be "separate" for position:sticky to work.  */

/* Override parent .gh-table-body scroll when using frozen architecture */
.gh-freeze-table {
    overflow: visible !important;
    max-height: none !important;
}

/* Frozen tables MUST use border-collapse: separate for sticky to work */
.gh-freeze-table table,
.gh-freeze-table table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Scroll container — created by DataTables dom: <"gh-table-scroll" rt> */
.gh-table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 72vh;
    position: relative;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

/* ── Horizontal scroll alignment fix for ERP-style wide tables ─────── */
/* Ensure DataTables does NOT split header/body into separate scrollable divs.
   By using dom: <"gh-table-scroll"rt> (no scrollX), the table stays as one
   <table> inside the scroll container — headers and rows always align.       */
.gh-table-scroll table.dataTable {
    width: max-content !important;       /* let columns size naturally            */
    min-width: 100%;                     /* never narrower than the container     */
    border-collapse: collapse !important;
}

/* Frozen tables override — border-collapse: separate is required for sticky left columns */
.gh-freeze-table .gh-table-scroll table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Prevent DataTables from creating misaligned split-scroll wrappers */
.gh-table-scroll .dataTables_scrollHead,
.gh-table-scroll .dataTables_scrollBody {
    overflow: visible !important;
}

/* Force uniform column sizing — no random width jumps on redraw */
.gh-table-scroll table.dataTable thead th,
.gh-table-scroll table.dataTable tbody td {
    box-sizing: border-box !important;
    white-space: nowrap;
}

/* Allow text wrapping only on name/description columns (controlled per-page) */
.gh-table-scroll table.dataTable tbody td.wrap-cell {
    white-space: normal;
    word-break: break-word;
    max-width: 300px;
}

/* Thin styled scrollbar for scroll container */
.gh-table-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.gh-table-scroll::-webkit-scrollbar-track { background: var(--bg-secondary); }
.gh-table-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.gh-table-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Sticky header row inside scroll container */
.gh-table-scroll table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--table-header-bg) !important;
}

/* Simulate collapsed borders on separate-border-spacing tables */
.gh-freeze-table table thead th {
    border-bottom: 1px solid #DDD6FE !important;
    border-top: none !important;
}
.gh-freeze-table table tbody td {
    border-top: none !important;
    border-bottom: 1px solid var(--border, #E2E8F0) !important;
}

/* ── Product Table (#product_table) — Uniform Scroll (no frozen columns) ─── */
/* All columns scroll together horizontally. Min-widths for readability.      */

#product_table th,
#product_table tbody td {
    min-width: 110px;
    white-space: nowrap;
}

/* Checkbox column — compact */
#product_table th:nth-child(1),
#product_table tbody td:nth-child(1) {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    text-align: center !important;
}

/* Action column — compact and centered */
#product_table th:nth-child(2),
#product_table tbody td:nth-child(2) {
    min-width: 80px !important;
    white-space: nowrap !important;
}

/* Product Name column — wider, allow wrapping for readability */
#product_table th:nth-child(4),
#product_table tbody td:nth-child(4) {
    min-width: 220px !important;
    white-space: normal;
    word-break: break-word;
}

/* ── Stock Report Table (#stock_report_table) — 3 Frozen Left Columns ────── */
/* Col 0: Action (80px) | Col 1: SKU (100px) | Col 2: Product Name           */

/* All frozen cells — sticky + GPU layer promotion */
#stock_report_table thead th:nth-child(-n+3),
#stock_report_table tbody td:nth-child(-n+3) {
    position: sticky !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Column 0 — Action */
#stock_report_table th:nth-child(1),
#stock_report_table tbody td:nth-child(1) {
    left: 0;
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
}

/* Column 1 — SKU */
#stock_report_table th:nth-child(2),
#stock_report_table tbody td:nth-child(2) {
    left: 80px;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
}

/* Column 2 — Product Name (last frozen) */
#stock_report_table th:nth-child(3),
#stock_report_table tbody td:nth-child(3) {
    left: 180px;
    min-width: 220px !important;
}

/* Z-index layering */
#stock_report_table tbody td:nth-child(-n+3) {
    z-index: 4 !important;
    background: #FFFFFF !important;
}
#stock_report_table thead th:nth-child(-n+3) {
    z-index: 10 !important;
    background: var(--table-header-bg, #EDE9FE) !important;
}

/* Hover propagation to frozen cells */
#stock_report_table tbody tr:hover td:nth-child(-n+3) {
    background: var(--bg-hover-row, #FAFAFF) !important;
}

/* Box-shadow separator on last frozen column */
#stock_report_table th:nth-child(3),
#stock_report_table tbody td:nth-child(3) {
    box-shadow: 4px 0 8px -2px rgba(30,27,75,0.10);
}

/* Scrollable columns — ensure min-widths */
#stock_report_table th:nth-child(n+4),
#stock_report_table tbody td:nth-child(n+4) {
    min-width: 110px;
}

/* ── Tfoot — full-width ──────────────────────────────────────────────────── */
#product_table tfoot td,
#stock_report_table tfoot td {
    position: static !important;
    background: var(--bg-tertiary) !important;
}

/* ── Responsive — compact on smaller screens ─────────────────────────────── */
@media (max-width: 768px) {
    .gh-table-scroll { max-height: 60vh; }

    #product_table th:nth-child(4),
    #product_table tbody td:nth-child(4) { min-width: 140px !important; }

    #stock_report_table th:nth-child(3),
    #stock_report_table tbody td:nth-child(3) { min-width: 160px !important; }

    .dataTables_wrapper .top { padding: 10px 12px; }
    .dataTables_wrapper .bottom { padding: 10px 12px; }
}

/* ─── 24. PRINT OVERRIDES ──────────────────────────────────────────────────── */
@media print {
    #side-bar, .side-bar, aside.side-bar { display: none !important; }
    #header_main_app { display: none !important; }
    .btn { display: none !important; }
    body { background: white !important; }
    .table thead th { background: #EDE9FE !important; color: #4C1D95 !important; -webkit-print-color-adjust: exact; }

    /* Remove sticky positioning, GPU layers, and shadows for print */
    #product_table thead th,
    #product_table tbody td,
    #stock_report_table thead th,
    #stock_report_table tbody td {
        position: static !important;
        left: auto !important;
        transform: none !important;
        box-shadow: none !important;
    }
}

/* =============================================================================
   GH FORM PAGE STYLES — Product Create/Edit Pages
   ============================================================================= */

/* Page Header */
.gh-form-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px 0;
}
.gh-page-title-group h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text, #1E293B);
    margin: 0;
}
.gh-page-subtitle {
    font-size: 13px;
    color: var(--text-muted, #64748B);
    margin: 4px 0 0;
}
.gh-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm, 6px);
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #E2E8F0);
    color: var(--text, #1E293B);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.gh-back-btn:hover {
    background: var(--bg-tertiary, #F8FAFC);
    color: var(--primary, #6366F1);
    text-decoration: none;
}

/* Step Indicator */
.gh-step-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    padding: 14px 20px;
    background: var(--bg-card, #fff);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border, #E2E8F0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.gh-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #64748B);
    transition: all 0.2s;
}
.gh-step:hover {
    color: var(--primary, #6366F1);
    background: var(--primary-lighter, #F5F3FF);
    text-decoration: none;
}
.gh-step.active {
    background: var(--primary, #6366F1);
    color: #fff;
}
.gh-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    font-size: 11px;
    font-weight: 700;
}
.gh-step.active .gh-step-number {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.gh-step-label {
    white-space: nowrap;
}
.gh-step-line {
    flex: 1;
    height: 2px;
    background: var(--border, #E2E8F0);
    margin: 0 4px;
    min-width: 20px;
}

/* Section Card */
.gh-section-card {
    background: var(--bg-card, #fff);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border, #E2E8F0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    overflow: hidden;
}
.gh-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border, #E2E8F0);
}
.gh-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.gh-section-icon.icon-blue { background: #EFF6FF; color: #3B82F6; }
.gh-section-icon.icon-green { background: #ECFDF5; color: #059669; }
.gh-section-icon.icon-purple { background: #F5F3FF; color: #7C3AED; }
.gh-section-icon.icon-orange { background: #FFF7ED; color: #EA580C; }
.gh-section-icon.icon-pink { background: #FDF2F8; color: #DB2777; }
.gh-section-icon.icon-teal { background: #F0FDFA; color: #0D9488; }

.gh-section-title-group h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #1E293B);
}
.gh-section-title-group p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--text-muted, #64748B);
}

.gh-section-body {
    padding: 22px 24px;
}

/* Field Grid */
.gh-field-grid {
    display: grid;
    gap: 16px;
}
.gh-field-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gh-field-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gh-field-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gh-field-span-2 { grid-column: span 2; }
.gh-field-span-3 { grid-column: span 3; }
.gh-field-span-4 { grid-column: span 4; }

@media (max-width: 992px) {
    .gh-field-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .gh-field-span-2 { grid-column: span 2; }
}
@media (max-width: 576px) {
    .gh-field-grid.cols-2,
    .gh-field-grid.cols-3,
    .gh-field-grid.cols-4 { grid-template-columns: 1fr; }
    .gh-field-span-2,
    .gh-field-span-3,
    .gh-field-span-4 { grid-column: span 1; }
}

/* Form controls inside section cards */
.gh-section-body .form-group { margin-bottom: 4px; }
.gh-section-body label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dim, #475569);
    margin-bottom: 6px;
}
.gh-section-body .form-control {
    border: 1.5px solid var(--border, #E2E8F0);
    border-radius: 8px;
    padding: 9px 13px;
    font-size: 14px;
    min-height: 40px;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.gh-section-body .form-control:focus {
    border-color: var(--primary, #6366F1);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

/* Input group button alignment */
.gh-section-body .input-group-btn .btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border, #E2E8F0);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0 12px;
}
.gh-section-body .input-group .form-control {
    border-radius: 8px 0 0 8px;
}
.gh-section-body .input-group {
    display: flex;
    align-items: stretch;
}

/* Save / Action bar for form pages */
.gh-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg-card, #fff);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border, #E2E8F0);
    margin-bottom: 20px;
}

/* ===== Bootstrap DateTimePicker — blue theme & anti-clipping ===== */
.bootstrap-datetimepicker-widget {
    z-index: 999999 !important;
    border-radius: 12px !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 0 10px 30px rgba(76, 29, 149, 0.15) !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
}
/* Override the global `thead { background: $tabel_bg }` rule injected by app.blade.php */
.bootstrap-datetimepicker-widget thead,
.bootstrap-datetimepicker-widget tbody,
.bootstrap-datetimepicker-widget tfoot {
    background: transparent !important;
    color: inherit !important;
}
.bootstrap-datetimepicker-widget thead tr {
    background: transparent !important;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
    min-width: 280px !important;
    max-width: 340px !important;
    padding: 0 !important;
}
.bootstrap-datetimepicker-widget .datepicker,
.bootstrap-datetimepicker-widget .timepicker {
    padding: 10px !important;
}
.bootstrap-datetimepicker-widget table {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 2px !important;
}
/* Unified header bar (month/year + prev/next) */
.bootstrap-datetimepicker-widget table thead tr:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 8px !important;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th {
    background: transparent !important;
    color: #fff !important;
    border: 0 !important;
    padding: 10px 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th.prev,
.bootstrap-datetimepicker-widget table thead tr:first-child th.next {
    width: 36px !important;
    cursor: pointer !important;
    border-radius: 6px !important;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th.disabled,
.bootstrap-datetimepicker-widget table thead tr:first-child th.disabled:hover {
    background: transparent !important;
    color: rgba(255,255,255,0.4) !important;
    cursor: not-allowed !important;
}
/* Weekday row */
.bootstrap-datetimepicker-widget table thead tr:nth-child(2) th.dow {
    color: #6B7280 !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    padding: 10px 4px 6px !important;
    background: transparent !important;
    border: 0 !important;
}
/* Day cells */
.bootstrap-datetimepicker-widget table td {
    border: 0 !important;
    padding: 0 !important;
}
.bootstrap-datetimepicker-widget table td.day,
.bootstrap-datetimepicker-widget table td.hour,
.bootstrap-datetimepicker-widget table td.minute,
.bootstrap-datetimepicker-widget table td.second,
.bootstrap-datetimepicker-widget table td.month,
.bootstrap-datetimepicker-widget table td.year {
    height: 34px !important;
    width: 34px !important;
    line-height: 34px !important;
    text-align: center !important;
    border-radius: 6px !important;
    color: #1F2937 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.bootstrap-datetimepicker-widget table td.old,
.bootstrap-datetimepicker-widget table td.new {
    color: #D1D5DB !important;
}
.bootstrap-datetimepicker-widget table td.day:hover,
.bootstrap-datetimepicker-widget table td.hour:hover,
.bootstrap-datetimepicker-widget table td.minute:hover,
.bootstrap-datetimepicker-widget table td.second:hover,
.bootstrap-datetimepicker-widget table td.month:hover,
.bootstrap-datetimepicker-widget table td.year:hover {
    background: #EDE9FE !important;
    color: #4C1D95 !important;
}
.bootstrap-datetimepicker-widget table td.today {
    position: relative;
    color: #667eea !important;
    font-weight: 700 !important;
}
.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: #667eea !important;
}
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover,
.bootstrap-datetimepicker-widget table td.active.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}
.bootstrap-datetimepicker-widget table td.disabled,
.bootstrap-datetimepicker-widget table td.disabled:hover {
    background: transparent !important;
    color: #E5E7EB !important;
    cursor: not-allowed !important;
}
/* Time picker action links */
.bootstrap-datetimepicker-widget a[data-action] {
    color: #667eea !important;
}
.bootstrap-datetimepicker-widget a[data-action]:hover {
    color: #4C1D95 !important;
    background: #EDE9FE !important;
    border-radius: 6px !important;
}
.bootstrap-datetimepicker-widget .separator {
    color: #6B7280 !important;
}
.bootstrap-datetimepicker-widget .timepicker-picker table td span {
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
}
.bootstrap-datetimepicker-widget .timepicker-picker table td span:hover {
    background: #EDE9FE !important;
    color: #4C1D95 !important;
}

/* Notification Templates page: remove colored top-border indicator on active tab */
.notification-tabs-custom > .nav-tabs > li.active,
.notification-tabs-custom > .nav-tabs > li.active:hover {
    border-top-color: transparent !important;
}

/* Manage Orders (order fulfillment) page: remove AdminLTE top-border indicator on
   the active tab — the bottom underline from the design system is enough. */
.order-fulfillment-tabs-custom > .nav-tabs > li.active,
.order-fulfillment-tabs-custom > .nav-tabs > li.active:hover {
    border-top-color: transparent !important;
}

/* Sell Return Ecom page: remove AdminLTE top-border indicator on the active tab. */
.sell-return-ecom-tabs-custom > .nav-tabs > li.active,
.sell-return-ecom-tabs-custom > .nav-tabs > li.active:hover {
    border-top-color: transparent !important;
}

/* Activity Logs page: vertically align the DataTable top row so Search,
   Filters/Export/Print/Column-visibility buttons sit on the same centerline
   as the "Show 25 entries" dropdown. Scoped to this table's wrapper id only. */
#enhanced_activity_log_table_wrapper > .tw-flex {
    align-items: center !important;
    row-gap: 10px;
}
#enhanced_activity_log_table_wrapper .dataTables_length,
#enhanced_activity_log_table_wrapper .dataTables_filter {
    margin: 0 !important;
}
#enhanced_activity_log_table_wrapper .dataTables_length label,
#enhanced_activity_log_table_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    margin: 0 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

/* Customer View — Recall Price tab: align the DataTable top row on a single
   vertical centerline and add breathing room above + on the sides so Show /
   Search / Export CSV / Excel / Print / Column visibility / Export PDF no
   longer sit flush to the card edges. Scoped to this table's wrapper id. */
#recall_price_table_wrapper > .tw-flex {
    align-items: center !important;
    row-gap: 10px;
    padding: var(--space-4, 16px) var(--space-5, 20px) var(--space-3, 12px);
}
#recall_price_table_wrapper > .dataTables_info,
#recall_price_table_wrapper > .dataTables_paginate {
    padding-left: var(--space-5, 20px);
    padding-right: var(--space-5, 20px);
}
#recall_price_table_wrapper .dataTables_length,
#recall_price_table_wrapper .dataTables_filter {
    margin: 0 !important;
}
#recall_price_table_wrapper .dataTables_length label,
#recall_price_table_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    margin: 0 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

/* Sell Return Ecom page: align the DataTables top row (Show/Search/Buttons) on
   a single vertical centerline and add breathing room above + on the sides.
   Global dom from common.js is `<"tw-flex tw-flex-wrap tw-gap-6"<""l><""f><""B>>`
   which defaults to `align-items: stretch` and lets the length label wrap.
   Scoped to this page only so other tables are untouched. */
.sell-return-ecom-tabs-custom .dataTables_wrapper > .tw-flex {
    align-items: center !important;
    row-gap: 10px;
    padding: var(--space-4, 16px) var(--space-5, 20px) var(--space-3, 12px);
}
.sell-return-ecom-tabs-custom .dataTables_wrapper > .dataTables_info,
.sell-return-ecom-tabs-custom .dataTables_wrapper > .dataTables_paginate {
    padding-left: var(--space-5, 20px);
    padding-right: var(--space-5, 20px);
}
.sell-return-ecom-tabs-custom .dataTables_wrapper .dataTables_length,
.sell-return-ecom-tabs-custom .dataTables_wrapper .dataTables_filter {
    margin: 0 !important;
}
.sell-return-ecom-tabs-custom .dataTables_wrapper .dataTables_length label,
.sell-return-ecom-tabs-custom .dataTables_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    margin: 0 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

/* Manage Orders (order fulfillment) page: align the DataTables top row.
   Global dom from common.js is `<"tw-flex tw-flex-wrap tw-gap-6"<""l><""f><""B>>`,
   which defaults to `align-items: stretch` and lets the length label wrap.
   Scope these rules to this page only so other tables are untouched. */
.order-fulfillment-tabs-custom .dataTables_wrapper > .tw-flex {
    align-items: center !important;
    row-gap: 10px;
}
.order-fulfillment-tabs-custom .dataTables_wrapper .dataTables_length,
.order-fulfillment-tabs-custom .dataTables_wrapper .dataTables_filter {
    margin: 0 !important;
}
.order-fulfillment-tabs-custom .dataTables_wrapper .dataTables_length label,
.order-fulfillment-tabs-custom .dataTables_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px;
    margin: 0 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}
