/* Cell Master: componentes compartidos, sin dependencias ni fuentes remotas. */
html body.cm-brand-palette{--cm-accent:#dc2626!important;--cm-bg:#f4f6fa;--cm-surface:#fff;--cm-text:#172033;--cm-muted:#64748b;--cm-line:#d7deea;--cm-dark-bg:#0f172a;--cm-dark-panel:#1e293b;--cm-dark-panel2:#1e293b;--cm-dark-text:#f1f5f9;--cm-dark-line:#475569}
html[data-cm-mode=oscuro] body.cm-brand-palette{--cm-bg:#0f172a;--cm-surface:#1e293b;--cm-text:#f1f5f9;--cm-muted:#cbd5e1;--cm-line:#475569}
html body.cm-brand-palette.cm-reference-ui .app .main,html body.cm-brand-palette.cm-reference-ui .app .main .content{background:var(--cm-bg)!important;color:var(--cm-text)!important}
html body.cm-brand-palette.cm-reference-ui .app .main :is(.card,.stat-card,.cm-module-directory,.cm-ref-module,.rep-panel,.rep-card,.gw-panel,.fin-panel,.table-wrap,.page-title,.form-section,.list-card){background:var(--cm-surface)!important;color:var(--cm-text)!important;border-color:var(--cm-line)!important;box-shadow:0 3px 14px #17203307!important}
html body.cm-brand-palette.cm-reference-ui .app .main :is(.hero,.cp-hero,.gw-hero,.desk-hero,.wa-head,.rc-heading,.fin-head,.rep-head,#invDesignHero){background:var(--cm-surface)!important;color:var(--cm-text)!important;border:1px solid var(--cm-line)!important;border-left:3px solid #dc2626!important;box-shadow:none!important}
html body.cm-brand-palette.cm-reference-ui .app .main :is(.page-title,.hero,.cp-hero,.gw-hero,.desk-hero,.wa-head,.rc-heading,.fin-head,.rep-head,#invDesignHero) :is(h1,h2,h3){color:var(--cm-text)!important}
html body.cm-brand-palette.cm-reference-ui .app .main :is(.page-title,.hero,.cp-hero,.gw-hero,.desk-hero,.wa-head,.rc-heading,.fin-head,.rep-head,#invDesignHero)>p{color:var(--cm-muted)!important}
html body.cm-brand-palette.cm-reference-ui .app .main .stat-card :is(h3,.value,.stat-value,.number){color:var(--cm-text)!important}
html body.cm-brand-palette.cm-reference-ui .app .main .stat-card :is(p,small){color:var(--cm-muted)!important}
html body.cm-brand-palette.cm-reference-ui .app .main .cm-ref-module>svg{color:#dc2626!important;background:#fff1f2!important}
html[data-cm-mode=oscuro] body.cm-brand-palette.cm-reference-ui .app .main .cm-ref-module>svg{color:#fca5a5!important;background:#45252f!important}
html body.cm-brand-palette.cm-reference-ui .app .main .cm-ref-module b{color:var(--cm-text)!important}
html body.cm-brand-palette #sidebar{background:#202124!important;border-color:#414550!important;color:#fff!important}
html body.cm-brand-palette #sidebar .sidebar-menu a.active{background:#dc2626!important;color:#fff!important;border-color:#dc2626!important}
html body.cm-brand-palette .cm-mobile-nav{background:var(--cm-surface)!important;border-color:var(--cm-line)!important}
html body.cm-brand-palette .cm-mobile-nav a{color:var(--cm-muted)!important;background:transparent!important}
html body.cm-brand-palette .cm-mobile-nav a.active{color:#dc2626!important;background:#fff1f2!important}
html body.cm-brand-palette .cm-mobile-nav a[aria-current=page]{color:#dc2626!important;background:#fff1f2!important}
html body.cm-brand-palette.cm-reference-home .app .main .stat-card .icon{background:#fff1f2!important;color:#dc2626!important}
html body.cm-brand-palette.cm-reference-home .app .main .stat-card :is(.icon.green,.icon.red,.icon.yellow){background:#f0fdf4!important;color:#15803d!important}
html body.cm-brand-palette.cm-reference-home .app .main .stat-card .icon svg{color:inherit!important;stroke:currentColor!important}
html[data-cm-mode=oscuro] body.cm-brand-palette.cm-reference-home .app .main .stat-card .icon{background:#45252f!important;color:#fca5a5!important}
html[data-cm-mode=oscuro] body.cm-brand-palette.cm-reference-home .app .main .stat-card :is(.icon.green,.icon.red,.icon.yellow){background:#193b2b!important;color:#86efac!important}
html[data-cm-mode=oscuro] body.cm-brand-palette .cm-mobile-nav a[aria-current=page]{color:#fca5a5!important;background:#45252f!important}
html[data-cm-mode=oscuro] body.cm-brand-palette .cm-mobile-nav a.active{color:#fca5a5!important;background:#45252f!important}
html body.cm-header-unified .main .topbar{position:sticky!important;top:0!important;z-index:1250!important;background:#202124!important;color:#fff!important;border:0!important;border-radius:0!important;padding:10px 20px!important;min-height:66px!important;box-shadow:0 1px 5px #0002!important;flex-wrap:nowrap!important}
html body.cm-header-unified .topbar:before,html body.cm-header-unified .topbar:after{display:none!important}
html body.cm-header-unified .topbar-left{display:flex!important;align-items:center!important;gap:12px!important;flex:1!important;min-width:0!important}
html body.cm-header-unified .topbar .cm-system-identity{display:flex!important;align-items:center!important;gap:8px!important;text-decoration:none!important;color:#fff!important;flex:none!important}
html body.cm-header-unified .topbar .cm-system-identity img{width:38px!important;height:38px!important;object-fit:contain!important;border-radius:0!important;background:transparent!important}
html body.cm-header-unified .topbar .cm-system-identity strong{color:#fff!important;font-size:21px!important;font-weight:700!important;letter-spacing:-.025em!important;white-space:nowrap!important}
html body.cm-header-unified .topbar .cm-system-identity strong span{color:#ef333a!important}
html body.cm-header-unified .topbar #menuBtn{width:44px!important;height:44px!important;min-width:44px!important;padding:10px!important;border:1px solid #ffffff26!important;border-radius:8px!important;background:transparent!important;color:#fff!important;box-shadow:none!important}
html body.cm-header-unified .topbar #menuBtn svg,html body.cm-header-unified .topbar .topbar-icon svg{width:24px;height:24px}
html body.cm-header-unified .topbar .cm-module-find[hidden],html body.cm-header-unified .cm-mobile-brand{display:none!important}
html body.cm-header-unified .topbar .topbar-search{margin-left:auto!important;max-width:480px!important;background:#34373e!important;border:1px solid #4c5059!important;border-radius:8px!important;flex:1!important}
html body.cm-header-unified .topbar .topbar-search input{background:transparent!important;color:#fff!important;border:0!important;box-shadow:none!important;min-width:0!important}
html body.cm-header-unified .topbar .topbar-search input::placeholder{color:#d1d5db!important}
html body.cm-header-unified #sidebar .cm-header-search-in-menu{display:flex!important;gap:8px;align-items:center;margin:8px 0 14px;padding:8px;border:1px solid #536071;border-radius:8px;background:#fff!important;color:#172033!important;max-width:100%;box-sizing:border-box}
html body.cm-header-unified #sidebar .cm-header-search-in-menu input{width:100%!important;min-width:0!important;background:#fff!important;color:#172033!important;border:0!important;font-size:16px!important}
html body.cm-header-unified .topbar .topbar-right{display:flex!important;align-items:center!important;gap:10px!important;flex:none!important}
html body.cm-header-unified .topbar .topbar-icon{background:transparent!important;color:#fff!important;box-shadow:none!important;border:0!important;width:32px!important;min-width:32px!important}
html body.cm-header-unified .topbar .user-box{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
html body.cm-header-unified .topbar .user-info b{color:#fff!important}
html body.cm-header-unified .topbar .user-info small{color:#d1d5db!important;background:transparent!important}
html body.cm-header-unified .topbar .user-avatar{background:#484d56!important;color:#fff!important;border:0!important;box-shadow:none!important;border-radius:50%!important}
html body.cm-header-unified .main .cm-header-business{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:58px!important;padding:9px 22px!important;gap:12px!important;border-bottom:1px solid var(--cm-line)!important}
html body.cm-header-unified .cm-header-business .cm-business-avatar{width:34px!important;height:34px!important;flex-basis:34px!important;border-radius:8px!important}
html body.cm-header-unified .cm-header-business .cm-business-name{font-size:15px!important;max-width:calc(100vw - 140px)!important}
html body.cm-header-unified .cm-header-business .cm-business-identity small{font-size:9px!important}
@media(max-width:700px){html body.cm-header-unified .main .topbar{padding:8px 12px!important;gap:8px!important;min-height:64px!important}html body.cm-header-unified .topbar-left{gap:8px!important}html body.cm-header-unified .topbar .cm-system-identity strong{font-size:17px!important}html body.cm-header-unified .topbar .cm-system-identity img{width:30px!important;height:30px!important}html body.cm-header-unified .topbar .topbar-search{display:none!important}html body.cm-header-unified .topbar .user-info,html body.cm-header-unified .topbar .topbar-icon:not(a){display:none!important}html body.cm-header-unified .topbar .user-box{min-width:36px!important;width:36px!important;height:36px!important}html body.cm-header-unified .topbar .user-avatar{width:34px!important;height:34px!important}html body.cm-header-unified .topbar-right{gap:6px!important}html body.cm-header-unified .main .cm-header-business{padding:8px 14px!important;min-height:52px!important}}
html body.cm-overlay-shell.cm-clean-general .app{display:block!important;grid-template-columns:minmax(0,1fr)!important}
html body.cm-overlay-shell.cm-clean-general .app .main{margin-left:0!important;width:100%!important;max-width:none!important;transform:none!important}
html body.cm-overlay-shell #sidebar{position:fixed!important;left:0!important;top:var(--cm-drawer-top,140px)!important;bottom:0!important;height:auto!important;width:min(280px,88vw)!important;z-index:1200!important;transform:translateX(-105%)!important;visibility:hidden!important;transition:transform .18s ease,visibility .18s!important;overflow-y:auto!important}
html body.cm-overlay-shell.cm-drawer-open #sidebar{transform:translateX(0)!important;visibility:visible!important}
html body.cm-overlay-shell .cm-sidebar-backdrop{position:fixed!important;inset:var(--cm-drawer-top,140px) 0 0!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#0f172a66!important;z-index:1199!important;display:none!important}
html body.cm-overlay-shell.cm-drawer-open .cm-sidebar-backdrop{display:block!important}
html body.cm-overlay-shell.cm-menu-open{overflow:visible!important}
@media print{html body.cm-overlay-shell #sidebar,html body.cm-overlay-shell .cm-sidebar-backdrop{display:none!important}}
:root{--cm-bg:#F4F6FA;--cm-surface:#fff;--cm-text:#172033;--cm-muted:#526077;--cm-line:#d7deea;--cm-primary:#DC2626;--cm-success:#16A34A;--cm-warning:#D97706;--cm-danger:#DC2626;--cm-radius:12px;--cm-shadow:0 4px 16px #17203309;--cm-user-primary:#DC2626;--cm-personal-ink:#fff}
html body.landing-body .site-nav{background:#202124!important;color:#fff!important;border-color:#343840!important}
html body.landing-body .site-nav :is(.brand,.cm-public-nav a){color:#fff!important}
html body.landing-body .site-nav .nav-login,html body.landing-body .primary{background:#dc2626!important;color:#fff!important;border-color:#dc2626!important}
html[data-cm-mode=oscuro]{--cm-bg:#0F172A;--cm-surface:#1E293B;--cm-text:#f1f5f9;--cm-muted:#c0cbdc;--cm-line:#475569;color-scheme:dark}
html body{font-family:Inter,'Segoe UI Variable','Segoe UI',system-ui,sans-serif!important;background:var(--cm-bg)!important;color:var(--cm-text)!important;line-height:1.5}
html body :is(button,input,select,textarea){font:inherit}
html body :is(.content,.landing-body){background:var(--cm-bg)!important;color:var(--cm-text)!important}
html body :is(.cm-card,.cm-settings-grid>.card,.cm-module-directory,.cm-ref-module,.card,.stat-card){background:var(--cm-surface)!important;color:var(--cm-text)!important;border:1px solid var(--cm-line)!important;border-radius:var(--cm-radius)!important;box-shadow:var(--cm-shadow)!important}
html body :is(.cm-btn,.btn,.primary,.nav-login,.cm-module-find){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid transparent;border-radius:10px;text-decoration:none;font-weight:650;cursor:pointer;box-sizing:border-box}
html body :is(.cm-btn-primary,.btn-primary,.primary,.nav-login,.cm-module-find){background:var(--cm-user-primary,var(--cm-primary))!important;color:#fff!important;border-color:var(--cm-user-primary,var(--cm-primary))!important}
html body :is(.cm-btn-secondary,.secondary,.btn-white){background:var(--cm-surface)!important;color:var(--cm-text)!important;border:1px solid var(--cm-line)!important}
html body .cm-btn-success{background:#15803d!important;color:#fff!important;border-color:#15803d!important}
html body .cm-btn-danger{background:var(--cm-danger)!important;color:#fff!important;border-color:var(--cm-danger)!important}
html body :is(button,a,input,textarea,select,summary):focus-visible{outline:3px solid #2563EB!important;outline-offset:3px}
html body :is(button,input,select,textarea):disabled{opacity:.6;cursor:not-allowed}
.cm-field{display:grid;gap:6px}.cm-field>label{font-size:14px;font-weight:650}.cm-field>small{font-size:13px;color:var(--cm-muted)}
html body :is(.cm-field input,.cm-field select,.cm-field textarea){width:100%;min-height:44px;padding:10px 12px;background:var(--cm-surface);color:var(--cm-text);border:1px solid var(--cm-line);border-radius:9px;box-sizing:border-box}
.cm-field [aria-invalid=true]{border-color:var(--cm-danger)}.cm-field .cm-error{color:var(--cm-danger)}
.cm-card{padding:20px}.cm-card h2{margin:0 0 12px;font-size:21px;letter-spacing:-.025em}.cm-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.cm-status{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border:1px solid currentColor;border-radius:7px;font-size:13px;font-weight:650}.cm-status-pending{color:#92400e;background:#fffbeb}.cm-status-success{color:#166534;background:#f0fdf4}.cm-status-error{color:#991b1b;background:#fef2f2}
.cm-table-wrap{max-width:100%;overflow:auto}.cm-table{width:100%;border-collapse:collapse;text-align:left}.cm-table th,.cm-table td{padding:12px;border-bottom:1px solid var(--cm-line)}.cm-table th{font-size:13px;color:var(--cm-muted)}
.cm-tabs{display:flex;flex-wrap:wrap;gap:8px}.cm-tabs [aria-selected=true]{border-bottom:3px solid var(--cm-primary)}
.cm-notice{padding:12px 16px;border:1px solid var(--cm-line);border-left:4px solid var(--cm-primary);border-radius:9px;background:var(--cm-surface)}
.cm-dialog{padding:22px;width:min(480px,calc(100vw - 32px));background:var(--cm-surface);color:var(--cm-text);border:1px solid var(--cm-line);border-radius:14px}.cm-dialog::backdrop{background:#0f172a77}
html body .cm-workspace-brandbar{background:var(--cm-surface)!important;color:var(--cm-text)!important;border-bottom-color:var(--cm-line)!important;box-shadow:none!important}
html body .cm-workspace-brandbar :is(.cm-business-name,.cm-system-identity,.cm-system-identity strong){color:var(--cm-text)!important}
html body .cm-workspace-brandbar small{color:var(--cm-muted)!important}
html body .cm-workspace-brandbar .cm-brand-settings{background:var(--cm-surface)!important;color:var(--cm-text)!important;border-color:var(--cm-line)!important}
html body .cm-ref-module svg{color:var(--cm-user-primary,#2563EB)!important;background:#eff6ff!important}
html[data-cm-mode=oscuro] body .cm-ref-module svg{background:#263b59!important;color:#93c5fd!important}
@media(max-width:700px){.cm-grid{grid-template-columns:1fr}.cm-card{padding:16px}html body .main{min-width:0}.cm-dialog{box-sizing:border-box}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}
.cm-nav-area{border-bottom:1px solid #364152;margin-bottom:6px}.cm-nav-area>summary{padding:12px;min-height:44px;box-sizing:border-box;cursor:pointer;font-size:14px;font-weight:700;color:#e2e8f0}.cm-nav-area a{min-height:44px;box-sizing:border-box}.cm-nav-area .cm-settings-menu{margin:8px}.cm-nav-area[hidden]{display:none}
/* Shared brand rhythm; semantic payments/warnings remain distinct. */
html body.cm-brand-palette{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;--cm-brand-charcoal:#202124;--cm-brand-red:#dc2626;--cm-brand-soft:#fff1f2}
html body.cm-brand-palette :is(.rep-panel,.gw-panel,.fin-panel,.list-card,.table-wrap,.form-section){border-radius:10px!important;border-color:var(--cm-line)!important}
html body.cm-brand-palette .topbar :is(.cm-system-identity,.cm-system-identity strong){color:#fff!important}
html body.cm-brand-palette .topbar .cm-system-identity strong span{color:#ef3340!important}
html body.cm-brand-palette :is(input,select,textarea):focus-visible{outline:3px solid #dc262635!important;outline-offset:2px;border-color:#dc2626!important}

/* Unified blue/violet palette approved 2026-10-16. */
:root,html body,html body.cm-brand-palette{--cm-primary:#2563eb!important;--cm-accent:#2563eb!important;--cm-brand-soft:#eef2ff!important;--cm-bg:#edf3fa;--cm-text:#17243d;--cm-line:#d9e2ee;--cm-muted:#607089}
html:not([data-cm-mode=oscuro]) body.cm-brand-palette{--cm-bg:#edf3fa!important;--cm-surface:#fff!important;--cm-text:#17243d!important;--cm-muted:#607089!important;--cm-line:#d9e2ee!important}
html body.cm-brand-palette.cm-reference-ui .app .main :is(.hero,.cp-hero,.gw-hero,.desk-hero,.wa-head,.rc-heading,.fin-head,.rep-head,#invDesignHero){border-left-color:#6366f1!important}
html body.cm-brand-palette.cm-reference-ui .app .main .cm-ref-module>svg,html body.cm-brand-palette.cm-reference-home .app .main .stat-card .icon{color:#2563eb!important;background:#eef2ff!important}
html body.cm-brand-palette #sidebar .sidebar-menu a.active{background:linear-gradient(115deg,var(--cm-user-primary),var(--cm-user-secondary))!important;border-color:#6366f1!important;color:#fff!important}
html body.cm-brand-palette .cm-mobile-nav :is(a.active,a[aria-current=page]){color:#4f46e5!important;background:#eef2ff!important}
html body.cm-brand-palette :is(.btn-primary,.cm-btn-primary,.primary,.nav-login,[data-cm-brand-action=primary]),html body.landing-body :is(.primary,.nav-login){background:linear-gradient(115deg,var(--cm-user-primary),var(--cm-user-secondary))!important;border-color:#6366f1!important;color:#fff!important}
html body.cm-brand-palette :is(.btn-primary,.cm-btn-primary,.primary,[data-cm-brand-action=primary]):hover{filter:brightness(1.08)}
html body.cm-brand-palette :is(input,select,textarea):focus-visible{outline:3px solid #2563eb40!important;outline-offset:2px;border-color:#6366f1!important}
html[data-cm-mode=oscuro] body,html[data-cm-mode=oscuro] body.cm-brand-palette{--cm-bg:#101b30!important;--cm-surface:#19283f!important;--cm-text:#f1f5f9!important;--cm-muted:#c5d1e2!important;--cm-line:#43546f!important}
html[data-cm-mode=oscuro] body.cm-brand-palette.cm-reference-ui .app .main .cm-ref-module>svg,html[data-cm-mode=oscuro] body.cm-brand-palette.cm-reference-home .app .main .stat-card .icon{color:#a5b4fc!important;background:#25385b!important}
html[data-cm-mode=oscuro] body.cm-brand-palette .cm-mobile-nav :is(a.active,a[aria-current=page]){color:#c4b5fd!important;background:#25385b!important}
/* Preserve black header and existing red wordmark, green payments, red errors. */
