/*!
 * CHHATSAPP DESIGN SYSTEM  v1.0
 * ---------------------------------------------------------------------------
 * A presentation-only theme layer. It restyles the existing Argon / Bootstrap 4
 * markup, DataTables, Selectize, SweetAlert2, mdtoast, daterangepicker and the
 * chat UI without touching any ids, data-attributes, Alpine bindings or forms.
 *
 * Loaded LAST in layouts/app.blade.php (after the admin-configurable
 * "app.load_custom_style" output), so it intentionally uses `html body` prefixes
 * and !important where it must out-rank those dynamic colour rules.
 *
 * To re-theme: change the --ch-* tokens in section 1. Nothing else needs edits.
 */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* brand */
  --ch-ink: #13152e;            /* deepest indigo-ink, headings */
  --ch-primary-950: #1e1b4b;
  --ch-primary-900: #2e2a7a;
  --ch-primary-700: #4338ca;
  --ch-primary: #4f46e5;        /* Chhatsapp indigo */
  --ch-primary-500: #6366f1;
  --ch-primary-300: #a5b4fc;
  --ch-lavender: #ede9fe;       /* soft lavender */
  --ch-lavender-200: #ddd6fe;
  --ch-primary-50: #f1f0ff;
  --ch-accent: #2563eb;         /* refined blue */

  /* neutrals */
  --ch-bg: #f6f7fb;
  --ch-surface: #ffffff;
  --ch-surface-2: #fafbfe;
  --ch-border: #e6e8f1;
  --ch-border-strong: #d5d9e8;
  --ch-text: #1b1e36;
  --ch-text-2: #4a4f6a;
  --ch-muted: #70768f;

  /* semantic */
  --ch-success: #059669;  --ch-success-bg: #e8f8f1;
  --ch-danger:  #e11d48;  --ch-danger-bg:  #fdeaee;
  --ch-warning: #b45309;  --ch-warning-bg: #fef3e0;
  --ch-info:    #0284c7;  --ch-info-bg:    #e6f4fb;

  /* shape + depth */
  --ch-r-xs: 6px;
  --ch-r-sm: 8px;
  --ch-r: 12px;
  --ch-r-lg: 16px;
  --ch-r-xl: 22px;
  --ch-shadow-xs: 0 1px 2px rgba(19, 21, 46, .05);
  --ch-shadow-sm: 0 1px 3px rgba(19, 21, 46, .06), 0 1px 2px rgba(19, 21, 46, .04);
  --ch-shadow: 0 6px 20px -6px rgba(19, 21, 46, .10), 0 2px 6px rgba(19, 21, 46, .04);
  --ch-shadow-lg: 0 24px 48px -16px rgba(30, 27, 75, .22);
  --ch-ring: 0 0 0 3px rgba(79, 70, 229, .18);

  /* type */
  --ch-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ch-font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ch-sidebar-w: 264px;
}

/* ============================================================
   2. BASE
   ============================================================ */
html body {
  font-family: var(--ch-font) !important;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ch-text) !important;
  background: var(--ch-bg) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html body.lw-guest-page { background: var(--ch-surface) !important; }
::selection { background: var(--ch-lavender-200); color: var(--ch-primary-950); }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4 {
  font-family: var(--ch-font-display) !important;
  color: var(--ch-ink);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.25;
}
html body h1, html body .h1 { font-size: 1.6rem; }
html body h2, html body .h2 { font-size: 1.3rem; }
html body h3, html body .h3 { font-size: 1.08rem; }
html body h4, html body .h4 { font-size: 1rem; }
html body h5, html body .h5 { font-size: .92rem; }
html body h6, html body .h6 { font-size: .78rem; letter-spacing: .06em; }

html body a { color: var(--ch-primary); transition: color .15s ease; }
html body a:hover { color: var(--ch-primary-700); text-decoration: none; }
html body .lw-page-title { color: var(--ch-ink) !important; }
html body p { color: var(--ch-text-2); }
html body .text-muted { color: var(--ch-muted) !important; }
html body .text-primary { color: var(--ch-primary) !important; }
html body .text-success { color: var(--ch-success) !important; }
html body .text-danger { color: var(--ch-danger) !important; }
html body .text-warning { color: var(--ch-warning) !important; }
html body .text-secondary { color: var(--ch-text-2) !important; }
html body .text-light { color: var(--ch-muted) !important; }
html body .bg-secondary { background: var(--ch-bg) !important; }
html body .bg-primary { background: var(--ch-primary) !important; }
html body .bg-success { background: var(--ch-success) !important; }
html body .bg-danger { background: var(--ch-danger) !important; }
html body .bg-warning { background: #f59e0b !important; }
html body .bg-info { background: var(--ch-info) !important; }
html body .bg-default { background: var(--ch-primary-950) !important; }
html body .bg-white { background: var(--ch-surface) !important; }
html body hr { border-top-color: var(--ch-border); }
html body .border-dark, html body .border { border-color: var(--ch-border) !important; }
html body .shadow { box-shadow: var(--ch-shadow) !important; }
html body .shadow-lg { box-shadow: var(--ch-shadow-lg) !important; }
html body .rounded { border-radius: var(--ch-r) !important; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--ch-border-strong) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--ch-border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ch-muted); background-clip: content-box; border: 2px solid transparent; }

/* focus visibility (keyboard users) */
html body :focus-visible { outline: 2px solid var(--ch-primary-500); outline-offset: 2px; }
html body .form-control:focus-visible, html body .btn:focus-visible { outline: none; }

/* ============================================================
   3. APP SHELL: SIDEBAR + TOP BAR + CONTENT
   ============================================================ */
html body .main-content { background: transparent; }
html body.lw-authenticated-page .main-content { min-height: 100vh; }

/* ---- sidebar ---- */
html body #sidenav-main,
html body .navbar.lw-sidebar-container {
  background: var(--ch-surface) !important;
  border-right: 1px solid var(--ch-border) !important;
  box-shadow: none !important;
  font-family: var(--ch-font);
}
@media (min-width: 768px) {
  html body .navbar-vertical.navbar-expand-md { max-width: var(--ch-sidebar-w); width: var(--ch-sidebar-w); }
  html body .navbar-vertical.navbar-expand-md + .main-content,
  html body .navbar-vertical.navbar-expand-md ~ .main-content { margin-left: var(--ch-sidebar-w); }
  html body .navbar-vertical.navbar-expand-md .navbar-collapse { padding: 0 14px 24px; }
}
html body .navbar-vertical .navbar-brand { padding: 22px 22px 16px; }
html body .navbar-vertical .navbar-brand-img { height: 34px; max-height: none; width: auto; max-width: 100%; object-fit: contain; }
html body .navbar-vertical .navbar-brand-img.lw-sidebar-logo-small { height: 34px; width: 34px; }
html body .navbar-vertical.navbar-expand-md .navbar-nav,
html body .navbar-vertical.navbar-expand-md .navbar-nav .navbar-nav { margin-left: 0 !important; margin-right: 0 !important; }
html body .navbar-vertical.navbar-expand-md .navbar-nav .nav-link { padding-left: 12px !important; padding-right: 12px !important; }
html body .navbar-vertical.navbar-expand-md .navbar-collapse > hr, html body .navbar-vertical hr.my-3 { margin: .75rem 0 !important; border-color: var(--ch-border); }

html body .navbar-vertical .navbar-nav { gap: 2px; }
html body .navbar-vertical .navbar-nav .nav-link,
html body .navbar.lw-sidebar-container.navbar-light .navbar-nav .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px !important;
  margin: 1px 0;
  border-radius: var(--ch-r-sm);
  font-size: 13.5px; font-weight: 600 !important;
  color: var(--ch-text-2) !important;
  transition: background .15s ease, color .15s ease;
  position: relative;
}
html body .navbar-vertical .navbar-nav .nav-link .fa,
html body .navbar-vertical .navbar-nav .nav-link .fas,
html body .navbar-vertical .navbar-nav .nav-link .far,
html body .navbar.lw-sidebar-container.navbar-light .navbar-nav .nav-link .fa {
  color: var(--ch-muted) !important;
  font-size: 15px !important;
  width: 20px; min-width: 20px; text-align: center;
  background: none !important; -webkit-text-fill-color: currentColor !important;
  transition: color .15s ease;
}
/* neutralise the old multi-colour gradient icons everywhere */
html body [class*="gradient-icon"] {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}
html body .navbar-vertical .navbar-nav .nav-link:hover,
html body a.nav-link:hover { background: var(--ch-primary-50) !important; color: var(--ch-primary-700) !important; }
html body .navbar-vertical .navbar-nav .nav-link:hover .fa,
html body .navbar-vertical .navbar-nav .nav-link:hover .fas { color: var(--ch-primary) !important; }
html body .navbar-vertical .navbar-nav .nav-link.active,
html body .navbar-vertical .navbar-nav .nav-item.active > .nav-link {
  background: var(--ch-lavender) !important;
  color: var(--ch-primary-700) !important;
}
html body .navbar-vertical .navbar-nav .nav-link.active .fa,
html body .navbar-vertical .navbar-nav .nav-link.active .fas,
html body .navbar-vertical .navbar-nav .nav-item.active > .nav-link .fa { color: var(--ch-primary) !important; }
html body .navbar-vertical .navbar-nav .nav-link.active::before,
html body .lw-minimized-menu .navbar-vertical.navbar-expand-md .navbar-nav .nav-link.active:before {
  content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--ch-primary) !important; border: 0 !important;
}
/* collapsible group header chevron */
html body .navbar.lw-sidebar-container.navbar-light .navbar-nav .nav-link[data-toggle=collapse]:after {
  color: var(--ch-muted) !important; margin-left: auto;
}
/* sub menu */
html body .navbar-vertical .nav-sm { margin: 2px 0 6px 20px; padding-left: 10px; border-left: 1px solid var(--ch-border); }
html body .navbar-vertical .nav-sm .nav-link,
html body .nav-link.nav-link-ul {
  padding: 7px 10px !important; font-size: 13px; font-weight: 500 !important;
  color: var(--ch-muted) !important;
}
html body .nav-link-ul::before { display: none !important; }
html body .navbar-vertical .nav-sm .nav-link.active,
html body .nav-sm .nav-item.active .nav-link { color: var(--ch-primary-700) !important; background: var(--ch-primary-50) !important; }
html body .bg-primary-light { background: transparent; }
html body .navbar-vertical .badge { font-size: 10px; }
/* mobile toggler */
html body .navbar-vertical .navbar-toggler { border: 1px solid var(--ch-border); border-radius: var(--ch-r-sm); padding: 6px 9px; }
html body .navbar-vertical .navbar-collapse-header { border-bottom: 1px solid var(--ch-border); }
@media (max-width: 767.98px) {
  html body .navbar-vertical.navbar-expand-md { box-shadow: var(--ch-shadow-sm) !important; border-right: 0 !important; border-bottom: 1px solid var(--ch-border) !important; }
  html body .navbar-vertical .navbar-collapse { padding: 8px 16px 20px; max-height: calc(100vh - 70px); overflow-y: auto; }
  html body .navbar-vertical .navbar-brand-img { max-height: 2rem; }
}

/* ---- top bar ---- */
html body #navbar-main,
html body .main-content .navbar-top {
  background: rgba(255, 255, 255, .88) !important;
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border: 0 !important;
  border-bottom: 1px solid var(--ch-border) !important;
  box-shadow: none !important;
  color: var(--ch-text) !important;
  padding: 10px 0;
}
html body #navbar-main > .container-fluid { min-height: 44px; }
html body #navbar-main .h1,
html body #navbar-main a.h1 {
  color: var(--ch-ink) !important; font-size: 1.05rem; font-family: var(--ch-font-display);
}
html body #navbar-main a.h4 { color: var(--ch-accent) !important; font-size: .82rem; }
html body #navbar-main .nav-link { color: var(--ch-text-2) !important; border-radius: var(--ch-r-sm); }
html body #navbar-main .nav-link:hover { background: var(--ch-primary-50); }
html body #navbar-main .media-body { color: var(--ch-text) !important; font-size: 13.5px; }
html body .circular-icon {
  background: var(--ch-lavender) !important; color: var(--ch-primary-700) !important;
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px !important;
}
html body .rounded-icon { background: var(--ch-lavender) !important; color: var(--ch-primary-700); }
html body .avatar { background: var(--ch-lavender) !important; color: var(--ch-primary-700) !important; }

/* ---- page header block ---- */
html body .header { background: transparent !important; }
html body .header .bg-white.rounded.shadow {
  box-shadow: none !important; background: transparent !important; padding-left: 0 !important;
  border: 0 !important; margin-bottom: .5rem !important;
}
html body .header .lw-page-title {
  font-size: 1.55rem !important; font-weight: 800 !important; margin: 0 !important; padding: 4px 0 6px;
  letter-spacing: -.02em; color: var(--ch-ink) !important;
}
html body .header.pb-8, html body .header.pb-7 { padding-bottom: 1rem !important; }
html body .bg-gradient-primary,
html body .bg-gradient-default { background: var(--ch-primary-950) !important; }
html body .container-fluid { max-width: 1480px; }
html body .main-content > .container-fluid, html body .main-content .container-fluid.mt--7 { margin-top: 0 !important; }
html body .mt--7 { margin-top: 0 !important; }

/* ============================================================
   4. BUTTONS
   ============================================================ */
html body .btn {
  font-family: var(--ch-font); font-weight: 600; font-size: 13.5px; letter-spacing: 0;
  text-transform: none !important;
  border-radius: var(--ch-r-sm);
  padding: .55rem 1rem;
  border-width: 1px;
  box-shadow: var(--ch-shadow-xs);
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
html body .btn:hover { transform: none; box-shadow: var(--ch-shadow-sm); }
html body .btn:active { transform: translateY(1px); }
html body .btn:focus, html body .btn.focus { box-shadow: var(--ch-ring) !important; }
html body .btn-sm { padding: .38rem .75rem; font-size: 12.5px; border-radius: 7px; }
html body .btn-lg { padding: .75rem 1.3rem; font-size: 15px; border-radius: var(--ch-r); }
html body .btn i, html body .btn .fa { margin-right: .35rem; }
html body .btn-icon-only { padding: .5rem; }

html body .btn.btn-primary, html body .btn.btn-primary.btn-sm {
  background: var(--ch-primary) !important; border-color: var(--ch-primary) !important; color: #fff !important;
}
html body .btn.btn-primary:hover, html body .btn.btn-primary.btn-sm:hover {
  background: var(--ch-primary-700) !important; border-color: var(--ch-primary-700) !important;
}
html body .btn.btn-default, html body .btn-sm.btn-default {
  background: var(--ch-primary-950) !important; border-color: var(--ch-primary-950) !important; color: #fff !important;
}
html body .btn.btn-default:hover { background: var(--ch-primary-900) !important; border-color: var(--ch-primary-900) !important; }
html body .btn.btn-secondary {
  background: var(--ch-surface) !important; border-color: var(--ch-border-strong) !important; color: var(--ch-text) !important;
}
html body .btn.btn-secondary:hover { background: var(--ch-surface-2) !important; border-color: var(--ch-primary-300) !important; color: var(--ch-primary-700) !important; }
html body .btn.btn-success, html body .btn-success.btn-sm {
  background: var(--ch-success) !important; border-color: var(--ch-success) !important; color: #fff !important;
}
html body .btn.btn-success:hover { background: #047857 !important; border-color: #047857 !important; }
html body .btn.btn-danger, html body .btn-danger.btn-sm {
  background: var(--ch-danger) !important; border-color: var(--ch-danger) !important; color: #fff !important;
}
html body .btn.btn-danger:hover { background: #be123c !important; border-color: #be123c !important; }
html body .btn.btn-warning, html body .btn-warning.btn-sm {
  background: #f59e0b !important; border-color: #f59e0b !important; color: #2a1a00 !important;
}
html body .btn.btn-warning:hover { background: #d98a06 !important; border-color: #d98a06 !important; }
html body .btn.btn-info { background: var(--ch-info) !important; border-color: var(--ch-info) !important; color: #fff !important; }
html body .btn.btn-light, html body .btn-light.btn-sm {
  background: var(--ch-surface) !important; border-color: var(--ch-border) !important; color: var(--ch-text-2) !important;
}
html body .btn.btn-light:hover { background: var(--ch-primary-50) !important; border-color: var(--ch-primary-300) !important; color: var(--ch-primary-700) !important; }
html body .btn.btn-dark, html body .btn-dark.btn-sm {
  background: var(--ch-ink) !important; border-color: var(--ch-ink) !important; color: #fff !important;
}
html body .btn.btn-neutral { background: var(--ch-surface) !important; color: var(--ch-text) !important; border-color: var(--ch-border) !important; }
html body .btn.btn-outline-primary { color: var(--ch-primary) !important; border-color: var(--ch-primary-300) !important; background: transparent !important; box-shadow: none; }
html body .btn.btn-outline-primary:hover { background: var(--ch-primary) !important; color: #fff !important; border-color: var(--ch-primary) !important; }
html body .btn.btn-outline-light, html body .btn.btn-outline-secondary { color: var(--ch-text-2) !important; border-color: var(--ch-border-strong) !important; background: var(--ch-surface) !important; box-shadow: none; }
html body .btn.btn-outline-light:hover, html body .btn.btn-outline-secondary:hover { background: var(--ch-primary-50) !important; color: var(--ch-primary-700) !important; }
html body .btn.btn-outline-danger { color: var(--ch-danger) !important; border-color: #f5b5c2 !important; background: transparent !important; box-shadow: none; }
html body .btn.btn-outline-danger:hover { background: var(--ch-danger) !important; color: #fff !important; }
html body .btn.btn-outline-success { color: var(--ch-success) !important; border-color: #9bdcc2 !important; background: transparent !important; box-shadow: none; }
html body .btn.btn-outline-success:hover { background: var(--ch-success) !important; color: #fff !important; }
html body a.lw-btn, html body a.lw-btn:hover { color: #fff !important; }
html body .btn-link { box-shadow: none; color: var(--ch-primary); }
html body .btn.disabled, html body .btn:disabled { opacity: .55; box-shadow: none; }
html body .btn-block + .btn-block { margin-top: .5rem; }
html body .btn-google, html body .btn-facebook {
  background: var(--ch-surface) !important; color: var(--ch-text) !important; border: 1px solid var(--ch-border-strong) !important;
}
html body .btn-google:hover, html body .btn-facebook:hover { background: var(--ch-surface-2) !important; border-color: var(--ch-primary-300) !important; }
html body .btn-google .fa-google { color: #ea4335; } html body .btn-facebook .fa-facebook-f { color: #1877f2; }

/* ============================================================
   5. FORMS
   ============================================================ */
html body label, html body .form-control-label {
  font-size: 12.5px; font-weight: 600; color: var(--ch-text-2); margin-bottom: .35rem; letter-spacing: 0;
}
html body .form-control,
html body .custom-select,
html body .selectize-input,
html body .dataTables_wrapper .dataTables_length select,
html body .dataTables_wrapper div.dataTables_filter input {
  font-family: var(--ch-font); font-size: 14px; color: var(--ch-text);
  background-color: var(--ch-surface); border: 1px solid var(--ch-border-strong);
  border-radius: var(--ch-r-sm); box-shadow: var(--ch-shadow-xs);
  height: auto; min-height: 42px; padding: .6rem .85rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
html body textarea.form-control { min-height: 96px; }
html body .form-control::placeholder { color: #a3a8bd; }
html body .form-control:focus, html body .custom-select:focus,
html body .selectize-input.focus, html body .input-group:focus-within .form-control {
  border-color: var(--ch-primary-500) !important; box-shadow: var(--ch-ring) !important; outline: 0; background: #fff;
}
html body .form-control[readonly], html body .form-control:disabled { background: var(--ch-surface-2); color: var(--ch-muted); }
html body .form-control-sm { min-height: 34px; padding: .4rem .65rem; font-size: 13px; }
html body .form-control-lg { min-height: 50px; font-size: 15.5px; }
html body .form-control-alternative { box-shadow: var(--ch-shadow-xs); }
html body .form-group { margin-bottom: 1.1rem; }
html body .input-group { box-shadow: none; border-radius: var(--ch-r-sm); }
html body .input-group-alternative { box-shadow: var(--ch-shadow-xs); border: 1px solid var(--ch-border-strong); }
html body .input-group-text {
  background: var(--ch-surface-2); border: 1px solid var(--ch-border-strong); color: var(--ch-muted); border-radius: var(--ch-r-sm);
}
html body .input-group-prepend .input-group-text { border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
html body .input-group-append .input-group-text { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
html body .input-group .form-control:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
html body .input-group .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* validation */
html body .lw-validation-error, html body label.lw-validation-error { display: block; color: var(--ch-danger) !important; font-size: 12.5px; font-weight: 500; margin: .35rem 0 0; }
html body .form-control.is-invalid, html body .has-danger .form-control { border-color: var(--ch-danger) !important; background-image: none; }
html body .form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(225, 29, 72, .16) !important; }
html body .form-control.is-valid { border-color: var(--ch-success); background-image: none; }
html body .invalid-feedback, html body .text-danger.lw-error, html body .lw-validation-message { color: var(--ch-danger); font-size: 12.5px; font-weight: 500; }

/* checkbox / radio */
html body .custom-control-label { font-size: 13.5px; font-weight: 500; color: var(--ch-text-2); }
html body .custom-control-label::before {
  border: 1.5px solid var(--ch-border-strong) !important; background: var(--ch-surface) !important; box-shadow: none !important;
}
html body .custom-checkbox .custom-control-label::before { border-radius: 5px; }
html body .custom-control-input:checked ~ .custom-control-label::before,
html body .custom-checkbox .custom-control-input:checked ~ .custom-control-label::before,
html body .custom-radio .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--ch-primary) !important; border-color: var(--ch-primary) !important;
}
html body .custom-control-input:focus ~ .custom-control-label::before { box-shadow: var(--ch-ring) !important; }
html body .custom-control-alternative .custom-control-label::before { box-shadow: none; }

/* switchery toggles */
html body .switchery { height: 22px !important; width: 42px; border-radius: 22px !important; box-shadow: inset 0 0 0 1px var(--ch-border-strong) !important; }
html body .switchery > small { height: 22px !important; width: 22px; border-radius: 50% !important; box-shadow: 0 1px 3px rgba(0,0,0,.25) !important; }

/* selectize */
html body .selectize-input { min-height: 42px; display: flex; flex-wrap: wrap; align-items: center; }
html body .selectize-input.items.has-items { padding: .35rem .6rem; }
html body .selectize-control.multi .selectize-input > div {
  background: var(--ch-lavender) !important; color: var(--ch-primary-700) !important;
  border-radius: 6px; font-weight: 600; font-size: 12.5px; padding: 2px 8px; border: 0;
}
html body .selectize-dropdown {
  border: 1px solid var(--ch-border); border-radius: var(--ch-r-sm); box-shadow: var(--ch-shadow); margin-top: 4px; overflow: hidden;
}
html body .selectize-dropdown .active { background: var(--ch-primary-50); color: var(--ch-primary-700); }
html body .selectize-dropdown [data-selectable], html body .selectize-dropdown .optgroup-header { padding: 8px 12px; }

/* file input / emoji */
html body .custom-file-label { border-radius: var(--ch-r-sm); border: 1px solid var(--ch-border-strong); min-height: 42px; line-height: 1.9; }
html body .custom-file-label::after { background: var(--ch-lavender); color: var(--ch-primary-700); border-left: 1px solid var(--ch-border); border-radius: 0 var(--ch-r-sm) var(--ch-r-sm) 0; line-height: 1.9; }
html body fieldset { border: 1px solid var(--ch-border); border-radius: var(--ch-r); padding: 0 1rem 1rem; margin-bottom: 1rem; }
html body legend {
  background: var(--ch-lavender) !important; color: var(--ch-primary-700); font-weight: 700; font-size: 12.5px;
  border-radius: 999px; width: auto; padding: 3px 12px; margin: 0 0 .9rem; letter-spacing: 0;
}
html body input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset !important; }

/* ============================================================
   6. CARDS
   ============================================================ */
html body .card {
  background: var(--ch-surface) !important; border: 1px solid var(--ch-border) !important;
  border-radius: var(--ch-r-lg); box-shadow: var(--ch-shadow-sm) !important;
}
html body .card.shadow, html body .card.shadow-lg { box-shadow: var(--ch-shadow-sm) !important; }
html body .card-header {
  background: transparent !important; border-bottom: 1px solid var(--ch-border) !important;
  padding: 1.1rem 1.4rem; border-radius: var(--ch-r-lg) var(--ch-r-lg) 0 0;
}
html body .card-header h1, html body .card-header h2, html body .card-header h3 { margin: 0; }
html body .card-body { padding: 1.4rem; }
html body .card-footer { background: var(--ch-surface-2) !important; border-top: 1px solid var(--ch-border) !important; border-radius: 0 0 var(--ch-r-lg) var(--ch-r-lg); }
html body .card.bg-transparent, html body .card-header.bg-transparent { background: transparent !important; }

/* KPI / stat cards */
html body .card-stats {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
html body .card-stats:hover { transform: translateY(-2px); box-shadow: var(--ch-shadow) !important; border-color: var(--ch-primary-300) !important; }
html body .card-stats .card-title, html body .card-stats h5 {
  text-transform: uppercase; font-size: 11px !important; letter-spacing: .07em; font-weight: 700; color: var(--ch-muted) !important;
  font-family: var(--ch-font);
}
html body .card-stats .h2, html body .card-stats .font-weight-bold { color: var(--ch-ink) !important; font-family: var(--ch-font-display); }
html body .stats-icon, html body .stats-icon-secondary, html body [class*="gradient-icon-lg"] {
  background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--ch-primary) !important;
}
html body .icon.icon-shape { border-radius: 12px; background: var(--ch-lavender) !important; color: var(--ch-primary-700) !important; box-shadow: none; }
html body .lw-bg-red, html body .lw-bg-light-yellow { background: var(--ch-surface) !important; }
html body .card .card-text { color: var(--ch-text-2); }

/* ============================================================
   7. TABLES + DATATABLES + PAGINATION
   ============================================================ */
html body .table { color: var(--ch-text); margin-bottom: 0; }
html body .table thead th, html body th {
  background: var(--ch-surface-2) !important; color: var(--ch-muted) !important;
  font-family: var(--ch-font); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-top: 0 !important; border-bottom: 1px solid var(--ch-border) !important; padding: .85rem 1rem; white-space: nowrap;
}
html body .table td, html body td {
  background: transparent !important; color: var(--ch-text) !important;
  border-top: 1px solid var(--ch-border) !important; padding: .9rem 1rem; vertical-align: middle; font-size: 13.5px;
}
html body td a { color: var(--ch-primary) !important; font-weight: 600; }
html body td a.btn { font-weight: 600; }
html body td a.btn-primary, html body td a.btn-danger, html body td a.btn-success, html body td a.btn-default, html body td a.btn-dark, html body td a.btn-info { color: #fff !important; }
html body td a.btn-light, html body td a.btn-secondary { color: var(--ch-text-2) !important; }
html body td a.btn-warning { color: #2a1a00 !important; }
html body .table-hover tbody tr:hover td, html body div.dataTables_wrapper table.dataTable > tbody > tr:hover td { background: var(--ch-primary-50) !important; }
html body .table-striped tbody tr:nth-of-type(odd) td, html body div.dataTables_wrapper .table-striped tbody tr:nth-of-type(odd) td { background: transparent !important; }
html body .table-responsive, html body .dataTables_wrapper { border-radius: var(--ch-r); }
html body table.dataTable { border-collapse: separate; border-spacing: 0; width: 100% !important; }
html body table.dataTable thead th { position: relative; }
html body .dtr-control::before { background-color: var(--ch-primary) !important; }
html body table.dataTable > tbody > tr.child ul.dtr-details { width: 100%; }
html body .dataTables_wrapper .dataTables_length, html body .dataTables_wrapper .dataTables_filter { margin: .9rem 1.2rem; }
html body .dataTables_wrapper .dataTables_length label, html body .dataTables_wrapper .dataTables_filter label { font-weight: 500; color: var(--ch-muted); }
html body .dataTables_wrapper .dataTables_filter input { min-height: 38px; margin-left: .5rem; width: min(260px, 60vw); }
html body .dataTables_wrapper .dataTables_length select { min-height: 38px; margin: 0 .4rem; padding-right: 1.8rem; }
html body .dataTables_wrapper .dataTables_info { color: var(--ch-muted); font-size: 12.5px; padding: 1rem 1.2rem; }
html body .dataTables_wrapper .dataTables_paginate { padding: .7rem 1.2rem; }
html body .dataTables_processing { background: var(--ch-surface); border: 1px solid var(--ch-border); border-radius: var(--ch-r); box-shadow: var(--ch-shadow); color: var(--ch-primary); }
html body .lds-ring div { border-color: var(--ch-primary) transparent transparent transparent !important; }

html body .pagination { gap: 4px; margin: 0; }
html body .page-link {
  border: 1px solid var(--ch-border) !important; border-radius: var(--ch-r-sm) !important; color: var(--ch-text-2);
  background: var(--ch-surface); font-weight: 600; font-size: 13px; min-width: 36px; text-align: center; margin: 0;
}
html body .page-link:hover { background: var(--ch-primary-50); color: var(--ch-primary-700); border-color: var(--ch-primary-300) !important; }
html body li.active a.page-link, html body .page-item.active .page-link {
  background: var(--ch-primary) !important; border-color: var(--ch-primary) !important; color: #fff !important;
}
html body .page-item.disabled .page-link { background: var(--ch-surface-2); color: #b5bace; }
html body .dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: var(--ch-r-sm) !important; border: 0 !important; }
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current { background: var(--ch-primary) !important; color: #fff !important; }

/* ============================================================
   8. MODALS, DROPDOWNS, ALERTS, BADGES, TABS, MISC
   ============================================================ */
html body .modal-content {
  border: 1px solid var(--ch-border); border-radius: var(--ch-r-xl); box-shadow: var(--ch-shadow-lg); overflow: hidden;
}
html body .modal-header { border-bottom: 1px solid var(--ch-border); padding: 1.15rem 1.5rem; background: var(--ch-surface); }
html body .modal-header .modal-title { font-family: var(--ch-font-display); font-weight: 700; font-size: 1.05rem; color: var(--ch-ink); }
html body .modal-header .close { opacity: .6; font-size: 1.5rem; text-shadow: none; border-radius: 8px; padding: .5rem .8rem; margin: -.5rem -.8rem -.5rem auto; }
html body .modal-header .close:hover { opacity: 1; background: var(--ch-bg); }
html body .modal-body { padding: 1.4rem 1.5rem; }
html body .modal-footer { border-top: 1px solid var(--ch-border); background: var(--ch-surface-2); padding: .9rem 1.5rem; }
html body .modal-backdrop.show { opacity: .5; background: var(--ch-primary-950); }

html body .dropdown-menu {
  border: 1px solid var(--ch-border); border-radius: var(--ch-r); box-shadow: var(--ch-shadow); padding: 6px; min-width: 12rem; margin-top: 6px;
}
html body .dropdown-item {
  border-radius: 8px; padding: .55rem .75rem; font-size: 13.5px; font-weight: 500; color: var(--ch-text-2); transition: background .12s ease;
}
html body .dropdown-item:hover, html body .dropdown-item:focus { background: var(--ch-primary-50); color: var(--ch-primary-700); }
html body .dropdown-item.active, html body .dropdown-item:active { background: var(--ch-primary) !important; color: #fff !important; border-color: transparent !important; }
html body .dropdown-divider { border-top-color: var(--ch-border); margin: 6px 0; }
html body .dropdown-header { color: var(--ch-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
html body .dropdown-menu-arrow::before { display: none; }

html body .alert {
  border-radius: var(--ch-r); border-width: 1px; padding: .9rem 1.1rem; font-size: 13.5px; box-shadow: none;
}
html body .alert.alert-success { background: var(--ch-success-bg) !important; border-color: #b6e8d3 !important; color: #065f46 !important; }
html body .alert.alert-danger { background: var(--ch-danger-bg) !important; border-color: #f7bfca !important; color: #9f1239 !important; }
html body .alert.alert-warning { background: var(--ch-warning-bg) !important; border-color: #f7d9a8 !important; color: #92400e !important; }
html body .alert.alert-info, html body .alert.alert-primary { background: var(--ch-info-bg) !important; border-color: #b8dff1 !important; color: #075985 !important; }
html body .alert.alert-primary { background: var(--ch-primary-50) !important; border-color: var(--ch-lavender-200) !important; color: var(--ch-primary-900) !important; }
html body .alert.alert-dark, html body .alert.alert-secondary, html body .alert.alert-default { background: var(--ch-surface-2) !important; border-color: var(--ch-border) !important; color: var(--ch-text-2) !important; }
html body .alert a, html body .alert .alert-link { color: inherit; text-decoration: underline; font-weight: 600; }
html body .alert .close { color: inherit; }

html body .badge {
  font-family: var(--ch-font); font-weight: 700; font-size: 11px; letter-spacing: .02em; padding: .35em .7em; border-radius: 999px; text-transform: none;
}
html body .badge.badge-primary { background: var(--ch-lavender) !important; color: var(--ch-primary-700) !important; }
html body .badge.badge-success { background: var(--ch-success-bg) !important; color: #047857 !important; }
html body .badge.badge-danger { background: var(--ch-danger-bg) !important; color: #be123c !important; }
html body .badge.badge-warning { background: var(--ch-warning-bg) !important; color: #92400e !important; }
html body .badge.badge-info { background: var(--ch-info-bg) !important; color: #075985 !important; }
html body .badge.badge-secondary, html body .badge.badge-light, html body .badge.badge-default, html body .badge.badge-dark { background: #eceef6 !important; color: var(--ch-text-2) !important; }
html body .badge.bg-success { background: var(--ch-primary) !important; color: #fff !important; }

html body .nav-tabs { border-bottom: 1px solid var(--ch-border); gap: 4px; }
html body .nav-tabs .nav-link {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-weight: 600; font-size: 13.5px; color: var(--ch-muted); padding: .7rem 1rem; background: transparent;
}
html body .nav-tabs .nav-link:hover { color: var(--ch-primary-700); background: transparent; border-color: transparent transparent var(--ch-border-strong); }
html body .nav-tabs .nav-link.active, html body .nav-tabs .nav-item.show .nav-link {
  color: var(--ch-primary-700) !important; background: transparent !important; border-color: transparent transparent var(--ch-primary) !important;
}
html body .nav-pills .nav-link { border-radius: var(--ch-r-sm); font-weight: 600; color: var(--ch-text-2); }
html body .nav-pills .nav-link.active, html body .nav-pills .show > .nav-link { background: var(--ch-primary) !important; color: #fff !important; box-shadow: var(--ch-shadow-sm); }

html body .list-group-item { border-color: var(--ch-border); background: var(--ch-surface); }
html body .list-group-item-action:hover { background: var(--ch-primary-50); }
html body .list-group-item-light { background: var(--ch-primary-50) !important; }
html body .progress { background: #eceef6; border-radius: 999px; height: .6rem; box-shadow: none; }
html body .progress-bar { background: var(--ch-primary); border-radius: 999px; }
html body .breadcrumb { background: transparent; }
html body .tooltip-inner { background: var(--ch-primary-950); border-radius: 8px; padding: .4rem .7rem; font-size: 12px; }
html body .popover { border: 1px solid var(--ch-border); border-radius: var(--ch-r); box-shadow: var(--ch-shadow); }
html body .accordion .card, html body .accordion-item { border-radius: var(--ch-r) !important; margin-bottom: .6rem; }
html body .accordion-button:not(.collapsed) { background: var(--ch-primary-50); color: var(--ch-primary-700); box-shadow: none; }

/* SweetAlert2 + mdtoast + daterangepicker */
html body .swal2-popup { border-radius: var(--ch-r-xl); font-family: var(--ch-font); padding: 1.8rem; box-shadow: var(--ch-shadow-lg); }
html body .swal2-title { font-family: var(--ch-font-display); color: var(--ch-ink); font-size: 1.3rem; }
html body div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm,
html body .swal2-confirm.swal2-styled, html body .swal2-styled.swal2-confirm {
  background: var(--ch-primary) !important; border: 0 !important; border-radius: var(--ch-r-sm); font-weight: 600; box-shadow: none !important;
}
html body .swal2-cancel.swal2-styled { background: var(--ch-surface) !important; color: var(--ch-text-2) !important; border: 1px solid var(--ch-border-strong) !important; border-radius: var(--ch-r-sm); font-weight: 600; }
html body .swal2-styled.swal2-deny { border-radius: var(--ch-r-sm); }
html body .mdtoast {
  font-family: var(--ch-font); border-radius: var(--ch-r) !important; box-shadow: var(--ch-shadow) !important; font-weight: 500;
}
html body .mdtoast.mdt--primary { background: var(--ch-primary-950) !important; border-color: var(--ch-primary-950) !important; }
html body .mdtoast.mdt--success { background: #065f46 !important; border-color: #065f46 !important; }
html body .mdtoast.mdt--danger { background: #9f1239 !important; border-color: #9f1239 !important; }
html body .mdtoast.mdt--warning { background: #92400e !important; border-color: #92400e !important; }
html body .daterangepicker { border: 1px solid var(--ch-border); border-radius: var(--ch-r); box-shadow: var(--ch-shadow); font-family: var(--ch-font); }
html body .daterangepicker td.active, html body .daterangepicker td.active:hover { background: var(--ch-primary) !important; }
html body .daterangepicker td.in-range { background: var(--ch-primary-50); }
html body .daterangepicker .ranges li.active { background: var(--ch-primary); }
html body .daterangepicker .drp-buttons .btn { padding: .35rem .8rem; }

/* empty states: DataTables + generic */
html body .dataTables_empty, html body .lw-empty-state, html body td.dataTables_empty {
  color: var(--ch-muted) !important; text-align: center; padding: 3rem 1rem !important; font-size: 14px;
}
html body .lw-disabled-block-content { opacity: .55; }

/* ============================================================
   9. DASHBOARD HELPERS
   ============================================================ */
html body .main-content .container-fluid > .row { row-gap: 0; }
html body .card .card-header .h3, html body .card .card-header h3.mb-0 { font-size: 1.02rem; }
html body .chart { min-height: 260px; }
html body .text-gray, html body .text-gray-600 { color: var(--ch-muted) !important; }
html body .lw-form-card-box .card-header { background: transparent !important; }

/* ============================================================
   10. GUEST / AUTH (generic + new split layout classes)
   ============================================================ */
html body.lw-guest-page .main-content { background: var(--ch-surface); }
html body.lw-guest-page { padding-bottom: 0 !important; }
html body.lw-guest-page > footer { display: none; }

/* guest header (login / register / contact / CMS pages) */
html body .navbar-horizontal.navbar-top {
  position: relative; background: rgba(255,255,255,.92) !important; border-bottom: 1px solid var(--ch-border) !important;
  box-shadow: none !important; padding: .55rem 0; z-index: 20;
}
html body .navbar-horizontal .navbar-brand { padding: 0; margin-right: 1.5rem; }
html body .navbar-horizontal .navbar-brand-img { height: 34px; width: auto; max-width: 190px; object-fit: contain; }
html body .navbar-horizontal .navbar-nav .nav-link {
  color: var(--ch-text-2) !important; font-weight: 600; font-size: 13.5px; padding: .5rem .8rem; border-radius: var(--ch-r-sm);
}
html body .navbar-horizontal .navbar-nav .nav-link:hover { background: var(--ch-primary-50); color: var(--ch-primary-700) !important; }
html body .navbar-horizontal .navbar-nav .nav-link.text-danger,
html body .navbar-horizontal .navbar-nav .nav-link .text-danger {
  background: var(--ch-primary); color: #fff !important; padding: .42rem .95rem; border-radius: 999px; display: inline-block; font-weight: 700;
}
html body .navbar-horizontal .navbar-toggler { border: 1px solid var(--ch-border); border-radius: var(--ch-r-sm); color: var(--ch-ink); }
html body .navbar-horizontal .navbar-toggler-icon { color: var(--ch-ink); background-image: none; }
@media (max-width: 767.98px) {
  html body .navbar-horizontal .navbar-collapse { background: var(--ch-surface); border: 1px solid var(--ch-border); border-radius: var(--ch-r); box-shadow: var(--ch-shadow); padding: .75rem; margin-top: .6rem; }
  html body .navbar-horizontal .navbar-collapse-header { border-bottom: 1px solid var(--ch-border); padding-bottom: .75rem; margin-bottom: .5rem; }
}

.ch-auth { min-height: calc(100vh - 62px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--ch-surface); }
.ch-auth-aside {
  position: relative; overflow: hidden; color: #fff; padding: 3rem 3.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(900px 500px at 105% -10%, rgba(165, 180, 252, .38), transparent 60%),
    radial-gradient(700px 460px at -10% 110%, rgba(124, 58, 237, .35), transparent 60%),
    linear-gradient(160deg, #1e1b4b 0%, #2e2a7a 55%, #3b34a8 100%);
}
.ch-auth-aside::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}
.ch-auth-aside > * { position: relative; z-index: 1; }
.ch-brand { display: inline-flex; align-items: center; gap: .65rem; color: inherit !important; font-family: var(--ch-font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.02em; }
.ch-brand:hover { color: inherit !important; }
.ch-brand img { height: 36px; width: auto; max-width: 190px; object-fit: contain; }
.ch-brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #818cf8, #4f46e5); display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(79, 70, 229, .6); }
.ch-brand-mark svg { width: 20px; height: 20px; }
.ch-auth-hero h2 { color: #fff !important; font-size: clamp(1.7rem, 2.6vw, 2.4rem) !important; font-weight: 800; line-height: 1.15; max-width: 16ch; margin: 0 0 1rem; }
.ch-auth-hero p { color: rgba(255, 255, 255, .78) !important; max-width: 38ch; font-size: 1rem; margin-bottom: 1.8rem; }
.ch-auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.ch-auth-points li { display: flex; align-items: center; gap: .75rem; color: rgba(255, 255, 255, .9); font-weight: 500; font-size: .95rem; }
.ch-auth-points li i { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: .8rem; flex: none; }
.ch-auth-foot { color: rgba(255, 255, 255, .55); font-size: .8rem; }
.ch-auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--ch-surface); }
.ch-auth-card { width: 100%; max-width: 420px; }
.ch-auth-card .ch-brand-mobile { display: none; color: var(--ch-ink) !important; margin-bottom: 2rem; }
.ch-auth-card h1.ch-auth-title { font-size: 1.75rem !important; font-weight: 800; margin: 0 0 .4rem; }
.ch-auth-card .ch-auth-sub { color: var(--ch-muted) !important; margin-bottom: 1.8rem; font-size: .95rem; }
.ch-auth-card .form-control { min-height: 46px; }
.ch-auth-card .btn-block, .ch-auth-card .ch-btn-main { min-height: 46px; font-size: 14.5px; font-weight: 700; border-radius: var(--ch-r-sm); }
.ch-auth-divider { display: flex; align-items: center; gap: .8rem; color: var(--ch-muted); font-size: .8rem; margin: 1.4rem 0; }
.ch-auth-divider::before, .ch-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--ch-border); }
.ch-auth-alt { text-align: center; color: var(--ch-muted); font-size: .9rem; margin-top: 1.6rem; }
.ch-auth-alt a { font-weight: 700; }
.ch-pw-wrap { position: relative; }
.ch-pw-wrap .form-control { padding-right: 2.9rem; }
.ch-pw-toggle { position: absolute; right: 6px; top: 6px; border: 0; background: transparent; color: var(--ch-muted); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.ch-pw-toggle:hover { background: var(--ch-bg); color: var(--ch-primary); }
.ch-auth-hint { color: var(--ch-muted) !important; font-size: .78rem; margin-top: .35rem; display: block; }
.ch-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.ch-auth-row .custom-control { margin: 0; }
html body .ch-auth .text-light { color: var(--ch-muted) !important; }
html body .ch-auth .alert { margin-bottom: 1.2rem; }
.ch-auth .input-group-append .ch-pw-toggle { position: static; width: auto; height: auto; padding: 0 .9rem; border: 1px solid var(--ch-border-strong); border-left: 0; border-radius: 0 var(--ch-r-sm) var(--ch-r-sm) 0; background: var(--ch-surface-2); }
.ch-auth .input-group .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
@media (max-width: 991.98px) {
  .ch-auth { grid-template-columns: 1fr; }
  .ch-auth-aside { display: none; }
  .ch-auth-card .ch-brand-mobile { display: inline-flex; }
  .ch-auth-main { align-items: flex-start; padding-top: 2.5rem; }
}

/* legacy auth card (kept for any view still using .lw-guest-page-container-block) */
html body .lw-guest-page-container-block .card { border-radius: var(--ch-r-xl); box-shadow: var(--ch-shadow-lg) !important; }

/* ============================================================
   11. CHAT / MESSAGING (visual only — selectors prefixed to out-rank
       dist/css/whatsapp-chat.css which is injected in-body)
   ============================================================ */
html body .card.lw-whatsapp-chat-block-container { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window { background: transparent !important; }
html body .card.lw-whatsapp-chat-block-container .lw-contact-list-block {
  background: var(--ch-surface) !important; border: 1px solid var(--ch-border); border-radius: var(--ch-r-lg);
  box-shadow: var(--ch-shadow-sm); padding: 1.1rem !important;
}
html body .card.lw-whatsapp-chat-block-container .lw-contact-crm-block {
  background: var(--ch-surface) !important; border: 1px solid var(--ch-border); border-radius: var(--ch-r-lg); box-shadow: var(--ch-shadow-sm);
}
html body .card.lw-whatsapp-chat-block-container .lw-contact-list-block h1 { font-size: 1.15rem; margin: 0; }
html body .card.lw-whatsapp-chat-block-container .lw-contacts-header { font-size: 1rem; }
html body .card.lw-whatsapp-chat-block-container .nav-tabs { border-color: var(--ch-border) !important; }
html body .card.lw-whatsapp-chat-block-container .nav-tabs .nav-link { font-size: 12.5px; padding: .55rem .7rem; }
html body .card.lw-whatsapp-chat-block-container .lw-contact-list { box-shadow: none !important; }
html body .card.lw-whatsapp-chat-block-container .lw-contact.list-group-item {
  border: 0; border-radius: var(--ch-r); margin-bottom: 2px; padding: .75rem .8rem; background: transparent;
}
html body .card.lw-whatsapp-chat-block-container .lw-contact.list-group-item:hover { background: var(--ch-primary-50); }
html body .card.lw-whatsapp-chat-block-container .lw-contact.list-group-item-light,
html body .card.lw-whatsapp-chat-block-container .lw-contact.list-group-item.list-group-item-light { background: var(--ch-lavender) !important; }
html body .card.lw-whatsapp-chat-block-container .lw-contact h3 { font-size: .9rem; font-weight: 700; margin-bottom: 2px; color: var(--ch-ink); }
html body .card.lw-whatsapp-chat-block-container .lw-contact-avatar,
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .user-bar .avatar {
  background: linear-gradient(135deg, #818cf8, #4f46e5) !important; color: #fff !important; font-weight: 700;
}
html body .card.lw-whatsapp-chat-block-container .lw-contact .badge.bg-success,
html body .card.lw-whatsapp-chat-block-container .lw-contact .badge.rounded-pill { background: var(--ch-primary) !important; color: #fff !important; }

/* conversation panel */
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .marvel-device .screen,
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .screen-container {
  border-radius: var(--ch-r-lg); background: var(--ch-surface) !important; border: 1px solid var(--ch-border); box-shadow: var(--ch-shadow-sm); overflow: hidden;
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .user-bar {
  background: var(--ch-primary-950) !important; color: #fff; border-bottom: 0;
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .user-bar .name { font-family: var(--ch-font-display); font-weight: 700; }
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .conversation {
  background-color: #eef0fa !important;
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .message {
  border-radius: 14px; box-shadow: 0 1px 2px rgba(19, 21, 46, .08); font-size: 14px; line-height: 1.45;
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .message.received {
  background: #ffffff !important; color: var(--ch-text); border-top-left-radius: 4px;
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .message.received:after { border-right-color: #fff !important; }
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .message.sent {
  background: var(--ch-lavender) !important; color: var(--ch-primary-950); border-top-right-radius: 4px;
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .message.sent:after { border-left-color: var(--ch-lavender) !important; }
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .message .metadata .time { color: var(--ch-muted); }
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .conversation-compose {
  background: var(--ch-surface) !important; border-top: 1px solid var(--ch-border);
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .conversation-compose .input-msg,
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .emojionearea,
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .emojionearea .emojionearea-editor {
  background: var(--ch-bg) !important; border-radius: 22px !important; border: 1px solid var(--ch-border) !important; box-shadow: none !important;
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .emojionearea.focused { border-color: var(--ch-primary-500) !important; box-shadow: var(--ch-ring) !important; }
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .conversation-compose .send .circle {
  background: var(--ch-primary) !important; border-color: var(--ch-primary-700) !important; box-shadow: 0 6px 14px -4px rgba(79, 70, 229, .55);
}
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .lw-highlight-replied-message { background: var(--ch-warning-bg) !important; }
html body .card.lw-whatsapp-chat-block-container .text-success { color: #a7f3d0 !important; }
html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .user-bar .text-yellow { color: #fcd34d !important; }

/* ============================================================
   12. WHATSAPP TEMPLATE PREVIEW / BOT FLOW / MISC FEATURE SCREENS
   ============================================================ */
html body .lw-whatsapp-preview .card, html body .lw-whatsapp-preview-message-container .card { border-radius: 14px; box-shadow: 0 1px 2px rgba(19, 21, 46, .1) !important; }
html body .lw-qr-image { border-radius: var(--ch-r); border: 1px solid var(--ch-border); padding: .5rem; background: #fff; }

/* ============================================================
   13. ERROR / SYSTEM PAGES
   ============================================================ */
.ch-error { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1.25rem; background:
  radial-gradient(800px 400px at 50% -10%, var(--ch-lavender), transparent 70%), var(--ch-bg); text-align: center; }
.ch-error-card { max-width: 520px; background: var(--ch-surface); border: 1px solid var(--ch-border); border-radius: var(--ch-r-xl); padding: 3rem 2.25rem; box-shadow: var(--ch-shadow); }
.ch-error-code { font-family: var(--ch-font-display); font-weight: 800; font-size: clamp(3.5rem, 12vw, 5.5rem); line-height: 1; letter-spacing: -.05em;
  background: linear-gradient(135deg, var(--ch-primary-500), var(--ch-primary-900)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: .75rem; }
.ch-error-card h1 { font-size: 1.4rem; margin-bottom: .5rem; }
.ch-error-card p { color: var(--ch-muted); margin-bottom: 1.6rem; }

/* ============================================================
   14. RESPONSIVE POLISH
   ============================================================ */
@media (max-width: 991.98px) {
  html body .container-fluid { padding-left: 14px; padding-right: 14px; }
  html body .card-body { padding: 1.1rem; }
  html body .card-header { padding: .95rem 1.1rem; }
  html body .header .lw-page-title { font-size: 1.3rem !important; }
  html body .table td, html body td, html body th { padding: .7rem .75rem; }
  html body .dataTables_wrapper .dataTables_filter, html body .dataTables_wrapper .dataTables_length { margin: .6rem .8rem; float: none; text-align: left; }
  html body .dataTables_wrapper .dataTables_filter input { width: 100%; margin: .4rem 0 0; display: block; }
}
@media (max-width: 575.98px) {
  html body .btn { min-height: 40px; }
  html body .btn-sm { min-height: 34px; }
  html body .modal-dialog { margin: .6rem; }
  html body .modal-body, html body .modal-header, html body .modal-footer { padding-left: 1.1rem; padding-right: 1.1rem; }
  html body .dataTables_wrapper .dataTables_paginate { text-align: center; float: none; padding: .6rem; }
  html body .pagination { flex-wrap: wrap; justify-content: center; }
}
html body .table-responsive, html body .card-body > .dataTables_wrapper, html body .dataTables_wrapper { max-width: 100%; }
html body img, html body video { max-width: 100%; }
@media print { html body #sidenav-main, html body #navbar-main { display: none !important; } html body .main-content { margin: 0 !important; } }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* sidebar logo: out-rank legacy sizing in dist/css/app.css */
html body .navbar-vertical .navbar-brand .navbar-brand-img.lw-sidebar-logo-normal { height: 36px !important; min-height: 0 !important; width: auto !important; max-width: 100% !important; max-height: none !important; }
html body .navbar-vertical .navbar-brand .navbar-brand-img.lw-sidebar-logo-small { height: 36px !important; min-height: 0 !important; width: 36px !important; }
html body .navbar-vertical i[class*="gradient-icon"] { color: var(--ch-muted) !important; }
html body .navbar-vertical .nav-link.active i[class*="gradient-icon"], html body .navbar-vertical .nav-link:hover i[class*="gradient-icon"] { color: var(--ch-primary) !important; }

/* chat: fix pre-existing horizontal overflow on small screens (row gutters without parent padding) */
@media (max-width: 767.98px) {
  html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window > .row,
  html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .row { margin-left: 0; margin-right: 0; }
  html body .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window [class*="col-"] { padding-left: 8px; padding-right: 8px; max-width: 100%; }
}
