:root {
    --saas-bg: #f6f8fb;
    --saas-bg-strong: #eef3f9;
    --saas-surface: #ffffff;
    --saas-surface-soft: #f8fafc;
    --saas-surface-tint: #eef5ff;
    --saas-border: #d8e0ea;
    --saas-border-strong: #b8c4d4;
    --saas-text: #1f2937;
    --saas-heading: #111827;
    --saas-muted: #64748b;
    --saas-primary: #2563eb;
    --saas-primary-dark: #1d4ed8;
    --saas-primary-soft: #dbeafe;
    --saas-accent: #f97316;
    --saas-accent-dark: #ea580c;
    --saas-success: #059669;
    --saas-warning: #d97706;
    --saas-danger: #dc2626;
    --saas-info: #0891b2;
    --saas-sidebar: #111827;
    --saas-sidebar-soft: #1f2937;
    --saas-shadow-xs: 0 1px 2px rgba(16, 24, 40, .06);
    --saas-shadow-sm: 0 8px 24px rgba(16, 24, 40, .08);
    --saas-shadow-md: 0 18px 48px rgba(16, 24, 40, .12);
    --saas-radius: 8px;
    --saas-radius-sm: 6px;
    --saas-font: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--saas-bg) !important;
    color: var(--saas-text);
    font-family: var(--saas-font);
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

html[data-saas-theme="dark"] {
    --saas-bg: #0f172a;
    --saas-bg-strong: #111827;
    --saas-surface: #111827;
    --saas-surface-soft: #182235;
    --saas-surface-tint: #172033;
    --saas-border: #2f3b52;
    --saas-border-strong: #475569;
    --saas-text: #e5e7eb;
    --saas-heading: #f8fafc;
    --saas-muted: #94a3b8;
    --saas-primary-soft: rgba(37, 99, 235, .22);
    --saas-sidebar: #070d1a;
    --saas-sidebar-soft: #111827;
    --saas-shadow-xs: 0 1px 2px rgba(0, 0, 0, .28);
    --saas-shadow-sm: 0 12px 28px rgba(0, 0, 0, .32);
    --saas-shadow-md: 0 22px 60px rgba(0, 0, 0, .4);
}

a,
button,
input,
select,
textarea,
.btn,
.form-control,
.dropdown-menu,
.modal-content,
.table {
    font-family: var(--saas-font) !important;
}

a {
    color: var(--saas-primary);
}

a:hover,
a:focus {
    color: var(--saas-primary-dark);
    text-decoration: none;
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .28);
    outline-offset: 2px;
}

img {
    max-width: 100%;
}

.container-fluid {
    max-width: 1680px;
}

.content-page,
.content-page[style] {
    background: var(--saas-bg) !important;
    margin-top: 0 !important;
    min-height: 100vh;
}

.content {
    padding-bottom: 24px;
}

.main-content {
    padding: 16px 0 28px;
}

.section,
.section-body {
    width: 100%;
}

.navbar-custom {
    align-items: center;
    background: rgba(255, 255, 255, .94) !important;
    border-bottom: 1px solid var(--saas-border);
    box-shadow: var(--saas-shadow-xs);
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 1002;
}

.navbar-custom .container-fluid,
.navbar-custom .container-fluid[style] {
    align-items: center;
    display: flex;
    min-height: 64px;
    margin-top: 0 !important;
}

.navbar-custom .topnav-menu {
    align-items: center;
    display: flex;
}

.navbar-custom .nav-link,
.navbar-custom .button-menu-mobile,
.navbar-custom .navbar-toggle {
    align-items: center;
    border-radius: var(--saas-radius);
    color: var(--saas-heading) !important;
    display: inline-flex;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
}

.navbar-custom .nav-link:hover,
.navbar-custom .button-menu-mobile:hover,
.navbar-custom .navbar-toggle:hover {
    background: var(--saas-primary-soft);
}

.navbar-custom .fa,
.navbar-custom .fas,
.navbar-custom .fe,
.navbar-custom i {
    color: var(--saas-heading) !important;
}

.navbar-custom .noti-icon-badge,
.navbar-custom .badge-danger {
    background: var(--saas-danger) !important;
    box-shadow: 0 0 0 3px #fff;
}

.navbar-custom .clearfix[style] {
    height: 0 !important;
}

.logo-box {
    align-items: center;
    background: transparent !important;
    display: flex;
}

.logo-box img {
    object-fit: contain;
}

.left-side-menu,
.left-side-menu[style] {
    background: var(--saas-sidebar) !important;
    border-right: 0 !important;
    box-shadow: 10px 0 30px rgba(6, 20, 45, .18);
    margin-top: 0 !important;
}

.left-side-menu .h-100 {
    padding: 16px 12px;
}

.user-box {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--saas-radius);
    margin: 6px 4px 16px;
    padding: 16px 12px !important;
}

.user-box a,
.user-box p {
    color: rgba(255, 255, 255, .88) !important;
}

#sidebar-menu .menu-title {
    color: rgba(255, 255, 255, .48) !important;
    font-size: 11px !important;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 18px 10px 8px;
    text-transform: uppercase;
}

#sidebar-menu > ul > li > a,
#sidebar-menu .main-item,
#side-menu a {
    align-items: center;
    border-radius: var(--saas-radius);
    color: rgba(255, 255, 255, .82) !important;
    display: flex;
    font-size: 14px !important;
    font-weight: 650;
    gap: 10px;
    line-height: 1.2;
    min-height: 42px;
    padding: 10px 12px !important;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

#sidebar-menu > ul > li > a:hover,
#sidebar-menu .main-item:hover,
#side-menu a:hover,
#sidebar-menu > ul > li > a:focus,
#sidebar-menu .main-item:focus,
#side-menu a:focus {
    background: rgba(255, 255, 255, .09) !important;
    color: #ffffff !important;
}

#sidebar-menu .styling,
.styling {
    align-items: center;
    background: rgba(255, 255, 255, .1) !important;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--saas-radius-sm) !important;
    box-shadow: none !important;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    margin-right: 0 !important;
    min-width: 32px;
    padding: 0 !important;
}

#sidebar-menu .styling i,
.styling i {
    color: #ffffff !important;
}

#sidebar-menu .gear {
    color: rgba(255, 255, 255, .56) !important;
    margin-left: auto;
    margin-top: 0 !important;
}

.nav-second-level {
    margin: 4px 0 8px;
}

.nav-second-level > li > a,
.nav-second-level li a {
    color: rgba(255, 255, 255, .7) !important;
    font-size: 13px !important;
    font-weight: 600;
    margin: 2px 0 2px 42px;
    min-height: 34px;
    padding: 8px 10px !important;
}

.nav-second-level > li > a:hover,
.nav-second-level > li > a:focus,
.nav-second-level > li > a.active {
    background: rgba(37, 99, 235, .22) !important;
    color: #ffffff !important;
}

.menuitem-active,
#sidebar-menu li.mm-active > a,
#side-menu a.saas-active-link {
    background: rgba(37, 99, 235, .28) !important;
    border-radius: var(--saas-radius);
    color: #ffffff !important;
}

.right-bar,
.profile-dropdown,
.dropdown-menu,
.modal-content,
.card,
.card-box,
.widget-rounded-circle {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    box-shadow: var(--saas-shadow-xs) !important;
}

.card,
.card-box,
.widget-rounded-circle,
.box.shadow.card {
    border-top: 1px solid var(--saas-border) !important;
    margin-top: 18px !important;
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.card:hover,
.card-box:hover,
.widget-rounded-circle:hover {
    border-color: var(--saas-border-strong) !important;
    box-shadow: var(--saas-shadow-sm) !important;
}

.card-header,
.modal-header {
    align-items: center;
    background: var(--saas-surface) !important;
    border-bottom: 1px solid var(--saas-border) !important;
    color: var(--saas-heading);
    display: flex;
    font-weight: 800;
    min-height: 58px;
    padding: 16px 20px !important;
}

.card > .card-header:first-child,
.card-header + .card {
    margin-top: 0 !important;
}

.card-body,
.modal-body,
.card-box {
    padding: 20px !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--saas-heading);
    font-family: var(--saas-font);
    font-weight: 760;
    letter-spacing: 0;
}

h2 {
    font-size: clamp(24px, 3vw, 34px);
}

h3,
.card-title {
    font-size: clamp(18px, 2vw, 22px);
}

h4,
.header-title {
    font-size: 18px;
}

p,
label,
td,
th,
li,
span {
    letter-spacing: 0;
}

.text-muted,
.small,
small {
    color: var(--saas-muted) !important;
}

.btn {
    align-items: center;
    border-radius: var(--saas-radius) !important;
    box-shadow: none !important;
    display: inline-flex;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    line-height: 1.1;
    min-height: 40px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--saas-primary) !important;
    border-color: var(--saas-primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--saas-primary-dark) !important;
    border-color: var(--saas-primary-dark) !important;
}

.btn-danger {
    background: var(--saas-danger) !important;
    border-color: var(--saas-danger) !important;
    color: #fff !important;
}

.btn-success {
    background: var(--saas-success) !important;
    border-color: var(--saas-success) !important;
    color: #fff !important;
}

.btn-info {
    background: var(--saas-info) !important;
    border-color: var(--saas-info) !important;
    color: #fff !important;
}

.btn-warning {
    background: var(--saas-warning) !important;
    border-color: var(--saas-warning) !important;
    color: #111827 !important;
}

.btn-secondary {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
    color: #fff !important;
}

.btn-light,
.btn-white,
.bg-white.btn {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    color: var(--saas-text) !important;
}

td .btn.px-1.py-0,
td .btn[class*="px-1"][class*="py-0"],
.table .btn-sm {
    aspect-ratio: 1;
    min-height: 36px;
    min-width: 36px;
    padding: 0 !important;
}

td .btn.px-1.py-0 i,
td .btn[class*="px-1"][class*="py-0"] i {
    font-size: 14px;
    line-height: 1;
}

.form-group {
    margin-bottom: 18px;
}

label,
.form-group strong {
    color: #344054;
    font-size: 13px;
    font-weight: 750;
    margin-bottom: 7px;
}

.form-control,
.custom-select,
select.form-control,
textarea.form-control {
    background-color: #fff !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    color: var(--saas-text) !important;
    min-height: 42px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.form-control:focus,
.custom-select:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: var(--saas-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .14) !important;
}

.form-control::placeholder {
    color: #98a2b3;
}

.input-group-text {
    background: var(--saas-surface-soft);
    border-color: var(--saas-border);
    color: var(--saas-muted);
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--saas-primary) !important;
    border-color: var(--saas-primary) !important;
}

.table-responsive {
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
}

.table,
table.dataTable {
    background: var(--saas-surface);
    border-collapse: separate !important;
    border-spacing: 0;
    color: var(--saas-text);
    margin-bottom: 0 !important;
    width: 100% !important;
}

.table thead th,
table.dataTable thead th {
    background: var(--saas-surface-soft);
    border-bottom: 1px solid var(--saas-border) !important;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.table td,
.table th,
table.dataTable td,
table.dataTable th {
    border-color: var(--saas-border) !important;
    padding: 13px 14px !important;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color .16s ease;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8fafc;
}

.dataTables_wrapper .row {
    align-items: center;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
#formLimit select,
select[name="limit"] {
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    min-height: 38px;
    padding: 6px 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button,
.pagination .page-link {
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius-sm) !important;
    color: var(--saas-text) !important;
    margin-left: 4px;
}

.pagination .active .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--saas-primary) !important;
    color: #fff !important;
}

.badge {
    border-radius: 999px;
    font-weight: 750;
    padding: .42em .65em;
}

.badge-success {
    background: #d1fadf !important;
    color: #067647 !important;
}

.badge-danger {
    background: #fee4e2 !important;
    color: #b42318 !important;
}

.badge-warning {
    background: #fef0c7 !important;
    color: #b54708 !important;
}

.badge-info,
.badge-primary {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.badge-secondary,
.badge-light {
    background: #eef2f6 !important;
    color: #475467 !important;
}

.alert,
.toast,
.jq-toast-single {
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    box-shadow: var(--saas-shadow-xs);
}

.alert-success {
    background: #ecfdf3;
    color: #05603a;
}

.alert-warning {
    background: #fffaeb;
    color: #93370d;
}

.alert-danger {
    background: #fef3f2;
    color: #912018;
}

.dropdown-menu {
    padding: 8px;
}

.dropdown-item {
    border-radius: var(--saas-radius-sm);
    color: #344054;
    font-weight: 650;
    min-height: 36px;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active,
.dropdown-item:active {
    background: var(--saas-primary-soft) !important;
    color: #172554 !important;
}

.empty-state,
.saas-empty-state {
    align-items: center;
    background: var(--saas-surface);
    border: 1px dashed var(--saas-border-strong);
    border-radius: var(--saas-radius);
    color: var(--saas-muted);
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    min-height: 180px;
    padding: 28px;
    text-align: center;
}

.saas-empty-row td {
    background: #fff !important;
    color: var(--saas-muted);
    font-weight: 650;
    padding: 28px !important;
    text-align: center;
}

.skeleton,
.saas-skeleton {
    animation: saas-skeleton 1.4s ease-in-out infinite;
    background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%);
    background-size: 400% 100%;
    border-radius: var(--saas-radius);
    min-height: 16px;
}

.saas-loading .btn[type="submit"],
form.saas-loading button[type="submit"] {
    pointer-events: none;
    position: relative;
}

.saas-loading .btn[type="submit"]::after,
form.saas-loading button[type="submit"]::after {
    animation: saas-spin .75s linear infinite;
    border: 2px solid rgba(255, 255, 255, .45);
    border-radius: 50%;
    border-top-color: #fff;
    content: "";
    height: 16px;
    margin-left: 2px;
    width: 16px;
}

.saas-fade-in {
    animation: saas-fade-in .16s ease-out;
}

.footer {
    background: transparent;
    border-top: 1px solid var(--saas-border);
    color: var(--saas-muted);
}

.apexcharts-canvas,
.apexcharts-svg,
#chart {
    max-width: 100% !important;
}

.saas-admin-dashboard {
    padding: 20px 0 34px;
}

.saas-page-header {
    align-items: flex-end;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.saas-page-header h1 {
    font-size: clamp(26px, 3vw, 38px);
    margin: 0;
}

.saas-page-header p {
    color: var(--saas-muted);
    font-size: 15px;
    margin: 6px 0 0;
}

.saas-kpi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.saas-kpi-card {
    background: #fff;
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow-xs);
    padding: 18px;
}

.saas-kpi-card span {
    color: var(--saas-muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.saas-kpi-card strong {
    color: var(--saas-heading);
    display: block;
    font-size: 28px;
    letter-spacing: 0;
    margin-top: 8px;
}

.saas-kpi-card small {
    color: var(--saas-success) !important;
    display: block;
    margin-top: 8px;
}

.saas-dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1.4fr .9fr;
    margin-top: 16px;
}

.saas-panel {
    background: #fff;
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow-xs);
    padding: 20px;
}

.saas-panel h3 {
    font-size: 18px;
    margin: 0 0 14px;
}

.saas-activity-list {
    display: grid;
    gap: 12px;
}

.saas-activity-item {
    align-items: center;
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    display: flex;
    gap: 12px;
    padding: 12px;
}

.saas-activity-icon {
    align-items: center;
    background: var(--saas-primary-soft);
    border-radius: var(--saas-radius-sm);
    color: var(--saas-primary);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.saas-login-body {
    background: #f5f7fb !important;
    color: var(--saas-text);
    min-height: 100vh;
}

.saas-login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
    min-height: 100vh;
}

.saas-login-hero {
    background:
        linear-gradient(135deg, rgba(6, 20, 45, .98), rgba(7, 35, 78, .9)),
        url("../img/login.jpg") center/cover;
    color: #fff;
    display: flex;
    overflow: hidden;
    padding: clamp(32px, 6vw, 76px);
    position: relative;
}

.saas-login-hero::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    content: "";
    inset: 0;
    opacity: .38;
    position: absolute;
}

.saas-login-hero-glow {
    display: none;
}

.saas-login-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-width: 760px;
    min-height: 100%;
    position: relative;
    width: 100%;
    z-index: 1;
}

.saas-login-brand,
.saas-login-card-brand {
    align-items: center;
    display: flex;
    gap: 12px;
}

.saas-login-brand img {
    height: 54px;
    object-fit: contain;
    width: auto;
}

.saas-login-brand span {
    color: rgba(255, 255, 255, .9);
    font-size: 15px;
    font-weight: 800;
}

.saas-eyebrow {
    color: var(--saas-accent);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.saas-login-copy {
    margin: 60px 0 30px;
}

.saas-login-copy h1 {
    color: #fff;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.02;
    margin: 0;
    max-width: 720px;
}

.saas-login-copy p:last-child {
    color: rgba(255, 255, 255, .78);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.65;
    margin-top: 20px;
    max-width: 560px;
}

.saas-login-funnel {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px auto 34px;
    max-width: 380px;
    width: 80%;
}

.saas-funnel-layer {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--saas-radius);
    color: rgba(255, 255, 255, .88);
    font-size: 12px;
    font-weight: 800;
    padding: 12px;
    text-align: center;
    text-transform: uppercase;
    width: 72%;
}

.saas-funnel-layer-wide {
    width: 100%;
}

.saas-funnel-layer-small {
    background: rgba(255, 90, 31, .86);
    width: 46%;
}

.saas-login-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saas-login-stats div {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--saas-radius);
    padding: 16px;
}

.saas-login-stats span,
.saas-login-stats small {
    color: rgba(255, 255, 255, .72) !important;
    display: block;
}

.saas-login-stats strong {
    color: #fff;
    display: block;
    font-size: clamp(22px, 3vw, 30px);
    margin: 8px 0;
}

.saas-login-panel {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 5vw, 56px);
}

.saas-login-card {
    background: rgba(255, 255, 255, .94);
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow-md);
    max-width: 480px;
    padding: clamp(28px, 5vw, 46px);
    width: 100%;
}

.saas-login-card-brand {
    justify-content: center;
    margin-bottom: 28px;
}

.saas-login-card-brand img {
    max-height: 70px;
    object-fit: contain;
}

.saas-login-heading {
    margin-bottom: 24px;
}

.saas-login-heading h2 {
    font-size: 30px;
    margin: 0;
}

.saas-login-heading p:last-child {
    color: var(--saas-muted);
    margin: 8px 0 0;
}

.saas-login-form .form-group {
    margin-bottom: 18px;
}

.saas-input-shell {
    align-items: center;
    display: flex;
    position: relative;
}

.saas-input-shell > i {
    color: var(--saas-muted);
    left: 14px;
    position: absolute;
    z-index: 2;
}

.saas-input-shell .form-control {
    min-height: 48px;
    padding-left: 42px;
    padding-right: 42px;
}

.saas-password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--saas-muted);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    position: absolute;
    right: 6px;
    width: 38px;
    z-index: 2;
}

.saas-login-options {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 4px 0 22px;
}

.saas-checkbox {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    margin: 0;
}

.saas-checkbox input {
    accent-color: var(--saas-primary);
    height: 16px;
    width: 16px;
}

.saas-login-submit {
    min-height: 48px;
}

.saas-login-footer {
    color: var(--saas-muted);
    font-size: 13px;
    margin-top: 22px;
    text-align: center;
}

@keyframes saas-skeleton {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

@keyframes saas-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes saas-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

.enterprise-kpi-section {
    margin: var(--saas-space-5, 24px) 0;
}

.enterprise-kpi-section-compact {
    margin-top: var(--saas-space-4, 18px);
}

.enterprise-section-heading {
    align-items: flex-end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.enterprise-section-heading h2,
.enterprise-presence-header h2 {
    color: var(--saas-text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
}

.enterprise-section-heading p,
.enterprise-presence-header p {
    color: var(--saas-muted);
    font-size: 14px !important;
    margin: 4px 0 0;
}

.enterprise-dashboard-card-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.enterprise-dashboard-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .78)),
        var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
    color: var(--saas-text);
    display: grid;
    gap: 7px;
    min-height: 142px;
    padding: 18px;
    position: relative;
    text-decoration: none !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.enterprise-dashboard-card:hover {
    border-color: rgba(37, 99, 235, .28);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .10);
    color: var(--saas-text);
    transform: translateY(-2px);
}

.enterprise-dashboard-card::before {
    background: var(--enterprise-card-accent, #2563eb);
    border-radius: 999px;
    content: "";
    height: 3px;
    left: 18px;
    position: absolute;
    right: 18px;
    top: 0;
}

.enterprise-dashboard-card-blue { --enterprise-card-accent: #2563eb; }
.enterprise-dashboard-card-green { --enterprise-card-accent: #059669; }
.enterprise-dashboard-card-amber { --enterprise-card-accent: #d97706; }
.enterprise-dashboard-card-purple { --enterprise-card-accent: #7c3aed; }
.enterprise-dashboard-card-red { --enterprise-card-accent: #dc2626; }

.enterprise-dashboard-card-icon {
    align-items: center;
    background: color-mix(in srgb, var(--enterprise-card-accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--enterprise-card-accent) 18%, transparent);
    border-radius: 8px;
    color: var(--enterprise-card-accent);
    display: inline-flex;
    height: 42px;
    justify-content: center;
    margin-bottom: 6px;
    width: 42px;
}

.enterprise-dashboard-card-label {
    color: var(--saas-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.enterprise-dashboard-card strong {
    color: var(--saas-text);
    font-size: 30px;
    font-weight: 850;
    line-height: 1;
}

.enterprise-dashboard-card small {
    color: var(--saas-muted);
    font-size: 13px;
}

.saas-dashboard-cards .card,
.widget-rounded-circle.card-box {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06) !important;
    min-height: 132px;
    overflow: hidden;
    padding: 18px !important;
    position: relative;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.saas-dashboard-cards a:hover .card,
.widget-rounded-circle.card-box:hover {
    border-color: rgba(37, 99, 235, .28) !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .10) !important;
    transform: translateY(-2px);
}

.saas-dashboard-cards .card::before,
.widget-rounded-circle.card-box::before {
    background: #2563eb;
    border-radius: 999px;
    content: "";
    height: 3px;
    left: 18px;
    position: absolute;
    right: 18px;
    top: 0;
}

.saas-dashboard-cards .text-truncate,
.widget-rounded-circle .text-muted,
.widget-rounded-circle .header-title {
    color: var(--saas-muted) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0;
    text-transform: uppercase;
}

.saas-dashboard-cards .text-truncatee2,
.widget-rounded-circle h3,
.widget-rounded-circle h4,
.widget-rounded-circle [data-plugin="counterup"] {
    color: var(--saas-text) !important;
    font-size: 30px !important;
    font-weight: 850 !important;
    line-height: 1.05 !important;
}

.banner-img,
.saas-dashboard-cards .banner-img,
.widget-rounded-circle .banner-img {
    align-items: center;
    background: rgba(37, 99, 235, .09) !important;
    border: 1px solid rgba(37, 99, 235, .16) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #2563eb !important;
    display: inline-flex !important;
    height: 42px !important;
    justify-content: center !important;
    min-width: 42px !important;
    padding: 0 !important;
    width: 42px !important;
}

.banner-img .fa,
.saas-dashboard-cards .banner-img .fa,
.widget-rounded-circle .banner-img .fa {
    color: #2563eb !important;
    font-size: 17px !important;
    margin: 0 !important;
}

.enterprise-presence-panel,
.setup-management-grid > .enterprise-card,
.enterprise-card {
    border-radius: 8px;
}

.enterprise-presence-panel {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
    margin: 18px 0 24px;
    padding: 20px;
}

.enterprise-presence-header {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr auto auto;
    margin-bottom: 16px;
}

.enterprise-presence-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.enterprise-presence-stats span,
.presence-status-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    line-height: 1;
    padding: 7px 10px;
    white-space: nowrap;
}

.presence-dot {
    border-radius: 999px;
    display: inline-flex;
    height: 8px;
    width: 8px;
}

.presence-status-pill.is-online,
.enterprise-presence-stats span:has(.is-online) {
    background: rgba(5, 150, 105, .12);
    color: #047857;
}

.presence-status-pill.is-away,
.enterprise-presence-stats span:has(.is-away) {
    background: rgba(217, 119, 6, .14);
    color: #a16207;
}

.presence-status-pill.is-offline,
.enterprise-presence-stats span:has(.is-offline) {
    background: rgba(100, 116, 139, .13);
    color: #475569;
}

.presence-dot.is-online { background: #059669; }
.presence-dot.is-away { background: #d97706; }
.presence-dot.is-offline { background: #64748b; }

.enterprise-presence-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr);
}

.enterprise-presence-list,
.enterprise-session-list {
    background: var(--saas-surface-soft);
    border: 1px solid var(--saas-border);
    border-radius: 8px;
    padding: 12px;
}

.enterprise-presence-user,
.enterprise-session-row {
    align-items: center;
    background: var(--saas-surface);
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px 1fr auto;
    padding: 12px;
}

.enterprise-presence-user + .enterprise-presence-user,
.enterprise-session-row + .enterprise-session-row {
    margin-top: 10px;
}

.enterprise-presence-avatar {
    align-items: center;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.enterprise-presence-user strong,
.enterprise-session-row strong {
    color: var(--saas-text);
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.enterprise-presence-user small,
.enterprise-session-row small,
.enterprise-presence-user em {
    color: var(--saas-muted);
    display: block;
    font-size: 12px;
    font-style: normal;
}

.enterprise-session-list h3 {
    color: var(--saas-text);
    font-size: 15px;
    font-weight: 800;
    margin: 2px 0 12px;
}

.enterprise-session-row {
    grid-template-columns: auto 1fr;
}

.setup-management-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr);
}

.setup-form-card {
    align-self: start;
}

.setup-card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.setup-filter-row {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.enterprise-checkline {
    align-items: center;
    color: var(--saas-text);
    display: inline-flex;
    font-weight: 700;
    gap: 8px;
    margin: 0;
}

.enterprise-table td strong {
    color: var(--saas-text);
    display: block;
    font-weight: 800;
}

.enterprise-table td span {
    color: var(--saas-muted);
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.enterprise-field-permission-form .form-control,
.setup-management-grid .form-control {
    border-radius: 8px;
}

.enterprise-permission-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

.enterprise-permission-actions label {
    align-items: center;
    color: var(--saas-text);
    display: inline-flex;
    font-weight: 700;
    gap: 7px;
    margin: 0;
}

html[data-saas-theme="dark"] .enterprise-dashboard-card {
    background: var(--saas-surface);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

html[data-saas-theme="dark"] .presence-status-pill.is-online {
    color: #34d399;
}

html[data-saas-theme="dark"] .presence-status-pill.is-away {
    color: #fbbf24;
}

html[data-saas-theme="dark"] .presence-status-pill.is-offline {
    color: #cbd5e1;
}

@media (max-width: 1199.98px) {
    .saas-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .saas-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .content-page {
        margin-top: 0 !important;
    }

    .card-body,
    .modal-body,
    .card-box {
        padding: 16px !important;
    }

    .table-responsive,
    .dataTables_wrapper {
        overflow-x: auto;
    }

    .saas-login-shell {
        grid-template-columns: 1fr;
    }

    .saas-login-hero {
        min-height: auto;
        padding: 28px;
    }

    .saas-login-copy {
        margin: 34px 0 20px;
    }

    .saas-login-stats,
    .saas-login-funnel {
        display: none;
    }

    .saas-login-panel {
        padding: 24px;
    }
}

@media (max-width: 767.98px) {
    .saas-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .saas-kpi-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .card-header .btn,
    .card-header a.btn,
    .card-header button.btn {
        width: 100%;
    }

    .saas-login-card {
        box-shadow: var(--saas-shadow-sm);
        padding: 24px;
    }
}

/* --------------------------------------------------------------------------
   Product-wide enterprise UI refinement.  This final layer intentionally
   follows the shared tokens above and neutralises legacy template styling.
   -------------------------------------------------------------------------- */
.saas-skip-link {
    background: var(--saas-heading);
    border-radius: 0 0 var(--saas-radius) var(--saas-radius);
    color: #fff !important;
    left: 16px;
    padding: 10px 14px;
    position: fixed;
    top: -56px;
    transition: top .16s ease;
    z-index: 10000;
}

.saas-skip-link:focus {
    top: 0;
}

.content-page .content:focus {
    outline: none;
}

/* Legacy dashboard widgets retain their data markup but use one KPI pattern. */
.main-content .widget-rounded-circle,
.main-content .widget-rounded-circle[style],
.main-content .card-box[style*="border-top"],
.main-content .box.shadow.card[style*="border-top"] {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    box-shadow: var(--saas-shadow-xs) !important;
    margin-top: 0 !important;
}

.main-content .widget-rounded-circle {
    min-height: 126px;
    padding: 18px !important;
    position: relative;
}

.main-content .widget-rounded-circle > .row {
    align-items: center;
    min-height: 88px;
}

.main-content .widget-rounded-circle h3,
.main-content .widget-rounded-circle h4 {
    color: var(--saas-heading) !important;
    font-size: clamp(25px, 2vw, 34px) !important;
    font-weight: 760 !important;
    line-height: 1.05;
    margin: 0 0 8px !important;
}

.main-content .widget-rounded-circle .text-right {
    text-align: left !important;
}

.main-content .widget-rounded-circle .text-muted {
    font-size: 13px !important;
    font-weight: 720;
    text-transform: none;
}

.main-content .widget-rounded-circle .banner-img {
    background: var(--saas-surface-tint) !important;
    border-color: rgba(37, 99, 235, .16) !important;
}

.main-content .widget-rounded-circle .banner-img img {
    height: 26px;
    object-fit: contain;
    opacity: .88;
    width: 26px;
}

.main-content .widget-rounded-circle:nth-child(4n + 2) .banner-img { background: #ecfdf5 !important; border-color: #a7f3d0 !important; }
.main-content .widget-rounded-circle:nth-child(4n + 3) .banner-img { background: #fff7ed !important; border-color: #fed7aa !important; }
.main-content .widget-rounded-circle:nth-child(4n) .banner-img { background: #f5f3ff !important; border-color: #ddd6fe !important; }

.main-content .card-box > .header-title:first-child,
.main-content .card > .header-title:first-child {
    border-bottom: 1px solid var(--saas-border);
    margin: -20px -20px 18px !important;
    padding: 17px 20px;
}

/* Lead workspace has dense, repeatable operational surfaces. */
.lead-command-center,
.lead-enterprise-page,
.lead-workspace,
.lead-detail-page {
    max-width: 1520px;
}

.lead-command-hero {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    box-shadow: var(--saas-shadow-xs) !important;
}

.lead-command-hero::after {
    background: linear-gradient(135deg, rgba(37, 99, 235, .06), transparent 58%) !important;
}

.lead-kpi-card,
.saas-kpi-card {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    box-shadow: var(--saas-shadow-xs) !important;
    min-height: 132px;
}

.lead-kpi-card::after,
.saas-kpi-card::after {
    display: none !important;
}

.lead-kpi-card:hover,
.saas-kpi-card:hover,
.lead-dashboard-panel:hover,
.saas-panel:hover {
    border-color: var(--saas-border-strong) !important;
    box-shadow: var(--saas-shadow-sm) !important;
    transform: translateY(-1px);
}

.lead-dashboard-panel,
.saas-panel,
.enterprise-card,
.saas-analytics-card {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    box-shadow: var(--saas-shadow-xs) !important;
}

.lead-dashboard-panel,
.saas-panel { padding: 20px !important; }

.lead-panel-title h3,
.saas-panel h3 {
    font-size: 16px !important;
    font-weight: 760 !important;
    margin: 0 !important;
}

.lead-panel-title p,
.saas-panel > p {
    font-size: 13px !important;
    line-height: 1.45;
    margin: 4px 0 0 !important;
}

.lead-funnel-row,
.lead-priority-list a,
.lead-source-list > div,
.lead-qualification-row {
    border-radius: var(--saas-radius-sm) !important;
}

/* Reports: a consistent filter-to-results rhythm, rather than stacked cards. */
.main-content .card .card-body > form:first-child,
.main-content .card-box > form:first-child,
.main-content .report-filter,
.main-content .filters-row {
    align-items: end;
    gap: 12px;
}

.main-content .table-responsive {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
}

.main-content .table thead th {
    background: var(--saas-surface-soft) !important;
    color: var(--saas-muted) !important;
    font-size: 11px !important;
    letter-spacing: .045em !important;
}

.main-content .table td {
    font-size: 13px;
}

.main-content .table td .badge,
.lead-command-center .badge {
    font-size: 11px;
    letter-spacing: 0;
}

.dropdown-menu {
    overflow: hidden;
    padding: 6px !important;
}

.dropdown-item {
    border-radius: var(--saas-radius-sm);
    color: var(--saas-text) !important;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 10px !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background: var(--saas-surface-tint) !important;
    color: var(--saas-primary) !important;
}

.modal-dialog { margin: 28px auto; }
.modal-content { overflow: hidden; }
.modal-footer { background: var(--saas-surface-soft); border-top-color: var(--saas-border) !important; }

.form-control,
.custom-select,
select.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: var(--saas-surface) !important;
    border-color: var(--saas-border) !important;
}

.form-control:disabled,
.form-control[readonly] {
    background: var(--saas-surface-soft) !important;
    color: var(--saas-muted) !important;
}

.saas-empty-state,
.empty-state {
    background: var(--saas-surface-soft);
    border: 1px dashed var(--saas-border-strong);
    border-radius: var(--saas-radius);
    margin: 12px 0;
    padding: 32px 20px;
}

.saas-notification-menu { min-width: min(390px, calc(100vw - 28px)); }
.saas-notification-menu .notify-item { border-bottom: 1px solid var(--saas-border); }
.saas-notification-menu .notify-item:last-of-type { border-bottom: 0; }

/* Collapsed navigation stays usable: no hidden interactive targets. */
body[data-sidebar-size="condensed"] .left-side-menu .styling,
body[data-sidebar-size="compact"] .left-side-menu .styling {
    margin: 0 !important;
}

body[data-sidebar-size="condensed"] #side-menu > li > a,
body[data-sidebar-size="compact"] #side-menu > li > a {
    justify-content: center;
}

body[data-sidebar-size="condensed"] #side-menu > li > a[data-saas-tooltip],
body[data-sidebar-size="compact"] #side-menu > li > a[data-saas-tooltip] { position: relative; }

body[data-sidebar-size="condensed"] #side-menu > li > a[data-saas-tooltip]:hover::after,
body[data-sidebar-size="compact"] #side-menu > li > a[data-saas-tooltip]:hover::after {
    background: #111827;
    border-radius: var(--saas-radius-sm);
    color: #fff;
    content: attr(data-saas-tooltip);
    font-size: 12px;
    left: 54px;
    padding: 8px 10px;
    position: absolute;
    top: 5px;
    white-space: nowrap;
    z-index: 1200;
}

html[data-saas-theme="dark"] .main-content .widget-rounded-circle,
html[data-saas-theme="dark"] .main-content .card-box[style*="border-top"],
html[data-saas-theme="dark"] .main-content .box.shadow.card[style*="border-top"],
html[data-saas-theme="dark"] .lead-dashboard-panel,
html[data-saas-theme="dark"] .saas-panel,
html[data-saas-theme="dark"] .lead-kpi-card,
html[data-saas-theme="dark"] .saas-kpi-card,
html[data-saas-theme="dark"] .main-content .table-responsive {
    background: var(--saas-surface) !important;
}

html[data-saas-theme="dark"] label,
html[data-saas-theme="dark"] .form-group strong,
html[data-saas-theme="dark"] .table thead th {
    color: var(--saas-text) !important;
}

html[data-saas-theme="dark"] .form-control::placeholder { color: var(--saas-muted) !important; }

@media (max-width: 991.98px) {
    .lead-command-hero { padding: 20px !important; }
    .main-content .widget-rounded-circle { min-height: 110px; }
}

@media (max-width: 767.98px) {
    .main-content .widget-rounded-circle { padding: 16px !important; }
    .main-content .widget-rounded-circle > .row { min-height: 72px; }
    .main-content .widget-rounded-circle h3,
    .main-content .widget-rounded-circle h4 { font-size: 25px !important; }
    .lead-kpi-grid,
    .saas-kpi-grid { grid-template-columns: 1fr !important; }
    .lead-command-actions .btn { width: 100%; }
    .saas-notification-menu { max-height: min(70vh, 560px); overflow-y: auto; }
}

/* Final enterprise dashboard-card normalization. Keep this at the end so legacy
   dashboard rules cannot reintroduce the older flat card treatment. */
.enterprise-dashboard-card,
.saas-dashboard-cards .card,
.widget-rounded-circle.card-box {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 250, 252, .86)),
        var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06) !important;
    min-height: 136px;
    overflow: hidden;
    padding: 18px !important;
}

.enterprise-dashboard-card-icon,
.saas-dashboard-cards .banner-img,
.widget-rounded-circle .banner-img,
.banner-img[style] {
    align-items: center !important;
    background: rgba(37, 99, 235, .09) !important;
    border: 1px solid rgba(37, 99, 235, .16) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #2563eb !important;
    display: inline-flex !important;
    height: 42px !important;
    justify-content: center !important;
    min-width: 42px !important;
    width: 42px !important;
}

.enterprise-dashboard-card-icon .fa,
.saas-dashboard-cards .banner-img .fa,
.widget-rounded-circle .banner-img .fa,
.banner-img[style] .fa {
    color: #2563eb !important;
    font-size: 17px !important;
    margin: 0 !important;
}

html[data-saas-theme="dark"] .enterprise-dashboard-card,
html[data-saas-theme="dark"] .saas-dashboard-cards .card,
html[data-saas-theme="dark"] .widget-rounded-circle.card-box {
    background:
        linear-gradient(180deg, rgba(30, 41, 59, .88), rgba(15, 23, 42, .88)),
        var(--saas-surface) !important;
}

/* Visible enterprise screen upgrades */
.saas-login-body {
    background:
        radial-gradient(circle at 18% 18%, rgba(37, 99, 235, .18), transparent 28%),
        radial-gradient(circle at 78% 12%, rgba(20, 184, 166, .12), transparent 26%),
        linear-gradient(135deg, #071225 0%, #0d1b31 48%, #f7f9fc 48%, #ffffff 100%) !important;
}

.saas-login-shell {
    background: transparent !important;
    gap: 0;
    min-height: 100vh;
    padding: clamp(18px, 3vw, 42px) !important;
}

.saas-login-hero {
    background:
        linear-gradient(145deg, rgba(8, 18, 37, .96), rgba(14, 32, 58, .94)),
        radial-gradient(circle at 75% 24%, rgba(37, 99, 235, .42), transparent 32%) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    border-radius: 22px 0 0 22px !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .22) !important;
    overflow: hidden;
    position: relative;
}

.saas-login-hero::before {
    background:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    content: "";
    inset: 0;
    mask-image: linear-gradient(135deg, #000, transparent 72%);
    position: absolute;
}

.saas-login-hero-content {
    min-height: 760px;
    padding: clamp(34px, 5vw, 72px) !important;
    position: relative;
    z-index: 1;
}

.saas-login-brand {
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    display: inline-flex;
    gap: 12px;
    padding: 10px 16px;
}

.saas-login-brand img {
    height: 34px;
}

.saas-login-copy {
    max-width: 620px;
}

.saas-login-copy h1 {
    color: #ffffff !important;
    font-size: clamp(42px, 5vw, 72px) !important;
    line-height: .98 !important;
    margin-bottom: 22px;
}

.saas-login-copy p:not(.saas-eyebrow) {
    color: rgba(226, 232, 240, .88) !important;
    font-size: clamp(16px, 1.5vw, 20px) !important;
    max-width: 560px;
}

.saas-login-funnel {
    background: rgba(15, 23, 42, .42);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    margin-top: clamp(28px, 4vw, 54px);
    max-width: 520px;
    padding: 28px;
}

.saas-funnel-layer {
    background: linear-gradient(90deg, rgba(37, 99, 235, .95), rgba(20, 184, 166, .86)) !important;
    border: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .2);
    color: #ffffff !important;
    margin-left: auto;
    margin-right: auto;
    min-height: 48px;
}

.saas-login-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(26px, 4vw, 52px);
}

.saas-login-stats > div {
    background: rgba(255, 255, 255, .08) !important;
    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 16px !important;
    padding: 20px !important;
}

.saas-login-panel {
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--saas-border);
    border-left: 0;
    border-radius: 0 22px 22px 0;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .16);
    display: flex;
    justify-content: center;
}

.saas-login-card {
    border-radius: 20px !important;
    box-shadow: 0 18px 60px rgba(15, 23, 42, .12) !important;
    max-width: 480px;
    padding: clamp(28px, 4vw, 48px) !important;
}

.saas-login-card-brand img {
    max-height: 58px;
}

.saas-login-heading h2 {
    font-size: 34px !important;
}

.saas-input-shell {
    min-height: 52px;
}

.saas-login-submit {
    min-height: 52px;
}

.executive-dashboard,
.lead-command-center {
    margin-bottom: 28px;
}

.executive-kpi-grid,
.lead-kpi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 22px;
}

.executive-kpi-card,
.lead-kpi-card {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-radius: 16px;
    box-shadow: var(--saas-shadow-xs);
    color: var(--saas-text) !important;
    display: grid;
    gap: 10px;
    min-height: 154px;
    overflow: hidden;
    padding: 20px;
    position: relative;
}

.lead-kpi-card {
    align-items: center;
    display: flex;
    min-height: 116px;
}

.executive-kpi-card::after,
.lead-kpi-card::after {
    background: linear-gradient(135deg, var(--metric-color), transparent);
    border-radius: 999px;
    content: "";
    height: 120px;
    opacity: .1;
    position: absolute;
    right: -42px;
    top: -42px;
    width: 120px;
}

.executive-kpi-card > span,
.lead-kpi-card > span {
    align-items: center;
    background: color-mix(in srgb, var(--metric-color) 12%, transparent);
    border-radius: 14px;
    color: var(--metric-color);
    display: inline-flex;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.executive-kpi-card small,
.lead-kpi-card small {
    color: var(--saas-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.executive-kpi-card strong,
.lead-kpi-card strong {
    color: var(--saas-heading);
    display: block;
    font-size: clamp(26px, 2.4vw, 38px);
    font-weight: 850;
    line-height: 1;
}

.executive-kpi-card em {
    color: var(--saas-primary);
    font-style: normal;
    font-weight: 750;
}

.executive-kpi-card-blue,
.lead-kpi-card-blue {
    --metric-color: var(--saas-primary);
}

.executive-kpi-card-green,
.lead-kpi-card-green {
    --metric-color: var(--saas-success);
}

.executive-kpi-card-amber,
.lead-kpi-card-amber {
    --metric-color: var(--saas-warning);
}

.executive-kpi-card-red,
.lead-kpi-card-red {
    --metric-color: var(--saas-danger);
}

.executive-kpi-card-purple,
.lead-kpi-card-purple {
    --metric-color: var(--saas-chart-violet);
}

.lead-kpi-card-teal {
    --metric-color: var(--saas-chart-teal);
}

.executive-insight-grid,
.lead-dashboard-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.executive-panel,
.lead-dashboard-panel {
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-radius: 16px;
    box-shadow: var(--saas-shadow-xs);
    min-width: 0;
    padding: clamp(18px, 2vw, 24px);
}

.executive-panel {
    grid-column: span 4;
}

.executive-panel-wide {
    grid-column: span 8;
}

.lead-dashboard-panel {
    grid-column: span 3;
}

.lead-dashboard-panel-wide {
    grid-column: span 6;
}

.lead-command-hero {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .92)),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, .32), transparent 26%);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    color: #ffffff;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 18px;
    overflow: hidden;
    padding: clamp(22px, 3vw, 34px);
    position: relative;
}

.lead-command-hero::after {
    background:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 36px 36px;
    content: "";
    inset: 0;
    position: absolute;
}

.lead-command-hero > * {
    position: relative;
    z-index: 1;
}

.lead-command-hero h1 {
    color: #ffffff !important;
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 850;
    margin: 0 0 8px;
}

.lead-command-hero p:not(.saas-eyebrow) {
    color: rgba(226, 232, 240, .84);
    margin: 0;
}

.lead-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lead-command-actions .btn-outline-primary {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(255, 255, 255, .28) !important;
    color: #ffffff !important;
}

.lead-panel-title {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.lead-panel-title h3 {
    color: var(--saas-heading);
    font-size: 18px;
    font-weight: 820;
    margin: 0 0 2px;
}

.lead-panel-title p {
    color: var(--saas-muted);
    margin: 0;
}

.lead-funnel-list,
.lead-source-list,
.lead-priority-list {
    display: grid;
    gap: 12px;
}

.lead-funnel-row {
    align-items: center;
    color: var(--saas-text) !important;
    display: grid;
    gap: 12px;
    grid-template-columns: 120px 1fr 74px;
}

.lead-funnel-row div {
    background: var(--saas-surface-soft);
    border-radius: 999px;
    height: 11px;
    overflow: hidden;
}

.lead-funnel-row i {
    background: linear-gradient(90deg, var(--saas-primary), var(--saas-chart-teal));
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--stage-width);
}

.lead-funnel-row span,
.lead-source-list span,
.lead-priority-list span {
    color: var(--saas-muted);
    font-weight: 750;
}

.lead-funnel-row strong,
.lead-source-list strong,
.lead-priority-list strong {
    color: var(--saas-heading);
    font-weight: 850;
    text-align: right;
}

.lead-source-list div,
.lead-priority-list a {
    align-items: center;
    background: var(--saas-surface-soft);
    border: 1px solid var(--saas-border);
    border-radius: 12px;
    color: var(--saas-text) !important;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.lead-qualification-list {
    display: grid;
    gap: 15px;
}

.lead-qualification-row-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
}

.lead-qualification-row-head span {
    color: var(--saas-muted);
    font-size: 12px;
    font-weight: 800;
}

.lead-qualification-row-head strong {
    color: var(--saas-heading);
    font-size: 13px;
}

.lead-qualification-meter {
    background: var(--saas-surface-soft);
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.lead-qualification-meter i {
    background: linear-gradient(90deg, var(--saas-primary), var(--saas-chart-teal));
    border-radius: inherit;
    display: block;
    height: 100%;
}

@media (max-width: 1399.98px) {
    .executive-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lead-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .saas-login-shell {
        display: block;
    }

    .saas-login-hero,
    .saas-login-panel {
        border-radius: 20px !important;
    }

    .saas-login-panel {
        border-left: 1px solid var(--saas-border);
        margin-top: 16px;
    }

    .saas-login-hero-content {
        min-height: auto;
    }

    .executive-kpi-grid,
    .lead-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .executive-panel,
    .executive-panel-wide,
    .lead-dashboard-panel,
    .lead-dashboard-panel-wide {
        grid-column: span 12;
    }

    .lead-command-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .saas-login-body {
        background: var(--saas-bg) !important;
    }

    .saas-login-hero {
        display: none;
    }

    .saas-login-shell {
        padding: 14px !important;
    }

    .executive-kpi-grid,
    .lead-kpi-grid {
        grid-template-columns: 1fr;
    }

    .lead-funnel-row {
        grid-template-columns: 92px 1fr 56px;
    }
}

/* Enterprise UI refresh */
:root {
    --saas-nav-width: 260px;
    --saas-topbar-height: 64px;
}

#wrapper {
    background: var(--saas-bg) !important;
    min-height: 100vh;
    overflow: visible !important;
}

.saas-app-body {
    background:
        radial-gradient(circle at 82% -10%, rgba(249, 115, 22, .09), transparent 26%),
        linear-gradient(180deg, #fbfcfe 0, #f1f5fa 340px, #f6f8fb 100%) !important;
    color: var(--saas-text);
}

.saas-app-body p,
.saas-app-body label,
.saas-app-body td,
.saas-app-body th,
.saas-app-body li,
.saas-app-body span {
    font-size: 14px !important;
    letter-spacing: 0;
}

.saas-app-body .text-truncate {
    font-size: 13px !important;
    line-height: 1.35;
}

.saas-app-body .text-truncatee2,
.saas-app-body [data-plugin="counterup"] {
    color: var(--saas-heading) !important;
    font-size: clamp(24px, 2vw, 32px) !important;
    font-weight: 800 !important;
    line-height: 1.1;
}

.navbar-custom.saas-topbar {
    align-items: center;
    background: rgba(255, 255, 255, .96) !important;
    border-bottom: 1px solid var(--saas-border);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    display: flex;
    height: var(--saas-topbar-height);
    left: var(--saas-nav-width);
    min-height: var(--saas-topbar-height);
    padding: 0 22px;
    position: fixed !important;
    right: 0;
    top: 0;
    z-index: 1004;
}

.navbar-custom.saas-topbar .container-fluid {
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(260px, 520px) max-content;
    gap: 20px;
    min-height: var(--saas-topbar-height);
    padding: 0 !important;
    width: 100%;
}

.saas-topbar-left,
.saas-topbar-actions,
.saas-topbar-search,
.saas-topbar-brand,
.saas-topbar .nav-user,
.saas-user-meta {
    align-items: center;
    display: flex;
}

.saas-topbar-left {
    gap: 14px;
    min-width: 0;
}

.saas-topbar-brand {
    color: var(--saas-heading) !important;
    gap: 10px;
    min-width: 0;
}

.saas-topbar-brand img {
    height: 34px;
    object-fit: contain;
    width: auto;
}

.saas-topbar-brand span {
    color: var(--saas-heading) !important;
    font-weight: 800;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-topbar-search {
    background: #fff;
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow-xs);
    gap: 10px;
    height: 42px;
    justify-self: center;
    padding: 0 12px;
    width: 100%;
}

.saas-topbar-search i {
    color: var(--saas-muted) !important;
}

.saas-topbar-search input {
    background: transparent;
    border: 0;
    color: var(--saas-text);
    flex: 1;
    font-size: 14px;
    min-width: 0;
    outline: 0;
}

.saas-topbar-search kbd {
    background: var(--saas-surface-soft);
    border: 1px solid var(--saas-border);
    border-radius: 5px;
    color: var(--saas-muted);
    font-size: 11px;
    padding: 2px 7px;
}

.saas-topbar-actions {
    align-items: center;
    display: flex !important;
    gap: 8px;
    height: var(--saas-topbar-height);
    justify-content: flex-end;
    min-width: 0;
}

.navbar-custom.saas-topbar .topnav-menu > li,
.navbar-custom.saas-topbar .notification-list {
    align-items: center;
    display: flex;
    float: none !important;
    height: 42px;
    line-height: 1 !important;
    position: relative;
}

.navbar-custom.saas-topbar .nav-link,
.navbar-custom.saas-topbar .button-menu-mobile,
.navbar-custom.saas-topbar .saas-theme-toggle {
    align-items: center;
    background: #fff !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    color: var(--saas-heading) !important;
    display: inline-flex !important;
    height: 42px;
    justify-content: center;
    line-height: 1 !important;
    min-height: 42px;
    min-width: 42px;
    padding: 0 12px !important;
}

.navbar-custom.saas-topbar .saas-theme-toggle {
    cursor: pointer;
}

.navbar-custom.saas-topbar .button-menu-mobile {
    display: none;
}

.navbar-custom.saas-topbar .nav-link:hover,
.navbar-custom.saas-topbar .button-menu-mobile:hover,
.navbar-custom.saas-topbar .saas-theme-toggle:hover {
    background: var(--saas-primary-soft) !important;
    border-color: rgba(37, 99, 235, .24) !important;
}

.navbar-custom.saas-topbar .nav-user {
    gap: 10px;
    height: 42px;
    max-height: 42px;
    min-width: 178px;
    overflow: hidden;
    padding: 0 10px !important;
    width: 194px;
}

.navbar-custom.saas-topbar .nav-user img {
    height: 34px;
    margin: 0 !important;
    object-fit: cover;
    width: 34px !important;
}

.saas-user-meta {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
    min-width: 0;
    overflow: hidden;
}

.saas-user-meta strong {
    color: var(--saas-heading);
    display: block;
    font-size: 13px;
    font-weight: 800;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-user-meta small {
    color: var(--saas-muted) !important;
    display: block;
    font-size: 11px;
    margin-top: 1px;
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
    white-space: nowrap;
}

.navbar-custom.saas-topbar .nav-user .fa-chevron-down {
    align-items: center;
    display: inline-flex !important;
    height: 16px;
    justify-content: center;
    line-height: 1 !important;
    margin: 0;
    width: 16px;
}

.saas-notification-toggle {
    overflow: visible !important;
    position: relative;
}

.navbar-custom.saas-topbar .saas-notification-toggle > i,
.navbar-custom.saas-topbar .saas-theme-toggle > i {
    color: var(--saas-heading) !important;
    font-size: 17px !important;
}

.navbar-custom.saas-topbar .noti-icon-badge {
    align-items: center;
    border: 2px solid #fff;
    border-radius: 999px !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, .28);
    display: inline-flex;
    font-size: 10px;
    font-weight: 850;
    height: 22px;
    justify-content: center;
    line-height: 1;
    max-width: 36px;
    min-width: 22px;
    overflow: hidden;
    padding: 0 6px;
    position: absolute;
    right: -9px;
    text-align: center;
    top: -9px;
    white-space: nowrap;
    z-index: 2;
}

.saas-notification-menu {
    max-width: min(420px, calc(100vw - 24px));
    width: 420px;
}

.lms-notification-stack {
    bottom: 22px;
    display: grid;
    gap: 10px;
    max-width: min(390px, calc(100vw - 28px));
    position: fixed;
    right: 22px;
    width: 390px;
    z-index: 1105;
}

.lms-notification-toast {
    align-items: flex-start;
    animation: lms-notification-in .22s ease-out;
    background: var(--saas-surface);
    border: 1px solid var(--saas-border);
    border-left: 4px solid var(--saas-primary);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
    color: var(--saas-text);
    display: flex;
    gap: 11px;
    padding: 13px 14px;
}

.lms-notification-toast-icon {
    align-items: center;
    background: var(--saas-primary-soft);
    border-radius: 10px;
    color: var(--saas-primary);
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
}

.lms-notification-toast-body {
    min-width: 0;
}

.lms-notification-toast-body strong,
.lms-notification-toast-body p,
.lms-notification-toast-body small {
    display: block;
    margin: 0;
}

.lms-notification-toast-body strong {
    color: var(--saas-heading);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
}

.lms-notification-toast-body p {
    color: var(--saas-muted);
    font-size: 12px;
    line-height: 1.45;
    margin-top: 3px;
}

.lms-notification-toast-body small {
    color: var(--saas-muted);
    font-size: 10px;
    margin-top: 6px;
}

.lms-notification-toast-actions {
    margin-top: 7px;
}

.lms-notification-toast-open {
    color: var(--saas-primary) !important;
    font-size: 11px;
    font-weight: 850;
}

.lms-notification-toast-close {
    background: transparent;
    border: 0;
    color: var(--saas-muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    margin-left: auto;
    padding: 0 0 0 4px;
}

@keyframes lms-notification-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-saas-theme="dark"] .lms-notification-toast {
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

@media (max-width: 575.98px) {
    .lms-notification-stack {
        bottom: 12px;
        right: 12px;
        width: calc(100vw - 24px);
    }
}

.navbar-custom.saas-topbar .profile-dropdown {
    margin-top: 8px !important;
    min-width: 250px;
    padding: 8px !important;
    top: 100% !important;
}

.navbar-custom.saas-topbar .profile-dropdown .dropdown-header {
    border-bottom: 1px solid var(--saas-border);
    margin: 0 0 4px;
    padding: 10px 12px 9px !important;
}

.navbar-custom.saas-topbar .profile-dropdown .dropdown-header h6 {
    color: var(--saas-heading) !important;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
}

.navbar-custom.saas-topbar .profile-dropdown .dropdown-item {
    align-items: center;
    border-radius: 8px;
    color: var(--saas-heading) !important;
    display: flex;
    font-size: 14px !important;
    font-weight: 750;
    gap: 10px;
    margin: 2px 0;
    min-height: 40px;
    padding: 9px 12px !important;
}

.navbar-custom.saas-topbar .profile-dropdown .dropdown-item:hover,
.navbar-custom.saas-topbar .profile-dropdown .dropdown-item:focus {
    background: var(--saas-primary-soft) !important;
}

.navbar-custom.saas-topbar .profile-dropdown .dropdown-item i {
    color: var(--saas-muted) !important;
    text-align: center;
    width: 18px;
}

.left-side-menu {
    background:
        linear-gradient(180deg, var(--saas-sidebar) 0, #08224b 100%) !important;
    border-right: 0 !important;
    bottom: 0;
    box-shadow: 12px 0 30px rgba(6, 20, 45, .18);
    padding: 0 !important;
    top: 0 !important;
    width: var(--saas-nav-width) !important;
    z-index: 1002;
}

.left-side-menu .h-100 {
    padding: 16px 12px 22px;
}

.saas-sidebar-brand {
    align-items: center;
    color: #fff !important;
    display: flex;
    gap: 10px;
    min-height: 48px;
    padding: 6px 6px 14px;
}

.saas-sidebar-brand img {
    max-height: 42px;
    object-fit: contain;
    width: auto;
}

.saas-sidebar-brand span {
    color: rgba(255, 255, 255, .92) !important;
    font-weight: 850;
    line-height: 1.1;
}

.left-side-menu .user-box {
    align-items: center;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--saas-radius);
    display: flex !important;
    gap: 12px;
    margin: 6px 2px 16px;
    padding: 12px !important;
    text-align: left !important;
}

.left-side-menu .user-box .avatar-md {
    height: 42px;
    object-fit: cover;
    width: 42px;
}

.left-side-menu .user-box .dropdown {
    min-width: 0;
}

.left-side-menu .user-box a {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.left-side-menu .user-box p {
    color: rgba(255, 255, 255, .62) !important;
    font-size: 12px !important;
    margin: 2px 0 0;
}

#sidebar-menu {
    padding-bottom: 24px;
}

#sidebar-menu .menu-title {
    color: rgba(255, 255, 255, .48) !important;
    font-size: 11px !important;
    font-weight: 850;
    letter-spacing: .08em;
    margin: 18px 8px 8px;
    padding: 0 !important;
    text-transform: uppercase;
}

#sidebar-menu > ul > li {
    margin: 2px 0;
}

#sidebar-menu > ul > li > a,
#sidebar-menu .main-item,
#side-menu a {
    border: 1px solid transparent;
    border-radius: var(--saas-radius);
    color: rgba(255, 255, 255, .82) !important;
    font-size: 14px !important;
    font-weight: 700;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px !important;
}

#sidebar-menu > ul > li > a:hover,
#sidebar-menu .main-item:hover,
#side-menu a:hover,
#side-menu a.saas-active-link,
.menuitem-active,
#sidebar-menu li.mm-active > a {
    background: rgba(255, 255, 255, .1) !important;
    border-color: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
}

#sidebar-menu .styling,
.styling {
    background: rgba(255, 255, 255, .12) !important;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 7px !important;
    box-shadow: none !important;
    color: #fff !important;
    height: 32px;
    min-width: 32px;
}

#sidebar-menu .styling i,
.styling i {
    color: #fff !important;
    margin: 0 !important;
}

#sidebar-menu .gear {
    color: rgba(255, 255, 255, .52) !important;
    margin-left: auto;
}

.nav-second-level {
    border-left: 1px solid rgba(255, 255, 255, .12);
    margin: 4px 0 10px 28px;
    padding-left: 10px !important;
}

.nav-second-level > li > a,
.nav-second-level li a {
    border-radius: 7px;
    color: rgba(255, 255, 255, .68) !important;
    font-size: 13px !important;
    margin: 2px 0;
    min-height: 34px;
    padding: 8px 10px !important;
}

body[data-sidebar-size=condensed] {
    --saas-nav-width: 84px;
}

body[data-sidebar-size=condensed] .navbar-custom.saas-topbar {
    left: var(--saas-nav-width);
}

body[data-sidebar-size=condensed] .content-page {
    margin-left: var(--saas-nav-width) !important;
}

body[data-sidebar-size=condensed] .saas-footer {
    left: var(--saas-nav-width);
}

body[data-sidebar-size=condensed] .left-side-menu {
    overflow: hidden !important;
    width: var(--saas-nav-width) !important;
}

body[data-sidebar-size=condensed] .left-side-menu .h-100 {
    padding: 14px 10px 22px !important;
}

body[data-sidebar-size=condensed] .saas-sidebar-brand {
    justify-content: center;
    padding: 4px 0 14px;
}

body[data-sidebar-size=condensed] .saas-sidebar-brand img {
    max-height: 42px;
    max-width: 52px;
}

body[data-sidebar-size=condensed] .saas-sidebar-brand span {
    display: none !important;
}

body[data-sidebar-size=condensed] .left-side-menu .user-box {
    justify-content: center;
    margin: 6px 0 16px;
    padding: 10px 0 !important;
}

body[data-sidebar-size=condensed] .left-side-menu .user-box .dropdown,
body[data-sidebar-size=condensed] .left-side-menu .user-box p {
    display: none !important;
}

body[data-sidebar-size=condensed] #sidebar-menu .menu-title,
body[data-sidebar-size=condensed] #sidebar-menu .gear {
    display: none !important;
}

body[data-sidebar-size=condensed] #sidebar-menu > ul > li {
    margin: 6px 0;
    padding: 0 !important;
}

body[data-sidebar-size=condensed] #sidebar-menu > ul > li > a,
body[data-sidebar-size=condensed] #sidebar-menu .main-item,
body[data-sidebar-size=condensed] #side-menu a {
    gap: 0 !important;
    justify-content: center !important;
    margin: 0 auto !important;
    min-height: 48px !important;
    min-width: 54px !important;
    padding: 8px !important;
    position: relative !important;
    width: 54px !important;
}

body[data-sidebar-size=condensed] #sidebar-menu > ul > li > a > span:not(.styling),
body[data-sidebar-size=condensed] #sidebar-menu .main-item > span:not(.styling),
body[data-sidebar-size=condensed] #side-menu a > span:not(.styling) {
    display: none !important;
}

body[data-sidebar-size=condensed] #sidebar-menu .styling {
    display: inline-flex !important;
    margin: 0 !important;
}

body[data-sidebar-size=condensed] #sidebar-menu .collapse,
body[data-sidebar-size=condensed] #sidebar-menu .collapsing,
body[data-sidebar-size=condensed] .nav-second-level {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

body[data-sidebar-size=condensed] #wrapper .left-side-menu #sidebar-menu > ul > li:hover > a,
body[data-sidebar-size=condensed] .left-side-menu #sidebar-menu > ul > li:hover > a {
    background: rgba(255, 255, 255, .12) !important;
    box-shadow: none !important;
    color: #fff !important;
    left: auto !important;
    position: relative !important;
    width: 54px !important;
}

body[data-sidebar-size=condensed] #wrapper .left-side-menu #sidebar-menu > ul > li:hover > a span:not(.styling),
body[data-sidebar-size=condensed] .left-side-menu #sidebar-menu > ul > li:hover > a span:not(.styling) {
    display: none !important;
}

body[data-sidebar-size=condensed] #wrapper .left-side-menu #sidebar-menu > ul > li:hover > .collapse,
body[data-sidebar-size=condensed] .left-side-menu #sidebar-menu > ul > li:hover > .collapse {
    display: none !important;
}

.content-page {
    background: transparent !important;
    margin-left: var(--saas-nav-width) !important;
    margin-top: 0 !important;
    min-height: calc(100vh - var(--saas-topbar-height));
    padding: calc(var(--saas-topbar-height) + 12px) 22px 72px !important;
}

.content-page > .content {
    padding: 0 !important;
}

.container-fluid {
    max-width: 1560px;
    padding-left: 0;
    padding-right: 0;
}

.main-content {
    padding: 0 0 28px !important;
}

.main-content > .section > .row > [class*="col-"].mt-3:first-child {
    margin-top: 0 !important;
}

.main-content h2:first-child,
.section h2:first-child {
    color: var(--saas-heading);
    font-size: clamp(24px, 2.6vw, 36px);
    font-weight: 850;
    margin: 2px 0 18px;
}

.main-content h2:first-child::after,
.section h2:first-child::after {
    color: var(--saas-muted);
    content: "Here is your workspace overview.";
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-top: 6px;
}

.saas-page-header {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow-xs);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 0 18px;
    padding: 18px 20px;
}

.saas-page-header h1 {
    color: var(--saas-heading);
    font-size: clamp(24px, 2.5vw, 34px);
    font-weight: 850;
    line-height: 1.12;
    margin: 0;
}

.saas-page-header p:not(.saas-eyebrow) {
    color: var(--saas-muted) !important;
    font-size: 14px !important;
    margin: 7px 0 0;
}

.saas-page-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.saas-dashboard-cards,
.main-content .row[style*="margin-top"] {
    margin-top: 0 !important;
}

.card,
.card-box,
.widget-rounded-circle,
.modal-content,
.right-bar {
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    box-shadow: var(--saas-shadow-xs) !important;
}

.card,
.card-box,
.widget-rounded-circle {
    background: rgba(255, 255, 255, .96) !important;
    margin-bottom: 18px;
    margin-top: 0 !important;
}

.card:hover,
.card-box:hover,
.widget-rounded-circle:hover {
    box-shadow: var(--saas-shadow-sm) !important;
    transform: translateY(-1px);
}

.main-content a > .card,
.main-content .widget-rounded-circle {
    min-height: 118px;
}

.main-content a {
    color: inherit;
}

.banner-img {
    align-items: center;
    background: var(--saas-primary-soft) !important;
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: var(--saas-radius) !important;
    box-shadow: none !important;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    min-width: 48px !important;
    padding: 0 !important;
    width: 48px;
}

.banner-img .fa,
.banner-img i {
    color: var(--saas-primary) !important;
    font-size: 18px !important;
    margin: 0 !important;
}

.card .row,
.card-box .row {
    align-items: center;
}

.card .col-md-8,
.card .col-md-9,
.widget-rounded-circle .col-md-9 {
    min-width: 0;
}

.header-title {
    color: var(--saas-heading);
    font-size: 16px !important;
    font-weight: 850;
}

.table-responsive {
    background: #fff;
    overflow-x: auto;
}

.table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.btn:not(.btn-link) {
    min-height: 40px;
}

.form-control,
.custom-select,
select,
textarea {
    font-size: 14px !important;
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    min-height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.modal-content {
    overflow: hidden;
}

.modal-footer {
    background: var(--saas-surface-soft);
    border-top: 1px solid var(--saas-border);
}

.right-bar {
    box-shadow: var(--saas-shadow-md) !important;
}

.saas-footer {
    background: transparent !important;
    border-top: 1px solid var(--saas-border);
    bottom: auto;
    color: var(--saas-muted) !important;
    left: var(--saas-nav-width);
    padding: 0 22px !important;
    right: 0;
}

.saas-footer-inner {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 4px;
}

.saas-footer .container-fluid {
    max-width: 1560px;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.saas-footer p {
    margin: 0;
}

.saas-footer a {
    color: var(--saas-muted) !important;
}

.saas-footer .footer-links {
    align-items: center;
    display: flex;
    gap: 18px;
}

.saas-login-body {
    background:
        radial-gradient(circle at 15% 0, rgba(37, 99, 235, .08), transparent 28%),
        #f6f8fc !important;
}

.saas-login-shell {
    padding: 28px;
}

.saas-login-hero,
.saas-login-card {
    border-radius: var(--saas-radius) !important;
}

.saas-login-hero {
    min-height: calc(100vh - 56px);
}

.saas-login-card {
    box-shadow: 0 24px 70px rgba(16, 24, 40, .13);
}

.saas-login-submit {
    background: linear-gradient(180deg, var(--saas-accent), var(--saas-accent-dark)) !important;
    border-color: var(--saas-accent-dark) !important;
}

.saas-analytics-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin: 4px 0 22px;
}

.saas-analytics-card {
    background: linear-gradient(180deg, #fff, #fbfcff);
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius);
    box-shadow: var(--saas-shadow-sm);
    grid-column: span 4;
    min-height: 0;
    overflow: hidden;
    padding: 16px;
}

.saas-analytics-card-wide {
    grid-column: span 8;
}

.saas-panel-header {
    align-items: flex-start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.saas-panel-header a {
    align-items: center;
    border: 1px solid var(--saas-border);
    border-radius: 999px;
    color: var(--saas-primary) !important;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 800;
    min-height: 32px;
    padding: 0 12px;
}

.saas-panel-title {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.saas-panel-title h3 {
    color: var(--saas-heading);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.2;
    margin: 0 0 4px;
}

.saas-panel-title p {
    color: var(--saas-muted) !important;
    font-size: 12px !important;
    line-height: 1.45;
    margin: 0;
}

.saas-panel-icon {
    align-items: center;
    background: rgba(37, 99, 235, .1);
    border-radius: 10px;
    color: var(--saas-primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.saas-panel-icon-blue {
    background: rgba(37, 99, 235, .11);
    color: #2563eb;
}

.saas-panel-icon-green {
    background: rgba(16, 185, 129, .12);
    color: #059669;
}

.saas-panel-icon-amber {
    background: rgba(245, 158, 11, .13);
    color: #d97706;
}

.saas-panel-icon-purple {
    background: rgba(124, 58, 237, .12);
    color: #7c3aed;
}

.saas-panel-icon-red {
    background: rgba(239, 68, 68, .11);
    color: #dc2626;
}

.saas-chart {
    height: 220px;
    min-height: 220px;
    overflow: hidden;
    width: 100%;
}

.saas-chart-large {
    height: 274px;
    min-height: 274px;
}

.saas-chart-compact {
    height: 214px;
    min-height: 214px;
}

.saas-chart .apexcharts-canvas,
.saas-chart .apexcharts-svg {
    max-width: 100% !important;
}

.saas-chart .apexcharts-datalabel,
.saas-chart .apexcharts-pie-label {
    font-size: 11px !important;
    font-weight: 700 !important;
}

.saas-chart-legend {
    border-top: 1px solid var(--saas-border);
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    margin-top: 6px;
    padding-top: 12px;
}

.saas-chart-legend-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.saas-legend-item {
    align-items: center;
    color: var(--saas-muted);
    display: grid;
    font-size: 12px;
    font-weight: 750;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-width: 0;
}

.saas-legend-item span:not(.saas-legend-dot) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-legend-item strong {
    color: var(--saas-heading);
    font-size: 12px;
    font-weight: 850;
}

.saas-legend-item small {
    color: var(--saas-muted);
    font-size: 11px;
    font-weight: 800;
}

.saas-legend-dot {
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
    display: inline-block;
    height: 10px;
    width: 10px;
}

.saas-pipeline-list,
.saas-user-list,
.saas-activity-list,
.saas-focus-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saas-pipeline-row {
    background: linear-gradient(180deg, #f9fbff, #f6f9fd);
    border: 1px solid var(--saas-border);
    border-radius: 14px;
    color: var(--saas-heading) !important;
    display: block;
    padding: 16px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.saas-pipeline-row:hover {
    border-color: var(--pipeline-color);
    border-color: color-mix(in srgb, var(--pipeline-color) 36%, var(--saas-border));
    box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
    transform: translateY(-1px);
}

.saas-pipeline-row-head {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: space-between;
    margin-bottom: 14px;
}

.saas-pipeline-label {
    align-items: center;
    color: var(--saas-heading) !important;
    display: inline-flex;
    font-size: 16px !important;
    font-weight: 900;
    gap: 10px;
    min-width: 0;
}

.saas-pipeline-label i {
    align-items: center;
    background: #eef4ff;
    background: color-mix(in srgb, var(--pipeline-color) 13%, #fff);
    border-radius: 10px;
    color: var(--pipeline-color);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.saas-pipeline-row strong {
    color: var(--saas-muted);
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.saas-pipeline-meter {
    background: #e8edf5;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.saas-pipeline-meter span {
    background: linear-gradient(90deg, #111827, var(--pipeline-color), #22c55e);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--pipeline-progress);
}

.saas-user-row,
.saas-activity-row {
    align-items: center;
    background: #f8fbff;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 12px;
    display: flex;
    gap: 12px;
    min-height: 58px;
    padding: 10px 12px;
}

.saas-user-row img {
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
    height: 38px;
    object-fit: cover;
    width: 38px;
}

.saas-user-row > div,
.saas-activity-row > div {
    min-width: 0;
}

.saas-user-row strong,
.saas-activity-row strong {
    color: var(--saas-heading);
    display: block;
    font-size: 13px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-user-row span,
.saas-activity-row span,
.saas-activity-row small {
    color: var(--saas-muted);
    display: block;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-user-row > i {
    color: #16a34a;
    margin-left: auto;
}

.saas-focus-row {
    align-items: center;
    background: #f8fbff;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 12px;
    color: var(--saas-heading) !important;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 10px 12px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.saas-focus-row:hover {
    border-color: rgba(37, 99, 235, .28);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
    transform: translateY(-1px);
}

.saas-focus-row > span:nth-child(2) {
    color: var(--saas-muted);
    font-size: 13px !important;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-focus-row strong {
    color: var(--saas-heading);
    font-size: 18px;
    font-weight: 900;
}

.saas-focus-icon {
    align-items: center;
    border-radius: 10px;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.saas-focus-icon-blue {
    background: rgba(37, 99, 235, .1);
    color: #2563eb;
}

.saas-focus-icon-amber {
    background: rgba(217, 119, 6, .12);
    color: #d97706;
}

.saas-focus-icon-red {
    background: rgba(220, 38, 38, .1);
    color: #dc2626;
}

.saas-focus-icon-purple {
    background: rgba(124, 58, 237, .11);
    color: #7c3aed;
}

.saas-activity-icon {
    align-items: center;
    background: rgba(37, 99, 235, .1);
    border-radius: 14px;
    color: var(--saas-primary);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 18px !important;
    height: 46px;
    justify-content: center;
    line-height: 1 !important;
    position: relative;
    width: 46px;
}

.saas-activity-icon i {
    color: inherit !important;
    display: block;
    font-size: 18px !important;
    line-height: 1 !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
}

.saas-activity-icon-blue {
    background: rgba(37, 99, 235, .12);
    color: #2563eb;
}

.saas-activity-icon-amber {
    background: rgba(217, 119, 6, .13);
    color: #d97706;
}

.saas-activity-icon-teal {
    background: rgba(20, 184, 166, .13);
    color: #0f766e;
}

.saas-activity-icon-green {
    background: rgba(5, 150, 105, .13);
    color: #059669;
}

.saas-activity-icon-red {
    background: rgba(220, 38, 38, .11);
    color: #dc2626;
}

.saas-activity-icon-purple {
    background: rgba(124, 58, 237, .12);
    color: #7c3aed;
}

.saas-activity-icon-slate {
    background: rgba(100, 116, 139, .14);
    color: #475569;
}

.saas-empty-state {
    align-items: center;
    border: 1px dashed var(--saas-border);
    border-radius: 12px;
    color: var(--saas-muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 180px;
    text-align: center;
}

.saas-empty-state-sm {
    min-height: 82px;
}

.saas-empty-state i {
    color: var(--saas-primary);
    font-size: 22px;
}

.saas-empty-state p {
    color: var(--saas-muted) !important;
    font-size: 13px !important;
    margin: 0;
}

html[data-saas-theme="dark"] body.saas-app-body {
    background:
        radial-gradient(circle at 82% -10%, rgba(37, 99, 235, .18), transparent 28%),
        linear-gradient(180deg, #0f172a 0, #111827 360px, #0f172a 100%) !important;
}

html[data-saas-theme="dark"] .navbar-custom.saas-topbar,
html[data-saas-theme="dark"] .saas-topbar-search,
html[data-saas-theme="dark"] .navbar-custom.saas-topbar .nav-link,
html[data-saas-theme="dark"] .navbar-custom.saas-topbar .button-menu-mobile,
html[data-saas-theme="dark"] .navbar-custom.saas-topbar .saas-theme-toggle,
html[data-saas-theme="dark"] .saas-page-header,
html[data-saas-theme="dark"] .card,
html[data-saas-theme="dark"] .card-box,
html[data-saas-theme="dark"] .widget-rounded-circle,
html[data-saas-theme="dark"] .saas-analytics-card,
html[data-saas-theme="dark"] .saas-pipeline-row,
html[data-saas-theme="dark"] .saas-user-row,
html[data-saas-theme="dark"] .saas-activity-row,
html[data-saas-theme="dark"] .saas-focus-row,
html[data-saas-theme="dark"] .table-responsive,
html[data-saas-theme="dark"] .dropdown-menu,
html[data-saas-theme="dark"] .modal-content {
    background: #111827 !important;
    border-color: var(--saas-border) !important;
    color: var(--saas-text) !important;
}

html[data-saas-theme="dark"] .saas-analytics-card,
html[data-saas-theme="dark"] .saas-page-header,
html[data-saas-theme="dark"] .card,
html[data-saas-theme="dark"] .card-box {
    box-shadow: 0 18px 44px rgba(0, 0, 0, .28) !important;
}

html[data-saas-theme="dark"] .saas-pipeline-row,
html[data-saas-theme="dark"] .saas-user-row,
html[data-saas-theme="dark"] .saas-activity-row,
html[data-saas-theme="dark"] .saas-focus-row {
    background: #162033 !important;
}

html[data-saas-theme="dark"] .saas-pipeline-label i {
    background: rgba(255, 255, 255, .08);
}

html[data-saas-theme="dark"] .saas-pipeline-meter {
    background: #263248;
}

html[data-saas-theme="dark"] .saas-pipeline-meter span {
    background: linear-gradient(90deg, #020617, var(--pipeline-color), #22c55e);
}

html[data-saas-theme="dark"] .table,
html[data-saas-theme="dark"] .table td,
html[data-saas-theme="dark"] .table th,
html[data-saas-theme="dark"] .dropdown-item,
html[data-saas-theme="dark"] .form-control,
html[data-saas-theme="dark"] .custom-select,
html[data-saas-theme="dark"] select,
html[data-saas-theme="dark"] textarea {
    background-color: #111827 !important;
    border-color: var(--saas-border) !important;
    color: var(--saas-text) !important;
}

html[data-saas-theme="dark"] .dropdown-item:hover,
html[data-saas-theme="dark"] .dropdown-item:focus {
    background: #1f2937 !important;
    color: var(--saas-heading) !important;
}

html[data-saas-theme="dark"] .btn-light {
    background: #1f2937 !important;
    border-color: var(--saas-border) !important;
    color: var(--saas-heading) !important;
}

html[data-saas-theme="dark"] .saas-legend-dot {
    box-shadow: 0 0 0 3px #111827;
}

html[data-saas-theme="dark"] .navbar-custom.saas-topbar .noti-icon-badge {
    border-color: #111827;
}

html[data-saas-theme="dark"] .saas-empty-state {
    background: #162033;
}

@media (max-width: 1199.98px) {
    .saas-analytics-card,
    .saas-analytics-card-wide {
        grid-column: span 6;
    }

    .navbar-custom.saas-topbar .container-fluid {
        grid-template-columns: auto 1fr auto;
    }

    .saas-topbar-brand span {
        display: none;
    }
}

@media (max-width: 991.98px) {
    :root {
        --saas-nav-width: 260px;
    }

    .navbar-custom.saas-topbar {
        left: 0;
        padding: 0 14px;
    }

    .navbar-custom.saas-topbar .container-fluid {
        grid-template-columns: auto 1fr;
    }

    .navbar-custom.saas-topbar .button-menu-mobile {
        display: inline-flex;
    }

    .saas-topbar-search {
        display: none !important;
    }

    .left-side-menu {
        display: block !important;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: var(--saas-nav-width) !important;
    }

    body.sidebar-enable .left-side-menu {
        transform: translateX(0);
    }

    body[data-sidebar-size=condensed] .navbar-custom.saas-topbar {
        left: 0;
    }

    body[data-sidebar-size=condensed] .saas-footer {
        left: 0;
    }

    .content-page,
    body[data-sidebar-size=condensed] .content-page {
        margin-left: 0 !important;
        margin-top: 0 !important;
        padding: calc(var(--saas-topbar-height) + 10px) 14px 72px !important;
    }

    .saas-footer {
        left: 0;
        padding: 0 14px !important;
    }

    .saas-footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        padding: 14px 0;
    }

    .saas-login-shell {
        padding: 0;
    }

    .saas-login-hero {
        border-radius: 0 !important;
        min-height: auto;
    }

    .saas-analytics-card,
    .saas-analytics-card-wide {
        grid-column: span 12;
    }
}

@media (max-width: 575.98px) {
    .navbar-custom.saas-topbar {
        height: 64px;
        min-height: 64px;
    }

    .navbar-custom.saas-topbar .container-fluid {
        min-height: 64px;
    }

    .saas-topbar-actions {
        gap: 4px;
    }

    .navbar-custom.saas-topbar .nav-link,
    .navbar-custom.saas-topbar .button-menu-mobile {
        height: 38px;
        min-height: 38px;
        min-width: 38px;
        padding: 0 9px !important;
    }

    .content-page {
        margin-top: 0 !important;
        padding-top: 74px !important;
    }

    .main-content h2:first-child,
    .section h2:first-child {
        font-size: 24px;
    }

    .card,
    .card-box {
        margin-bottom: 14px;
    }

    .saas-analytics-card {
        padding: 14px;
    }

    .saas-panel-header {
        flex-direction: column;
    }

    .saas-chart,
    .saas-chart-large {
        height: 220px;
        min-height: 220px;
    }

    .saas-chart-large {
        height: 248px;
        min-height: 248px;
    }

    .saas-chart-legend-two {
        grid-template-columns: 1fr;
    }
}

/* Enterprise LMS UI foundation refresh */
:root {
    --saas-space-1: 4px;
    --saas-space-2: 8px;
    --saas-space-3: 12px;
    --saas-space-4: 16px;
    --saas-space-5: 20px;
    --saas-space-6: 24px;
    --saas-space-8: 32px;
    --saas-radius-lg: 12px;
    --saas-radius-xl: 16px;
    --saas-focus-ring: 0 0 0 3px rgba(37, 99, 235, .18);
    --saas-disabled: #cbd5e1;
    --saas-chart-blue: #2563eb;
    --saas-chart-teal: #14b8a6;
    --saas-chart-green: #10b981;
    --saas-chart-amber: #f59e0b;
    --saas-chart-red: #ef4444;
    --saas-chart-violet: #7c3aed;
}

body.saas-app-body {
    color: var(--saas-text);
    font-size: 14px;
    line-height: 1.5;
}

.content-page .container-fluid {
    padding-left: clamp(16px, 2vw, 28px);
    padding-right: clamp(16px, 2vw, 28px);
}

.saas-page-header,
.enterprise-hero,
.card,
.card-box,
.enterprise-card,
.saas-analytics-card,
.saas-panel,
.modal-content,
.dropdown-menu {
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius-lg) !important;
    box-shadow: var(--saas-shadow-xs) !important;
}

.saas-page-header,
.enterprise-hero {
    background: var(--saas-surface) !important;
    margin-bottom: var(--saas-space-6) !important;
    padding: clamp(18px, 2.2vw, 28px) !important;
}

.saas-page-header h1,
.saas-page-header h2,
.enterprise-hero h1,
.enterprise-hero h2,
.card-title,
.enterprise-card h2,
.enterprise-card h3 {
    color: var(--saas-heading) !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
    line-height: 1.15;
}

.saas-page-header p,
.enterprise-hero p,
.card p,
.enterprise-card p {
    color: var(--saas-muted);
}

.navbar-custom.saas-topbar {
    border-bottom: 1px solid var(--saas-border) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03) !important;
}

.navbar-custom.saas-topbar .container-fluid {
    gap: var(--saas-space-4);
    max-width: none;
    padding-left: clamp(14px, 2vw, 28px);
    padding-right: clamp(14px, 2vw, 28px);
}

.saas-topbar-brand span,
.saas-user-meta strong {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-topbar-search {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius-lg) !important;
    box-shadow: var(--saas-shadow-xs);
    min-height: 44px;
}

.saas-topbar-search:focus-within {
    border-color: var(--saas-primary) !important;
    box-shadow: var(--saas-focus-ring) !important;
}

.saas-topbar-search input {
    color: var(--saas-text) !important;
    min-width: min(32vw, 520px);
}

.saas-sync-status {
    align-items: center;
    background: var(--saas-surface-soft);
    border: 1px solid var(--saas-border);
    border-radius: 999px;
    color: var(--saas-muted);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 7px;
    height: 38px;
    padding: 0 12px;
    white-space: nowrap;
}

.saas-sync-dot {
    background: var(--saas-success);
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, .12);
    display: inline-block;
    height: 8px;
    width: 8px;
}

.saas-sync-status.is-offline .saas-sync-dot {
    background: var(--saas-warning);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, .14);
}

.saas-sync-status.is-offline .saas-sync-label {
    color: var(--saas-warning);
}

.navbar-custom.saas-topbar .noti-icon-badge {
    align-items: center;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    height: 18px;
    justify-content: center;
    line-height: 1;
    min-width: 18px;
    padding: 0 5px;
    right: 2px;
    top: 5px;
}

.saas-user-toggle {
    gap: 10px;
    min-width: 0;
}

.saas-user-toggle img {
    flex: 0 0 38px;
    height: 38px !important;
    object-fit: cover;
    width: 38px !important;
}

.saas-user-meta {
    min-width: 0;
}

.profile-dropdown {
    min-width: 230px;
    padding: 8px !important;
}

.profile-dropdown .dropdown-header {
    margin-bottom: 4px;
    padding: 10px 12px !important;
}

.profile-dropdown .dropdown-item {
    align-items: center;
    border-radius: var(--saas-radius);
    color: var(--saas-text) !important;
    display: flex;
    font-weight: 700;
    gap: 10px;
    padding: 11px 12px !important;
}

.profile-dropdown .dropdown-item:hover,
.profile-dropdown .dropdown-item:focus {
    background: var(--saas-surface-tint) !important;
    color: var(--saas-primary) !important;
}

.left-side-menu {
    border-right: 1px solid rgba(255, 255, 255, .08);
}

#sidebar-menu .menuitem-active > a,
#side-menu .menuitem-active > a,
#sidebar-menu a.saas-active-link,
#side-menu a.saas-active-link {
    background: rgba(255, 255, 255, .12) !important;
    border-color: rgba(255, 255, 255, .14) !important;
    color: #ffffff !important;
}

body[data-sidebar-size=condensed] .left-side-menu #sidebar-menu > ul > li > a span,
body[data-sidebar-size=condensed] .left-side-menu #side-menu > li > a span {
    opacity: 0;
    pointer-events: none;
}

body[data-sidebar-size=condensed] .left-side-menu #sidebar-menu > ul > li > a,
body[data-sidebar-size=condensed] .left-side-menu #side-menu > li > a {
    justify-content: center;
    min-height: 48px;
}

.btn,
button,
input[type="submit"] {
    border-radius: var(--saas-radius) !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
}

.btn-primary,
.saas-login-submit,
.enterprise-card .btn-primary {
    background: var(--saas-primary) !important;
    border-color: var(--saas-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.saas-login-submit:hover {
    background: var(--saas-primary-dark) !important;
    border-color: var(--saas-primary-dark) !important;
}

.btn-outline-primary {
    border-color: var(--saas-primary) !important;
    color: var(--saas-primary) !important;
}

.form-control,
.custom-select,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="search"] {
    background: var(--saas-surface) !important;
    border: 1px solid var(--saas-border) !important;
    border-radius: var(--saas-radius) !important;
    color: var(--saas-text) !important;
    min-height: 42px;
}

.form-control:focus,
.custom-select:focus,
select:focus,
textarea:focus,
input:focus {
    border-color: var(--saas-primary) !important;
    box-shadow: var(--saas-focus-ring) !important;
}

label,
.form-group label,
.enterprise-card label {
    color: var(--saas-text) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    margin-bottom: 7px;
}

.invalid-feedback,
.text-danger {
    color: var(--saas-danger) !important;
}

.table-responsive {
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius-lg);
    overflow: auto;
}

.table {
    background: var(--saas-surface) !important;
    color: var(--saas-text) !important;
    margin-bottom: 0 !important;
}

.table thead th,
table thead th {
    background: var(--saas-surface-soft) !important;
    border-bottom: 1px solid var(--saas-border) !important;
    color: var(--saas-muted) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .02em !important;
    padding: 14px 16px !important;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td,
table tbody td {
    border-top: 1px solid var(--saas-border) !important;
    color: var(--saas-text) !important;
    padding: 14px 16px !important;
    vertical-align: middle !important;
}

.table tbody tr:hover {
    background: var(--saas-surface-tint) !important;
}

.badge,
.status-badge,
.lead-badge {
    align-items: center;
    border-radius: 999px !important;
    display: inline-flex;
    font-size: 11px !important;
    font-weight: 800 !important;
    gap: 6px;
    line-height: 1;
    min-height: 24px;
    padding: 6px 10px !important;
}

.saas-dashboard-cards .card,
.main-content > .row .card,
.section-body > .row .card {
    background: var(--saas-surface) !important;
    border-top-width: 1px !important;
    margin-top: 0 !important;
    overflow: hidden;
}

.saas-dashboard-cards .card h1,
.saas-dashboard-cards .card h2,
.saas-dashboard-cards .card h3,
.main-content > .row .card h1,
.main-content > .row .card h2,
.main-content > .row .card h3 {
    color: var(--saas-heading) !important;
    font-size: clamp(24px, 2vw, 34px) !important;
    font-weight: 800 !important;
}

.banner-img,
.banner-img[style] {
    background: linear-gradient(135deg, var(--saas-surface), var(--saas-surface-soft)) !important;
    color: var(--saas-text) !important;
}

.saas-analytics-grid {
    display: grid;
    gap: var(--saas-space-6);
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.saas-analytics-card,
.saas-analytics-card-wide,
.enterprise-card {
    background: var(--saas-surface) !important;
    color: var(--saas-text) !important;
    min-width: 0;
    padding: clamp(16px, 2vw, 24px) !important;
}

.saas-analytics-card {
    grid-column: span 4;
}

.saas-analytics-card-wide {
    grid-column: span 8;
}

.saas-panel-header,
.enterprise-card-header {
    align-items: flex-start;
    display: flex;
    gap: var(--saas-space-4);
    justify-content: space-between;
    margin-bottom: var(--saas-space-5);
}

.saas-panel-icon,
.enterprise-card-icon,
.activity-icon {
    align-items: center;
    background: var(--saas-primary-soft);
    border-radius: var(--saas-radius-lg);
    color: var(--saas-primary);
    display: inline-flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.saas-chart,
.saas-chart-large,
.chart-container,
canvas {
    max-width: 100%;
}

.saas-chart canvas,
.saas-chart-large canvas,
.chart-container canvas {
    height: auto !important;
    max-height: 360px;
}

.lead-enterprise-page,
.lead-workspace,
.lead-detail-page {
    color: var(--saas-text);
}

.enterprise-card form {
    display: grid;
    gap: var(--saas-space-4);
}

.enterprise-card textarea {
    min-height: 116px;
    resize: vertical;
}

.enterprise-card .table-responsive {
    margin-top: var(--saas-space-4);
}

.activity-item,
.recent-activity-item,
.timeline-item {
    align-items: flex-start;
    background: var(--saas-surface-soft);
    border: 1px solid var(--saas-border);
    border-radius: var(--saas-radius-lg);
    display: flex;
    gap: var(--saas-space-4);
    padding: var(--saas-space-4);
}

.activity-item + .activity-item,
.recent-activity-item + .recent-activity-item,
.timeline-item + .timeline-item {
    margin-top: var(--saas-space-3);
}

.nav-tabs {
    border-bottom: 1px solid var(--saas-border) !important;
    gap: 6px;
}

.nav-tabs .nav-link {
    border: 0 !important;
    border-radius: var(--saas-radius) var(--saas-radius) 0 0 !important;
    color: var(--saas-muted) !important;
    font-weight: 750 !important;
    padding: 11px 14px !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
    background: var(--saas-surface-tint) !important;
    color: var(--saas-primary) !important;
}

.alert {
    border-radius: var(--saas-radius-lg) !important;
    border-width: 1px !important;
    font-weight: 650;
}

.saas-empty-row td,
.empty-state,
.saas-empty-state {
    color: var(--saas-muted) !important;
    font-weight: 650;
    text-align: center;
}

.saas-loading button[aria-busy="true"],
.saas-loading input[type="submit"][aria-busy="true"] {
    opacity: .72;
    pointer-events: none;
}

.saas-loading button[aria-busy="true"]::after {
    animation: saas-spin .7s linear infinite;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 14px;
    margin-left: 8px;
    vertical-align: -2px;
    width: 14px;
}

@keyframes saas-spin {
    to {
        transform: rotate(360deg);
    }
}

.saas-footer {
    background: var(--saas-surface) !important;
    border-top: 1px solid var(--saas-border) !important;
}

.saas-footer .container-fluid {
    max-width: none;
    padding-left: clamp(18px, 2vw, 32px);
    padding-right: clamp(18px, 2vw, 32px);
}

.saas-footer-inner {
    gap: var(--saas-space-4);
}

.saas-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.saas-login-stats strong {
    font-size: clamp(18px, 1.6vw, 24px) !important;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.saas-login-stats div {
    min-width: 0;
}

html[data-saas-theme="dark"] .navbar-custom.saas-topbar,
html[data-saas-theme="dark"] .saas-topbar-search,
html[data-saas-theme="dark"] .saas-sync-status,
html[data-saas-theme="dark"] .saas-page-header,
html[data-saas-theme="dark"] .enterprise-hero,
html[data-saas-theme="dark"] .card,
html[data-saas-theme="dark"] .card-box,
html[data-saas-theme="dark"] .enterprise-card,
html[data-saas-theme="dark"] .saas-analytics-card,
html[data-saas-theme="dark"] .dropdown-menu,
html[data-saas-theme="dark"] .modal-content,
html[data-saas-theme="dark"] .saas-footer {
    background: var(--saas-surface) !important;
    color: var(--saas-text) !important;
}

html[data-saas-theme="dark"] .table thead th,
html[data-saas-theme="dark"] table thead th {
    background: var(--saas-surface-soft) !important;
}

html[data-saas-theme="dark"] .table tbody tr:hover {
    background: rgba(37, 99, 235, .12) !important;
}

html[data-saas-theme="dark"] .banner-img,
html[data-saas-theme="dark"] .activity-item,
html[data-saas-theme="dark"] .recent-activity-item,
html[data-saas-theme="dark"] .timeline-item {
    background: var(--saas-surface-soft) !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
    }
}

@media (max-width: 1199.98px) {
    .saas-analytics-card,
    .saas-analytics-card-wide {
        grid-column: span 6;
    }

    .saas-topbar-search input {
        min-width: min(36vw, 420px);
    }

    .enterprise-dashboard-card-grid,
    .enterprise-presence-grid,
    .setup-management-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .content-page .container-fluid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .saas-page-header,
    .enterprise-hero {
        align-items: stretch;
        display: flex;
        flex-direction: column;
        gap: var(--saas-space-4);
    }

    .saas-panel-header,
    .enterprise-card-header {
        flex-direction: column;
    }

    .saas-user-meta,
    .saas-topbar-brand span {
        display: none;
    }

    .table tbody td,
    table tbody td,
    .table thead th,
    table thead th {
        padding: 12px !important;
    }

    .enterprise-dashboard-card-grid,
    .enterprise-presence-header,
    .enterprise-presence-grid,
    .setup-management-grid {
        grid-template-columns: 1fr;
    }

    .enterprise-presence-user {
        grid-template-columns: 42px 1fr;
    }

    .enterprise-presence-user .presence-status-pill {
        grid-column: 1 / -1;
        justify-self: start;
    }
}
