/* Shared ERP shell. Public asset is versioned by AdenuBrand. */
.fi-body:has(.erp-sidebar) { --topbar-height: 3.5rem; background: #f4f6fa; }
.erp-sidebar { display: flex !important; flex-direction: row !important; overflow: visible; border-right: 1px solid #dfe5ee; }
.erp-module-rail { width: 4.75rem; flex: 0 0 4.75rem; display: flex; flex-direction: column; background: #111c2e; color: #e5edfa; }
.erp-app-icon { height: 3.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.erp-app-icon img { width: 34px; height: 34px; }
.erp-module-list { padding: 8px 5px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; scrollbar-width: thin; }
.erp-module { min-height: 62px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: 8px; padding: 8px 2px; font-size: 10px; line-height: 1.2; cursor: pointer; color: #cbd5e1; }
.erp-module > svg { width: 23px; height: 23px; }
.erp-module:hover { background: #21324c; color: white; }
.erp-module.is-selected { background: var(--primary-600, #165dff); color: white; }
.erp-module:focus-visible, .erp-secondary-header button:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }
.erp-secondary { min-width: 0; flex: 1; display: flex; flex-direction: column; background: #f9fafc; }
.erp-secondary-header { min-height: 3.5rem; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid #e2e8f0; font-size: 18px; font-weight: 750; color: #14243b; }
.erp-secondary-header button { cursor: pointer; padding: 5px; color: #64748b; }
.erp-secondary-header svg { width: 17px; height: 17px; }
.erp-secondary-nav { padding: 16px 10px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.erp-secondary-nav h2 { padding: 0 8px 14px; font-size: 14px; font-weight: 700; color: #334155; }
.erp-secondary-nav .fi-sidebar-item-btn { min-height: 38px; border-radius: 6px; gap: 9px; }
.erp-secondary-nav .fi-sidebar-item-label { font-size: 13px; white-space: normal; }
.erp-secondary-nav .fi-sidebar-item-icon { width: 19px; height: 19px; }
.erp-secondary-nav .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { box-shadow: inset 3px 0 var(--primary-600, #165dff); }
.erp-sidebar-footer { border-top: 1px solid #e2e8f0; padding: 12px; }
.erp-panel-label { display: block; font-size: 10px; color: #64748b; margin-bottom: 8px; }
.erp-sidebar-footer .fi-user-menu { width: 100%; }
.erp-sidebar-footer .fi-user-menu-trigger { width: 100%; }
.erp-context { display: flex; align-items: center; gap: 8px; min-width: 0; }
.erp-context > svg { width: 22px; height: 22px; flex-shrink: 0; color: #334155; }
.erp-context-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.erp-plan { font-size: 10px; font-weight: 600; border-radius: 4px; padding: 3px 6px; background: #e8efff; color: #2456bc; white-space: nowrap; }
.erp-context .store-switch-button { width: 24px; height: 24px; box-shadow: none; background: transparent; }
.erp-breadcrumbs { min-width: 0; padding-left: 14px; margin-left: 14px; border-left: 1px solid #dce3ed; font-size: 12px; }
.erp-breadcrumbs .fi-breadcrumbs { overflow: hidden; }
.erp-breadcrumbs .fi-breadcrumbs-list { flex-wrap: nowrap; white-space: nowrap; }
.erp-breadcrumbs .fi-breadcrumbs-item-label { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.fi-body:has(.erp-sidebar) .fi-topbar-start > a, .fi-body:has(.erp-sidebar) .fi-topbar-start > .fi-logo { display: none; }
.fi-body:has(.erp-sidebar) .fi-topbar-start { flex: 1; min-width: 0; margin-right: 12px; }
.fi-body:has(.erp-sidebar) .fi-topbar-end { flex-shrink: 0; }
.fi-body:has(.erp-sidebar) .fi-section, .fi-body:has(.erp-sidebar) .fi-ta-ctn { border-radius: 9px; }
.fi-body:has(.erp-sidebar) .fi-header-heading { font-size: 1.65rem; letter-spacing: -.035em; }
.fi-body:has(.erp-sidebar) .fi-main { padding-inline: 24px; }
.fi-body:has(.erp-sidebar) .fi-page { row-gap: 20px; padding-block: 20px; }
.fi-body:has(.erp-sidebar) .fi-ta-table .fi-ta-image img { max-width: 40px; max-height: 40px; }
.fi-body:has(.erp-sidebar) .fi-btn { border-radius: 7px; }
.pos-support-banner { position: sticky; top: 0; z-index: 45; }
@media (min-width: 1024px) {
    .fi-body:has(.erp-sidebar) { --erp-nav-width: 4.75rem; }
    .fi-body:has(.erp-sidebar.fi-sidebar-open) { --erp-nav-width: 18rem; }
    .fi-body .erp-sidebar { position: fixed !important; top: var(--erp-support-height, 0px) !important; height: calc(100dvh - var(--erp-support-height, 0px)) !important; z-index: 35; width: var(--erp-nav-width) !important; transform: none !important; }
    .fi-body:has(.erp-sidebar) .fi-topbar { padding-left: calc(var(--erp-nav-width) + 12px); }
    .fi-body:has(.erp-sidebar) .fi-topbar-ctn { top: var(--erp-support-height, 0px); }
    .fi-body:has(.erp-sidebar) .fi-main-ctn { margin-left: var(--erp-nav-width); }
    .fi-body:has(.erp-sidebar.fi-sidebar-open) .fi-topbar-collapse-sidebar-btn-ctn { display: none; }
    .fi-body:has(.erp-breadcrumbs[data-ready]) .fi-main .fi-breadcrumbs { display: none; }
}
@media (max-width: 1279px) {

    .erp-context-name { max-width: 140px; }
    .erp-breadcrumbs { max-width: 210px; }
}
@media (max-width: 1023px) {
    .erp-sidebar { width: min(18rem, 90vw) !important; z-index: 40; }
    .fi-body:has(.erp-sidebar) .fi-topbar-start { display: flex; margin-left: 8px; }
    .erp-breadcrumbs { display: none; }
    .fi-body:has(.erp-sidebar) .fi-main { padding-inline: 12px; }
    .fi-body:has(.erp-sidebar) .fi-header-heading { font-size: 1.4rem; }
}
.dark .fi-body:has(.erp-sidebar) { background: #0c1422; }
.dark .erp-secondary { background: #152033; }
.dark .erp-sidebar, .dark .erp-secondary-header, .dark .erp-sidebar-footer, .dark .erp-breadcrumbs { border-color: #2b3a50; }
.dark .erp-secondary-header, .dark .erp-secondary-nav h2, .dark .erp-context > svg { color: #e2e8f0; }
.dark .erp-plan { background: #20385c; color: #bfdbfe; }
@media (prefers-reduced-motion: reduce) { .erp-sidebar { transition: none !important; } }

.erp-user-role { display: block; font-size: 11px; font-weight: 600; color: #475569; margin-bottom: 2px; }
.dark .erp-user-role { color: #cbd5e1; }

.erp-workspace-links { display: flex; align-items: stretch; gap: 8px; padding: 0 16px; border-bottom: 1px solid #e2e8f0; background: #fff; overflow-x: auto; min-height: 42px; }
.erp-workspace-links a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 12px; color: #475569; }
.erp-workspace-links svg { width: 18px; height: 18px; }
.erp-workspace-links a:hover, .erp-workspace-links a[aria-current] { color: var(--primary-600, #165dff); background: color-mix(in srgb, var(--primary-600, #165dff) 5%, transparent); }
.erp-workspace-links a[aria-current] { border-bottom-color: var(--primary-600, #165dff); font-weight: 600; }
.dark .erp-workspace-links { background: #111827; border-color: #2b3a50; }
.dark .erp-workspace-links a { color: #cbd5e1; }
@media (min-width: 1024px) { .erp-workspace-links { margin-left: var(--erp-nav-width); } }
@media (max-width: 1023px) {
    .fi-body:has(.erp-sidebar) .fi-topbar-collapse-sidebar-btn-ctn { display: none; }
    .fi-body:has(.erp-sidebar) .fi-global-search-ctn { width: 140px; }
    .fi-body:has(.erp-sidebar) .fi-global-search .fi-input-wrp { width: 140px; }
    .fi-body:has(.erp-sidebar) .fi-global-search .fi-input-wrp-suffix { display: none; }
    .fi-body:has(.erp-sidebar) .fi-topbar-end { gap: 8px; }
    .erp-context-name { max-width: 110px; }
}

.erp-membership-summary { padding: 16px; max-width: 280px; font-size: 13px; }
.erp-membership-summary p { margin-block: 8px; color: #64748b; }
.erp-membership-summary a { color: var(--primary-600, #165dff); font-weight: 600; }
@media (max-width: 1279px) { .erp-plan { max-width: 65px; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 1023px) { .erp-context { gap: 4px; } .erp-context-name { max-width: 85px; } .erp-plan { max-width: 50px; font-size: 9px; } }

/* Keep the switcher distinct from membership details. */
.erp-context .store-switch-button { width: auto; height: 32px; padding: 0 8px; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--gray-200, #e2e8f0); border-radius: 6px; font-size: 12px; white-space: nowrap; }
.erp-receivable-modal.fi-modal-window,
.erp-treasury-modal.fi-modal-window { height: min(680px, calc(100dvh - 2rem)); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; overflow: hidden; }
.erp-receivable-modal > .fi-modal-header, .erp-receivable-modal > .fi-modal-footer,
.erp-treasury-modal > .fi-modal-header, .erp-treasury-modal > .fi-modal-footer { flex-shrink: 0; }
.erp-receivable-modal > .fi-modal-content,
.erp-treasury-modal > .fi-modal-content { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
/* The panel already identifies the store; standalone POS keeps its branding. */
body:has(.erp-sidebar) .pos-app:not(.pos-kiosk) .pos-brand-logo,
body:has(.erp-sidebar) .pos-app:not(.pos-kiosk) .pos-store-title h1 { display: none; }
body:has(.erp-sidebar) .pos-app:not(.pos-kiosk) .pos-top { border-radius: 0; box-shadow: none; }
@media (max-width: 640px) { .erp-context .store-switch-caption { display: none; } }

.erp-store-identity { min-width: 0; padding-block: 10px; }
.erp-store-identity a { display: block; font-size: 12px; overflow-wrap: anywhere; line-height: 1.4; }
.erp-store-identity small { display: block; font-size: 11px; font-weight: 400; color: #64748b; line-height: 1.4; margin-top: 3px; }
.erp-store-initials { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-600, #165dff); color: white; font-weight: 700; text-transform: uppercase; }
.erp-app-icon img { object-fit: contain; border-radius: 6px; }
.erp-sidebar-switcher { padding: 8px 12px 0; }
.erp-sidebar-switcher .store-switch-button { width: 100%; height: 32px; display: flex; flex-direction: row; align-items: center; justify-content: center; line-height: 1; gap: 8px; padding: 6px 8px; font-size: 12px; border-radius: 6px; box-shadow: none; }
.erp-profile-trigger { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; font-size: 13px; }
.erp-profile-trigger > svg { width: 20px; height: 20px; margin-left: auto; }
.erp-profile-actions { display: flex; flex-direction: column; gap: 10px; }
.fi-body:has(.erp-sidebar) .fi-modal { z-index: 100; }
@media (min-width: 1024px) { .fi-body:has(.erp-sidebar.fi-sidebar-open) .erp-topbar-store-name { display: none; } }
.dark .erp-store-identity small { color: #94a3b8; }
.fi-body:has(.erp-sidebar) .fi-modal:not(.fi-modal-slide-over) > .fi-modal-window-ctn { align-items: center; }
.fi-body:has(.erp-sidebar) .fi-modal > .fi-modal-close-overlay { z-index: 90; }
.fi-body:has(.erp-sidebar) .fi-modal > .fi-modal-window-ctn { z-index: 100; }

.erp-sidebar-switcher .store-switch-button > svg { flex-shrink: 0; }

/* Los avisos flotantes deben quedar por encima de los diálogos del POS. */
/* Mantener todo el contenedor de notificaciones por encima de los modales. */
body > div:has(> .fi-no) { position: relative; z-index: 10000 !important; }
body .fi-no { position: fixed; z-index: 10000 !important; pointer-events: none; }
body .fi-no .fi-no-notification { pointer-events: auto; }
.erp-cash-row-open > td { background-color: #f0fdf4; }
.erp-cash-row-overdue > td { background-color: #fff1f2; }
.erp-cash-row-open > td:first-child { border-left: 3px solid #22c55e; }
.erp-cash-row-overdue > td:first-child { border-left: 3px solid #f43f5e; }
.dark .erp-cash-row-open > td { background-color: #142b22; }
.dark .erp-cash-row-overdue > td { background-color: #321c26; }
.erp-rate-header { display: grid; gap: 20px; width: 100%; min-width: 0; }
.erp-rate-notice { display: grid; gap: 8px; padding: 18px 22px; border: 1px solid color-mix(in srgb, var(--primary-600, #165dff) 35%, transparent); border-left: 4px solid var(--primary-600, #165dff); border-radius: 12px; background: color-mix(in srgb, var(--primary-600, #165dff) 6%, transparent); }
.erp-rate-notice-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--primary-600, #165dff); }
.erp-rate-notice-heading h2 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.erp-rate-notice-icon { width: 20px; height: 20px; flex-shrink: 0; }
.erp-rate-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 600; }
.erp-rate-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.erp-rate-status-warning { background: #fef3c7; color: #92400e; }
.erp-rate-value { font-size: clamp(20px, 2vw, 28px); font-weight: 700; line-height: 1.3; color: var(--primary-600, #165dff); overflow-wrap: anywhere; }
.erp-rate-caption { font-size: 13px; line-height: 1.5; color: #475569; }
.erp-rate-error { display: flex; align-items: start; gap: 8px; font-size: 13px; color: #92400e; }
.dark .erp-rate-notice-heading, .dark .erp-rate-value { color: var(--primary-300, #93c5fd); }
.dark .erp-rate-caption { color: #cbd5e1; }
.dark .erp-rate-error { color: #fcd34d; }

.erp-product-profitability { display: grid; gap: 18px; }
.erp-header-action,
.erp-product-header-action { width: 190px; height: 44px; min-height: 44px; justify-content: center; }
.erp-accounting-action { flex-shrink: 0; max-width: 100%; white-space: nowrap; }
.erp-product-profitability h3 { font-weight: 600; margin-bottom: 12px; }
.erp-product-cost-lines { padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 13px; }
.erp-product-cost-lines summary { cursor: pointer; }
.erp-product-cost-lines > div { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; }
.erp-product-profit-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; padding: 16px; background: #f8fafc; border-radius: 10px; }
.erp-product-profit-metrics dt { font-size: 13px; color: #475569; }
.erp-product-profit-metrics dd { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.erp-product-profit-notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin: 14px 0 10px; border-radius: 10px; font-size: 14px; }
.erp-product-profit-notice.is-success { background: #f0fdf4; color: #166534; }
.erp-product-profit-notice.is-warning { background: #fffbeb; color: #92400e; }
.erp-product-profit-notice.is-danger { background: #fff1f2; color: #9f1239; }
.dark .erp-product-profit-metrics { background: #1e293b; }
.dark .erp-product-profit-metrics dt { color: #cbd5e1; }
.dark .erp-product-cost-lines { border-color: #334155; }
.dark .erp-product-profit-notice.is-success { background: #142b22; color: #bbf7d0; }
.dark .erp-product-profit-notice.is-warning { background: #302817; color: #fde68a; }
.dark .erp-product-profit-notice.is-danger { background: #321c26; color: #fecdd3; }

/* Shared relation-manager tabs connected to a full-width theme-colored baseline. */
:is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding: 0;
    overflow-x: auto;
    border: 0;
    border-bottom: 2px solid var(--primary-600, #165dff);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
:is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs > .fi-tabs-item {
    display: flex;
    flex: 0 0 240px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 14px;
    border: 0;
    border-radius: 5px 5px 0 0;
    background: #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    transition: background-color 150ms, color 150ms;
}
:is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs > .fi-tabs-item:hover {
    background: color-mix(in srgb, var(--primary-600, #165dff) 16%, #f1f5f9);
    color: var(--primary-600, #165dff);
}
:is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs > .fi-tabs-item:is(.fi-active, [aria-selected="true"]) {
    background: var(--primary-600, #165dff);
    color: white;
    box-shadow: none;
}
:is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs > .fi-tabs-item:is(.fi-active, [aria-selected="true"]) > :is(.fi-tabs-item-label, .fi-icon) {
    color: white;
}
:is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs > .fi-tabs-item:focus-visible {
    outline: 2px solid var(--primary-400, #60a5fa);
    outline-offset: -4px;
}
.dark :is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs > .fi-tabs-item:not(.fi-active):not([aria-selected="true"]) {
    background: #334155;
    color: #e2e8f0;
}
.dark :is(.fi-sc-tabs[id$="relationManagerTabs"], .erp-plan-editor-tabs) > .fi-tabs > .fi-tabs-item:not(.fi-active):not([aria-selected="true"]):hover {
    background: #1e293b;
    color: var(--primary-300, #93c5fd);
}

.erp-reports { display: grid; gap: 1.5rem; min-width: 0; }
.erp-reports-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem; }
.erp-reports-summary dt, .erp-reports-caption { color: #64748b; font-size: .875rem; }
.erp-reports-summary dd { margin-top: .25rem; font-size: 1.25rem; font-weight: 600; color: #172b3a; }
.erp-reports-description { margin-bottom: 1.5rem; text-align: justify; text-align-last: start; line-height: 1.8; }
.erp-reports-table-wrap { overflow: auto; max-height: 24rem; }
.erp-reports table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
.erp-reports thead { position: sticky; top: 0; background: #f1f5f9; color: #334155; }
.erp-reports th, .erp-reports td { padding: .75rem; text-align: left; border-bottom: 1px solid #e2e8f0; }
.erp-reports th { font-weight: 600; }
.erp-reports-count { margin-top: .75rem; font-size: .75rem; }
.dark .erp-reports-summary dt, .dark .erp-reports-caption { color: #94a3b8; }
.dark .erp-reports-summary dd, .dark .erp-reports td { color: #f1f5f9; }
.dark .erp-reports thead { background: #1e293b; color: #e2e8f0; }
.dark .erp-reports th, .dark .erp-reports td { border-color: #334155; }

.erp-header-icon-action { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }

/* Preserve the motion mark proportions inside the navigation rail. */
.erp-app-icon img.pm-symbol{object-fit:contain;height:auto;max-height:40px;background:#fff;border-radius:6px;}

/* Compact explanations stay visible on touch screens and in both themes. */
.erp-pricing-field { height: 100%; align-content: start; grid-template-rows: auto 1fr; padding: 14px; border: 1px solid color-mix(in srgb, var(--primary-500, #3b82f6) 18%, #e2e8f0); border-radius: 12px; background: color-mix(in srgb, var(--primary-500, #3b82f6) 4%, white); }
.erp-pricing-field .fi-fo-field-label-col,
.erp-pricing-field .fi-fo-field-content-col { align-content: start; }
.erp-pricing-field .fi-sc-text { font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 768px) {
    .erp-pricing-field .fi-fo-field-label-col { min-height: 24px; }
    .erp-pricing-field .fi-fo-field-content-col > .fi-sc { min-height: 108px; }
}
.dark .erp-pricing-field { border-color: #334155; background: color-mix(in srgb, var(--primary-500, #3b82f6) 6%, #111827); }

.erp-collection-source { display: grid; gap: 18px; min-width: 0; }
.erp-collection-source h3 { font-size: 22px; font-weight: 700; }
.erp-collection-source h4 { font-size: 17px; font-weight: 600; }
.erp-collection-notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.erp-collection-table-scroll { overflow-x: auto; }
.erp-collection-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.erp-collection-table th, .erp-collection-table td { padding: 12px; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.erp-collection-table th { background: #f8fafc; font-weight: 600; white-space: nowrap; }
.erp-collection-table td:first-child { min-width: 180px; }
.dark .erp-collection-table th { background: #1e293b; }
.dark .erp-collection-table th, .dark .erp-collection-table td { border-color: #334155; }

/* Company filters stay beside the list, with counts scoped to search and filters. */
.crm-list-header { padding: 14px 16px 10px; }
.crm-inbox-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-inbox-filter { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 12px; line-height: 1.4; color: #475569; cursor: pointer; }
.crm-inbox-filter:hover, .crm-inbox-filter[aria-pressed="true"] { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.crm-inbox-filter:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.crm-inbox-filter:disabled { opacity: .65; cursor: wait; }
.crm-inbox-count { font-variant-numeric: tabular-nums; font-weight: 600; }
.crm-list-summary { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; font-size: 12px; color: #64748b; }
.crm-summary-hint { margin-inline-start: 4px; }
.dark .crm-inbox-filter { border-color: #334155; color: #cbd5e1; }
.dark .crm-inbox-filter:hover, .dark .crm-inbox-filter[aria-pressed="true"] { border-color: #60a5fa; background: #172554; color: #bfdbfe; }
.dark .crm-list-summary { color: #94a3b8; }
.fi-modal .erp-crm-modal.fi-modal-window { width: min(960px, calc(100vw - 2rem)); max-width: min(960px, calc(100vw - 2rem)); height: min(680px, calc(100dvh - 2rem)); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; overflow: hidden; }
.erp-crm-modal > .fi-modal-header, .erp-crm-modal > .fi-modal-footer { flex-shrink: 0; }
.erp-crm-modal > .fi-modal-content { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.tenant-integration-list{display:grid;gap:20px}.tenant-integration-card{padding:4px 0 20px;border-bottom:1px solid #e2e8f0}.tenant-integration-card:last-child{border-bottom:0;padding-bottom:0}
.tenant-integration-heading{display:flex;align-items:center;gap:16px;margin-bottom:22px}.tenant-integration-heading>img,.tenant-integration-icon{width:56px;height:56px;flex-shrink:0;border-radius:14px;object-fit:cover}.tenant-integration-icon{display:grid;place-items:center;background:#eef2ff;color:#6366f1}.tenant-integration-icon svg{width:27px;height:27px}.tenant-integration-title{flex:1;min-width:0}.tenant-integration-title h3{font-size:18px;font-weight:700}.tenant-integration-title p{font-size:13px;color:#64748b;margin-top:3px}
.tenant-integration-data{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.tenant-integration-data dt{font-size:12px;color:#64748b;margin-bottom:6px}.tenant-integration-data dd{font-size:14px;font-weight:600;overflow-wrap:anywhere}.tenant-integration-data dd small{display:block;font-size:12px;font-weight:400;color:#64748b;margin-top:4px}
.tenant-integration-help{display:flex;align-items:flex-start;gap:10px;margin-top:24px;padding-top:18px;border-top:1px solid #e2e8f0;color:#64748b;font-size:13px;line-height:1.6}.tenant-integration-help svg{width:20px;height:20px;flex-shrink:0;margin-top:1px}
.dark .tenant-integration-card,.dark .tenant-integration-help{border-color:#334155}.dark .tenant-integration-title p,.dark .tenant-integration-data dt,.dark .tenant-integration-data dd small,.dark .tenant-integration-help{color:#94a3b8}.dark .tenant-integration-icon{background:#28324c;color:#a5b4fc}
@media(max-width:700px){.tenant-integration-data{grid-template-columns:minmax(0,1fr);gap:16px}.tenant-integration-heading{flex-wrap:wrap}.tenant-integration-title{flex-basis:calc(100% - 72px)}}

.tenant-connection-status .fi-badge-label-ctn{align-self:center}

.erp-open-cash-modal.fi-modal-window { height:min(680px, calc(100dvh - 2rem)); max-height:calc(100dvh - 2rem); display:flex; flex-direction:column; overflow:hidden; }
.erp-open-cash-modal > .fi-modal-header, .erp-open-cash-modal > .fi-modal-footer { flex-shrink:0; }
.erp-open-cash-modal > .fi-modal-content { min-height:0; flex:1; overflow-y:auto; overscroll-behavior:contain; }

.erp-open-cash-modal .fi-section > .fi-section-content-ctn > .fi-section-content { padding:14px 16px; }
.erp-open-cash-modal .fi-modal-content > .fi-sc { gap:16px; }

/* Opening a cash session: compact identity, currency affixes and integration switch. */
.erp-cash-person { display:flex; align-items:center; gap:12px; text-align:left; }
.erp-cash-person strong, .erp-cash-person small { display:block; }
.erp-cash-person small { color:#64748b; font-size:12px; }
.erp-cash-avatar { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#eff6ff; color:#2563eb; font-weight:600; flex-shrink:0; }
.erp-open-cash-modal .fi-input-wrp-suffix-has-label { min-width:72px; width:72px; justify-content:center; align-self:stretch; border-inline-start:1px solid #cbd5e1; padding-inline:12px; background:rgba(148,163,184,.1); }
.erp-open-cash-modal .fi-sc-actions, .erp-open-cash-modal .fi-ac { width:100%; }
.erp-open-cash-modal .erp-cash-integration-switch { width:100%; min-height:48px; justify-content:flex-start; box-shadow:none; border:0; background:transparent; }
.erp-cash-switch-label { display:flex; align-items:center; gap:12px; }
.erp-cash-switch { display:inline-flex; align-items:center; width:40px; height:24px; padding:3px; border-radius:999px; background:#94a3b8; flex-shrink:0; }
.erp-cash-switch > span { width:18px; height:18px; background:white; border-radius:50%; transition:transform .15s; }
.erp-cash-integration-switch[aria-checked="true"] .erp-cash-switch { background:#2563eb; }
.erp-cash-integration-switch[aria-checked="true"] .erp-cash-switch > span { transform:translateX(16px); }

.erp-open-cash-modal .erp-cash-form-section { width:100%; border-top:1px solid #e2e8f0; padding-top:16px; }
.erp-open-cash-modal .erp-cash-form-section > .fi-section-header { padding:0 0 12px; }
.erp-open-cash-modal .erp-cash-form-section > .fi-section-content-ctn > .fi-section-content { padding:0; }
.dark .erp-open-cash-modal .erp-cash-form-section { border-color:#334155; }
.fi-body:has(.erp-sidebar) .fi-modal:has(.erp-cash-integration-confirmation) > .fi-modal-close-overlay { z-index:110; background:rgba(0,0,0,.65); }
.fi-body:has(.erp-sidebar) .fi-modal:has(.erp-cash-integration-confirmation) > .fi-modal-window-ctn { z-index:120; }

.erp-cash-integration-confirmation .fi-modal-description { text-align:justify; }

.erp-open-cash-modal .fi-modal-footer-actions,
.erp-cash-integration-confirmation .fi-modal-footer-actions {
    display:flex;
    flex-direction:row;
    justify-content:space-between;
    width:100%;
    gap:12px;
}
.erp-open-cash-modal .fi-modal-footer-actions > .fi-btn,
.erp-cash-integration-confirmation .fi-modal-footer-actions > .fi-btn {
    max-width:calc((100% - 12px) / 2);
}

#erp-board-rate { display: none; }
.erp-board-rate-local, #erp-board-rate { font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) {
    #erp-board-rate:not(:empty) { display: block; margin-inline-start: auto; padding-inline-start: .75rem; text-align: end; }
    .fi-header-subheading:has(.erp-board-rate-local) { display: none; }
}

/* Filtros de ventas: ventana fija, contenido desplazable y acciones parejas. */
.sales-filters-modal.fi-modal-window { height: min(800px, calc(100dvh - 2rem)); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; overflow: hidden; }
.sales-filters-modal > .fi-modal-header, .sales-filters-modal > .fi-modal-footer { flex-shrink: 0; }
.sales-filters-modal > .fi-modal-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sales-filters-modal .sales-filter-panel > .fi-section { background: #eaf0ff; border: 1px solid #c5d5fa; border-radius: 12px; box-shadow: none; }
.dark .sales-filters-modal .sales-filter-panel > .fi-section { background: #202f4b; border-color: #405a85; }
.sales-filters-modal .fi-input-wrp { min-height: 44px; }
.sales-filters-modal .fi-modal-footer-actions { display: flex; align-items: center; gap: 12px; width: 100%; }
.sales-filters-modal .fi-modal-footer-actions > .fi-btn { width: 160px; min-height: 44px; justify-content: center; }
.sales-filters-modal .sales-filter-reset { margin-right: auto; }
@media (max-width: 640px) { .sales-filters-modal .fi-modal-footer-actions { flex-wrap: wrap; } .sales-filters-modal .sales-filter-reset { width: 100%; } .sales-filters-modal .fi-modal-footer-actions > .fi-btn { flex: 1; width: 0; } }

.sales-filter-identity { display: flex; align-items: center; gap: 12px; width: 100%; padding: 5px 0; text-align: left; }
.sales-filter-identity > img, .sales-filter-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 8px; object-fit: contain; background: #edf2ff; }
.sales-filter-avatar { display: grid; place-items: center; color: #1858ff; font-weight: 700; }
.sales-filter-identity-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.sales-filter-identity-copy strong { font-size: 14px; line-height: 1.3; }
.sales-filter-identity-copy small { font-size: 12px; line-height: 1.4; opacity: .75; }
.sales-filter-card-field .fi-input-wrp { min-height: 66px; }
.dark .sales-filter-avatar, .dark .sales-filter-identity > img { background: #23314e; }

/* Equal-sized tabs in the plan editor. */
.fi-sc-tabs.erp-plan-editor-tabs > .fi-tabs {
    width: 100%;
    align-items: stretch;
}
.fi-sc-tabs.erp-plan-editor-tabs > .fi-tabs > .fi-tabs-item {
    flex: 1 0 120px;
    min-height: 44px;
    justify-content: center;
}

.erp-report-selection { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid #dbe3ef; border-radius: 12px; background: #fff; }
.erp-report-selection-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 48px; height: 48px; border-radius: 10px; background: #edf4ff; color: var(--primary-600, #165dff); }
.erp-report-selection-icon svg { width: 26px; height: 26px; }
.erp-report-selection-copy { flex: 1; min-width: 0; }
.erp-report-selection-copy h2 { font-size: 20px; font-weight: 700; }
.erp-report-selection-copy p, .erp-report-option small { color: #64748b; font-size: 13px; line-height: 1.5; }
.erp-report-selection-copy p { margin-top: 8px; text-align: justify; text-align-last: start; line-height: 1.8; }
.erp-report-notes { margin-top: 16px; }
.erp-report-notes summary { cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.6; padding-block: 4px; }
.erp-reports .erp-report-notes > .erp-rate-caption { margin-top: 12px; text-align: justify; text-align-last: start; line-height: 1.8; }
.erp-reports .erp-rate-notice > .erp-rate-caption { margin-top: 12px; }
.erp-report-picker { display: grid; gap: 22px; }
.erp-report-picker h3 { font-weight: 700; margin-bottom: 10px; }
.erp-report-picker-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.erp-report-option { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 16px; border: 1px solid #dbe3ef; border-radius: 10px; background: #fff; }
.erp-report-option > svg { width: 22px; height: 22px; flex: 0 0 22px; color: var(--primary-600, #165dff); }
.erp-report-option > span { flex: 1; min-width: 0; }
.erp-report-option strong, .erp-report-option small { display: block; }
.erp-report-option small { margin-top: 4px; }
.erp-report-option:hover, .erp-report-option.is-selected { border-color: var(--primary-600, #165dff); background: #edf4ff; }
.erp-report-option:focus-visible { outline: 2px solid var(--primary-600, #165dff); outline-offset: 2px; }
.erp-report-option:disabled { opacity: .6; }
.dark .erp-report-selection, .dark .erp-report-option { background: #111827; border-color: #334155; }
.dark .erp-report-selection-icon, .dark .erp-report-option:hover, .dark .erp-report-option.is-selected { background: #1e293b; color: #93c5fd; }
.dark .erp-report-selection-copy p, .dark .erp-report-option small { color: #94a3b8; }
@media (max-width: 640px) {
    .erp-report-selection { flex-wrap: wrap; }
    .erp-report-selection > .fi-btn { width: 100%; }
    .erp-report-picker-grid { grid-template-columns: minmax(0, 1fr); }
}
