/* ==========================================================================
   UI Refresh - Modern flat styling overrides
   Load this file LAST for proper cascade
   ========================================================================== */

/* --- Inter Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   0. Design Tokens — single source of truth for the enterprise visual language
   ========================================================================== */

:root {
    --ent-brand-50: #eff6ff;
    --ent-brand-100: #dbeafe;
    --ent-brand-200: #bfdbfe;
    --ent-brand-300: #93c5fd;
    --ent-brand-500: #1e88e5;
    --ent-brand-600: #1976d2;
    --ent-brand-700: #1565c0;

    --ent-surface: #ffffff;
    --ent-surface-sunken: #f8fafc;
    --ent-surface-raised: #f1f5f9;
    --ent-canvas: #f2f5f9;

    --ent-border-subtle: #eef2f6;
    --ent-border: #e2e8f0;
    --ent-border-strong: #cbd5e1;
    --ent-border-interactive: #94a3b8;

    --ent-text-strong: #0f172a;
    --ent-text: #334155;
    --ent-text-muted: #64748b;
    --ent-text-faint: #94a3b8;

    --ent-success: #16a34a;
    --ent-success-soft: #ecfdf3;
    --ent-success-text: #15803d;
    --ent-danger: #dc2626;
    --ent-danger-soft: #fef2f2;
    --ent-danger-text: #b91c1c;
    --ent-warning-soft: #fffbeb;
    --ent-warning-text: #b45309;
    --ent-info-soft: #f0f9ff;
    --ent-info-text: #0369a1;
    --ent-neutral-soft: #f1f5f9;
    --ent-neutral-text: #475569;

    --ent-radius-sm: 4px;
    --ent-radius-md: 6px;
    --ent-radius-lg: 8px;
    --ent-radius-xl: 12px;
    --ent-radius-pill: 999px;

    --ent-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --ent-shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.07), 0 1px 2px rgba(16, 24, 40, 0.04);
    --ent-shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
    --ent-shadow-xl: 0 24px 56px rgba(16, 24, 40, 0.16);
    --ent-focus-ring: 0 0 0 3px rgba(30, 136, 229, 0.16);
    --ent-focus-ring-danger: 0 0 0 3px rgba(220, 38, 38, 0.16);

    --ent-control-height: 34px;
    --ent-control-height-sm: 30px;
    --ent-control-height-xs: 26px;
    --ent-control-padding-x: 12px;

    --ent-space-sm: 8px;
    --ent-space-md: 12px;
    --ent-space-lg: 16px;

    --ent-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ent-duration: 0.16s;
}

/* ==========================================================================
   1. Global / Base
   ========================================================================== */

body {
    font-family: 'Inter', sans-serif !important;
    background-color: #eef1f5 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #334155;
    letter-spacing: 0.01em;
}

.wrapper > section,
.layout-h .wrapper > section#MainContent {
    background-color: #eef1f5 !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif !important;
    color: #1e293b;
}

p, span, a, li, td, th, label, input, select, textarea, button, div {
    font-family: 'Inter', sans-serif;
}

a {
    transition: color 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c1c9d1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a0aab4;
}

/* ==========================================================================
   2. Topbar / Header
   ========================================================================== */

.headerthemewrap {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e5ea !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

.navbarheader .navbarbrand {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 17px !important;
    letter-spacing: -0.02em;
}

.navbartopnavbar > ul.left > li > a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    color: #64748b !important;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 20px 2px !important;
    letter-spacing: 0.01em;
}

.navbartopnavbar > ul.left > li > a:hover {
    color: #1e88e5 !important;
}

.navbartopnavbar > ul.left > li > a.active {
    color: #1e88e5 !important;
    font-weight: 600 !important;
}

.navbartopnavbar > ul.left > li > a::after {
    height: 2.5px !important;
    border-radius: 2px;
    background-color: #1e88e5 !important;
}

/* Right nav icons - add a hover circle effect */
.navbartopnavbar > .right > li > a {
    transition: background-color 0.2s ease, opacity 0.2s ease;
    border-radius: 8px;
    padding: 8px !important;
}

.navbartopnavbar > .right > li > a:hover {
    background-color: #eef1f5;
}

/* ==========================================================================
   3. Dropdown Menus
   ========================================================================== */

.navbartopnavbar > ul.left > li > .dropdownmenu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 6px 8px !important;
    min-width: 180px !important;
}

.navbartopnavbar > ul.left > li > .dropdownmenu > li > a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 13.5px !important;
    color: #475569 !important;
    transition: all 0.15s ease;
    border-radius: 6px !important;
    padding: 9px 10px !important;
    margin: 1px 0;
}

.navbartopnavbar > ul.left > li > .dropdownmenu > li > a:hover {
    color: #1e88e5 !important;
    background-color: #eff6ff !important;
}

.navbartopnavbar > ul.left > li > .dropdownmenu > li + li {
    border-top: none !important;
}

/* Sub-dropdown */
.navbartopnavbar > ul.left > li > .dropdownmenu > .dropdown > .dropdownmenu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 6px 8px !important;
}

.navbartopnavbar > ul.left > li > .dropdownmenu > .dropdown > .dropdownmenu > li > a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 13.5px !important;
    color: #475569 !important;
    transition: all 0.15s ease;
    border-radius: 6px !important;
    padding: 9px 10px !important;
}

.navbartopnavbar > ul.left > li > .dropdownmenu > .dropdown > .dropdownmenu > li > a:hover {
    color: #1e88e5 !important;
    background-color: #eff6ff !important;
}

.navbartopnavbar > ul.left > li > .dropdownmenu > .dropdown > .dropdownmenu > li + li {
    border-top: none !important;
}

/* Dividers inside dropdown */
.navbartopnavbar .dropdownmenu li.divider {
    margin: 4px 10px !important;
    background-color: #f1f5f9;
}

/* User dropdown */
.navbartopnavbar > .right > li > .dropdown-menu.dropdown-log {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 8px 0 !important;
    overflow: hidden;
}

.dropdown-log .dw-user-box {
    padding: 4px 16px;
}

.dropdown-log .u-text h4,
.dropdown-log .u-text p {
    font-family: 'Inter', sans-serif !important;
}

.dropdown-log .u-text h4 {
    font-weight: 600 !important;
    color: #1e293b !important;
}

.dropdown-log li > a {
    font-family: 'Inter', sans-serif !important;
    transition: background-color 0.15s ease;
}

.dropdown-log li > a:hover {
    background-color: #eff6ff !important;
}

/* ==========================================================================
   4. Cards - More visible refresh
   ========================================================================== */

.card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
}

.card .card-header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 14px 20px !important;
}

.card .card-header:first-child {
    border-radius: 8px 8px 0 0 !important;
}

.card .card-header h4 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    font-size: 14px !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.card .card-body {
    font-family: 'Inter', sans-serif;
    padding: 20px !important;
}

.card .card-footer {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

.card .card-footer:last-child {
    border-radius: 0 0 8px 8px !important;
}

.card.m-b-0 {
    border-radius: 8px !important;
}

/* ==========================================================================
   5. Buttons - Flat Solid (more visible)
   ========================================================================== */

.btn {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500;
    border-radius: 6px !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.btn:hover,
.btn:focus,
.btn:active,
.btn.active {
    box-shadow: none !important;
}

/* Primary - now uses the brand blue instead of purple */
.btn-primary,
.btn-primary.disabled {
    background: #1e88e5 !important;
    border: 1px solid #1e88e5 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary.disabled:hover {
    background: #1565c0 !important;
    border-color: #1565c0 !important;
    box-shadow: none !important;
}

.btn-primary.active,
.btn-primary:focus,
.btn-primary.disabled.active,
.btn-primary.disabled:focus {
    background: #1565c0 !important;
    border-color: #1565c0 !important;
    box-shadow: none !important;
}

/* Info */
.btn-info,
.btn-info.disabled {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.btn-info:hover,
.btn-info.disabled:hover {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    box-shadow: none !important;
}

.btn-info.active,
.btn-info:focus,
.btn-info.disabled.active,
.btn-info.disabled:focus {
    background: #0277bd !important;
    box-shadow: none !important;
}

/* Success */
.btn-success {
    background: #16a34a !important;
    border-color: #16a34a !important;
    box-shadow: none !important;
}

.btn-success:hover {
    background: #15803d !important;
    border-color: #15803d !important;
    box-shadow: none !important;
}

.btn-success:focus,
.btn-success.active {
    background: #166534 !important;
    box-shadow: none !important;
}

/* Danger */
.btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    box-shadow: none !important;
}

.btn-danger:hover,
.btn-danger:focus {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    box-shadow: none !important;
}

/* Warning */
.btn-warning {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.btn-warning:hover {
    background: #d97706 !important;
    border-color: #d97706 !important;
    box-shadow: none !important;
}

/* Default */
.btn-default,
.btn.btn-default {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    box-shadow: none !important;
}

.btn-default:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

/* Secondary */
.btn-secondary,
.btn-secondary.disabled {
    background-color: #64748b !important;
    border-color: #64748b !important;
    box-shadow: none !important;
}

.btn-secondary:hover,
.btn-secondary.disabled:hover {
    background-color: #475569 !important;
    border-color: #475569 !important;
    box-shadow: none !important;
}

/* Button sizing refinements */
.btn-sm {
    border-radius: 5px !important;
    font-size: 12px;
    padding: 5px 12px;
}

.btn-xs {
    border-radius: 4px !important;
    font-size: 11px;
}

.btn-rounded {
    border-radius: 50px !important;
}

/* ==========================================================================
   6. Form Controls - More visible
   ========================================================================== */

.form-control {
    font-family: 'Inter', sans-serif !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #334155 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
    padding: 7px 12px;
}

.form-control:focus {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12) !important;
    outline: none;
}

.form-control.input-sm {
    border-radius: 6px !important;
}

.form-control.form-control-search {
    border: none !important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    transition: border-color 0.2s ease;
    min-height: 34px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.select2-dropdown {
    border-color: #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

.form-group label,
form label {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    color: #475569 !important;
    font-size: 12.5px !important;
    letter-spacing: 0.02em;
    margin-bottom: 5px;
}

label.required-mark:after {
    color: #dc2626 !important;
}

/* Input group addons */
.input-group-addon {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    border-radius: 6px;
}

/* ==========================================================================
   7. Tables / Order List - More visible
   ========================================================================== */

.tableheadwrap {
    margin-bottom: 18px !important;
}

.tableheadwrap .title h4 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    font-size: 22px !important;
}

/* DataTables styling - eliminate cell gaps from border-collapse:separate */
.table,
table.dataTable {
    border-spacing: 0 !important;
}

/* Apply background on thead row level to avoid DataTables cell padding conflicts */
.table > thead {
    background-color: #f1f5f9;
}

.table > thead > tr > th {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 11.5px !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

thead.thead-custom {
    background-color: #f1f5f9 !important;
}

thead.thead-custom tr > th {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.countertablecols .dataTables_wrapper table.table thead {
    background-color: #f1f5f9 !important;
}

/* Prevent DataTables wrapper rows from showing gray backgrounds */
.dataTables_wrapper .row {
    background: transparent !important;
}

/* Prevent DataTables scrollHead from creating extra gray bars */
.dataTables_scrollHead,
.dataTables_scrollHeadInner {
    background: transparent !important;
}

/* Remove any extra background on DataTables processing elements */
div.dataTables_wrapper div.dataTables_processing {
    background: transparent !important;
}

/* Ensure table-bordered header doesn't create double borders */
table.table-bordered.dataTable thead tr th,
table.table-bordered.dataTable thead tr td {
    border-bottom-width: 1px !important;
}

.table > tbody > tr {
    transition: background-color 0.15s ease;
}

.table > tbody > tr:hover {
    background-color: #eff6ff !important;
}

.table > tbody > tr > td {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #334155;
    border-top: 1px solid #f1f5f9 !important;
    padding: 11px 14px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #fafbfd;
}

.table-striped > tbody > tr:nth-of-type(odd):hover {
    background-color: #eff6ff !important;
}

/* Order status header tabs */
.orderstatusheaderwrap {
    background-color: #ffffff !important;
    border-radius: 10px !important;
    padding: 6px 8px !important;
    gap: 2px !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.orderstatusheaderwrap a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 12.5px !important;
    border-radius: 7px !important;
    transition: all 0.2s ease;
    padding: 9px 14px !important;
    color: #64748b !important;
    opacity: 1 !important;
    position: relative;
}

.orderstatusheaderwrap a::before {
    display: none !important;
}

.orderstatusheaderwrap a span {
    font-weight: 600 !important;
    font-size: 11.5px !important;
    color: inherit !important;
    opacity: 0.7;
}

.orderstatusheaderwrap a:hover {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    opacity: 1 !important;
}

.orderstatusheaderwrap a.active {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(30, 136, 229, 0.08);
}

.orderstatusheaderwrap a.active span {
    color: #1e88e5 !important;
    opacity: 1;
}

/* Order date and filter bar */
.orderdatewrap {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    padding: 8px 14px !important;
    transition: border-color 0.2s ease;
}

.orderdatewrap:hover {
    border-color: #cbd5e1 !important;
}

.orderdatewrap .orderdateinput input.orderdate {
    font-family: 'Inter', sans-serif !important;
    font-size: 12.5px !important;
    color: #334155 !important;
}

.orderdatewrap .orderdateinput span.input-group-addon {
    color: #64748b;
}

.orderdatedropdown .dropdown-toggle {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 12.5px !important;
    color: #475569 !important;
}

.orderdatedropdown .dropdown-toggle .caret {
    opacity: 0.5;
}

/* Date dropdown menu */
.orderdatedropdown .dropdown-menu.btn-dropdown-group {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px !important;
    overflow: hidden;
}

.orderdatedropdown .dropdown-menu.btn-dropdown-group li a {
    font-family: 'Inter', sans-serif !important;
    font-size: 12.5px !important;
    color: #475569 !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    transition: all 0.15s ease;
}

.orderdatedropdown .dropdown-menu.btn-dropdown-group li a:hover {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
}

.ordersearchwrap .magnifier {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    width: 36px !important;
    height: 36px !important;
    transition: all 0.15s ease;
    background-color: #fff !important;
}

.ordersearchwrap .magnifier:hover {
    background-color: #eff6ff !important;
    border-color: #1e88e5 !important;
}

.ordersearchwrap .magnifier em {
    color: #64748b !important;
}

.selectlocationordetypewrap,
.selectchannelcompanywrap {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden;
    background-color: #fff !important;
    transition: border-color 0.2s ease;
}

.selectlocationordetypewrap:hover,
.selectchannelcompanywrap:hover {
    border-color: #cbd5e1 !important;
}

.selectlocationordetypewrap > div .select2-selection--single span.select2-selection__rendered,
.selectchannelcompanywrap > div .select2-selection--single span.select2-selection__rendered {
    font-family: 'Inter', sans-serif !important;
    font-size: 12.5px !important;
    color: #334155 !important;
}

/* Filter divider pseudo-element between select pairs */
.selectlocationordetypewrap > div + div::before,
.selectchannelcompanywrap > div + div::before {
    background-color: #e2e8f0 !important;
}

/* Select2 within filter wrappers — flatten border for inline look */
.selectlocationordetypewrap > div .select2-selection--single,
.selectchannelcompanywrap > div .select2-selection--single {
    border: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}

/* --- Totals / Summary display --- */
.Total-AmoutDiv {
    font-family: 'Inter', sans-serif !important;
    background-color: #f0f7ff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    color: #475569 !important;
    font-weight: 500 !important;
}

.Total-AmoutText {
    font-family: 'Inter', sans-serif !important;
    color: #1e88e5 !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: -0.01em;
}

/* --- Notification indicator (pending orders) --- */
#PendingOrdersCountDiv {
    margin-bottom: 0 !important;
}

#PendingOrdersCountDiv .card-body {
    padding: 4px 0 6px 0 !important;
}

#PendingOrdersCountDiv .card-body > .row {
    margin: 0 !important;
}

#PendingOrdersCountSpan .btn-group.order-status-pending {
    font-family: 'Inter', sans-serif !important;
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    color: #991b1b !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

#PendingOrdersCountSpan .btn-group.order-status-pending em.icon-bell {
    font-size: 14px !important;
    color: #dc2626 !important;
}

#PendingOrdersCountSpan .btn-group.order-status-pending a {
    color: #dc2626 !important;
    font-weight: 700 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#PendingOrdersCountSpan .btn-group.order-status-pending a:hover {
    color: #b91c1c !important;
}

/* Bell icon in header */
.bell-icon-btn {
    font-family: 'Inter', sans-serif;
    background-color: transparent !important;
    border: none !important;
    font-size: 18px;
    color: #64748b;
    transition: color 0.2s ease;
    position: relative;
}

.bell-icon-btn:hover {
    color: #1e88e5;
}

/* --- "New" and action buttons in .newdivwrap --- */
/* Primary CTA: New Order, Quick New — these are the main actions */
.tableheadwrap .newdivwrap .btn {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    border-radius: 7px !important;
    padding: 7px 14px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    transition: all 0.2s ease;
    background-color: #1e88e5 !important;
    border: 1px solid #1e88e5 !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.tableheadwrap .newdivwrap .btn:hover {
    background-color: #1565c0 !important;
    border-color: #1565c0 !important;
    color: #ffffff !important;
}

.tableheadwrap .newdivwrap .btn img {
    filter: brightness(0) invert(1);
    width: 14px !important;
    height: 14px !important;
}

/* Drafts button — secondary, less prominent than New */
.tableheadwrap .newdivwrap #btnViewDrafts.btn {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

.tableheadwrap .newdivwrap #btnViewDrafts.btn:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

/* More options toggle (vertical dots) */
.tableheadwrap .newdivwrap .btn-group .toggle-more {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    color: #64748b !important;
    padding: 8px 10px !important;
    transition: all 0.2s ease;
}

.tableheadwrap .newdivwrap .btn-group .toggle-more:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
}

/* More options dropdown */
.tableheadwrap .newdivwrap .btn-group .dropdown-menu {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px !important;
}

.tableheadwrap .newdivwrap .btn-group .dropdown-menu li a {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #475569 !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    transition: all 0.15s ease;
}

.tableheadwrap .newdivwrap .btn-group .dropdown-menu li a:hover {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
}

/* --- Counter section toggle area --- */
.countersectiondiv {
    margin-bottom: 6px;
}

/* --- DataTables search/length row within order table --- */
.countertablecols .dataTables_wrapper .row:nth-child(2) {
    background: #f8fafc !important;
    border-radius: 8px !important;
    margin: 0 0 8px 0 !important;
    padding: 8px 12px !important;
    border: 1px solid #f1f5f9;
}

.countertablecols .dataTables_wrapper .row:nth-child(2) .dataTables_filter label {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #64748b !important;
}

.countertablecols .dataTables_wrapper .row:nth-child(2) .dataTables_filter input {
    font-family: 'Inter', sans-serif !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    font-size: 13px !important;
    transition: border-color 0.2s ease;
}

.countertablecols .dataTables_wrapper .row:nth-child(2) .dataTables_filter input:focus {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12) !important;
    outline: none;
}

.countertablecols .dataTables_wrapper .row:nth-child(2) .dataTables_length label {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #64748b !important;
}

.countertablecols .dataTables_wrapper .row:nth-child(2) .dataTables_length select {
    font-family: 'Inter', sans-serif !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 13px !important;
}

/* --- Order card container --- */
.ordercard {
    background-color: #fff !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
}

.ordercard-body {
    border-radius: 0 !important;
    padding: 12px 16px !important;
}

.ordercard-body.p-t-10 {
    padding-top: 6px !important;
}

/* --- Context menu styling --- */
#contextMenu,
.dropdown-menu.contextMenu {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px !important;
    overflow: hidden;
}

#contextMenu > li > a,
.dropdown-menu.contextMenu > li > a {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #475569 !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    transition: all 0.15s ease;
}

#contextMenu > li > a:hover,
.dropdown-menu.contextMenu > li > a:hover {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
}

#contextMenu > li.divider {
    margin: 4px 8px !important;
    background-color: #f1f5f9 !important;
}

/* --- Import section header --- */
.ordercard-header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 14px 20px !important;
}

.countertablecols .dataTables_wrapper table.table th {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.countertablecols .dataTables_wrapper table.table td {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #334155 !important;
}

.countertablecols .dataTables_wrapper table.table td div#timer {
    font-family: 'Inter', sans-serif !important;
}

.countertablecols .dataTables_wrapper table.table td .custom-dropdown .selected-status,
.countertablecols .dataTables_wrapper table.table td .custom-dropdown .dropdown-option,
#contextMenu > li > a,
.dropdown-menu.contextMenu > li > a {
    font-family: 'Inter', sans-serif !important;
}

.countertablecols .row:last-child div#tblOrder55_info {
    font-family: 'Inter', sans-serif !important;
}

.countertablecols .row:last-child .dataTables_paginate li.first > a,
.countertablecols .row:last-child div.dataTables_paginate li.previous > a,
.countertablecols .row:last-child .dataTables_paginate li.next > a,
.countertablecols .row:last-child div.dataTables_paginate li.next > a,
.countertablecols .row:last-child .paginate_button a {
    font-family: 'Inter', sans-serif !important;
}

/* Search filter dropdown */
.input-group-btn.searchbtnwrap .dropdown-menu.dropdown-filter {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 14px !important;
}

.input-group-btn.searchbtnwrap .dropdown-menu.dropdown-filter .col-md-12.text-center button {
    font-family: 'Inter', sans-serif !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    background: #1e88e5 !important;
}

/* ==========================================================================
   8. Order Add/Edit Specific
   ========================================================================== */

a.back-link {
    color: #1e88e5 !important;
    transition: color 0.2s ease;
}

a.back-link:hover,
a.back-link:hover i {
    color: #1565c0 !important;
}

#orderDocumentNo {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: #1e88e5 !important;
    font-size: 15px;
}

/* ==========================================================================
   9. Aside Panels (ToDo, Help & Support)
   ========================================================================== */

.offsidebar {
    border-left: 1px solid #e2e8f0 !important;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.06) !important;
}

.tab-content-header {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    padding: 16px !important;
}

.tab-content .div-section {
    font-family: 'Inter', sans-serif;
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background-color 0.15s ease;
}

.tab-content .div-section:hover {
    background-color: #f8fafc !important;
}

.tab-content .div-section p {
    font-family: 'Inter', sans-serif;
    color: #64748b;
}

.div-section-footer {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

.div-section-footer .help-text {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.div-section-footer .help-contact a {
    font-family: 'Inter', sans-serif;
    color: #dc2626 !important;
    font-weight: 700;
}

/* ==========================================================================
   10. Footer
   ========================================================================== */

footer {
    font-family: 'Inter', sans-serif !important;
    color: #64748b !important;
    border-top: 1px solid #e2e8f0 !important;
    font-size: 12.5px;
    background-color: #fff;
    padding: 12px 15px !important;
}

footer .text-primary {
    color: #1e88e5 !important;
    font-weight: 600;
}

/* ==========================================================================
   11. Fixed Footer Bar
   ========================================================================== */

.card-footer.footer-fixed {
    background-color: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06) !important;
}

/* ==========================================================================
   12. Nav Tabs
   ========================================================================== */

.nav-tabs > li > a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400;
    border-radius: 0;
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
    transition: all 0.15s ease;
}

.nav-tabs > li > a:hover {
    background-color: #e2e8f0;
    color: #334155;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
    color: #1e88e5 !important;
    font-weight: 600;
    background-color: #fff;
    border-bottom-color: #fff;
}

.salessummary-tab li > a {
    font-family: 'Inter', sans-serif !important;
}

.salessummary-tab li.active a,
.salessummary-tab li.active a:hover {
    border-bottom: 2.5px solid #1e88e5 !important;
}

/* ==========================================================================
   13. Badges, Labels, Alerts
   ========================================================================== */

.label,
.badge {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 4px;
}

.label-success, .badge-success {
    background-color: #16a34a !important;
}

.label-danger, .badge-danger {
    background-color: #dc2626 !important;
}

.label-warning, .badge-warning {
    background-color: #f59e0b !important;
}

.label-info, .badge-info {
    background-color: #0ea5e9 !important;
}

.label-primary, .badge-primary {
    background-color: #1e88e5 !important;
}

.alert {
    border-radius: 8px;
    border: none;
    font-family: 'Inter', sans-serif;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border-left: 4px solid #16a34a;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #1e88e5;
}

/* ==========================================================================
   14. Modals
   ========================================================================== */

.modal-content {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0 !important;
    font-family: 'Inter', sans-serif;
    padding: 16px 20px !important;
    background-color: #f8fafc;
}

.modal-header .modal-title,
.modal-header h4 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    color: #1e293b;
}

.modal-body {
    padding: 20px !important;
}

.modal-footer {
    border-top: 1px solid #e2e8f0 !important;
    padding: 14px 20px !important;
    background-color: #f8fafc;
}

/* ==========================================================================
   15. Popover / Tooltip
   ========================================================================== */

.popover {
    border: 1px solid #e2e8f0 !important;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.tooltip-inner {
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
}

/* ==========================================================================
   16. Status Toggle Buttons (Orders Page)
   ========================================================================== */

.btn-so.btn-default {
    border-radius: 6px !important;
    border-color: #e2e8f0 !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    transition: all 0.2s ease;
    background-color: #fff !important;
}

.btn-so.btn-default:hover {
    background-color: #eff6ff !important;
    border-color: #93c5fd !important;
    color: #1e88e5 !important;
}

.btn-so.btn-default.active,
.btn-so.btn-default.active:hover {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* Counter dropdown buttons */
button.btn.btn-primary.bttn-counter-dropdown {
    font-family: 'Inter', sans-serif !important;
    box-shadow: none !important;
    border-radius: 6px !important;
}

/* ==========================================================================
   17. DataTable Pagination
   ========================================================================== */

.dataTables_wrapper .dataTables_paginate .paginate_button {
    font-family: 'Inter', sans-serif !important;
    border-radius: 6px !important;
    transition: all 0.15s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #fff !important;
    border-radius: 6px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #eff6ff !important;
    border-color: #e2e8f0 !important;
    color: #1e88e5 !important;
}

.dataTables_wrapper .dataTables_info {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    color: #64748b;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #64748b;
}

/* ==========================================================================
   18. iziToast
   ========================================================================== */

.iziToast {
    font-family: 'Inter', sans-serif !important;
    border-radius: 8px !important;
}

/* ==========================================================================
   19. Report Cards
   ========================================================================== */

.card.card-rpt {
    border-radius: 8px !important;
    transition: all 0.25s ease;
    border: 1px solid #e2e8f0 !important;
}

a:hover .card.card-rpt,
.card.card-rpt:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px);
    border-color: #cbd5e1 !important;
}

.card.card-rpt h5 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #1e293b !important;
    margin-bottom: 6px;
}

.card.card-rpt:hover h5 {
    color: #1e88e5 !important;
}

.card.card-rpt .card-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 18px;
    color: #64748b;
    display: block;
    min-height: 36px;
}

.card.card-rpt .rpt-icon {
    display: block;
    font-size: 24px;
    color: #94a3b8;
    margin-bottom: 10px;
    transition: color 0.25s ease;
}

.card.card-rpt:hover .rpt-icon {
    color: #1e88e5;
}

.card.card-rpt .card-body {
    padding: 16px;
}

.card.card-rpt p {
    font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   20. Grid Cards
   ========================================================================== */

.grid-card {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease;
}

.grid-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.grid-card-footer {
    border-top: 1px solid #f1f5f9 !important;
}

/* ==========================================================================
   21. Customer Details Summary
   ========================================================================== */

.customer_details_summary {
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 8px;
    overflow: hidden;
}

.customer_details_summary li {
    border-left: 1px solid #e2e8f0 !important;
}

.customer_details_summary li div.customer_details_div span.value_details {
    font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   22. Miscellaneous Polish
   ========================================================================== */

/* Breadcrumbs */
.breadcrumb {
    font-family: 'Inter', sans-serif;
    background-color: transparent;
    border-radius: 0;
    font-size: 13px;
}

/* Panel */
.panel {
    border-radius: 8px;
    border-color: #e2e8f0;
}

.panel .panel-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

/* Horizontal rule */
hr {
    border-top-color: #e2e8f0;
}

/* Text colors refresh */
.text-muted {
    color: #94a3b8 !important;
}

.text-primary {
    color: #1e88e5 !important;
}

/* Card color variants - slightly adjusted for modern look */
.card-info {
    background: #1e88e5 !important;
    border-color: #1e88e5 !important;
}

.card-success {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

.card-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.card-warning {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
}

/* Bell icon notification badge */
.bell-icon-count {
    background-color: #dc2626 !important;
    border-radius: 10px !important;
    padding: 1px 5px !important;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 11px !important;
}

/* ==========================================================================
   22b. Setup Screens — Card Header Buttons & Tabs
   ========================================================================== */

/* --- "New" button in card-header (Setup screens use btn-danger btn-flat) --- */
/* Make it primary blue CTA instead of red */
.card-header .pull-right .btn-danger.btn-flat,
.card-header .pull-right a.btn.btn-danger.btn-flat.newbutton {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    padding: 7px 14px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: all 0.2s ease;
}

.card-header .pull-right .btn-danger.btn-flat:hover,
.card-header .pull-right a.btn.btn-danger.btn-flat.newbutton:hover {
    background-color: #1565c0 !important;
    border-color: #1565c0 !important;
}

/* --- "More" toggle button in card-header --- */
.card-header .pull-right .btn-secondary.btn-flat.toggle-more,
.card-header .pull-right .btn-group .toggle-more {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #64748b !important;
    box-shadow: none !important;
    padding: 7px 9px !important;
    line-height: 1 !important;
    transition: all 0.2s ease;
    margin-left: 6px !important;
}

.card-header .pull-right .btn-secondary.btn-flat.toggle-more:hover,
.card-header .pull-right .btn-group .toggle-more:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

/* Dropdown from more toggle */
.card-header .pull-right .btn-group .dropdown-menu {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 4px !important;
}

.card-header .pull-right .btn-group .dropdown-menu li a {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #475569 !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    transition: all 0.15s ease;
}

.card-header .pull-right .btn-group .dropdown-menu li a:hover {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
}

/* --- Spacing between Active/Inactive toggle and New button group --- */
.card-header .pull-right > .btn-group[data-toggle="buttons"] {
    margin-right: 12px !important;
    vertical-align: middle;
}

.card-header .pull-right > .btn-group.pull-right {
    vertical-align: middle;
}

/* --- Active/Inactive toggle refinements (Setup screens) --- */
.card-header .btn-so.btn-default {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 12.5px !important;
    border-radius: 0 !important;
    border-color: #e2e8f0 !important;
    background-color: #fff !important;
    color: #64748b !important;
    padding: 7px 14px !important;
    line-height: 1 !important;
    transition: all 0.2s ease;
}

/* First button rounded left, last button rounded right */
.card-header .btn-group[data-toggle="buttons"] .btn-so.btn-default:first-child {
    border-radius: 6px 0 0 6px !important;
}

.card-header .btn-group[data-toggle="buttons"] .btn-so.btn-default:last-child {
    border-radius: 0 6px 6px 0 !important;
}

.card-header .btn-so.btn-default:hover {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
    border-color: #93c5fd !important;
}

.card-header .btn-so.btn-default.active,
.card-header .btn-so.btn-default.active:hover {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* --- View toggle (Table/Kanban) in Lead/Item screens --- */
.btn-toggle-custom-parent {
    border-radius: 52px !important;
    background-color: #e2e8f0 !important;
    overflow: hidden;
    vertical-align: middle;
}

.btn-toggle-custom {
    font-family: 'Inter', sans-serif !important;
    color: #64748b !important;
    transition: all 0.2s ease;
}

.btn-toggle-custom:hover {
    color: #1e293b !important;
}

.btn-toggle-custom.active {
    background-color: #1e88e5 !important;
    color: #ffffff !important;
}

/* --- Card header title alignment --- */
.card-header h4.m-b-0.m-t-7 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #1e293b !important;
}

/* ==========================================================================
   23. Order Add/Edit Form Refinements
   ========================================================================== */

/* --- Card header bar --- */
.card .card-header .back-link {
    color: #1e88e5 !important;
    font-size: 22px;
    vertical-align: middle;
    transition: color 0.2s ease;
}

.card .card-header .back-link:hover,
.card .card-header .back-link:hover i {
    color: #1565c0 !important;
}

.card .card-header h4.m-b-0 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #1e293b !important;
    vertical-align: middle;
    display: inline-block;
}

/* --- Order document number (editable) --- */
.order-doc-no {
    font-family: 'Inter', sans-serif !important;
    font-size: 13.5px !important;
    border-bottom: 2px dashed #93c5fd !important;
    padding-bottom: 2px !important;
    color: #1e88e5 !important;
    transition: border-color 0.2s ease;
}

.order-doc-no:hover {
    border-bottom-color: #1e88e5 !important;
}

.order-doc-no .orderDocumentNo {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: #1e88e5 !important;
}

/* --- Form section backgrounds & dividers --- */
.card-body.bg-light-gray {
    background-color: #f8fafc !important;
}

html body .b-t {
    border-top: 1px solid #e2e8f0 !important;
}

.card-body.b-t {
    border-top: 1px solid #e2e8f0 !important;
}

/* --- Material-style inputs (bottom-border only) --- */
.form-control.form-control-material {
    border-bottom-color: #cbd5e1 !important;
    font-family: 'Inter', sans-serif !important;
    transition: border-color 0.2s ease;
}

.form-control.form-control-material:focus {
    border-bottom-color: #1e88e5 !important;
    box-shadow: 0 1px 0 0 #1e88e5 !important;
}

.form-control.form-control-line {
    font-family: 'Inter', sans-serif !important;
}

.form-control.form-control-line:focus {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12) !important;
}

/* --- Input group addons (calendar icons, etc.) --- */
.input-group-addon-custom {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-left: none !important;
    color: #64748b;
    border-radius: 0 6px 6px 0 !important;
    transition: border-color 0.2s ease;
}

.input-group .input-group-addon {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

/* --- Button hierarchy fixes --- */

/* "New" customer button — secondary/outlined, NOT primary green */
#btnAddCustomer.btn-success {
    background-color: #ffffff !important;
    color: #16a34a !important;
    border: 1px solid #86efac !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 12.5px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

#btnAddCustomer.btn-success:hover {
    background-color: #f0fdf4 !important;
    border-color: #16a34a !important;
    color: #15803d !important;
}

/* "Edit" customer button */
#btnEditCustomer.btn-default {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #475569 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12.5px !important;
    transition: all 0.2s ease;
}

#btnEditCustomer.btn-default:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

/* Address buttons (map, edit) */
.input-group-btn .btn.btn-default.p-6-12 {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #475569 !important;
    background-color: #fff !important;
    transition: all 0.2s ease;
}

.input-group-btn .btn.btn-default.p-6-12:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

/* Discount toggle "%" button — muted utility style, NOT primary info blue */
#btnDiscountToggle.btn-info {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border-radius: 0 6px 6px 0 !important;
    min-width: 38px;
    transition: all 0.2s ease;
}

#btnDiscountToggle.btn-info:hover {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

/* "Add" item/attachment buttons — theme primary instead of dark black */
.btn-inverse {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #fff !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

.btn-inverse:hover,
.btn-inverse:focus,
.btn-inverse:active,
.btn-inverse.active {
    background-color: #1565c0 !important;
    border-color: #1565c0 !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* --- Footer bar buttons (card-footer + modal-footer, all AddEdit screens) --- */

/* Submit / Save / Submit & New — primary blue instead of danger red */
.card-footer .btn-danger.btn-md,
.card-footer .btn-danger.btn-flat,
.modal-footer .btn-danger.btn-md,
.modal-footer .btn-danger.btn-flat {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #fff !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    border-radius: 6px !important;
    padding: 8px 20px !important;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.card-footer .btn-danger.btn-md:hover,
.card-footer .btn-danger.btn-flat:hover,
.modal-footer .btn-danger.btn-md:hover,
.modal-footer .btn-danger.btn-flat:hover {
    background-color: #1565c0 !important;
    border-color: #1565c0 !important;
}

/* Secondary action (Save Draft, Update Draft) — muted flat */
.card-footer button.btn-secondary.btn-md,
.card-footer button.btn-secondary.btn-flat,
.modal-footer button.btn-secondary.btn-md,
.modal-footer button.btn-secondary.btn-flat {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    border-radius: 6px !important;
    padding: 8px 20px !important;
    transition: all 0.2s ease;
}

.card-footer button.btn-secondary.btn-md:hover,
.card-footer button.btn-secondary.btn-flat:hover,
.modal-footer button.btn-secondary.btn-md:hover,
.modal-footer button.btn-secondary.btn-flat:hover {
    background-color: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
}

/* Cancel (anchor link) — transparent outlined */
.card-footer a.btn-secondary.btn-md,
.card-footer a.btn-secondary.btn-flat,
.modal-footer a.btn-secondary.btn-md,
.modal-footer a.btn-secondary.btn-flat {
    background-color: transparent !important;
    border: 1px solid #cbd5e1 !important;
    color: #64748b !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    border-radius: 6px !important;
    padding: 8px 20px !important;
    transition: all 0.2s ease;
}

.card-footer a.btn-secondary.btn-md:hover,
.card-footer a.btn-secondary.btn-flat:hover,
.modal-footer a.btn-secondary.btn-md:hover,
.modal-footer a.btn-secondary.btn-flat:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}

/* Button spacing within footer */
.card-footer .btn + .btn,
.modal-footer .btn + .btn {
    margin-left: 8px !important;
}

/* --- Item entry row refinements --- */
.card-body.b-t .form-group label {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    color: #475569 !important;
    font-size: 12.5px !important;
}

.card-body.b-t .form-group label.required-mark:after {
    color: #dc2626 !important;
}

.card-body.b-t .form-group small.text-muted {
    font-family: 'Inter', sans-serif;
    color: #94a3b8 !important;
    font-size: 11px;
}

/* --- Inline form (top customer/date section) --- */
.inline-form .form-group label {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    color: #475569 !important;
    font-size: 12.5px !important;
    margin-top: 5px;
}

.inline-form .form-group label small.a-link {
    font-weight: 500 !important;
    font-size: 11.5px !important;
}

/* --- Order detail summary table --- */
.table.mt-lg thead td,
.table.mt-lg tbody td {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px;
    color: #334155;
    border-color: #e2e8f0 !important;
}

.table.mt-lg thead td {
    font-weight: 600 !important;
    color: #1e293b !important;
    background-color: #f8fafc;
}

.table.mt-lg tbody tr:last-child td {
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #1e293b !important;
}

/* --- Inline sales table (#dtInlineSales) --- */
#dtInlineSales thead th {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 11.5px !important;
    color: #475569 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#dtInlineSales tbody td {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #334155;
}

#dtInlineSales tbody td .light-bold {
    font-weight: 600;
}

#dtInlineSales tbody td a.text-green {
    color: #16a34a !important;
    transition: color 0.15s ease;
}

#dtInlineSales tbody td a.text-green:hover {
    color: #15803d !important;
}

#dtInlineSales tbody td a.text-red {
    color: #dc2626 !important;
    transition: color 0.15s ease;
}

#dtInlineSales tbody td a.text-red:hover {
    color: #b91c1c !important;
}

/* --- Autocomplete dropdown (item/customer search) --- */
.ui-autocomplete {
    font-family: 'Inter', sans-serif !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 4px 0 !important;
    background-color: #fff !important;
    max-height: 280px;
    overflow-y: auto;
}

ul.ui-autocomplete li.ui-menu-item {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    color: #334155 !important;
    padding: 9px 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background-color 0.1s ease;
}

ul.ui-autocomplete li.ui-menu-item:last-child {
    border-bottom: none !important;
}

ul.ui-autocomplete li.ui-menu-item:hover,
ul.ui-autocomplete li.ui-menu-item.ui-state-focus,
ul.ui-autocomplete li.ui-menu-item.ui-state-active {
    background-color: #eff6ff !important;
    color: #1e88e5 !important;
    border-color: #f1f5f9 !important;
}

/* ui-state-active default orange override */
.ui-state-active,
.ui-widget-content .ui-state-active {
    background: #eff6ff !important;
    border-color: #eff6ff !important;
    color: #1e88e5 !important;
}

/* --- Textarea (Note field) --- */
textarea.form-control {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-family: 'Inter', sans-serif !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: vertical;
}

textarea.form-control:focus {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12) !important;
}

/* --- File input widget --- */
.fileinput .form-control {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px;
    border-color: #cbd5e1 !important;
    border-radius: 6px 0 0 6px !important;
}

.fileinput .input-group-addon.btn {
    border-color: #cbd5e1 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
}

/* --- Position note/order section refinements --- */
.position_note_order_section .form-group label,
.position_note_section .form-group label {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    color: #475569 !important;
    font-size: 12.5px !important;
}

/* --- x-editable popover refinements --- */
.editable-popup .popover {
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
}

.editable-popup .editable-input input.form-control {
    font-family: 'Inter', sans-serif !important;
    border-radius: 6px !important;
    border-color: #cbd5e1 !important;
}

.editable-popup .editable-input input.form-control:focus {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12) !important;
}

.editable-buttons .editable-submit {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
    color: #fff !important;
    border-radius: 5px !important;
}

.editable-buttons .editable-cancel {
    border: 1px solid #cbd5e1 !important;
    background-color: #fff !important;
    color: #64748b !important;
    border-radius: 5px !important;
}

/* --- Input group button alignment with rounded inputs --- */
.input-group .form-control:first-child {
    border-radius: 6px 0 0 6px !important;
}

.input-group .input-group-btn:last-child > .btn {
    border-radius: 0 6px 6px 0 !important;
}

.input-group .input-group-btn:last-child > .btn + .btn {
    border-radius: 0 !important;
}

.input-group .input-group-btn:last-child > .btn:last-child {
    border-radius: 0 6px 6px 0 !important;
}

.input-group .input-group-addon:last-child {
    border-radius: 0 6px 6px 0 !important;
    border-color: #cbd5e1;
}

.input-group .input-group-addon:first-child {
    border-radius: 6px 0 0 6px !important;
    border-color: #cbd5e1;
}

/* ==========================================================================
   22. Vertical Tabs – Settings Page
   ========================================================================== */

.vtabs {
    display: flex !important;
    min-height: calc(100vh - 150px);
}

.vtabs.settingtabs {
    min-height: calc(100vh - 275px) !important;
}

.vtabs .tabs-vertical {
    width: 170px !important;
    min-width: 170px !important;
    border-bottom: 0 !important;
    border-right: 1px solid #e2e8f0 !important;
    display: block !important;
    padding-top: 4px;
}

.vtabs .tabs-vertical .nav-item {
    float: none !important;
}

.vtabs .tabs-vertical li .nav-link,
.vtabs.settingtabs > ul > li > a {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    color: #64748b !important;
    padding: 10px 16px 10px 0 !important;
    margin-bottom: 2px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.vtabs .tabs-vertical li .nav-link:hover,
.vtabs.settingtabs > ul > li > a:hover {
    color: #1e88e5 !important;
    background: transparent !important;
    border: none !important;
    border-right: 2px solid #1e88e5 !important;
    margin-right: -1px !important;
}

.vtabs .tabs-vertical li .nav-link.active,
.vtabs .tabs-vertical li.active .nav-link,
.vtabs .tabs-vertical li.active .nav-link:focus,
.vtabs.settingtabs > ul > li.active > a,
.customvtab .tabs-vertical li .nav-link.active,
.customvtab .tabs-vertical li .nav-link:focus {
    color: #1e88e5 !important;
    font-weight: 600 !important;
    background: transparent !important;
    border: none !important;
    border-right: 2px solid #1e88e5 !important;
    margin-right: -1px !important;
}

.vtabs .tab-content {
    display: block !important;
    flex: 1;
    padding: 4px 24px 20px 24px !important;
    vertical-align: top;
    border-width: 0 !important;
}

/* --- Report tabs: left-border accent --- */
.tabs-vertical-rpt .tabs-vertical li .nav-link {
    padding: 12px 16px !important;
    font-size: 14px !important;
    border-left: 3px solid transparent !important;
    border-right: none !important;
    margin-right: 0 !important;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tabs-vertical-rpt .tabs-vertical li .nav-link:hover {
    border-left: 3px solid #1e88e5 !important;
    border-right: none !important;
    margin-right: 0 !important;
}

.tabs-vertical-rpt .tabs-vertical li.active .nav-link,
.tabs-vertical-rpt .tabs-vertical li.active .nav-link:focus {
    border-left: 3px solid #1e88e5 !important;
    border-right: none !important;
    margin-right: 0 !important;
}

.vtabs.settingtabs .tab-content {
    border-width: 0 !important;
}

.vtabs.settingtabs .text-primary {
    color: #1e88e5 !important;
}

.vtabs.settingtabs h5 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #1e293b !important;
    margin: 0 0 8px 0 !important;
}

/* --- Settings tab – checkbox rows --- */
.vtabs.settingtabs .setting-checkbox-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.vtabs.settingtabs .setting-checkbox-row input[type="checkbox"] {
    margin: 0 10px 0 0;
    width: 16px;
    height: 16px;
    accent-color: #1e88e5;
    cursor: pointer;
}

.vtabs.settingtabs .setting-checkbox-row label {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13.5px;
    color: #334155;
    cursor: pointer;
}

/* --- Order Field Settings table checkboxes --- */
#tblOrderFieldSettings input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1e88e5;
    cursor: pointer;
    margin: 0;
    position: relative;
    vertical-align: middle;
}

#tblOrderFieldSettings input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#tblOrderFieldSettings td {
    vertical-align: middle;
}

/* --- Settings tab pane description --- */
.vtabs.settingtabs .tab-pane .setting-description {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* ==========================================================================
   24. Customer Order List (Customer Summary Modal)
   ========================================================================== */

.order-list-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.order-list-item:hover {
    background: #f5f7fa;
}

.order-list-item.active {
    background: #edf2ff;
    border-left: 3px solid #4680ff;
}

.order-list-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 8px;
    color: #4680ff;
    font-size: 13px;
}

.order-list-info {
    flex: 1;
    min-width: 0;
}

.order-list-code {
    font-size: 13px;
    font-weight: 600;
    color: #e53935;
}

.order-list-date {
    font-size: 11px;
    color: #8898aa;
    margin-top: 1px;
}

.order-list-amount {
    text-align: right;
    flex-shrink: 0;
}

.order-list-amount-value {
    font-size: 13px;
    font-weight: 600;
    color: #344050;
}

.order-list-repeat {
    font-size: 11px;
    color: #4680ff;
    margin-top: 2px;
    display: inline-block;
}

.order-list-repeat i {
    font-size: 10px;
}

/* ==========================================================================
   25. Order Detail Panel (Customer Summary Modal)
   ========================================================================== */

.order-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 2px solid #e9ecef;
    background: #f8f9fb;
}

.order-detail-title {
    font-size: 14px;
    font-weight: 600;
    color: #344050;
}

.order-detail-title .order-code {
    color: #e53935;
}

.order-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid #e9ecef;
}

.order-meta-cell {
    padding: 8px 12px;
    border-right: 1px solid #f0f0f0;
}

.order-meta-cell:last-child {
    border-right: none;
    text-align: right;
}

.order-meta-label {
    font-size: 11px;
    color: #8898aa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
}

.order-meta-value {
    font-size: 13px;
    font-weight: 600;
    color: #344050;
}

.order-items-section {
    padding: 8px 12px;
}

.order-items-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #4680ff;
    cursor: pointer;
    padding: 6px 0;
}

.order-items-toggle i {
    font-size: 14px;
}

.order-items-table {
    font-size: 13px;
}

.order-items-table thead tr {
    background: #f8f9fb;
}

.order-items-th {
    font-size: 11px;
    text-transform: uppercase;
    color: #8898aa;
    letter-spacing: 0.3px;
}

.order-item-name {
    font-weight: 500;
}

.order-item-desc {
    color: #8898aa;
}

.order-item-total-cell {
    font-weight: 600;
}

.order-totals-section {
    background: #f8f9fb;
    border-top: 1px solid #e9ecef;
    padding: 10px 16px;
}

.order-totals-row-gap {
    margin-bottom: 4px;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.order-total-row.grand-total {
    border-top: 2px solid #dee2e6;
    margin-top: 6px;
    padding-top: 6px;
}

.order-total-label {
    font-size: 13px;
    color: #6c757d;
}

.order-total-value {
    font-size: 13px;
    font-weight: 600;
    color: #344050;
}

.order-total-row.grand-total .order-total-label,
.order-total-row.grand-total .order-total-value {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.order-note-section {
    padding: 8px 16px;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #6c757d;
}

.order-note-section strong {
    color: #344050;
}

.order-location-info {
    font-size: 12px;
    color: #8898aa;
}

.order-location-address {
    font-weight: 500;
    color: #344050;
}

.order-delivery-status {
    font-size: 12px;
    color: #8898aa;
    margin-top: 4px;
}

.order-delivery-status-value {
    font-weight: 500;
    color: #344050;
}

.order-print-icon {
    font-size: 16px;
}

.order-detail-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-action-btn {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.order-action-btn i {
    font-size: 13px;
}

/* ==========================================================================
   26. Customer Summary Header (Customer Summary Modal)
   ========================================================================== */

.cust-summary-header {
    background: #f8f9fb;
    border-bottom: 2px solid #e9ecef;
    padding: 12px 16px;
}

.cust-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cust-header-info {
    flex: 1;
    min-width: 0;
}

/* --- Customer Stats Cards --- */
.cust-stats-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    min-width: 200px;
}

.cust-stats-cards {
    display: flex;
    gap: 6px;
}

.cust-stat-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 6px 8px;
    text-align: center;
}

.cust-stat-label {
    font-size: 10px;
    color: #8898aa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cust-stat-value {
    font-size: 16px;
    font-weight: 700;
    margin-top: 1px;
}

.cust-stat-value.text-blue {
    color: #4680ff;
}

.cust-stat-value.text-green {
    color: #2e7d32;
}

.cust-stat-last-visit {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 4px 8px;
    text-align: center;
}

.cust-stat-last-visit-label {
    font-size: 10px;
    color: #8898aa;
}

.cust-stat-last-visit-label i {
    margin-right: 2px;
}

.cust-stat-last-visit-value {
    font-size: 12px;
    font-weight: 600;
    color: #344050;
    margin-left: 3px;
}

/* --- Customer Default Address (inline) --- */
.cust-default-address {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 11px;
    color: #8898aa;
}

.cust-default-address i {
    color: #4680ff;
    flex-shrink: 0;
}

.cust-default-address-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
    color: #64748b;
}

.cust-view-all-addr {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #4680ff;
    cursor: pointer;
    margin-left: 4px;
    white-space: nowrap;
}

.cust-view-all-addr:hover {
    color: #2d5fd6;
    text-decoration: underline;
}

.cust-view-all-addr:focus {
    outline: none;
    text-decoration: underline;
}

.cust-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4680ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    flex-shrink: 0;
}

.cust-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1px;
}

.cust-contact-info {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.cust-contact-info span {
    color: #6c757d;
    font-size: 12px;
}

.cust-contact-info i {
    color: #4680ff;
    margin-right: 4px;
}

/* --- Address Cards --- */
.address-section {
    padding: 10px 16px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.address-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #8898aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.address-cards-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.address-card {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    min-width: 230px;
    max-width: 300px;
    flex-shrink: 0;
    background: #fafbfc;
    position: relative;
}

.address-card.primary-address {
    border-color: #4680ff;
    background: #f0f5ff;
}

.address-card-type {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    padding: 1px 6px;
    border-radius: 3px;
}

.address-card-type.residential {
    color: #2e7d32;
    background: #e8f5e9;
}

.address-card-type.business {
    color: #1565c0;
    background: #e3f2fd;
}

.address-card .addr-text {
    font-size: 12px;
    color: #344050;
    line-height: 1.3;
    margin-bottom: 3px;
}

.address-card .addr-detail {
    font-size: 11px;
    color: #8898aa;
    line-height: 1.3;
}

.address-card .addr-map-link {
    font-size: 11px;
    margin-top: 4px;
    display: inline-block;
}

.primary-badge {
    font-size: 10px;
    font-weight: 600;
    color: #4680ff;
    background: #dbe9ff;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
}

/* --- Order Content Area --- */
.order-content-area {
    display: flex;
    min-height: 350px;
}

.order-list-panel {
    width: 33.33%;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.order-list-panel-title {
    font-size: 11px;
    font-weight: 600;
    color: #8898aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px 6px;
    border-bottom: 1px solid #f0f0f0;
}

.order-detail-panel {
    width: 66.67%;
    display: flex;
    flex-direction: column;
}

.modal-body-scroll {
    height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
}

.records-scroll-bar {
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-body-no-pad {
    padding: 0;
}

.flex-1 {
    flex: 1;
}

/* ==========================================================================
   27. Order Summary Stats (Customer Summary Modal)
   ========================================================================== */

.order-summary-stats {
    padding: 10px 12px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fb;
}

.order-summary-stats-row {
    display: flex;
    gap: 8px;
}

.order-summary-stat-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 8px 10px;
    text-align: center;
}

.order-summary-stat-label {
    font-size: 11px;
    color: #8898aa;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.order-summary-stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
}

.order-summary-stat-value.text-blue {
    color: #4680ff;
}

.order-summary-stat-value.text-green {
    color: #2e7d32;
}

.order-summary-last-visit {
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 6px 10px;
    text-align: center;
}

.order-summary-last-visit-label {
    font-size: 11px;
    color: #8898aa;
}

.order-summary-last-visit-value {
    font-size: 13px;
    font-weight: 600;
    color: #344050;
    margin-left: 4px;
}

/* --- Utility classes --- */
.text-decoration-none {
    text-decoration: none;
}

/* ==========================================================================
   28. Login / Forgot Password Page
   ========================================================================== */

.login-register {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
}

.login-box {
    width: 860px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    border: none;
}

.login-box.card {
    border: none;
}

.login-body-bg {
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 30%, #e3f2fd 70%, #f5f7fa 100%);
    margin: 0;
    padding: 0;
}

/* --- Left Panel --- */
.login-left-panel {
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 420px;
}

.login-left-panel .card-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Carousel --- */
#carouselExampleSlidesOnly {
    width: 100%;
}

.carousel-text-slide {
    padding: 40px 24px;
    text-align: center;
}

.carousel-text-slide h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.carousel-text-slide p {
    color: #6c757d;
    font-size: 14px;
    min-height: 42px;
    margin-bottom: 0;
}

#carouselExampleSlidesOnly .carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

#carouselExampleSlidesOnly .carousel-indicators li {
    background-color: #b0bec5;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0 4px;
    border: none;
}

#carouselExampleSlidesOnly .carousel-indicators .active {
    background-color: #1e88e5;
}

/* --- Validation --- */
.validation-summary-errors ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.validation-summary-errors ul li {
    text-align: center;
    color: #e53935;
    font-size: 13px;
}

/* --- Card body / Form --- */
.login-box .card-body {
    padding: 30px 28px !important;
}

.login-box .form-control.form-control-material {
    font-weight: 400;
    font-size: 14px;
    height: 44px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    padding: 8px 14px 8px 42px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #f8f9fb;
}

.login-box .form-control.form-control-material:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
    background-color: #fff;
    outline: none;
}

.login-box .form-control.form-control-material::placeholder {
    color: #a0aec0;
}

/* --- Input Icons --- */
.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #8898aa;
    font-size: 16px;
    z-index: 2;
    pointer-events: none;
}

/* --- Password Toggle --- */
.pass-show {
    right: 12px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 16px;
    cursor: pointer;
    position: absolute;
    pointer-events: auto;
    z-index: 9;
    color: #8898aa;
    text-align: center;
}

.pass-show:hover {
    color: #1e88e5;
}

/* --- Login Button --- */
.btn-login {
    background: #1e88e5;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    height: 44px;
    border-radius: 6px;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    background: #1976d2;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
    color: #fff;
}

.btn-login:active,
.btn-login:focus {
    background: #1565c0;
    color: #fff;
    outline: none;
}

/* --- Remember / Forgot --- */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-options a {
    color: #1e88e5;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.login-options a:hover {
    color: #1565c0;
    text-decoration: underline;
}

.login-options label {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 0;
}

/* --- Sign In Heading --- */
.login-heading {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 12px;
    margin-bottom: 28px;
}

/* --- Forgot Password Page --- */
.login-forgot-img {
    max-width: 200px;
    opacity: 0.9;
}

.login-forgot-heading {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.login-forgot-text {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.login-back-link {
    color: #1e88e5;
    font-size: 13px;
    font-weight: 500;
    margin-top: 16px;
    display: inline-block;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .login-box {
        width: 95%;
        margin: 20px auto;
    }

    .login-left-panel {
        display: none;
    }
}

/* --- Order Filter Sidebar --- */
.order-filter-sidebar {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100%;
    background: #fff;
    z-index: 1050;
    box-shadow: -4px 0 16px rgba(0,0,0,0.06);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
}

.order-filter-sidebar.open {
    right: 0;
}

.order-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1040;
}

.order-filter-overlay.show {
    display: block;
}

.order-filter-sidebar .sidebar-header {
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.order-filter-sidebar .sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    flex: 1;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-header-icon {
    border: none;
    background: transparent;
    padding: 5px 7px;
    border-radius: 5px;
    cursor: pointer;
    color: #64748b;
    font-size: 15px;
    line-height: 1;
    transition: all 0.15s ease;
}

.btn-header-icon:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.btn-header-icon.btn-save-preset:hover {
    background: #eff6ff;
    color: #1e88e5;
}

.order-filter-sidebar .sidebar-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.sidebar-section {
    padding: 15px 20px;
}

.sidebar-section-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 0;
}

.order-filter-sidebar .sidebar-body .form-group {
    margin-bottom: 15px;
}

.order-filter-sidebar .sidebar-body .form-group:last-child {
    margin-bottom: 0;
}

.order-filter-sidebar .sidebar-body label {
    font-weight: 500;
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}

.order-filter-sidebar .sidebar-body .form-control {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    color: #334155;
    transition: border-color 0.2s ease;
}

.order-filter-sidebar .sidebar-body .form-control:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.saved-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    cursor: pointer;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    user-select: none;
    transition: background 0.15s ease;
}

.saved-filter-toggle:hover {
    background: #f1f5f9;
}

.saved-filter-toggle-label {
    font-weight: 500;
    font-size: 12.5px;
    color: #475569;
    letter-spacing: 0.02em;
}

.saved-filter-toggle-icon {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.saved-filter-section.expanded .saved-filter-toggle-icon {
    transform: rotate(180deg);
}

.saved-filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
}

.saved-filter-section.expanded .saved-filter-content {
    max-height: 300px;
    padding: 12px 20px 15px;
    border-bottom-color: #e2e8f0;
}

.saved-filter-content .form-group {
    margin-bottom: 10px;
}

.saved-filter-content .form-group:last-child {
    margin-bottom: 0;
}

.preset-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preset-row select {
    flex: 1;
}

.btn-preset-delete {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-preset-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.filter-default-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.filter-default-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1e88e5;
    cursor: pointer;
}

.filter-default-check label {
    font-weight: 400 !important;
    font-size: 13px !important;
    color: #475569 !important;
    cursor: pointer;
}

.order-filter-sidebar .sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.order-filter-sidebar .sidebar-footer .btn-filter-apply {
    background-color: #1e88e5;
    border-color: #1e88e5;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    border-radius: 6px;
    padding: 7px 18px;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    flex: 1;
}

.order-filter-sidebar .sidebar-footer .btn-filter-apply:hover {
    background-color: #1565c0;
    border-color: #1565c0;
}

.order-filter-sidebar .sidebar-footer .btn-filter-secondary {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
    border-radius: 6px;
    padding: 7px 14px;
    transition: all 0.2s ease;
}

.order-filter-sidebar .sidebar-footer .btn-filter-secondary:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    color: #1e293b;
}

.order-filter-sidebar .select2-container {
    width: 100% !important;
}

.order-filter-sidebar .select2-container--default .select2-selection--single,
.order-filter-sidebar .select2-container--default .select2-selection--multiple {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    min-height: 34px;
    transition: border-color 0.2s ease;
}

.order-filter-sidebar .select2-container--default.select2-container--focus .select2-selection--single,
.order-filter-sidebar .select2-container--default.select2-container--focus .select2-selection--multiple,
.order-filter-sidebar .select2-container--default.select2-container--open .select2-selection--single,
.order-filter-sidebar .select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.order-filter-sidebar .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 4px !important;
    color: #1e40af;
    font-size: 12px;
    padding: 2px 6px;
}

.order-filter-sidebar .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #1e88e5 !important;
    margin-right: 4px;
}

.order-filter-sidebar .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc2626 !important;
}


/* ==========================================================================
   29. Enterprise Refinement Pass
   Visual-only polish layered on the sections above. Grouped by control family
   so every screen inherits the same language.
   ========================================================================== */

/* --------------------------------------------------------------------------
   29.1 Canvas & surfaces
   -------------------------------------------------------------------------- */

body,
.wrapper > section,
.layout-h .wrapper > section#MainContent {
    background-color: var(--ent-canvas) !important;
}

body {
    color: var(--ent-text);
    letter-spacing: 0;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ent-border-interactive);
}

::selection {
    background: var(--ent-brand-100);
    color: var(--ent-brand-700);
}

/* --------------------------------------------------------------------------
   29.2 Typography hierarchy
   Level 1 page title -> level 2 section heading -> level 3 label -> body -> meta
   -------------------------------------------------------------------------- */

.tableheadwrap .title h4 {
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--ent-text-strong) !important;
}

.card .card-header h4,
.card-header h4.m-b-0.m-t-7,
.ordercard-header h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    letter-spacing: 0 !important;
    text-transform: none;
    color: var(--ent-text-strong) !important;
}

.modal-header .modal-title,
.modal-header h4 {
    font-size: 15px !important;
    line-height: 1.35;
    letter-spacing: -0.005em;
}

.form-group label,
form label,
.control-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--ent-text-muted) !important;
    letter-spacing: 0.01em;
    line-height: 1.4;
    margin-bottom: 6px;
}

.text-muted,
.help-block,
small {
    color: var(--ent-text-faint) !important;
}

.help-block,
small {
    font-size: 11.5px;
    line-height: 1.5;
}

.text-primary {
    color: var(--ent-brand-600) !important;
}

/* Tabular figures keep numeric columns optically aligned */
.table > tbody > tr > td,
.Total-AmoutText,
.dataTables_wrapper .dataTables_info {
    font-variant-numeric: tabular-nums;
    -moz-font-feature-settings: "tnum";
    -webkit-font-feature-settings: "tnum";
    font-feature-settings: "tnum";
}

/* --------------------------------------------------------------------------
   29.3 Icons — one optical size and baseline across the four icon fonts in use
   -------------------------------------------------------------------------- */

.btn > i,
.btn > em,
.btn > span.btn-label > i,
.filter-label-btn > i,
.dropdown-menu > li > a > i,
.dropdown-menu > li > a > em {
    font-size: 13px;
    line-height: 1;
    vertical-align: middle;
    text-align: center;
}

/* simple-line-icons render optically smaller than FontAwesome at equal size */
.btn > i[class^="icon-"],
.btn > em[class^="icon-"],
.filter-label-btn > i[class^="icon-"],
.dropdown-menu > li > a > i[class^="icon-"],
.dropdown-menu > li > a > em[class^="icon-"] {
    font-size: 14px;
}

/* themify icons render optically larger */
.btn > i[class^="ti-"],
.filter-label-btn > i[class^="ti-"],
.dropdown-menu > li > a > i[class^="ti-"] {
    font-size: 12px;
}

.dropdown-menu > li > a > i,
.dropdown-menu > li > a > em {
    display: inline-block;
    min-width: 14px;
    opacity: 0.75;
}

.dropdown-menu > li > a:hover > i,
.dropdown-menu > li > a:hover > em {
    opacity: 1;
}

.table > tbody > tr > td > a > i,
.table > tbody > tr > td > a > em,
#contextMenu > li > a > i {
    font-size: 13px;
    line-height: 1;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   29.4 Buttons — one sizing ramp, one hierarchy, one interaction model
   -------------------------------------------------------------------------- */

.btn {
    min-height: var(--ent-control-height);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0;
    border-radius: var(--ent-radius-md) !important;
    transition: background-color var(--ent-duration) var(--ent-ease),
                border-color var(--ent-duration) var(--ent-ease),
                color var(--ent-duration) var(--ent-ease),
                box-shadow var(--ent-duration) var(--ent-ease);
}

.btn-sm,
.btn-group-sm > .btn {
    min-height: var(--ent-control-height-sm);
    padding: 4px 12px;
    font-size: 12.5px;
    line-height: 20px;
}

.btn-xs,
.btn-group-xs > .btn {
    min-height: var(--ent-control-height-xs);
    padding: 2px 9px;
    font-size: 11.5px;
    line-height: 20px;
}

.btn-lg,
.btn-group-lg > .btn {
    min-height: 42px;
    padding: 10px 20px;
    font-size: 14.5px;
    border-radius: var(--ent-radius-lg) !important;
}

/* Icon-only buttons stay square rather than drifting into pills */
.btn.btn-icon,
.btn.toggle-more,
.btn-group > .toggle-more {
    min-width: var(--ent-control-height);
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

/* Primary — the single dominant action, confident but not heavy */
.btn-primary,
.btn-primary.disabled {
    background: var(--ent-brand-500) !important;
    border-color: var(--ent-brand-500) !important;
    box-shadow: var(--ent-shadow-xs) !important;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary.disabled:hover {
    background: var(--ent-brand-600) !important;
    border-color: var(--ent-brand-600) !important;
}

.btn-primary:focus,
.btn-primary.active,
.btn-primary.disabled:focus,
.btn-primary.disabled.active {
    background: var(--ent-brand-700) !important;
    border-color: var(--ent-brand-700) !important;
}

/* Default / secondary — the quiet workhorse */
.btn-default,
.btn.btn-default {
    background-color: var(--ent-surface) !important;
    border-color: var(--ent-border-strong) !important;
    color: var(--ent-neutral-text) !important;
    box-shadow: var(--ent-shadow-xs) !important;
}

.btn-default:hover,
.btn.btn-default:hover {
    background-color: var(--ent-surface-sunken) !important;
    border-color: var(--ent-border-interactive) !important;
    color: var(--ent-text-strong) !important;
}

.btn-default:focus,
.btn-default.active {
    background-color: var(--ent-surface-raised) !important;
    border-color: var(--ent-border-interactive) !important;
}

.btn-secondary,
.btn-secondary.disabled {
    background-color: var(--ent-text-muted) !important;
    border-color: var(--ent-text-muted) !important;
    box-shadow: var(--ent-shadow-xs) !important;
}

/* Pill-shaped buttons keep their shape through the radius standardisation */
.btn-oval,
.btn-pill-left,
.btn-pill-right,
.btn-rounded {
    border-radius: var(--ent-radius-pill) !important;
}

.btn-pill-left {
    border-top-right-radius: var(--ent-radius-md) !important;
    border-bottom-right-radius: var(--ent-radius-md) !important;
}

.btn-pill-right {
    border-top-left-radius: var(--ent-radius-md) !important;
    border-bottom-left-radius: var(--ent-radius-md) !important;
}

/* Link / ghost utility buttons */
.btn-link {
    min-height: auto;
    padding: 0 2px;
    color: var(--ent-brand-600) !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.btn-link:hover {
    color: var(--ent-brand-700) !important;
    text-decoration: underline;
}

/* Grouped buttons share one seam instead of stacking two borders */
.btn-group > .btn + .btn {
    margin-left: -1px;
}

.btn-group > .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

.btn-group > .btn:first-child:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.btn-group > .btn:last-child:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.btn-group > .btn:hover,
.btn-group > .btn:focus,
.btn-group > .btn.active {
    z-index: 2;
}

/* Disabled reads as unavailable, never as an error */
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
    opacity: 0.55;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* Keyboard focus is visible on every button family */
.btn:focus,
.btn.focus {
    outline: none;
    box-shadow: var(--ent-focus-ring) !important;
}

.btn-danger:focus,
.btn-danger.focus {
    box-shadow: var(--ent-focus-ring-danger) !important;
}

/* Toolbar CTA row: only "New" carries the filled treatment */
.tableheadwrap .newdivwrap .btn {
    min-height: var(--ent-control-height);
    padding: 7px 14px !important;
    font-size: 13px !important;
    border-radius: var(--ent-radius-md) !important;
    box-shadow: var(--ent-shadow-xs) !important;
}

.tableheadwrap .newdivwrap #btnOrderHistory.btn,
.tableheadwrap .newdivwrap #btnViewDrafts.btn {
    background-color: var(--ent-surface) !important;
    border-color: var(--ent-border-strong) !important;
    color: var(--ent-neutral-text) !important;
}

.tableheadwrap .newdivwrap #btnOrderHistory.btn:hover,
.tableheadwrap .newdivwrap #btnViewDrafts.btn:hover {
    background-color: var(--ent-surface-sunken) !important;
    border-color: var(--ent-border-interactive) !important;
    color: var(--ent-text-strong) !important;
}

.tableheadwrap .newdivwrap .btn-group .toggle-more {
    min-height: var(--ent-control-height);
    min-width: var(--ent-control-height);
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
}

/* Setup-screen CTA matches the Orders toolbar exactly */
.card-header .pull-right .btn-danger.btn-flat,
.card-header .pull-right a.btn.btn-danger.btn-flat.newbutton {
    min-height: var(--ent-control-height);
    box-shadow: var(--ent-shadow-xs) !important;
}

.card-header .pull-right .btn-secondary.btn-flat.toggle-more,
.card-header .pull-right .btn-group .toggle-more {
    min-height: var(--ent-control-height);
    min-width: var(--ent-control-height);
    border-color: var(--ent-border-strong) !important;
}

/* Utility "filter" chips in the Orders toolbar align to the control ramp */
.tableheadwrap .filter-label-btn {
    min-height: var(--ent-control-height);
    padding: 6px 12px;
    font-size: 12.5px;
    border-color: var(--ent-border-strong);
    border-radius: var(--ent-radius-md);
    color: var(--ent-neutral-text);
    box-shadow: var(--ent-shadow-xs);
    transition: background-color var(--ent-duration) var(--ent-ease),
                border-color var(--ent-duration) var(--ent-ease),
                color var(--ent-duration) var(--ent-ease);
}

.tableheadwrap .filter-label-btn:hover {
    background: var(--ent-surface-sunken);
    border-color: var(--ent-border-interactive);
    color: var(--ent-text-strong);
}

.tableheadwrap .filter-label-btn:focus {
    outline: none;
    box-shadow: var(--ent-focus-ring);
}

.tableheadwrap .filter-label-btn .active-filter-name {
    color: var(--ent-brand-600);
}

/* --------------------------------------------------------------------------
   29.5 Form controls — one height, one border, one focus ring
   -------------------------------------------------------------------------- */

.form-control:not(textarea):not([multiple]) {
    height: var(--ent-control-height);
    padding: 6px var(--ent-control-padding-x);
}

.form-control {
    font-size: 13px;
    line-height: 20px;
    color: var(--ent-text) !important;
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
    box-shadow: none;
    transition: border-color var(--ent-duration) var(--ent-ease),
                box-shadow var(--ent-duration) var(--ent-ease),
                background-color var(--ent-duration) var(--ent-ease);
}

textarea.form-control {
    padding: 8px var(--ent-control-padding-x);
    min-height: 72px;
    resize: vertical;
}

.form-control:hover:not(:focus):not([disabled]):not([readonly]) {
    border-color: var(--ent-border-interactive) !important;
}

.form-control:focus {
    border-color: var(--ent-brand-500) !important;
    box-shadow: var(--ent-focus-ring) !important;
}

.form-control::-webkit-input-placeholder { color: var(--ent-text-faint); }
.form-control::-moz-placeholder { color: var(--ent-text-faint); opacity: 1; }
.form-control:-ms-input-placeholder { color: var(--ent-text-faint); }
.form-control::placeholder { color: var(--ent-text-faint); }

.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
    background-color: var(--ent-surface-sunken) !important;
    border-color: var(--ent-border) !important;
    color: var(--ent-text-muted) !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

.form-control[readonly] {
    cursor: default;
}

.form-control.input-sm,
.input-group-sm > .form-control {
    height: var(--ent-control-height-sm);
    padding: 4px 10px;
    font-size: 12.5px;
    border-radius: var(--ent-radius-md) !important;
}

.form-control.input-lg,
.input-group-lg > .form-control {
    height: 42px;
    font-size: 14.5px;
    border-radius: var(--ent-radius-lg) !important;
}

select.form-control:not([multiple]) {
    height: var(--ent-control-height);
    padding: 6px 10px;
}

/* Input group seams: addons and buttons sit flush at control height */
.input-group-addon {
    min-height: var(--ent-control-height);
    padding: 6px 10px;
    font-size: 12.5px;
    color: var(--ent-text-muted);
    background-color: var(--ent-surface-sunken);
    border-color: var(--ent-border-strong);
    border-radius: var(--ent-radius-md);
}

.input-group-btn > .btn {
    min-height: var(--ent-control-height);
}

.input-group .form-control:not(:first-child),
.input-group-addon:not(:first-child),
.input-group-btn:not(:first-child) > .btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group .form-control:not(:last-child),
.input-group-addon:not(:last-child),
.input-group-btn:not(:last-child) > .btn {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Select2 single — visually indistinguishable from a text input */
.select2-container--default .select2-selection--single {
    height: var(--ent-control-height);
    min-height: var(--ent-control-height);
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
    transition: border-color var(--ent-duration) var(--ent-ease),
                box-shadow var(--ent-duration) var(--ent-ease);
}

.select2-container--default .select2-selection--single:hover {
    border-color: var(--ent-border-interactive) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 13px;
    line-height: 32px;
    color: var(--ent-text);
    padding-left: var(--ent-control-padding-x);
    padding-right: 26px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--ent-text-faint);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-top-color: var(--ent-text-muted);
}

.select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: var(--ent-surface-sunken) !important;
    border-color: var(--ent-border) !important;
    cursor: not-allowed;
}

.select2-container--default .select2-selection--multiple {
    min-height: var(--ent-control-height);
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--ent-brand-50) !important;
    border-color: var(--ent-brand-200) !important;
    border-radius: var(--ent-radius-sm) !important;
    color: #1e40af;
    font-size: 12px;
    padding: 2px 7px;
}

.select2-dropdown {
    border-color: var(--ent-border) !important;
    border-radius: var(--ent-radius-lg) !important;
    box-shadow: var(--ent-shadow-lg) !important;
}

.select2-container--default .select2-results__option {
    font-size: 13px;
    padding: 7px 12px;
    color: var(--ent-text);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    font-size: 13px;
    padding: 6px 10px;
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md);
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--ent-brand-500) !important;
    box-shadow: var(--ent-focus-ring);
    outline: none;
}

/* Filter wrappers keep their seamless inline look at the shared height */
.selectlocationordetypewrap,
.selectchannelcompanywrap,
.orderdatewrap {
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
    box-shadow: var(--ent-shadow-xs);
}

.selectlocationordetypewrap:hover,
.selectchannelcompanywrap:hover,
.orderdatewrap:hover {
    border-color: var(--ent-border-interactive) !important;
}

.selectlocationordetypewrap > div .select2-selection--single,
.selectchannelcompanywrap > div .select2-selection--single {
    height: auto;
    min-height: 0;
    box-shadow: none !important;
}

.ordersearchwrap .magnifier {
    width: var(--ent-control-height) !important;
    height: var(--ent-control-height) !important;
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
}

/* Checkboxes and radios pick up the brand accent and the shared focus ring */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--ent-brand-500);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--ent-brand-500);
    outline-offset: 2px;
}

/* Validation — jQuery Validate and MVC unobtrusive share one treatment */
.form-control.error,
.form-control.input-validation-error,
.has-error .form-control {
    border-color: var(--ent-danger) !important;
    background-color: #fffbfb;
}

.form-control.error:focus,
.form-control.input-validation-error:focus,
.has-error .form-control:focus {
    border-color: var(--ent-danger) !important;
    box-shadow: var(--ent-focus-ring-danger) !important;
}

label > span.error,
label.error,
.field-validation-error,
.has-error .control-label,
.has-error .help-block {
    color: var(--ent-danger-text) !important;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0;
}

label > span.error {
    margin-left: 6px;
}

.has-success .form-control {
    border-color: var(--ent-success) !important;
}

/* Date and time pickers inherit the popover language */
.datepicker,
.daterangepicker,
.bootstrap-datetimepicker-widget.dropdown-menu,
.xdsoft_datetimepicker {
    border-color: var(--ent-border) !important;
    border-radius: var(--ent-radius-lg) !important;
    box-shadow: var(--ent-shadow-lg) !important;
    font-size: 13px;
}

.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td span.active,
.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: var(--ent-brand-500) !important;
    background-image: none !important;
    border-color: var(--ent-brand-500) !important;
    text-shadow: none !important;
}

.datepicker table tr td.day:hover,
.datepicker table tr td.focused,
.daterangepicker td.available:hover {
    background-color: var(--ent-brand-50) !important;
    color: var(--ent-brand-700);
}

.datepicker table tr td.today,
.daterangepicker td.today {
    background-color: var(--ent-brand-50) !important;
    background-image: none !important;
    color: var(--ent-brand-700) !important;
    font-weight: 600;
}

.daterangepicker .ranges li.active,
.daterangepicker .ranges li:hover {
    background-color: var(--ent-brand-50);
    color: var(--ent-brand-700);
    border-radius: var(--ent-radius-sm);
}

/* --------------------------------------------------------------------------
   29.6 Data grids — operational density kept, structure made legible
   -------------------------------------------------------------------------- */

.table > thead {
    background-color: var(--ent-surface-sunken);
}

.table > thead > tr > th,
.countertablecols .dataTables_wrapper table.table thead > tr > th,
thead.thead-custom tr > th {
    padding: 9px 14px;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ent-text-muted) !important;
    background-color: var(--ent-surface-sunken) !important;
    border-bottom: 1px solid var(--ent-border) !important;
    vertical-align: middle !important;
}

.table > tbody > tr > td,
.countertablecols .dataTables_wrapper table.table td {
    padding: 9px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ent-text);
    border-top-color: var(--ent-border-subtle) !important;
    vertical-align: middle;
}

.table > tbody > tr:first-child > td {
    border-top-color: transparent !important;
}

/* Vertical rules on bordered grids stay quieter than the horizontal rhythm */
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border-color: var(--ent-border-subtle) !important;
}

.table-bordered > thead > tr > th {
    border-color: var(--ent-border) !important;
}

/* Row states: hover, keyboard focus and DataTables selection all read alike */
.table > tbody > tr:hover,
.table-striped > tbody > tr:nth-of-type(odd):hover {
    background-color: var(--ent-brand-50) !important;
}

.table > tbody > tr.selected,
.table > tbody > tr.selected:hover,
.table > tbody > tr.active,
.table > tbody > tr.row_selected {
    background-color: var(--ent-brand-100) !important;
    box-shadow: inset 3px 0 0 0 var(--ent-brand-500);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #fbfcfe;
}

/* Sort affordance: dormant until the column is actually sorted */
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    right: 6px;
    font-size: 0.75em;
    opacity: 1;
}

table.dataTable thead th.sorting:after {
    color: var(--ent-border-strong);
}

table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    color: var(--ent-brand-500);
}

table.dataTable thead th.sorting:hover:after {
    color: var(--ent-text-muted);
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    padding-right: 22px !important;
    cursor: pointer;
    transition: color var(--ent-duration) var(--ent-ease);
}

table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    color: var(--ent-text-strong) !important;
}

/* Grid chrome: length / search row and the footer info row */
.countertablecols .dataTables_wrapper .row:nth-child(2) {
    background: var(--ent-surface-sunken) !important;
    border-color: var(--ent-border-subtle);
    border-radius: var(--ent-radius-md) !important;
    padding: 7px 12px !important;
}

.dataTables_wrapper .dataTables_filter input,
.countertablecols .dataTables_wrapper .row:nth-child(2) .dataTables_filter input {
    height: var(--ent-control-height-sm);
    min-width: 200px;
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
    font-size: 12.5px !important;
}

.dataTables_wrapper .dataTables_length select,
.countertablecols .dataTables_wrapper .row:nth-child(2) .dataTables_length select {
    height: var(--ent-control-height-sm);
    border-color: var(--ent-border-strong) !important;
    border-radius: var(--ent-radius-md) !important;
    font-size: 12.5px !important;
}

.dataTables_wrapper .dataTables_info,
.countertablecols .row:last-child div[id$="_info"] {
    font-size: 12px !important;
    color: var(--ent-text-muted) !important;
}

.dataTables_empty {
    padding: 36px 14px !important;
    text-align: center !important;
    color: var(--ent-text-faint) !important;
    font-size: 13px;
}

/* Pagination: a compact, evenly weighted control row */
.dataTables_wrapper .dataTables_paginate {
    padding-top: 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_paginate li > a {
    min-width: var(--ent-control-height-sm);
    margin: 0 2px;
    font-size: 12.5px !important;
    font-weight: 500;
    color: var(--ent-text-muted) !important;
    border-color: var(--ent-border) !important;
    border-radius: var(--ent-radius-md) !important;
    transition: background-color var(--ent-duration) var(--ent-ease),
                border-color var(--ent-duration) var(--ent-ease),
                color var(--ent-duration) var(--ent-ease);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate li:not(.active):not(.disabled) > a:hover {
    background: var(--ent-brand-50) !important;
    border-color: var(--ent-brand-200) !important;
    color: var(--ent-brand-700) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate li.active > a,
.dataTables_wrapper .dataTables_paginate li.active > a:hover {
    background: var(--ent-brand-500) !important;
    border-color: var(--ent-brand-500) !important;
    color: #fff !important;
    box-shadow: var(--ent-shadow-xs);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate li.disabled > a,
.dataTables_wrapper .dataTables_paginate li.disabled > a:hover {
    background: transparent !important;
    border-color: var(--ent-border-subtle) !important;
    color: var(--ent-text-faint) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --------------------------------------------------------------------------
   29.7 Tabs and status controls
   -------------------------------------------------------------------------- */

.nav-tabs {
    border-bottom-color: var(--ent-border);
}

.nav-tabs > li > a {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ent-text-muted);
    background-color: transparent;
    border-color: transparent;
    border-radius: var(--ent-radius-md) var(--ent-radius-md) 0 0;
}

.nav-tabs > li > a:hover {
    background-color: var(--ent-surface-raised);
    border-color: transparent;
    color: var(--ent-text-strong);
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
    background-color: var(--ent-surface);
    border-color: var(--ent-border) var(--ent-border) var(--ent-surface);
    color: var(--ent-brand-600) !important;
    font-weight: 600;
}

.nav-pills > li > a {
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--ent-radius-md);
    color: var(--ent-text-muted);
}

.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
    background-color: var(--ent-brand-500);
}

/* Orders status rail */
.orderstatusheaderwrap {
    border-color: var(--ent-border) !important;
    border-radius: var(--ent-radius-lg) !important;
    box-shadow: var(--ent-shadow-xs);
}

.orderstatusheaderwrap a {
    padding: 8px 13px !important;
    font-size: 12.5px !important;
    border-radius: var(--ent-radius-md) !important;
}

.orderstatusheaderwrap a:focus {
    outline: none;
    box-shadow: var(--ent-focus-ring);
}

.orderstatusheaderwrap a.active {
    background-color: var(--ent-brand-50) !important;
    color: var(--ent-brand-700) !important;
    box-shadow: inset 0 0 0 1px var(--ent-brand-200);
}

.orderstatusheaderwrap a.active span {
    color: var(--ent-brand-700) !important;
}

/* Active / Inactive segmented toggles */
.btn-so.btn-default,
.card-header .btn-so.btn-default {
    min-height: var(--ent-control-height);
    padding: 6px 14px !important;
    font-size: 12.5px !important;
    color: var(--ent-text-muted) !important;
    border-color: var(--ent-border-strong) !important;
    box-shadow: none !important;
}

.btn-so.btn-default:hover,
.card-header .btn-so.btn-default:hover {
    background-color: var(--ent-brand-50) !important;
    border-color: var(--ent-brand-300) !important;
    color: var(--ent-brand-700) !important;
}

.btn-so.btn-default.active,
.btn-so.btn-default.active:hover,
.card-header .btn-so.btn-default.active,
.card-header .btn-so.btn-default.active:hover {
    background-color: var(--ent-brand-500) !important;
    border-color: var(--ent-brand-500) !important;
    color: #ffffff !important;
    box-shadow: var(--ent-shadow-xs) !important;
}

/* Table / Kanban view switch */
.btn-toggle-custom-parent {
    background-color: var(--ent-surface-raised) !important;
    border-radius: var(--ent-radius-pill) !important;
}

.btn-toggle-custom.active {
    box-shadow: var(--ent-shadow-xs);
}

/* --------------------------------------------------------------------------
   29.8 Status pills — one tinted system replacing the ad-hoc pastels
   -------------------------------------------------------------------------- */

.orderstatus-label {
    display: inline-block;
    padding: 3px 9px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.01em !important;
    border-radius: var(--ent-radius-pill) !important;
    white-space: nowrap;
}

.orderstatus-insuranceapprovalpending,
.orderstatus-hubapprovalpending {
    background-color: var(--ent-warning-soft) !important;
    color: var(--ent-warning-text) !important;
    box-shadow: inset 0 0 0 1px #fde68a;
}

.orderstatus-neworder {
    background-color: #eef2ff !important;
    color: #4338ca !important;
    box-shadow: inset 0 0 0 1px #c7d2fe;
}

.orderstatus-underprocess,
.orderstatus-pickupinprogress {
    background-color: #fff7ed !important;
    color: #c2410c !important;
    box-shadow: inset 0 0 0 1px #fed7aa;
}

.orderstatus-readyfordispatch {
    background-color: #f0fdfa !important;
    color: #0f766e !important;
    box-shadow: inset 0 0 0 1px #99f6e4;
}

.orderstatus-riderassigned,
.orderstatus-deliveryinprogress {
    background-color: var(--ent-brand-50) !important;
    color: var(--ent-brand-700) !important;
    box-shadow: inset 0 0 0 1px var(--ent-brand-200);
}

.orderstatus-deliveryonhold {
    background-color: #fefce8 !important;
    color: #a16207 !important;
    box-shadow: inset 0 0 0 1px #fef08a;
}

.orderstatus-deliverycompleted {
    background-color: var(--ent-success-soft) !important;
    color: var(--ent-success-text) !important;
    box-shadow: inset 0 0 0 1px #bbf7d0;
}

.orderstatus-deliveryfailed {
    background-color: var(--ent-danger-soft) !important;
    color: var(--ent-danger-text) !important;
    box-shadow: inset 0 0 0 1px #fecaca;
}

.orderstatus-deliverycancelled,
.orderstatus-ordercancelled,
.orderstatus-none {
    background-color: var(--ent-neutral-soft) !important;
    color: var(--ent-neutral-text) !important;
    box-shadow: inset 0 0 0 1px var(--ent-border);
}

/* Labels and badges follow the same pill geometry */
.label,
.badge {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    border-radius: var(--ent-radius-pill);
}

/* --------------------------------------------------------------------------
   29.9 Cards and sections — one container language across every screen
   -------------------------------------------------------------------------- */

.card,
.ordercard,
.panel {
    background-color: var(--ent-surface) !important;
    border: 1px solid var(--ent-border) !important;
    border-radius: var(--ent-radius-lg) !important;
    box-shadow: var(--ent-shadow-sm) !important;
}

.card .card-header,
.ordercard-header,
.panel > .panel-heading {
    padding: 13px 18px !important;
    background-color: var(--ent-surface) !important;
    border-bottom: 1px solid var(--ent-border) !important;
}

.card .card-header:first-child,
.panel > .panel-heading:first-child {
    border-radius: var(--ent-radius-lg) var(--ent-radius-lg) 0 0 !important;
}

.card .card-body,
.ordercard-body {
    padding: 18px !important;
}

.ordercard-body.p-t-10 {
    padding-top: 10px !important;
}

.card .card-footer,
.panel > .panel-footer {
    padding: 13px 18px !important;
    background-color: var(--ent-surface-sunken) !important;
    border-top: 1px solid var(--ent-border) !important;
}

.card .card-footer:last-child {
    border-radius: 0 0 var(--ent-radius-lg) var(--ent-radius-lg) !important;
}

/* Import / secondary bars read as a nested strip, not a second header */
.card-header#importDiv,
.ordercard-header#importDiv {
    background-color: var(--ent-surface-sunken) !important;
    border-radius: 0 !important;
}

.card-footer.footer-fixed {
    box-shadow: 0 -2px 12px rgba(16, 24, 40, 0.07) !important;
}

/* Summary chips */
.Total-AmoutDiv {
    padding: 6px 12px;
    background-color: var(--ent-brand-50) !important;
    border-color: var(--ent-brand-100) !important;
    border-radius: var(--ent-radius-md) !important;
    font-size: 12.5px;
    color: var(--ent-neutral-text);
}

.Total-AmoutText {
    font-weight: 600;
    color: var(--ent-text-strong);
}

.order-status-pending {
    font-size: 12.5px;
    color: var(--ent-neutral-text);
}

/* Overlays share one elevation ramp */
.modal-content {
    border-radius: var(--ent-radius-xl) !important;
    border-color: var(--ent-border) !important;
    box-shadow: var(--ent-shadow-xl) !important;
}

.modal-header,
.modal-footer {
    background-color: var(--ent-surface) !important;
    border-color: var(--ent-border) !important;
}

.modal-footer {
    background-color: var(--ent-surface-sunken) !important;
}

.dropdown-menu,
.popover,
#contextMenu,
.dropdown-menu.contextMenu {
    border-color: var(--ent-border) !important;
    border-radius: var(--ent-radius-lg) !important;
    box-shadow: var(--ent-shadow-lg) !important;
}

.dropdown-menu > li > a {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ent-neutral-text);
    border-radius: var(--ent-radius-md);
    transition: background-color var(--ent-duration) var(--ent-ease),
                color var(--ent-duration) var(--ent-ease);
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: var(--ent-brand-50);
    color: var(--ent-brand-700);
}

.dropdown-menu > .divider {
    margin: 4px 8px;
    background-color: var(--ent-border-subtle);
}

.alert {
    padding: 12px 16px;
    font-size: 13px;
    border-radius: var(--ent-radius-lg);
}

.alert-success { background-color: var(--ent-success-soft); color: var(--ent-success-text); }
.alert-danger  { background-color: var(--ent-danger-soft);  color: var(--ent-danger-text); }
.alert-warning { background-color: var(--ent-warning-soft); color: var(--ent-warning-text); }
.alert-info    { background-color: var(--ent-info-soft);    color: var(--ent-info-text); }

hr {
    margin: var(--ent-space-lg) 0;
    border-top-color: var(--ent-border-subtle);
}

/* --------------------------------------------------------------------------
   29.10 Spacing rhythm — tighten the loose seams, breathe where it is crowded
   -------------------------------------------------------------------------- */

.tableheadwrap {
    gap: var(--ent-space-sm);
    margin-bottom: var(--ent-space-md);
}

.tableheadwrap .newdivwrap {
    gap: var(--ent-space-sm);
}

.card-header .pull-right > .btn-group[data-toggle="buttons"] {
    margin-right: var(--ent-space-sm) !important;
}

.form-group {
    margin-bottom: var(--ent-space-lg);
}

.form-group.m-b-0 {
    margin-bottom: 0;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

footer {
    font-size: 12px;
    color: var(--ent-text-faint);
}

/* --------------------------------------------------------------------------
   29.11 Interactive states — consistent focus, hover and busy feedback
   -------------------------------------------------------------------------- */

a:focus,
button:focus {
    outline: none;
}

a.btn:focus-visible,
button:focus-visible,
.nav-tabs > li > a:focus-visible,
.dataTables_wrapper .dataTables_paginate a:focus-visible {
    outline: none;
    box-shadow: var(--ent-focus-ring);
    border-radius: var(--ent-radius-md);
}

.form-control:focus-visible,
.select2-selection:focus-visible {
    outline: none;
}

[disabled],
.disabled {
    cursor: not-allowed;
}

/* Busy surfaces dim rather than flash */
.whirl:before {
    background-color: rgba(255, 255, 255, 0.72);
}

.whirl.traditional:after {
    border-color: var(--ent-border) var(--ent-border) var(--ent-border) var(--ent-brand-500);
}

div.dataTables_wrapper div.dataTables_processing {
    color: var(--ent-text-muted);
    font-size: 12.5px;
}

.tooltip-inner {
    padding: 6px 10px;
    font-size: 11.5px;
    background-color: var(--ent-text-strong);
    border-radius: var(--ent-radius-md);
}

.tooltip.top .tooltip-arrow { border-top-color: var(--ent-text-strong); }
.tooltip.bottom .tooltip-arrow { border-bottom-color: var(--ent-text-strong); }
.tooltip.left .tooltip-arrow { border-left-color: var(--ent-text-strong); }
.tooltip.right .tooltip-arrow { border-right-color: var(--ent-text-strong); }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* Semantic labels and badges share the tinted pill language of status cells
   so a state reads the same wherever it appears */
.label-success, .badge-success {
    background-color: var(--ent-success-soft) !important;
    color: var(--ent-success-text) !important;
    box-shadow: inset 0 0 0 1px #bbf7d0;
}

.label-danger, .badge-danger {
    background-color: var(--ent-danger-soft) !important;
    color: var(--ent-danger-text) !important;
    box-shadow: inset 0 0 0 1px #fecaca;
}

.label-warning, .badge-warning {
    background-color: var(--ent-warning-soft) !important;
    color: var(--ent-warning-text) !important;
    box-shadow: inset 0 0 0 1px #fde68a;
}

.label-info, .badge-info {
    background-color: var(--ent-info-soft) !important;
    color: var(--ent-info-text) !important;
    box-shadow: inset 0 0 0 1px #bae6fd;
}

.label-primary, .badge-primary {
    background-color: var(--ent-brand-50) !important;
    color: var(--ent-brand-700) !important;
    box-shadow: inset 0 0 0 1px var(--ent-brand-200);
}

.label-default, .badge-default {
    background-color: var(--ent-neutral-soft) !important;
    color: var(--ent-neutral-text) !important;
    box-shadow: inset 0 0 0 1px var(--ent-border);
}

/* The login CTA keeps the larger scale its own layout is built around */
.btn.btn-login {
    height: 44px;
    padding: 10px 16px;
    font-size: 14px;
}

/* Circular icon buttons survive the radius standardisation */
.btn-circle,
.btn-circle-sm {
    border-radius: var(--ent-radius-pill) !important;
    padding-left: 0;
    padding-right: 0;
}

.card-footer.order-action-bar {
    display: flex;
    align-items: center;
    padding: 12px 20px !important;
}

.card-footer.order-action-bar .order-action-group {
    display: flex;
    align-items: center;
    padding-right: 18px;
    border-right: 1px solid var(--ent-border);
}

.card-footer.order-action-bar .order-action-group .btn.btn-md,
.card-footer.order-action-bar a.btn.btn-md.action-dismiss {
    min-width: 112px;
    text-align: center;
}

.card-footer.order-action-bar .order-action-group .btn.btn-md.action-alternate {
    background-color: #ffffff !important;
    border: 1px solid var(--ent-brand-500) !important;
    color: var(--ent-brand-700) !important;
    font-weight: 500 !important;
}

.card-footer.order-action-bar .order-action-group .btn.btn-md.action-alternate:hover,
.card-footer.order-action-bar .order-action-group .btn.btn-md.action-alternate:focus {
    background-color: var(--ent-brand-50) !important;
    border-color: var(--ent-brand-600) !important;
    color: var(--ent-brand-700) !important;
}

.card-footer.order-action-bar a.btn.btn-md.action-dismiss {
    margin-left: 18px !important;
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--ent-text-muted) !important;
}

.card-footer.order-action-bar a.btn.btn-md.action-dismiss:hover,
.card-footer.order-action-bar a.btn.btn-md.action-dismiss:focus {
    background-color: var(--ent-surface-raised) !important;
    border-color: transparent !important;
    color: var(--ent-text-strong) !important;
}

.card-footer.order-action-bar .order-action-group .btn.btn-md:focus,
.card-footer.order-action-bar a.btn.btn-md.action-dismiss:focus {
    outline: none !important;
    box-shadow: var(--ent-focus-ring) !important;
}
