/* =========================================================================
   EHPL Modern UI layer  (override stylesheet for AdminLTE / Bootstrap 3)
   - To disable: rename or delete public/css/ehpl-modern.css
   - Loaded after app.css, so it only overrides; no original file is edited.
   ========================================================================= */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/ehpl/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  --ui-primary: #0f766e;
  --ui-primary-dark: #0b5c56;
  --ui-primary-light: #e6f4f1;
  --ui-accent: #f59e0b;
  --ui-danger: #dc2626;
  --ui-info: #0284c7;
  --ui-success: #16a34a;
  --ui-warning: #d97706;
  --ui-bg: #f3f6f9;
  --ui-surface: #ffffff;
  --ui-border: #e3e8ef;
  --ui-text: #1f2937;
  --ui-muted: #6b7280;
  --ui-sidebar: #0c2f2d;
  --ui-sidebar-hover: rgba(255, 255, 255, .07);
  --ui-sidebar-text: #c9dedb;
  --ui-radius: 10px;
  --ui-radius-sm: 8px;
  --ui-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --ui-shadow: 0 4px 14px rgba(16, 24, 40, .07);
  --ui-font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Base ---------------------------------------------------------- */
body.hold-transition[class*="skin-"],
body.hold-transition.sidebar-mini {
  font-family: var(--ui-font);
  font-size: 14px;
  color: var(--ui-text);
  background: var(--ui-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body[class*="skin-"] h1, body[class*="skin-"] h2, body[class*="skin-"] h3,
body[class*="skin-"] h4, body[class*="skin-"] h5, body[class*="skin-"] h6,
body[class*="skin-"] .h1, body[class*="skin-"] .h2, body[class*="skin-"] .h3 {
  font-family: var(--ui-font);
  letter-spacing: -.01em;
  color: var(--ui-text);
}
body[class*="skin-"] .text-muted { color: var(--ui-muted); }

.content-wrapper, .right-side, .main-footer { background: var(--ui-bg) !important; }
.content-wrapper { min-height: 100vh; }
.content { padding: 18px 22px 30px; }

/* visible keyboard focus */
body[class*="skin-"] a:focus-visible,
body[class*="skin-"] button:focus-visible,
body[class*="skin-"] .btn:focus-visible,
body[class*="skin-"] input:focus-visible,
body[class*="skin-"] select:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .35);
  outline-offset: 1px;
}

/* ---------- Header / top bar --------------------------------------------- */
[class*="skin-"] .main-header { box-shadow: 0 1px 0 var(--ui-border), 0 6px 18px rgba(16, 24, 40, .05); position: sticky; top: 0; z-index: 1030; }
[class*="skin-"] .main-header .navbar {
  background: var(--ui-surface) !important;
  border: 0;
  min-height: 50px;
}
[class*="skin-"] .main-header .logo {
  background: var(--ui-surface) !important;
  color: var(--ui-text) !important;
  border: 0 !important;
  border-right: 1px solid var(--ui-border) !important;
}
[class*="skin-"] .main-header .navbar .sidebar-toggle {
  color: var(--ui-text) !important;
  height: 50px; line-height: 30px; font-size: 20px;
}
[class*="skin-"] .main-header .navbar .sidebar-toggle:hover { background: var(--ui-primary-light) !important; color: var(--ui-primary) !important; }
[class*="skin-"] .main-header .navbar .nav > li > a { color: var(--ui-text) !important; }
[class*="skin-"] .main-header .navbar .nav > li > a:hover,
[class*="skin-"] .main-header .navbar .nav .open > a { background: var(--ui-primary-light) !important; color: var(--ui-primary) !important; }
[class*="skin-"] .main-header .navbar-custom-menu { padding-right: 8px; }
[class*="skin-"] .main-header .navbar-custom-menu > .btn-group,
[class*="skin-"] .main-header .navbar-custom-menu > .btn { margin-top: 0; }
[class*="skin-"] .main-header .navbar .btn.m-8,
[class*="skin-"] .main-header .navbar .btn.mt-10 { margin-top: 10px; margin-left: 4px; margin-right: 2px; }
[class*="skin-"] .main-header .navbar .btn-success { border-radius: 999px; padding: 6px 14px; }
[class*="skin-"] .main-header .navbar .navbar-nav > .user-menu .user-image { border: 2px solid var(--ui-primary-light); }
[class*="skin-"] .main-header .navbar .dropdown-menu { margin-top: 6px; }
#online_indicator { font-size: 9px; margin-left: 6px; vertical-align: middle; }

/* ---------- Sidebar ------------------------------------------------------- */
/* The existing EHPL light-teal sidebar (app.css) is kept; only polish added here. */
[class*="skin-"] .main-sidebar { box-shadow: 2px 0 12px rgba(16, 24, 40, .04); }
[class*="skin-"] .sidebar { padding-bottom: 40px; }
[class*="skin-"] .sidebar-menu > li > a { padding: 10px 12px; }
[class*="skin-"] .sidebar::-webkit-scrollbar { width: 6px; }
[class*="skin-"] .sidebar::-webkit-scrollbar-thumb { background: #cfd8e0; border-radius: 6px; }

/* sidebar search box (added by ehpl-modern.js) */
.ehpl-menu-search { padding: 12px 10px 6px; position: sticky; top: 0; z-index: 5; background: #f5f8fa; }
.ehpl-menu-search input {
  width: 100%; height: 38px; border: 1px solid #d5dde5; border-radius: 999px;
  background-color: #fff; color: var(--ui-text); padding: 0 14px 0 36px; outline: none; font-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
}
.ehpl-menu-search input::placeholder { color: #8a97a5; }
.ehpl-menu-search input:focus { border-color: var(--ui-primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
.sidebar-collapse .ehpl-menu-search { display: none; }
.sidebar-menu li.ehpl-hide { display: none !important; }

/* ---------- Page header --------------------------------------------------- */
.content-header { padding: 18px 22px 0; }
.content-header > h1 { font-size: 22px; font-weight: 700; margin: 0; }
.content-header > h1 > small { color: var(--ui-muted); font-size: 13px; font-weight: 400; margin-left: 8px; }
.content-header > .breadcrumb { background: transparent; padding: 0; top: 18px; }

/* ---------- Cards (AdminLTE boxes) --------------------------------------- */
.box, .nav-tabs-custom, .info-box, .small-box, .panel, .well {
  border-radius: var(--ui-radius) !important;
  border: 1px solid var(--ui-border) !important;
  box-shadow: var(--ui-shadow-sm) !important;
  background: var(--ui-surface);
}
.box { border-top: 1px solid var(--ui-border) !important; margin-bottom: 18px; }
.box.box-primary, .box.box-solid.box-primary { border-top: 3px solid var(--ui-primary) !important; }
.box.box-success { border-top: 3px solid var(--ui-success) !important; }
.box.box-info { border-top: 3px solid var(--ui-info) !important; }
.box.box-warning { border-top: 3px solid var(--ui-warning) !important; }
.box.box-danger { border-top: 3px solid var(--ui-danger) !important; }
.box-header { padding: 14px 18px; border-bottom: 1px solid var(--ui-border); }
.box-header.with-border { border-bottom: 1px solid var(--ui-border); }
.box-header .box-title { font-size: 16px; font-weight: 600; }
.box-body { padding: 18px; border-radius: 0 0 var(--ui-radius) var(--ui-radius); }
.box-footer { border-top: 1px solid var(--ui-border); background: #fafbfc; border-radius: 0 0 var(--ui-radius) var(--ui-radius); padding: 14px 18px; }
.box.box-solid > .box-header { border-radius: var(--ui-radius) var(--ui-radius) 0 0; }
.box.box-solid.box-primary > .box-header { background: var(--ui-primary); }
.box-tools .btn { border-radius: var(--ui-radius-sm); }
.nav-tabs-custom > .nav-tabs { border-bottom: 1px solid var(--ui-border); padding: 4px 8px 0; }
.nav-tabs-custom > .nav-tabs > li { margin-bottom: -1px; }
.nav-tabs-custom > .nav-tabs > li > a { color: var(--ui-muted); font-weight: 500; border-radius: 8px 8px 0 0; padding: 10px 16px; }
.nav-tabs-custom > .nav-tabs > li.active { border-top-color: transparent; }
.nav-tabs-custom > .nav-tabs > li.active > a { color: var(--ui-primary); font-weight: 600; border-bottom: 3px solid var(--ui-primary); background: transparent; }
.nav-tabs-custom > .tab-content { padding: 18px; }
.nav-pills > li > a { border-radius: 999px; }
.nav-pills > li.active > a, .nav-pills > li.active > a:hover { background: var(--ui-primary) !important; color: #fff !important; }

/* dashboard tiles */
.info-box { min-height: 92px; overflow: hidden; }
.info-box-icon { border-radius: var(--ui-radius) 0 0 var(--ui-radius) !important; height: 92px; width: 92px; line-height: 92px; }
.info-box-content { margin-left: 100px; }
.info-box-number { font-size: 22px; font-weight: 700; }
.small-box { overflow: hidden; }
.small-box > .small-box-footer { border-radius: 0 0 var(--ui-radius) var(--ui-radius); }
.small-box h3 { font-size: 28px; font-weight: 700; color: inherit; }

/* let tile titles wrap instead of being cut off */
.info-box .info-box-text, .info-box-new-style .info-box-text {
  white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.25; letter-spacing: .02em;
}

/* ---------- Buttons ------------------------------------------------------- */
.btn { border-radius: var(--ui-radius-sm); font-weight: 500; padding: 7px 14px; transition: transform .06s, box-shadow .15s, background .15s; border-width: 1px; }
.btn:active { transform: translateY(1px); }
.btn-flat { border-radius: var(--ui-radius-sm) !important; }
.btn-sm, .btn-group-sm > .btn { padding: 5px 10px; border-radius: 7px; }
.btn-lg { padding: 11px 20px; border-radius: 10px; }
.btn-primary, a.btn-primary { background: var(--ui-primary); border-color: var(--ui-primary-dark); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { background: var(--ui-primary-dark); border-color: var(--ui-primary-dark); }
.btn-success { background: var(--ui-success); border-color: #15803d; }
.btn-success:hover, .btn-success:focus { background: #15803d; border-color: #166534; }
.btn-info { background: var(--ui-info); border-color: #0369a1; }
.btn-warning { background: var(--ui-warning); border-color: #b45309; color: #fff; }
.btn-danger { background: var(--ui-danger); border-color: #b91c1c; }
.btn-default { background: #fff; border-color: var(--ui-border); color: var(--ui-text); }
.btn-default:hover, .btn-default:focus { background: #f3f4f6; border-color: #cfd6df; color: var(--ui-text); }
.btn-primary, .btn-success, .btn-info, .btn-danger { box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
.btn-link { color: var(--ui-primary); }
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.label, .badge { border-radius: 999px; font-weight: 600; padding: .3em .75em; letter-spacing: .01em; }
.label-primary { background: var(--ui-primary) !important; }

/* ---------- Forms --------------------------------------------------------- */
.form-group { margin-bottom: 16px; }
label, .control-label { font-weight: 600; color: #374151; font-size: 13px; margin-bottom: 5px; }
.form-control {
  height: 40px; border-radius: var(--ui-radius-sm); border: 1px solid #d5dbe4; box-shadow: none;
  padding: 8px 12px; font-size: 14px; color: var(--ui-text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; min-height: 80px; }
.form-control:focus { border-color: var(--ui-primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
.form-control[disabled], .form-control[readonly] { background: #f3f4f6; }
.has-error .form-control { border-color: var(--ui-danger); }
.help-block { color: var(--ui-muted); font-size: 12px; }
.input-group-addon { border-radius: var(--ui-radius-sm); border: 1px solid #d5dbe4; background: #f8fafc; color: var(--ui-muted); }
.input-group .form-control:first-child, .input-group-addon:first-child, .input-group-btn:first-child > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .form-control:last-child, .input-group-addon:last-child, .input-group-btn:last-child > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ui-primary); }
/* select2 */
.select2-container--default .select2-selection--single { height: 40px; border: 1px solid #d5dbe4; border-radius: var(--ui-radius-sm); }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; padding-left: 12px; color: var(--ui-text); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; }
.select2-container--default .select2-selection--multiple { min-height: 40px; border: 1px solid #d5dbe4; border-radius: var(--ui-radius-sm); }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--ui-primary); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--ui-primary); }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--ui-primary-light); border: 1px solid #b7ddd7; color: var(--ui-primary-dark); border-radius: 999px; padding: 1px 8px; }
.select2-dropdown { border-color: #d5dbe4; border-radius: var(--ui-radius-sm); box-shadow: var(--ui-shadow); overflow: hidden; }

/* ---------- Tables / DataTables ------------------------------------------ */
.table { margin-bottom: 0; }
.table > thead > tr > th {
  background: #f6f8fa; color: #475467; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--ui-border) !important; border-top: 0; padding: 11px 12px; white-space: nowrap;
}
.table > tbody > tr > td { padding: 11px 12px; border-top: 1px solid #eef1f5; vertical-align: middle; }
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border-color: var(--ui-border); }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fcfdfe; }
.table-hover > tbody > tr:hover, table.dataTable tbody tr:hover { background: var(--ui-primary-light) !important; }
.table > tfoot > tr > td, .table > tfoot > tr > th { background: #f6f8fa; font-weight: 700; border-top: 2px solid var(--ui-border); }
.dataTables_wrapper { padding-top: 4px; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  height: 36px; border: 1px solid #d5dbe4; border-radius: var(--ui-radius-sm); padding: 4px 10px; outline: none;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--ui-primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
.dataTables_wrapper .dt-buttons .btn, .dt-buttons .dt-button { border-radius: 7px; margin-right: 4px; }
.dataTables_info { color: var(--ui-muted); font-size: 12.5px; padding-top: 14px; }
.pagination > li > a, .pagination > li > span { border-radius: 8px !important; margin: 0 2px; border: 1px solid var(--ui-border); color: var(--ui-text); }
.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover { background: var(--ui-primary); border-color: var(--ui-primary); color: #fff; }
.dataTables_processing { border-radius: var(--ui-radius-sm); box-shadow: var(--ui-shadow); }
.dataTables_wrapper .row > [class*="col-"] { margin-bottom: 8px; }
table.dataTable { border-collapse: collapse !important; }
.table-responsive { border: 0; }

/* ---------- Modals / dropdowns / alerts ---------------------------------- */
.modal-content { border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(16, 24, 40, .25); overflow: hidden; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--ui-border); background: #fff; }
.modal-header .modal-title { font-weight: 700; font-size: 17px; }
.modal-header .close { opacity: .5; font-size: 26px; }
.modal-body { padding: 20px; }
.modal-footer { padding: 14px 20px; background: #fafbfc; border-top: 1px solid var(--ui-border); }
.modal-backdrop.in { opacity: .45; }
.dropdown-menu { border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm); box-shadow: var(--ui-shadow); padding: 6px; }
.dropdown-menu > li > a { border-radius: 6px; padding: 8px 12px; }
.dropdown-menu > li > a:hover { background: var(--ui-primary-light); color: var(--ui-primary-dark); }
.alert { border-radius: var(--ui-radius-sm); border-width: 1px; }
.callout { border-radius: var(--ui-radius-sm); }
.popover, .tooltip-inner { border-radius: var(--ui-radius-sm); }
.progress { border-radius: 999px; box-shadow: none; background: #eef1f5; }
.progress-bar { background: var(--ui-primary); }
#toast-container > div { border-radius: 10px; box-shadow: var(--ui-shadow); opacity: 1; }
.daterangepicker, .datepicker { border-radius: var(--ui-radius-sm); box-shadow: var(--ui-shadow); }
.daterangepicker td.active, .daterangepicker td.active:hover, .datepicker table tr td.active.active { background: var(--ui-primary) !important; }

/* ---------- Footer / misc ------------------------------------------------- */
.main-footer { border-top: 1px solid var(--ui-border); color: var(--ui-muted); font-size: 12.5px; }
.scrolltop .scroll {
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-primary);
  color: #fff;
  border-radius: 50%;
  box-shadow: var(--ui-shadow);
  line-height: 1;
}
.scrolltop .scroll:hover {
  background: var(--ui-primary-dark);
}
.scrolltop .scroll .fas,
.scrolltop .scroll i {
  color: #fff !important;
  font-size: 22px;
  margin: 0;
  padding: 0;
  line-height: 1;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c5ced9; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #a9b5c4; }

/* ---------- POS screen (kept conservative) ------------------------------- */
body.lockscreen { font-family: var(--ui-font); }
body.lockscreen .btn { border-radius: var(--ui-radius-sm); }
body.lockscreen .form-control { border-radius: var(--ui-radius-sm); }

/* ---------- Tablet ------------------------------------------------------- */
@media (max-width: 991px) {
  .content { padding: 14px 14px 26px; }
  .content-header { padding: 14px 14px 0; }
  .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .btn { min-height: 38px; }
}

/* ---------- Phone -------------------------------------------------------- */
@media (max-width: 767px) {
  .content { padding: 10px 10px 24px; }
  .content-header { padding: 12px 10px 0; }
  .content-header > h1 { font-size: 19px; }
  .box-body, .nav-tabs-custom > .tab-content, .modal-body { padding: 12px; }
  .box-header { padding: 12px; }
  [class*="skin-"] .main-header { position: sticky; }
  [class*="skin-"] .main-header .logo { width: 100%; border-right: 0 !important; }
  [class*="skin-"] .main-header .navbar { min-height: 50px; }
  [class*="skin-"] .main-header .navbar .sidebar-toggle { height: 50px; }
  [class*="skin-"] .main-sidebar, [class*="skin-"] .left-side { width: 290px; -webkit-transform: translate(-290px, 0); transform: translate(-290px, 0); }
  .sidebar-open [class*="skin-"] .main-sidebar, [class*="skin-"].sidebar-open .main-sidebar,
  .sidebar-open .main-sidebar { -webkit-transform: translate(0, 0); transform: translate(0, 0); box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  .sidebar-open .main-header, .sidebar-open .content-wrapper, .sidebar-open .main-footer, .sidebar-open .right-side { -webkit-transform: none; transform: none; }
  .btn, .form-control, .select2-container--default .select2-selection--single { min-height: 44px; }
  .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; }
  .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
  .form-control, select.form-control, .dataTables_wrapper .dataTables_filter input { font-size: 16px; } /* stops iOS zoom */
  .btn-sm { min-height: 38px; }
  .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length { text-align: left; float: none; }
  .dataTables_wrapper .dataTables_filter input { width: 100%; margin-left: 0; }
  .dataTables_wrapper .dt-buttons { display: flex; flex-wrap: wrap; gap: 6px; float: none; margin-bottom: 8px; }
  .dataTables_paginate { float: none; text-align: center; }
  .box-tools, .box-header .box-tools { position: static; margin-top: 8px; }
  .modal-dialog { margin: 8px; width: auto; }
  .modal-footer .btn { width: 100%; margin: 4px 0 0; }
  .info-box-number { font-size: 19px; }
  .table > thead > tr > th, .table > tbody > tr > td { padding: 9px 8px; }
  .nav-tabs-custom > .nav-tabs { overflow-x: auto; white-space: nowrap; display: flex; flex-wrap: nowrap; }
  .nav-tabs-custom > .nav-tabs > li { float: none; }
  .row > [class*="col-xs-"] { margin-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media print {
  .ehpl-menu-search { display: none !important; }
}


/* =========================================================================
   ENTERPRISE LAYER (v2) - calmer palette, softer surfaces, clearer hierarchy
   ========================================================================= */
:root { --ui-bg: #f5f7fa; --ui-border: #e4e9f0; --ui-text: #1b2536; --ui-muted: #667085; }
body.hold-transition[class*="skin-"] { font-size: 13.5px; line-height: 1.5; }
.content-wrapper, .right-side { background: var(--ui-bg) !important; }

/* page loader */
.pace .pace-progress { background: var(--ui-primary) !important; height: 3px; }
.pace .pace-activity { border-top-color: var(--ui-primary) !important; border-left-color: var(--ui-primary) !important; }

/* --- Header actions: quiet icon buttons, solid primary only for the main CTA --- */
[class*="skin-"] .main-header .navbar .btn-success {
  background: var(--ui-primary-light); border: 1px solid #cfe7e2; color: var(--ui-primary); box-shadow: none; border-radius: 10px;
}
[class*="skin-"] .main-header .navbar .btn-success:hover,
[class*="skin-"] .main-header .navbar .btn-success:focus { background: #d4ece7; color: var(--ui-primary-dark); }
[class*="skin-"] .main-header .navbar a.btn-success[href*="pos"] { background: var(--ui-primary); border-color: var(--ui-primary-dark); color: #fff; }
[class*="skin-"] .main-header .navbar a.btn-success[href*="pos"]:hover { background: var(--ui-primary-dark); color: #fff; }
[class*="skin-"] .main-header .navbar .btn-danger { border-radius: 10px; }

/* collapsed sidebar: show only the logo mark instead of a clipped wordmark */
.sidebar-mini.sidebar-collapse .main-header .logo .header-brand-image { object-fit: cover; object-position: left center; width: 34px !important; height: 34px !important; max-width: 34px !important; max-height: 34px !important; }

/* --- Dashboard hero: deep teal gradient instead of saturated blue --- */
.content-header-custom {
  background: linear-gradient(120deg, #0a4a45 0%, #0f766e 60%, #138f80 100%) !important;
  border-bottom: 0 !important;
}
.content-header-custom h1, .content-header-custom h1 small, .content-header-custom .breadcrumb > li > a,
.content-header-custom .breadcrumb > li, .content-header-custom label { color: #fff !important; }
.content-header-custom h1 small { opacity: .8; }
.content-header-custom .btn-primary, .content-header-custom .btn-default { background: rgba(255,255,255,.14) !important; border: 1px solid rgba(255,255,255,.35) !important; color: #fff !important; box-shadow: none; }
.content-header-custom .btn-primary:hover, .content-header-custom .btn-default:hover { background: rgba(255,255,255,.24) !important; }
.content-header-custom .select2-container--default .select2-selection--single { border-color: transparent; }

/* --- KPI cards --- */
.info-box, .info-box-new-style { border-radius: 14px !important; min-height: 104px; transition: box-shadow .2s, transform .2s; }
.info-box:hover { box-shadow: var(--ui-shadow) !important; transform: translateY(-1px); }
.info-box-new-style .info-box-icon, .info-box .info-box-icon {
  float: left; width: 46px !important; height: 46px !important; line-height: 46px !important; font-size: 22px !important;
  border-radius: 12px !important; margin: 16px 0 0 16px; box-shadow: 0 6px 14px -6px rgba(16,24,40,.35);
}
.info-box-new-style .info-box-content, .info-box .info-box-content { margin-left: 76px !important; padding: 14px 14px 14px 0; }
.info-box .info-box-text { text-transform: uppercase; font-size: 11px !important; font-weight: 700; letter-spacing: .06em; color: var(--ui-muted); }
.info-box .info-box-number { font-size: 22px !important; font-weight: 700; color: var(--ui-text); letter-spacing: -.01em; }
.info-box .help-block { color: var(--ui-muted); font-size: 11.5px !important; margin-top: 4px !important; }

/* --- Cards: neutral, thin border (drop coloured top bars) --- */
.box, .box.box-primary, .box.box-success, .box.box-info, .box.box-warning, .box.box-danger, .box.box-solid { border-top: 1px solid var(--ui-border) !important; }
.box-header { padding: 14px 18px; }
.box-header > .fa, .box-header > .glyphicon, .box-header > .ion { color: var(--ui-primary); }
.box-header .box-title { font-size: 15px; font-weight: 600; color: var(--ui-text); }
.box-header .box-title i, .box-header .box-title .fa, .box-header .box-title .fas { color: var(--ui-primary); margin-right: 6px; }
.box.collapsed-box .box-header { border-bottom: 0; }

/* --- Tables: airy rows, quiet header, tabular numbers --- */
.table > thead > tr > th { background: #f8fafc; color: #667085; font-size: 11.5px; letter-spacing: .05em; padding: 12px 14px; }
.table > tbody > tr > td { padding: 12px 14px; border-top: 1px solid #edf0f5; color: #344054; }
.table > tbody > tr:last-child > td { border-bottom: 1px solid #edf0f5; }
.table td, .table th, .info-box-number, .dataTable td { font-variant-numeric: tabular-nums; }
table.dataTable thead .sorting:after, table.dataTable thead .sorting_asc:after, table.dataTable thead .sorting_desc:after { opacity: .35; }
.table-bordered { border: 1px solid var(--ui-border); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border-left: 0; border-right: 0; }
.dataTables_wrapper .dataTables_filter label, .dataTables_wrapper .dataTables_length label { font-weight: 500; color: var(--ui-muted); }
.dataTables_wrapper .dt-buttons { margin-bottom: 10px; }
.dt-buttons .btn, .dt-buttons .dt-button, .dt-button { background: #fff !important; border: 1px solid #d9dfe8 !important; color: #344054 !important; box-shadow: none !important; padding: 5px 12px; font-size: 12.5px; }
.dt-buttons .btn:hover, .dt-button:hover { background: #f3f6f9 !important; border-color: #c4ccd8 !important; }
.dt-buttons .btn i, .dt-button i { color: var(--ui-primary); }

/* row action menus: outline style instead of bright blue blocks */
table .btn-info.dropdown-toggle, table .btn-xs.btn-info, table .btn-info.btn-xs {
  background: #fff !important; border: 1px solid #cfe0e8 !important; color: var(--ui-primary) !important; box-shadow: none; font-weight: 600;
}
table .btn-info.dropdown-toggle:hover, table .btn-info.btn-xs:hover { background: var(--ui-primary-light) !important; border-color: #b7ddd7 !important; }
table .btn-xs { padding: 4px 10px; border-radius: 7px; }

/* --- Status pills (soft tints) --- */
.label { font-size: 11px; font-weight: 600; letter-spacing: .02em; border: 1px solid transparent; }
.label-success, .bg-green.label { background: #e7f6ec !important; color: #166534 !important; border-color: #c3e8cf; }
.label-danger, .bg-red.label { background: #fdecec !important; color: #b42318 !important; border-color: #f7c9c4; }
.label-warning, .bg-yellow.label { background: #fff4e0 !important; color: #b54708 !important; border-color: #fbdca8; }
.label-info, .bg-aqua.label, .bg-light-blue.label { background: #e6f3fb !important; color: #026aa2 !important; border-color: #bfdff2; }
.label-default, .bg-gray.label { background: #eef1f5 !important; color: #475467 !important; border-color: #dde3ea; }
.label-primary { background: var(--ui-primary-light) !important; color: var(--ui-primary-dark) !important; border-color: #b7ddd7; }

/* --- Page header: title + muted subtitle, breadcrumb right --- */
.content-header > h1 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
.content-header > h1 > small { font-size: 12.5px; }

/* --- Form polish --- */
.form-control { height: 38px; font-size: 13.5px; }
.form-control::placeholder { color: #98a2b3; }
.form-group > label, .control-label { color: #344054; font-size: 12.5px; letter-spacing: .01em; }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple { min-height: 38px; height: 38px; }
.select2-container--default .select2-selection--multiple { height: auto; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
fieldset, .box-body > fieldset { border: 1px solid var(--ui-border); border-radius: 10px; padding: 12px 16px; }
legend { font-size: 13px; font-weight: 700; color: var(--ui-text); border: 0; width: auto; padding: 0 8px; margin-bottom: 0; }

/* --- Modals --- */
.modal-header { background: #fbfcfd; }
.modal-header .modal-title { font-size: 16px; }
.modal-footer .btn-default { background: #fff; }

/* --- Gentle entrance for page content --- */
@keyframes ehplFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.content-wrapper > .content, .content-wrapper > #app > .content { animation: ehplFadeUp .28s ease-out both; }
@media (prefers-reduced-motion: reduce) { .content-wrapper > .content, .content-wrapper > #app > .content { animation: none; } }

/* FontAwesome 4 alias missing in FA5 (fa-dollar renders blank on the "Collected" tile) */
.fa-dollar:before, .fa-usd:before { content: "\f155"; font-family: "Font Awesome 5 Free"; font-weight: 900; }
.info-box .info-box-number { font-size: clamp(17px, 1.7vw, 22px) !important; overflow-wrap: anywhere; }

/* Secondary action buttons that used loud AdminLTE colours (maroon/navy/purple/olive) -> calm outline style */
.btn.bg-maroon, .btn.bg-navy, .btn.bg-purple, .btn.bg-olive, .btn.bg-teal, .btn.bg-fuchsia {
  background: #fff !important; color: var(--ui-primary-dark) !important; border: 1px solid #b7ddd7 !important; box-shadow: none;
}
.btn.bg-maroon:hover, .btn.bg-navy:hover, .btn.bg-purple:hover, .btn.bg-olive:hover, .btn.bg-teal:hover, .btn.bg-fuchsia:hover { background: var(--ui-primary-light) !important; }
/* table header bars painted solid green */
thead.bg-green > tr > th, tr.bg-green > th, tr.bg-green > td, th.bg-green, td.bg-green, .table .bg-green th {
  background: #f1f5f9 !important; color: #344054 !important; border-color: var(--ui-border) !important;
}
.add-product-price-table > tbody > tr > th, .add-product-price-table th { background: #f1f5f9 !important; color: #344054 !important; border-color: var(--ui-border) !important; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* Typography: Inter for text; icon elements are excluded so FontAwesome/Ionicons/Glyphicons keep their fonts */
html body[class*="skin-"],
html body[class*="skin-"] :is(h1,h2,h3,h4,h5,h6,p,a,label,input,select,textarea,button,td,th,li,legend,small,strong,b,
  span:not([class*="fa"]):not([class*="ion"]):not([class*="glyphicon"]):not([class*="icon"]),
  div:not([class*="fa-"]):not([class*="ion-"])) {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
html body[class*="skin-"] :is(.fa,.fas,.far,.fal,.fad){ font-family: "Font Awesome 5 Free" !important; }
html body[class*="skin-"] :is(.fab){ font-family: "Font Awesome 5 Brands" !important; }


/* =========================================================================
   PRODUCTIVITY LAYER (v3): command palette, quick actions, loaders
   ========================================================================= */

/* header search trigger */
.ehpl-search-trigger {
  float: left; margin: 9px 0 0 14px; height: 34px; min-width: 260px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 10px 0 12px; border: 1px solid var(--ui-border); border-radius: 10px; background: #f8fafc; color: var(--ui-muted);
  font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.ehpl-search-trigger:hover { background: #fff; border-color: #b7ddd7; box-shadow: 0 0 0 3px rgba(15,118,110,.08); }
.ehpl-search-trigger svg { width: 15px; height: 15px; flex: none; }
.ehpl-search-trigger .ehpl-label { flex: 1; text-align: left; }
.ehpl-kbd { font-size: 11px; font-weight: 600; color: #667085; background: #fff; border: 1px solid #d9dfe8; border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; }

/* command palette */
.ehpl-palette { position: fixed; inset: 0; z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgba(16,24,40,.45); }
.ehpl-palette.open { display: flex; }
.ehpl-palette .ehpl-pal-box { width: min(640px, 94vw); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(16,24,40,.35); overflow: hidden; }
.ehpl-pal-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--ui-border); }
.ehpl-pal-input svg { width: 18px; height: 18px; color: var(--ui-muted); flex: none; }
.ehpl-pal-input input { flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; color: var(--ui-text); height: 28px; }
.ehpl-pal-list { max-height: 54vh; overflow-y: auto; padding: 8px; }
.ehpl-pal-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #98a2b3; padding: 10px 12px 4px; }
.ehpl-pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--ui-text); text-decoration: none !important; }
.ehpl-pal-item .ehpl-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--ui-primary-light); color: var(--ui-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.ehpl-pal-item .ehpl-t { font-weight: 600; font-size: 13.5px; }
.ehpl-pal-item .ehpl-p { font-size: 12px; color: var(--ui-muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.ehpl-pal-item.active, .ehpl-pal-item:hover { background: var(--ui-primary-light); }
.ehpl-pal-empty { padding: 26px; text-align: center; color: var(--ui-muted); }
.ehpl-pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--ui-border); background: #fafbfc; font-size: 12px; color: var(--ui-muted); }

/* dashboard quick actions */
.ehpl-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.ehpl-quick .ehpl-q-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ui-muted); margin-right: 4px; }
.ehpl-quick a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--ui-border); color: var(--ui-text) !important; font-weight: 600; font-size: 13px; box-shadow: var(--ui-shadow-sm); text-decoration: none !important; transition: transform .06s, border-color .15s, background .15s; }
.ehpl-quick a:hover { border-color: #9fd2cb; background: var(--ui-primary-light); }
.ehpl-quick a i { color: var(--ui-primary); }

/* sidebar icons as soft chips (duotone feel) */
[class*="skin-"] .sidebar-menu > li > a > i:first-child { width: 30px; height: 30px; line-height: 30px; border-radius: 9px; background: #e9eef3; text-align: center; font-size: 14px; margin-right: 10px; color: #55708a !important; transition: background .15s, color .15s; }
[class*="skin-"] .sidebar-menu > li.active > a > i:first-child, [class*="skin-"] .sidebar-menu > li:hover > a > i:first-child, [class*="skin-"] .sidebar-menu > li.menu-open > a > i:first-child { background: #d4ece7; color: var(--ui-primary) !important; }
.sidebar-mini.sidebar-collapse .sidebar-menu > li > a > i:first-child { margin-right: 0; }

/* slim top-loading bar instead of the "Processing..." box in tables */
.dataTables_wrapper .dataTables_processing, div.dataTables_processing {
  position: absolute; top: 0 !important; left: 0 !important; right: 0; width: 100% !important; height: 3px; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0;
  font-size: 0 !important; line-height: 0; color: transparent; background: linear-gradient(90deg, transparent 0, var(--ui-primary) 50%, transparent 100%) !important; background-size: 40% 100% !important; background-repeat: no-repeat !important;
  box-shadow: none !important; animation: ehplBar 1s linear infinite; z-index: 5;
}
@keyframes ehplBar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.dataTables_wrapper { position: relative; }

@media (max-width: 991px) { .ehpl-search-trigger { min-width: 0; width: 38px; padding: 0; justify-content: center; margin-left: 8px; } .ehpl-search-trigger .ehpl-label, .ehpl-search-trigger .ehpl-kbd { display: none; } }
@media print { .ehpl-search-trigger, .ehpl-palette, .ehpl-quick { display: none !important; } }

/* =========================================================================
   DASHBOARD (v4): clickable KPI cards, toolbar, widget polish
   ========================================================================= */
.eh-dashboard .ehd-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.eh-dashboard .ehd-filter-loc { min-width: 240px; flex: 0 1 300px; }
.eh-dashboard .ehd-filter-loc .select2-container { width: 100% !important; }
.eh-dashboard .ehd-quick { margin-bottom: 18px; }
.eh-dashboard .ehd-quick a { box-shadow: none; }

.ehd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 22px; }
@media (max-width: 1199px) { .ehd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991px)  { .ehd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .ehd-kpis { grid-template-columns: 1fr; } }

.ehd-kpi { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 18px 16px; background: #fff; border: 1px solid var(--ui-border);
  border-radius: 14px; box-shadow: var(--ui-shadow-sm); color: var(--ui-text) !important; text-decoration: none !important; min-width: 0;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; }
a.ehd-kpi { cursor: pointer; }
a.ehd-kpi:hover, a.ehd-kpi:focus { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,24,40,.10); border-color: #b7ddd7; outline: none; }
.ehd-kpi-ic { flex: none; width: 48px; height: 48px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.ehd-kpi-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ehd-kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ui-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ehd-kpi-val { font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--ui-text); margin: 2px 0; word-break: break-word; }
.ehd-kpi-help { font-size: 12px; color: #98a2b3; line-height: 1.35; }
.ehd-kpi-go { position: absolute; right: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ui-primary); background: var(--ui-primary-light); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
a.ehd-kpi:hover .ehd-kpi-go, a.ehd-kpi:focus .ehd-kpi-go { opacity: 1; transform: none; }
@media (hover: none) { .ehd-kpi-go { opacity: .7; transform: none; } }

.ehd-teal   .ehd-kpi-ic { background: #e0f5f2; color: #0f766e; }
.ehd-amber  .ehd-kpi-ic { background: #fef3d6; color: #b7791f; }
.ehd-orange .ehd-kpi-ic { background: #ffe9d9; color: #c2570c; }
.ehd-blue   .ehd-kpi-ic { background: #e0edff; color: #1d5fd1; }
.ehd-violet .ehd-kpi-ic { background: #eee8ff; color: #6a43d6; }
.ehd-red    .ehd-kpi-ic { background: #fde6e8; color: #c9283a; }
.ehd-green  .ehd-kpi-ic { background: #dff5e6; color: #1a8a47; }
.ehd-teal { border-top: 3px solid #14b8a6; } .ehd-amber { border-top: 3px solid #f5b53d; } .ehd-orange { border-top: 3px solid #f08a4b; }
.ehd-blue { border-top: 3px solid #4c8df0; } .ehd-violet { border-top: 3px solid #8b6ae6; } .ehd-red { border-top: 3px solid #ec5b6a; } .ehd-green { border-top: 3px solid #35b869; }

/* widget cards on the dashboard */
.eh-dashboard .box, .eh-dashboard .box-primary, .eh-dashboard .box-warning { border: 1px solid var(--ui-border) !important; border-top: 1px solid var(--ui-border) !important; border-radius: 14px; box-shadow: var(--ui-shadow-sm); overflow: hidden; }
.eh-dashboard .box > .box-header { background: #fff; border-bottom: 1px solid var(--ui-border); padding: 14px 18px; }
.eh-dashboard .box > .box-header .box-title { font-size: 15px; font-weight: 700; }
.eh-dashboard .box > .box-body { padding: 16px 18px; }
.eh-dashboard .box p.text-right > a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; color: var(--ui-primary); background: var(--ui-primary-light); padding: 4px 12px; border-radius: 999px; text-decoration: none; }
.eh-dashboard .box p.text-right > a:after { content: "\2192"; }
.eh-dashboard .box p.text-right > a:hover { background: #d4ece7; }
.eh-dashboard table.dataTable tbody tr:hover > td { background: #f3faf8 !important; }
.eh-dashboard table.dataTable tbody td a { font-weight: 600; }
.eh-dashboard .dataTables_empty { color: var(--ui-muted); padding: 28px !important; }
@media print { .ehd-kpi-go { display: none; } }
@media (max-width: 767px) {
  .eh-dashboard .ehd-quick { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-left: -4px; padding: 2px 4px 6px; }
  .eh-dashboard .ehd-quick::-webkit-scrollbar { display: none; }
  .eh-dashboard .ehd-quick a, .eh-dashboard .ehd-quick .ehpl-q-label { flex: none; white-space: nowrap; }
  .eh-dashboard .ehd-quick .ehpl-q-label { display: none; }
}

/* ===== Invoice pop-up polish (v5) ===== */
.modal-xl .modal-body .table.bg-gray{background:#fff!important;border:1px solid var(--ehpl-border,#e2e8f0);border-radius:8px;overflow:hidden}
.modal-xl .modal-body .table.bg-gray>tbody>tr>td,.modal-xl .modal-body .table.bg-gray>tbody>tr>th{background:transparent!important;border-top:1px solid #edf2f7;vertical-align:middle;word-break:break-word}
.modal-xl .modal-body .table.bg-gray>tbody>tr:nth-child(even)>td{background:#f8fafc!important}
.modal-xl .modal-body .table.bg-gray tr.bg-green>th,.modal-xl .modal-body .table.bg-gray tr.bg-green>td{background:#0f766e!important;color:#fff!important;font-weight:600;white-space:nowrap}
.modal-xl .modal-body .table-responsive{overflow-x:auto}
.modal-xl .modal-body h4{font-weight:600;color:#0f172a;margin:14px 0 8px}
.ehpl-chq{display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:4px;font-size:12px;color:#475569}
.ehpl-chq .ehpl-chq-no{font-weight:600;color:#0f172a}
.modal-xl .modal-footer .btn{border-radius:8px}
.modal-xl .modal-body .display_currency{white-space:nowrap}
.modal-xl .modal-body .table.bg-gray td:nth-child(2){white-space:nowrap}

