/* LEGASIST · Identidad jurídica uniforme · 12/10/2026
   Exclusivamente presentación. Última capa de cascada para páginas públicas,
   profesionales y pagos. No afecta estados, validaciones ni interacciones. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');
:root,html[data-theme="light"]{
  color-scheme:light;
  --lg-blue-950:#082f70;--lg-blue-900:#093d86;--lg-blue-800:#1052a3;
  --lg-blue-700:#1867c0;--lg-blue-600:#2778d2;--lg-blue-500:#3e91e4;
  --lg-blue-400:#77b5f3;--lg-blue-300:#b9d7f4;--lg-blue-200:#dcecff;
  --lg-blue-100:#eef6ff;--lg-blue-050:#fff;--lg-white:#fff;
  --lg-ink:#111827;--lg-text:#1f2937;--lg-muted:#43536a;
  --lg-border:#d8e3ef;--lg-border-strong:#b7cbe1;
  --bg:#fff!important;--bg-2:#fff!important;--surface:#fff!important;
  --surface-soft:#f7fbff!important;--surface-blue:#edf5ff!important;
  --primary:#1156a8!important;--primary-2:#196bc2!important;--primary-3:#4b9aeb!important;
  --navy:#0a428c!important;--text:#171e29!important;--muted:#45566d!important;
  --border:#d8e3ef!important;--border-strong:#b7cbe1!important;
  --dash-bg:#fff!important;--dash-surface:#fff!important;--dash-surface-2:#f7fbff!important;
  --dash-text:#171e29!important;--dash-muted:#44566b!important;
  --dash-line:#d8e3ef!important;--dash-primary:#1156a8!important;
  --dash-sidebar:#083b7c!important;--dash-sidebar-2:#1054a4!important;
  --law-panel:#fff!important;--law-panel-soft:#f7fbff!important;
  --law-ink:#111827!important;--law-muted:#44566b!important;
  --op-bg:#fff;--op-card:#fff;--op-text:#171e29;--op-muted:#43536a;
  --op-border:#d8e3ef;--op-primary:#1156a8;--op-primary-strong:#0b4a95;
  --op-primary-soft:#edf5ff;
}
html[data-theme="royal-dark"]{
  color-scheme:dark!important;
  --lg-blue-950:#fff;--lg-blue-900:#f5f9ff;--lg-blue-800:#dceeff;
  --lg-blue-700:#aed9ff;--lg-blue-600:#72bbfa;--lg-blue-500:#66b9ff;
  --lg-blue-400:#4c89c4;--lg-blue-300:#335e8b;--lg-blue-200:#213d63;
  --lg-blue-100:#163354;--lg-blue-050:#081b35;--lg-white:#10294b;
  --lg-ink:#fff;--lg-text:#f5f9ff;--lg-muted:#d4e6f7;
  --lg-border:#315577;--lg-border-strong:#41688d;
  --bg:#081b35!important;--bg-2:#081b35!important;
  --surface:#10294b!important;--surface-soft:#123053!important;
  --surface-blue:#17385d!important;
  --primary:#86caff!important;--primary-2:#a7d9ff!important;--primary-3:#73c4ff!important;
  --navy:#fff!important;--text:#f7fbff!important;--muted:#d5e5f7!important;
  --border:#315577!important;--border-strong:#41688d!important;
  --dash-bg:#081b35!important;--dash-surface:#10294b!important;
  --dash-surface-2:#123053!important;--dash-text:#fff!important;
  --dash-muted:#d3e4f5!important;--dash-line:#315577!important;
  --dash-primary:#a7d9ff!important;--dash-primary-2:#c8e7ff!important;
  --dash-sidebar:#06172d!important;--dash-sidebar-2:#0b2b52!important;
  --law-panel:#10294b!important;--law-panel-soft:#123053!important;
  --law-ink:#fff!important;--law-muted:#d5e5f7!important;
  --op-bg:#081b35;--op-card:#10294b;--op-text:#fff;
  --op-muted:#d6e6f6;--op-border:#315577;--op-primary:#87cafd;
  --op-primary-strong:#afdfff;--op-primary-soft:#163354;
}
/* Identidad tipográfica única */
html,body,body *,body *::before,body *::after,
button,input,select,textarea,option,optgroup{
  font-family:'Montserrat',Arial,sans-serif!important;
}
code,pre,kbd,samp,code *,pre *{font-family:Consolas,'Courier New',monospace!important}
:root{font-synthesis:none}
html,body{max-width:100%;overflow-x:clip}
body,body.dashboard-body,body.flow-lawyer,body.lawyer-register-premium,
body.dash-page,body.directory-page,body.registration-page{
  background:#fff!important;color:#171e29!important;
}
html[data-theme="royal-dark"],html[data-theme="royal-dark"] body,
html[data-theme="royal-dark"] body.dashboard-body,
html[data-theme="royal-dark"] body.flow-lawyer,
html[data-theme="royal-dark"] body.lawyer-register-premium,
html[data-theme="royal-dark"] body.dash-page,
html[data-theme="royal-dark"] body.directory-page,
html[data-theme="royal-dark"] body.registration-page{
  background:#081b35!important;color:#f7fbff!important;
}
html[data-theme="light"] :is(h1,h2,h3,h4,h5,h6),
html:not([data-theme]) :is(h1,h2,h3,h4,h5,h6){
  color:#0b4d9c!important;font-weight:800!important;
}
html[data-theme="royal-dark"] :is(h1,h2,h3,h4,h5,h6){
  color:#fff!important;font-weight:800!important;
}
html[data-theme="light"] :is(p,li,small,dt,dd,summary,blockquote,td),
html:not([data-theme]) :is(p,li,small,dt,dd,summary,blockquote,td){color:#273344}
html[data-theme="royal-dark"] :is(p,li,small,dt,dd,summary,blockquote,td){color:#f1f7ff!important}
html[data-theme="royal-dark"] :is(.muted,.text-muted,.subtitle,.lead,.hint,.helper,.field-help,.meta){color:#d6e6f6!important}
/* Cabeceras: azul institucional en claro; azul marino en oscuro */
html[data-theme="light"] :is(.topbar,.nav,.law-topbar,.dash-topbar),
html:not([data-theme]) :is(.topbar,.nav,.law-topbar,.dash-topbar){
  background:#0d4b94!important;border-color:#2a68ac!important;
  color:#fff!important;box-shadow:0 8px 24px rgba(8,52,105,.12)!important;
}
html[data-theme="light"] :is(.topbar,.nav,.law-topbar,.dash-topbar) :is(h1,h2,h3,p,small,span,b,strong),
html:not([data-theme]) :is(.topbar,.nav,.law-topbar,.dash-topbar) :is(h1,h2,h3,p,small,span,b,strong){color:#fff!important}
html[data-theme="light"] :is(.topbar,.nav,.law-topbar,.dash-topbar) :is(.nav-links a,.law-nav a:not(.law-btn),.nav a:not(.button):not(.nav-logo),.law-brand,.top-title p),
html:not([data-theme]) :is(.topbar,.nav,.law-topbar,.dash-topbar) :is(.nav-links a,.law-nav a:not(.law-btn),.nav a:not(.button):not(.nav-logo),.law-brand,.top-title p){color:#fff!important}
html[data-theme="light"] :is(.topbar,.law-topbar,.nav,.dash-topbar) :is(.brand-logo-img,.law-brand__logo){filter:brightness(0) invert(1)}
html[data-theme="royal-dark"] :is(.topbar,.nav,.law-topbar,.dash-topbar){
  background:#0c2443!important;border-color:#315577!important;
  color:#fff!important;box-shadow:none!important;
}
html[data-theme="royal-dark"] :is(.topbar,.law-topbar,.nav,.dash-topbar) :is(.brand-logo-img,.law-brand__logo){filter:brightness(0) invert(1)}
html[data-theme="royal-dark"] :is(.topbar,.nav,.law-topbar,.dash-topbar) :is(p,span,a,small){color:#f4f9ff!important}
html[data-theme="light"] body>header a{color:#fff!important}
html[data-theme="royal-dark"] body>header a{color:#eaf7ff!important}
html[data-theme="light"] :is(label,legend){color:#171e29!important}
html[data-theme="royal-dark"] :is(label,legend){color:#f7fbff!important}
/* Mantener logotipos y marcas de pago sin filtros monocromáticos. */
:is(.payment-brands,.brand-strip__cards,.brand-strip__left,.openpay-trust) img{filter:none!important}
/* Superficies opacas en cualquier tema para que el texto nunca desaparezca */
html[data-theme="light"] :is(.panel,.card,.stat-card,.quick-card,.form-card,.form-panel,.form-section,.login-card,.register-card,.profile-card,.result-card,.role-card,.plan-card,.plans-panel,.payment-panel,.order-panel,.bill-card,.hero-box,.receipt,.receipt-body,.receipt-item,.history-row,.registration-card,.support-card,.support-control-card,.calendar-card,.calendar-week,.calendar-side-panel,.meet-panel,.modal,.modal-card,.dialog-card,.box,.info-card,.tool-card,.law-card,.plan-mini,.order-feature,.profile-choice,.funnel-side,.privacy-content,.hero,.rating-summary,.list-item,.note-card,.file-card,.scanner-card,.source-card,.chat-bubble,.message-bubble,.payment-tabpanel,.manual-payment-step,.payment-method-note,.free-banner,.security-pill,.brand-strip,.privacy-payment-note,.search-panel,.trust-card,.hero-metrics){
  border-color:#d8e3ef!important;
}
html[data-theme="royal-dark"] :is(.panel,.card,.stat-card,.quick-card,.form-card,.form-panel,.form-section,.login-card,.register-card,.profile-card,.result-card,.role-card,.plan-card,.plans-panel,.payment-panel,.order-panel,.bill-card,.hero-box,.receipt,.receipt-body,.receipt-item,.history-row,.registration-card,.support-card,.support-control-card,.calendar-card,.calendar-week,.calendar-side-panel,.meet-panel,.modal,.modal-card,.dialog-card,.box,.info-card,.tool-card,.law-card,.plan-mini,.order-feature,.profile-choice,.privacy-content,.rating-summary,.list-item,.note-card,.file-card,.scanner-card,.source-card,.chat-bubble,.message-bubble,.payment-tabpanel,.manual-payment-step,.payment-method-note,.free-banner,.security-pill,.brand-strip,.privacy-payment-note,.search-panel,.trust-card,.hero-metrics,.sheet-case-card,.spreadsheet-card,.agenda-card,.week-head,.day-cell,.hour-cell,.mini-calendar span,.empty-state,.google-btn,.meet-panel,.directory-hero .search-panel,.directory-hero .trust-card,.directory-hero .hero-metrics){
  background:#10294b!important;border-color:#315577!important;color:#f7fbff!important;
  box-shadow:0 8px 22px rgba(0,0,0,.12)!important;
}
/* Bloques azules mantienen texto blanco en ambos modos */
html[data-theme="light"] :is(.welcome-card,.registration-intro,.register-banner,.receipt-head,.funnel-side--formal,.directory-hero,.law-final){color:#fff!important}
html[data-theme="light"] :is(.welcome-card,.registration-intro,.register-banner,.receipt-head,.funnel-side--formal,.directory-hero,.law-final) :is(h1,h2,h3,h4,p,small,span,b,strong,li){color:#fff!important}
html[data-theme="royal-dark"] :is(.welcome-card,.registration-intro,.register-banner,.receipt-head,.funnel-side--formal,.law-final){
  background:#113967!important;color:#fff!important;border-color:#41688d!important;
}
html[data-theme="royal-dark"] :is(.welcome-card,.registration-intro,.register-banner,.receipt-head,.funnel-side--formal,.law-final) :is(h1,h2,h3,p,small,span,b,strong){color:#fff!important}
html[data-theme="royal-dark"] :is(.image-card,.vector-dashboard-card,.hero-card,.hero__panel,.directory-hero){background:#0d2748!important;border-color:#315577!important;color:#fff!important}
html[data-theme="royal-dark"] .directory-hero::before{background:linear-gradient(100deg,rgba(5,20,42,.22),transparent)!important}
html[data-theme="royal-dark"] .directory-hero :is(.search-panel,.trust-card,.hero-metrics) :is(h1,h2,h3,p,span,b,strong,label){color:#f7fbff!important}
/* Formularios: fondos sólidos, selección y foco accesibles */
html[data-theme="light"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.inp){
  background:#fff!important;color:#111827!important;border-color:#b8cce1!important;
}
html[data-theme="royal-dark"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.inp,[contenteditable="true"]){
  background:#071e3a!important;color:#fff!important;border-color:#46739e!important;
  -webkit-text-fill-color:#fff;
}
html[data-theme="royal-dark"] :is(input,textarea)::placeholder{color:#c3d7ec!important;opacity:1!important}
html[data-theme="royal-dark"] select option{background:#10294b!important;color:#fff!important}
html[data-theme="royal-dark"] :is(input,textarea):disabled{opacity:.7!important}
:where(a,button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #6ab8ff!important;outline-offset:3px!important}
/* Botones: primario azul y secundario con contraste; conservar estados semánticos */
html[data-theme="light"] :is(.button.primary,.btn.primary,.law-btn--primary,.dash-btn.primary,.btn-hero-primary,.btn-plan.primary,button[type="submit"]:not(.ghost):not(.secondary),input[type="submit"],.calendar-btn:not(.secondary),.payment-tab.active){
  background:#135cb2!important;color:#fff!important;border-color:#135cb2!important;
}
html[data-theme="royal-dark"] :is(.button.primary,.btn.primary,.law-btn--primary,.dash-btn.primary,.btn-hero-primary,.btn-plan.primary,button[type="submit"]:not(.ghost):not(.secondary),input[type="submit"],.calendar-btn:not(.secondary),.payment-tab.active){
  background:#2874bc!important;color:#fff!important;border-color:#66afe9!important;
}
html[data-theme="royal-dark"] :is(.button:not(.primary),.btn:not(.primary),.dash-btn:not(.primary),.law-btn:not(.law-btn--primary),.google-btn,.ghost,.secondary,.payment-tab:not(.active),.calendar-btn.secondary){
  background:#17375a!important;color:#f7fbff!important;border-color:#487198!important;
}
html[data-theme="light"] :is(.topbar,.law-topbar,.nav,.dash-topbar) :is(.button:not(.primary),.law-btn:not(.law-btn--primary),.dash-btn:not(.primary),.menu-toggle){
  background:#fff!important;color:#0c4a92!important;border-color:#cfe0f2!important;
}
html[data-theme="royal-dark"] :is(.topbar,.law-topbar,.nav,.dash-topbar) :is(.button:not(.primary),.law-btn:not(.law-btn--primary),.dash-btn:not(.primary),.menu-toggle){
  background:#17375a!important;color:#fff!important;border-color:#487198!important;
}
html[data-theme="royal-dark"] :is(.welcome-actions .dash-btn.primary,.receipt-head .button,.registration-intro .button){background:#fff!important;color:#083b7c!important}
/* Barra lateral, tabla, badges y detalles */
html[data-theme="light"] .dash-sidebar{background:#083b7c!important;color:#fff!important}
html[data-theme="royal-dark"] .dash-sidebar{background:#06172d!important;color:#fff!important}
html[data-theme="royal-dark"] .dash-sidebar :is(a,b,h3,p,small,span){color:#f5faff!important}
html[data-theme="royal-dark"] .dash-menu a.active{background:#1d5489!important;color:#fff!important}
html[data-theme="light"] :is(thead th,.week-head){background:#eaf3ff!important;color:#0d468d!important}
html[data-theme="royal-dark"] :is(table,thead,thead th,.week-head,tbody,tbody tr,td,th){
  background:#10294b!important;color:#fff!important;border-color:#315577!important;
}
html[data-theme="royal-dark"] tbody tr:hover td{background:#193b63!important}
html[data-theme="royal-dark"] :is(.badge,.pill,.order-label,.billing-chip,.profile-badge,.kicker,.plan-trial,.hero-box,.mini-calendar .today){background:#193d62!important;color:#fff!important;border-color:#487198!important}
html[data-theme="royal-dark"] :is(.billing-main,.bill-card,.manual-payment-card,.payment-layout,.receipt-grid,.calendar-shell,.agenda-shell){color:#fff!important}
html[data-theme="royal-dark"] :is(.manual-payment-step,.receipt-item,.bill-kv,.order-feature) :is(span,b,strong){color:#fff!important}
html[data-theme="royal-dark"] :is(.flow-payment-badge,.payment-brand,.brand-strip__cards span){background:#153456!important;color:#f7fbff!important;border-color:#41688d!important}
/* Enlaces, pie de página y textos sobre superficies profundas */
html[data-theme="light"] :is(a:not(.btn):not(.button):not(.law-btn):not(.dash-btn):not(.calendar-btn),.meet-link){color:#10519f}
html[data-theme="royal-dark"] a:not(.button):not(.btn):not(.law-btn):not(.dash-btn):not(.calendar-btn):not(.sidebar-action):not(.event-chip){color:#bfe4ff!important}
html[data-theme="royal-dark"] :is(footer,.footer,.law-footer,.flow-footer,.sidebar-foot){background:#0b2442!important;color:#fff!important;border-color:#315577!important}
html[data-theme="royal-dark"] :is(footer,.footer,.law-footer,.flow-footer) :is(p,span,small,li,a,strong){color:#fff!important}
html[data-theme="light"] :is(footer,.footer,.law-footer,.flow-footer){background:#f5f9ff!important;color:#1f2937!important;border-color:#d8e3ef!important}
/* Bloques de estado deben mantener señales visuales, no transparentarse */
html[data-theme="royal-dark"] :is(.alert.ok,.notice.success,.payment-status.ok){background:#103b32!important;color:#c8ffe4!important;border-color:#276c57!important}
html[data-theme="royal-dark"] :is(.alert.err,.alert.error,.notice.error,.payment-status.error){background:#42232f!important;color:#ffd9e0!important;border-color:#90526b!important}
html[data-theme="royal-dark"] :is(.payment-status.wait,.notice.warning,.alert.warning){background:#2f2c1f!important;color:#fff0c4!important;border-color:#84703d!important}
html[data-theme="royal-dark"] :is(.alert.ok,.alert.err,.notice.success,.notice.error,.payment-status.ok,.payment-status.error,.payment-status.wait) :is(span,b,strong,p){color:inherit!important}
/* Íconos SVG legales sin adornos iniciales en registro */
.register-visible-link::before,.register-visible-link::after{content:none!important;display:none!important}
.ui-icon,.lg-legal-icon{display:inline-block;width:1.15em;height:1.15em;flex:0 0 auto;vertical-align:-.18em;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lg-decorative-icon{display:inline-grid;place-items:center;line-height:1}
.theme-toggle{background:#fff!important;color:#0c4a92!important;border:1px solid #b7cbe1!important;box-shadow:0 9px 24px rgba(5,28,61,.18)!important}
html[data-theme="royal-dark"] .theme-toggle{background:#174372!important;color:#fff!important;border-color:#638eb5!important}
.theme-toggle .lg-legal-icon{width:22px;height:22px}
/* Contenedores reales: responsivos sin cambios a mecanismos de pago o formularios */
:is(main,section,article,aside,form,fieldset,.panel,.card,.dash-main,.law-container,.container){min-width:0}
:is(.dash-grid,.billing-grid,.payment-layout,.calendar-shell,.funnel-layout,.split-registration,.hero-panel,.stats-grid,.quick-grid,.law-grid,.form-grid,.fields-grid)>*{min-width:0}
:is(img,video,canvas,svg,iframe){max-width:100%}
:is(.table-wrap,.table-responsive,.history,.sheet-scroll,.calendar-week){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
:is(.long-text,.file-name,.receipt-item,.bill-kv,.manual-payment-step,.form-panel,.support-card){overflow-wrap:anywhere}
@media(max-width:1024px){
  :is(.billing-grid,.payment-layout,.funnel-layout,.calendar-shell,.registration-page .split-registration){grid-template-columns:minmax(0,1fr)!important}
  :is(.bill-card,.payment-panel,.order-panel,.form-panel){max-width:100%!important}
}
@media(max-width:767px){
  :is(.container,.law-container){width:calc(100% - 28px)!important}
  :is(.fields-grid,.form-grid,.payment-layout,.billing-grid,.stats-grid,.subscription-hero,.manual-payment-steps){grid-template-columns:minmax(0,1fr)!important}
  :is(.topbar__inner,.nav-inner,.law-topbar__inner){flex-wrap:wrap!important;gap:10px!important;padding-block:11px!important}
  :is(.top-actions,.hero-actions,.welcome-actions,.form-actions,.bill-actions,.calendar-actions){gap:9px!important}
  :is(.payment-panel,.order-panel,.bill-card,.register-card,.form-panel,.privacy-content){padding:16px!important}
  :is(.dash-main,.billing-main){max-width:100%!important;padding:12px!important}
  :is(h1){font-size:clamp(1.65rem,7vw,2.4rem)!important;overflow-wrap:anywhere}
  :is(.history-row){grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
  .history-row.head{display:none!important}
  .theme-toggle{right:12px!important;bottom:12px!important}
}
@media(max-width:420px){
  :is(.container,.law-container){width:calc(100% - 20px)!important}
  :is(.bill-actions,.form-actions,.welcome-actions){flex-direction:column!important;align-items:stretch!important}
  :is(.payment-panel,.order-panel,.bill-card,.register-card,.form-panel){padding:13px!important}
  :is(button,.button,.btn,.law-btn,.dash-btn){max-width:100%;white-space:normal!important;overflow-wrap:anywhere}
}
@media print{
  html,html[data-theme="royal-dark"],html[data-theme="royal-dark"] body,body{
    color-scheme:light!important;background:#fff!important;color:#111!important
  }
  .theme-toggle{display:none!important}
  .receipt,.receipt-body,.privacy-content{background:#fff!important;color:#111!important}
  html[data-theme="royal-dark"] :is(h1,h2,h3,h4,h5,h6,p,li,small,span,b,strong,td,th,a,label){color:#111!important}
  html[data-theme="royal-dark"] :is(.receipt,.receipt-body,.receipt-head,.receipt-item,.bill-card,.privacy-content,.payment-panel,.order-panel,td,th){background:#fff!important;color:#111!important;border-color:#bbb!important;box-shadow:none!important}
  html[data-theme="royal-dark"] :is(.brand-logo-img,.law-brand__logo){filter:none!important}
}
