/* ==========================================================================
   Locovypaar CRM — modern theme
   Loaded AFTER the template's style.css (and page-level <style> blocks are
   out-scoped by higher specificity), so it re-skins every page without
   touching markup or JavaScript. Remove the <link> to go back to the old look.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --lv-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --lv-primary: #4f46e5;
    --lv-primary-600: #4338ca;
    --lv-primary-50: #eef2ff;
    --lv-primary-100: #e0e7ff;
    --lv-ring: 0 0 0 3px rgba(79, 70, 229, .18);

    --lv-bg: #f5f6fa;
    --lv-surface: #ffffff;
    --lv-border: #e6e8ef;
    --lv-border-strong: #d6d9e3;
    --lv-text: #111827;
    --lv-text-2: #4b5563;
    --lv-muted: #8a91a3;

    --lv-sidebar: #0f172a;
    --lv-sidebar-2: #1e293b;
    --lv-sidebar-text: #aab4c8;

    --lv-success: #16a34a;
    --lv-success-50: #dcfce7;
    --lv-warning: #d97706;
    --lv-warning-50: #fef3c7;
    --lv-danger: #dc2626;
    --lv-danger-50: #fee2e2;
    --lv-info: #0284c7;
    --lv-info-50: #e0f2fe;

    --lv-radius: 12px;
    --lv-radius-sm: 8px;
    --lv-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
    --lv-shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .06);
}

/* ---------- Base ---------------------------------------------------------- */
html body {
    font-family: var(--lv-font);
    background: var(--lv-bg);
    color: var(--lv-text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
body h1, body h2, body h3, body h4, body h5, body h6,
body .h1, body .h2, body .h3, body .h4, body .h5, body .h6 {
    font-family: var(--lv-font);
    color: var(--lv-text);
    letter-spacing: -.01em;
}
body a { color: var(--lv-primary); }
body a:hover { color: var(--lv-primary-600); }
body .text-muted { color: var(--lv-muted) !important; }
body ::selection { background: var(--lv-primary-100); }

body div#global-loader { background: var(--lv-bg); }
body .whirly-loader:not(:required) { color: var(--lv-primary); }

/* Scrollbars */
body ::-webkit-scrollbar { width: 10px; height: 10px; }
body ::-webkit-scrollbar-thumb { background: #cbd0dc; border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
body ::-webkit-scrollbar-thumb:hover { background-color: #aeb4c3; }
body ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Header -------------------------------------------------------- */
html body .header {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--lv-border);
    box-shadow: none;
}
html body .header .header-left {
    background: var(--lv-sidebar);
    border-right: 1px solid var(--lv-sidebar);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
html body .header .header-left .logo,
html body .header .header-left .logo-small {
    background: transparent;
    box-shadow: none;
}
html body .header .header-left .logo:hover { box-shadow: none; }
/* Collapse toggle: the template draws it with ::before/::after borders */
html body #toggle_btn:before { border-color: rgba(255, 255, 255, .55); }
html body .header-left.active #toggle_btn:after { border-color: var(--lv-sidebar); background-color: #fff; }
html body .header .user-menu .top-nav-search .searchinputs input,
html body .header .top-nav-search form input {
    background: var(--lv-bg);
    border: 1px solid var(--lv-border);
    border-radius: 10px;
    color: var(--lv-text);
    height: 38px;
    font-size: 13.5px;
}
html body .header .top-nav-search form input:focus {
    border-color: var(--lv-primary);
    box-shadow: var(--lv-ring);
    background: #fff;
}
html body .header .user-img img {
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--lv-border-strong);
}
html body .header .menu-drop-user,
html body .dropdown-menu {
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius);
    box-shadow: var(--lv-shadow-lg);
    padding: 6px;
}
html body .dropdown-item {
    border-radius: var(--lv-radius-sm);
    font-size: 13.5px;
    color: var(--lv-text-2);
    padding: 8px 12px;
}
html body .dropdown-item:hover,
html body .dropdown-item:focus {
    background: var(--lv-primary-50);
    color: var(--lv-primary-600);
}
/* On phones the dark logo bar spans the whole header, so its icons go white */
html body .header .mobile_btn .bar-icon span { background: #fff; }
html body .header .mobile-user-menu > a,
html body .header .mobile-user-menu > a i { color: #fff; }

/* ---------- Sidebar ------------------------------------------------------- */
html body .sidebar,
html body .sidebar .slimScrollDiv {
    background: var(--lv-sidebar) !important;}
    border-right: 0;
    box-shadow: none;
}
html body .sidebar .sidebar-menu { padding: 14px 12px; }
html body .sidebar .sidebar-menu > ul > li { margin-bottom: 2px; }
html body .sidebar .sidebar-menu > ul > li > a {
    border-radius: 10px;
    padding: 9px 12px;
    color: var(--lv-sidebar-text);
    font-weight: 500;
    font-size: 13.5px;
    transition: background .15s ease, color .15s ease;
}
html body .sidebar .sidebar-menu > ul > li > a span { color: var(--lv-sidebar-text); font-weight: 500; }
html body .sidebar .sidebar-menu > ul > li > a img,
html body .sidebar .sidebar-menu > ul > li > a svg {
    filter: brightness(0) invert(1);
    opacity: .55;
    width: 18px;
    transition: opacity .15s ease;
}
html body .sidebar .sidebar-menu > ul > li > a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}
html body .sidebar .sidebar-menu > ul > li > a:hover span { color: #fff; }
html body .sidebar .sidebar-menu > ul > li > a:hover img { opacity: .9; }

html body .sidebar .sidebar-menu > ul > li.active > a {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #fff !important;
    border-radius: 10px;
    box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .7);
}
html body .sidebar .sidebar-menu > ul > li.active > a span { color: #fff !important; }
html body .sidebar .sidebar-menu > ul > li.active > a img { opacity: 1; filter: brightness(0) invert(1) !important; }

/* Submenus */
html body .sidebar .sidebar-menu > ul > li.submenu ul {
    background: rgba(255, 255, 255, .03) !important;
    border-radius: 10px !important;
    padding: 4px !important;
    margin-top: 4px !important;
}
html body .sidebar .sidebar-menu > ul > li.submenu ul li a {
    color: var(--lv-sidebar-text) !important;
    font-size: 13px !important;
    padding: 7px 12px 7px 38px !important;
    border-radius: 8px !important;
}
html body .sidebar .sidebar-menu > ul > li.submenu ul li a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .06) !important;
}
html body .sidebar .sidebar-menu > ul > li.submenu ul li a.active {
    color: #fff !important;
    background: rgba(99, 102, 241, .28) !important;
    font-weight: 600 !important;
}
html body .sidebar .sidebar-menu > ul > li.submenu ul li a::after,
html body .sidebar .sidebar-menu > ul > li.submenu ul li a:hover::after,
html body .sidebar .sidebar-menu > ul > li.submenu ul li a.active::after {
    border-color: #64748b !important;
    background: transparent !important;
}
html body .sidebar .sidebar-menu > ul > li.submenu ul li a.active::after {
    background: #818cf8 !important;
    border-color: #818cf8 !important;
}
html body .sidebar .menu-arrow::before { color: var(--lv-sidebar-text); }
html body .sidebar .menu-title, html body .sidebar .sidebar-menu h6 { color: #64748b; }

/* Collapsed ("mini") sidebar keeps the same colours */
html body.mini-sidebar .header-left { background: var(--lv-sidebar); }

/* ---------- Page layout --------------------------------------------------- */
html body .page-wrapper { background: var(--lv-bg); }
html body .page-wrapper .content { padding: 28px 28px 40px; }
@media (max-width: 991px) {
    html body .page-wrapper .content { padding: 16px; }
}

html body .page-header { margin-bottom: 22px; }
html body .page-header .page-title h4,
html body .page-title h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--lv-text);
    margin-bottom: 4px;
}
html body .page-header .page-title h6,
html body .page-title h6 {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--lv-muted);
}

/* ---------- Cards --------------------------------------------------------- */
html body .card {
    background: var(--lv-surface);
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius);
    box-shadow: var(--lv-shadow);
    margin-bottom: 22px;
}
html body .card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--lv-border);
    padding: 16px 20px;
}
html body .card .card-header .card-title,
html body .card .card-title {
    font-weight: 600;
    font-size: 15.5px;
    color: var(--lv-text);
}
html body .card .card-body { padding: 20px; }
html body .card .card-footer {
    background: #fafbfc;
    border-top: 1px solid var(--lv-border);
    border-radius: 0 0 var(--lv-radius) var(--lv-radius);
}

/* Dashboard widgets from the template */
html body .dash-widget {
    background: var(--lv-surface);
    border: 1px solid var(--lv-border);
    border-radius: var(--lv-radius);
    box-shadow: var(--lv-shadow);
    padding: 18px;
}
html body .dash-widget .dash-widgetcontent h5 { font-weight: 700; font-size: 20px; color: var(--lv-text); }
html body .dash-widget .dash-widgetcontent h6 { color: var(--lv-muted); font-weight: 500; }
html body .dash-count {
    border-radius: var(--lv-radius);
    box-shadow: var(--lv-shadow);
    padding: 18px 20px;
}
html body .dash-count .dash-counts h4 { font-weight: 700; }

/* ---------- Buttons ------------------------------------------------------- */
html body .btn {
    font-family: var(--lv-font);
    font-weight: 600;
    font-size: 13.5px;
    border-radius: 10px;
    padding: 8px 16px;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .05s ease;
}
html body .btn:active { transform: translateY(1px); }
html body .btn:focus, html body .btn:focus-visible { box-shadow: var(--lv-ring); }
html body .btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
html body .btn-lg { padding: 11px 22px; font-size: 15px; }

html body .btn-primary,
html body .btn-submit,
html body .page-header .btn-added,
html body .btn-added {
    background: var(--lv-primary) !important;
    border: 1px solid var(--lv-primary) !important;
    min-width: 0;
    color: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08), inset 0 1px 0 rgba(255, 255, 255, .12);
}
html body .btn-primary:hover,
html body .btn-submit:hover,
html body .page-header .btn-added:hover,
html body .btn-added:hover {
    background: var(--lv-primary-600) !important;
    border-color: var(--lv-primary-600) !important;
    color: #fff;
}
html body .page-header .btn-added img,
html body .btn-added img { filter: brightness(0) invert(1); }

html body .btn-cancel,
html body .btn-secondary,
html body .btn-light,
html body .btn-white {
    background: #ffffff !important;
    min-width: 0 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
    transition: all .15s ease !important;
}
html body .btn-cancel:hover,
html body .btn-secondary:hover,
html body .btn-light:hover,
html body .btn-white:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, .08) !important;
}
html body .btn-success { background: var(--lv-success); border-color: var(--lv-success); color: #fff; }
html body .btn-success:hover { background: #15803d; border-color: #15803d; }
html body .btn-danger { background: var(--lv-danger); border-color: var(--lv-danger); color: #fff; }
html body .btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
html body .btn-warning { background: #f59e0b; border-color: #f59e0b; color: #fff; }
html body .btn-info { background: var(--lv-info); border-color: var(--lv-info); color: #fff; }

html body .btn-outline-primary { color: var(--lv-primary); border-color: #c7d2fe; background: #fff; }
html body .btn-outline-primary:hover { background: var(--lv-primary-50); color: var(--lv-primary-600); border-color: #a5b4fc; }
html body .btn-outline-info { color: var(--lv-info); border-color: #bae6fd; background: #fff; }
html body .btn-outline-info:hover { background: var(--lv-info-50); color: #0369a1; border-color: #7dd3fc; }
html body .btn-outline-success { color: var(--lv-success); border-color: #bbf7d0; background: #fff; }
html body .btn-outline-success:hover { background: var(--lv-success-50); color: #15803d; }
html body .btn-outline-danger { color: var(--lv-danger); border-color: #fecaca; background: #fff; }
html body .btn-outline-danger:hover { background: var(--lv-danger-50); color: #b91c1c; }
html body .btn-outline-secondary { color: var(--lv-text-2); border-color: var(--lv-border-strong); background: #fff; }
html body .btn-outline-secondary:hover { background: #f3f4f7; color: var(--lv-text); }
html body .btn-outline-warning { color: var(--lv-warning); border-color: #fde68a; background: #fff; }
html body .btn-outline-warning:hover { background: var(--lv-warning-50); color: #b45309; }

/* ---------- Forms --------------------------------------------------------- */
html body .form-control,
html body .form-select,
html body .form-group input[type=text],
html body .form-group input[type=email],
html body .form-group input[type=password],
html body .form-group input[type=number],
html body .form-group input[type=tel],
html body .form-group input[type=date],
html body .form-group select,
html body .form-group textarea,
html body .input-blocks input[type=text],
html body .input-blocks input[type=email],
html body .input-blocks input[type=password],
html body .input-blocks input[type=number],
html body .input-blocks input[type=tel],
html body .input-blocks input[type=date],
html body .input-blocks select,
html body .input-blocks textarea {
    font-family: var(--lv-font);
    border: 1px solid var(--lv-border-strong);
    border-radius: 10px;
    background-color: #fff;
    color: var(--lv-text);
    font-size: 14px;
    min-height: 40px;
    padding: 8px 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
html body textarea.form-control, html body .input-blocks textarea { min-height: 80px; }
html body .form-control-sm, html body .form-select-sm { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
html body .form-control:focus,
html body .form-select:focus,
html body .form-group input:focus,
html body .form-group select:focus,
html body .form-group textarea:focus,
html body .input-blocks input:focus,
html body .input-blocks select:focus,
html body .input-blocks textarea:focus {
    border-color: var(--lv-primary);
    box-shadow: var(--lv-ring);
    outline: 0;
}
html body .form-control::placeholder { color: #a3a9b8; }
html body .form-control:disabled, html body .form-control[readonly] { background-color: #f6f7f9; }

html body label,
html body .form-label,
html body .form-group label,
html body .input-blocks label {
    font-weight: 600;
    font-size: 13px;
    color: var(--lv-text-2);
    margin-bottom: 6px;
}
html body .form-check-input { border-color: var(--lv-border-strong); width: 1.05em; height: 1.05em; }
html body .form-check-input:checked { background-color: var(--lv-primary); border-color: var(--lv-primary); }
html body .form-check-input:focus { box-shadow: var(--lv-ring); border-color: var(--lv-primary); }
html body .form-check-label { font-weight: 500; }
html body .input-group-text {
    background: #f6f7f9;
    border: 1px solid var(--lv-border-strong);
    border-radius: 10px;
    color: var(--lv-text-2);
}

/* Select2 */
html body .select2-container .select2-selection--single {
    height: 40px;
    border: 1px solid var(--lv-border-strong);
    border-radius: 10px;
}
html body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 38px; color: var(--lv-text); padding-left: 12px; }
html body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; }
html body .select2-container--default.select2-container--focus .select2-selection--single,
html body .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--lv-primary);
    box-shadow: var(--lv-ring);
}
html body .select2-dropdown { border: 1px solid var(--lv-border); border-radius: 10px; box-shadow: var(--lv-shadow-lg); overflow: hidden; }
html body .select2-container--default .select2-results__option--highlighted[aria-selected],
html body .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--lv-primary);
}

/* ---------- Tables -------------------------------------------------------- */
html body .table {
    color: var(--lv-text);
    font-size: 13.5px;
    margin-bottom: 0;
}
html body .table > :not(caption) > * > * { border-bottom-color: var(--lv-border); }
html body .table thead tr th,
html body .table thead th,
html body table.dataTable thead th {
    background: #f8f9fc;
    color: var(--lv-muted);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--lv-border) !important;
    border-top: 0;
    padding: 12px 14px;
    white-space: nowrap;
}
html body .table tbody tr td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #eef0f5;
    color: var(--lv-text);
}
html body .table tbody tr:last-child td { border-bottom: 0; }
html body .table-hover > tbody > tr:hover > *,
html body .table tbody tr:hover td { background: #fafbff; --bs-table-accent-bg: transparent; }
html body .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #fbfbfd; }
html body .table-responsive { border-radius: var(--lv-radius); }

/* Business name cell: readable width, max two lines, full name on hover */
html body .lv-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 200px;
    max-width: 280px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    font-weight: 600;
    line-height: 1.4;
    color: var(--lv-text);
}
html body .card .table-responsive { border-radius: 0; }

/* DataTables controls */
html body .dataTables_wrapper .dataTables_length select,
html body .dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--lv-border-strong);
    border-radius: 10px;
    padding: 6px 10px;
    min-height: 36px;
    font-size: 13px;
}
html body .dataTables_wrapper .dataTables_filter input:focus { border-color: var(--lv-primary); box-shadow: var(--lv-ring); outline: 0; }
html body .dataTables_wrapper .dataTables_info { color: var(--lv-muted); font-size: 13px; }

/* Pagination (Bootstrap + DataTables) */
html body .pagination { gap: 4px; }
html body .page-item .page-link,
html body .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--lv-border);
    border-radius: 8px !important;
    background: #fff;   /* the old template's grey would show through otherwise */
    color: var(--lv-text-2);
    font-weight: 500;
    font-size: 13px;
    min-width: 34px;
    text-align: center;
    margin: 0;
}
html body .page-item .page-link:hover { background: var(--lv-primary-50); color: var(--lv-primary-600); border-color: #c7d2fe; }
html body .page-item.active .page-link,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--lv-primary) !important;
    border-color: var(--lv-primary) !important;
    color: #fff !important;
}
html body .page-item.disabled .page-link { color: #c0c5d1; background: #fff; }

/* ---------- Badges -------------------------------------------------------- */
html body .badge {
    font-family: var(--lv-font);
    font-weight: 600;
    font-size: 11.5px;
    border-radius: 999px;
    padding: 4px 10px;
    letter-spacing: .01em;
}
html body .badge.bg-primary   { background: var(--lv-primary-50) !important; color: var(--lv-primary-600) !important; }
html body .badge.bg-success   { background: var(--lv-success-50) !important; color: #15803d !important; }
html body .badge.bg-danger    { background: var(--lv-danger-50) !important;  color: #b91c1c !important; }
html body .badge.bg-warning   { background: var(--lv-warning-50) !important; color: #b45309 !important; }
html body .badge.bg-info      { background: var(--lv-info-50) !important;    color: #0369a1 !important; }
html body .badge.bg-secondary { background: #eef0f4 !important; color: #475569 !important; }
html body .badge.bg-dark      { background: #1f2937 !important; color: #fff !important; }
html body .badge.bg-light     { background: #f3f4f6 !important; color: #374151 !important; }

/* Template status pills */
html body .badges { border-radius: 999px; font-weight: 600; font-size: 11.5px; padding: 4px 10px; }
html body .bg-lightgreen { background: var(--lv-success-50) !important; color: #15803d !important; }
html body .bg-lightred   { background: var(--lv-danger-50) !important;  color: #b91c1c !important; }
html body .bg-lightyellow{ background: var(--lv-warning-50) !important; color: #b45309 !important; }

/* ---------- Modals -------------------------------------------------------- */
html body .modal-backdrop.show { opacity: .45; background: #0b1020; }
html body .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 64px -12px rgba(16, 24, 40, .35);
    overflow: hidden;
}
html body .modal-header,
html body .custom-modal-header {
    background: #fff;
    border-bottom: 1px solid var(--lv-border);
    padding: 18px 24px;
}
html body .modal-header .modal-title,
html body .custom-modal-header h4,
html body .modal-title {
    font-weight: 700;
    font-size: 17px;
    color: var(--lv-text);
}
html body .modal-body,
html body .custom-modal-body { padding: 22px 24px; }
html body .modal-footer {
    border-top: 1px solid var(--lv-border);
    padding: 14px 24px;
    background: #fafbfc;
    gap: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
html body .modal-footer-btn {
    border-top: 1px solid var(--lv-border);
    padding-top: 16px;
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* Modal Cancel / Secondary Button styling - sharp, unambiguous visibility */
html body .modal-footer .btn-light,
html body .modal-footer .btn-secondary,
html body .modal-footer .btn-cancel,
html body .modal-footer .btn-white,
html body .modal-footer [data-bs-dismiss="modal"]:not(.btn-close):not(.close),
html body .modal-footer-btn .btn-cancel,
html body .modal-footer-btn .btn-secondary,
html body .modal-footer-btn .btn-light,
html body .modal-footer-btn [data-bs-dismiss="modal"]:not(.btn-close):not(.close),
html body .modal-body [data-bs-dismiss="modal"]:not(.btn-close):not(.close) {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
    cursor: pointer !important;
    transition: all .15s ease-in-out !important;
}

html body .modal-footer .btn-light:hover,
html body .modal-footer .btn-secondary:hover,
html body .modal-footer .btn-cancel:hover,
html body .modal-footer .btn-white:hover,
html body .modal-footer [data-bs-dismiss="modal"]:not(.btn-close):not(.close):hover,
html body .modal-footer-btn .btn-cancel:hover,
html body .modal-footer-btn .btn-secondary:hover,
html body .modal-footer-btn .btn-light:hover,
html body .modal-footer-btn [data-bs-dismiss="modal"]:not(.btn-close):not(.close):hover,
html body .modal-body [data-bs-dismiss="modal"]:not(.btn-close):not(.close):hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, .08) !important;
}

/* Compact button variants in modals */
html body .modal-footer .btn-sm,
html body .modal-footer-btn .btn-sm {
    padding: 6px 14px !important;
    font-size: 12.5px !important;
}

/* Universal Cross / Close Button Styling Across All Modals & Panels */
html body .modal .btn-close,
html body .modal .close,
html body .modal-header .btn-close,
html body .modal-header .close,
html body .offcanvas-header .btn-close,
html body .offcanvas .btn-close,
html body button.btn-close {
    box-sizing: border-box !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    opacity: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: #334155 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    text-align: center !important;
    transition: all .15s ease !important;
    box-shadow: none !important;
}

/* Explicit SVG cross icon for .btn-close (which has no inner text in Bootstrap 5) */
html body .modal .btn-close,
html body .modal-header .btn-close,
html body .offcanvas-header .btn-close,
html body .offcanvas .btn-close,
html body button.btn-close {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23334155'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.414 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 11px 11px !important;
}

/* Fallback for empty .close buttons */
html body .modal .close:empty::before,
html body .modal-header .close:empty::before,
html body button.close:empty::before {
    content: "\00d7" !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    color: #334155 !important;
    display: inline-block !important;
}

/* Hover state: crisp dark slate feedback */
html body .modal .btn-close:hover,
html body .modal .close:hover,
html body .modal-header .btn-close:hover,
html body .modal-header .close:hover,
html body .offcanvas-header .btn-close:hover,
html body button.btn-close:hover {
    background-color: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
    opacity: 1 !important;
}

html body .modal .btn-close:hover,
html body .modal-header .btn-close:hover,
html body .offcanvas-header .btn-close:hover,
html body button.btn-close:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230f172a'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.414 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E") !important;
}

/* White cross button for dark headers (e.g. .btn-close-white, bg-primary, bg-dark, bg-success, bg-danger) */
html body .modal .btn-close.btn-close-white,
html body .btn-close.btn-close-white,
html body .modal-header.bg-primary .btn-close,
html body .modal-header.bg-dark .btn-close,
html body .modal-header.bg-success .btn-close,
html body .modal-header.bg-danger .btn-close,
html body .modal-header.text-white .btn-close,
html body .modal-header.bg-primary .close,
html body .modal-header.bg-dark .close,
html body .modal-header.bg-success .close,
html body .modal-header.bg-danger .close {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

html body .modal .btn-close.btn-close-white,
html body .btn-close.btn-close-white,
html body .modal-header.bg-primary .btn-close,
html body .modal-header.bg-dark .btn-close,
html body .modal-header.bg-success .btn-close,
html body .modal-header.bg-danger .btn-close,
html body .modal-header.text-white .btn-close {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.414 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E") !important;
}

html body .modal .btn-close.btn-close-white:hover,
html body .btn-close.btn-close-white:hover,
html body .modal-header.bg-primary .btn-close:hover,
html body .modal-header.bg-dark .btn-close:hover,
html body .modal-header.bg-success .btn-close:hover,
html body .modal-header.bg-danger .btn-close:hover,
html body .modal-header.text-white .btn-close:hover,
html body .modal-header.bg-primary .close:hover,
html body .modal-header.bg-dark .close:hover,
html body .modal-header.bg-success .close:hover,
html body .modal-header.bg-danger .close:hover {
    background-color: rgba(255, 255, 255, 0.38) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
}

/* ---------- Alerts / SweetAlert / Toastr --------------------------------- */
html body .alert { border-radius: var(--lv-radius); border: 1px solid transparent; font-size: 13.5px; }
html body .alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
html body .alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
html body .alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
html body .alert-info    { background: #f0f9ff; border-color: #bae6fd; color: #075985; }

/* SweetAlert Dialog (modal) */
html body .swal2-popup:not(.swal2-toast) {
    font-family: var(--lv-font) !important;
    border-radius: 16px !important;
    padding: 28px 24px 22px !important;
}
html body .swal2-popup:not(.swal2-toast) .swal2-title {
    font-size: 20px !important;
    color: var(--lv-text) !important;
}
html body .swal2-styled.swal2-confirm {
    background: var(--lv-primary) !important;
    border: 1px solid var(--lv-primary) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    padding: 9px 20px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
}
html body .swal2-styled.swal2-confirm:hover {
    background: var(--lv-primary-600) !important;
    border-color: var(--lv-primary-600) !important;
}
html body .swal2-styled.swal2-cancel {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    padding: 9px 20px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
    cursor: pointer !important;
    transition: all .15s ease !important;
}
html body .swal2-styled.swal2-cancel:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   SweetAlert2 Toasts — Top Right & Standardized Compact Size
   ========================================================================== */
html body.swal2-toast-shown .swal2-container,
html body .swal2-container.swal2-top-end,
html body .swal2-container.swal2-top-right,
html body .swal2-container.swal2-bottom-end,
html body .swal2-container.swal2-bottom-right,
html body .swal2-container.swal2-bottom,
html body .swal2-container.swal2-bottom-left,
html body .swal2-container.swal2-bottom-start {
    top: calc(var(--lv-topbar-h, 70px) + 12px) !important;
    bottom: auto !important;
    right: 18px !important;
    left: auto !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    padding: 0 !important;
    pointer-events: none !important;
    z-index: 2200 !important;
}
html body.swal2-toast-shown .swal2-container .swal2-popup.swal2-toast,
html body .swal2-container .swal2-popup.swal2-toast {
    pointer-events: auto !important;
    width: 340px !important;
    max-width: calc(100vw - 32px) !important;
    box-sizing: border-box !important;
    margin: 0 0 8px 0 !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    box-shadow: 0 10px 25px -5px rgba(2, 6, 23, .16), 0 1px 3px rgba(2, 6, 23, .08) !important;
    font-family: var(--lv-font) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}
html body .swal2-popup.swal2-toast .swal2-header {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
}
html body .swal2-popup.swal2-toast .swal2-icon {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    margin: 0 8px 0 0 !important;
    border-width: 2px !important;
}
html body .swal2-popup.swal2-toast .swal2-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    text-align: left !important;
    flex: 1 !important;
}
html body .swal2-popup.swal2-toast .swal2-html-container {
    font-size: 12px !important;
    color: #475569 !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
}
html body .swal2-popup.swal2-toast .swal2-close {
    width: 24px !important;
    height: 24px !important;
    font-size: 16px !important;
    line-height: 24px !important;
    color: #94a3b8 !important;
    margin: 0 0 0 auto !important;
}
html body .swal2-popup.swal2-toast .swal2-close:hover {
    color: #0f172a !important;
}

/* ---------- Tabs / nav pills --------------------------------------------- */
html body .nav-tabs { border-bottom: 1px solid var(--lv-border); gap: 4px; }
html body .nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--lv-muted);
    font-weight: 600;
    font-size: 13.5px;
    padding: 10px 14px;
    border-radius: 0;
}
html body .nav-tabs .nav-link:hover { color: var(--lv-text); }
html body .nav-tabs .nav-link.active { color: var(--lv-primary); border-bottom-color: var(--lv-primary); background: transparent; }
html body .nav-pills .nav-link { border-radius: 10px; font-weight: 600; color: var(--lv-text-2); }
html body .nav-pills .nav-link.active { background: var(--lv-primary); }

/* ---------- Misc ---------------------------------------------------------- */
html body .progress { background: #eef0f5; border-radius: 999px; }
html body .progress-bar { background-color: var(--lv-primary); }
html body hr { border-color: var(--lv-border); opacity: 1; }
html body .bg-light { background-color: #f6f7fa !important; }
html body .border { border-color: var(--lv-border) !important; }
html body .rounded { border-radius: var(--lv-radius-sm) !important; }
html body .shadow-sm { box-shadow: var(--lv-shadow) !important; }

/* Filter / search bars from the template */
html body .table-top .search-set .search-input input[type=search],
html body .search-set .search-input input {
    border: 1px solid var(--lv-border-strong);
    border-radius: 10px;
    height: 38px;
}
html body .search-set .btn-filter,
html body .page-header .btn-filter {
    background: var(--lv-primary);
    border-radius: 10px;
}

/* ---------- Login page ---------------------------------------------------- */
html body .login-wrapper {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, .18), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(56, 189, 248, .14), transparent 60%),
        var(--lv-bg);
}
html body .login-wrapper .login-content .login-userset {
    background: #fff;
    border: 1px solid var(--lv-border);
    border-radius: 18px;
    box-shadow: var(--lv-shadow-lg);
    padding: 36px 32px;
}
html body .login-wrapper .login-content .login-userheading h3 { font-weight: 800; font-size: 24px; }
html body .login-wrapper .login-content .login-userheading h4 { color: var(--lv-muted); font-weight: 400; font-size: 14px; }
html body .login-wrapper .login-content .form-login input {
    border: 1px solid var(--lv-border-strong);
    border-radius: 10px;
    height: 44px;
}
html body .login-wrapper .login-content .form-login input:focus { border-color: var(--lv-primary); box-shadow: var(--lv-ring); }
html body .login-wrapper .login-content .btn-login {
    background: var(--lv-primary) !important;
    border-color: var(--lv-primary) !important;
    color: #fff !important;
    border-radius: 10px;
    font-weight: 600;
    height: 44px;
    padding: 0;
}
html body .login-wrapper .login-content .btn-login:hover {
    background: var(--lv-primary-600) !important;
    box-shadow: none !important;
    color: #fff !important;
}

/* Admin sign-in ("login-new" variant): centred card, logo above it */
html body .login-wrapper.login-new { justify-content: center; }
html body .login-wrapper.login-new .login-content {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
html body .login-wrapper.login-new .login-content .login-logo { margin: 0 0 20px; }
html body .login-wrapper.login-new .login-content form { width: 100%; }
html body .login-wrapper.login-new .login-content .login-userset { width: 100%; max-width: none; }

/* Right-hand panel: replace the stock orange illustration with a brand panel */
html body .login-wrapper .login-img {
    position: relative;
    background:
        radial-gradient(700px 400px at 80% 10%, rgba(129, 140, 248, .45), transparent 60%),
        radial-gradient(600px 400px at 10% 90%, rgba(56, 189, 248, .25), transparent 60%),
        linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
html body .login-wrapper .login-img img { display: none; }
html body .login-wrapper .login-img::before {
    content: "Every lead, every call,\A one place.";
    white-space: pre;
    color: #fff;
    font-family: var(--lv-font);
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    max-width: 520px;
    padding: 0 48px;
}
html body .login-wrapper .login-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}
html body .login-wrapper .login-content .login-logo {
    background: var(--lv-sidebar);
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 12px;
}

/* ---------- KPI / stat cards ---------------------------------------------
   Pages use saturated gradient .stat-card tiles; restyle them as white cards
   with a tinted icon tile. Each variant just sets its tone colour. */
html body .stat-card {
    --tone: #4f46e5;
    background: #fff !important;
    color: var(--lv-text) !important;
    border: 1px solid var(--lv-border);
    border-radius: 14px;
    box-shadow: var(--lv-shadow);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
html body .stat-card::after {
    content: "";
    position: absolute;
    right: -30px; top: -30px;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: var(--tone);
    opacity: .06;
    pointer-events: none;
}
html body a:hover > .stat-card,
html body .stat-card-link:hover .stat-card,
html body .stat-card:hover { box-shadow: var(--lv-shadow-lg); border-color: #dfe2ea; }
html body .stat-card .icon {
    width: 46px !important; height: 46px !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--tone) 12%, #fff) !important;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 18%, #fff);
}
html body .stat-card .icon i { color: var(--tone) !important; font-size: 20px !important; }
html body .stat-card h3 {
    font-family: var(--lv-heading, inherit);
    color: var(--lv-text) !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    letter-spacing: -.02em;
}
html body .stat-card p { color: var(--lv-muted) !important; opacity: 1 !important; font-weight: 500; }
html body .stat-card a, html body .stat-card .fa-arrow-right { color: var(--tone) !important; }

html body .stat-card.bg-lead,  html body .stat-card.bg-status-new          { --tone: #4f46e5; }
html body .stat-card.bg-today, html body .stat-card.bg-status-contacted    { --tone: #0891b2; }
html body .stat-card.bg-month, html body .stat-card.bg-status-converted    { --tone: #059669; }
html body .stat-card.bg-conv,  html body .stat-card.bg-status-followup     { --tone: #d97706; }
html body .stat-card.bg-int,   html body .stat-card.bg-status-interested   { --tone: #7c3aed; }
html body .stat-card.bg-fu,    html body .stat-card.bg-status-notinterested{ --tone: #dc2626; }
html body .stat-card.bg-cont,  html body .stat-card.bg-status-closedlost   { --tone: #0f766e; }
html body .stat-card.bg-pend                                               { --tone: #b45309; }

/* Soft (tinted) variants for secondary actions so they don't fight the primary button */
html body .btn-warning {
    background: #fff7e6 !important;
    border: 1px solid #fde3a7 !important;
    color: #9a5b00 !important;
}
html body .btn-warning:hover { background: #ffefcc !important; color: #7a4700 !important; }
html body .btn-info {
    background: #e8f6fd !important;
    border: 1px solid #bfe6f8 !important;
    color: #0369a1 !important;
}
html body .btn-info:hover { background: #d6effb !important; }

/* DataTables "Loading…" note while a server-side page is fetched */
html body div.dataTables_processing { background: rgba(255, 255, 255, .95); border: 1px solid var(--lv-border); border-radius: 12px; box-shadow: var(--lv-shadow-lg); padding: 10px 18px !important; width: auto !important; margin-left: 0 !important; transform: translateX(-50%); color: var(--lv-text-2); font-weight: 600; font-size: 13.5px; z-index: 5; }
html body div.dataTables_processing > div:empty { display: none; }
.lv-table-loading { display: inline-flex; align-items: center; gap: 8px; }
.lv-table-loading i { font-size: 18px; color: var(--lv-primary); animation: lvSpin .8s linear infinite; }
@keyframes lvSpin { to { transform: rotate(360deg); } }
