/* ==========================================================================
   theme-saas.css
   Modern SaaS skin layered on top of SmartAdmin 1.5 + Bootstrap 3.
   Every rule is scoped to body:is(.theme-saas, .theme-glass) so pages without
   either class (source/ tenant e-forms, print confirmations) are unaffected.
   theme-glass reuses these rules; theme-glass.css layers its overrides on top.
   Must be linked AFTER bundle.min.css / style.css.
   ========================================================================== */

/* 1. Tokens
   ========================================================================== */
body:is(.theme-saas, .theme-glass) {
    --ts-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --ts-bg: #f7f8fa;
    --ts-surface: #ffffff;
    --ts-surface-2: #fafbfc;
    --ts-surface-3: #f3f4f6;
    --ts-border: #e6e8eb;
    --ts-border-strong: #d4d7dd;

    --ts-text: #0f1115;
    --ts-text-2: #374151;
    --ts-muted: #6b7280;
    --ts-subtle: #9ca3af;

    --ts-accent: #6366f1;
    --ts-accent-hover: #4f46e5;
    --ts-accent-text: #4338ca;
    --ts-accent-soft: rgba(99, 102, 241, 0.10);
    --ts-accent-ring: rgba(99, 102, 241, 0.28);

    --ts-success: #10b981;
    --ts-success-hover: #059669;
    --ts-success-text: #047857;
    --ts-success-soft: rgba(16, 185, 129, 0.12);
    --ts-warning: #f59e0b;
    --ts-warning-hover: #d97706;
    --ts-warning-text: #b45309;
    --ts-warning-soft: rgba(245, 158, 11, 0.14);
    --ts-danger: #ef4444;
    --ts-danger-hover: #dc2626;
    --ts-danger-text: #b91c1c;
    --ts-danger-soft: rgba(239, 68, 68, 0.12);
    --ts-info: #0ea5e9;
    --ts-info-hover: #0284c7;
    --ts-info-text: #0369a1;
    --ts-info-soft: rgba(14, 165, 233, 0.12);

    --ts-ink: #0d0f14;
    --ts-ink-2: #151821;
    --ts-ink-3: #1e2230;
    --ts-ink-border: rgba(255, 255, 255, 0.06);
    --ts-ink-text: #9aa1b2;
    --ts-ink-text-hover: #f3f4f6;

    --ts-radius-sm: 6px;
    --ts-radius: 8px;
    --ts-radius-lg: 12px;
    --ts-radius-pill: 999px;

    --ts-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --ts-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.05);
    --ts-shadow-md: 0 2px 4px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.08);
    --ts-shadow-lg: 0 2px 6px rgba(16, 24, 40, 0.06), 0 16px 40px rgba(16, 24, 40, 0.14);
    --ts-ring: 0 0 0 3px var(--ts-accent-ring);

    --ts-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ts-speed: 0.15s;

    /* Re-point the legacy skins-1.css variables at the new palette */
    --primary-color: var(--ts-accent);
    --primary-txt-color: #ffffff;
    --secondary-color: var(--ts-ink);
    --secondary-txt-color: var(--ts-ink-text);
}

/* 2. Base
   ========================================================================== */
html:has(> body:is(.theme-saas, .theme-glass)):not(.login-background) {
    background: #f7f8fa;
}

body:is(.theme-saas, .theme-glass),
body:is(.theme-saas, .theme-glass) #main {
    background: var(--ts-bg);
}

body:is(.theme-saas, .theme-glass),
body:is(.theme-saas, .theme-glass).smart-skins-1 {
    font-family: var(--ts-font) !important;
    font-size: 13.5px;
    color: var(--ts-text-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01";
}

body:is(.theme-saas, .theme-glass) h1, body:is(.theme-saas, .theme-glass) h2, body:is(.theme-saas, .theme-glass) h3,
body:is(.theme-saas, .theme-glass) h4, body:is(.theme-saas, .theme-glass) h5, body:is(.theme-saas, .theme-glass) h6,
body:is(.theme-saas, .theme-glass) .h1, body:is(.theme-saas, .theme-glass) .h2, body:is(.theme-saas, .theme-glass) .h3,
body:is(.theme-saas, .theme-glass) .h4, body:is(.theme-saas, .theme-glass) .h5, body:is(.theme-saas, .theme-glass) .h6,
body:is(.theme-saas, .theme-glass) input, body:is(.theme-saas, .theme-glass) button, body:is(.theme-saas, .theme-glass) select,
body:is(.theme-saas, .theme-glass) textarea, body:is(.theme-saas, .theme-glass) .btn, body:is(.theme-saas, .theme-glass) .popover,
body:is(.theme-saas, .theme-glass) .tooltip, body:is(.theme-saas, .theme-glass) .smart-form,
body:is(.theme-saas, .theme-glass) .select2-container, body:is(.theme-saas, .theme-glass) .select2-drop,
body:is(.theme-saas, .theme-glass) .select2-container-multi .select2-choices .select2-search-field input {
    font-family: var(--ts-font) !important;
}

body:is(.theme-saas, .theme-glass) ::-webkit-input-placeholder { font-family: var(--ts-font) !important; color: var(--ts-subtle); }
body:is(.theme-saas, .theme-glass) ::-moz-placeholder { font-family: var(--ts-font) !important; color: var(--ts-subtle); opacity: 1; }
body:is(.theme-saas, .theme-glass) :-ms-input-placeholder { font-family: var(--ts-font) !important; color: var(--ts-subtle); }
body:is(.theme-saas, .theme-glass) ::placeholder { font-family: var(--ts-font) !important; color: var(--ts-subtle); }

body:is(.theme-saas, .theme-glass) h1, body:is(.theme-saas, .theme-glass) h2, body:is(.theme-saas, .theme-glass) h3,
body:is(.theme-saas, .theme-glass) h4, body:is(.theme-saas, .theme-glass) h5, body:is(.theme-saas, .theme-glass) h6 {
    color: var(--ts-text);
    letter-spacing: -0.011em;
}

body:is(.theme-saas, .theme-glass) h1 { font-weight: 650; letter-spacing: -0.022em; }
body:is(.theme-saas, .theme-glass) h2, body:is(.theme-saas, .theme-glass) h3 { font-weight: 600; letter-spacing: -0.017em; }
body:is(.theme-saas, .theme-glass) h4, body:is(.theme-saas, .theme-glass) h5, body:is(.theme-saas, .theme-glass) h6 { font-weight: 600; }

body:is(.theme-saas, .theme-glass) a {
    color: var(--ts-accent-text);
    transition: color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) a:hover,
body:is(.theme-saas, .theme-glass) a:focus {
    color: var(--ts-accent-hover);
    text-decoration: none;
}

body:is(.theme-saas, .theme-glass) hr {
    border-top-color: var(--ts-border);
}

body:is(.theme-saas, .theme-glass) .text-primary { color: var(--ts-accent-text) !important; }
body:is(.theme-saas, .theme-glass) .text-success { color: var(--ts-success-text) !important; }
body:is(.theme-saas, .theme-glass) .text-warning { color: var(--ts-warning-text) !important; }
body:is(.theme-saas, .theme-glass) .text-danger { color: var(--ts-danger-text) !important; }
body:is(.theme-saas, .theme-glass) .text-info { color: var(--ts-info-text) !important; }
body:is(.theme-saas, .theme-glass) .text-muted,
body:is(.theme-saas, .theme-glass) .font-muted { color: var(--ts-muted) !important; }

body:is(.theme-saas, .theme-glass) ::selection {
    background: var(--ts-accent-soft);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) div::-webkit-scrollbar,
body:is(.theme-saas, .theme-glass) ul::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body:is(.theme-saas, .theme-glass) div::-webkit-scrollbar-thumb,
body:is(.theme-saas, .theme-glass) ul::-webkit-scrollbar-thumb,
body:is(.theme-saas, .theme-glass) div:hover::-webkit-scrollbar-thumb {
    background-color: #d6d9df;
    border-radius: var(--ts-radius-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}

body:is(.theme-saas, .theme-glass) div::-webkit-scrollbar-thumb:hover,
body:is(.theme-saas, .theme-glass) ul::-webkit-scrollbar-thumb:hover {
    background-color: #b8bdc7;
}

body:is(.theme-saas, .theme-glass) #content {
    padding: 10px 20px 24px;
}

/* 3. Shell: header
   ========================================================================== */
body:is(.theme-saas, .theme-glass) #header {
    background: var(--ts-surface) !important;
    border-bottom: 1px solid var(--ts-border) !important;
    box-shadow: none;
}

body:is(.theme-saas, .theme-glass) #logo-group {
    padding-left: 14px;
}

body:is(.theme-saas, .theme-glass) #logo-group span#activity {
    background: var(--ts-accent);
    border-color: var(--ts-accent);
    color: #fff;
    filter: none;
}

body:is(.theme-saas, .theme-glass) .btn-header > :first-child > a {
    background: var(--ts-surface);
    background-image: none;
    border: 1px solid var(--ts-border) !important;
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-xs);
    color: var(--ts-muted) !important;
    cursor: pointer !important;
    font-size: 14px;
    font-weight: 500;
    height: 32px;
    min-width: 32px;
    line-height: 26px;
    margin-top: 8px;
    margin-right: 4px;
    transition: background-color var(--ts-speed) var(--ts-ease), color var(--ts-speed) var(--ts-ease), border-color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .btn-header > :first-child > a:hover {
    background: var(--ts-surface-3);
    border-color: var(--ts-border-strong) !important;
    color: var(--ts-text) !important;
}

body:is(.theme-saas, .theme-glass) .btn-header > :first-child > a:active {
    background: var(--ts-border);
    box-shadow: none;
}

body:is(.theme-saas, .theme-glass) #logout > :first-child > a:hover {
    background: var(--ts-danger-soft);
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: var(--ts-danger-text) !important;
}

@media (max-width: 979px) {
    body:is(.theme-saas, .theme-glass) #hide-menu > :first-child > a,
    body:is(.theme-saas, .theme-glass) #logout > :first-child > a {
        border-color: var(--ts-border) !important;
    }

    body:is(.theme-saas, .theme-glass) .btn-header.transparent a,
    body:is(.theme-saas, .theme-glass) .header-dropdown-list > li > .dropdown-toggle {
        color: var(--ts-muted) !important;
    }
}

/* 4. Shell: sidebar
   ========================================================================== */
body:is(.theme-saas, .theme-glass) aside,
body:is(.theme-saas, .theme-glass) #left-panel {
    background: var(--ts-ink);
}

body:is(.theme-saas, .theme-glass) #left-panel {
    border-right: 1px solid var(--ts-ink-border);
}

body:is(.theme-saas, .theme-glass) nav ul li a {
    color: var(--ts-ink-text);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.003em;
    transition: background-color var(--ts-speed) var(--ts-ease), color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass):not(.minified) nav > ul > li > a,
body:is(.theme-saas, .theme-glass):not(.minified) nav > ul ul li > a {
    margin: 1px 10px;
    border-radius: var(--ts-radius);
}

body:is(.theme-saas, .theme-glass):not(.minified) nav > ul > li > a {
    padding: 10px 12px;
}

body:is(.theme-saas, .theme-glass):not(.minified) nav > ul ul li > a {
    padding-top: 8px;
    padding-bottom: 8px;
    font-weight: 450;
}

body:is(.theme-saas, .theme-glass):not(.minified) nav ul ul li > a { padding-left: 40px; }
body:is(.theme-saas, .theme-glass):not(.minified) nav ul ul ul li a { padding-left: 54px; }
body:is(.theme-saas, .theme-glass):not(.minified) nav ul ul ul ul li a { padding-left: 68px; }
body:is(.theme-saas, .theme-glass):not(.minified) nav ul ul ul ul ul li a { padding-left: 82px; }
body:is(.theme-saas, .theme-glass):not(.minified) nav ul ul ul ul ul ul li a { padding-left: 96px; }

body:is(.theme-saas, .theme-glass) nav > ul > li > a > i {
    color: #6b7285;
    transition: color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass):not(.minified) nav > ul > li > a > i {
    margin-right: 10px;
}

body:is(.theme-saas, .theme-glass) nav ul li a b {
    color: #5b6172;
}

body:is(.theme-saas, .theme-glass):not(.menu-on-top) nav ul li a:hover,
body:is(.theme-saas, .theme-glass) nav ul li a:focus {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ts-ink-text-hover);
}

body:is(.theme-saas, .theme-glass) nav ul li a:hover > i,
body:is(.theme-saas, .theme-glass) nav ul li a:hover b {
    color: var(--ts-ink-text-hover);
}

body:is(.theme-saas, .theme-glass) nav ul li a:active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) nav ul li.open > a,
body:is(.theme-saas, .theme-glass) nav ul ul,
body:is(.theme-saas, .theme-glass) nav ul ul ul,
body:is(.theme-saas, .theme-glass).minified nav li li {
    background: transparent !important;
}

body:is(.theme-saas, .theme-glass) nav ul ul,
body:is(.theme-saas, .theme-glass) nav ul ul ul {
    color: var(--ts-ink-text) !important;
}

body:is(.theme-saas, .theme-glass) nav ul li.open > a {
    color: var(--ts-ink-text-hover) !important;
}

body:is(.theme-saas, .theme-glass) nav ul li.open > a > i {
    color: var(--ts-ink-text-hover);
}

body:is(.theme-saas, .theme-glass) nav ul li.active > a {
    background: var(--ts-accent-soft);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0.08));
    color: #fff !important;
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) nav ul li.active > a > i {
    color: #a5b4fc;
}

body:is(.theme-saas, .theme-glass) nav ul li.active.open > a {
    background: transparent;
    font-weight: 500;
}

body:is(.theme-saas, .theme-glass):not(.menu-on-top) nav ul li.active:not(.open) > a:before,
body:is(.theme-saas, .theme-glass):not(.menu-on-top) nav > ul > li.active:not(.open) > a:before {
    content: "" !important;
    background: var(--ts-accent);
    background-image: none;
    border: 0;
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.8);
    width: 3px;
    left: -10px;
    right: auto;
    top: 8px !important;
    height: calc(100% - 16px) !important;
}

body:is(.theme-saas, .theme-glass).minified nav ul li.active:not(.open) > a:before,
body:is(.theme-saas, .theme-glass).minified nav > ul > li.active:not(.open) > a:before {
    left: 0;
}

body:is(.theme-saas, .theme-glass) nav > ul ul li:before,
body:is(.theme-saas, .theme-glass) nav > ul > li > ul:before {
    border: none;
}

body:is(.theme-saas, .theme-glass) nav > ul > li > ul {
    padding-bottom: 4px;
}

/* Minified sidebar flyouts */
body:is(.theme-saas, .theme-glass).minified nav > ul > li {
    border-bottom-color: transparent;
    border-top-color: transparent;
}

body:is(.theme-saas, .theme-glass).minified nav > ul > li > a {
    border-radius: 0;
    margin: 0;
}

body:is(.theme-saas, .theme-glass).minified nav > ul > li > a > .menu-item-parent,
body:is(.theme-saas, .theme-glass).minified nav > ul > li > ul {
    background: var(--ts-ink-2) !important;
    border: 1px solid var(--ts-ink-border);
    border-radius: 0 var(--ts-radius) var(--ts-radius) 0;
    box-shadow: var(--ts-shadow-lg);
    color: var(--ts-ink-text-hover);
}

body:is(.theme-saas, .theme-glass).minified nav > ul > li > a > .menu-item-parent {
    font-weight: 600;
}

/* Collapse toggle */
body:is(.theme-saas, .theme-glass) aside .minifyme {
    background: var(--ts-ink-3);
    color: var(--ts-ink-text);
    border-radius: var(--ts-radius) 0 0 var(--ts-radius);
    transition: background-color var(--ts-speed) var(--ts-ease), color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) aside .minifyme:hover {
    background: var(--ts-accent);
    color: #fff;
}

/* User block */
body:is(.theme-saas, .theme-glass) .login-info {
    background: transparent;
    border-bottom: 1px solid var(--ts-ink-border) !important;
    box-shadow: none;
    margin-bottom: 6px;
}

body:is(.theme-saas, .theme-glass) .login-info > span,
body:is(.theme-saas, .theme-glass) .login-info a {
    border-bottom: 0 !important;
}

body:is(.theme-saas, .theme-glass) .login-info img,
body:is(.theme-saas, .theme-glass) .profile-image {
    border: 0;
    border-radius: var(--ts-radius-pill);
    box-shadow: 0 0 0 2px var(--ts-ink), 0 0 0 4px rgba(99, 102, 241, 0.55);
}

body:is(.theme-saas, .theme-glass) .login-info img.online {
    border-left: 0;
}

body:is(.theme-saas, .theme-glass) .login-info #lblCurrentUser {
    color: #fff;
    font-weight: 600;
    letter-spacing: -0.01em;
}

body:is(.theme-saas, .theme-glass) .login-info .font-xs {
    color: var(--ts-ink-text);
    font-size: 11.5px;
}

body:is(.theme-saas, .theme-glass) .login-info a:hover .font-xs {
    color: #a5b4fc;
}

/* 5. Shell: page chrome
   ========================================================================== */
body:is(.theme-saas, .theme-glass) #content > .row:first-child {
    background: var(--ts-surface);
    border-bottom: 1px solid var(--ts-border);
    box-shadow: var(--ts-shadow-xs);
    margin-top: -10px;
    margin-left: -20px;
    margin-right: -20px;
    padding: 14px 20px 12px;
    margin-bottom: 18px;
}

body:is(.theme-saas, .theme-glass) .page-title {
    color: var(--ts-text);
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.022em;
    margin: 6px 0 14px;
}

body:is(.theme-saas, .theme-glass) .page-title > span {
    color: var(--ts-muted);
    font-size: 14px;
    font-weight: 450;
    letter-spacing: 0;
}

body:is(.theme-saas, .theme-glass) .breadcrumb {
    background: transparent;
}

body:is(.theme-saas, .theme-glass) .breadcrumb > li,
body:is(.theme-saas, .theme-glass) .breadcrumb > li + li:before {
    color: var(--ts-muted);
}

body:is(.theme-saas, .theme-glass) .page-footer {
    background: var(--ts-surface);
    border-top: 1px solid var(--ts-border);
    color: var(--ts-muted);
}

body:is(.theme-saas, .theme-glass) .well {
    background: var(--ts-surface-2);
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-lg);
    box-shadow: none;
}

body:is(.theme-saas, .theme-glass) .fixed-footer {
    background-color: rgba(255, 255, 255, 0.92) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--ts-border);
    box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
}

/* 6. Widgets as cards
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .jarviswidget {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-lg);
    box-shadow: var(--ts-shadow);
    margin-bottom: 20px;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header,
body:is(.theme-saas, .theme-glass) .jarviswidget[class*="jarviswidget-color-"] > header {
    background: var(--ts-surface) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ts-border) !important;
    border-radius: var(--ts-radius-lg) var(--ts-radius-lg) 0 0;
    color: var(--ts-text) !important;
    height: 48px;
    padding: 0 8px 0 16px;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header > h2 {
    color: var(--ts-text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.011em;
    line-height: 48px;
    margin: 0;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header > .widget-icon {
    color: var(--ts-muted);
    line-height: 48px;
    height: 48px;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header .widget-toolbar {
    border-left: 0;
    height: 48px;
    line-height: 48px;
    padding: 0 4px;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header .widget-toolbar > .form-control,
body:is(.theme-saas, .theme-glass) .jarviswidget > header .widget-toolbar select {
    background-color: var(--ts-surface) !important;
    border: 1px solid var(--ts-border) !important;
    border-radius: var(--ts-radius) !important;
    color: var(--ts-text-2) !important;
    display: inline-block;
    height: 32px;
    padding: 4px 10px;
    vertical-align: middle;
    width: auto;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header .jarviswidget-ctrls {
    height: 48px;
    line-height: 48px;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header .jarviswidget-ctrls a,
body:is(.theme-saas, .theme-glass) .jarviswidget > header .jarviswidget-ctrls .button-icon {
    border: 0;
    border-radius: var(--ts-radius-sm);
    color: var(--ts-muted) !important;
    margin-top: 8px;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header .jarviswidget-ctrls a:hover {
    background: var(--ts-surface-3);
    color: var(--ts-text) !important;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header .nav-tabs > li > a {
    color: var(--ts-muted) !important;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > header .nav-tabs > li.active > a {
    color: var(--ts-text) !important;
    border-color: var(--ts-border) !important;
}

body:is(.theme-saas, .theme-glass) .header-tab {
    height: 48px;
    line-height: 46px;
}

body:is(.theme-saas, .theme-glass) .header-tab div {
    background: transparent;
    border-bottom: 2px solid transparent;
    color: var(--ts-muted);
    font-weight: 500;
    transition: color var(--ts-speed) var(--ts-ease), border-color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .header-tab div:hover {
    background: transparent;
    border-bottom-color: var(--ts-border-strong);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .header-tab .active,
body:is(.theme-saas, .theme-glass) .header-tab .active:hover {
    background: transparent;
    border-bottom-color: var(--ts-accent);
    color: var(--ts-text);
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .jarviswidget > div,
body:is(.theme-saas, .theme-glass) .jarviswidget[class*="jarviswidget-color-"] > div {
    background: transparent;
    border: 0 !important;
    border-radius: 0 0 var(--ts-radius-lg) var(--ts-radius-lg);
}

body:is(.theme-saas, .theme-glass) .jarviswidget > div:first-child {
    border-radius: var(--ts-radius-lg);
}

body:is(.theme-saas, .theme-glass) .jarviswidget > .widget-body.no-padding {
    margin: 0;
}

body:is(.theme-saas, .theme-glass) .jarviswidget .widget-body.no-padding .table-responsive {
    border: 0;
    margin-bottom: 0;
}

body:is(.theme-saas, .theme-glass) .widget-body-toolbar {
    background: var(--ts-surface-2);
    border-bottom: 1px solid var(--ts-border);
}

body:is(.theme-saas, .theme-glass) .widget-footer {
    background: var(--ts-surface-2);
    border-top: 1px solid var(--ts-border);
    border-radius: 0 0 var(--ts-radius-lg) var(--ts-radius-lg);
}

body:is(.theme-saas, .theme-glass) .jarviswidget-loader {
    color: var(--ts-accent);
}

/* KPI tiles */
body:is(.theme-saas, .theme-glass) .summary-group .jarviswidget,
body:is(.theme-saas, .theme-glass) #widget-grid .widget-body {
    position: relative;
}

body:is(.theme-saas, .theme-glass) .summary-group .jarviswidget {
    overflow: hidden;
}

body:is(.theme-saas, .theme-glass) .summary-group .jarviswidget::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ts-accent), #a855f7 55%, #ec4899);
    opacity: 0.9;
}

body:is(.theme-saas, .theme-glass) .summary-group h1,
body:is(.theme-saas, .theme-glass) .accumulated-sales-summary h1 {
    color: var(--ts-text);
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

body:is(.theme-saas, .theme-glass) .summary-group .font-muted:has(+ h1),
body:is(.theme-saas, .theme-glass) .accumulated-sales-summary h1 + .font-muted {
    color: var(--ts-muted) !important;
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

body:is(.theme-saas, .theme-glass) .summary-group .widget-body > i.fa,
body:is(.theme-saas, .theme-glass) .summary-group .widget-body > .row > i.fa {
    color: var(--ts-accent) !important;
    opacity: 0.08 !important;
}

/* 7. Buttons
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .btn {
    background-image: none;
    border-radius: var(--ts-radius);
    border-width: 1px;
    box-shadow: var(--ts-shadow-xs);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.003em;
    padding: 6px 14px;
    text-shadow: none;
    transition: background-color var(--ts-speed) var(--ts-ease), border-color var(--ts-speed) var(--ts-ease), color var(--ts-speed) var(--ts-ease), box-shadow var(--ts-speed) var(--ts-ease), transform var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .btn:active,
body:is(.theme-saas, .theme-glass) .btn.active {
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.1);
}

body:is(.theme-saas, .theme-glass) .btn:focus,
body:is(.theme-saas, .theme-glass) .btn.focus,
body:is(.theme-saas, .theme-glass) .btn:active:focus,
body:is(.theme-saas, .theme-glass) .btn.active:focus {
    box-shadow: var(--ts-ring);
    outline: none;
}

body:is(.theme-saas, .theme-glass) .btn-xs { border-radius: var(--ts-radius-sm); font-size: 11.5px; padding: 2px 8px; }
body:is(.theme-saas, .theme-glass) .btn-sm { border-radius: var(--ts-radius-sm); font-size: 12.5px; padding: 5px 11px; }
body:is(.theme-saas, .theme-glass) .btn-lg { border-radius: 10px; font-size: 15px; padding: 10px 20px; }

body:is(.theme-saas, .theme-glass) .btn-group-justified > .btn-group:not(:first-child) > .btn,
body:is(.theme-saas, .theme-glass) .btn-group-justified > .btn:not(:first-child) {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

body:is(.theme-saas, .theme-glass) .btn-group-justified > .btn-group:not(:last-child) > .btn,
body:is(.theme-saas, .theme-glass) .btn-group-justified > .btn:not(:last-child) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

body:is(.theme-saas, .theme-glass) .btn-group-justified > .btn-group:not(:first-child) > .btn {
    border-left-width: 0;
}

body:is(.theme-saas, .theme-glass) .btn-default {
    background-color: var(--ts-surface);
    border-color: var(--ts-border-strong);
    color: var(--ts-text-2);
}

body:is(.theme-saas, .theme-glass) .btn-default:hover,
body:is(.theme-saas, .theme-glass) .btn-default:focus {
    background-color: var(--ts-surface-3);
    border-color: #c4c8d0;
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .btn-default:active,
body:is(.theme-saas, .theme-glass) .btn-default.active,
body:is(.theme-saas, .theme-glass) .open > .dropdown-toggle.btn-default {
    background-color: var(--ts-border);
    border-color: #c4c8d0;
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .btn-primary {
    background-color: var(--ts-accent);
    border-color: var(--ts-accent-hover);
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-primary:hover,
body:is(.theme-saas, .theme-glass) .btn-primary:focus,
body:is(.theme-saas, .theme-glass) .btn-primary:active,
body:is(.theme-saas, .theme-glass) .btn-primary.active,
body:is(.theme-saas, .theme-glass) .open > .dropdown-toggle.btn-primary {
    background-color: var(--ts-accent-hover);
    border-color: #4338ca;
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-success {
    background-color: var(--ts-success);
    border-color: var(--ts-success-hover);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-success:hover,
body:is(.theme-saas, .theme-glass) .btn-success:focus,
body:is(.theme-saas, .theme-glass) .btn-success:active,
body:is(.theme-saas, .theme-glass) .btn-success.active {
    background-color: var(--ts-success-hover);
    border-color: var(--ts-success-text);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-danger {
    background-color: var(--ts-danger);
    border-color: var(--ts-danger-hover);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-danger:hover,
body:is(.theme-saas, .theme-glass) .btn-danger:focus,
body:is(.theme-saas, .theme-glass) .btn-danger:active,
body:is(.theme-saas, .theme-glass) .btn-danger.active {
    background-color: var(--ts-danger-hover);
    border-color: var(--ts-danger-text);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-warning {
    background-color: var(--ts-warning);
    border-color: var(--ts-warning-hover);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-warning:hover,
body:is(.theme-saas, .theme-glass) .btn-warning:focus,
body:is(.theme-saas, .theme-glass) .btn-warning:active,
body:is(.theme-saas, .theme-glass) .btn-warning.active {
    background-color: var(--ts-warning-hover);
    border-color: var(--ts-warning-text);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-info {
    background-color: var(--ts-info);
    border-color: var(--ts-info-hover);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-info:hover,
body:is(.theme-saas, .theme-glass) .btn-info:focus,
body:is(.theme-saas, .theme-glass) .btn-info:active,
body:is(.theme-saas, .theme-glass) .btn-info.active {
    background-color: var(--ts-info-hover);
    border-color: var(--ts-info-text);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .btn-link {
    box-shadow: none;
    color: var(--ts-accent-text);
}

body:is(.theme-saas, .theme-glass) .btn-link:hover,
body:is(.theme-saas, .theme-glass) .btn-link:focus {
    color: var(--ts-accent-hover);
    text-decoration: none;
}

body:is(.theme-saas, .theme-glass) .btn.disabled,
body:is(.theme-saas, .theme-glass) .btn[disabled],
body:is(.theme-saas, .theme-glass) fieldset[disabled] .btn {
    box-shadow: none;
    opacity: 0.5;
}

/* 8. Forms
   ========================================================================== */
body:is(.theme-saas, .theme-glass) label,
body:is(.theme-saas, .theme-glass) .control-label {
    color: var(--ts-text-2);
    font-weight: 500;
}

body:is(.theme-saas, .theme-glass) .form-control,
body:is(.theme-saas, .theme-glass) .smart-form .input input,
body:is(.theme-saas, .theme-glass) .smart-form .select select,
body:is(.theme-saas, .theme-glass) .smart-form .textarea textarea,
body:is(.theme-saas, .theme-glass) .smart-form .select2-container .select2-choice,
body:is(.theme-saas, .theme-glass) .bootstrap-tagsinput {
    background-color: var(--ts-surface);
    border: 1px solid var(--ts-border-strong);
    border-radius: var(--ts-radius) !important;
    box-shadow: var(--ts-shadow-xs) !important;
    color: var(--ts-text);
    font-size: 13px;
    transition: border-color var(--ts-speed) var(--ts-ease), box-shadow var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .form-control {
    height: 34px;
    padding: 6px 11px;
}

body:is(.theme-saas, .theme-glass) textarea.form-control {
    height: auto;
}

body:is(.theme-saas, .theme-glass) .form-control:hover,
body:is(.theme-saas, .theme-glass) .smart-form .input input:hover,
body:is(.theme-saas, .theme-glass) .smart-form .select select:hover,
body:is(.theme-saas, .theme-glass) .smart-form .textarea textarea:hover {
    border-color: #c0c5cf;
}

body:is(.theme-saas, .theme-glass) .form-control:focus,
body:is(.theme-saas, .theme-glass) .smart-form .input input:focus,
body:is(.theme-saas, .theme-glass) .smart-form .select select:focus,
body:is(.theme-saas, .theme-glass) .smart-form .textarea textarea:focus,
body:is(.theme-saas, .theme-glass) .bootstrap-tagsinput.focus {
    border-color: var(--ts-accent) !important;
    box-shadow: var(--ts-ring) !important;
    outline: none;
}

body:is(.theme-saas, .theme-glass) .form-control[disabled],
body:is(.theme-saas, .theme-glass) .form-control[readonly],
body:is(.theme-saas, .theme-glass) fieldset[disabled] .form-control,
body:is(.theme-saas, .theme-glass) .smart-form .state-disabled.input input {
    background-color: var(--ts-surface-3);
    border-color: var(--ts-border);
    color: var(--ts-muted);
}

body:is(.theme-saas, .theme-glass) .input-group .form-control:first-child,
body:is(.theme-saas, .theme-glass) .input-group-btn:first-child > .btn,
body:is(.theme-saas, .theme-glass) .input-group-addon:first-child {
    border-bottom-right-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

body:is(.theme-saas, .theme-glass) .input-group .form-control:last-child,
body:is(.theme-saas, .theme-glass) .input-group-btn:last-child > .btn,
body:is(.theme-saas, .theme-glass) .input-group-addon:last-child {
    border-bottom-left-radius: 0 !important;
    border-top-left-radius: 0 !important;
}

body:is(.theme-saas, .theme-glass) .input-group .form-control:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

body:is(.theme-saas, .theme-glass) .input-group-addon {
    background-color: var(--ts-surface-2);
    border-color: var(--ts-border-strong);
    border-radius: var(--ts-radius);
    color: var(--ts-muted);
}

body:is(.theme-saas, .theme-glass) .input-group-btn > .btn {
    box-shadow: none;
}

body:is(.theme-saas, .theme-glass) .has-error .form-control,
body:is(.theme-saas, .theme-glass) .smart-form .state-error input,
body:is(.theme-saas, .theme-glass) .smart-form .state-error select,
body:is(.theme-saas, .theme-glass) .smart-form .state-error textarea {
    background-color: var(--ts-surface);
    border-color: var(--ts-danger) !important;
}

body:is(.theme-saas, .theme-glass) .has-error .form-control:focus {
    box-shadow: 0 0 0 3px var(--ts-danger-soft) !important;
}

body:is(.theme-saas, .theme-glass) .has-error .help-block,
body:is(.theme-saas, .theme-glass) .has-error .control-label,
body:is(.theme-saas, .theme-glass) .has-error .form-control-feedback,
body:is(.theme-saas, .theme-glass) .smart-form .note-error {
    color: var(--ts-danger-text);
}

body:is(.theme-saas, .theme-glass) .has-success .form-control {
    border-color: var(--ts-border-strong);
}

body:is(.theme-saas, .theme-glass) .has-success .form-control-feedback,
body:is(.theme-saas, .theme-glass) .has-success .control-label {
    color: var(--ts-success-text);
}

body:is(.theme-saas, .theme-glass) .help-block,
body:is(.theme-saas, .theme-glass) .smart-form .note {
    color: var(--ts-muted);
    font-size: 12px;
}

body:is(.theme-saas, .theme-glass) .required {
    color: var(--ts-danger) !important;
}

/* SmartAdmin custom checkbox / radio / toggle */
body:is(.theme-saas, .theme-glass) .smart-form .checkbox i,
body:is(.theme-saas, .theme-glass) .smart-form .radio i {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border-strong);
    transition: border-color var(--ts-speed) var(--ts-ease), background-color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .smart-form .checkbox i {
    border-radius: 4px;
}

body:is(.theme-saas, .theme-glass) .smart-form .checkbox:hover i,
body:is(.theme-saas, .theme-glass) .smart-form .radio:hover i {
    border-color: var(--ts-accent);
}

body:is(.theme-saas, .theme-glass) .smart-form .checkbox input:checked + i,
body:is(.theme-saas, .theme-glass) .smart-form .radio input:checked + i {
    border-color: var(--ts-accent);
}

body:is(.theme-saas, .theme-glass) .smart-form .checkbox input + i:after,
body:is(.theme-saas, .theme-glass) .smart-form .radio input + i:after {
    color: var(--ts-accent);
}

body:is(.theme-saas, .theme-glass) .smart-form .radio input + i:after {
    background-color: var(--ts-accent);
}

body:is(.theme-saas, .theme-glass) .smart-form .toggle input:checked + i {
    border-color: var(--ts-accent);
}

body:is(.theme-saas, .theme-glass) .smart-form .toggle input:checked + i:before {
    background-color: var(--ts-accent);
}

body:is(.theme-saas, .theme-glass) input[type="checkbox"],
body:is(.theme-saas, .theme-glass) input[type="radio"] {
    accent-color: var(--ts-accent);
}

/* SmartAdmin on/off switch */
body:is(.theme-saas, .theme-glass) .onoffswitch {
    width: 54px;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-label {
    background: var(--ts-border);
    border: 0;
    border-radius: var(--ts-radius-pill);
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
    box-sizing: border-box;
    height: 24px;
    transition: background-color 0.2s var(--ts-ease), box-shadow 0.2s var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-label:hover {
    background: var(--ts-border-strong);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-inner {
    transition: margin-left 0.2s var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-inner:before,
body:is(.theme-saas, .theme-glass) .onoffswitch-inner:after {
    box-shadow: none;
    font-family: var(--ts-font);
    font-size: 9.5px;
    font-weight: 700;
    height: 24px;
    letter-spacing: 0.04em;
    line-height: 24px;
    text-shadow: none;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-inner:before {
    background: transparent;
    color: #fff;
    padding-left: 8px;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-inner:after {
    background: transparent;
    color: var(--ts-muted);
    padding-right: 7px;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-switch {
    background: #fff;
    background-image: none;
    border: 0;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2), 0 1px 1px rgba(16, 24, 40, 0.06);
    box-sizing: border-box;
    height: 20px;
    margin: 0;
    right: 32px;
    top: 2px;
    bottom: auto;
    transition: right 0.2s var(--ts-ease), box-shadow 0.2s var(--ts-ease);
    width: 20px;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-switch:hover,
body:is(.theme-saas, .theme-glass) .onoffswitch-switch:active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25), 0 0 0 4px rgba(16, 24, 40, 0.04);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox + .onoffswitch-label .onoffswitch-switch:before,
body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch:before {
    content: none;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked + .onoffswitch-label {
    background: var(--ts-accent);
    border-color: transparent;
    box-shadow: inset 0 1px 2px rgba(67, 56, 202, 0.35);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked + .onoffswitch-label:hover {
    background: var(--ts-accent-hover);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
    right: 2px;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:disabled + .onoffswitch-label,
body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked:disabled + .onoffswitch-label {
    background: var(--ts-surface-3);
    border-color: transparent !important;
    box-shadow: none;
    cursor: not-allowed;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked:disabled + .onoffswitch-label {
    background: rgba(99, 102, 241, 0.35);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked:disabled + .onoffswitch-label .onoffswitch-inner:before,
body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:disabled + .onoffswitch-label .onoffswitch-inner:after {
    background: transparent;
    color: var(--ts-subtle);
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked:disabled + .onoffswitch-label .onoffswitch-inner:before {
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:checked:disabled + .onoffswitch-label .onoffswitch-switch,
body:is(.theme-saas, .theme-glass) .onoffswitch-checkbox:disabled + .onoffswitch-label .onoffswitch-switch {
    background: #f9fafb;
    background-image: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12) !important;
}

body:is(.theme-saas, .theme-glass) .smart-form fieldset {
    background: transparent;
}

body:is(.theme-saas, .theme-glass) .smart-form header,
body:is(.theme-saas, .theme-glass) .smart-form footer {
    background: var(--ts-surface-2);
    border-color: var(--ts-border);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .smart-form .icon-append,
body:is(.theme-saas, .theme-glass) .smart-form .icon-prepend {
    border-color: var(--ts-border);
    color: var(--ts-subtle);
}

/* Select2 (3.x) */
body:is(.theme-saas, .theme-glass) .select2-container.form-control {
    background: transparent;
    border: 0;
    box-shadow: none !important;
    height: auto;
    padding: 0;
}

body:is(.theme-saas, .theme-glass) .select2-container .select2-choice,
body:is(.theme-saas, .theme-glass) .select2-container-multi .select2-choices {
    background: var(--ts-surface);
    background-image: none;
    border: 1px solid var(--ts-border-strong);
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-xs);
    color: var(--ts-text);
    min-height: 34px;
    transition: border-color var(--ts-speed) var(--ts-ease), box-shadow var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .select2-container .select2-choice {
    height: 34px;
    line-height: 32px;
    padding-left: 11px;
}

body:is(.theme-saas, .theme-glass) .select2-container .select2-choice .select2-arrow {
    background: transparent;
    background-image: none;
    border-left: 0;
}

body:is(.theme-saas, .theme-glass) .select2-container .select2-choice > .select2-chosen {
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .select2-container .select2-choice.select2-default > .select2-chosen,
body:is(.theme-saas, .theme-glass) .select2-default {
    color: var(--ts-subtle) !important;
}

body:is(.theme-saas, .theme-glass) .select2-container-active .select2-choice,
body:is(.theme-saas, .theme-glass) .select2-container-active .select2-choices,
body:is(.theme-saas, .theme-glass) .select2-dropdown-open .select2-choice,
body:is(.theme-saas, .theme-glass) .select2-dropdown-open.select2-container-multi .select2-choices {
    border-color: var(--ts-accent) !important;
    box-shadow: var(--ts-ring) !important;
    outline: none;
}

body:is(.theme-saas, .theme-glass) .select2-dropdown-open .select2-choice {
    background: var(--ts-surface);
    border-bottom-left-radius: var(--ts-radius);
    border-bottom-right-radius: var(--ts-radius);
}

body:is(.theme-saas, .theme-glass) .select2-drop,
body:is(.theme-saas, .theme-glass) .select2-drop.select2-drop-above {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border) !important;
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-lg);
    color: var(--ts-text);
    margin-top: 4px;
    overflow: hidden;
}

body:is(.theme-saas, .theme-glass) .select2-drop.select2-drop-above {
    margin-top: -4px;
}

body:is(.theme-saas, .theme-glass) .select2-search {
    padding: 8px 8px 4px;
}

body:is(.theme-saas, .theme-glass) .select2-search input,
body:is(.theme-saas, .theme-glass) .select2-search input.select2-active {
    background-color: var(--ts-surface-2);
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-sm);
    min-height: 32px;
}

body:is(.theme-saas, .theme-glass) .select2-search input:focus {
    border-color: var(--ts-accent);
    box-shadow: var(--ts-ring);
}

body:is(.theme-saas, .theme-glass) .select2-results {
    padding: 4px;
    margin: 0;
}

body:is(.theme-saas, .theme-glass) .select2-results li {
    border-radius: var(--ts-radius-sm);
}

body:is(.theme-saas, .theme-glass) .select2-results .select2-result-label {
    padding: 7px 10px;
}

body:is(.theme-saas, .theme-glass) .select2-results .select2-highlighted {
    background: var(--ts-accent-soft);
    color: var(--ts-accent-text);
}

body:is(.theme-saas, .theme-glass) .select2-results .select2-no-results,
body:is(.theme-saas, .theme-glass) .select2-results .select2-searching {
    background: transparent;
    color: var(--ts-muted);
    padding: 8px 10px;
}

body:is(.theme-saas, .theme-glass) .select2-container-multi .select2-choices .select2-search-choice {
    background: var(--ts-accent-soft);
    background-image: none;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--ts-radius-sm);
    box-shadow: none;
    color: var(--ts-accent-text);
    font-weight: 500;
}

body:is(.theme-saas, .theme-glass) .select2-container-multi .select2-choices .select2-search-choice-close {
    color: var(--ts-accent-text);
}

body:is(.theme-saas, .theme-glass) .select2-container.select2-container-disabled .select2-choice,
body:is(.theme-saas, .theme-glass) .select2-container-multi.select2-container-disabled .select2-choices {
    background-color: var(--ts-surface-3);
    border-color: var(--ts-border);
}

/* jQuery UI datepicker */
body:is(.theme-saas, .theme-glass) .ui-datepicker {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border) !important;
    border-radius: var(--ts-radius-lg) !important;
    box-shadow: var(--ts-shadow-lg) !important;
    padding: 8px;
    z-index: 1060 !important;
}

body:is(.theme-saas, .theme-glass) .ui-datepicker .ui-datepicker-header {
    background: transparent;
    border: 0;
    color: var(--ts-text);
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .ui-datepicker .ui-datepicker-title select {
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-sm);
}

body:is(.theme-saas, .theme-glass) .ui-datepicker th {
    color: var(--ts-subtle);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

body:is(.theme-saas, .theme-glass) .ui-datepicker td .ui-state-default,
body:is(.theme-saas, .theme-glass) .ui-datepicker td a {
    background: transparent;
    border: 0;
    border-radius: var(--ts-radius-sm);
    color: var(--ts-text-2);
    text-align: center;
}

body:is(.theme-saas, .theme-glass) .ui-datepicker td .ui-state-hover,
body:is(.theme-saas, .theme-glass) .ui-datepicker td a:hover {
    background: var(--ts-surface-3);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .ui-datepicker td .ui-state-highlight {
    background: var(--ts-accent-soft);
    color: var(--ts-accent-text);
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .ui-datepicker td .ui-state-active {
    background: var(--ts-accent);
    color: #fff;
}

/* daterangepicker */
body:is(.theme-saas, .theme-glass) .daterangepicker {
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-lg);
    box-shadow: var(--ts-shadow-lg);
    font-family: var(--ts-font);
}

body:is(.theme-saas, .theme-glass) .daterangepicker td.in-range {
    background: var(--ts-accent-soft);
    color: var(--ts-accent-text);
}

body:is(.theme-saas, .theme-glass) .daterangepicker td.active,
body:is(.theme-saas, .theme-glass) .daterangepicker td.active:hover,
body:is(.theme-saas, .theme-glass) .daterangepicker .ranges li.active,
body:is(.theme-saas, .theme-glass) .daterangepicker .ranges li:hover {
    background: var(--ts-accent);
    border-color: var(--ts-accent);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .daterangepicker .ranges li {
    background: var(--ts-surface-2);
    border: 1px solid var(--ts-border);
    border-radius: var(--ts-radius-sm);
    color: var(--ts-text-2);
}

/* Bootstrap tags input */
body:is(.theme-saas, .theme-glass) .bootstrap-tagsinput .tag {
    background: var(--ts-accent-soft);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: var(--ts-radius-sm) !important;
    color: var(--ts-accent-text);
    font-weight: 500;
}

/* 9. Tables
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .table {
    color: var(--ts-text-2);
    font-variant-numeric: tabular-nums;
}

body:is(.theme-saas, .theme-glass) .table thead tr {
    background-color: var(--ts-surface-2);
    background-image: none;
}

body:is(.theme-saas, .theme-glass) .table > thead > tr > th,
body:is(.theme-saas, .theme-glass) .table > thead > tr > td {
    background-color: var(--ts-surface-2);
    border-bottom: 1px solid var(--ts-border) !important;
    color: var(--ts-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body:is(.theme-saas, .theme-glass) .table > tbody > tr > td,
body:is(.theme-saas, .theme-glass) .table > tbody > tr > th,
body:is(.theme-saas, .theme-glass) .table > tfoot > tr > td,
body:is(.theme-saas, .theme-glass) .table > tfoot > tr > th,
body:is(.theme-saas, .theme-glass) .table > thead > tr > td,
body:is(.theme-saas, .theme-glass) .table > thead > tr > th {
    border-top-color: var(--ts-border);
    padding: 12px 14px !important;
    vertical-align: middle;
}

body:is(.theme-saas, .theme-glass) .table > tfoot > tr > td,
body:is(.theme-saas, .theme-glass) .table > tfoot > tr > th {
    background-color: var(--ts-surface-2);
    color: var(--ts-text);
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .table-bordered,
body:is(.theme-saas, .theme-glass) .table-bordered > thead > tr > th,
body:is(.theme-saas, .theme-glass) .table-bordered > thead > tr > td,
body:is(.theme-saas, .theme-glass) .table-bordered > tbody > tr > th,
body:is(.theme-saas, .theme-glass) .table-bordered > tbody > tr > td,
body:is(.theme-saas, .theme-glass) .table-bordered > tfoot > tr > th,
body:is(.theme-saas, .theme-glass) .table-bordered > tfoot > tr > td {
    border-color: var(--ts-border);
}

body:is(.theme-saas, .theme-glass) .table-striped > tbody > tr:nth-of-type(odd),
body:is(.theme-saas, .theme-glass) .table-striped > tbody > tr:nth-child(odd) > td,
body:is(.theme-saas, .theme-glass) .table-striped > tbody > tr:nth-child(odd) > th {
    background-color: #fbfbfd;
}

body:is(.theme-saas, .theme-glass) .table-hover > tbody > tr:hover,
body:is(.theme-saas, .theme-glass) .table-hover > tbody > tr:hover > td,
body:is(.theme-saas, .theme-glass) .table-hover > tbody > tr:hover > th {
    background-color: rgba(99, 102, 241, 0.045);
}

body:is(.theme-saas, .theme-glass) .table > tbody > tr.active > td,
body:is(.theme-saas, .theme-glass) .table > tbody > tr > td.active {
    background-color: var(--ts-accent-soft);
}

body:is(.theme-saas, .theme-glass) .table > tbody > tr.success > td { background-color: var(--ts-success-soft); }
body:is(.theme-saas, .theme-glass) .table > tbody > tr.warning > td { background-color: var(--ts-warning-soft); }
body:is(.theme-saas, .theme-glass) .table > tbody > tr.danger > td { background-color: var(--ts-danger-soft); }
body:is(.theme-saas, .theme-glass) .table > tbody > tr.info > td { background-color: var(--ts-info-soft); }

body:is(.theme-saas, .theme-glass) .table-responsive {
    border-color: var(--ts-border);
    border-radius: var(--ts-radius);
}

body:is(.theme-saas, .theme-glass) .widget-body.no-padding .table-responsive table tr:last-of-type td {
    border-bottom: 1px solid var(--ts-border) !important;
}

body:is(.theme-saas, .theme-glass) table .groupby {
    background-color: var(--ts-surface-3) !important;
    border-color: var(--ts-border-strong) !important;
}

body:is(.theme-saas, .theme-glass) table .groupbytotal {
    background-color: var(--ts-surface-2) !important;
}

/* Pagination */
body:is(.theme-saas, .theme-glass) .pagination > li > a,
body:is(.theme-saas, .theme-glass) .pagination > li > span {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border);
    color: var(--ts-text-2);
    margin-left: -1px;
    padding: 6px 12px;
    transition: background-color var(--ts-speed) var(--ts-ease), color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .pagination > li:first-child > a,
body:is(.theme-saas, .theme-glass) .pagination > li:first-child > span {
    border-bottom-left-radius: var(--ts-radius);
    border-top-left-radius: var(--ts-radius);
}

body:is(.theme-saas, .theme-glass) .pagination > li:last-child > a,
body:is(.theme-saas, .theme-glass) .pagination > li:last-child > span {
    border-bottom-right-radius: var(--ts-radius);
    border-top-right-radius: var(--ts-radius);
}

body:is(.theme-saas, .theme-glass) .pagination > li > a:hover,
body:is(.theme-saas, .theme-glass) .pagination > li > span:hover,
body:is(.theme-saas, .theme-glass) .pagination > li > a:focus {
    background: var(--ts-surface-3);
    border-color: var(--ts-border);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .pagination > .active > a,
body:is(.theme-saas, .theme-glass) .pagination > .active > span,
body:is(.theme-saas, .theme-glass) .pagination > .active > a:hover,
body:is(.theme-saas, .theme-glass) .pagination > .active > span:hover,
body:is(.theme-saas, .theme-glass) .pagination > .active > a:focus {
    background: var(--ts-accent);
    border-color: var(--ts-accent);
    color: #fff;
    z-index: 3;
}

body:is(.theme-saas, .theme-glass) .pagination > .disabled > a,
body:is(.theme-saas, .theme-glass) .pagination > .disabled > span {
    background: var(--ts-surface);
    color: var(--ts-subtle);
}

body:is(.theme-saas, .theme-glass) .pager li > a,
body:is(.theme-saas, .theme-glass) .pager li > span {
    border-color: var(--ts-border);
    border-radius: var(--ts-radius-pill);
    color: var(--ts-text-2);
}

/* List groups */
body:is(.theme-saas, .theme-glass) .list-group-item {
    border-color: var(--ts-border);
    color: var(--ts-text-2);
    transition: background-color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .list-group-item:hover {
    background: var(--ts-surface-2);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .list-group-item.active,
body:is(.theme-saas, .theme-glass) .list-group-item.active:hover,
body:is(.theme-saas, .theme-glass) .list-group-item.active:focus {
    background: var(--ts-accent-soft);
    border-color: var(--ts-border);
    color: var(--ts-accent-text);
}

/* 10. Modals
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .modal-backdrop.in {
    background: #0d0f14;
    opacity: 0.5;
}

body:is(.theme-saas, .theme-glass) .modal-content {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border);
    border-radius: 14px;
    box-shadow: var(--ts-shadow-lg);
    overflow: hidden;
}

body:is(.theme-saas, .theme-glass) .modal-header {
    border-bottom: 1px solid var(--ts-border);
    padding: 16px 20px;
}

body:is(.theme-saas, .theme-glass) .modal-title {
    color: var(--ts-text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.011em;
}

body:is(.theme-saas, .theme-glass) .modal-header .close {
    border-radius: var(--ts-radius-sm);
    color: var(--ts-muted);
    font-size: 16px;
    height: 28px;
    line-height: 28px;
    margin-top: -4px;
    opacity: 1;
    text-align: center;
    text-shadow: none;
    transition: background-color var(--ts-speed) var(--ts-ease);
    width: 28px;
}

body:is(.theme-saas, .theme-glass) .modal-header .close:hover {
    background: var(--ts-surface-3);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .modal-body {
    padding: 20px;
}

body:is(.theme-saas, .theme-glass) .modal-body.padding-0 {
    padding: 0;
}

body:is(.theme-saas, .theme-glass) .modal-footer {
    background: var(--ts-surface-2);
    border-top: 1px solid var(--ts-border);
    padding: 12px 20px;
}

body:is(.theme-saas, .theme-glass) .modal-body .list-group-item {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 12px 20px;
}

body:is(.theme-saas, .theme-glass) .modal-body h5.text-primary {
    color: var(--ts-muted) !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin: 16px 0 8px;
    text-transform: uppercase;
}

/* 11. Dropdowns, popovers, tooltips
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .dropdown-menu {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border);
    border-radius: 10px;
    box-shadow: var(--ts-shadow-lg);
    padding: 4px;
}

body:is(.theme-saas, .theme-glass) .dropdown-menu > li > a {
    border-radius: var(--ts-radius-sm);
    color: var(--ts-text-2);
    padding: 7px 12px;
}

body:is(.theme-saas, .theme-glass) .dropdown-menu > li > a:hover,
body:is(.theme-saas, .theme-glass) .dropdown-menu > li > a:focus {
    background: var(--ts-surface-3);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .dropdown-menu > .active > a,
body:is(.theme-saas, .theme-glass) .dropdown-menu > .active > a:hover,
body:is(.theme-saas, .theme-glass) .dropdown-menu > .active > a:focus {
    background: var(--ts-accent-soft);
    color: var(--ts-accent-text);
}

body:is(.theme-saas, .theme-glass) .dropdown-menu .divider {
    background: var(--ts-border);
    margin: 4px 0;
}

body:is(.theme-saas, .theme-glass) .dropdown-header {
    color: var(--ts-subtle);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body:is(.theme-saas, .theme-glass) .popover {
    border: 1px solid var(--ts-border);
    border-radius: 10px;
    box-shadow: var(--ts-shadow-lg);
}

body:is(.theme-saas, .theme-glass) .popover-title {
    background: var(--ts-surface-2);
    border-bottom: 1px solid var(--ts-border);
    border-radius: 10px 10px 0 0;
    color: var(--ts-text);
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .tooltip-inner {
    background: var(--ts-ink);
    border-radius: var(--ts-radius-sm);
    box-shadow: var(--ts-shadow-md);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 9px;
}

body:is(.theme-saas, .theme-glass) .tooltip.top .tooltip-arrow { border-top-color: var(--ts-ink); }
body:is(.theme-saas, .theme-glass) .tooltip.bottom .tooltip-arrow { border-bottom-color: var(--ts-ink); }
body:is(.theme-saas, .theme-glass) .tooltip.left .tooltip-arrow { border-left-color: var(--ts-ink); }
body:is(.theme-saas, .theme-glass) .tooltip.right .tooltip-arrow { border-right-color: var(--ts-ink); }

body:is(.theme-saas, .theme-glass) .label-text,
body:is(.theme-saas, .theme-glass) .label-text-over,
body:is(.theme-saas, .theme-glass) .info-text-left,
body:is(.theme-saas, .theme-glass) .info-text-right {
    background-color: var(--ts-ink) !important;
    border: 0 !important;
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-lg);
    color: #f3f4f6 !important;
    font-size: 12px;
    font-weight: 450;
    line-height: 1.5;
    max-width: 320px;
    padding: 8px 12px !important;
    white-space: normal;
}

body:is(.theme-saas, .theme-glass) .info-label .fa-info-circle {
    color: var(--ts-subtle);
}

/* 12. Tabs and pills
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .nav-tabs {
    border-bottom: 1px solid var(--ts-border);
}

body:is(.theme-saas, .theme-glass) .nav-tabs > li > a {
    background: transparent;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0;
    color: var(--ts-muted);
    font-weight: 500;
    margin-right: 4px;
    padding: 10px 14px;
    transition: color var(--ts-speed) var(--ts-ease), border-color var(--ts-speed) var(--ts-ease);
}

body:is(.theme-saas, .theme-glass) .nav-tabs > li > a:hover {
    background: transparent;
    border-bottom-color: var(--ts-border-strong) !important;
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .nav-tabs > li.active > a,
body:is(.theme-saas, .theme-glass) .nav-tabs > li.active > a:hover,
body:is(.theme-saas, .theme-glass) .nav-tabs > li.active > a:focus {
    background: transparent;
    border-bottom-color: var(--ts-accent) !important;
    box-shadow: none;
    color: var(--ts-text);
    font-weight: 600;
    margin-top: 0;
}

body:is(.theme-saas, .theme-glass) .nav-tabs.bordered,
body:is(.theme-saas, .theme-glass) .tab-content.bordered,
body:is(.theme-saas, .theme-glass) .nav-tabs.bordered + .tab-content {
    border-color: var(--ts-border);
}

body:is(.theme-saas, .theme-glass) .nav-pills > li > a {
    border-radius: var(--ts-radius);
    color: var(--ts-text-2);
    font-weight: 500;
}

body:is(.theme-saas, .theme-glass) .nav-pills > li > a:hover {
    background: var(--ts-surface-3);
}

body:is(.theme-saas, .theme-glass) .nav-pills > li.active > a,
body:is(.theme-saas, .theme-glass) .nav-pills > li.active > a:hover,
body:is(.theme-saas, .theme-glass) .nav-pills > li.active > a:focus {
    background: var(--ts-accent);
    color: #fff;
}

/* 13. Labels, badges, alerts, progress
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .label {
    border-radius: var(--ts-radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.25em 0.7em;
}

body:is(.theme-saas, .theme-glass) .label-default { background: var(--ts-surface-3); color: var(--ts-text-2); }
body:is(.theme-saas, .theme-glass) .label-primary { background: var(--ts-accent-soft); color: var(--ts-accent-text); }
body:is(.theme-saas, .theme-glass) .label-success { background: var(--ts-success-soft); color: var(--ts-success-text); }
body:is(.theme-saas, .theme-glass) .label-warning { background: var(--ts-warning-soft); color: var(--ts-warning-text); }
body:is(.theme-saas, .theme-glass) .label-danger { background: var(--ts-danger-soft); color: var(--ts-danger-text); }
body:is(.theme-saas, .theme-glass) .label-info { background: var(--ts-info-soft); color: var(--ts-info-text); }

body:is(.theme-saas, .theme-glass) .label-color {
    border-radius: var(--ts-radius-pill) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 0.25em 0.7em !important;
}

body:is(.theme-saas, .theme-glass) .label-color.label-default { color: var(--ts-text-2) !important; }
body:is(.theme-saas, .theme-glass) .label-color.label-primary { color: var(--ts-accent-text) !important; }
body:is(.theme-saas, .theme-glass) .label-color.label-success { color: var(--ts-success-text) !important; }
body:is(.theme-saas, .theme-glass) .label-color.label-warning { color: var(--ts-warning-text) !important; }
body:is(.theme-saas, .theme-glass) .label-color.label-danger { color: var(--ts-danger-text) !important; }
body:is(.theme-saas, .theme-glass) .label-color.label-info { color: var(--ts-info-text) !important; }

body:is(.theme-saas, .theme-glass) .label[class*="bg-color-"],
body:is(.theme-saas, .theme-glass) .label-color[class*="bg-color-"],
body:is(.theme-saas, .theme-glass) .badge[class*="bg-color-"] {
    color: #fff !important;
}

body:is(.theme-saas, .theme-glass) .badge {
    background: var(--ts-surface-3);
    border-radius: var(--ts-radius-pill);
    color: var(--ts-text-2);
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .badge.bg-color-red,
body:is(.theme-saas, .theme-glass) .badge-danger {
    background: var(--ts-danger) !important;
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .list-group-item.active > .badge,
body:is(.theme-saas, .theme-glass) .nav-pills > .active > a > .badge {
    background: #fff;
    color: var(--ts-accent-text);
}

body:is(.theme-saas, .theme-glass) .alert {
    border: 1px solid transparent;
    border-left-width: 1px;
    border-radius: 10px;
    box-shadow: none;
    padding: 12px 16px;
}

body:is(.theme-saas, .theme-glass) .alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
body:is(.theme-saas, .theme-glass) .alert-info { background: #f0f9ff; border-color: #bae6fd; color: #075985; }
body:is(.theme-saas, .theme-glass) .alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
body:is(.theme-saas, .theme-glass) .alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

body:is(.theme-saas, .theme-glass) .alert .close {
    opacity: 0.5;
    text-shadow: none;
}

body:is(.theme-saas, .theme-glass) .progress {
    background: var(--ts-surface-3);
    border-radius: var(--ts-radius-pill);
    box-shadow: none;
    overflow: hidden;
}

body:is(.theme-saas, .theme-glass) .progress-bar {
    background-color: var(--ts-accent);
    background-image: none;
    box-shadow: none;
}

body:is(.theme-saas, .theme-glass) .progress-bar-success { background-color: var(--ts-success); }
body:is(.theme-saas, .theme-glass) .progress-bar-warning { background-color: var(--ts-warning); }
body:is(.theme-saas, .theme-glass) .progress-bar-danger { background-color: var(--ts-danger); }
body:is(.theme-saas, .theme-glass) .progress-bar-info { background-color: var(--ts-info); }

/* 14. SmartAdmin notifications and message boxes
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .SmallBox {
    border: 0;
    border-radius: var(--ts-radius-lg);
    box-shadow: var(--ts-shadow-lg);
}

body:is(.theme-saas, .theme-glass) .SmallBox .textoFull,
body:is(.theme-saas, .theme-glass) .SmallBox .textoFoto {
    font-weight: 450;
}

body:is(.theme-saas, .theme-glass) .SmallBox span {
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .bigBox {
    border-left: 0;
    border-radius: var(--ts-radius-lg);
    box-shadow: var(--ts-shadow-lg);
}

body:is(.theme-saas, .theme-glass) .divMessageBox {
    background: rgba(13, 15, 20, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

body:is(.theme-saas, .theme-glass) .MessageBoxContainer {
    background: var(--ts-surface) !important;
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    box-shadow: var(--ts-shadow-lg);
    color: var(--ts-text-2);
    margin: 0 auto;
    max-width: 480px;
    padding: 24px;
    top: 28%;
    width: calc(100% - 32px);
}

body:is(.theme-saas, .theme-glass) .MessageBoxMiddle {
    left: 0;
    width: 100%;
}

body:is(.theme-saas, .theme-glass) .MessageBoxMiddle .MsgTitle {
    color: var(--ts-text);
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

body:is(.theme-saas, .theme-glass) .MessageBoxMiddle .pText {
    color: var(--ts-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

body:is(.theme-saas, .theme-glass) .MessageBoxMiddle .MsgTitle .fa {
    color: var(--ts-accent);
}

body:is(.theme-saas, .theme-glass) .MessageBoxButtonSection {
    margin-top: 12px;
}

body:is(.theme-saas, .theme-glass) .MessageBoxButtonSection button {
    font-size: 13px;
    font-weight: 500;
    margin-right: 0;
    margin-left: 8px;
}

body:is(.theme-saas, .theme-glass) .MessageBoxButtonSection button:first-child {
    background: var(--ts-accent);
    border-color: var(--ts-accent-hover);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .MessageBoxButtonSection button:first-child:hover {
    background: var(--ts-accent-hover);
}

/* 15. Wizard steps
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .bootstrapWizard li:before {
    border-top: 2px solid var(--ts-border);
    top: 13px;
}

body:is(.theme-saas, .theme-glass) .bootstrapWizard li .step {
    background: var(--ts-surface);
    border: 2px solid var(--ts-border-strong);
    box-shadow: 0 0 0 4px var(--ts-bg);
    color: var(--ts-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
}

body:is(.theme-saas, .theme-glass) .bootstrapWizard li.complete:before {
    border-top-color: var(--ts-success);
}

body:is(.theme-saas, .theme-glass) .bootstrapWizard li.complete .step {
    background: var(--ts-success);
    border-color: var(--ts-success);
    color: #fff;
}

body:is(.theme-saas, .theme-glass) .bootstrapWizard li.active .step,
body:is(.theme-saas, .theme-glass) .bootstrapWizard li.active.complete .step {
    background: var(--ts-accent);
    border: 2px solid var(--ts-accent);
    box-shadow: 0 0 0 4px var(--ts-accent-soft);
    color: #fff;
    font-size: 13px;
    padding: 6px 12px;
}

body:is(.theme-saas, .theme-glass) .bootstrapWizard li .title {
    color: var(--ts-subtle);
    font-size: 12.5px;
    font-weight: 500;
}

body:is(.theme-saas, .theme-glass) .bootstrapWizard li.active .title {
    color: var(--ts-text);
    font-weight: 600;
}

body:is(.theme-saas, .theme-glass) .bootstrapWizard li.complete .title {
    color: var(--ts-success-text);
}

body:is(.theme-saas, .theme-glass) #sales-stage-wizard li,
body:is(.theme-saas, .theme-glass) .steps li {
    color: var(--ts-muted);
}

body:is(.theme-saas, .theme-glass) .steps li.active,
body:is(.theme-saas, .theme-glass) #sales-stage-wizard li.active {
    color: var(--ts-accent-text);
    font-weight: 600;
}

/* 16. Third-party chrome (light touch)
   ========================================================================== */
body:is(.theme-saas, .theme-glass) .note-editor.note-frame,
body:is(.theme-saas, .theme-glass) .note-editor {
    border: 1px solid var(--ts-border-strong);
    border-radius: var(--ts-radius);
    overflow: hidden;
}

body:is(.theme-saas, .theme-glass) .note-editor .note-toolbar,
body:is(.theme-saas, .theme-glass) .note-editor .panel-heading {
    background: var(--ts-surface-2);
    border-bottom: 1px solid var(--ts-border);
}

body:is(.theme-saas, .theme-glass) .fc-toolbar .fc-button,
body:is(.theme-saas, .theme-glass) .fc-header .fc-button {
    background: var(--ts-surface);
    background-image: none;
    border: 1px solid var(--ts-border-strong);
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-xs);
    color: var(--ts-text-2);
    text-shadow: none;
}

body:is(.theme-saas, .theme-glass) .fc-state-active,
body:is(.theme-saas, .theme-glass) .fc-state-down {
    background: var(--ts-accent) !important;
    border-color: var(--ts-accent) !important;
    color: #fff !important;
}

body:is(.theme-saas, .theme-glass) .fc-border-separate thead tr,
body:is(.theme-saas, .theme-glass) .fc-grid th {
    background: var(--ts-surface-2);
    background-image: none;
    color: var(--ts-muted);
}

body:is(.theme-saas, .theme-glass) .fc-state-highlight {
    background: var(--ts-accent-soft);
}

body:is(.theme-saas, .theme-glass) .panel {
    border-color: var(--ts-border);
    border-radius: var(--ts-radius-lg);
    box-shadow: var(--ts-shadow-xs);
}

body:is(.theme-saas, .theme-glass) .panel-default > .panel-heading {
    background: var(--ts-surface-2);
    border-color: var(--ts-border);
    color: var(--ts-text);
}

body:is(.theme-saas, .theme-glass) .card {
    border-radius: var(--ts-radius-lg);
}

/* 17. Auth pages (login, login-app, forgot / reset password)
   ========================================================================== */
body.theme-saas-auth {
    background: var(--ts-surface);
    color: var(--ts-text-2);
}

html.login-background > body.theme-saas-auth {
    background: transparent;
}

body.theme-saas-auth > .row {
    margin-left: 0;
    margin-right: 0;
}

body.theme-saas-auth div.login-background {
    background-color: var(--ts-ink);
    background-position: center;
    background-size: cover;
    overflow: hidden;
    position: relative;
}

body.theme-saas-auth div.login-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 10% 110%, rgba(99, 102, 241, 0.45), transparent 60%),
        radial-gradient(800px 500px at 90% -10%, rgba(168, 85, 247, 0.30), transparent 60%),
        linear-gradient(160deg, rgba(13, 15, 20, 0.15) 0%, rgba(13, 15, 20, 0.55) 100%);
    pointer-events: none;
}

body.theme-saas-auth div.login-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent);
    pointer-events: none;
}

body.theme-saas-auth #login-background-color {
    box-shadow: -24px 0 64px rgba(13, 15, 20, 0.10);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    overflow-y: auto;
    padding: 48px 40px !important;
    position: relative;
    z-index: 1;
}

body.theme-saas-auth #login-background-color > .form-horizontal,
body.theme-saas-auth #login-background-color > #login-form {
    margin-left: auto;
    margin-right: auto;
    max-width: 380px;
    padding: 0 !important;
    width: 100%;
}

body.theme-saas-auth #login-background-color .form-group {
    margin-left: 0;
    margin-right: 0;
}

body.theme-saas-auth #login-background-color .margin-bottom {
    margin-bottom: 18px !important;
}

body.theme-saas-auth .app-logo {
    display: block;
    height: auto;
    max-width: 100%;
}

body.theme-saas-auth #app-title,
body.theme-saas-auth #forgot-password-title {
    color: var(--ts-text);
    font-size: 28px;
    font-weight: 700 !important;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 8px 0 6px;
}

body.theme-saas-auth #app-title .app-title {
    background: linear-gradient(90deg, var(--ts-accent), #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.theme-saas-auth #sign-in-title,
body.theme-saas-auth #reset-password-title {
    color: var(--ts-muted);
    font-size: 14px;
    margin: 0;
}

body.theme-saas-auth #login-form .control-label {
    color: var(--ts-text-2);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    padding-top: 0;
    text-align: left;
}

body.theme-saas-auth #login-form .form-control {
    border-radius: 10px !important;
    font-size: 14px;
    height: 42px;
    padding: 9px 13px;
}

body.theme-saas-auth #login-form .password-toggle {
    color: var(--ts-subtle);
    height: 42px;
    line-height: 42px;
    right: 6px;
}

body.theme-saas-auth #login-form .password-toggle:hover,
body.theme-saas-auth #login-form .password-toggle:focus {
    color: var(--ts-text);
}

body.theme-saas-auth #login-form .has-success .form-control {
    border-color: var(--ts-border-strong);
}

body.theme-saas-auth #login-form .btn-primary,
body.theme-saas-auth #login-form .btn-block {
    background: linear-gradient(180deg, #6f72f3 0%, var(--ts-accent-hover) 100%);
    border: 1px solid #4338ca;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(67, 56, 202, 0.4), 0 8px 20px -6px rgba(99, 102, 241, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    font-size: 14px;
    font-weight: 600;
    height: 44px;
    letter-spacing: -0.005em;
}

body.theme-saas-auth #login-form .btn-primary:hover,
body.theme-saas-auth #login-form .btn-block:hover {
    background: linear-gradient(180deg, var(--ts-accent) 0%, #4338ca 100%);
    box-shadow: 0 1px 2px rgba(67, 56, 202, 0.4), 0 12px 24px -8px rgba(99, 102, 241, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

body.theme-saas-auth #login-form .btn-primary:active,
body.theme-saas-auth #login-form .btn-block:active {
    transform: translateY(0);
}

body.theme-saas-auth #login-form a[href="forgotpassword.html"] {
    font-size: 13px;
    font-weight: 500;
}

body.theme-saas-auth #login-lockout-overlay {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* reset password: legacy centered SmartAdmin card */
body.theme-saas-auth .login-container {
    background: var(--ts-surface);
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    box-shadow: var(--ts-shadow-lg);
    overflow: hidden;
}

body.theme-saas-auth .smart-form.client-form header {
    background: var(--ts-surface);
    border-bottom: 1px solid var(--ts-border);
    padding: 20px;
}

body.theme-saas-auth .smart-form.client-form footer {
    background: var(--ts-surface-2);
}

body.theme-saas-auth .smart-form.client-form footer .btn {
    border-radius: 10px;
    height: 38px;
    margin-top: 6px;
    padding: 0 18px;
}

body.theme-saas-auth .popout {
    border: 1px solid var(--ts-border);
    border-radius: 16px;
    box-shadow: var(--ts-shadow-lg);
    padding: 28px;
}

body.theme-saas-auth .popout_bg {
    background: rgba(13, 15, 20, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

@media (max-width: 767px) {
    body.theme-saas-auth #login-background-color {
        box-shadow: none;
        padding: 32px 24px !important;
    }

    body.theme-saas-auth #app-title,
    body.theme-saas-auth #forgot-password-title {
        font-size: 24px;
    }
}
