/* Uai CRM Workspace: AdminLTE-compatible operational shell. */
body.theme-uai_fluent {
    --uai-f-accent: var(--uai-accent-color, #2563eb);
    --uai-f-accent-contrast: var(--uai-accent-contrast, #ffffff);
    --uai-f-accent-soft: color-mix(in srgb, var(--uai-f-accent) 12%, #ffffff);
    --uai-f-accent-line: color-mix(in srgb, var(--uai-f-accent) 28%, #d8e1ee);
    --uai-f-bg: #f3f6fb;
    --uai-f-bg-2: #edf2f8;
    --uai-f-surface: rgba(255, 255, 255, 0.88);
    --uai-f-panel: #ffffff;
    --uai-f-panel-soft: #f8fafc;
    --uai-f-line: #d9e2ec;
    --uai-f-soft-line: #edf2f7;
    --uai-f-ink: #111827;
    --uai-f-text: #273142;
    --uai-f-muted: #64748b;
    --uai-f-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    --uai-f-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
    --uai-f-topbar-h: 64px;
    --uai-f-commandbar-h: 56px;
    margin: 0;
    background: linear-gradient(180deg, #fbfcff 0%, var(--uai-f-bg) 48%, var(--uai-f-bg-2) 100%);
    color: var(--uai-f-text);
    font-family: "Segoe UI Variable", "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

body.theme-uai_fluent:not(.uaicrm-login-page) .wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(var(--uai-f-topbar-h) + var(--uai-f-commandbar-h));
    background: transparent;
}

body.theme-uai_fluent .main-header.navbar {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0 !important;
    z-index: 1040;
    display: flex;
    align-items: center;
    min-height: var(--uai-f-topbar-h);
    height: var(--uai-f-topbar-h);
    margin-left: 0 !important;
    padding: 0 18px;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(248, 250, 252, 0.9) !important;
    color: var(--uai-f-text) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    -webkit-backdrop-filter: saturate(135%) blur(20px);
    backdrop-filter: saturate(135%) blur(20px);
}

body.theme-uai_fluent .navbar-nav {
    align-items: center;
    min-width: 0;
}

body.theme-uai_fluent .uaicrm-navbar-primary {
    flex: 1 1 auto;
    gap: 6px;
    overflow: hidden;
}

body.theme-uai_fluent .main-header .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    margin: 0 1px;
    padding: 0 12px;
    border-radius: 8px;
    color: #334155 !important;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

body.theme-uai_fluent .main-header .nav-link:hover,
body.theme-uai_fluent .main-header .nav-link:focus,
body.theme-uai_fluent .main-header .nav-link.active {
    background: rgba(15, 23, 42, 0.07) !important;
    color: var(--uai-f-ink) !important;
    text-decoration: none;
}

body.theme-uai_fluent .uaicrm-topbar-brand-item {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: 6px;
}

body.theme-uai_fluent .uaicrm-topbar-brand {
    min-width: 0;
    max-width: min(320px, 34vw);
    justify-content: flex-start !important;
    padding: 0 10px 0 0 !important;
    background: transparent !important;
}

body.theme-uai_fluent .uaicrm-topbar-logo {
    display: block;
    width: auto;
    max-width: 112px;
    height: 34px;
    object-fit: contain;
}

body.theme-uai_fluent .uaicrm-topbar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--uai-f-accent);
    color: var(--uai-f-accent-contrast);
    font-weight: 900;
}

body.theme-uai_fluent .uaicrm-topbar-brand-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

body.theme-uai_fluent .uaicrm-topbar-brand-name,
body.theme-uai_fluent .uaicrm-topbar-panel-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-uai_fluent .uaicrm-topbar-brand-name {
    color: var(--uai-f-ink);
    font-size: 0.92rem;
    font-weight: 850;
}

body.theme-uai_fluent .uaicrm-topbar-panel-label {
    color: var(--uai-f-muted);
    font-size: 0.74rem;
    font-weight: 700;
}

body.theme-uai_fluent .uaicrm-nav-toggle {
    width: 40px;
    padding: 0 !important;
}

body.theme-uai_fluent .navbar-nav.ml-auto {
    flex: 0 0 auto;
    gap: 4px;
    margin-left: 12px !important;
}

body.theme-uai_fluent .navbar-nav.ml-auto .nav-link {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.theme-uai_fluent .navbar-nav.ml-auto .nav-item:first-child .nav-link {
    background: rgba(255, 255, 255, 0.56) !important;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

body.theme-uai_fluent .main-sidebar {
    position: fixed !important;
    top: var(--uai-f-topbar-h) !important;
    right: 0;
    bottom: auto !important;
    left: 0 !important;
    z-index: 1039;
    width: 100% !important;
    height: var(--uai-f-commandbar-h) !important;
    min-height: 0 !important;
    margin-left: 0 !important;
    overflow: visible !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05) !important;
    transform: none !important;
    -webkit-backdrop-filter: saturate(135%) blur(22px);
    backdrop-filter: saturate(135%) blur(22px);
}

body.theme-uai_fluent.sidebar-collapse .main-sidebar,
body.theme-uai_fluent.sidebar-open .main-sidebar {
    width: 100% !important;
    margin-left: 0 !important;
    transform: none !important;
}

body.theme-uai_fluent .main-sidebar .brand-link {
    display: none !important;
}

body.theme-uai_fluent .main-sidebar .brand-link + .sidebar,
body.theme-uai_fluent .main-sidebar .uaicrm-brand-link--logo-only + .sidebar,
body.theme-uai_fluent.sidebar-collapse .main-sidebar .brand-link + .sidebar,
body.theme-uai_fluent.sidebar-collapse .main-sidebar .uaicrm-brand-link--logo-only + .sidebar {
    height: var(--uai-f-commandbar-h) !important;
    padding: 7px 18px 8px;
    overflow-x: auto !important;
    overflow-y: visible !important;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

body.theme-uai_fluent .main-sidebar .sidebar::-webkit-scrollbar {
    height: 8px;
}

body.theme-uai_fluent .main-sidebar .sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.24);
    border-radius: 999px;
}

body.theme-uai_fluent .main-sidebar nav.mt-2 {
    height: 100%;
    margin: 0 !important;
}

body.theme-uai_fluent .nav-sidebar {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center;
    gap: 6px;
    min-width: max-content;
    height: 100%;
}

body.theme-uai_fluent .nav-sidebar > .nav-header {
    display: none !important;
}

body.theme-uai_fluent .nav-sidebar > .nav-item {
    position: relative;
    flex: 0 0 auto;
}

body.theme-uai_fluent .nav-sidebar .nav-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    height: 40px;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid transparent;
    border-radius: 8px !important;
    color: #334155 !important;
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
}

body.theme-uai_fluent .nav-sidebar .nav-icon {
    width: 16px !important;
    min-width: 16px;
    margin: 0 !important;
    color: #64748b !important;
    font-size: 0.9rem;
    text-align: center;
}

body.theme-uai_fluent .nav-sidebar .nav-link p {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0 !important;
    line-height: 1;
    white-space: nowrap;
}

body.theme-uai_fluent .nav-sidebar .nav-link:hover,
body.theme-uai_fluent .nav-sidebar .nav-link:focus,
body.theme-uai_fluent .nav-sidebar .nav-link.active,
body.theme-uai_fluent .nav-sidebar > .nav-item.uaicrm-topnav-open > .nav-link {
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.88) !important;
    color: var(--uai-f-ink) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

body.theme-uai_fluent .nav-sidebar .nav-link.active {
    border-color: var(--uai-f-accent-line);
    background: var(--uai-f-accent-soft) !important;
    color: color-mix(in srgb, var(--uai-f-accent) 72%, #0f172a) !important;
}

body.theme-uai_fluent .nav-sidebar .nav-link.active .nav-icon {
    color: var(--uai-f-accent) !important;
}

body.theme-uai_fluent .nav-sidebar .right {
    position: static !important;
    margin-left: 2px;
    transform: rotate(-90deg);
    transition: transform 0.16s ease;
}

body.theme-uai_fluent .nav-sidebar > .nav-item:hover > .nav-link .right,
body.theme-uai_fluent .nav-sidebar > .nav-item:focus-within > .nav-link .right,
body.theme-uai_fluent .nav-sidebar > .nav-item.uaicrm-topnav-open > .nav-link .right {
    transform: rotate(90deg);
}

body.theme-uai_fluent .nav-sidebar .nav-treeview {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 1100;
    display: none !important;
    width: 286px;
    max-height: calc(100vh - 148px);
    min-width: 238px;
    padding: 8px;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

body.theme-uai_fluent .nav-sidebar > .nav-item:nth-last-child(-n+4) > .nav-treeview {
    right: 0;
    left: auto;
}

body.theme-uai_fluent .nav-sidebar > .nav-item:hover > .nav-treeview,
body.theme-uai_fluent .nav-sidebar > .nav-item:focus-within > .nav-treeview,
body.theme-uai_fluent .nav-sidebar > .nav-item.uaicrm-topnav-open > .nav-treeview {
    display: grid !important;
    gap: 4px;
}

body.theme-uai_fluent .nav-treeview .nav-item {
    width: 100%;
}

body.theme-uai_fluent .nav-treeview .nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 36px;
    height: auto;
    padding: 8px 10px !important;
    box-shadow: none !important;
}

body.theme-uai_fluent .nav-treeview .nav-icon {
    width: 14px !important;
    min-width: 14px;
    font-size: 0.58rem;
}

body.theme-uai_fluent .content-wrapper,
body.theme-uai_fluent.sidebar-collapse .content-wrapper,
body.theme-uai_fluent .main-footer,
body.theme-uai_fluent.sidebar-collapse .main-footer {
    margin-left: 0 !important;
}

body.theme-uai_fluent .content-wrapper {
    min-height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-commandbar-h)) !important;
    background: transparent !important;
}

body.theme-uai_fluent .content-header,
body.theme-uai_fluent .content {
    padding-right: 20px;
    padding-left: 20px;
}

body.theme-uai_fluent .content-header {
    padding-top: 18px;
    padding-bottom: 10px;
}

body.theme-uai_fluent .content {
    padding-top: 0;
    padding-bottom: 28px;
}

body.theme-uai_fluent .content-header > .container-fluid,
body.theme-uai_fluent .content > .container-fluid {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

body.theme-uai_fluent .content-header h1 {
    margin: 0;
    color: var(--uai-f-ink);
    font-size: 1.42rem;
    font-weight: 850;
    line-height: 1.22;
}

body.theme-uai_fluent .content-header p,
body.theme-uai_fluent .text-muted {
    color: var(--uai-f-muted) !important;
}

body.theme-uai_fluent .main-footer {
    display: none !important;
}

body.theme-uai_fluent .uaicrm-support-banner {
    margin: 0 20px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 8px;
    background: #111827;
    box-shadow: var(--uai-f-shadow-soft);
}

body.theme-uai_fluent .card,
body.theme-uai_fluent .modal-content,
body.theme-uai_fluent .dropdown-menu {
    border: 1px solid var(--uai-f-line);
    border-radius: 8px;
    background: var(--uai-f-panel);
    color: var(--uai-f-text);
    box-shadow: var(--uai-f-shadow-soft);
}

body.theme-uai_fluent .card {
    overflow: hidden;
}

body.theme-uai_fluent .card-header,
body.theme-uai_fluent .card-footer,
body.theme-uai_fluent .modal-header,
body.theme-uai_fluent .modal-footer {
    border-color: var(--uai-f-soft-line);
    background: rgba(248, 250, 252, 0.86);
}

body.theme-uai_fluent .card-header {
    padding: 12px 14px;
}

body.theme-uai_fluent .card-title,
body.theme-uai_fluent h2,
body.theme-uai_fluent h3,
body.theme-uai_fluent h4 {
    color: var(--uai-f-ink);
    font-weight: 820;
    letter-spacing: 0;
}

body.theme-uai_fluent .btn {
    min-height: 38px;
    border-radius: 8px;
    font-weight: 760;
    letter-spacing: 0;
    box-shadow: none !important;
}

body.theme-uai_fluent .btn-sm {
    min-height: 32px;
}

body.theme-uai_fluent .btn-xs {
    min-height: 24px;
}

body.theme-uai_fluent .btn-primary,
body.theme-uai_fluent .badge-primary,
body.theme-uai_fluent .bg-primary {
    border-color: var(--uai-f-accent) !important;
    background: var(--uai-f-accent) !important;
    color: var(--uai-f-accent-contrast) !important;
}

body.theme-uai_fluent .btn-primary:hover,
body.theme-uai_fluent .btn-primary:focus {
    border-color: color-mix(in srgb, var(--uai-f-accent) 84%, #0f172a) !important;
    background: color-mix(in srgb, var(--uai-f-accent) 84%, #0f172a) !important;
}

body.theme-uai_fluent .btn-outline-primary {
    border-color: var(--uai-f-accent-line);
    color: color-mix(in srgb, var(--uai-f-accent) 82%, #0f172a);
}

body.theme-uai_fluent .btn-outline-primary:hover,
body.theme-uai_fluent .btn-outline-primary:focus {
    border-color: var(--uai-f-accent);
    background: var(--uai-f-accent);
    color: var(--uai-f-accent-contrast);
}

body.theme-uai_fluent .btn-outline-secondary,
body.theme-uai_fluent .btn-secondary {
    border-color: #cbd5e1;
}

body.theme-uai_fluent .form-control,
body.theme-uai_fluent .custom-select,
body.theme-uai_fluent select.form-control {
    min-height: 38px;
    border-color: #cbd5e1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--uai-f-text);
}

body.theme-uai_fluent .form-control:focus,
body.theme-uai_fluent .custom-select:focus,
body.theme-uai_fluent select.form-control:focus {
    border-color: var(--uai-f-accent);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--uai-f-accent) 20%, transparent);
}

body.theme-uai_fluent .badge {
    border-radius: 999px;
    padding: 0.36em 0.64em;
    font-weight: 820;
}

body.theme-uai_fluent .table-responsive {
    border-radius: 8px;
}

body.theme-uai_fluent .table {
    color: var(--uai-f-text);
}

body.theme-uai_fluent .table thead th {
    border-top: 0;
    border-bottom: 1px solid var(--uai-f-line);
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.theme-uai_fluent .table td,
body.theme-uai_fluent .table th {
    border-top-color: var(--uai-f-soft-line);
    vertical-align: middle;
}

body.theme-uai_fluent .table-hover tbody tr:hover {
    background: #f2f7fd;
}

body.theme-uai_fluent .small-box {
    position: relative;
    min-height: 124px;
    border: 1px solid var(--uai-f-line);
    border-radius: 8px;
    background: var(--uai-f-panel) !important;
    color: var(--uai-f-text) !important;
    box-shadow: var(--uai-f-shadow-soft);
}

body.theme-uai_fluent a.text-white:hover,
body.theme-uai_fluent a.text-white:focus,
body.theme-uai_fluent a.text-white {
    color: var(--uai-f-text) !important;
    text-decoration: none;
}

body.theme-uai_fluent .small-box::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 4px;
    border-radius: 0 6px 6px 0;
    background: var(--uai-f-accent);
}

body.theme-uai_fluent .small-box.bg-warning::before {
    background: #f59e0b;
}

body.theme-uai_fluent .small-box.bg-success::before {
    background: #16a34a;
}

body.theme-uai_fluent .small-box.bg-danger::before {
    background: #ef4444;
}

body.theme-uai_fluent .small-box.bg-info::before {
    background: #0891b2;
}

body.theme-uai_fluent .small-box.bg-secondary::before {
    background: #64748b;
}

body.theme-uai_fluent .small-box .inner {
    min-height: 108px;
    padding: 16px 72px 14px 18px;
}

body.theme-uai_fluent .small-box h3,
body.theme-uai_fluent .small-box p {
    color: inherit !important;
}

body.theme-uai_fluent .small-box h3 {
    margin: 0;
    font-size: 1.86rem;
    font-weight: 850;
    line-height: 1.04;
}

body.theme-uai_fluent .small-box p {
    margin-top: 8px;
    color: var(--uai-f-muted) !important;
    font-size: 0.88rem;
    font-weight: 760;
}

body.theme-uai_fluent .small-box .icon {
    top: 18px;
    right: 16px;
    color: color-mix(in srgb, var(--uai-f-accent) 22%, #64748b) !important;
    font-size: 42px;
    opacity: 1;
}

body.theme-uai_fluent .crm-pipeline-metric {
    min-height: 90px;
    border-color: var(--uai-f-line);
    border-radius: 8px;
    background: var(--uai-f-panel);
    box-shadow: var(--uai-f-shadow-soft);
}

body.theme-uai_fluent .crm-pipeline-metric span {
    color: var(--uai-f-muted);
    letter-spacing: 0;
}

body.theme-uai_fluent .crm-pipeline-metric strong {
    color: var(--uai-f-ink);
}

body.theme-uai_fluent .uaicrm-kanban-shell {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 370px);
    gap: 12px;
}

body.theme-uai_fluent .uaicrm-kanban-board-panel,
body.theme-uai_fluent .uaicrm-kanban-inspector,
body.theme-uai_fluent .crm-conversations-workspace {
    border-color: var(--uai-f-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--uai-f-shadow-soft);
}

body.theme-uai_fluent .uaicrm-kanban-board-head,
body.theme-uai_fluent .uaicrm-kanban-column__head,
body.theme-uai_fluent .crm-conversation-filters,
body.theme-uai_fluent .crm-conversation-thread-header,
body.theme-uai_fluent .crm-conversation-topbar,
body.theme-uai_fluent .crm-conversation-topbar .crm-conversation-thread-tools,
body.theme-uai_fluent .crm-conversation-compose {
    border-color: var(--uai-f-soft-line);
    background: rgba(255, 255, 255, 0.92);
}

body.theme-uai_fluent .uaicrm-kanban-board {
    min-height: calc(100vh - 330px);
    padding: 12px;
    gap: 12px;
    background: #f5f7fb;
}

body.theme-uai_fluent .uaicrm-kanban-column {
    flex-basis: 304px;
    max-width: 304px;
    border-color: var(--uai-f-line);
    background: #f8fafc;
}

body.theme-uai_fluent .uaicrm-kanban-card {
    border-color: var(--uai-f-soft-line);
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

body.theme-uai_fluent .uaicrm-kanban-card:hover,
body.theme-uai_fluent .uaicrm-kanban-card.is-selected {
    border-color: var(--uai-f-accent-line);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--uai-f-accent) 16%, transparent);
    transform: translateY(-1px);
}

body.theme-uai_fluent .uaicrm-kanban-inspector {
    top: calc(var(--uai-f-topbar-h) + var(--uai-f-commandbar-h) + 14px);
    max-height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-commandbar-h) - 28px);
}

body.theme-uai_fluent .crm-conversations-workspace {
    height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-commandbar-h) - 104px);
    min-height: 520px;
    overflow: hidden;
}

body.theme-uai_fluent .crm-conversations-sidebar {
    border-color: var(--uai-f-soft-line);
    background: #f8fafc;
}

body.theme-uai_fluent .crm-conversation-list-item {
    border-color: var(--uai-f-soft-line);
    color: var(--uai-f-text);
}

body.theme-uai_fluent .crm-conversation-list-item:hover,
body.theme-uai_fluent .crm-conversation-list-item.active {
    background: var(--uai-f-accent-soft);
    color: var(--uai-f-ink);
}

body.theme-uai_fluent .crm-conversation-avatar {
    border-radius: 8px;
    background: color-mix(in srgb, var(--uai-f-accent) 78%, #0f766e);
    color: var(--uai-f-accent-contrast);
}

body.theme-uai_fluent .crm-conversation-thread {
    background: #eef3f8;
}

body.theme-uai_fluent .crm-conversation-message-bubble {
    border-color: rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
}

body.theme-uai_fluent .crm-conversation-message-row-out .crm-conversation-message-bubble {
    border-color: #bbf7d0;
    background: #dcfce7;
}

body.theme-uai_fluent .crm-conversation-topbar .crm-conversation-thread-header {
    padding: 10px 12px;
}

body.theme-uai_fluent .crm-conversation-meta-pill,
body.theme-uai_fluent .crm-conversation-state-pill,
body.theme-uai_fluent .crm-conversation-tags-panel summary,
body.theme-uai_fluent .crm-conversation-funnel-panel summary {
    border-color: #d8e1ec;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}

body.theme-uai_fluent.uaicrm-conversations-shell .wrapper {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(var(--uai-f-topbar-h) + var(--uai-f-commandbar-h));
    overflow: hidden;
}

body.theme-uai_fluent.uaicrm-conversations-shell .main-header .navbar-nav:first-child .nav-item,
body.theme-uai_fluent.uaicrm-conversations-shell .main-header .navbar-nav.ml-auto {
    display: flex !important;
}

body.theme-uai_fluent.uaicrm-conversations-shell .content-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-commandbar-h)) !important;
    height: calc(100dvh - var(--uai-f-topbar-h) - var(--uai-f-commandbar-h)) !important;
    min-height: 0 !important;
    overflow: hidden;
}

body.theme-uai_fluent.uaicrm-conversations-shell .content-header {
    flex: 0 0 auto;
    padding-top: 8px;
    padding-bottom: 8px;
}

body.theme-uai_fluent.uaicrm-conversations-shell .content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 10px;
}

body.theme-uai_fluent.uaicrm-conversations-shell .content > .container-fluid {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.theme-uai_fluent.uaicrm-conversations-shell .crm-conversations-workspace {
    height: 100%;
    min-height: 0;
}

body.theme-uai_fluent.uaicrm-panel-bg-enabled {
    background-image:
        linear-gradient(180deg, rgba(248, 250, 252, 0.76), rgba(237, 242, 248, 0.88)),
        var(--uai-panel-bg-image);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.theme-uai_fluent.uaicrm-panel-bg-enabled .wrapper,
body.theme-uai_fluent.uaicrm-panel-bg-enabled .content-wrapper {
    background: transparent !important;
}

body.theme-uai_fluent.uaicrm-panel-bg-enabled .main-header.navbar,
body.theme-uai_fluent.uaicrm-panel-bg-enabled .main-sidebar {
    background: rgba(255, 255, 255, 0.78) !important;
    -webkit-backdrop-filter: saturate(140%) blur(24px);
    backdrop-filter: saturate(140%) blur(24px);
}

body.theme-uai_fluent.dark-mode {
    --uai-f-bg: #111827;
    --uai-f-bg-2: #0f172a;
    --uai-f-surface: rgba(17, 24, 39, 0.9);
    --uai-f-panel: #1f2937;
    --uai-f-panel-soft: #111827;
    --uai-f-line: #334155;
    --uai-f-soft-line: #283548;
    --uai-f-ink: #f8fafc;
    --uai-f-text: #e5e7eb;
    --uai-f-muted: #a3b1c2;
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    color: var(--uai-f-text);
}

body.theme-uai_fluent.dark-mode .main-header.navbar,
body.theme-uai_fluent.dark-mode .main-sidebar,
body.theme-uai_fluent.dark-mode .card,
body.theme-uai_fluent.dark-mode .modal-content,
body.theme-uai_fluent.dark-mode .dropdown-menu,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-board-panel,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-inspector,
body.theme-uai_fluent.dark-mode .crm-conversations-workspace {
    border-color: var(--uai-f-line);
    background: rgba(31, 41, 55, 0.9) !important;
    color: var(--uai-f-text);
}

body.theme-uai_fluent.dark-mode .main-header .nav-link,
body.theme-uai_fluent.dark-mode .nav-sidebar .nav-link,
body.theme-uai_fluent.dark-mode .uaicrm-topbar-brand-name,
body.theme-uai_fluent.dark-mode .card-title,
body.theme-uai_fluent.dark-mode h2,
body.theme-uai_fluent.dark-mode h3,
body.theme-uai_fluent.dark-mode h4,
body.theme-uai_fluent.dark-mode .table,
body.theme-uai_fluent.dark-mode .small-box h3,
body.theme-uai_fluent.dark-mode .small-box p {
    color: var(--uai-f-text) !important;
}

body.theme-uai_fluent.dark-mode .nav-sidebar .nav-link:hover,
body.theme-uai_fluent.dark-mode .nav-sidebar .nav-link:focus,
body.theme-uai_fluent.dark-mode .nav-sidebar .nav-link.active,
body.theme-uai_fluent.dark-mode .nav-sidebar > .nav-item.uaicrm-topnav-open > .nav-link,
body.theme-uai_fluent.dark-mode .main-header .nav-link:hover,
body.theme-uai_fluent.dark-mode .main-header .nav-link:focus,
body.theme-uai_fluent.dark-mode .main-header .nav-link.active {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

body.theme-uai_fluent.dark-mode .card-header,
body.theme-uai_fluent.dark-mode .card-footer,
body.theme-uai_fluent.dark-mode .table thead th,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-board,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-column,
body.theme-uai_fluent.dark-mode .crm-conversations-sidebar,
body.theme-uai_fluent.dark-mode .crm-conversation-thread,
body.theme-uai_fluent.dark-mode .crm-conversation-filters,
body.theme-uai_fluent.dark-mode .crm-conversation-thread-header,
body.theme-uai_fluent.dark-mode .crm-conversation-topbar,
body.theme-uai_fluent.dark-mode .crm-conversation-topbar .crm-conversation-thread-tools,
body.theme-uai_fluent.dark-mode .crm-conversation-compose {
    border-color: var(--uai-f-soft-line);
    background: #111827 !important;
}

body.theme-uai_fluent.dark-mode .small-box,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-card,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-column__head,
body.theme-uai_fluent.dark-mode .form-control,
body.theme-uai_fluent.dark-mode .custom-select,
body.theme-uai_fluent.dark-mode select.form-control,
body.theme-uai_fluent.dark-mode .crm-conversation-message-bubble,
body.theme-uai_fluent.dark-mode .crm-conversation-meta-pill,
body.theme-uai_fluent.dark-mode .crm-conversation-state-pill,
body.theme-uai_fluent.dark-mode .crm-conversation-tags-panel summary,
body.theme-uai_fluent.dark-mode .crm-conversation-funnel-panel summary {
    border-color: var(--uai-f-line);
    background: #1f2937 !important;
    color: var(--uai-f-text);
}

@media (max-width: 991.98px) {
    body.theme-uai_fluent {
        --uai-f-topbar-h: 60px;
        --uai-f-commandbar-h: 54px;
    }

    body.theme-uai_fluent .uaicrm-topbar-brand {
        max-width: 260px;
    }

    body.theme-uai_fluent .uaicrm-topbar-panel-label {
        display: none;
    }

    body.theme-uai_fluent .uaicrm-kanban-shell {
        grid-template-columns: 1fr;
    }

    body.theme-uai_fluent .uaicrm-kanban-inspector {
        position: static;
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    body.theme-uai_fluent {
        --uai-f-topbar-h: 58px;
        --uai-f-commandbar-h: 52px;
    }

    body.theme-uai_fluent .main-header.navbar {
        padding: 0 10px;
    }

    body.theme-uai_fluent .uaicrm-topbar-brand {
        max-width: calc(100vw - 148px);
    }

    body.theme-uai_fluent .uaicrm-topbar-logo {
        max-width: 92px;
        height: 30px;
    }

    body.theme-uai_fluent .main-header .d-none.d-sm-inline-block {
        display: none !important;
    }

    body.theme-uai_fluent .navbar-nav.ml-auto .nav-item:first-child {
        display: none;
    }

    body.theme-uai_fluent .navbar-nav.ml-auto .nav-link {
        padding-right: 8px;
        padding-left: 8px;
    }

    body.theme-uai_fluent .main-sidebar .brand-link + .sidebar,
    body.theme-uai_fluent .main-sidebar .uaicrm-brand-link--logo-only + .sidebar {
        padding-right: 10px;
        padding-left: 10px;
    }

    body.theme-uai_fluent .nav-sidebar .nav-link {
        padding: 0 10px !important;
    }

    body.theme-uai_fluent .nav-sidebar .nav-treeview {
        position: fixed;
        top: calc(var(--uai-f-topbar-h) + var(--uai-f-commandbar-h) + 8px);
        right: 10px !important;
        left: 10px !important;
        width: auto;
        max-height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-commandbar-h) - 20px);
    }

    body.theme-uai_fluent .content-header,
    body.theme-uai_fluent .content {
        padding-right: 12px;
        padding-left: 12px;
    }

    body.theme-uai_fluent .content-header {
        padding-top: 14px;
    }

    body.theme-uai_fluent .content-header h1 {
        font-size: 1.22rem;
    }

    body.theme-uai_fluent .small-box {
        min-height: 116px;
    }

    body.theme-uai_fluent .small-box .inner {
        min-height: 100px;
        padding: 14px 54px 12px 14px;
    }

    body.theme-uai_fluent .small-box .icon {
        top: 18px;
        right: 10px;
        font-size: 34px;
    }

    body.theme-uai_fluent .crm-conversations-workspace {
        height: auto;
        min-height: 0;
    }
}

body.theme-uai_fluent.sidebar-mini.sidebar-collapse .main-sidebar,
body.theme-uai_fluent.sidebar-mini.sidebar-collapse .main-sidebar:hover,
body.theme-uai_fluent.sidebar-collapse .main-sidebar,
body.theme-uai_fluent.sidebar-collapse .main-sidebar::before {
    width: 100% !important;
    margin-left: 0 !important;
}

body.theme-uai_fluent.sidebar-mini.sidebar-collapse .main-sidebar .nav-sidebar .nav-link p,
body.theme-uai_fluent.sidebar-collapse .main-sidebar .nav-sidebar .nav-link p,
body.theme-uai_fluent.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link p {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
}

body.theme-uai_fluent.sidebar-collapse .main-sidebar .nav-sidebar .nav-icon,
body.theme-uai_fluent.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-icon {
    margin-right: 0 !important;
}

body.theme-uai_fluent.uaicrm-panel-bg-enabled .content-wrapper::before {
    display: none !important;
}

body.theme-uai_fluent .nav-sidebar .nav-treeview {
    position: fixed;
    top: calc(var(--uai-f-topbar-h) + var(--uai-f-commandbar-h) + 8px);
    right: auto !important;
    left: 18px;
}

/* CRM Workspace shell: dedicated top navigation, no AdminLTE sidebar frame. */
body.theme-uai_fluent {
    --uai-f-topbar-h: 58px;
    --uai-f-commandbar-h: 0px;
    --uai-f-worknav-h: 54px;
}

body.theme-uai_fluent:not(.uaicrm-login-page) .wrapper,
body.theme-uai_fluent.uaicrm-conversations-shell .wrapper {
    padding-top: calc(var(--uai-f-topbar-h) + var(--uai-f-worknav-h));
}

body.theme-uai_fluent .main-header.navbar {
    height: var(--uai-f-topbar-h);
    min-height: var(--uai-f-topbar-h);
    padding: 0 20px;
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

body.theme-uai_fluent .main-header .uaicrm-topbar-menu-item,
body.theme-uai_fluent .main-header .uaicrm-navbar-primary > .nav-item.d-none.d-sm-inline-block {
    display: none !important;
}

body.theme-uai_fluent .uaicrm-topbar-brand {
    max-width: min(360px, 38vw);
    padding-right: 18px !important;
}

body.theme-uai_fluent .uaicrm-topbar-logo {
    max-width: 128px;
    height: auto;
    max-height: 34px;
}

body.theme-uai_fluent .navbar-nav.ml-auto .nav-item:first-child .nav-link {
    min-height: 34px;
    border-color: #e5e7eb;
    background: #f8fafc !important;
    color: #334155 !important;
}

body.theme-uai_fluent .navbar-nav.ml-auto .nav-link[href*="logout"],
body.theme-uai_fluent .navbar-nav.ml-auto .nav-link[href$="/sair"] {
    min-height: 34px;
    border: 1px solid transparent;
    color: #64748b !important;
}

body.theme-uai_fluent .uaicrm-workspace-nav {
    position: fixed;
    top: var(--uai-f-topbar-h);
    right: 0;
    left: 0;
    z-index: 1038;
    display: block;
    height: var(--uai-f-worknav-h);
    border-bottom: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

body.theme-uai_fluent .uaicrm-workspace-nav__inner {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 20px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
}

body.theme-uai_fluent .uaicrm-workspace-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    min-width: max-content;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 760;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

body.theme-uai_fluent .uaicrm-workspace-link i {
    color: #64748b;
    font-size: 0.9rem;
}

body.theme-uai_fluent .uaicrm-workspace-link:hover,
body.theme-uai_fluent .uaicrm-workspace-link:focus,
body.theme-uai_fluent .uaicrm-workspace-link.active,
body.theme-uai_fluent .uaicrm-workspace-menu.show > .uaicrm-workspace-link {
    border-color: #dbe3ef;
    background: #f1f5f9;
    color: #0f172a;
    outline: 0;
    text-decoration: none;
}

body.theme-uai_fluent .uaicrm-workspace-link.active {
    border-color: color-mix(in srgb, var(--uai-f-accent) 38%, #dbe3ef);
    background: color-mix(in srgb, var(--uai-f-accent) 10%, #ffffff);
    color: color-mix(in srgb, var(--uai-f-accent) 76%, #111827);
}

body.theme-uai_fluent .uaicrm-workspace-link.active i {
    color: var(--uai-f-accent);
}

body.theme-uai_fluent .uaicrm-workspace-menu .dropdown-toggle::after {
    margin-left: 2px;
    border-top-color: currentColor;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown {
    min-width: 248px;
    margin-top: 7px;
    padding: 8px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
}

body.theme-uai_fluent .uaicrm-workspace-dropdown--wide {
    display: none;
    width: min(560px, calc(100vw - 40px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown--wide.show {
    display: grid;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown__group {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown__group > strong {
    padding: 7px 10px 5px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #1f2937;
    font-weight: 700;
    white-space: normal;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown .dropdown-item i {
    width: 16px;
    color: #64748b;
    text-align: center;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown .dropdown-item:hover,
body.theme-uai_fluent .uaicrm-workspace-dropdown .dropdown-item:focus {
    background: #eff6ff;
    color: #1d4ed8;
}

body.theme-uai_fluent .main-sidebar {
    display: none !important;
}

body.theme-uai_fluent .content-wrapper,
body.theme-uai_fluent.sidebar-collapse .content-wrapper,
body.theme-uai_fluent .main-footer,
body.theme-uai_fluent.sidebar-collapse .main-footer {
    margin-left: 0 !important;
}

body.theme-uai_fluent .content-wrapper {
    min-height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-worknav-h)) !important;
    background: #f5f7fb !important;
}

body.theme-uai_fluent .content-header,
body.theme-uai_fluent .content {
    padding-right: 24px;
    padding-left: 24px;
}

body.theme-uai_fluent .content-header {
    padding-top: 18px;
    padding-bottom: 10px;
}

body.theme-uai_fluent .content-header > .container-fluid,
body.theme-uai_fluent .content > .container-fluid {
    max-width: none;
}

body.theme-uai_fluent.uaicrm-conversations-shell .content-wrapper {
    height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-worknav-h)) !important;
    height: calc(100dvh - var(--uai-f-topbar-h) - var(--uai-f-worknav-h)) !important;
}

body.theme-uai_fluent.uaicrm-conversations-shell .crm-conversations-workspace {
    height: 100%;
}

@media (max-width: 767.98px) {
    body.theme-uai_fluent {
        --uai-f-topbar-h: 56px;
        --uai-f-worknav-h: 52px;
    }

    body.theme-uai_fluent .main-header.navbar {
        padding: 0 12px;
    }

    body.theme-uai_fluent .uaicrm-workspace-nav__inner {
        padding: 0 12px;
    }

    body.theme-uai_fluent .uaicrm-workspace-link {
        height: 34px;
        padding: 0 10px;
    }

    body.theme-uai_fluent .uaicrm-workspace-link span {
        max-width: 142px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.theme-uai_fluent .uaicrm-workspace-dropdown--wide {
        width: calc(100vw - 24px);
        grid-template-columns: 1fr;
    }

    body.theme-uai_fluent .content-header,
    body.theme-uai_fluent .content {
        padding-right: 12px;
        padding-left: 12px;
    }
}

/* CRM Workspace hard reset: keep AdminLTE and saved dark mode out of the new theme. */
body.theme-uai_fluent,
body.theme-uai_fluent.dark-mode {
    --uai-f-bg: #f4f6fb;
    --uai-f-bg-2: #eef3f8;
    --uai-f-surface: #ffffff;
    --uai-f-panel: #ffffff;
    --uai-f-panel-soft: #f8fafc;
    --uai-f-line: #d8e2ee;
    --uai-f-soft-line: #edf2f7;
    --uai-f-ink: #111827;
    --uai-f-text: #243145;
    --uai-f-muted: #667085;
    --uai-f-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    --uai-f-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
    background: #f4f6fb !important;
    color: #243145 !important;
    color-scheme: light;
}

body.theme-uai_fluent:not(.uaicrm-login-page) .wrapper,
body.theme-uai_fluent.dark-mode:not(.uaicrm-login-page) .wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: calc(var(--uai-f-topbar-h) + var(--uai-f-worknav-h)) !important;
    background: #f4f6fb !important;
}

body.theme-uai_fluent .main-header.navbar,
body.theme-uai_fluent.dark-mode .main-header.navbar,
body.theme-uai_fluent.uaicrm-panel-bg-enabled .main-header.navbar {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0 !important;
    z-index: 2100;
    height: var(--uai-f-topbar-h) !important;
    min-height: var(--uai-f-topbar-h) !important;
    margin-left: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05) !important;
}

body.theme-uai_fluent .main-header .nav-link,
body.theme-uai_fluent.dark-mode .main-header .nav-link,
body.theme-uai_fluent .uaicrm-topbar-brand-name,
body.theme-uai_fluent.dark-mode .uaicrm-topbar-brand-name {
    color: #1f2937 !important;
}

body.theme-uai_fluent .main-header .navbar-nav.ml-auto .nav-item:first-child .nav-link,
body.theme-uai_fluent.dark-mode .main-header .navbar-nav.ml-auto .nav-item:first-child .nav-link {
    border: 1px solid #d8e2ee !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

body.theme-uai_fluent .uaicrm-workspace-nav,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-nav {
    z-index: 2090;
    overflow: visible !important;
    border-bottom: 1px solid #dde5ef !important;
    background: #f8fafc !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body.theme-uai_fluent .uaicrm-workspace-nav__inner,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-nav__inner {
    overflow-y: visible !important;
}

body.theme-uai_fluent .uaicrm-workspace-menu,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-menu {
    position: static !important;
}

body.theme-uai_fluent .uaicrm-workspace-link,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-link {
    color: #334155 !important;
}

body.theme-uai_fluent .uaicrm-workspace-link:hover,
body.theme-uai_fluent .uaicrm-workspace-link:focus,
body.theme-uai_fluent .uaicrm-workspace-link.active,
body.theme-uai_fluent .uaicrm-workspace-menu.show > .uaicrm-workspace-link,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-link:hover,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-link:focus,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-link.active,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-menu.show > .uaicrm-workspace-link {
    border-color: #c7d7ee !important;
    background: #eaf2ff !important;
    color: #1d4ed8 !important;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-dropdown {
    position: fixed !important;
    top: var(--uai-workspace-dropdown-top, calc(var(--uai-f-topbar-h) + var(--uai-f-worknav-h) + 4px)) !important;
    left: var(--uai-workspace-dropdown-left, 20px) !important;
    z-index: 5000 !important;
    width: min(320px, calc(100vw - 24px));
    max-height: calc(100vh - var(--uai-workspace-dropdown-top, calc(var(--uai-f-topbar-h) + var(--uai-f-worknav-h) + 4px)) - 12px);
    margin: 0 !important;
    overflow: auto;
    border: 1px solid #d8e2ee !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1f2937 !important;
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.20) !important;
    translate: var(--uai-workspace-dropdown-shift-x, 0px) var(--uai-workspace-dropdown-shift-y, 0px) !important;
    transform: none !important;
    will-change: translate !important;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown--wide,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-dropdown--wide {
    width: min(560px, calc(100vw - 24px));
}

body.theme-uai_fluent .uaicrm-workspace-dropdown.show:not(.uaicrm-workspace-dropdown--wide),
body.theme-uai_fluent.dark-mode .uaicrm-workspace-dropdown.show:not(.uaicrm-workspace-dropdown--wide) {
    display: block !important;
}

body.theme-uai_fluent .uaicrm-workspace-dropdown--wide.show,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-dropdown--wide.show {
    display: grid !important;
}

body.theme-uai_fluent .content-wrapper,
body.theme-uai_fluent.sidebar-collapse .content-wrapper,
body.theme-uai_fluent.dark-mode .content-wrapper,
body.theme-uai_fluent.dark-mode.sidebar-collapse .content-wrapper {
    min-height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-worknav-h)) !important;
    margin-left: 0 !important;
    background: #f4f6fb !important;
    color: #243145 !important;
}

body.theme-uai_fluent .content-header h1,
body.theme-uai_fluent.dark-mode .content-header h1,
body.theme-uai_fluent h1,
body.theme-uai_fluent h2,
body.theme-uai_fluent h3,
body.theme-uai_fluent h4,
body.theme-uai_fluent .card-title,
body.theme-uai_fluent.dark-mode h1,
body.theme-uai_fluent.dark-mode h2,
body.theme-uai_fluent.dark-mode h3,
body.theme-uai_fluent.dark-mode h4,
body.theme-uai_fluent.dark-mode .card-title {
    color: #111827 !important;
}

body.theme-uai_fluent .main-sidebar,
body.theme-uai_fluent.dark-mode .main-sidebar,
body.theme-uai_fluent.uaicrm-panel-bg-enabled .main-sidebar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.theme-uai_fluent .card,
body.theme-uai_fluent .modal-content,
body.theme-uai_fluent .dropdown-menu,
body.theme-uai_fluent .table-responsive,
body.theme-uai_fluent .uaicrm-kanban-board-panel,
body.theme-uai_fluent .uaicrm-kanban-inspector,
body.theme-uai_fluent .crm-conversations-workspace,
body.theme-uai_fluent.dark-mode .card,
body.theme-uai_fluent.dark-mode .modal-content,
body.theme-uai_fluent.dark-mode .dropdown-menu,
body.theme-uai_fluent.dark-mode .table-responsive,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-board-panel,
body.theme-uai_fluent.dark-mode .uaicrm-kanban-inspector,
body.theme-uai_fluent.dark-mode .crm-conversations-workspace {
    border-color: #d8e2ee !important;
    background: #ffffff !important;
    color: #243145 !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

body.theme-uai_fluent .card-header,
body.theme-uai_fluent .card-footer,
body.theme-uai_fluent .modal-header,
body.theme-uai_fluent .modal-footer,
body.theme-uai_fluent.dark-mode .card-header,
body.theme-uai_fluent.dark-mode .card-footer,
body.theme-uai_fluent.dark-mode .modal-header,
body.theme-uai_fluent.dark-mode .modal-footer {
    border-color: #edf2f7 !important;
    background: #f8fafc !important;
    color: #111827 !important;
}

body.theme-uai_fluent .table,
body.theme-uai_fluent .table td,
body.theme-uai_fluent .table th,
body.theme-uai_fluent.dark-mode .table,
body.theme-uai_fluent.dark-mode .table td,
body.theme-uai_fluent.dark-mode .table th {
    color: #243145 !important;
}

body.theme-uai_fluent .table,
body.theme-uai_fluent .table tbody,
body.theme-uai_fluent .table tbody tr,
body.theme-uai_fluent.dark-mode .table,
body.theme-uai_fluent.dark-mode .table tbody,
body.theme-uai_fluent.dark-mode .table tbody tr {
    background: #ffffff !important;
}

body.theme-uai_fluent .table thead th,
body.theme-uai_fluent.dark-mode .table thead th {
    border-bottom: 1px solid #d8e2ee !important;
    background: #f8fafc !important;
    color: #667085 !important;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.theme-uai_fluent .table td,
body.theme-uai_fluent.dark-mode .table td {
    border-top: 1px solid #edf2f7 !important;
}

body.theme-uai_fluent .table-hover tbody tr:hover,
body.theme-uai_fluent.dark-mode .table-hover tbody tr:hover,
body.theme-uai_fluent .table-striped tbody tr:nth-of-type(odd),
body.theme-uai_fluent.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background: #f8fafc !important;
}

body.theme-uai_fluent .small-box,
body.theme-uai_fluent .small-box[class*="bg-"],
body.theme-uai_fluent.dark-mode .small-box,
body.theme-uai_fluent.dark-mode .small-box[class*="bg-"] {
    border: 1px solid #d8e2ee !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

body.theme-uai_fluent .small-box h3,
body.theme-uai_fluent .small-box p,
body.theme-uai_fluent.dark-mode .small-box h3,
body.theme-uai_fluent.dark-mode .small-box p {
    color: #111827 !important;
}

body.theme-uai_fluent .small-box .icon,
body.theme-uai_fluent.dark-mode .small-box .icon {
    color: #d7e2f0 !important;
    opacity: 1 !important;
}

body.theme-uai_fluent .small-box .small-box-footer,
body.theme-uai_fluent.dark-mode .small-box .small-box-footer {
    border-top: 1px solid #edf2f7 !important;
    background: #f8fafc !important;
    color: #2563eb !important;
}

body.theme-uai_fluent .btn,
body.theme-uai_fluent .form-control,
body.theme-uai_fluent .custom-select,
body.theme-uai_fluent select.form-control,
body.theme-uai_fluent.dark-mode .btn,
body.theme-uai_fluent.dark-mode .form-control,
body.theme-uai_fluent.dark-mode .custom-select,
body.theme-uai_fluent.dark-mode select.form-control {
    border-radius: 8px;
}

body.theme-uai_fluent .form-control,
body.theme-uai_fluent .custom-select,
body.theme-uai_fluent select.form-control,
body.theme-uai_fluent.dark-mode .form-control,
body.theme-uai_fluent.dark-mode .custom-select,
body.theme-uai_fluent.dark-mode select.form-control {
    border-color: #d8e2ee !important;
    background: #ffffff !important;
    color: #243145 !important;
}

body.theme-uai_fluent.uaicrm-conversations-shell .content-wrapper,
body.theme-uai_fluent.dark-mode.uaicrm-conversations-shell .content-wrapper {
    height: calc(100vh - var(--uai-f-topbar-h) - var(--uai-f-worknav-h)) !important;
    height: calc(100dvh - var(--uai-f-topbar-h) - var(--uai-f-worknav-h)) !important;
}

@media (max-width: 767.98px) {
    body.theme-uai_fluent .uaicrm-workspace-dropdown,
    body.theme-uai_fluent.dark-mode .uaicrm-workspace-dropdown {
        left: 12px;
        width: calc(100vw - 24px) !important;
    }
}


/* CRM design system: consistent rhythm, color and feedback across modules. */
body.theme-uai_fluent .content-wrapper { background: radial-gradient(circle at 12% 0%, rgba(37,99,235,.06), transparent 28rem), linear-gradient(180deg,#f8fbff 0%,var(--uai-f-bg) 100%) !important; }
body.theme-uai_fluent .content-header { padding-top:24px; padding-bottom:18px; }
body.theme-uai_fluent .content-header h1 { color:var(--uai-f-ink); font-size:1.7rem; font-weight:850; letter-spacing:-.035em; }
body.theme-uai_fluent .content-header .text-muted { color:var(--uai-f-muted) !important; }
body.theme-uai_fluent .content-header .btn, body.theme-uai_fluent .card-header .btn { box-shadow:0 4px 10px rgba(15,23,42,.06); }
body.theme-uai_fluent .card { border:1px solid var(--uai-f-line); border-radius:14px; background:var(--uai-f-panel); box-shadow:var(--uai-f-shadow-soft); transition:box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
body.theme-uai_fluent .card:hover { border-color:#cbd9ea; box-shadow:var(--uai-f-shadow); }
body.theme-uai_fluent .card-header { position:relative; padding:15px 18px; border-bottom:1px solid var(--uai-f-soft-line); background:linear-gradient(135deg,#fff 0%,#f7faff 100%); }
body.theme-uai_fluent .card-header::before { content:""; position:absolute; left:0; top:13px; bottom:13px; width:4px; border-radius:0 5px 5px 0; background:var(--uai-f-accent); }
body.theme-uai_fluent .card-title { color:var(--uai-f-ink); font-weight:800; letter-spacing:-.01em; }
body.theme-uai_fluent .card-title::before { content:"\f0c9"; margin-right:9px; color:var(--uai-f-accent); font-family:"Font Awesome 5 Free"; font-size:.78em; font-weight:900; opacity:.85; }
body.theme-uai_fluent .card-body { padding:18px; }
body.theme-uai_fluent .card-footer { border-top:1px solid var(--uai-f-soft-line); background:#fbfdff; }
body.theme-uai_fluent .table { color:var(--uai-f-text); margin-bottom:0; }
body.theme-uai_fluent .table thead th { color:#475569; background:#f1f6fb; border-bottom:1px solid #dbe4ef; font-size:.72rem; letter-spacing:.045em; text-transform:uppercase; white-space:nowrap; }
body.theme-uai_fluent .table tbody tr { transition:background .15s ease, transform .15s ease; }
body.theme-uai_fluent .table-hover tbody tr:hover, body.theme-uai_fluent .table-striped tbody tr:hover { background:#eef6ff; }
body.theme-uai_fluent .table td { border-top-color:#edf2f7; vertical-align:middle; }
body.theme-uai_fluent .table td:first-child a { color:#1d4ed8; font-weight:750; }
body.theme-uai_fluent .form-control, body.theme-uai_fluent .custom-select { border:1px solid #cbd5e1; border-radius:9px; background:#fff; color:var(--uai-f-text); transition:border-color .15s ease, box-shadow .15s ease; }
body.theme-uai_fluent .form-control:focus, body.theme-uai_fluent .custom-select:focus { border-color:#60a5fa; box-shadow:0 0 0 3px rgba(37,99,235,.14); }
body.theme-uai_fluent label { color:#334155; font-weight:750; }
body.theme-uai_fluent .btn { border-radius:9px; font-weight:750; transition:transform .15s ease, box-shadow .15s ease, filter .15s ease; }
body.theme-uai_fluent .btn:hover { transform:translateY(-1px); filter:saturate(1.08); }
body.theme-uai_fluent .btn-primary { border-color:#2563eb; background:linear-gradient(135deg,#3b82f6,#1d4ed8); box-shadow:0 6px 14px rgba(37,99,235,.18); }
body.theme-uai_fluent .btn-success { border-color:#16a34a; background:linear-gradient(135deg,#22c55e,#15803d); }
body.theme-uai_fluent .btn-danger { border-color:#dc2626; background:linear-gradient(135deg,#ef4444,#b91c1c); }
body.theme-uai_fluent .btn-outline-primary:hover { color:#fff; background:#2563eb; }
body.theme-uai_fluent .badge { border-radius:999px; padding:.38em .7em; font-weight:800; letter-spacing:.01em; }
body.theme-uai_fluent .alert { border:0; border-left:4px solid currentColor; border-radius:10px; box-shadow:0 5px 15px rgba(15,23,42,.05); }
body.theme-uai_fluent .nav-tabs { border-bottom:1px solid var(--uai-f-line); gap:4px; }
body.theme-uai_fluent .nav-tabs .nav-link { border:0; border-radius:8px 8px 0 0; color:#64748b; font-weight:750; }
body.theme-uai_fluent .nav-tabs .nav-link:hover, body.theme-uai_fluent .nav-tabs .nav-link.active { color:#1d4ed8; background:#eff6ff; border-bottom:3px solid #2563eb; }
body.theme-uai_fluent .pagination .page-link { border:0; border-radius:8px; margin:0 2px; color:#2563eb; font-weight:750; }
body.theme-uai_fluent .pagination .active .page-link { background:#2563eb; color:#fff; }
body.theme-uai_fluent .dropdown-menu { border:1px solid var(--uai-f-line); border-radius:10px; box-shadow:var(--uai-f-shadow); }
body.theme-uai_fluent .dropdown-item:hover { color:#1d4ed8; background:#eff6ff; }
body.theme-uai_fluent .empty-state, body.theme-uai_fluent .text-muted:only-child { color:#64748b; }
body.theme-uai_fluent .small-box { overflow:hidden; }
body.theme-uai_fluent .small-box:hover { transform:translateY(-2px); }
@media (max-width:767.98px) { body.theme-uai_fluent .content-header { padding-top:16px; } body.theme-uai_fluent .card-body { padding:14px; } body.theme-uai_fluent .card-title::before { margin-right:6px; } }

/* User appearance takes precedence over the workspace's light defaults. */
body.theme-uai_fluent.dark-mode {
    --uai-f-bg: #101722;
    --uai-f-bg-2: #141d2b;
    --uai-f-surface: #182231;
    --uai-f-panel: #182231;
    --uai-f-panel-soft: #202d3e;
    --uai-f-line: #354357;
    --uai-f-soft-line: #2b3a4e;
    --uai-f-ink: #f1f5f9;
    --uai-f-text: #e2e8f0;
    --uai-f-muted: #afbed0;
    --uai-f-accent-soft: #203859;
    color-scheme: dark;
    background: var(--uai-f-bg) !important;
    color: var(--uai-f-text) !important;
}
body.theme-uai_fluent.dark-mode:not(.uaicrm-login-page) .wrapper,
body.theme-uai_fluent.dark-mode .content-wrapper,
body.theme-uai_fluent.dark-mode.sidebar-collapse .content-wrapper {
    background: var(--uai-f-bg) !important;
    color: var(--uai-f-text) !important;
}
body.theme-uai_fluent.dark-mode .main-header.navbar,
body.theme-uai_fluent.dark-mode .main-header .navbar-nav.ml-auto .nav-item:first-child .nav-link,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-nav,
body.theme-uai_fluent.dark-mode .uaicrm-workspace-dropdown,
body.theme-uai_fluent.dark-mode .card,
body.theme-uai_fluent.dark-mode .modal-content,
body.theme-uai_fluent.dark-mode .dropdown-menu,
body.theme-uai_fluent.dark-mode .table-responsive,
body.theme-uai_fluent.dark-mode .small-box[class*="bg-"],
body.theme-uai_fluent.dark-mode .form-control,
body.theme-uai_fluent.dark-mode select.form-control,
body.theme-uai_fluent.dark-mode .custom-select {
    background: var(--uai-f-panel) !important;
    border-color: var(--uai-f-line) !important;
    color: var(--uai-f-text) !important;
}
body.theme-uai_fluent.dark-mode :is(.card-header, .card-footer, .modal-header, .modal-footer, .main-footer, .small-box .small-box-footer, .table thead th) {
    background: var(--uai-f-panel-soft) !important;
    border-color: var(--uai-f-line) !important;
    color: var(--uai-f-text) !important;
}
body.theme-uai_fluent.dark-mode :is(h1, h2, h3, h4, .card-title, label, .small-box h3, .small-box p, .main-header .nav-link, .uaicrm-topbar-brand-name, .uaicrm-workspace-link, .dropdown-item, .table, .table th, .table td) {
    color: var(--uai-f-text) !important;
}
body.theme-uai_fluent.dark-mode :is(.text-muted, .uaicrm-topbar-panel-label) { color: var(--uai-f-muted) !important; }
body.theme-uai_fluent.dark-mode :is(.table, .table tbody, .table tbody tr) { background: var(--uai-f-panel) !important; }
body.theme-uai_fluent.dark-mode .table td { border-color: var(--uai-f-soft-line) !important; }
body.theme-uai_fluent.dark-mode .table-striped tbody tr:nth-of-type(odd),
body.theme-uai_fluent.dark-mode .table-hover tbody tr:hover { background: var(--uai-f-panel-soft) !important; }
body.theme-uai_fluent.dark-mode .table td:first-child a,
body.theme-uai_fluent.dark-mode .btn-outline-primary { color: #93c5fd; }
body.theme-uai_fluent.dark-mode .btn-outline-primary:hover { color: #fff; }
body.theme-uai_fluent.dark-mode .btn-outline-secondary { color: #cbd5e1; }
body.theme-uai_fluent.dark-mode :is(.uaicrm-workspace-link:hover, .uaicrm-workspace-link:focus, .uaicrm-workspace-link.active, .uaicrm-workspace-menu.show > .uaicrm-workspace-link, .dropdown-item:hover, .dropdown-item:focus) {
    background: var(--uai-f-accent-soft) !important;
    border-color: #5275a3 !important;
    color: #bfdbfe !important;
}
body.theme-uai_fluent.dark-mode .form-control:focus { border-color: #60a5fa !important; }
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box .icon { color: #93c5fd !important; }
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box.bg-success .icon { color: #86efac !important; }
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box.bg-warning .icon { color: #fcd34d !important; }
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box.bg-danger .icon { color: #fca5a5 !important; }
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box.bg-purple .icon { color: #c4b5fd !important; }

body.theme-uai_fluent.dark-mode .form-control::placeholder { color: var(--uai-f-muted) !important; }

/* Global Admin dashboard compact density overrides. Kept after theme rules so the dashboard is visibly denser. */
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card { min-height: 64px !important; margin-bottom: 8px !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .inner,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .inner { min-height: 48px !important; padding: 6px 8px !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card h3,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card h3 { font-size: 0.98rem !important; line-height: 1 !important; margin-bottom: 1px !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card p,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card p { font-size: 0.60rem !important; line-height: 1 !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .icon,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .icon { font-size: 1.25rem !important; top: 6px !important; right: 7px !important; }
body.theme-uai_fluent .uaicrm-global-dashboard > [class*="col-"],
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard > [class*="col-"] { padding-left: 4px !important; padding-right: 4px !important; }


/* uaiERP dashboard color density v11 */
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card {
    min-height: 58px !important;
    height: 58px !important;
    margin-bottom: 7px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 10px !important;
    color: #fff !important;
    box-shadow: 0 7px 16px rgba(15,23,42,.16) !important;
    background-size: 170% 170% !important;
    background-position: 0 50% !important;
    transition: transform .18s ease, box-shadow .18s ease, background-position .35s ease !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card:hover,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card:hover {
    transform: translateY(-2px) scale(1.015) !important;
    box-shadow: 0 11px 23px rgba(15,23,42,.24) !important;
    background-position: 100% 50% !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card::before,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card::before { display: none !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .inner,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .inner {
    min-height: 0 !important;
    height: 58px !important;
    padding: 8px 42px 6px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card h3,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card h3 {
    margin: 0 0 2px !important;
    color: #fff !important;
    font-size: .92rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card p,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card p {
    margin: 0 !important;
    color: rgba(255,255,255,.88) !important;
    font-size: .58rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: .01em !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .icon,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .icon {
    top: 50% !important;
    right: 10px !important;
    width: 26px !important;
    height: 26px !important;
    margin-top: -13px !important;
    color: rgba(255,255,255,.42) !important;
    font-size: 21px !important;
    line-height: 26px !important;
    opacity: 1 !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .icon > i,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .icon > i {
    position: static !important;
    color: inherit !important;
    font-size: 21px !important;
    line-height: 26px !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard a.text-white,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard a.text-white { color: #fff !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-primary { background: linear-gradient(135deg,#2563eb,#1d4ed8,#38bdf8) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-info { background: linear-gradient(135deg,#0891b2,#0e7490,#22d3ee) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-success { background: linear-gradient(135deg,#16a34a,#15803d,#4ade80) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-warning { background: linear-gradient(135deg,#d97706,#b45309,#fbbf24) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-danger { background: linear-gradient(135deg,#dc2626,#b91c1c,#fb7185) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-secondary { background: linear-gradient(135deg,#64748b,#475569,#94a3b8) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-dark { background: linear-gradient(135deg,#1e293b,#0f172a,#475569) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-cyan { background: linear-gradient(135deg,#06b6d4,#0e7490,#67e8f9) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-purple { background: linear-gradient(135deg,#7c3aed,#6d28d9,#c084fc) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-indigo { background: linear-gradient(135deg,#4f46e5,#3730a3,#818cf8) !important; }
body.theme-uai_fluent .uaicrm-global-dashboard .bg-teal { background: linear-gradient(135deg,#0f766e,#115e59,#2dd4bf) !important; }


/* uaiERP dashboard balanced density v12 */
@media (min-width: 1200px) {
    body.theme-uai_fluent .uaicrm-global-dashboard > [class*="col-"],
    body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard > [class*="col-"] {
        flex: 0 0 12.5% !important;
        max-width: 12.5% !important;
    }
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card {
    min-height: 52px !important;
    height: 52px !important;
    margin-bottom: 6px !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .inner,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .inner {
    height: 52px !important;
    padding: 7px 43px 6px 9px !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .icon,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .icon {
    right: 9px !important;
    width: 30px !important;
    height: 30px !important;
    margin-top: -15px !important;
    color: rgba(255,255,255,.68) !important;
    font-size: 27px !important;
    line-height: 30px !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .icon > i,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .icon > i {
    font-size: 27px !important;
    line-height: 30px !important;
}


/* uaiERP dashboard icon alignment v13 */
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .icon,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .icon {
    position: absolute !important;
    top: 50% !important;
    right: 9px !important;
    bottom: auto !important;
    left: auto !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    pointer-events: none !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card .icon > i,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card .icon > i {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 !important;
    transform: none !important;
    display: block !important;
    line-height: 1 !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card:hover .icon > i,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card:hover .icon > i {
    transform: none !important;
}


/* uaiERP dashboard typography v14 */
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card h3,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card h3 {
    font-size: 1.15rem !important;
}
body.theme-uai_fluent .uaicrm-global-dashboard .uaicrm-global-card p,
body.theme-uai_fluent.dark-mode .uaicrm-global-dashboard .uaicrm-global-card p {
    font-size: .725rem !important;
}


/* uaiERP integrations table layout v15 */
body.theme-uai_fluent .uaierp-integrations-header { gap: 12px; }
body.theme-uai_fluent .uaierp-integrations-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
}
body.theme-uai_fluent .uaierp-integrations-header__actions form { margin: 0; }
body.theme-uai_fluent .uaierp-integrations-table {
    min-width: 1240px;
    table-layout: auto;
    margin-bottom: 0;
}
body.theme-uai_fluent .uaierp-integrations-table th,
body.theme-uai_fluent .uaierp-integrations-table td {
    vertical-align: middle !important;
}
body.theme-uai_fluent .uaierp-integrations-table td { line-height: 1.2; }
body.theme-uai_fluent .uaierp-integrations-actions-cell {
    width: 306px;
    min-width: 306px;
    padding-left: 8px !important;
    padding-right: 10px !important;
    white-space: nowrap !important;
}
body.theme-uai_fluent .uaierp-integrations-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    min-width: 0;
}
body.theme-uai_fluent .uaierp-integrations-actions form {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
}
body.theme-uai_fluent .uaierp-integrations-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 31px;
    margin: 0 !important;
    gap: 5px;
    line-height: 1;
    white-space: nowrap;
}
body.theme-uai_fluent .uaierp-integrations-actions .btn i {
    position: static !important;
    margin: 0 !important;
    transform: none !important;
    line-height: 1 !important;
}
body.theme-uai_fluent .uaierp-integrations-actions .uaierp-integration-icon-button {
    width: 32px;
    min-width: 32px;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
@media (max-width: 767.98px) {
    body.theme-uai_fluent .uaierp-integrations-header {
        align-items: flex-start !important;
        flex-direction: column;
    }
    body.theme-uai_fluent .uaierp-integrations-header__actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* uaiERP integrations compact table v16 */
body.theme-uai_fluent .uaierp-integrations-table {
    min-width: 1080px;
    font-size: .72rem;
}
body.theme-uai_fluent .uaierp-integrations-table thead th {
    padding: 7px 8px !important;
    font-size: .65rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
body.theme-uai_fluent .uaierp-integrations-table tbody td {
    padding: 6px 8px !important;
    font-size: .72rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}
body.theme-uai_fluent .uaierp-integrations-table .badge {
    padding: .28em .52em !important;
    font-size: .64rem !important;
    line-height: 1 !important;
}
body.theme-uai_fluent .uaierp-integrations-table small {
    font-size: .64rem !important;
    white-space: nowrap !important;
}
body.theme-uai_fluent .uaierp-integrations-actions-cell {
    width: 150px;
    min-width: 150px;
    padding-left: 6px !important;
    padding-right: 8px !important;
}
body.theme-uai_fluent .uaierp-integrations-actions { gap: 3px; }
body.theme-uai_fluent .uaierp-integrations-actions .uaierp-integration-icon-button {
    width: 30px;
    min-width: 30px;
    height: 28px;
    min-height: 28px;
    padding: 0 !important;
    font-size: .70rem !important;
}
body.theme-uai_fluent .uaierp-integrations-actions .uaierp-integration-icon-button i {
    font-size: .70rem !important;
}


/* uaiERP integrations config hint v17 */
body.theme-uai_fluent .uaierp-config-pending-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 3px;
    border-radius: 50%;
    color: #64748b;
    cursor: help;
    vertical-align: middle;
}
body.theme-uai_fluent .uaierp-config-pending-info i {
    position: static !important;
    margin: 0 !important;
    font-size: .68rem !important;
    line-height: 1 !important;
}


/* Shared dashboards and tables standard v18 */
@media (min-width: 1200px) {
    body.theme-uai_fluent .uaicrm-dashboard-metrics > [class*="col-"],
    body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics > [class*="col-"] {
        flex: 0 0 12.5% !important;
        max-width: 12.5% !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}
body.theme-uai_fluent .uaicrm-dashboard-metrics,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics { margin-left: -4px; margin-right: -4px; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box {
    position: relative !important;
    min-height: 52px !important;
    height: 52px !important;
    margin-bottom: 8px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 10px !important;
    color: #fff !important;
    box-shadow: 0 7px 16px rgba(15,23,42,.16) !important;
    background-size: 170% 170% !important;
    background-position: 0 50% !important;
    transition: transform .18s ease, box-shadow .18s ease, background-position .35s ease !important;
}
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box:has(.small-box-footer),
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box:has(.small-box-footer) { height: 72px !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box:hover,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box:hover {
    transform: translateY(-2px) scale(1.015) !important;
    box-shadow: 0 11px 23px rgba(15,23,42,.24) !important;
    background-position: 100% 50% !important;
}
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box::before,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box::before { display: none !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box .inner,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box .inner {
    min-height: 0 !important;
    height: 52px !important;
    padding: 7px 43px 6px 9px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box h3,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box h3 {
    margin: 0 0 2px !important;
    color: #fff !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box p,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box p {
    margin: 0 !important;
    color: rgba(255,255,255,.88) !important;
    font-size: .725rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box .icon,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box .icon {
    position: absolute !important;
    top: 50% !important;
    right: 9px !important;
    bottom: auto !important;
    left: auto !important;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: rgba(255,255,255,.68) !important;
    font-size: 27px !important;
    line-height: 1 !important;
    opacity: 1 !important;
    pointer-events: none !important;
}
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box .icon > i,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box .icon > i,
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box:hover .icon > i {
    position: static !important;
    margin: 0 !important;
    transform: none !important;
    color: inherit !important;
    font-size: 27px !important;
    line-height: 1 !important;
}
body.theme-uai_fluent .uaicrm-dashboard-metrics a.text-white,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics a.text-white { color: #fff !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-primary { background: linear-gradient(135deg,#2563eb,#1d4ed8,#38bdf8) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-info { background: linear-gradient(135deg,#0891b2,#0e7490,#22d3ee) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-success { background: linear-gradient(135deg,#16a34a,#15803d,#4ade80) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-warning { background: linear-gradient(135deg,#d97706,#b45309,#fbbf24) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-danger { background: linear-gradient(135deg,#dc2626,#b91c1c,#fb7185) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-secondary { background: linear-gradient(135deg,#64748b,#475569,#94a3b8) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-dark { background: linear-gradient(135deg,#1e293b,#0f172a,#475569) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .bg-purple { background: linear-gradient(135deg,#7c3aed,#6d28d9,#c084fc) !important; }
body.theme-uai_fluent .uaicrm-dashboard-metrics .small-box .small-box-footer,
body.theme-uai_fluent.dark-mode .uaicrm-dashboard-metrics .small-box .small-box-footer {
    height: 20px !important;
    padding: 4px 7px !important;
    border: 0 !important;
    background: rgba(15,23,42,.18) !important;
    color: rgba(255,255,255,.9) !important;
    font-size: .6rem !important;
    line-height: 1 !important;
}

body.theme-uai_fluent .card-body.table-responsive { overflow-x: auto !important; }
body.theme-uai_fluent .card-body.table-responsive > table.table {
    width: max-content;
    min-width: 100%;
    margin-bottom: 0;
    table-layout: auto;
    font-size: .74rem;
}
body.theme-uai_fluent .card-body.table-responsive > table.table thead th {
    padding: 7px 8px !important;
    font-size: .66rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
body.theme-uai_fluent .card-body.table-responsive > table.table tbody td,
body.theme-uai_fluent .card-body.table-responsive > table.table tbody th {
    padding: 6px 8px !important;
    font-size: .74rem !important;
    line-height: 1.15 !important;
    vertical-align: middle !important;
}
body.theme-uai_fluent .card-body.table-responsive > table.table tbody td:not(.text-wrap) { white-space: nowrap; }
body.theme-uai_fluent .card-body.table-responsive > table.table td code,
body.theme-uai_fluent .card-body.table-responsive > table.table td pre {
    display: block;
    max-width: 440px;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere;
}
body.theme-uai_fluent .card-body.table-responsive > table.table .badge {
    padding: .28em .52em !important;
    font-size: .64rem !important;
    line-height: 1 !important;
}
body.theme-uai_fluent table.table td.text-right:last-child,
body.theme-uai_fluent table.table td.uaicrm-table-actions {
    white-space: nowrap !important;
}
body.theme-uai_fluent table.table td.text-right:last-child form,
body.theme-uai_fluent table.table td.uaicrm-table-actions form {
    display: inline-flex !important;
    margin: 0 0 0 3px !important;
    vertical-align: middle;
}
body.theme-uai_fluent table.table .btn-sm:has(> i:only-child),
body.theme-uai_fluent table.table .btn-xs:has(> i:only-child) {
    width: 30px;
    min-width: 30px;
    height: 28px;
    min-height: 28px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.theme-uai_fluent table.table .btn-sm:has(> i:only-child) i,
body.theme-uai_fluent table.table .btn-xs:has(> i:only-child) i {
    position: static !important;
    margin: 0 !important;
    font-size: .7rem !important;
    line-height: 1 !important;
}


/* Learning workspace standard v19 */
.uaierp-learning-header { gap: .75rem; }
.uaierp-learning-header h1 { margin-bottom: .15rem; }
.uaierp-learning-notice { padding: .65rem .85rem; }
.uaierp-learning-metrics .small-box { min-height: 58px; }
.uaierp-learning-schedule .uaierp-learning-status { width: 112px; }
.uaierp-learning-schedule .uaierp-learning-time { width: 105px; }
.uaierp-learning-insights { max-height: 560px; overflow-y: auto; padding: .75rem; }
.uaierp-learning-insight { border: 1px solid rgba(100,116,139,.2); border-radius: .55rem; padding: .7rem; margin-bottom: .65rem; background: rgba(255,255,255,.5); }
.uaierp-learning-insight:last-child { margin-bottom: 0; }
.uaierp-learning-details summary { color: #2563eb; cursor: pointer; font-size: .76rem; font-weight: 600; }
.uaierp-learning-change { background: rgba(148,163,184,.12); border-radius: .4rem; margin-top: .35rem; padding: .5rem; font-size: .75rem; }
.uaierp-learning-change > div + div { margin-top: .3rem; }
.uaierp-learning-change .badge { margin: .12rem; font-size: .68rem; }
.uaierp-learning-actions { display: flex; gap: .35rem; }
.uaierp-learning-alias-form .form-group { margin-bottom: .65rem; }
.dark-mode .uaierp-learning-insight { background: rgba(15,23,42,.42); border-color: rgba(148,163,184,.22); }
@media (max-width: 767.98px) {
  .uaierp-learning-header { align-items: flex-start !important; }
  .uaierp-learning-header form, .uaierp-learning-header .btn { width: 100%; }
}


/* Companies action wrapping exception v20 */
.uaicrm-companies-table td.uaicrm-table-actions {
  white-space: normal !important;
  min-width: 430px;
}
.uaicrm-companies-table .uaicrm-table-action-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  max-width: 360px;
}
.uaicrm-companies-table .uaicrm-table-action-list .btn,
.uaicrm-companies-table .uaicrm-table-action-list form {
  flex: 0 0 auto;
  margin: 0 !important;
}
body.theme-uai_fluent table.uaicrm-companies-table td.uaicrm-table-actions {
  white-space: normal !important;
}
body.theme-uai_fluent table.uaicrm-companies-table .uaicrm-table-action-list {
  flex-wrap: wrap !important;
  justify-content: flex-start;
}
body.theme-uai_fluent table.uaicrm-companies-table .uaicrm-table-action-list .btn-sm:has(> i:only-child) {
  width: auto !important;
  min-width: 0 !important;
  height: 28px;
  padding: .25rem .5rem !important;
  gap: .3rem;
}

@media (min-width: 768px) {
  body.theme-uai_fluent .card-body.table-responsive > table.table.uaicrm-companies-table {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
  }
  body.theme-uai_fluent table.uaicrm-companies-table th:last-child,
  body.theme-uai_fluent table.uaicrm-companies-table td.uaicrm-table-actions {
    width: 46%;
  }
}

/* uaiERP integrations: readable labeled cards on phones v21 */
@media (max-width: 767.98px) {
  body.theme-uai_fluent .card-body.table-responsive > table.uaierp-integrations-table {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: .82rem;
  }
  body.theme-uai_fluent table.uaierp-integrations-table thead {
    display: none;
  }
  body.theme-uai_fluent table.uaierp-integrations-table tbody,
  body.theme-uai_fluent table.uaierp-integrations-table tr,
  body.theme-uai_fluent .card-body.table-responsive > table.table.uaierp-integrations-table tbody td {
    display: block;
    width: 100%;
  }
  body.theme-uai_fluent table.uaierp-integrations-table tr {
    margin: 10px 12px 14px;
    width: calc(100% - 24px);
    padding: 12px 14px;
    overflow: hidden;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fff !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  }
  body.theme-uai_fluent .card-body.table-responsive > table.table.uaierp-integrations-table tbody td {
    position: relative;
    min-width: 0;
    min-height: 34px;
    padding: 7px 0 7px 112px !important;
    border: 0 !important;
    font-size: .82rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  body.theme-uai_fluent table.uaierp-integrations-table td::before {
    position: absolute;
    top: 8px;
    left: 0;
    width: 92px;
    color: #64748b;
    font-size: .65rem;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
  }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(1)::before { content: "ID"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(2)::before { content: "Cadastro"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(3)::before { content: "Canal"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(4)::before { content: "Provedor"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(5)::before { content: "Nome"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(6)::before { content: "Status"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(7)::before { content: "Primária"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(8)::before { content: "Conta"; }
  body.theme-uai_fluent table.uaierp-integrations-table td:nth-child(9)::before { content: "Configuração"; }
  body.theme-uai_fluent table.uaierp-integrations-table .badge {
    position: static !important;
    display: inline-flex;
    max-width: 100%;
    margin: 0 3px 3px 0 !important;
    transform: none !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
  body.theme-uai_fluent .card-body.table-responsive > table.table.uaierp-integrations-table tbody td.uaierp-integrations-actions-cell {
    width: 100%;
    min-width: 0;
    padding: 12px 0 0 !important;
  }
  body.theme-uai_fluent table.uaierp-integrations-table .uaierp-integrations-actions-cell::before {
    display: none;
  }
  body.theme-uai_fluent table.uaierp-integrations-table .uaierp-integrations-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  body.theme-uai_fluent table.uaierp-integrations-table .uaierp-integrations-actions > form,
  body.theme-uai_fluent table.uaierp-integrations-table .uaierp-integrations-actions > a {
    display: block !important;
    width: 100%;
    margin: 0 !important;
  }
  body.theme-uai_fluent table.uaierp-integrations-table .uaierp-integrations-actions .uaierp-integration-icon-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px;
    height: auto !important;
    gap: 6px;
    padding: 8px 10px !important;
    font-size: .76rem !important;
  }
  body.theme-uai_fluent table.uaierp-integrations-table .uaierp-integrations-actions .uaierp-integration-icon-button::after {
    content: attr(aria-label);
    font-weight: 700;
  }
  body.theme-uai_fluent.dark-mode table.uaierp-integrations-table tr {
    border-color: #334155;
    background: #111827 !important;
  }
  body.theme-uai_fluent.dark-mode table.uaierp-integrations-table td::before {
    color: #cbd5e1;
  }
}
