/* ============================================================
   Car Rentals CRM — UI kit
   Plain CSS. No framework. Bootstrap Icons + jQuery UI datepicker.
   ============================================================ */

:root {
  --primary: #0D966F;        /* Brand Green */
  --primary-dark: #087A5A;   /* Hover / Dark Green */
  --primary-light: #E8F7F2;  /* Soft Green Background */
  --dark: #111817;           /* Headings / Dark Sections */
  --text: #4B5753;           /* Body Text */
  --light: #F6F8F7;          /* Light Background */
  --soft-shadow: 0 4px 8px 0 rgb(0 0 0 / 14%);

  --border: #E4E9E7;
  --border-strong: #111817;
  --muted: #9AA5A1;
  --danger: #C0392B;
  --danger-dark: #9E2D21;
  --danger-light: #FDF3F1;
  --warn: #D89B00;
  --warn-light: #FFF6E5;
  --surface: #fff;
  --surface-2: var(--surface-2);
  --row-hover: var(--row-hover);
  --heading: #111817;
  --sidebar-bg: #111817;
  --warn-dark: #8A6100;
  --switch-off: #D5DBD9;
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 76px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Archivo, system-ui, -apple-system, sans-serif;
  background: var(--light);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
::selection { background: var(--primary-light); color: var(--heading); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input, select, textarea, button { font-family: inherit; }

/* ---------- layout ---------- */
.crm { display: flex; min-height: 100vh; }
.crm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crm-body { flex: 1; overflow-y: auto; padding: 28px 32px 60px; }
.scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll::-webkit-scrollbar-thumb { background: var(--border); }

/* ---------- sidebar ---------- */
.sidebar {
  width: var(--sidebar-w); flex: 0 0 auto; background: var(--sidebar-bg);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  transition: width .16s ease;
}
.sidebar.is-collapsed { width: var(--sidebar-w-collapsed); }
.sidebar.is-collapsed .sidebar-label { display: none; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px; border-bottom: 2px solid rgba(255,255,255,.10); }
.sidebar-mark { width: 34px; height: 34px; flex: 0 0 34px; background: var(--primary); display: grid; place-items: center; color: #fff; font-size: 18px; }
.sidebar-name { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.2px; line-height: 1.1; }
.sidebar-sub { color: rgba(255,255,255,.45); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding:0; display: flex; flex-direction: column; gap: 2px; }
.nav-item a{
  display: flex; align-items: center; gap: 14px; padding: 11px 12px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.62);
  border-left: 3px solid transparent; transition: background .12s;
}

.nav-item i { font-size: 17px; width: 20px; flex: 0 0 20px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.is-active a{ background: var(--primary); color: #fff; border-left:3px solid #fff; }
.nav-item .nav-label { flex: 1; white-space: nowrap; }
.nav-badge { padding: 2px 7px; font-size: 11px; font-weight: 700; background: var(--primary); color: #fff; }
.nav-item.is-active .nav-badge { background: rgba(255,255,255,.22); }
.nav-caret { font-size: 10px; opacity: .6; }
.nav-sub { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding-left: 32px; border-left: 2px solid rgba(255,255,255,.10); }
.nav-sub.is-open { display: flex; }
.nav-subitem { padding: 9px 12px; font-size: 13px; cursor: pointer; color: rgba(255,255,255,.50); font-weight: 500; }
.nav-subitem:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-subitem.is-active { color: #fff; font-weight: 600; background: rgba(13,150,111,.30); }
.sidebar-foot { border-top: 2px solid rgba(255,255,255,.10); padding: 12px 10px; }
.sidebar-user { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.sidebar-avatar { width: 30px; height: 30px; flex: 0 0 30px; background: var(--primary-light); color: var(--primary-dark); display: grid; place-items: center; font-size: 12px; font-weight: 700; }

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; gap: 20px; padding: 18px 32px; background: var(--surface); border-bottom: 2px solid var(--border); }
.topbar-title { flex: 1 1 auto; min-width: 190px; }
.topbar-crumb { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.topbar-h1 { font-size: 22px; font-weight: 700; color: var(--heading); letter-spacing: -.4px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-search { position: relative; flex: 0 1 280px; min-width: 130px; }
.topbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--muted); }
.topbar-search input { width: 100%; height: 40px; padding: 0 12px 0 34px; border: 1.5px solid var(--border); background: var(--light); font-size: 13.5px; color: var(--heading); outline: none; }
.topbar-search input:focus { border-color: var(--primary); background: var(--surface); }
.topbar-divider { width: 1.5px; height: 32px; background: var(--border); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 18px;
  border: 1.5px solid transparent; background: none; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; border-radius: 0;
}
.btn i { font-size: 14px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color:#fff; }
.btn-primary:active { background: #066B4F; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--primary);  color: #fff;}
.btn-outline { border-color: var(--primary); background: var(--surface); color: var(--primary-dark); }
.btn-outline:hover { background: var(--primary-light); }
.btn-secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-secondary:hover { border-color: var(--muted); color: var(--heading); }
.btn-ghost { background: transparent; color: var(--text); padding: 0 14px; }
.btn-ghost:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); }
.btn-danger-outline { border-color: var(--border); background: var(--surface); color: var(--danger); }
.btn-danger-outline:hover { border-color: var(--danger); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: flex-start; }
.btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon.btn-sm { width: 34px; height: 34px; }
.btn.is-loading { cursor: wait; opacity: .85; }

/* ---------- tags ---------- */
.tag { display: inline-block; padding: 5px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.tag-success { background: var(--primary-light); color: var(--primary-dark); }
.tag-dark { background: var(--dark); color: #fff; }
.tag-warn { background: var(--warn-light); color: var(--warn-dark); }
.tag-danger { background: var(--danger-light); color: var(--danger-dark); }
.tag-neutral { background: var(--surface-2); color: var(--text); }
.tag-outline { border: 1.5px solid var(--border); color: var(--text); }
.text-danger{color: var(--danger-dark);}
.txt-success{color: var(--primary-dark);}
/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--heading); }
.field-hint { font-size: 11.5px; color: var(--muted); }
.req { color: var(--danger); font-weight: 700; }
.ac-wrap { position: relative; }
.ac-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1.5px solid var(--border); box-shadow: var(--soft-shadow); z-index: 60; padding: 6px 0; }
.ac-list.is-open { display: block; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; color: var(--text); cursor: pointer; }
.ac-item i { font-size: 14px; color: var(--primary); width: 16px; }
.ac-item:hover, .ac-item.is-active { background: var(--primary-light); color: var(--heading); }
.ac-empty { padding: 12px 14px; font-size: 12.5px; color: var(--muted); }
.select.is-error, .textarea.is-error { border-color: var(--danger); background: var(--danger-light); }
.field-error { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--danger); }
.field-ok { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--primary-dark); }
.input, .textarea, .select {
  height: 42px; padding: 0 13px; border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13.5px; color: var(--heading); outline: none; width: 100%; border-radius: 0;
}
.textarea { height: auto; padding: 11px 13px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.input[disabled], .textarea[disabled] { background: var(--light); color: var(--muted); cursor: not-allowed; }
.input.is-error { border-color: var(--danger); background: var(--danger-light); }
.input.is-valid { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--muted); pointer-events: none; z-index: 1; }
.input-icon .input { padding-left: 36px; }
.input-group { display: flex; border: 1.5px solid var(--border); }
.input-group .input { border: none; }
.input-group-addon { display: grid; place-items: center; padding: 0 13px; background: var(--light); border-right: 1.5px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); }
.select-wrap { position: relative; }
.select { appearance: none; padding-right: 34px; cursor: pointer; }
.select-wrap > i { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--text); pointer-events: none; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; }

/* option card (checkbox with price, used for coverage and extras) */
.option { display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; }
.option:hover { border-color: var(--muted); }
.option input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; flex: 0 0 17px; }
.option.is-on { border-color: var(--primary); background: var(--primary-light); }
.option-title { font-size: 13px; font-weight: 600; color: var(--heading); }
.option-note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.option-price { font-size: 12.5px; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }

/* switch */
.switch { width: 38px; height: 22px; flex: 0 0 38px; padding: 3px; background: var(--switch-off); display: flex; justify-content: flex-start; cursor: pointer; transition: all .14s; }
.switch.is-on { background: var(--primary); justify-content: flex-end; }
.switch span { width: 16px; height: 16px; background: var(--surface); display: block; }

/* segmented control */
.seg { display: flex; border: 1.5px solid var(--border); height: 42px; }
.seg-opt { flex: 1; display: grid; place-items: center; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--surface); border-left: 1.5px solid var(--border); }
.seg-opt:first-child { border-left: none; }
.seg-opt.is-active { background: var(--primary); color: #fff; }

/* ---------- cards / sections ---------- */
.card { background: var(--surface); border: 2px solid var(--border); }
.card-pad { padding: 24px; }
.card-head { padding: 16px 20px; border-bottom: 2px solid var(--border); font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--heading); }
.card-head-strong { border-bottom-color: var(--border-strong); }
.section-kicker { font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--heading); }
.section-note { font-size: 12.5px; color: var(--muted); }
.hr { height: 2px; background: var(--border); border: 0; margin: 0; }

/* key/value grid */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 2px; background: var(--border); }
.kv > div { background: var(--surface); padding: 16px 20px; }
.kv-k { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kv-v { font-size: 13.5px;  /*white-space: pre-line;*/ line-height:20px; font-weight: 600; color: var(--heading); margin-top: 6px; overflow-wrap: anywhere; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2px; background: var(--border); border: 2px solid var(--border); }
.stat { background: var(--surface); padding: 20px 22px; }
.stat-k { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.stat-k i { font-size: 13px; color: var(--primary); }
.stat-v { font-size: 30px; font-weight: 700; color: var(--heading); letter-spacing: -1px; margin-top: 10px; line-height: 1; }
.stat-d { font-size: 12px; font-weight: 500; color: var(--primary); margin-top: 8px; }

/* grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.grid-1-2 { grid-template-columns: 2fr 1fr; }
@media (max-width: 700px) {
    .grid-1-2 {
        grid-template-columns: 1fr;
    }
} 
@media (max-width: 1100px) { .grid-side { grid-template-columns: minmax(0, 1fr); } }
.span-2 { grid-column: span 2; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 1120px; }
.table th {
  padding: 13px 16px; text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--border); white-space: nowrap;
}
.table td { padding: 14px 16px; vertical-align: top; border-bottom: 1.5px solid var(--surface-2); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--row-hover); }
.table .num { text-align: right; }
.cell-strong { font-size: 13px; font-weight: 600; color: var(--heading); }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.link-id { font-size: 13px; font-weight: 700; color: var(--primary); cursor: pointer; border-bottom: 1.5px solid var(--primary); }
.link-id:hover { color: var(--primary-dark); border-bottom-color: var(--primary-dark); }

/* ---------- dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
  background: var(--surface); border: 1.5px solid var(--border); box-shadow: var(--soft-shadow); z-index: 40; padding: 6px 0;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.dropdown-item i { font-size: 15px; width: 18px; color: var(--primary); }
.dropdown-item:hover { background: var(--primary-light); color: var(--heading); }
.dropdown-item.is-danger { color: var(--danger); border-top: 1.5px solid var(--border); margin-top: 4px; padding-top: 12px; }
.dropdown-item.is-danger i { color: var(--danger); }
.dropdown-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 2px solid var(--border-strong); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--heading); }
.dropdown-foot { padding: 11px 16px; border-top: 1.5px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--primary); cursor: pointer; }

/* notification bell + profile chip */
.bell { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.bell:hover, .dropdown.is-open .bell { border-color: var(--primary); color: var(--primary); }
.bell i { font-size: 17px; }
.bell-count { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; background: var(--primary); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.profile-chip { display: flex; align-items: center; gap: 11px; height: 46px; padding: 4px 12px 4px 4px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; }
.profile-chip:hover, .dropdown.is-open .profile-chip { background: var(--light); border-color: var(--primary); }
.profile-avatar { width: 36px; height: 36px; flex: 0 0 36px; background: var(--dark); color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.notif { display: flex; gap: 12px; padding: 14px 16px; cursor: pointer; border-bottom: 1.5px solid var(--surface-2); }
.notif:last-child { border-bottom: none; }
.notif:hover { background: var(--light); }
.notif.is-new { background: var(--row-hover); }
.notif-dot { width: 7px; height: 7px; background: var(--primary); flex: 0 0 7px; margin-top: 6px; }

/* ---------- loaders ---------- */
@keyframes crm-spin { to { transform: rotate(360deg); } }
@keyframes crm-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes crm-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes crm-toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: crm-spin .8s linear infinite; display: inline-block; }
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }
.spinner-on-dark { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.btn .spinner { width: 14px; height: 14px; border-width: 2px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.bar { height: 4px; background: var(--primary-light); overflow: hidden; }
.bar > span { display: block; width: 33%; height: 100%; background: var(--primary); animation: crm-bar 1.3s ease-in-out infinite; }
.progress { height: 6px; background: var(--primary-light); }
.progress > span { display: block; height: 100%; background: var(--primary); }
.skeleton { height: 12px; background: linear-gradient(90deg, #EFF2F1 0, #F8FAF9 200px, #EFF2F1 400px); background-size: 800px; animation: crm-shimmer 1.4s linear infinite; }
.loading-block { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--dark); color: #fff; font-size: 13px; font-weight: 600; }

/* ---------- alerts + toasts ---------- */
.alert { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-left: 4px solid; }
.alert i { font-size: 16px; margin-top: 1px; }
.alert-title { font-size: 13px; font-weight: 700; color: var(--heading); }
.alert-body { font-size: 12.5px; color: var(--text); margin-top: 2px; }
.alert-close { font-size: 13px; color: var(--muted); cursor: pointer; }
.alert-success { background: var(--primary-light); border-left-color: var(--primary); }
.alert-success > i { color: var(--primary); }
.alert-info { background: var(--light); border-left-color: var(--heading); }
.alert-info > i { color: var(--heading); }
.alert-warn { background: var(--warn-light); border-left-color: var(--warn); }
.alert-warn > i { color: var(--warn); }
.alert-error { background: var(--danger-light); border-left-color: var(--danger); }
.alert-error > i { color: var(--danger); }

#crm-toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 300; width: 330px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-left: 4px solid var(--primary); box-shadow: var(--soft-shadow); animation: crm-toast-in .18s ease-out; }
.toast-success { border-left-color: var(--primary); } .toast-success > i { color: var(--primary); }
.toast-info { border-left-color: var(--heading); } .toast-info > i { color: var(--heading); }
.toast-warn { border-left-color: var(--warn); } .toast-warn > i { color: var(--warn); }
.toast-error { border-left-color: var(--danger); } .toast-error > i { color: var(--danger); }
.toast > i { font-size: 16px; }
.toast-text { flex: 1; font-size: 13px; font-weight: 600; color: var(--heading); }
.toast-close { font-size: 12px; color: var(--muted); cursor: pointer; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17,24,23,.55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 32px; }
.modal { width: 100%; max-width: 520px; background: var(--surface); border: 2px solid var(--border-strong); box-shadow: var(--soft-shadow); display: flex; flex-direction: column; max-height: 86vh; }
.modal-sm { max-width: 440px; } .modal-md { max-width: 540px; } .modal-lg { max-width: 680px; } .modal-xl { max-width: 780px; }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px; border-bottom: 2px solid var(--border-strong); }
.modal-head > i { font-size: 20px; color: var(--primary); margin-top: 2px; }
.modal-head.is-danger > i { color: var(--danger); }
.modal-title { font-size: 16px; font-weight: 700; color: var(--heading); letter-spacing: -.2px; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.modal-x { font-size: 15px; color: var(--muted); cursor: pointer; margin-top: 3px; }
.modal-x:hover { color: var(--heading); }
.modal-body { padding: 22px 24px; overflow-y: auto; max-height: 60vh; font-size: 13.5px; line-height: 1.6; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 2px solid var(--border); background: var(--light); }
.modal-foot .modal-note { flex: 1; font-size: 12px; color: var(--muted); }

/* ---------- summary panel ---------- */
.summary { display: flex; flex-direction: column; background: var(--surface); border: 2px solid var(--border); position: sticky; top: 0; }
.summary-head { padding: 18px 20px; border-bottom: 2px solid var(--border-strong); }
.summary-rows { padding: 16px 20px; display: flex; flex-direction: column; gap: 9px; }
.summary-row { display: flex; gap: 10px; font-size: 12.5px; color: var(--text); }
.summary-row span:first-child { flex: 1; }
.summary-row b { font-weight: 600; color: var(--heading); }
.summary-total { padding: 16px 20px; background: var(--primary-light); border-top: 2px solid var(--border); display: flex; align-items: baseline; gap: 10px; }
.summary-total span { flex: 1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-dark); }
.summary-total b { font-size: 26px; font-weight: 700; color: var(--heading); letter-spacing: -.8px; }

/* ---------- empty state ---------- */
.empty { padding: 44px 20px; text-align: center; }
.empty i { font-size: 28px; color: #C8CFCC; }
.empty-title { font-size: 13.5px; font-weight: 600; color: var(--heading); margin-top: 12px; }
.empty-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- jQuery UI datepicker theme ---------- */
.ui-datepicker { font-family: Archivo, system-ui, sans-serif; width: 280px; padding: 0; border: 1.5px solid var(--border); background: var(--surface); border-radius: 0; box-shadow: var(--soft-shadow); z-index: 200 !important; }
.ui-datepicker .ui-datepicker-header { background: var(--dark); border: none; border-radius: 0; padding: 11px 8px; color: #fff; }
.ui-datepicker .ui-datepicker-title { font-size: 13px; font-weight: 700; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { top: 9px; cursor: pointer; border: none; background: transparent; }
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: none; }
.ui-datepicker .ui-datepicker-prev:after { content: "\2039"; color: #fff; font-size: 20px; line-height: 1; position: absolute; left: 8px; top: -2px; }
.ui-datepicker .ui-datepicker-next:after { content: "\203A"; color: #fff; font-size: 20px; line-height: 1; position: absolute; right: 8px; top: -2px; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { background: rgba(255,255,255,.12); border: none; top: 9px; }
.ui-datepicker table { margin: 0; font-size: 12.5px; }
.ui-datepicker th { padding: 9px 0; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1.5px solid var(--border); }
.ui-datepicker td { padding: 0; border: 1px solid var(--surface-2); }
.ui-datepicker td a, .ui-datepicker td span { display: block; padding: 9px 0; text-align: center; border: none; background: var(--surface); color: var(--text); border-radius: 0; font-weight: 500; }
.ui-datepicker td a:hover { background: var(--primary-light); color: var(--primary-dark); }
.ui-datepicker td.ui-datepicker-today a { background: var(--light); color: var(--heading); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--primary); }
.ui-datepicker td a.ui-state-active { background: var(--primary) !important; color: #fff !important; font-weight: 700; }
.ui-datepicker td.ui-datepicker-unselectable span { color: #C8CFCC; background: var(--row-hover); }
.ui-datepicker .ui-datepicker-buttonpane { border-top: 1.5px solid var(--border); padding: 8px; margin: 0; }
.ui-datepicker .ui-datepicker-buttonpane button { border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 0; cursor: pointer; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* utilities */
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* ---------- dark theme ---------- */
body[data-theme="dark"] {
  --surface: #171E1C;
  --surface-2: #141B1A;
  --row-hover: #131A19;
  --light: #0F1514;
  --heading: #E9F0ED;
  --text: #A8B5B0;
  --muted: #7E8B87;
  --border: #2A3331;
  --border-strong: #2A3331;
  --primary-light: #0E2C24;
  --primary-dark: #4FD1A5;
  --warn-light: #2A2210;
  --warn-dark: #E8B44A;
  --danger-light: #2C1512;
  --danger-dark: #F08573;
  --switch-off: #2A3331;
  --sidebar-bg: #0A0F0E;
  color-scheme: dark;
}
body[data-theme="dark"] .btn-primary:hover { background: #0AA97D; }
body[data-theme="dark"] .btn-dark:hover { background: #000; }
body[data-theme="dark"] .input, body[data-theme="dark"] .textarea, body[data-theme="dark"] .select { background: #101715; }
body[data-theme="dark"] .input::placeholder, body[data-theme="dark"] .textarea::placeholder { color: #6C7975; }
body[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.66); }
body[data-theme="dark"] .row-status-cancelled { background: #1E2422; }
body[data-theme="dark"] .row-status-confirmed { background: var(--surface); }

body[data-theme="dark"] .row-pay-nostatus        { background: #1B2220 !important; }
body[data-theme="dark"] .row-pay-charged      { background: #0E2C24 !important; }
body[data-theme="dark"] .row-pay-refunded        { background: #3A1E36 !important; }
body[data-theme="dark"] .row-pay-ccd             { background: #3A2318 !important; }
body[data-theme="dark"] .row-pay-chargedback     { background: #2B2340 !important; }
body[data-theme="dark"] .row-pay-partialrefunded { background: #1E2434 !important; }
body[data-theme="dark"] .row-pay-cvvpending      { background: #322A14 !important; }
body[data-theme="dark"] .row-pay-voided          { background: #2A3331 !important; }

body[data-theme="dark"] .tag-role-admin  { background: #0E2C24; color: #4FD1A5; }
body[data-theme="dark"] .tag-role-manager{ background: #1E2434; color: #8C9EFF; }
body[data-theme="dark"] .tag-role-agent  { background: #322A14; color: #E8B44A; }
body[data-theme="dark"] .tag-role-viewer { background: #171E1C; color: #9AA5A1; }
/* ---------- header clock + theme button ---------- */
.topbar-clock { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; padding-left: 16px; border-left: 1.5px solid var(--border); }
.clock-time { font-size: 19px; font-weight: 700; color: var(--heading); letter-spacing: -.3px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-date { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 5px; white-space: nowrap; }
.topbar .bell, .topbar .profile-chip, .topbar-divider, .topbar .dropdown { flex: 0 0 auto; }
.theme-btn { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }

/* ---------- password toggle inside input-icon ---------- */
.input-icon.has-toggle .input { padding-right: 40px; }
.input-icon > i.pw-toggle { position: absolute; left: auto; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--muted); font-size: 15px; z-index: 1; width: auto; pointer-events: auto; }
.pw-toggle:hover { color: var(--primary-dark); }

/* ---------- login brand 3D scene ---------- */
.login-3d-scene { position: absolute; inset: 0;  right:0; overflow: hidden; perspective: 1500px; pointer-events: none; transform: rotateX(50deg) rotateZ(-38deg); transform-origin: center; opacity: .16; }
.iso-tile { position: absolute; width: 64px; height: 64px; background: linear-gradient(135deg, #fff, var(--primary)); border: 1px solid rgba(255,255,255,.5); animation: isoFloat 6s ease-in-out infinite; }
@keyframes isoFloat { 0%, 100% { transform: translateZ(0); } 50% { transform: translateZ(30px); } }
@media (prefers-reduced-motion: reduce) { .iso-tile { animation: none; } }


/* ---------- login page ---------- */
.login-body { min-width: 320px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(480px, 1.05fr) minmax(480px, .95fr); background: var(--light); }
.login-brand { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; padding: 42px 52px 34px; background: var(--dark); color: #fff; display: flex; flex-direction: column; }
.login-brand::before { content: ""; position: absolute; opacity:0.4; inset: 0; z-index: -2; background: linear-gradient(135deg, rgba(13,150,111,.17), transparent 42%), linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: auto, 44px 44px, 44px 44px; }
.login-brand-glow { position: absolute; z-index: -1; width: 520px; height: 520px; right: -220px; bottom: -210px; border: 90px solid rgba(13,150,111,.07); border-radius: 50%; }
.login-brand-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 2; }
.login-logo { display: inline-flex; align-items: center; gap: 12px; color: #fff; }
.login-logo:hover { color: #fff; }
.login-logo-mark { width: 42px; height: 42px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 20px; }
.login-logo strong, .login-mobile-logo strong { display: block; font-size: 15px; line-height: 1.2; }
.login-logo small, .login-mobile-logo small { display: block; margin-top: 4px; font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .48; }
.login-secure { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.68); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.login-brand-copy { position: relative; z-index: 2; margin: auto 0; padding: 74px 0 110px; }
.login-eyebrow, .login-kicker { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--primary); }
.login-brand h1 { max-width: 620px; margin: 20px 0 18px; font-size: clamp(38px, 4.2vw, 40px); line-height: 1.3; font-weight: 700; letter-spacing: -2.3px; }
.login-brand p { max-width: 510px; margin: 0; color: rgba(255,255,255,.48); font-size: 15px; line-height: 1.75; }
.login-feature-list { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 30px; }
.login-feature-list div { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.74); font-size: 12px; font-weight: 500; }
.login-feature-list i { width: 21px; height: 21px; display: grid; place-items: center; background: rgba(13,150,111,.22); color: #65D8B6; }
.login-illustration { position: absolute; z-index: 1; right: -70px; bottom: -54px; width: min(42vw, 510px); opacity: .16; filter: saturate(.55); pointer-events: none; }
.login-brand-foot { position: relative; z-index: 2; display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.34); font-size: 10.5px; }
.login-brand-foot span { width: 3px; height: 3px; border-radius: 50%; background: var(--primary); }
.login-form-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--surface); }
.login-form-shell { width: 100%; max-width: 430px; }
.login-mobile-logo { display: none; align-items: center; gap: 12px; color: var(--heading); }
.login-card { width: 100%; }
.login-card-head { margin-bottom: 32px; }
.login-kicker { margin-bottom: 12px; }
.login-card-head h2 { margin: 0 0 9px; color: var(--heading); font-size: 28px; line-height: 1.18; font-weight: 700; letter-spacing: -.7px; }
.login-card-head p { margin: 0; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 21px; }
.login-form .input { height: 50px; font-size: 14px; }
.login-form .input-icon > i { left: 15px; }
.login-form .input-icon .input { padding-left: 42px; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.login-label-row label { color: var(--heading); font-size: 12px; font-weight: 600; }
.login-forgot { font-size: 11.5px; font-weight: 600; }
.login-password-toggle { position: absolute; z-index: 3; top: 50%; right: 4px; width: 42px; height: 42px; transform: translateY(-50%); display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.login-password-toggle:hover { color: var(--primary-dark); }
.login-remember { margin-top: -2px; }
.login-submit { height: 52px; width: 100%; justify-content: space-between; padding: 0 20px; }
.login-submit i { font-size: 17px; transition: transform .15s ease; }
.login-submit:hover i { transform: translateX(4px); }
.login-form-note { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 10.5px; }
.login-form-note i { color: var(--primary); }
.login-help { margin-top: 46px; text-align: center; color: var(--muted); font-size: 11.5px; }
.login-help a { font-weight: 600; }
.login-field-error[hidden] { display: none; }
.login-server-error { margin-bottom: 2px; }
.login-server-error .validation-summary-errors ul { margin: 0; padding: 0; list-style: none; }
#leads-rows {}
@media (max-width: 980px) {
  .login-page { grid-template-columns: minmax(330px, .85fr) minmax(420px, 1.15fr); }
  .login-brand { padding: 34px; }
  .login-secure, .login-feature-list { display: none; }
  .login-brand h1 { font-size: 42px; }
  .login-form-wrap { padding: 42px; }
}
@media (max-width: 760px) {
  .login-page { display: block; background: var(--surface); }
  .login-brand { display: none; }
  .login-form-wrap { min-height: 100vh; padding: 32px 24px; align-items: center; }
  .login-mobile-logo { display: flex; margin-bottom: 70px; }
  .login-card-head h2 { font-size: 25px; }
  .login-help { margin-top: 52px; }
}
@media (max-width: 420px) {
  .login-form-wrap { padding: 24px 18px; }
  .login-mobile-logo { margin-bottom: 50px; }
}
.theme-btn:hover { border-color: var(--primary); color: var(--primary); }
.theme-btn i { font-size: 17px; }
@media (max-width: 1180px) { .topbar-search { display: none !important; } }
@media (max-width: 1000px) { .profile-text { display: none !important; } }
@media (max-width: 820px) { .clock-date { display: none !important; } }
.btn-copy-password {
    border: 0;
    background: transparent;
    padding: 0 4px;
    margin-left: 6px;
    cursor: pointer;
    color: inherit;
    font-size: 14px;
}

.btn-copy-password:hover {
       color: var(--primary);
}

.password-strength {
    margin-top: 0px;
    margin-bottom: 0.35rem;
}
.password-strength-bar {
    height: 4px;
    width: 100%;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

#password-strength-fill {
    display: block;
    height: 100%;
    width: 0;
    transition: width .25s ease;
    border-radius: 10px; 
}

.password-weak {
    color: #dc2626;
}

.password-medium {
    color: #d97706;
}

.password-strong {
    color: #16a34a;
}
.sidebar-brand.relative{position:relative;}
.collapse-data{position:absolute; display:none; cursor:pointer; background:var(--primary); color:#fff; width:35px; height:35px; border-radius:30px;  text-align:center; line-height:35px;right: -10px; bottom: -18px; z-index:9999; }
.row-status-confirmed { background: var(--primary-light); }
.row-status-cancelled { background: var(--danger-light); }
.row-status-pending   { background: color-mix(in oklch, var(--color-accent) 8%, var(--color-bg)); }
.row-status-cancelled .link-id{color: var(--danger-dark); border-bottom: 1.5px solid var(--danger-dark);}
.row-status-cancelled .cell-sub, .row-status-confirmed .cell-sub{color: #747474;}


.table-remarks {
  width: 100%; background:var(--surface);
  border-collapse: collapse;
  border: 1.5px solid var(--border);
}
.table-remarks th {
  padding: 13px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700; text-align:center;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.table-remarks td {
  padding: 14px 16px;
  vertical-align: top;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1.5px solid var(--surface-2);
  border-right: 1.5px solid var(--surface-2);
}
.table-remarks td:last-child { border-right: none; }
.table-remarks tr:last-child td { border-bottom: none; }
.table-remarks tr:hover td { background: var(--row-hover); }
.table-remarks tbody tr:nth-child(odd) td { background: var(--light); }
.tag-role-admin{background: #E5E5E5; color: #343434;}
.tag-role-supervisor{ background: #DBF1FF; color: #0086DC;} 
.tag-role-agent{border: 1.5px solid var(--border); color: var(--text); }
.tag-role-superadmin{ background: #FFF5D6; color: #806414; }

.row-status-cancelled td { background: var(--color-neutral-200); }
.row-status-confirmed td { background: var(--color-bg); }

.row-pay-nostatus        { background: var(--color-neutral-100) !important; }
.row-pay-charged td         { background: var(--color-accent-100); }
.row-pay-refunded{ background: #FFE9FD  !important;}
.row-pay-ccd { background: #FFD3CA !important; }
.row-pay-chargedback{ background: #e4dafe !important; }
.row-pay-partialrefunded {  background: #E8EAF6 !important; }
.row-pay-cvvpending{ background:#FFEFD0  !important; }
.row-pay-voided{ background: var(--switch-off) !important; }