/**
 * ==============================================================================
 * BPOS PRO — ENTERPRISE UI/UX PRO-MAX GLOBAL DESIGN SYSTEM
 * Apple-Inspired Minimalist & Swiss Style (Clean, Spacious, Functional, Accessible)
 * ==============================================================================
 */

/* ------------------------------------------------------------------------------
 * 1. DESIGN TOKENS & CSS VARIABLES
 * ------------------------------------------------------------------------------ */
:root {
    /* Brand & Accent Colors */
    --bp-primary: #4f46e5;
    --bp-primary-hover: #4338ca;
    --bp-primary-active: #3730a3;
    --bp-primary-light: #eef2ff;
    --bp-primary-border: #c7d2fe;
    --bp-primary-text: #ffffff;

    --bp-secondary: #0284c7;
    --bp-secondary-hover: #0369a1;
    --bp-secondary-light: #f0f9ff;

    --bp-success: #10b981;
    --bp-success-hover: #059669;
    --bp-success-light: #ecfdf5;
    --bp-success-border: #a7f3d0;
    --bp-success-text: #065f46;

    --bp-warning: #f59e0b;
    --bp-warning-hover: #d97706;
    --bp-warning-light: #fffbeb;
    --bp-warning-border: #fde68a;
    --bp-warning-text: #92400e;

    --bp-danger: #ef4444;
    --bp-danger-hover: #dc2626;
    --bp-danger-light: #fef2f2;
    --bp-danger-border: #fecaca;
    --bp-danger-text: #991b1b;

    --bp-info: #06b6d4;
    --bp-info-hover: #0891b2;
    --bp-info-light: #ecfeff;
    --bp-info-border: #a5f3fc;
    --bp-info-text: #155e75;

    /* Surfaces & Layout (Light Mode) */
    --bp-bg-page: #f8fafc;
    --bp-bg-surface: #ffffff;
    --bp-bg-surface-elevated: #ffffff;
    --bp-bg-surface-secondary: #f1f5f9;
    --bp-bg-hover: #f8fafc;
    --bp-bg-active: #f1f5f9;

    /* Typography Colors (Light Mode) */
    --bp-text-main: #0f172a;
    --bp-text-body: #334155;
    --bp-text-secondary: #475569;
    --bp-text-muted: #64748b;
    --bp-text-subtle: #94a3b8;

    /* Borders & Dividers */
    --bp-border-color: #e2e8f0;
    --bp-border-light: #f1f5f9;
    --bp-border-strong: #cbd5e1;
    --bp-border-focus: #6366f1;

    /* Radii */
    --bp-radius-xs: 4px;
    --bp-radius-sm: 6px;
    --bp-radius-md: 10px;
    --bp-radius-lg: 14px;
    --bp-radius-xl: 18px;
    --bp-radius-full: 9999px;

    /* Shadows (Subtle, Restrained, Apple-Quality) */
    --bp-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --bp-shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --bp-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --bp-shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
    --bp-shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --bp-shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

    /* Form Heights & Spacings */
    --bp-control-height: 38px;
    --bp-control-height-sm: 32px;
    --bp-control-height-lg: 44px;

    /* Transitions */
    --bp-transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------------------------------
 * 2. DARK MODE TOKENS (macOS / Apple Pro Dark Theme)
 * ------------------------------------------------------------------------------ */
html.dark-theme,
body.dark-theme {
    --bp-bg-page: #0b0f19;
    --bp-bg-surface: #131b2e;
    --bp-bg-surface-elevated: #1a233a;
    --bp-bg-surface-secondary: #0f172a;
    --bp-bg-hover: #1e293b;
    --bp-bg-active: #243049;

    --bp-text-main: #f8fafc;
    --bp-text-body: #e2e8f0;
    --bp-text-secondary: #cbd5e1;
    --bp-text-muted: #94a3b8;
    --bp-text-subtle: #64748b;

    --bp-border-color: #1e293b;
    --bp-border-light: #182238;
    --bp-border-strong: #334155;
    --bp-border-focus: #818cf8;

    --bp-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --bp-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --bp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --bp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
    --bp-shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);

    /* Muted Status Backgrounds in Dark Mode */
    --bp-success-light: rgba(16, 185, 129, 0.15);
    --bp-success-border: rgba(16, 185, 129, 0.3);
    --bp-success-text: #34d399;

    --bp-warning-light: rgba(245, 158, 11, 0.15);
    --bp-warning-border: rgba(245, 158, 11, 0.3);
    --bp-warning-text: #fbbf24;

    --bp-danger-light: rgba(239, 68, 68, 0.15);
    --bp-danger-border: rgba(239, 68, 68, 0.3);
    --bp-danger-text: #f87171;

    --bp-info-light: rgba(6, 182, 212, 0.15);
    --bp-info-border: rgba(6, 182, 212, 0.3);
    --bp-info-text: #38bdf8;

    background-color: var(--bp-bg-page) !important;
    color: var(--bp-text-body) !important;
}

/* ------------------------------------------------------------------------------
 * 3. GLOBAL TYPOGRAPHY & SMOOTH RENDERING
 * ------------------------------------------------------------------------------ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: var(--bp-text-body);
    background-color: var(--bp-bg-page);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--bp-text-main);
    letter-spacing: -0.02em;
    font-weight: 600;
}

/* Page Headers & Breadcrumbs */
.content-header {
    padding: 18px 24px 10px 24px;
    background: transparent;
    position: relative;
}
.content-header > h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--bp-text-main);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.025em;
}
.content-header > h1 > small {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--bp-text-muted);
    letter-spacing: normal;
    display: block;
    margin-top: 4px;
}
.breadcrumb {
    background: transparent;
    padding: 6px 0;
    margin-bottom: 0;
    font-size: 12.5px;
}
.breadcrumb > li + li:before {
    color: var(--bp-text-subtle);
    content: "/";
    padding: 0 6px;
}
.breadcrumb > .active {
    color: var(--bp-text-muted);
}
.breadcrumb a {
    color: var(--bp-primary);
    text-decoration: none;
    transition: var(--bp-transition);
}
.breadcrumb a:hover {
    color: var(--bp-primary-hover);
}

/* Main Content Wrapper */
.content {
    padding: 16px 24px 32px 24px;
}

/* ------------------------------------------------------------------------------
 * 4. BUTTON SYSTEM (.btn, .tw-dw-btn, action buttons)
 * ------------------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-weight: 500;
    font-size: 13.5px;
    line-height: 1.4;
    padding: 7px 16px;
    border-radius: var(--bp-radius-sm);
    border: 1px solid transparent;
    box-shadow: var(--bp-shadow-xs);
    transition: var(--bp-transition);
    cursor: pointer;
    user-select: none;
    text-decoration: none !important;
    vertical-align: middle;
}
.btn:active {
    transform: scale(0.98);
}
.btn:focus,
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25) !important;
}

/* Button Variants */
.btn-primary {
    background-color: var(--bp-primary) !important;
    border-color: var(--bp-primary) !important;
    color: #ffffff !important;
}
.btn-primary:hover {
    background-color: var(--bp-primary-hover) !important;
    border-color: var(--bp-primary-hover) !important;
    color: #ffffff !important;
    box-shadow: var(--bp-shadow-sm);
}

.btn-success {
    background-color: var(--bp-success) !important;
    border-color: var(--bp-success) !important;
    color: #ffffff !important;
}
.btn-success:hover {
    background-color: var(--bp-success-hover) !important;
    border-color: var(--bp-success-hover) !important;
    color: #ffffff !important;
    box-shadow: var(--bp-shadow-sm);
}

.btn-danger {
    background-color: var(--bp-danger) !important;
    border-color: var(--bp-danger) !important;
    color: #ffffff !important;
}
.btn-danger:hover {
    background-color: var(--bp-danger-hover) !important;
    border-color: var(--bp-danger-hover) !important;
    color: #ffffff !important;
}

.btn-warning {
    background-color: var(--bp-warning) !important;
    border-color: var(--bp-warning) !important;
    color: #ffffff !important;
}
.btn-warning:hover {
    background-color: var(--bp-warning-hover) !important;
    border-color: var(--bp-warning-hover) !important;
    color: #ffffff !important;
}

.btn-info {
    background-color: var(--bp-info) !important;
    border-color: var(--bp-info) !important;
    color: #ffffff !important;
}
.btn-info:hover {
    background-color: var(--bp-info-hover) !important;
    border-color: var(--bp-info-hover) !important;
    color: #ffffff !important;
}

.btn-default {
    background-color: var(--bp-bg-surface) !important;
    border-color: var(--bp-border-strong) !important;
    color: var(--bp-text-body) !important;
}
.btn-default:hover {
    background-color: var(--bp-bg-surface-secondary) !important;
    border-color: var(--bp-border-strong) !important;
    color: var(--bp-text-main) !important;
}

/* Button Sizes */
.btn-xs {
    padding: 3px 8px !important;
    font-size: 11.5px !important;
    border-radius: var(--bp-radius-xs) !important;
}
.btn-sm {
    padding: 5px 12px !important;
    font-size: 12.5px !important;
    border-radius: var(--bp-radius-sm) !important;
}
.btn-lg {
    padding: 10px 22px !important;
    font-size: 15px !important;
    border-radius: var(--bp-radius-md) !important;
}

/* ------------------------------------------------------------------------------
 * 5. FORM CONTROLS, INPUTS, LABELS & SELECTS (APP-WIDE)
 * ------------------------------------------------------------------------------ */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--bp-text-body);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.form-group label small {
    font-size: 11px;
    font-weight: 400;
    color: var(--bp-text-muted);
}
.help-block {
    font-size: 12px;
    color: var(--bp-text-muted);
    margin-top: 4px;
    margin-bottom: 0;
}

.form-control,
input[type="text"].form-control,
input[type="password"].form-control,
input[type="email"].form-control,
input[type="number"].form-control,
input[type="search"].form-control,
input[type="tel"].form-control,
input[type="url"].form-control,
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="file"].form-control {
    height: var(--bp-control-height) !important;
    min-height: var(--bp-control-height) !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    color: var(--bp-text-main) !important;
    background-color: var(--bp-bg-surface) !important;
    border: 1px solid var(--bp-border-strong) !important;
    border-radius: var(--bp-radius-sm) !important;
    padding: 6px 12px !important;
    box-shadow: var(--bp-shadow-xs) !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

textarea.form-control {
    height: auto !important;
    min-height: 80px;
    padding: 10px 12px !important;
    border-radius: var(--bp-radius-sm) !important;
    border: 1px solid var(--bp-border-strong) !important;
    background-color: var(--bp-bg-surface) !important;
    color: var(--bp-text-main) !important;
}

.form-control:focus {
    border-color: var(--bp-border-focus) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18) !important;
    outline: none !important;
}
.form-control:disabled,
.form-control[readonly] {
    background-color: var(--bp-bg-surface-secondary) !important;
    opacity: 0.85;
    cursor: not-allowed;
}

/* Input Groups */
.input-group {
    display: flex;
    width: 100%;
}
.input-group-addon {
    background-color: var(--bp-bg-surface-secondary) !important;
    border: 1px solid var(--bp-border-strong) !important;
    color: var(--bp-text-muted) !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bp-radius-sm);
}
.input-group .form-control:first-child,
.input-group-addon:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.input-group .form-control:last-child,
.input-group-addon:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* ------------------------------------------------------------------------------
 * 6. CARDS & BOX MODERNIZATION (.box, .card, .info-box)
 * ------------------------------------------------------------------------------ */
.box {
    position: relative;
    border-radius: var(--bp-radius-lg) !important;
    background: var(--bp-bg-surface) !important;
    border: 1px solid var(--bp-border-color) !important;
    box-shadow: var(--bp-shadow-sm) !important;
    margin-bottom: 24px;
    width: 100%;
    transition: var(--bp-transition);
    overflow: hidden;
}
.box:hover {
    box-shadow: var(--bp-shadow-md) !important;
}
.box-header {
    color: var(--bp-text-main) !important;
    display: block;
    padding: 16px 20px !important;
    position: relative;
    border-bottom: 1px solid var(--bp-border-color) !important;
    background: transparent !important;
}
.box-header.with-border {
    border-bottom: 1px solid var(--bp-border-color) !important;
}
.box-header .box-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--bp-text-main) !important;
    margin: 0;
    line-height: 1.4;
    letter-spacing: -0.015em;
}
.box-header .box-tools {
    position: absolute;
    right: 16px;
    top: 14px;
}
[dir="rtl"] .box-header .box-tools {
    right: auto;
    left: 16px;
}
.box-body {
    padding: 20px !important;
    background: transparent !important;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: var(--bp-radius-lg);
    border-bottom-left-radius: var(--bp-radius-lg);
}
.box-footer {
    border-top: 1px solid var(--bp-border-color) !important;
    border-bottom-right-radius: var(--bp-radius-lg);
    border-bottom-left-radius: var(--bp-radius-lg);
    padding: 14px 20px !important;
    background-color: var(--bp-bg-surface-secondary) !important;
}

/* Info Box / Metric Cards */
.info-box {
    display: flex;
    min-height: 84px;
    background: var(--bp-bg-surface) !important;
    width: 100%;
    box-shadow: var(--bp-shadow-sm) !important;
    border: 1px solid var(--bp-border-color) !important;
    border-radius: var(--bp-radius-md) !important;
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--bp-transition);
}
.info-box:hover {
    box-shadow: var(--bp-shadow-md) !important;
    transform: translateY(-1px);
}
.info-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    font-size: 30px;
    background: var(--bp-bg-surface-secondary);
    color: var(--bp-primary);
}
.info-box-content {
    padding: 14px 16px;
    flex: 1;
}
.info-box-text {
    font-size: 12.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bp-text-muted);
}
.info-box-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--bp-text-main);
    letter-spacing: -0.02em;
}

/* Modern Finance Stat Card (Standardized from Payment Account & Booking modules) */
.finance-stat-card {
    background: var(--bp-bg-surface);
    border: 1px solid var(--bp-border-color);
    border-radius: var(--bp-radius-lg);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--bp-shadow-sm);
    transition: var(--bp-transition);
}
.finance-stat-card:hover {
    box-shadow: var(--bp-shadow-md);
    transform: translateY(-2px);
}
.finance-stat-card .stat-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--bp-radius-lg) var(--bp-radius-lg) 0 0;
}
.finance-stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--bp-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 12px;
}
.finance-stat-card .stat-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--bp-text-muted);
    margin-bottom: 4px;
}
.finance-stat-card .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--bp-text-main);
    letter-spacing: -0.025em;
    margin-bottom: 4px;
}
.finance-stat-card .stat-sub {
    font-size: 11.5px;
    color: var(--bp-text-subtle);
}

/* ------------------------------------------------------------------------------
 * 7. TABLES & DATATABLES MODERNIZATION
 * ------------------------------------------------------------------------------ */
.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid var(--bp-border-color) !important;
    border-radius: var(--bp-radius-md) !important;
    overflow: hidden !important;
}
.table > thead > tr > th {
    background-color: var(--bp-bg-surface-secondary) !important;
    color: var(--bp-text-secondary) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--bp-border-color) !important;
    border-top: none !important;
    white-space: nowrap;
}
.table > tbody > tr > td {
    padding: 12px 16px !important;
    font-size: 13.5px !important;
    color: var(--bp-text-body) !important;
    border-top: 1px solid var(--bp-border-light) !important;
    vertical-align: middle !important;
    transition: background-color 0.15s ease !important;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--bp-bg-surface) !important;
}
.table-striped > tbody > tr:nth-of-type(even) {
    background-color: rgba(248, 250, 252, 0.7) !important;
}
.table-hover > tbody > tr:hover,
.table > tbody > tr:hover {
    background-color: var(--bp-bg-hover) !important;
}

/* DataTables Controls & Wrapper */
.dataTables_wrapper {
    padding: 12px 0;
}
.dataTables_wrapper .dataTables_length select {
    height: 34px !important;
    border-radius: var(--bp-radius-sm) !important;
    border: 1px solid var(--bp-border-strong) !important;
    padding: 4px 10px !important;
    font-size: 13px !important;
    background-color: var(--bp-bg-surface) !important;
    color: var(--bp-text-main) !important;
}
.dataTables_wrapper .dataTables_filter input {
    height: 34px !important;
    border-radius: var(--bp-radius-sm) !important;
    border: 1px solid var(--bp-border-strong) !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    background-color: var(--bp-bg-surface) !important;
    color: var(--bp-text-main) !important;
    outline: none !important;
    transition: var(--bp-transition) !important;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--bp-primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
}
.dataTables_wrapper .dataTables_info {
    padding-top: 14px;
    font-size: 12.5px;
    color: var(--bp-text-muted);
}
.dataTables_wrapper .dataTables_paginate {
    padding-top: 10px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--bp-radius-sm) !important;
    border: 1px solid transparent !important;
    padding: 5px 12px !important;
    font-size: 13px !important;
    color: var(--bp-text-body) !important;
    transition: var(--bp-transition) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bp-bg-surface-secondary) !important;
    color: var(--bp-text-main) !important;
    border-color: var(--bp-border-strong) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--bp-primary) !important;
    color: #ffffff !important;
    border-color: var(--bp-primary) !important;
    font-weight: 600 !important;
}

/* ------------------------------------------------------------------------------
 * 8. TABS & PILLS (.nav-tabs, .nav-pills, .nav-tabs-custom)
 * ------------------------------------------------------------------------------ */
.nav-tabs {
    border-bottom: 1px solid var(--bp-border-color) !important;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 20px;
}
.nav-tabs::-webkit-scrollbar {
    display: none;
}
.nav-tabs > li {
    margin-bottom: -1px;
    flex-shrink: 0;
}
.nav-tabs > li > a {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: var(--bp-text-muted) !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    padding: 10px 18px !important;
    transition: var(--bp-transition) !important;
    background: transparent !important;
}
.nav-tabs > li > a:hover {
    color: var(--bp-text-main) !important;
    border-bottom-color: var(--bp-border-strong) !important;
    background: rgba(241, 245, 249, 0.5) !important;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
    color: var(--bp-primary) !important;
    border-bottom: 2px solid var(--bp-primary) !important;
    background: transparent !important;
    font-weight: 600 !important;
}

/* Nav Pills */
.nav-pills > li > a {
    border-radius: var(--bp-radius-md) !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    padding: 8px 16px !important;
    color: var(--bp-text-muted) !important;
    transition: var(--bp-transition) !important;
}
.nav-pills > li > a:hover {
    background-color: var(--bp-bg-surface-secondary) !important;
    color: var(--bp-text-main) !important;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:focus,
.nav-pills > li.active > a:hover {
    background-color: var(--bp-primary) !important;
    color: #ffffff !important;
    box-shadow: var(--bp-shadow-xs) !important;
}

/* ------------------------------------------------------------------------------
 * 9. MODALS & POPUPS (.modal-content, .modal-header, .modal-footer)
 * ------------------------------------------------------------------------------ */
.modal-content {
    border-radius: var(--bp-radius-xl) !important;
    border: 1px solid var(--bp-border-color) !important;
    box-shadow: var(--bp-shadow-modal) !important;
    background-color: var(--bp-bg-surface) !important;
    overflow: hidden !important;
}
.modal-header {
    padding: 18px 24px !important;
    border-bottom: 1px solid var(--bp-border-color) !important;
    background-color: var(--bp-bg-surface) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header .modal-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--bp-text-main) !important;
    letter-spacing: -0.02em;
    margin: 0;
}
.modal-header .close {
    font-size: 24px;
    font-weight: 300;
    color: var(--bp-text-subtle);
    opacity: 0.8;
    transition: var(--bp-transition);
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
}
.modal-header .close:hover {
    color: var(--bp-text-main);
    opacity: 1;
}
.modal-body {
    padding: 24px !important;
    background-color: var(--bp-bg-surface) !important;
    color: var(--bp-text-body) !important;
}
.modal-footer {
    padding: 16px 24px !important;
    border-top: 1px solid var(--bp-border-color) !important;
    background-color: var(--bp-bg-surface-secondary) !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ------------------------------------------------------------------------------
 * 10. STATUS BADGES & LABELS (.label, .badge)
 * ------------------------------------------------------------------------------ */
.label, .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    border-radius: var(--bp-radius-full) !important;
    text-transform: none !important;
    border: 1px solid transparent;
}
.label-success {
    background-color: var(--bp-success-light) !important;
    color: var(--bp-success-text) !important;
    border-color: var(--bp-success-border) !important;
}
.label-danger {
    background-color: var(--bp-danger-light) !important;
    color: var(--bp-danger-text) !important;
    border-color: var(--bp-danger-border) !important;
}
.label-warning {
    background-color: var(--bp-warning-light) !important;
    color: var(--bp-warning-text) !important;
    border-color: var(--bp-warning-border) !important;
}
.label-info {
    background-color: var(--bp-info-light) !important;
    color: var(--bp-info-text) !important;
    border-color: var(--bp-info-border) !important;
}
.label-primary {
    background-color: var(--bp-primary-light) !important;
    color: var(--bp-primary) !important;
    border-color: var(--bp-primary-border) !important;
}

/* ------------------------------------------------------------------------------
 * 11. ALERTS & CALLOUTS
 * ------------------------------------------------------------------------------ */
.alert {
    border-radius: var(--bp-radius-md) !important;
    border: 1px solid transparent !important;
    padding: 14px 18px !important;
    font-size: 13.5px !important;
    margin-bottom: 20px !important;
    box-shadow: var(--bp-shadow-xs) !important;
}
.alert-success {
    background-color: var(--bp-success-light) !important;
    border-color: var(--bp-success-border) !important;
    color: var(--bp-success-text) !important;
}
.alert-danger {
    background-color: var(--bp-danger-light) !important;
    border-color: var(--bp-danger-border) !important;
    color: var(--bp-danger-text) !important;
}
.alert-warning {
    background-color: var(--bp-warning-light) !important;
    border-color: var(--bp-warning-border) !important;
    color: var(--bp-warning-text) !important;
}
.alert-info {
    background-color: var(--bp-info-light) !important;
    border-color: var(--bp-info-border) !important;
    color: var(--bp-info-text) !important;
}

/* ------------------------------------------------------------------------------
 * 12. SIDEBAR (LIGHT MODE BASE)
 * ------------------------------------------------------------------------------ */
.main-sidebar, .side-bar {
    background-color: var(--bp-bg-surface) !important;
    border-right: 1px solid var(--bp-border-color) !important;
    box-shadow: none !important;
}
[dir="rtl"] .main-sidebar, [dir="rtl"] .side-bar {
    border-right: none !important;
    border-left: 1px solid var(--bp-border-color) !important;
}
.sidebar-menu > li > a {
    padding: 10px 16px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    border-radius: var(--bp-radius-sm) !important;
    margin: 2px 8px !important;
    transition: var(--bp-transition) !important;
}
.sidebar-menu .treeview-menu {
    padding: 4px 0 4px 12px !important;
    background: transparent !important;
}
.sidebar-menu .treeview-menu > li > a {
    padding: 7px 12px !important;
    font-size: 13px !important;
    border-radius: var(--bp-radius-sm) !important;
}

/* ------------------------------------------------------------------------------
 * 13. THEME TOGGLE (DARK / LIGHT MODE BUTTON)
 * Fixes: "the button of dark mode light mode is not working, showing both icons the same time."
 * ------------------------------------------------------------------------------ */
.bp-theme-toggle-btn {
    position: relative !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: var(--bp-transition) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.bp-theme-toggle-btn:active {
    transform: scale(0.92) !important;
}

/* Default (Light Mode): show moon icon, hide sun icon */
.bp-theme-toggle-btn .bp-icon-sun {
    display: none !important;
}
.bp-theme-toggle-btn .bp-icon-moon {
    display: inline-block !important;
    color: #ffffff !important;
}

/* POS Light mode button text color */
.pos-header .bp-theme-toggle-btn .bp-icon-moon {
    color: #475569 !important;
}

/* Dark Mode (.dark-theme): show sun icon, hide moon icon */
html.dark-theme .bp-theme-toggle-btn .bp-icon-sun,
body.dark-theme .bp-theme-toggle-btn .bp-icon-sun {
    display: inline-block !important;
    color: #f59e0b !important;
}
html.dark-theme .bp-theme-toggle-btn .bp-icon-moon,
body.dark-theme .bp-theme-toggle-btn .bp-icon-moon {
    display: none !important;
}

/* ==============================================================================
 * 14. COMPREHENSIVE DARK MODE SYSTEM (.dark-theme)
 * Beautiful Apple/macOS-Grade Dark Palette Across All Fields & Components
 * ============================================================================== */

/* Main Layout & Containers */
html.dark-theme,
body.dark-theme {
    background-color: #0b0f19 !important;
    color: #cbd5e1 !important;
}
html.dark-theme .content-wrapper,
body.dark-theme .content-wrapper,
html.dark-theme main,
body.dark-theme main,
html.dark-theme .tw-bg-gray-100,
body.dark-theme .tw-bg-gray-100 {
    background-color: #0b0f19 !important;
}
html.dark-theme .main-header,
body.dark-theme .main-header {
    background-color: #0b0f19 !important;
    border-bottom-color: #1e293b !important;
}
html.dark-theme .content-header > h1,
body.dark-theme .content-header > h1 {
    color: #f8fafc !important;
}

/* ------------------------------------------------------------------------------
 * SIDE MENU (DARK THEME)
 * ------------------------------------------------------------------------------ */
html.dark-theme .side-bar,
body.dark-theme .side-bar,
html.dark-theme aside.side-bar,
body.dark-theme aside.side-bar,
html.dark-theme #side-bar,
body.dark-theme #side-bar,
html.dark-theme .main-sidebar,
body.dark-theme .main-sidebar {
    background-color: #0b0f19 !important;
    border-color: #1e293b !important;
}
html.dark-theme .side-bar-heading,
body.dark-theme .side-bar-heading {
    color: #f8fafc !important;
}

/* Sidebar Search */
html.dark-theme #sidebar-search,
body.dark-theme #sidebar-search {
    color: #f8fafc !important;
    background: transparent !important;
}
html.dark-theme #sidebar-search::placeholder,
body.dark-theme #sidebar-search::placeholder {
    color: #64748b !important;
}
html.dark-theme .side-bar .tw-bg-gray-100,
body.dark-theme .side-bar .tw-bg-gray-100 {
    background-color: #131b2e !important;
    border-color: #1e293b !important;
}
html.dark-theme #sidebar-search-clear svg,
body.dark-theme #sidebar-search-clear svg {
    color: #94a3b8 !important;
}

/* Sidebar Links & Icons */
html.dark-theme #side-bar a,
body.dark-theme #side-bar a {
    color: #94a3b8 !important;
}
html.dark-theme #side-bar a svg,
body.dark-theme #side-bar a svg,
html.dark-theme #side-bar a i,
body.dark-theme #side-bar a i {
    color: #64748b !important;
}

/* Sidebar Hover */
html.dark-theme #side-bar .theme-sidebar-hover:hover,
body.dark-theme #side-bar .theme-sidebar-hover:hover,
html.dark-theme #side-bar .theme-sidebar-hover:focus,
body.dark-theme #side-bar .theme-sidebar-hover:focus {
    background-color: rgba(99, 102, 241, 0.14) !important;
    color: #a5b4fc !important;
}
html.dark-theme #side-bar .theme-sidebar-hover:hover svg,
body.dark-theme #side-bar .theme-sidebar-hover:hover svg,
html.dark-theme #side-bar .theme-sidebar-hover:hover i,
body.dark-theme #side-bar .theme-sidebar-hover:hover i {
    color: #818cf8 !important;
}

/* Sidebar Active */
html.dark-theme #side-bar .theme-sidebar-active,
body.dark-theme #side-bar .theme-sidebar-active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.25) 0%, rgba(99, 102, 241, 0.08) 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-inline-start: 3px solid #6366f1 !important;
}
html.dark-theme #side-bar a.theme-sidebar-active svg,
body.dark-theme #side-bar a.theme-sidebar-active svg,
html.dark-theme #side-bar a.theme-sidebar-active i,
body.dark-theme #side-bar a.theme-sidebar-active i {
    color: #818cf8 !important;
}

/* Sidebar Child Menus */
html.dark-theme .chiled .tw-bg-gray-100,
body.dark-theme .chiled .tw-bg-gray-100 {
    background-color: #1e293b !important;
}
html.dark-theme #side-bar .theme-sidebar-child-hover:hover,
body.dark-theme #side-bar .theme-sidebar-child-hover:hover {
    color: #e2e8f0 !important;
    background-color: rgba(99, 102, 241, 0.1) !important;
}
html.dark-theme #side-bar .theme-sidebar-child-active,
body.dark-theme #side-bar .theme-sidebar-child-active {
    color: #a5b4fc !important;
    font-weight: 600 !important;
}
html.dark-theme #side-bar .tw-text-gray-400,
body.dark-theme #side-bar .tw-text-gray-400 {
    color: #64748b !important;
}

/* ------------------------------------------------------------------------------
 * ALL FORM FIELDS IN DARK MODE
 * ------------------------------------------------------------------------------ */
html.dark-theme .form-control,
body.dark-theme .form-control,
html.dark-theme input[type="text"].form-control,
body.dark-theme input[type="text"].form-control,
html.dark-theme input[type="password"].form-control,
body.dark-theme input[type="password"].form-control,
html.dark-theme input[type="email"].form-control,
body.dark-theme input[type="email"].form-control,
html.dark-theme input[type="number"].form-control,
body.dark-theme input[type="number"].form-control,
html.dark-theme input[type="search"].form-control,
body.dark-theme input[type="search"].form-control,
html.dark-theme input[type="tel"].form-control,
body.dark-theme input[type="tel"].form-control,
html.dark-theme input[type="url"].form-control,
body.dark-theme input[type="url"].form-control,
html.dark-theme input[type="date"].form-control,
body.dark-theme input[type="date"].form-control,
html.dark-theme input[type="time"].form-control,
body.dark-theme input[type="time"].form-control,
html.dark-theme input[type="datetime-local"].form-control,
body.dark-theme input[type="datetime-local"].form-control,
html.dark-theme input[type="file"].form-control,
body.dark-theme input[type="file"].form-control,
html.dark-theme select.form-control,
body.dark-theme select.form-control,
html.dark-theme textarea.form-control,
body.dark-theme textarea.form-control {
    background-color: #131b2e !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.dark-theme .form-control:focus,
body.dark-theme .form-control:focus {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22) !important;
}

html.dark-theme .form-control:disabled,
body.dark-theme .form-control:disabled,
html.dark-theme .form-control[readonly],
body.dark-theme .form-control[readonly] {
    background-color: #0b0f19 !important;
    border-color: #1e293b !important;
    color: #64748b !important;
}

html.dark-theme .form-group label,
body.dark-theme .form-group label {
    color: #e2e8f0 !important;
}
html.dark-theme .form-group label small,
body.dark-theme .form-group label small,
html.dark-theme .help-block,
body.dark-theme .help-block {
    color: #94a3b8 !important;
}
html.dark-theme .input-group-addon,
body.dark-theme .input-group-addon {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

/* Native Select Options */
html.dark-theme select.form-control option,
body.dark-theme select.form-control option {
    background-color: #131b2e !important;
    color: #f8fafc !important;
}

/* ------------------------------------------------------------------------------
 * SELECT2 DROPDOWNS & SEARCH (DARK MODE)
 * ------------------------------------------------------------------------------ */
html.dark-theme .select2-container .select2-selection--single,
body.dark-theme .select2-container .select2-selection--single,
html.dark-theme .select2-container--default .select2-selection--multiple,
body.dark-theme .select2-container--default .select2-selection--multiple {
    background-color: #131b2e !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
html.dark-theme .select2-container .select2-selection--single .select2-selection__rendered,
body.dark-theme .select2-container .select2-selection--single .select2-selection__rendered {
    color: #f8fafc !important;
}
html.dark-theme .select2-dropdown,
body.dark-theme .select2-dropdown {
    background-color: #131b2e !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6) !important;
}
html.dark-theme .select2-search__field,
body.dark-theme .select2-search__field {
    background-color: #0b0f19 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
html.dark-theme .select2-results__option,
body.dark-theme .select2-results__option {
    color: #cbd5e1 !important;
    background-color: transparent !important;
}
html.dark-theme .select2-container--default .select2-results__option--highlighted[aria-selected],
body.dark-theme .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}
html.dark-theme .select2-container--default .select2-results__option[aria-selected="true"],
body.dark-theme .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #1e293b !important;
    color: #818cf8 !important;
}
html.dark-theme .select2-container--default .select2-selection--multiple .select2-selection__choice,
body.dark-theme .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* ------------------------------------------------------------------------------
 * DATEPICKERS & DATERANGEPICKER (DARK MODE)
 * ------------------------------------------------------------------------------ */
html.dark-theme .daterangepicker,
body.dark-theme .daterangepicker,
html.dark-theme .datepicker,
body.dark-theme .datepicker,
html.dark-theme .bootstrap-datetimepicker-widget,
body.dark-theme .bootstrap-datetimepicker-widget {
    background-color: #131b2e !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7) !important;
}
html.dark-theme .daterangepicker:before,
body.dark-theme .daterangepicker:before {
    border-bottom-color: #334155 !important;
}
html.dark-theme .daterangepicker:after,
body.dark-theme .daterangepicker:after {
    border-bottom-color: #131b2e !important;
}
html.dark-theme .daterangepicker .calendar-table,
body.dark-theme .daterangepicker .calendar-table {
    background-color: transparent !important;
    border-color: transparent !important;
}
html.dark-theme .daterangepicker td.available,
body.dark-theme .daterangepicker td.available {
    color: #cbd5e1 !important;
}
html.dark-theme .daterangepicker td.available:hover,
body.dark-theme .daterangepicker td.available:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}
html.dark-theme .daterangepicker td.off,
body.dark-theme .daterangepicker td.off,
html.dark-theme .daterangepicker td.off.in-range,
body.dark-theme .daterangepicker td.off.in-range {
    background-color: transparent !important;
    color: #475569 !important;
}
html.dark-theme .daterangepicker td.in-range,
body.dark-theme .daterangepicker td.in-range {
    background-color: rgba(79, 70, 229, 0.28) !important;
    color: #e2e8f0 !important;
}
html.dark-theme .daterangepicker td.active,
body.dark-theme .daterangepicker td.active,
html.dark-theme .daterangepicker td.active:hover,
body.dark-theme .daterangepicker td.active:hover {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}
html.dark-theme .daterangepicker .ranges,
body.dark-theme .daterangepicker .ranges {
    background-color: #0b0f19 !important;
    border-color: #1e293b !important;
}
html.dark-theme .daterangepicker .ranges li,
body.dark-theme .daterangepicker .ranges li {
    background-color: transparent !important;
    color: #cbd5e1 !important;
    border: none !important;
}
html.dark-theme .daterangepicker .ranges li:hover,
body.dark-theme .daterangepicker .ranges li:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}
html.dark-theme .daterangepicker .ranges li.active,
body.dark-theme .daterangepicker .ranges li.active {
    background-color: #4f46e5 !important;
    color: #ffffff !important;
}

/* ------------------------------------------------------------------------------
 * CARDS, BOXES, PANELS & WELLS (DARK MODE)
 * ------------------------------------------------------------------------------ */
html.dark-theme .box,
body.dark-theme .box,
html.dark-theme .card,
body.dark-theme .card,
html.dark-theme .panel,
body.dark-theme .panel {
    background-color: #131b2e !important;
    border-color: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}
html.dark-theme .box-header,
body.dark-theme .box-header {
    border-bottom-color: #1e293b !important;
    color: #f8fafc !important;
}
html.dark-theme .box-title,
body.dark-theme .box-title {
    color: #f8fafc !important;
}
html.dark-theme .box-footer,
body.dark-theme .box-footer {
    background-color: #0b0f19 !important;
    border-top-color: #1e293b !important;
}
html.dark-theme .well,
body.dark-theme .well {
    background-color: #0b0f19 !important;
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}
html.dark-theme .info-box,
body.dark-theme .info-box {
    background-color: #131b2e !important;
    border-color: #1e293b !important;
}
html.dark-theme .info-box-icon,
body.dark-theme .info-box-icon {
    background-color: #1e293b !important;
}
html.dark-theme .info-box-number,
body.dark-theme .info-box-number {
    color: #f8fafc !important;
}

/* ------------------------------------------------------------------------------
 * TABLES & DATATABLES (DARK MODE)
 * ------------------------------------------------------------------------------ */
html.dark-theme table.table,
body.dark-theme table.table,
html.dark-theme .table,
body.dark-theme .table {
    background-color: #131b2e !important;
    border-color: #1e293b !important;
}
html.dark-theme .table > thead > tr > th,
body.dark-theme .table > thead > tr > th {
    background-color: #0b0f19 !important;
    color: #94a3b8 !important;
    border-bottom-color: #1e293b !important;
}
html.dark-theme .table > tbody > tr > td,
body.dark-theme .table > tbody > tr > td {
    color: #cbd5e1 !important;
    border-top-color: #182238 !important;
}
html.dark-theme .table-striped > tbody > tr:nth-of-type(odd),
body.dark-theme .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #131b2e !important;
}
html.dark-theme .table-striped > tbody > tr:nth-of-type(even),
body.dark-theme .table-striped > tbody > tr:nth-of-type(even) {
    background-color: #0e1524 !important;
}
html.dark-theme .table-hover > tbody > tr:hover,
body.dark-theme .table-hover > tbody > tr:hover,
html.dark-theme .table > tbody > tr:hover,
body.dark-theme .table > tbody > tr:hover {
    background-color: rgba(30, 41, 59, 0.8) !important;
}
html.dark-theme .dataTables_info,
body.dark-theme .dataTables_info {
    color: #94a3b8 !important;
}
html.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button,
body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}
html.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #243049 !important;
    color: #ffffff !important;
}
html.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark-theme .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4f46e5 !important;
    color: #ffffff !important;
    border-color: #4f46e5 !important;
}
html.dark-theme .dataTables_wrapper .dataTables_length select,
body.dark-theme .dataTables_wrapper .dataTables_length select,
html.dark-theme .dataTables_wrapper .dataTables_filter input,
body.dark-theme .dataTables_wrapper .dataTables_filter input {
    background-color: #0b0f19 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* ------------------------------------------------------------------------------
 * MODALS & DIALOGS (DARK MODE)
 * ------------------------------------------------------------------------------ */
html.dark-theme .modal-content,
body.dark-theme .modal-content {
    background-color: #131b2e !important;
    border-color: #334155 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}
html.dark-theme .modal-header,
body.dark-theme .modal-header {
    background-color: #131b2e !important;
    border-bottom-color: #1e293b !important;
}
html.dark-theme .modal-title,
body.dark-theme .modal-title {
    color: #f8fafc !important;
}
html.dark-theme .modal-body,
body.dark-theme .modal-body {
    background-color: #131b2e !important;
    color: #cbd5e1 !important;
}
html.dark-theme .modal-footer,
body.dark-theme .modal-footer {
    background-color: #0b0f19 !important;
    border-top-color: #1e293b !important;
}
html.dark-theme .modal-header .close,
body.dark-theme .modal-header .close {
    color: #94a3b8 !important;
}

/* ------------------------------------------------------------------------------
 * DROPDOWNS & POPOVERS (DARK MODE)
 * ------------------------------------------------------------------------------ */
html.dark-theme .dropdown-menu,
body.dark-theme .dropdown-menu {
    background-color: #131b2e !important;
    border-color: #1e293b !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5) !important;
}
html.dark-theme .dropdown-menu > li > a,
body.dark-theme .dropdown-menu > li > a {
    color: #cbd5e1 !important;
}
html.dark-theme .dropdown-menu > li > a:hover,
body.dark-theme .dropdown-menu > li > a:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}
html.dark-theme .dropdown-menu .divider,
body.dark-theme .dropdown-menu .divider {
    background-color: #1e293b !important;
}
html.dark-theme .popover,
body.dark-theme .popover {
    background-color: #131b2e !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
html.dark-theme .popover-title,
body.dark-theme .popover-title {
    background-color: #0b0f19 !important;
    border-bottom-color: #1e293b !important;
    color: #f8fafc !important;
}

/* ------------------------------------------------------------------------------
 * BUTTONS IN DARK MODE
 * ------------------------------------------------------------------------------ */
html.dark-theme .btn-default,
body.dark-theme .btn-default {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}
html.dark-theme .btn-default:hover,
body.dark-theme .btn-default:hover {
    background-color: #243049 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}

/* ------------------------------------------------------------------------------
 * POS SCREEN (DARK MODE)
 * ------------------------------------------------------------------------------ */
html.dark-theme .pos-header,
body.dark-theme .pos-header {
    background-color: #131b2e !important;
    border-color: #1e293b !important;
}
html.dark-theme #pos_header_more_options a,
body.dark-theme #pos_header_more_options a,
html.dark-theme #pos_header_more_options button,
body.dark-theme #pos_header_more_options button {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
html.dark-theme #pos_header_more_options a:hover,
body.dark-theme #pos_header_more_options a:hover,
html.dark-theme #pos_header_more_options button:hover,
body.dark-theme #pos_header_more_options button:hover {
    background-color: #243049 !important;
    color: #ffffff !important;
}

/* ------------------------------------------------------------------------------
 * 15. RESPONSIVE TOUCH & MOBILE OPTIMIZATIONS
 * ------------------------------------------------------------------------------ */
@media (max-width: 768px) {
    .content-header {
        padding: 14px 16px 8px 16px;
    }
    .content-header > h1 {
        font-size: 20px;
    }
    .content {
        padding: 12px 14px 24px 14px;
    }
    .box-body {
        padding: 14px !important;
    }
    .box-header {
        padding: 12px 14px !important;
    }
    .btn {
        min-height: 38px;
    }
    .table-responsive {
        border: none !important;
        margin-bottom: 15px;
    }
}
