@layer lectura, acabado, revision, interfaz, pantallas;
/* Shared screen components. Layered priorities take precedence over legacy page-specific important rules. */
@font-face {
  font-family: "Legasist Jakarta";
  src: url("../fonts/PlusJakartaSans.ttf") format("truetype");
  font-weight: 200 900;
  font-display: swap;
}
@layer pantallas {
  :root {
    --portal-blue: #0e4e98;
    --portal-canvas: #f4f9ff;
    --portal-surface: #fff;
    --portal-text: #102b51;
    --portal-muted: #54687c;
    --portal-edge: #d5dfeb;
    --portal-shadow: 0 5px 18px rgba(21,57,96,.055);
    --portal-header: 64px;
    --portal-rail: clamp(174px,15.25vw,228px);
    --portal-banner: radial-gradient(circle at 96% 16%,#ffffff0b 0 13%,transparent 13.2%),
                     radial-gradient(circle at 72% 116%,#ffffff0a 0 16%,transparent 16.2%),#0e4e98;
  }
  html[data-theme="royal-dark"] {
    --portal-canvas: #0e2034;
    --portal-surface: #182d45;
    --portal-text: #eff6ff;
    --portal-muted: #bccde0;
    --portal-edge: #3b536c;
  }
  body,button,input,select,textarea { font-family:"Legasist Jakarta","Segoe UI",sans-serif!important }
  body { color:var(--portal-text)!important }
  :is(.dashboard-body,.flow-lawyer,.support-public,.directory-page,.login-role-page) {background:var(--portal-canvas)!important}
  :is(.law-topbar,.topbar,.legasist-appbar) {background:var(--portal-blue)!important;color:white!important;border:0!important;box-shadow:0 1px 0 #0001!important}
  :is(.law-topbar,.topbar) :is(.brand-logo-img,.law-brand__logo),.legasist-appbar-brand img {filter:brightness(0) invert(1)!important;object-fit:contain!important}
  :is(.law-topbar,.topbar) nav>a {color:white!important}
  .legasist-appbar {height:var(--portal-header)!important;inset:0 0 auto!important;z-index:1300!important}
  .legasist-appbar-brand img {width:116px!important;height:36px!important}
  .legasist-appbar-actions {gap:14px!important}
  .legasist-account-popover {background:var(--portal-surface)!important;border:1px solid var(--portal-edge)!important}
  .legasist-account-popover a {color:var(--portal-text)!important;display:flex!important;align-items:center;gap:9px}
  .legasist-account-popover svg,.dash-menu svg {width:18px!important;height:18px!important;flex:none}
  .dash-layout--fixed {padding-top:var(--portal-header)!important}
  .dash-layout--fixed>.dash-sidebar {position:fixed!important;top:var(--portal-header)!important;bottom:0!important;height:calc(100dvh - var(--portal-header))!important;background:var(--portal-blue)!important;overflow-y:auto!important;padding:16px 10px!important}
  .dash-layout--fixed>.dash-main {min-width:0!important;background:var(--portal-canvas)!important;padding:clamp(16px,2vw,30px)!important}
  .dash-sidebar .dash-menu {display:grid!important;align-content:start!important;gap:4px!important;padding:0!important}
  .dash-sidebar .dash-menu>a {display:flex!important;align-items:center!important;gap:10px!important;min-height:40px!important;padding:9px 13px!important;color:#fff!important;font-size:13px!important;font-weight:600!important;border-radius:9px!important;background:transparent!important}
  .dash-sidebar .dash-menu>a:is(:hover,.active) {background:#ffffff27!important}
  .ls-sidebar-group-label {margin:16px 10px 4px;padding:14px 0 0!important;border-top:1px solid #ffffff32;color:#d4e7fa!important;font-size:10px!important;letter-spacing:.07em;text-transform:uppercase}
  .dash-layout--fixed>.dash-sidebar :is(.dash-brand,.dash-profile,.sidebar-foot),.dash-main .dash-topbar .menu-toggle {display:none!important}
  :is(.panel,.panelx,.stat-card,.bill-card,.choose-plan,.form-section,.case-form-category,.table-panel,.kpi,.note-store-card,.security-card,.support-section,.law-card,.plan-mini,.order-panel,.panel-tool) {
    background:var(--portal-surface)!important;border:1px solid var(--portal-edge)!important;border-radius:15px!important;box-shadow:var(--portal-shadow)!important;color:var(--portal-text)!important
  }
  :is(.store-hero,.scan-hero,.welcome-card,.agenda-hero,.security-hero,.case-header,.person-hero-v2,.register-banner,.billing-title) {
    background:var(--portal-banner)!important;color:white!important;border:0!important;border-radius:17px!important;box-shadow:none!important
  }
  :is(.store-hero,.scan-hero,.welcome-card,.agenda-hero,.security-hero,.case-header,.register-banner,.billing-title) :is(h1,h2,p,.kicker) {color:white!important}
  .lawyer-dashboard .hero-panel {display:block!important;margin:0 0 16px!important}
  .welcome-card {padding:clamp(22px,3vw,40px)!important;display:grid!important;grid-template-columns:72px minmax(0,1fr);column-gap:20px;align-items:center}
  .welcome-identity {display:contents!important}
  .welcome-avatar {grid-column:1;grid-row:1/5;width:72px!important;height:72px!important;border:2px solid #ffffff80!important;border-radius:50%;background:#ffffff24!important;overflow:hidden}
  .welcome-avatar img {width:100%;height:100%;object-fit:cover}
  .welcome-card :is(.kicker,h1,p,.welcome-actions){grid-column:2;margin:0!important}
  .welcome-card .kicker {justify-self:start!important;padding:5px 10px!important;border-radius:99px;background:#ffffff22!important;font-size:11px!important}
  .welcome-card h1 {font-size:clamp(24px,2.4vw,38px)!important;line-height:1.13!important;margin:9px 0 5px!important;letter-spacing:-.04em}
  .welcome-actions {padding-top:12px;display:flex!important;flex-wrap:wrap;gap:7px}
  .welcome-actions .dash-btn {color:white!important;border:1px solid #ffffff60!important;background:#ffffff12!important}
  .welcome-actions .primary {background:white!important;color:var(--portal-blue)!important}
  .lawyer-dashboard .stats-grid {margin:0 0 16px!important;gap:12px!important}
  .lawyer-dashboard .stat-card {padding:18px!important}
  .stat-top {display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:10px!important}
  .stat-icon {order:-1}
  .lawyer-dashboard .stat-card strong {font-size:clamp(25px,2.6vw,39px)!important;line-height:1.2!important}
  .lawyer-dashboard .dash-grid {margin-top:16px!important}
  .lawyer-dashboard .quick-grid {display:grid!important;grid-template-columns:1fr!important}
  .lawyer-dashboard .quick-card {display:flex!important;align-items:center;gap:10px;padding:12px!important}
  .billing-title {padding:24px!important}
  .billing-title .billing-chip {background:#ffffff20!important;color:white!important}
  .table-wrap,.table-scroll {max-width:100%;overflow-x:auto}
  .dash-table th,.case-table th {color:var(--portal-muted)!important;font-size:10px!important;letter-spacing:.05em;text-transform:uppercase}
  .dash-table td,.case-table td {white-space:normal;line-height:1.45}
  .tool-credits {display:flex!important;align-items:center;gap:20px;flex-wrap:wrap;padding:14px!important;margin-bottom:16px}
  .login-role-abogado {background:var(--portal-surface)!important}
  .lawyer-login-stage {display:grid!important;place-items:center!important;min-height:calc(100svh - 100px)!important;padding:40px 16px!important;background:var(--portal-surface)!important}
  .lawyer-login-card {display:grid!important;width:min(100%,820px)!important;max-width:none!important;min-height:0!important;grid-template-columns:41% minmax(0,1fr)!important;border-radius:12px!important;overflow:hidden!important;background:var(--portal-surface)!important;border:1px solid var(--portal-edge)!important;box-shadow:0 10px 30px #193e6514!important}
  .lawyer-login-message-panel {min-height:0!important;display:grid!important;place-items:center!important;background:var(--portal-blue)!important;padding:36px!important}
  .lawyer-login-message-panel::before,.lawyer-login-message-panel::after,.register-banner::before,.register-banner::after {content:none!important}
  .lawyer-access-message strong {color:#fff!important;font-size:clamp(26px,2.5vw,38px)!important;line-height:1.13!important}
  .lawyer-access-message p {color:#e6f2ff!important;font-size:14px!important;line-height:1.6!important}
  .lawyer-login-form-panel {padding:30px!important;background:var(--portal-surface)!important}
  .lawyer-login-form-panel h2 {font-size:26px!important;color:var(--portal-text)!important}
  .lawyer-login-form-panel .login-subtitle {font-size:13px!important;margin:0 0 16px!important}
  .lawyer-login-form {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .lawyer-login-form :is(.login-input-wrap,input) {min-width:0!important;max-width:100%!important}
  .lawyer-login-form .login-button {min-height:42px!important;background:var(--portal-blue)!important;border-radius:8px!important;color:white!important}
  .lawyer-register-box {padding:14px!important;margin-top:14px!important;border-radius:10px!important;background:var(--portal-canvas)!important;color:var(--portal-text)!important}
  .lawyer-register-premium .funnel-layout {width:min(100% - 32px,760px)!important;max-width:none!important;display:block!important;padding:0!important}
  .lawyer-register-premium .form-panel {width:auto!important;max-width:none!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
  .register-banner {display:grid!important;justify-items:center!important;align-content:center!important;padding:30px!important;min-height:185px!important;text-align:center}
  .register-banner h1 {font-size:36px!important;margin:10px 0 4px!important}
  .register-banner p {margin:0!important}
  .register-symbol {display:grid;place-items:center;border-radius:50%;background:#ffffff20;padding:10px}
  .register-symbol svg {width:25px;height:25px}
  .lawyer-register-note {padding:16px!important;border:1px solid var(--portal-edge)!important;background:var(--portal-surface)!important;border-radius:12px!important;color:var(--portal-text)!important}
  .lawyer-register-premium .form-section {margin:16px 0!important;padding:clamp(16px,2vw,28px)!important}
  .profile-choice:has(input:checked) {outline:2px solid var(--portal-blue)!important;outline-offset:-2px}
  .law-hero {background:linear-gradient(var(--portal-canvas),var(--portal-surface))!important}
  .law-section--soft {background:var(--portal-canvas)!important}
  .lawyer-dashboard .welcome-card::before,.lawyer-dashboard .welcome-card::after {content:none!important}
  @media(min-width:1181px) {
    .dash-layout--fixed {display:grid!important;grid-template-columns:var(--portal-rail) minmax(0,1fr)!important;margin:0!important}
    .dash-layout--fixed>.dash-sidebar {left:0!important;width:var(--portal-rail)!important;box-sizing:border-box!important}
    .dash-layout--fixed>.dash-main {grid-column:2!important;margin:0!important;width:auto!important}
    .legasist-appbar .legasist-menu-toggle {display:none!important}
  }
  @media(max-width:1180px) {
    .dash-layout--fixed {display:block!important}
    .dash-layout--fixed>.dash-main {margin:0!important;width:100%!important;box-sizing:border-box!important}
    .dash-layout--fixed>.dash-sidebar {z-index:1290!important;left:0!important}
    .mobile-overlay.show {z-index:1280!important}
    .dash-sidebar .legasist-sidebar-close {position:static!important;margin:0 0 8px auto!important}
  }
  @media(max-width:760px) {
    .legasist-appbar-actions {gap:6px!important}
    .lawyer-login-card {grid-template-columns:1fr!important}
    .lawyer-login-stage {min-height:0!important;padding:18px 12px!important}
    .lawyer-login-message-panel {padding:24px!important}
    .lawyer-login-form-panel {padding:20px!important}
    .lawyer-login-form {grid-template-columns:1fr!important}
    .welcome-card {grid-template-columns:46px minmax(0,1fr);column-gap:12px}
    .welcome-avatar {width:46px!important;height:46px!important}
    .welcome-actions {grid-column:1/-1!important}
    .dash-layout--fixed>.dash-main {padding:14px!important}
    .lawyer-dashboard .stats-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .lawyer-dashboard .stat-card {padding:12px!important}
  }
  @media(max-width:850px) {
    .lg-public-nav-open :is(.law-nav,.nav-links) {background:var(--portal-blue)!important}
  }
}
@layer pantallas {
  :is(.scan-hero,.security-hero,.billing-title,.profile-banner,.support-heading) {position:relative!important}
  .profile-banner,.support-heading {background:var(--portal-banner)!important;border-radius:16px!important;padding:24px!important;margin-bottom:16px!important;box-shadow:none!important;color:#fff!important}
  :is(.profile-banner,.support-heading) :is(h1,p,.sec-tag,.kicker) {color:#fff!important}
  .profile-banner h1 {margin:8px 0!important;font-size:clamp(26px,3vw,38px)!important}
  .banner-icons {position:absolute;right:22px;top:50%;transform:translateY(-50%);display:flex;gap:10px}
  .banner-icons span {display:grid;place-items:center;width:44px;height:46px;background:#ffffff18;border:1px solid #ffffff30;border-radius:12px;color:white!important}
  .banner-icons svg {width:21px;height:21px;stroke:currentColor}
  .dashboard-body :is(.scan-hero,.security-hero,.billing-title,.profile-banner,.support-heading) {padding-right:194px!important}
  .lawyer-dashboard .quick-card {display:grid!important;grid-template-columns:38px minmax(0,1fr);gap:2px 10px!important}
  .quick-card .qicon {grid-row:span 2}
  .quick-card :is(h3,p) {margin:0!important}
  .legasist-support-link {display:inline-flex!important;align-items:center}
  .stepper,.flow-lawyer .funnel-head {background:transparent!important;box-shadow:none!important;border:0!important;text-align:center!important}
  .flow-lawyer .funnel-head :is(h1,p) {color:var(--portal-text)!important}
  .stepper__inner {justify-content:center!important}
  .choose-plan[data-plan="pro"] {border:2px solid var(--portal-blue)!important}
  .billing-page .billing-grid>.bill-card:first-child {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}
  .billing-page .bill-card :is(h2,.subscription-hero,.bill-actions){grid-column:1/-1}
  @media(max-width:760px){
    .dashboard-body :is(.scan-hero,.security-hero,.billing-title,.profile-banner,.support-heading){padding:18px!important}
    .banner-icons {display:none}
    .legasist-support-link {font-size:12px!important}
    .billing-page .billing-grid>.bill-card:first-child {display:block}
  }
}
@layer pantallas {
  .ls-attorney-landing .lg-public-menu-toggle {display:none!important}
  @media(max-width:850px) {
    .ls-attorney-landing .lg-public-menu-toggle {display:inline-grid!important;place-items:center;width:42px;height:42px;color:white;background:transparent;border:1px solid #ffffff60;border-radius:8px;margin-left:auto}
    .ls-attorney-landing .law-topbar:has(.lg-public-menu-toggle) .law-nav {display:none!important}
    .ls-attorney-landing .law-topbar.lg-public-nav-open .law-nav {display:grid!important;position:absolute;inset:100% 0 auto;z-index:50;padding:14px;background:var(--portal-blue)!important}
  }
}

/* Colores de las superficies de las referencias del portal. */
@layer pantallas {
  :root {
    --v4-brand: #0e4e98;
    --v4-action: #14589e;
    --v4-soft: #eaf2fc;
    --v4-success: #128359;
    --v4-mint: #e6f5ee;
    --v4-line: #d5dfeb;
    --v4-inset: #f7faff;
  }
  html[data-theme="royal-dark"] {
    --v4-soft: #253d59;
    --v4-inset: #172b42;
    --v4-line: #38516e;
    --v4-mint: #183c34;
  }
  body {background-color:var(--portal-canvas)!important}
  .legasist-appbar {padding-inline:clamp(16px,1.85vw,30px)!important;box-sizing:border-box}
  .legasist-appbar-actions :is(.legasist-plan-link,summary),:is(.payment-account-menu,.account-nav-menu)>summary {
    background:#ffffff20!important;color:white!important;border:1px solid #ffffff40!important;
    border-radius:10px!important;font-size:13px!important;font-weight:700!important;padding:8px 14px!important
  }
  .legasist-appbar-actions .legasist-plan-link {border-radius:30px!important}
  .legasist-appbar-actions .legasist-plan-link>span {color:#43d398!important}
  :is(.legasist-account-popover,.account-nav-options,.payment-account-popover) {
    border:1px solid var(--v4-line)!important;border-radius:12px!important;padding:7px!important;
    min-width:174px!important;background:var(--portal-surface)!important;box-shadow:0 16px 32px #102b5133!important
  }
  :is(.legasist-account-popover,.account-nav-options,.payment-account-popover) a {
    padding:11px 12px!important;color:var(--portal-text)!important;text-decoration:none!important
  }
  .screen-breadcrumb {gap:10px!important;margin:2px 0 23px!important;font-size:12px!important}
  .dashboard-body .dash-main {min-height:calc(100svh - var(--portal-header));box-sizing:border-box}
  .dash-main :is(.panel,.panelx,.stat-card,.calendar-board,.day-panel,.scan-card,.quick-compose,
    .v-panel,.insight-card,.security-card,.sheet-case-card,.sheet-library-intro,.spreadsheet-card,.case-management-card,.side-section),
  :is(.register-card,.search-panel,.lawyer-card,.step-card,.review-card,.mini-benefit,.twofa-card,.verify-shell,
    .setup-card,.payment-panel,.order-panel,.login-card,.legal-document article,.openpay-trust,.privacy-payment-note) {
    color:var(--portal-text)!important;background:var(--portal-surface)!important;border:1px solid var(--v4-line)!important;
    border-radius:16px!important;box-shadow:0 6px 22px rgba(17,62,104,.055)!important
  }
  html:not([data-theme="royal-dark"]) :is(.panel-head,.panel-headline,.bill-card,.quick-compose,.v-panel,.payment-panel,.order-panel,.legal-document article,.sheet-library-heading,.setup-card) :is(h2,h3) {
    color:var(--v4-brand)!important;letter-spacing:-.035em!important
  }
  :is(.dashboard-body,.flow-lawyer,.directory-page,.registration-page,.support-public,.login-role-page,.verify-shell,.twofa-shell,.legal-document)
    :is(input:not([type]),input[type=text],input[type=number],input[type=email],input[type=password],input[type=tel],
    input[type=date],input[type=time],input[type=search],select,textarea):not([readonly]) {
    box-sizing:border-box;color:var(--portal-text)!important;background-color:var(--portal-surface)!important;
    border:1px solid var(--v4-line)!important;border-radius:9px!important;box-shadow:none!important;font-size:14px!important
  }
  :is(input,textarea)::placeholder {color:#75869a!important;opacity:1!important}
  :is(a,button,input,select,textarea,summary):focus-visible {outline:3px solid #4b95da!important;outline-offset:2px!important}
  :is(.law-btn,.dash-btn,.button,.mini-button,.tool-btn):not(.icon-action) {border-radius:9px!important;font-weight:700!important}
  :is(.law-btn--primary,.dash-btn.primary,.button.primary,.search-submit,.login-button,.activation-summary-btn) {
    background:var(--v4-action)!important;border-color:var(--v4-action)!important;color:#fff!important;box-shadow:0 4px 10px #16549b25!important
  }
  :is(.action-save-note,.case-create-submit,.scan-save button,.agenda-page .day-panel button[type=submit],
    .profile-actions button[type=submit],.whatsapp-first) {
    background:linear-gradient(110deg,#189b6b,#107b55)!important;color:#fff!important;border-color:#137e59!important;
    border-radius:10px!important;box-shadow:0 6px 15px #0d855333!important
  }
  .dash-main .panel-head,.dash-main .panel-body {padding:clamp(14px,1.5vw,23px)!important}
  .dash-main .panel-head+.panel-body {padding-top:4px!important}
  .dash-table,.case-table {border-collapse:separate!important;border-spacing:0!important}
  .dash-table td,.case-table td {border-bottom:1px solid var(--v4-line)!important;font-size:12px!important;color:var(--portal-text)!important}
  .dash-table th,.case-table th {border-bottom:1px solid var(--v4-line)!important;font-size:10px!important;line-height:1.35}
  .case-table th {background:var(--portal-canvas)!important}
  :is(.stat-icon,.qicon,.sheet-case-icon,.case-icon,.preview-avatar) {border-radius:10px!important}
  .hero-stat {border:1px solid #ffffff75!important;background:var(--portal-surface)!important;color:var(--portal-text)!important;
    border-radius:14px!important;padding:14px!important;box-shadow:0 5px 14px #082e4e15!important}
  .hero-stat b,.hero-stat span {color:var(--portal-text)!important}
  .hero-stat b {font-size:clamp(22px,2vw,34px)!important}
  .hero-stat span {font-size:10px!important;letter-spacing:.04em;text-transform:uppercase}
  .lawyer-dashboard .stat-card strong,.plan-price {color:var(--v4-brand)!important}
  [data-theme="royal-dark"] .lawyer-dashboard .stat-card strong,[data-theme="royal-dark"] .plan-price {color:#a9d2ff!important}
  .lawyer-dashboard .welcome-actions .primary {background:#fff!important;color:var(--v4-brand)!important;border-color:#fff!important}
  .lawyer-dashboard .welcome-actions :not(.primary).dash-btn {box-shadow:none!important}
  .lawyer-dashboard .stat-top {font-size:13px!important}
  .stat-card small,.panel-head p,.panel-help,.plan-caption {color:var(--portal-muted)!important}
  .lawyer-dashboard .table-actions {display:flex!important;flex-wrap:wrap!important;gap:6px!important}
  .lawyer-dashboard .dash-table .dash-btn {min-height:30px!important;padding:5px 9px!important;font-size:11px!important}
  .case-shell .filters {padding:15px!important;border-bottom:1px solid var(--v4-line)!important;background:var(--portal-surface)!important}
  .case-shell .table-panel {padding:0!important;overflow:hidden}
  .case-table .icon-action {width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;padding:5px!important;border:0!important;border-radius:7px!important}
  .case-table .case-open {background:#e7f4ed!important;color:#13764e!important}
  .case-table .manage-btn {background:#fff1cc!important;color:#966800!important}
  .case-table .icon-action.danger {background:#fbeceb!important;color:#ba352c!important}
  .case-table :is(.priority-urgente,.priority-alta,.priority-media,.priority-baja,.state-active,.state-closed) {border-radius:30px!important;padding:4px 8px!important}
  .case-table .priority-urgente {background:#c82e21!important;color:white!important}
  .case-table .priority-alta {background:#ba5b03!important;color:white!important}
  .case-table .priority-media {background:#fff1ba!important;color:#715408!important}
  .case-table :is(.priority-baja,.state-active) {background:#e5f5ec!important;color:#116646!important}
  .case-table .cell-sub {white-space:normal!important;overflow-wrap:anywhere}
  .case-create-mode .create-card {border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important}
  .case-category-title {margin:0 0 17px!important;font-size:17px!important;letter-spacing:-.025em}
  .case-create-mode .case-form-category {padding:clamp(15px,1.6vw,24px)!important;margin:0!important;min-width:0}
  .case-form-category label,.scanner-form label,.quick-form label,.day-panel label {font-size:12px!important;font-weight:700!important}
  .fee-totals>div {background:var(--v4-soft)!important;border:1px solid var(--v4-line)!important;border-radius:10px!important}
  .fee-totals>div:nth-child(2) {background:var(--v4-mint)!important}
  html:not([data-theme="royal-dark"]) .fee-totals>div:last-child {background:#fff6e9!important}
  .case-header {overflow:visible!important}
  .case-management-card {color:var(--portal-text)!important}
  .case-management-card summary {padding:12px!important;color:var(--portal-text)!important}
  .case-detail-page .ai-chat-box {background:var(--v4-inset)!important;border:1px solid var(--v4-line)!important;border-radius:13px!important}
  .ai-bubble {border-radius:12px!important}
  .ai-shortcut,.context-badge,.badge-soft,.hero-pill {border-radius:8px!important}
  .dropzone,.quick-file-item,.scan-empty,.empty-v {background:var(--v4-inset)!important;border:1px dashed #b9cce0!important;border-radius:12px!important}
  .applicant-detail-page .person-hero-v2 {background:var(--portal-banner)!important}
  .person-hero-v2 :is(h1,h2,h3,p,.hero-pill){color:#fff!important}
  .hero-contact-card {background:#ffffff1c!important;border:1px solid #ffffff45!important;border-radius:16px!important;padding:clamp(16px,2vw,28px)!important}
  .hero-contact-card .dash-btn:not(.primary):not(.whatsapp-first){background:#ffffff15!important;border:1px solid #ffffff50!important;color:#fff!important}
  .applicant-detail-page .person-avatar-xl {border:3px solid #ffffff75!important;background:#ffffff22!important;color:#fff!important}
  .quick-notes-page .note-store-grid {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))!important;gap:14px!important}
  .quick-notes-page .note-store-card {display:flex!important;flex-direction:column!important;align-items:stretch!important;padding:16px!important;gap:10px!important}
  .quick-notes-page .note-store-head,.quick-notes-page .note-row-actions {display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:5px!important;flex-wrap:wrap}
  .quick-notes-page .note-row-actions {margin-top:auto!important}
  .quick-notes-page .quick-file-item {padding:14px!important}
  .quick-notes-page .audio-capture-box {background:var(--v4-inset)!important;border-radius:14px!important}
  .quick-notes-page .audio-btn.start {width:58px!important;height:58px!important;min-height:58px!important;border-radius:50%!important}
  .scanner-page .scanner-viewport {background:radial-gradient(circle at 90% 12%,#ffffff0b 0 20%,transparent 20.3%),linear-gradient(155deg,#143d70,#091e3a)!important}
  .scanner-page .scanner-frame {border:0!important;inset:18px!important;border-radius:8px!important;box-shadow:none!important;
    background:linear-gradient(#78a6d8,#78a6d8) left top/28px 2px,linear-gradient(#78a6d8,#78a6d8) left top/2px 28px,linear-gradient(#78a6d8,#78a6d8) right top/28px 2px,linear-gradient(#78a6d8,#78a6d8) right top/2px 28px,linear-gradient(#78a6d8,#78a6d8) left bottom/28px 2px,linear-gradient(#78a6d8,#78a6d8) left bottom/2px 28px,linear-gradient(#78a6d8,#78a6d8) right bottom/28px 2px,linear-gradient(#78a6d8,#78a6d8) right bottom/2px 28px!important;background-repeat:no-repeat!important}
  .scanner-page .scan-preview-grid {grid-template-columns:1fr!important}
  .scanner-page .scan-preview-card {display:flex!important;align-items:center;gap:9px;padding:7px 38px 7px 7px!important}
  .scanner-page .scan-preview-card img {width:40px!important;height:40px!important;object-fit:cover!important}
  .agenda-page .calendar-board,.agenda-page .day-panel {min-width:0;overflow:hidden}
  .agenda-page .pretty-calendar {grid-template-columns:repeat(7,minmax(0,1fr))!important}
  .agenda-page .day-cell {border:1px solid var(--v4-line)!important;border-radius:10px!important;background:var(--portal-surface)!important}
  .agenda-page .day-cell:is(.selected,.today) {background:var(--v4-soft)!important;border-color:#2465a6!important}
  .agenda-page .day-cell:is(.muted,.outside) {opacity:.63}
  .agenda-page .event-chip {white-space:normal!important;text-overflow:clip!important;line-height:1.3!important;padding:4px 6px!important;border-radius:6px!important}
  .agenda-page .event-chip--case {color:#79460f!important;background:#fff3dc!important;border-left:3px solid #dc9126!important}
  .agenda-page .event-chip--manual {color:#144b83!important;background:#e7f0fb!important;border-left:3px solid #2976b8!important}
  .flow-lawyer .funnel-head h1 {font-size:clamp(29px,3.1vw,44px)!important;letter-spacing:-.045em!important}
  .flow-lawyer .stepper__inner {gap:12px!important;padding:18px 0 10px!important}
  .ls-plan-selection .plans-wrap>.law-container,.flow-lawyer .payment-layout {max-width:1164px!important;width:min(92%,1164px)!important;margin-inline:auto!important}
  .ls-plan-selection .trial-banner,.flow-lawyer .free-banner {background:var(--v4-mint)!important;border:1px solid #badecd!important;border-radius:14px!important;padding:16px 20px!important}
  html:not([data-theme="royal-dark"]) :is(.trial-banner,.free-banner) {color:#166a4b!important}
  .ls-plan-selection .trial-banner {max-width:870px!important;margin:8px auto 42px!important}
  .choose-plan {position:relative;padding:clamp(18px,2vw,30px)!important;border-radius:22px!important}
  .choose-plan[data-plan="pro"] {background:linear-gradient(var(--v4-soft),var(--portal-surface) 35%)!important;box-shadow:0 12px 28px #0e4e981c!important}
  .popular-pill {position:absolute!important;top:0!important;left:50%!important;right:auto!important;transform:translate(-50%,-50%)!important;background:#178961!important;color:white!important;border-radius:22px!important;padding:7px 16px!important;white-space:nowrap}
  .plan-name {font-size:clamp(21px,2vw,29px)!important;letter-spacing:-.04em!important}
  .choose-plan .plan-price {font-size:clamp(32px,3.5vw,52px)!important;letter-spacing:-.055em!important;line-height:1.15!important}
  .choose-plan .plan-price span {font-size:12px!important;letter-spacing:0!important}
  .ls-plan-metrics {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  .ls-plan-metric,.order-feature {background:var(--v4-soft)!important;border:0!important;border-radius:11px!important;text-align:center!important}
  .ls-plan-metric:nth-child(2),.order-feature:nth-child(2) {background:var(--v4-brand)!important;color:white!important}
  :is(.ls-plan-metric,.order-feature):nth-child(2) :is(strong,small,span,b) {color:white!important}
  .choose-plan form {margin-top:auto!important;padding-top:16px}
  .choose-plan .law-btn {min-height:46px!important}
  .payment-layout {align-items:start!important;gap:clamp(16px,2vw,28px)!important}
  .payment-layout :is(.order-panel,.payment-panel) {padding:clamp(18px,1.8vw,26px)!important}
  .order-panel .billing {background:var(--v4-mint)!important;border-radius:12px!important}
  .flow-lawyer .payment-tabpanel.active {margin-top:22px!important;border-top:1px solid var(--v4-line)!important;padding-top:18px!important}
  .flow-lawyer .checkout-lock {background:var(--v4-inset)!important;border-radius:10px!important}
  .footer,.law-footer {background:var(--portal-surface)!important;border-top:1px solid var(--v4-line)!important;color:var(--portal-text)!important}
  @media(min-width:980px) {
    .agenda-page .agenda-shell {display:grid!important;grid-template-columns:minmax(0,2.7fr) minmax(268px,1fr)!important;gap:16px!important}
    .agenda-page .day-cell {min-height:clamp(76px,6.4vw,105px)!important}
    .quick-notes-page .store-hero {grid-template-columns:minmax(0,1fr) minmax(350px,1fr)!important}
    .quick-notes-page .quick-steps li {display:grid!important;grid-template-columns:1fr!important;align-content:center!important;row-gap:3px!important}
    .quick-steps li b {grid-row:auto!important}
    .case-create-mode .create-card>.form-grid {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
    .case-create-mode .create-card .case-form-category {grid-column:1/-1!important}
    .case-create-mode .create-card .case-form-category:nth-of-type(-n+2) {grid-column:span 1!important}
    .case-create-mode .case-form-category:nth-of-type(-n+2) .case-category-grid {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .case-create-mode .case-create-submit {grid-column:1/-1!important;justify-self:end!important}
    .lawyer-dashboard .dash-grid {display:grid!important;grid-template-columns:minmax(0,2.15fr) minmax(240px,1fr)!important;gap:16px!important}
    .flow-lawyer .payment-layout {display:grid!important;grid-template-columns:minmax(0,2fr) minmax(265px,1fr)!important}
    .ls-plan-selection .plans-grid {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch!important;gap:20px!important}
    .ls-plan-selection .choose-plan[data-plan="pro"] {margin-top:-14px!important;transform:none!important}
  }
  @media(max-width:700px) {
    .dash-main .panel-body {padding:12px!important}
    .quick-notes-page .note-store-grid,.flow-lawyer .payment-layout,.ls-plan-selection .plans-grid {grid-template-columns:1fr!important}
    .quick-notes-page .note-link-details[open] .move-form {max-width:calc(100vw - 56px)}
    .popular-pill {top:0!important}
    .ls-plan-selection .plans-grid {row-gap:22px!important}
    .agenda-page .day-cell {min-height:60px!important;padding:4px!important}
    .ls-plan-selection .trial-banner {margin-bottom:20px!important}
  }
}
@layer pantallas {
  .case-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
  .case-create-mode .case-metrics {display:none}
  .case-metrics article {display:flex;align-items:center;gap:12px;padding:17px;background:var(--portal-surface);border:1px solid var(--v4-line);border-radius:14px;box-shadow:var(--portal-shadow)}
  .case-metrics svg,.method-card svg {width:19px!important;height:19px!important;flex:none;padding:10px!important;box-sizing:content-box!important;border-radius:10px;background:var(--v4-soft);color:var(--v4-brand)}
  .case-metrics article:nth-child(2) svg {background:#fbeceb;color:#c6332a}
  .case-metrics article:nth-child(3) svg {background:#fff1dc;color:#af610d}
  .case-metrics article:nth-child(4) svg {background:#e5f5ec;color:#137c56}
  .case-metrics span {display:block;font-size:11px;color:var(--portal-muted)}
  .case-metrics strong {display:block;margin-top:4px;font-size:clamp(17px,1.6vw,26px);letter-spacing:-.04em;color:var(--portal-text);overflow-wrap:anywhere}
  .method-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
  .method-card {position:relative;display:grid!important;align-content:start;justify-items:start;gap:5px;min-width:0;padding:14px!important;
    border:1px solid var(--v4-line)!important;border-radius:13px!important;background:var(--portal-surface)!important;color:var(--portal-text)!important;box-shadow:none!important;text-align:left!important}
  .method-card strong {margin-top:6px;color:var(--portal-text)!important;font-size:13px}
  .method-card small {color:var(--portal-muted)!important;font-size:11px}
  .method-card.active {outline:1px solid var(--v4-brand)!important;border-color:var(--v4-brand)!important;background:var(--v4-inset)!important}
  .method-card.active svg {background:var(--v4-brand)!important;color:white!important}
  .method-card::after {position:absolute;top:11px;right:10px;content:"";width:13px;height:13px;border-radius:50%;border:1px solid var(--v4-line)}
  .method-card.active::after {background:#19709e;box-shadow:inset 0 0 0 3px white;border-color:#19709e}
  .method-cards:has([aria-selected])~.payment-method-select-label,.method-cards:has([aria-selected])~.payment-method-select {display:none!important}
  .order-features {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  .order-feature:last-child {grid-column:1/-1}
  :is(.recover-card,.filter-panel,.result-card,.empty-results,.rating-summary,.consult-card,.manual-payment-card,.lawyer-profile-shell .panel,.meet-status-card) {
    border:1px solid var(--v4-line)!important;background:var(--portal-surface)!important;border-radius:15px!important;color:var(--portal-text)!important;box-shadow:var(--portal-shadow)!important
  }
  .directory-page .directory-hero,.search-lawyer-page .search-hero,.registration-page .hero,.recover-shell {background:linear-gradient(var(--portal-canvas),var(--portal-surface))!important}
  html:not([data-theme="royal-dark"]) :is(.directory-hero,.search-hero,.registration-intro,.recover-card) h1 {color:var(--portal-text)!important}
  html:not([data-theme="royal-dark"]) :is(.directory-hero,.search-hero,.registration-intro,.recover-card) p {color:var(--portal-muted)!important}
  .day-cell.weekend:not(.selected):not(.today) {background:var(--v4-inset)!important}
  .quick-notes-page .note-store-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  @media(min-width:940px) and (max-width:1180px) {
    .dash-layout--fixed:has(>.legasist-appbar) {display:grid!important;grid-template-columns:var(--portal-rail) minmax(0,1fr)!important}
    .dash-layout--fixed:has(>.legasist-appbar)>.dash-main {grid-column:2!important;width:auto!important;margin:0!important}
    .dash-layout--fixed:has(>.legasist-appbar)>.dash-sidebar {visibility:visible!important;display:block!important;pointer-events:auto!important;transform:none!important;width:var(--portal-rail)!important;max-width:none!important}
    .legasist-appbar .legasist-menu-toggle,.dash-layout--fixed:has(>.legasist-appbar) .legasist-sidebar-close {display:none!important}
    body:has(.legasist-appbar) .mobile-overlay {display:none!important}
  }
  @media(min-width:1100px) {
    .case-create-mode .case-fees {display:grid!important;grid-template-columns:minmax(145px,.84fr) minmax(200px,1.1fr) minmax(230px,1.15fr)!important;gap:10px 14px!important}
    .case-fees .fee-type-row {grid-column:1;grid-row:1/3;display:grid!important;align-content:start!important;grid-template-columns:1fr!important}
    .case-fees .fee-programmed-heading {grid-column:2;grid-row:1;margin:0!important}
    .case-fees .fee-programmed-schedule {grid-column:2;grid-row:2}
    .case-fees [data-fee-panel] {grid-column:3;grid-row:1/3;min-width:0}
    .case-fees .fee-totals {grid-column:1/-1}
  }
  @media(max-width:939px) {
    .case-metrics,.quick-notes-page .note-store-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .dash-layout--fixed:not(:has(>.legasist-appbar)) .dash-topbar .menu-toggle {display:inline-flex!important}
  }
  @media(max-width:600px) {
    .method-cards {grid-template-columns:1fr;gap:6px}
    .method-card {grid-template-columns:38px minmax(0,1fr);align-items:center;gap:0 10px;padding:10px!important}
    .method-card svg {grid-row:span 2;padding:7px!important}
    .method-card strong {margin:0}
    .quick-notes-page .note-store-grid {grid-template-columns:1fr!important}
    .case-metrics article {padding:11px;gap:8px}
  }
}
@layer pantallas {
  :is(.payment-panel,.flow-lawyer,.dashboard-body,.registration-page) :is(input,select,textarea):is(.invalid,.ls-invalid,[aria-invalid="true"]) {
    border-color:#be4137!important;box-shadow:0 0 0 2px #be413720!important
  }
  .method-cards:not(:has([aria-selected])) {display:none}
  .quick-notes-page .note-store-head .note-type-label {color:var(--portal-text)!important}
  html:not([data-theme="royal-dark"]) .directory-section--soft {background:var(--portal-canvas)!important}
  .agenda-page .day-cell.today .day-number {background:var(--v4-brand)!important;color:#fff!important}
  .account-context .account-page-content,.case-table .row-actions {min-width:0}
  .dash-main .quick-steps :is(strong,span) {color:#fff!important}
}

/* Shared navigation, readable foregrounds and compact action controls. */
@layer interfaz {
  :root { --logo-width:164px; --control-corner:5px; --card-corner:8px }
  .legasist-appbar-brand img,.brand-logo-img,.law-brand__logo,img[src$="legasist-logo-blue.png"] {
    display:block!important;width:var(--logo-width)!important;height:auto!important;max-width:none!important;max-height:none!important;object-fit:contain!important
  }
  :is(.legasist-appbar-brand,.brand--logo,.law-brand,.footer-logo--image) {width:auto!important;max-width:none!important;flex-shrink:0!important}
  .legasist-appbar .legasist-support-link {color:white!important;-webkit-text-fill-color:white!important;opacity:1!important;text-decoration:none!important}
  .legasist-support-link:is(:focus-visible,:hover) {text-decoration:underline!important}
  #sidebar.dash-sidebar {top:var(--portal-header)!important;bottom:0!important;box-sizing:border-box!important}
  #sidebar .dash-menu {position:static!important;transform:none!important;margin:0!important}
  #sidebar .dash-menu [data-nav-home] {display:flex!important;visibility:visible!important;opacity:1!important}
  #sidebar .dash-menu a>b {display:inline-grid!important;place-items:center!important;margin-left:auto!important;min-width:21px!important;height:21px!important;padding:0 4px!important;background:white!important;color:#114c8c!important;-webkit-text-fill-color:#114c8c!important;font:700 12px/1 "Legasist Jakarta",sans-serif!important;opacity:1!important;border:0!important;box-sizing:border-box!important}
  :is(.scan-hero,.support-heading,.billing-title,.agenda-hero,.welcome-card,.quick-hero,.store-hero,.security-hero,.profile-banner,.case-hero,.meet-hero,.notes-hero) :is(.kicker,.sec-tag,.eyebrow,.billing-chip,.pill) {display:inline-flex!important;width:fit-content!important;padding:5px 12px!important;background:#295e96!important;color:white!important;-webkit-text-fill-color:white!important;border:1px solid #668ab4!important;border-radius:5px!important;font-size:12px!important;letter-spacing:.025em!important}
  :is(.panel,.panelx,.stat-card,.scan-card,.bill-card,.table-panel,.support-section,.calendar-board,.day-panel,.result-card,.contact-card,.filter-panel,.quick-compose,.choose-plan,.payment-panel,.order-panel,.welcome-card,.scan-hero,.support-heading,.billing-title,.security-hero,.agenda-hero,.quick-hero,.form-section,.case-form-category,.note-store-card,.search-hero,.profile-detail,.quick-card,.profile-banner,.search-panel,.setup-card,.law-card,.review-card,.step-card,.mini-benefit,.legal-document article,.lawyer-login-card,.hero-box) {border-radius:var(--card-corner)!important}
  :is(.dash-btn,.law-btn,.button,.icon-action,.contact-action,.support-whatsapp,.legasist-account-menu summary,.result-meta span,.bill-actions>a,.bill-actions button,.login-button,.dash-menu>a,.search-submit,input:not([type=checkbox]):not([type=radio]),select,textarea) {border-radius:var(--control-corner)!important}
  :is(.dash-btn.primary,.button.primary,#toggleCreate,.billing-plan-head a,.contact-action.primary) {display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px;background:#14589e!important;border:1px solid #14589e!important;color:white!important;-webkit-text-fill-color:white!important;text-decoration:none!important}
  :is(.dash-btn,.contact-action,.button,.support-nav a) svg,:is(.dash-btn,.contact-action,.button,.support-nav a) svg * {color:inherit!important;stroke:currentColor!important}
  :is(.dash-btn.primary,.button.primary) :is(span,b) {color:inherit!important;-webkit-text-fill-color:inherit!important}
  .dash-main .dash-topbar:is(.user-page-heading,.account-page-topbar),.cases-page .dash-main .dash-topbar {position:static!important;display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:12px!important;background:transparent!important;box-shadow:none!important;border:0!important;color:var(--portal-text)!important;padding:0!important;margin:0 0 20px!important;height:auto!important;text-align:left!important}
  .cases-page .dash-main .dash-topbar {flex-direction:column!important}
  :is(.cases-page .dash-topbar,.user-page-heading,.account-page-topbar) :is(.top-title,h1,p){margin-inline:0!important;text-align:left!important;color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important}
  .cases-page .top-actions {display:flex!important;width:auto!important;justify-content:flex-start!important;gap:10px!important;padding:0!important;background:transparent!important}
  .cases-page .top-actions>.dash-btn,.scan-toolbar>.dash-btn:not([hidden]) {width:auto!important;flex:0 1 auto!important;padding:10px 15px!important;min-width:0!important}
  .cases-page .top-actions>a.dash-btn:not(.primary),.bill-actions .change-card,.result-view-profile {color:#154f89!important;-webkit-text-fill-color:#154f89!important;background:white!important;border:1px solid #a7bdd3!important}
  .row-actions .icon-action {width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:6px!important;color:#144d81!important;background:#ebf3fc!important;-webkit-text-fill-color:currentColor!important}
  .row-actions .case-open {background:#e3f3ea!important;color:#086441!important}
  .row-actions .manage-btn {background:#fff2cc!important;color:#7c5107!important}
  .row-actions .danger {background:#fbe9e8!important;color:#a02123!important}
  .row-actions .icon-action svg {width:17px!important;height:17px!important;opacity:1!important}
  .lawyer-dashboard #expedientes-recientes {margin-block:18px!important}
  .scanner-page .dash-main>.notice {width:fit-content!important;max-width:100%!important;box-sizing:border-box!important}
  .scan-card-main {padding:clamp(16px,2vw,28px)!important}
  .scanner-heading {display:flex!important;align-items:center;gap:10px;margin:0 0 8px;color:var(--portal-text)!important}
  .scanner-heading svg,.support-nav svg {width:34px!important;height:34px!important;padding:8px!important;box-sizing:border-box;background:#eaf3fd;color:#14589e;border-radius:5px;flex:none}
  .scanner-lead {margin:0 0 18px;color:var(--portal-muted)}
  .scanner-camera {padding:0!important;border:0!important;background:transparent!important}
  .scanner-camera>h2,.scanner-camera>p {display:none!important}
  .scanner-viewport {position:relative!important;border-radius:8px!important;min-height:230px!important}
  .scanner-viewport::after {content:"";position:absolute;inset:15px;pointer-events:none;background:linear-gradient(#89b4e0,#89b4e0) left top,linear-gradient(#89b4e0,#89b4e0) right top,linear-gradient(#89b4e0,#89b4e0) left bottom,linear-gradient(#89b4e0,#89b4e0) right bottom,linear-gradient(#89b4e0,#89b4e0) left top,linear-gradient(#89b4e0,#89b4e0) right top,linear-gradient(#89b4e0,#89b4e0) left bottom,linear-gradient(#89b4e0,#89b4e0) right bottom;background-repeat:no-repeat;background-size:22px 2px,22px 2px,22px 2px,22px 2px,2px 22px,2px 22px,2px 22px,2px 22px}
  .scanner-placeholder,.scanner-placeholder b {color:white!important}
  .scan-toolbar {display:flex!important;flex-wrap:wrap!important;gap:8px!important;background:none!important}
  .scan-toolbar #captureBtn {color:#154c83!important;-webkit-text-fill-color:currentColor!important;background:#e9f2fc!important;border:1px solid #bdd0e5!important}
  .scan-toolbar button:disabled {opacity:.72!important}
  .scan-save {display:flex!important;justify-content:flex-end!important;width:auto!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
  .scan-save button,.action-save-note,.case-create-submit,.agenda-page .day-panel button[type=submit] {width:fit-content!important;min-width:0!important;padding:12px 22px!important;background:#10794f!important;color:white!important;-webkit-text-fill-color:white!important}
  .billing-shell,.support-auth .support-stage,.support-stage>.container,.support-heading {box-sizing:border-box!important;width:100%!important;max-width:none!important;margin-inline:0!important}
  .support-public .support-stage {max-width:1280px;margin:auto;padding-inline:20px}
  .support-auth .support-stage,.support-stage>.container {padding:0!important}
  .support-heading h1,.billing-title h1,.search-hero h1 {font-size:clamp(27px,3vw,40px)!important;line-height:1.13!important;color:white!important}
  .support-nav,.support-documents,.support-contact-columns,.billing-facts {display:grid!important;gap:14px!important}
  .support-nav {grid-template-columns:repeat(4,minmax(0,1fr))!important;margin:16px 0!important}
  .support-nav a {display:flex!important;align-items:center!important;gap:10px!important;padding:14px!important;background:var(--portal-surface)!important;color:var(--portal-text)!important;border:1px solid var(--portal-edge)!important;border-bottom:3px solid #2765a4!important;border-radius:6px!important;font-size:14px!important}
  .support-nav a:nth-child(2),.support-documents>#privacidad,.support-legal-actions article:first-child {border-bottom-color:#18855e!important}
  .support-nav a:nth-child(3),.support-legal-actions #terminos {border-bottom-color:#cc8523!important}
  .support-nav a:nth-child(4) {border-bottom-color:#268895!important}
  .support-faq {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start;gap:10px!important}
  .support-faq details {margin:0!important;border:1px solid var(--portal-edge)!important;border-radius:5px!important}
  .support-documents {grid-template-columns:1.3fr 1fr 1fr!important;margin:16px 0}
  .support-legal-actions {display:contents!important}
  .support-documents :is(article,#privacidad) {margin:0!important;padding:20px!important;border-radius:8px!important;border:1px solid var(--portal-edge)!important;border-bottom:3px solid!important;background:var(--portal-surface)!important;color:var(--portal-text)!important}
  .support-contact-columns {grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important}
  .support-contact-grid {grid-template-columns:1fr!important}
  .support-form-panel {padding:18px;background:var(--v4-inset);border:1px solid var(--portal-edge);border-radius:7px}
  .support-form-panel .support-form {padding:0!important;margin:0!important}
  .support-form-panel .support-form-title {margin:0 0 14px!important}
  .support-whatsapp,.contact-action.whatsapp:not(.disabled) {background:#10794f!important;color:white!important;-webkit-text-fill-color:white!important}
  .billing-page .billing-grid {grid-template-columns:minmax(0,2.15fr) minmax(225px,1fr)!important}
  .billing-grid>section.bill-card {display:block!important}
  .billing-plan-head {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:16px}
  .billing-plan-head h2 {margin:0!important}
  .billing-plan-head a {padding:10px 14px;border-radius:5px;font-weight:700}
  .billing-facts {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .billing-facts .bill-kv {display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:4px!important}
  .billing-facts .bill-kv b {text-align:left!important}
  .billing-progress {width:100%}
  .billing-grid .hero-box {background:var(--v4-inset)!important;color:var(--portal-text)!important}
  .hero-box :is(span,strong),.bill-kv :is(span,b) {color:var(--portal-text)!important}
  .billing-grid aside .empty-state {min-height:125px;display:grid;place-items:center;text-align:center}
  .bill-actions .danger {color:#992b27!important;background:#fcecea!important}
  .brand-strip__cards>span {font-weight:700;font-size:12px;color:var(--portal-text)!important;background:var(--v4-inset)!important}
  .lawyer-login-card {width:min(1100px,100%)!important;min-height:530px!important}
  .lawyer-login-form-panel {padding:clamp(24px,3.4vw,50px)!important;align-content:center!important}
  .lawyer-login-form-panel h2 {font-size:clamp(26px,2.6vw,37px)!important}
  .lawyer-login-form {grid-template-columns:minmax(0,1fr)!important;gap:16px!important}
  .search-lawyer-page .search-hero {background:var(--portal-banner)!important;padding:clamp(20px,2.5vw,38px)!important}
  .search-hero .container,.search-lawyer-page .search-shell {width:100%!important;max-width:none!important;box-sizing:border-box!important}
  .search-hero .container {padding:0!important;margin:0!important}
  .search-lawyer-page .search-hero :is(h1,p) {color:white!important;-webkit-text-fill-color:white!important}
  .result-photo:has(.avatar-initials) {display:grid!important;place-items:center!important;background:#e7f1fc!important;border-radius:6px!important}
  .result-photo .avatar-initials {display:block!important;position:static!important;opacity:1!important;color:#195790!important;font-size:26px!important;font-weight:750!important}
  .result-photo:has(.avatar-initials) svg {display:none!important}
  .result-actions,.bill-actions {display:flex!important;align-items:center;flex-wrap:wrap;gap:10px!important}
  .result-actions>a,.bill-actions>a {width:auto!important;flex:0 1 auto!important;min-width:0!important}
  .contact-card#contactar {background:var(--portal-surface)!important;color:var(--portal-text)!important;border:1px solid var(--portal-edge)!important;padding:20px!important;scroll-margin-top:calc(var(--portal-header) + 14px)}
  #contactar :is(h3,p){color:var(--portal-text)!important}
  .contact-action {display:flex!important;align-items:center;gap:9px;box-sizing:border-box!important;background:var(--v4-inset)!important;border:1px solid var(--portal-edge)!important;color:var(--portal-text)!important;padding:10px 14px!important;text-decoration:none!important}
  .contact-action.disabled {opacity:.65!important}
  .message-label {grid-column:1/-1;color:var(--portal-text);font-weight:700}
  .chat-form-clean {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;align-items:end}
  @media(max-width:850px) {
    .support-nav,.support-documents {grid-template-columns:repeat(2,minmax(0,1fr))!important}
    .support-contact-columns,.billing-page .billing-grid {grid-template-columns:minmax(0,1fr)!important}
  }
  @media(max-width:620px) {
    :root {--logo-width:126px}
    .legasist-appbar {padding-inline:8px!important}
    .legasist-appbar-actions {gap:4px!important}
    .legasist-appbar-actions :is(.legasist-plan-link,summary) {padding:6px!important;font-size:11px!important}
    .support-faq,.support-documents,.billing-facts,.scanner-workspace,.scan-top-fields {grid-template-columns:minmax(0,1fr)!important}
    .support-nav a {padding:9px!important;gap:5px!important;font-size:12px!important}
    .lawyer-login-card {min-height:0!important}
    .result-actions .button {min-height:40px}
  }
}
@layer interfaz {
  .support-section#contacto {display:block!important}
  .support-contact-columns>*,.support-form-panel label,.billing-facts>div {min-width:0}
  .support-contact-columns .support-actions {margin:15px 0 0!important}
  .support-auth .support-nav :is(a,svg) {text-decoration:none!important}
  .support-legal-actions .button {background:var(--portal-surface)!important;color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important;border:1px solid var(--portal-edge)!important}
  .chat-form-clean .message-label {text-align:left!important}
  .scan-toolbar button[hidden] {display:none!important}
  .billing-grid aside .empty-state {border:1px dashed var(--portal-edge)!important;border-radius:6px!important;background:var(--v4-inset)!important;color:var(--portal-muted)!important}
  .search-hero h1 span {color:white!important;-webkit-text-fill-color:white!important}
  .result-actions .result-contact-primary {order:-1}
  @media(max-width:480px) {
    .support-form-panel .support-form {grid-template-columns:minmax(0,1fr)!important}
    .legasist-appbar .legasist-plan-link {white-space:normal!important;max-width:75px;line-height:1.2}
  }
}

@layer revision {
  #sidebar.dash-sidebar {padding-top:24px!important;margin-top:0!important;min-height:0!important;max-height:calc(100dvh - var(--portal-header))!important}
  #sidebar .dash-menu>a {border:0!important;border-bottom:1px solid rgba(255,255,255,.19)!important}
  .legasist-appbar {border-bottom:1px solid #ffffff26!important}
  :is(.agenda-hero,.store-hero,.welcome-card,.case-header,.security-hero,.billing-title,.scan-hero,.support-heading,.person-hero-v2,.profile-banner) :is(h1,h1 *,p,p strong) {color:#fff!important;-webkit-text-fill-color:#fff!important}
  :is(.notice,.notice-soft,.flow-alert,.alert,.helper-card,.panel-help,.empty-note,.empty-state,.empty-v,.scan-empty,.source-empty,.quick-auto-type,.audio-capture-status,.ai-disclaimer,.support-notice):not(.error,.err,.danger,[role=alert]) {color:#185741!important;background-color:#eaf6ef!important;border-color:#c4e2d3!important}
  :is(.dash-btn,.button,button).primary[type=submit]:not(.danger,.mini-danger),.action-save-note,.case-create-submit,.table-actions a[href^="persona_contactar"],.management-save,.user-dashboard .result-contact-primary,#toggleCreate {color:#fff!important;-webkit-text-fill-color:#fff!important;background:#11794f!important;border-color:#106e4a!important}
  .agenda-page .agenda-hero,.quick-notes-page .store-hero {position:relative!important;background:var(--portal-banner)!important;padding:clamp(18px,2.2vw,34px)!important;min-height:150px!important;box-sizing:border-box!important}
  .agenda-hero {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:16px!important}
  .agenda-hero h1,.store-hero h1,.case-header h1,.welcome-card h1 {font-size:clamp(26px,2.6vw,40px)!important;line-height:1.13!important;letter-spacing:-.045em!important;margin:10px 0 8px!important}
  .agenda-hero p,.store-hero p {max-width:64ch;line-height:1.55!important;font-size:14px!important}
  .agenda-hero .hero-stats {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important}
  .agenda-hero .hero-stat {display:grid!important;grid-template-columns:auto 1fr!important;align-items:center!important;min-width:0!important;width:clamp(94px,9vw,146px)!important;box-sizing:border-box;background:#fff!important;color:#102b51!important;border-radius:11px!important;padding:13px!important;gap:5px!important}
  .hero-stat svg,.calendar-title>svg,.quick-compose h2>svg,.ai-header h2>svg,.panel-headline h2>svg {width:31px!important;height:31px!important;padding:7px;background:#e9f2fc;color:#14589e;box-sizing:border-box;border-radius:6px;vertical-align:middle}
  .agenda-hero .hero-stat b {color:#102b51!important;text-align:right!important;font-size:clamp(20px,2vw,32px)!important}
  .agenda-hero .hero-stat span {grid-column:1/-1;font-size:10px!important;text-align:left!important;text-transform:uppercase;color:#465a71!important}
  .agenda-page .agenda-shell {display:grid!important;grid-template-columns:minmax(0,2.8fr) minmax(280px,1fr)!important;gap:16px!important}
  .agenda-page .calendar-head,.agenda-page .panel-section {padding:16px!important}
  .calendar-title {display:flex!important;align-items:center!important;gap:10px!important}
  .agenda-page .calendar-title h2,.day-panel .selected-date h2 {font-size:clamp(18px,1.65vw,25px)!important;margin:0!important}
  .agenda-page .panel-section .panel-title,.agenda-page .helper-card h3 {font-size:17px!important;line-height:1.3!important;margin:0 0 10px!important}
  .agenda-page .panel-section .empty,.event-count {color:#185741!important;background:#eaf6ef!important;padding:7px!important;font-size:12px!important;border-radius:5px}
  .calendar-actions .dash-btn,.agenda-page .notification-enable {background:var(--portal-surface)!important;color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important;border:1px solid var(--portal-edge)!important;padding:8px 12px!important;min-height:36px!important}
  .calendar-actions .dash-btn:nth-child(2) {background:#14589e!important;color:white!important}
  .agenda-page .day-cell {height:auto!important;max-height:none!important;min-width:0!important;justify-content:flex-start!important}
  .agenda-page .event-chip {white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important;text-overflow:clip!important;overflow:visible!important;display:block!important;max-height:none!important;-webkit-line-clamp:unset!important;line-height:1.25!important;border-radius:5px!important}
  .agenda-page .pretty-calendar {grid-auto-rows:auto!important;align-items:stretch!important}
  .agenda-page .day-tags {overflow:visible!important}
  .reminder-times {list-style:none!important;padding:0!important;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .reminder-times li {background:var(--portal-surface);color:var(--portal-text);padding:7px;border:1px solid var(--portal-edge);border-top:3px solid #2469ab;border-radius:5px;font-size:11px!important}
  .reminder-times li:nth-child(2){border-top-color:#ce922a}.reminder-times li:last-child{border-top-color:#b94339}
  .reminder-times b {display:block}
  .agenda-page .day-panel .form-grid button[type=submit] {width:100%!important}
  .store-hero .quick-hero-copy {max-width:70%!important}
  .quick-notes-page .quick-form {display:grid!important;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;gap:14px!important}
  .quick-form>.quick-title-row,.quick-form>.quick-submit-row,.quick-form>.quick-file-box {grid-column:1/-1!important;grid-row:auto!important}
  .quick-notes-page .quick-title-row {display:block!important}
  .quick-title-row input {width:100%!important;margin-top:6px!important}
  .quick-form>.audio-capture-box,.quick-form>.quick-text {grid-row:auto!important;grid-column:auto!important;min-width:0}
  .quick-text textarea {width:100%!important;height:calc(100% - 24px)!important;min-height:150px!important;box-sizing:border-box}
  .quick-submit-row {display:flex!important;justify-content:flex-end!important;gap:10px!important;background:none!important}
  .quick-file-box {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;padding:15px!important;background:var(--v4-inset)!important;border:1px dashed var(--portal-edge)!important}
  .quick-auto-type {grid-column:1/-1!important;padding:10px!important}
  .quick-file-item {min-width:0!important;background:var(--portal-surface)!important}
  .audio-live-row {display:grid!important;grid-template-columns:auto auto minmax(0,1fr)!important;gap:4px 12px!important;align-items:center!important}
  .audio-live-row [data-voice-toggle] {grid-row:1/3;position:relative!important;width:56px!important;min-width:56px!important;height:56px!important;border-radius:50%!important;color:#fff!important;background:#ba312d!important;border:3px solid #f4c5bf!important;box-shadow:0 2px 10px #b8444830!important;display:grid!important;place-items:center!important;padding:0!important}
  [data-voice-toggle] svg {display:none!important}
  .audio-live-row [data-voice-toggle]::before {content:'●';font-size:21px}
  .audio-live-row [data-voice-toggle][data-mode=recording] {background:#a45409!important;border-color:#efc494!important}
  .audio-live-row [data-voice-toggle][data-mode=recording]::before {content:'Ⅱ'}
  .audio-live-row [data-voice-toggle][data-mode=paused]::before {content:'▶'}
  .audio-live-row [data-voice-toggle] span {position:absolute!important;top:100%;margin-top:4px;color:var(--portal-text)!important;font-size:10px!important;display:block!important}
  .audio-live-row .audio-ready-status {grid-column:2/-1!important}
  .audio-capture-actions {display:flex!important;gap:10px!important;margin-top:22px!important}
  .audio-capture-actions>button {flex:1 1 auto!important}
  .audio-capture-status {display:block;padding:6px;margin-top:8px}
  .quick-notes-page .note-store-grid {display:grid!important;grid-template-columns:1fr!important;gap:0!important;border:1px solid var(--portal-edge);border-radius:8px;overflow:visible}
  .quick-list-head,.quick-notes-page .note-store-card {display:grid!important;grid-template-columns:minmax(140px,1.6fr) minmax(65px,.65fr) minmax(78px,.7fr) minmax(72px,.6fr) minmax(170px,1.25fr)!important;gap:8px!important;align-items:center!important;padding:12px!important;border-radius:0!important;box-shadow:none!important}
  .quick-list-head {background:var(--v4-inset);font-size:10px;text-transform:uppercase;color:var(--portal-muted);font-weight:700}
  .note-store-card .note-store-head {display:contents!important}
  .note-store-card .note-row-copy {grid-area:1/1}.note-store-card .note-type-label{grid-area:1/2}.note-store-card .note-date{grid-area:1/3}.note-store-card .note-state-label{grid-area:1/4}.note-store-card .note-row-actions{grid-area:1/5;display:flex!important;gap:5px;flex-wrap:wrap}
  .note-file {grid-column:1/-1!important;min-width:0}.note-file audio{max-width:100%}
  .filter-strip [aria-current=page]{background:#14589e!important;color:white!important}
  .home-case-row {display:grid;grid-template-columns:minmax(0,2.15fr) minmax(205px,1fr);gap:16px;align-items:start;margin:16px 0}
  .home-case-row>* {min-width:0}.lawyer-dashboard .home-case-row #expedientes-recientes {margin:0!important}
  .home-case-row .dash-table {min-width:0!important;font-size:12px!important}
  .home-case-row .quick-card {display:grid!important;grid-template-columns:35px 1fr;gap:2px 9px!important;padding:10px!important;align-items:center}
  .home-case-row .quick-card .qicon {grid-row:1/3}
  .home-case-row .quick-card :is(h3,p){margin:0!important}
  .home-messages {margin-top:16px}
  .case-table .priority-row>td:first-child {border-left:3px solid var(--priority-marker,#7f9b87)!important}
  .priority-row-urgente{--priority-marker:#c93931}.priority-row-alta{--priority-marker:#d27b17}.priority-row-media{--priority-marker:#d5a620}
  .case-detail-page .case-header {display:block!important;width:auto!important;background:var(--portal-banner)!important;padding:clamp(20px,2.25vw,34px)!important;margin:0 0 40px!important}
  .case-detail-page .case-header>div {width:100%!important;max-width:none!important}
  .case-header .case-code,.case-header .case-data>span {display:inline-block;background:#295f97!important;color:white!important;border:1px solid #6d92b9!important;padding:5px 9px!important;border-radius:5px!important}
  .case-detail-page .case-management {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;margin:18px 0 -53px!important;align-items:start!important}
  .case-management summary :is(b,small,span){color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important;white-space:normal!important}
  .case-detail-page .workspace {display:grid!important;grid-template-columns:minmax(0,2.15fr) minmax(240px,1fr)!important;gap:16px!important;align-items:start!important}
  .workspace-side,.workspace-main {min-width:0!important}
  .case-detail-page .panelx,.case-detail-page .side-content {padding:clamp(14px,1.4vw,23px)!important}
  .case-detail-page .ai-chat-box {background:var(--v4-inset)!important;border:1px solid var(--portal-edge)!important;padding:14px!important;border-radius:8px!important}
  .case-detail-page .ai-msg.user .ai-bubble,.case-detail-page .ai-msg.user .ai-body {background:#14589e!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
  .case-detail-page .ai-msg.assistant .ai-bubble {background:var(--portal-surface)!important;color:var(--portal-text)!important;border:1px solid var(--portal-edge)!important}
  .ai-header h2 small,.event-count {font-size:11px;padding:4px 7px;border-radius:5px}
  .ai-header h2 small {background:var(--v4-soft);color:var(--portal-text)}
  .case-detail-page .source-card {display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important;padding:10px 0!important;border:0!important;border-bottom:1px solid var(--portal-edge)!important;box-shadow:none!important;background:transparent!important}
  .source-name {overflow-wrap:anywhere!important}
  .file-kind {display:inline-grid;justify-items:center;align-content:center;gap:2px;min-width:38px;max-width:72px;padding:5px;border-radius:5px;color:#164f80;background:#e8eff9}
  .file-kind svg{width:16px;height:16px}.file-kind small{font-size:9px;line-height:1.15}
  .kind-pdf{color:#a1202e;background:#ffeaec}.kind-hoja,.kind-audio{color:#146346;background:#e5f6ed}.kind-presentacion,.kind-zip{color:#834900;background:#fff2da}.kind-video,.kind-imagen{color:#594283;background:#f0ecfa}
  .selected-source{display:flex;align-items:center;gap:8px;margin-top:5px;overflow-wrap:anywhere}
  .files-subheading {font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--portal-muted)}
  @media(max-width:980px){
    .agenda-hero {grid-template-columns:1fr!important}.agenda-hero .hero-stats{width:fit-content;max-width:100%}
    .agenda-page .agenda-shell,.case-detail-page .workspace {grid-template-columns:minmax(0,1fr)!important}
    .case-detail-page .case-management {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  }
  @media(max-width:760px){
    .quick-form,.quick-notes-page .quick-form,.quick-notes-page .quick-file-box,.home-case-row {grid-template-columns:minmax(0,1fr)!important}
    .quick-notes-page .note-store-card {grid-template-columns:1fr auto!important}
    .quick-list-head {display:none!important}
    .note-store-card .note-row-copy {grid-area:1/1/2/3}.note-store-card .note-row-actions {grid-area:auto;grid-column:1/-1}.note-store-card :is(.note-type-label,.note-state-label,.note-date){grid-area:auto}
    .quick-notes-page .store-hero .quick-hero-copy {max-width:100%!important}
    .agenda-hero .hero-stat{width:100%!important}.agenda-hero .hero-stats{width:100%}
    .agenda-page .day-cell {padding:3px!important}.agenda-page .event-chip{font-size:10px!important}
  }
}

@layer revision {
  .table-actions a[href^="persona_contactar"] {order:-1}
  .agenda-page .pretty-calendar {grid-template-columns:repeat(7,minmax(0,1fr))!important}
  .agenda-page .day-cell::after {content:none!important}
  .selected-date>span:empty {display:none!important}
  .case-detail-page .case-management-more p {color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important}
  .agenda-page .agenda-hero .hero-stat:last-child b {overflow-wrap:anywhere}
  .lawyer-dashboard .stat-card progress {display:block;width:100%;height:5px;accent-color:#16865d;margin:6px 0;border:0;border-radius:3px;overflow:hidden}
  .stat-card progress::-webkit-progress-bar{background:#e7eff8}.stat-card progress::-webkit-progress-value{background:#16865d}
  .lawyer-dashboard .table-actions {display:flex!important;align-items:center;flex-wrap:wrap;gap:6px!important}
  .lawyer-dashboard .table-actions>a {padding:7px 10px!important;font-size:12px!important}
  .case-detail-page .ai-msg.user .ai-meta {color:#fff!important}
  @media(max-width:600px) {
    .agenda-page .pretty-calendar{gap:3px!important;padding:6px!important}
    .agenda-page .day-number{min-width:18px!important}
    .case-management summary {min-height:52px}
  }
}
@layer revision {
  .cases-page .case-metrics article {padding:15px!important;min-height:78px!important;box-sizing:border-box}
  .case-metrics strong small {font-size:13px;font-weight:600;color:var(--portal-muted)}
  .cases-page .case-table th {padding:13px 9px!important;background:var(--v4-inset)!important;color:var(--portal-muted)!important;font-size:10px!important;letter-spacing:.035em;text-transform:uppercase}
  .cases-page .case-table td {padding:13px 9px!important;vertical-align:middle!important}
  .cases-page .case-table .badge {border:0!important;padding:4px 8px!important}
  .case-table .badge.priority-urgente {background:#b52f2a!important;color:white!important}
  .case-table .badge.priority-alta {background:#ffe7c8!important;color:#864100!important}
  .case-table .badge.priority-media {background:#fff0b5!important;color:#71520a!important}
  .case-table .badge:is(.priority-baja,.state-active){background:#e3f4ea!important;color:#126144!important}
  .case-table .due-danger {background:#fce7e5!important;color:#a32c29!important}
  .case-table .due-neutral {background:var(--v4-inset)!important;color:var(--portal-muted)!important}
  .case-detail-page .side-title {display:flex;align-items:center;gap:9px;font-size:18px!important;margin:16px 16px 0!important;color:var(--portal-text)!important}
  .side-title>svg {width:22px;height:22px}.side-title small{margin-left:auto;font-size:12px}
  .case-detail-page .source-actions .icon-btn {background:#e5f4ec!important;color:#176244!important;border:0!important}
  .case-detail-page .source-actions button.icon-btn {background:#fbeae8!important;color:#a32c29!important}
  .dashboard-body :is(.helper-text,.voice-status,.source-empty,.scan-empty-help,.info-note,.notice.ok,.empty),.case-detail-page .panel-help {color:#185741!important;background:#eaf6ef!important;border-radius:5px!important;padding:7px 9px!important}
}

@layer acabado {
  :root {--control-corner:8px;--card-corner:14px}
  :is(.panel,.panelx,.stat-card,.bill-card,.scan-card,.form-section,.case-form-category,.case-management-card,.side-section,.note-store-card,.payment-panel,.order-panel,.filter-panel,.result-card,.support-section,.calendar-board,.day-panel,.choose-plan,.table-panel,.quick-compose,.contact-card,.lawyer-login-card,.legal-document article) {border-radius:var(--card-corner)!important}
  :is(.button,.dash-btn,.law-btn,.contact-action,.quick-card,.day-cell,.filter-pill,.bill-actions a,.dash-menu>a,.dropzone,input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) {border-radius:var(--control-corner)!important}
  :is(.welcome-card,.case-header,.agenda-hero,.scan-hero,.store-hero,.billing-title,.support-heading,.security-hero,.profile-banner){border-radius:18px!important}
  .lawyer-dashboard .stats-grid {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;margin:16px 0!important}
  .lawyer-dashboard :is(.stat-card,.panel) {background:var(--portal-surface)!important;color:var(--portal-text)!important;border:1px solid var(--portal-edge)!important;box-shadow:0 5px 18px #234f7310!important}
  .lawyer-dashboard .stat-card {display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;padding:clamp(14px,1.45vw,22px)!important;min-width:0!important}
  .lawyer-dashboard .stat-top {display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;color:var(--portal-text)!important;font-size:13px!important}
  .lawyer-dashboard .stat-top .stat-icon {display:grid!important;place-items:center!important;order:-1!important;background:#eaf2fc!important;color:#155899!important;border:0!important;border-radius:9px!important;width:36px!important;height:36px!important;flex:none!important;padding:0!important}
  .lawyer-dashboard .stat-icon>svg {display:block!important;width:22px!important;height:22px!important;max-width:none!important;max-height:none!important;padding:0!important;background:none!important;border:0!important;color:#155899!important;stroke:currentColor!important;stroke-width:1.75!important}
  .lawyer-dashboard .stat-card>strong {font-size:34px!important;line-height:1.15!important;margin:6px 0 0!important;color:var(--portal-text)!important}
  .lawyer-dashboard .stat-card strong small {font-size:13px!important;color:var(--portal-muted)!important}
  .lawyer-dashboard .stat-card>small {font-size:12px!important;color:var(--portal-muted)!important}
  .lawyer-dashboard .panel-head,.lawyer-dashboard .panel-body {background:transparent!important;border:0!important;color:var(--portal-text)!important}
  .lawyer-dashboard .panel-head h2,.case-detail-page :is(.ai-header,.panel-headline) h2 {font-size:clamp(18px,1.65vw,23px)!important;color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important}
  .lawyer-dashboard .panel-head p {color:var(--portal-muted)!important}
  .lawyer-dashboard .panel-head .dash-btn,.home-case-stack .action-open-case {background:var(--portal-surface)!important;color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important;border:1px solid #88a8c3!important;padding:6px 10px!important;min-height:28px!important}
  .lawyer-dashboard .welcome-actions .primary {background:white!important;color:#154f89!important;-webkit-text-fill-color:currentColor!important}
  .lawyer-dashboard .home-case-stack {min-width:0}
  .case-detail-page .workspace {--source-width:32%;grid-template-columns:minmax(0,1fr) 14px minmax(270px,var(--source-width))!important;gap:0!important}
  .case-detail-page .workspace-main {grid-column:1!important;grid-row:1!important;padding:0!important}
  .case-detail-page .workspace-side {grid-column:3!important;grid-row:1!important;padding:0!important;margin:0!important;align-content:start!important}
  .case-detail-page .workspace-splitter {display:block!important;grid-area:1/2!important;min-width:0!important;width:14px!important;min-height:0!important;padding:0!important;margin:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
  .case-detail-page .workspace-splitter::after {content:none!important}
  .case-detail-page .workspace-splitter::before {content:""!important;inset:0 6px!important;background:transparent!important}
  .case-detail-page .workspace-splitter:is(:hover,:focus-visible)::before {background:#aac0d4!important}
  .case-detail-page .voice-controls {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;align-items:center!important}
  .case-detail-page [data-record-toggle] {grid-area:1/1;justify-self:start;position:relative!important;display:grid!important;place-items:center!important;width:55px!important;min-width:55px!important;height:55px!important;padding:0!important;border-radius:50%!important;background:#ba312d!important;color:white!important;border:3px solid #f5c6c0!important;margin-bottom:9px!important}
  .case-detail-page [data-record-toggle] svg {display:none!important}
  .case-detail-page [data-record-toggle]::before {content:'●';font-size:20px}
  .case-detail-page [data-record-toggle][data-mode=recording] {background:#a45409!important;border-color:#efd0a6!important}
  .case-detail-page [data-record-toggle][data-mode=recording]::before {content:'Ⅱ'}
  .case-detail-page [data-record-toggle][data-mode=paused]::before {content:'▶'}
  .case-detail-page [data-record-toggle] span {display:block!important;position:absolute!important;top:100%;left:50%;transform:translateX(-50%);font-size:11px!important;color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important}
  .case-detail-page .voice-live {grid-area:1/2!important;min-width:0}
  .case-detail-page :is(.voice-stop,.voice-play) {grid-row:2!important;width:100%!important}
  @media(max-width:980px) {
    .case-detail-page .workspace {grid-template-columns:minmax(0,1fr)!important}
    .case-detail-page .workspace-splitter {display:none!important}
    .case-detail-page .workspace-side {grid-area:2/1!important;margin-top:16px!important}
  }
  @media(max-width:760px){.lawyer-dashboard .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}}
  @media(max-width:389px){.lawyer-dashboard .stat-top{gap:5px!important}.lawyer-dashboard .stat-card{padding:9px!important}}
}

@layer lectura {
  :where(h1,h2,h3,h4,label,summary,button,input,select,textarea,th,td) {
    font-family:"Legasist Jakarta","Segoe UI",sans-serif!important
  }
  .dashboard-body a.action-open-case,
  :is(.client-area,body:has(.legasist-appbar-brand[href="dashboard_usuario.php"])) :is(.button.primary,.dash-btn.primary,a.contact-action:not(.disabled)),
  :is(.choose-plan,.plan-mini) .law-btn {
    background:#1559a1!important;color:#fff!important;-webkit-text-fill-color:currentColor!important;
    border:1px solid #1559a1!important
  }
  .dashboard-body a.action-open-case:hover,.client-area a.contact-action:not(.disabled):hover {
    background:#10477f!important
  }
  :is(.client-area,body:has(.legasist-appbar-brand[href="dashboard_usuario.php"])) :is(.panel,.panel-head,.panel-body,.contact-card,.result-card,.filter-panel,.filter-panel__head,.favorite-card,.list-item,.profile-detail,.quick-card,.dash-table td,.lawyer-identity) {
    background:var(--portal-surface)!important;color:var(--portal-text)!important
  }
  :is(.client-area,body:has(.legasist-appbar-brand[href="dashboard_usuario.php"])) :is(.panel,.result-card,.filter-panel,.favorite-card,.contact-card) :is(h2,h3,h4,p,label,td,strong,b,.muted-line,.result-sub,.result-text,.profile-detail span) {
    color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important
  }
  :is(.client-area,body:has(.legasist-appbar-brand[href="dashboard_usuario.php"])) :is(.result-meta span,.lawyer-title .kicker,.chip,.badge-soft,.qicon) {
    background:#e9f2fd!important;color:#194f83!important;-webkit-text-fill-color:currentColor!important
  }
  :is(.client-area,body:has(.legasist-appbar-brand[href="dashboard_usuario.php"])) :is(.search-hero,.favorites-hero,.support-control-hero,.welcome-card) {
    background:var(--portal-banner)!important;color:#fff!important
  }
  :is(.client-area,body:has(.legasist-appbar-brand[href="dashboard_usuario.php"])) :is(.search-hero,.favorites-hero,.support-control-hero,.welcome-card) :is(h1,h2,p) {
    color:white!important;-webkit-text-fill-color:currentColor!important
  }
  :is(.dashboard-body,.client-area) :is(.notice-soft,.empty-state,.helper-card,.ls-plan-capacity):not(.error,.danger) {
    background:#e9f6ef!important;color:#185741!important;-webkit-text-fill-color:currentColor!important
  }
  .agenda-page .helper-card :is(summary,h3,p) {color:#185741!important;-webkit-text-fill-color:currentColor!important}
  .ls-plan-capacity {padding:9px 12px;border-radius:8px}
  details.ls-disclosure>summary {
    display:flex!important;align-items:center!important;gap:8px;min-height:40px;cursor:pointer;
    list-style:none!important;font-size:16px!important;font-weight:700;color:var(--portal-text)!important;
    -webkit-text-fill-color:currentColor!important
  }
  details.ls-disclosure>summary::-webkit-details-marker {display:none}
  details.ls-disclosure>summary::after {
    content:""!important;position:static!important;display:block!important;margin-left:auto!important;
    width:8px!important;height:8px!important;flex:0 0 8px;background:none!important;
    border:solid currentColor!important;border-width:0 2px 2px 0!important;
    transform:rotate(45deg)!important
  }
  details.ls-disclosure[open]>summary::after {transform:rotate(225deg)!important}
  details.ls-disclosure>summary svg {width:21px;height:21px}
  details.ls-disclosure>summary:focus-visible {outline:2px solid #468bcf;outline-offset:2px}
  html[data-theme="royal-dark"] .agenda-page :is(.calendar-board,.day-panel,.pretty-calendar,.panel-section,.selected-date,.calendar-head) {
    background:#1b3652!important;color:#eff6ff!important;border-color:#405e79!important
  }
  html[data-theme="royal-dark"] .agenda-page .day-cell {
    background:#25425f!important;color:#fff!important;border-color:#4a6682!important
  }
  html[data-theme="royal-dark"] .agenda-page .day-cell.weekend {background:#203c57!important}
  html[data-theme="royal-dark"] .agenda-page .day-cell.muted {background:#1d344c!important}
  html[data-theme="royal-dark"] .agenda-page .day-cell.selected {background:#28547e!important;outline:2px solid #9acaff;outline-offset:-2px}
  html[data-theme="royal-dark"] .agenda-page .day-number {color:#173b5c!important;background:#dfebfa!important;-webkit-text-fill-color:currentColor!important}
  html[data-theme="royal-dark"] .agenda-page .reminder-times li,
  html[data-theme="royal-dark"] .agenda-page .reminder-times li b {background:#f6fcf8!important;color:#194b3b!important;-webkit-text-fill-color:currentColor!important}
}
@layer lectura {
  .client-area .result-actions .result-view-profile,
  .client-area .dash-main .panel-head .dash-btn,
  .client-area .dash-main .quick-card :is(b,strong,span:not(.qicon)) {
    color:var(--portal-text)!important;background:var(--portal-surface)!important;-webkit-text-fill-color:currentColor!important
  }
  .client-area .support-control-metrics>article {background:#eef5ff!important;color:#173c64!important}
  .client-area .support-control-metrics>article :is(strong,b,span) {color:#173c64!important;-webkit-text-fill-color:currentColor!important}
}

@layer lectura {
  .case-fees :is([data-planned-add],[data-fee-add],[data-planned-remove],[data-fee-remove]) {
    display:inline-flex!important;align-items:center;justify-content:center;gap:6px;
    min-height:36px!important;padding:7px 13px!important;border-radius:8px!important;
    background:#1559a1!important;border:1px solid #1559a1!important;color:#fff!important;
    -webkit-text-fill-color:currentColor!important;font:inherit;font-weight:700
  }
  .case-fees :is([data-planned-remove],[data-fee-remove]) {background:#fff2f0!important;color:#982e27!important;border-color:#e3b9b6!important}
  .case-fees :is(input:not([type=hidden]),select) {background:var(--portal-surface)!important;color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important}
  .case-fees input::placeholder {color:var(--portal-muted)!important;opacity:1!important;-webkit-text-fill-color:currentColor!important}
  .case-fees .fee-totals {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px!important;padding:12px!important}
  .case-fees .fee-totals>div {display:grid!important;gap:5px!important;align-content:center;padding:14px 18px!important;border-radius:10px!important;min-width:0;overflow-wrap:anywhere;background:#ebf3fe!important;color:#154b81!important}
  .case-fees .fee-totals>div:nth-child(2) {background:#e8f5ef!important;color:#155e45!important}
  .case-fees .fee-totals>div:nth-child(3) {background:#fff5e6!important;color:#804c10!important}
  .case-fees .fee-totals>div :is(span,strong) {color:inherit!important;-webkit-text-fill-color:currentColor!important;margin:0!important}
  @media(max-width:600px){.case-fees .fee-totals{grid-template-columns:1fr!important}}
}
@layer lectura {
  .quick-notes-page .standalone-note-link {min-width:0;flex:1}
  .quick-notes-page .standalone-note-link h4 {margin:0 0 8px}
  .quick-notes-page .standalone-note-link .move-form {position:static!important;display:grid!important;width:100%!important;max-width:100%;box-sizing:border-box}
}

@layer lectura {
  .case-fees [data-fee-panel="porcentual"]:not([hidden]) {
    display:grid!important;grid-template-columns:minmax(0,13rem) minmax(0,9rem)!important;
    gap:12px!important;align-content:start!important;align-items:start!important;
    justify-content:start!important;align-self:start!important;max-width:100%!important
  }
  .case-fees [data-fee-panel="porcentual"] label {display:grid;gap:6px;min-width:0}
  .case-fees [data-fee-panel="porcentual"] input {width:100%!important;box-sizing:border-box;min-width:0!important}
  .case-fees :is([data-fee-panel],[data-fixed-control])[hidden] {display:none!important}
  .case-fees button:is([data-planned-remove],[data-fee-remove]) {
    display:inline-grid!important;place-items:center!important;background:transparent!important;
    color:#b4222d!important;-webkit-text-fill-color:currentColor!important;
    border:0!important;box-shadow:none!important;border-radius:6px!important;
    width:36px!important;min-width:36px!important;height:36px!important;padding:0!important;
    font-size:25px!important;font-weight:750!important;line-height:1!important
  }
  html[data-theme="royal-dark"] .case-fees button:is([data-planned-remove],[data-fee-remove]) {color:#ff9199!important}
  .case-fees button:is([data-planned-remove],[data-fee-remove]):focus-visible {outline:2px solid currentColor;outline-offset:2px}
  .profile-photo-preview img,.vector-profile-avatar img {display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit}
  @media(max-width:450px){.case-fees [data-fee-panel="porcentual"]:not([hidden]) {grid-template-columns:minmax(0,13rem)!important}}
}

@layer lectura {
  #registroUsuario .registration-intro .mini-benefit,
  .login-role-page .register-redirect {
    background:#edf7f2!important;border:1px solid #badaca!important;color:#174c3a!important
  }
  #registroUsuario .mini-benefit :is(b,p,.check),
  .login-role-page .register-redirect :is(strong,p,b) {
    color:#174c3a!important;-webkit-text-fill-color:currentColor!important
  }
  #registroUsuario .mini-benefit .check {background:#cdebdc!important}
  .login-role-page .register-redirect .mini-button,
  .lawyer-dashboard .welcome-actions .primary,
  .lawyer-dashboard .action-open-case {
    background:#def3e7!important;color:#16563d!important;border:1px solid #a5cfb9!important;-webkit-text-fill-color:currentColor!important
  }
  .billing-page .billing-plan-head a.primary,.billing-page .bill-actions :is(a,button) {
    display:inline-flex!important;align-items:center;justify-content:center;width:fit-content!important;
    min-height:40px;padding:8px 15px!important;border-radius:8px!important;font-weight:700;-webkit-text-fill-color:currentColor!important
  }
  .billing-page .billing-plan-head a.primary {background:#15589d!important;color:white!important}
  .billing-page .bill-actions a.change-card {background:#edf4fb!important;color:#154b83!important;border:1px solid #afc7de!important}
  .billing-page .bill-actions button.danger {background:#fceeed!important;color:#912a29!important;border:1px solid #e3b8b4!important}
  .lawyer-dashboard .stat-card:nth-child(1),#gestion-etapa {--stripe:#679bd1;--wash:#edf4fc}
  .lawyer-dashboard .stat-card:nth-child(2),#gestion-honorarios {--stripe:#55a580;--wash:#ebf6f0}
  .lawyer-dashboard .stat-card:nth-child(3),#gestion-accion {--stripe:#c6974f;--wash:#fcf5e8}
  .lawyer-dashboard .stat-card:nth-child(4),#gestion-prioridad {--stripe:#9991c8;--wash:#f3f0fa}
  .lawyer-dashboard .stats-grid .stat-card,.case-detail-page .case-management-card {
    border-top:3px solid var(--stripe)!important
  }
  .lawyer-dashboard .stats-grid .stat-icon,.case-detail-page .case-management-card>summary {
    background:color-mix(in srgb,var(--portal-surface) 25%,var(--wash))!important
  }
  html[data-theme="royal-dark"] .case-management-card>summary {
    background:color-mix(in srgb,var(--portal-surface) 88%,var(--stripe))!important
  }
  .quick-columns {display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);align-items:start;gap:18px}
  .quick-columns>*,.quick-saved .note-row-copy {min-width:0}
  .quick-saved h2 {margin:0 0 12px}
  .quick-columns .quick-form,.quick-columns .quick-file-box {grid-template-columns:minmax(0,1fr)!important}
  .quick-columns .quick-submit-row {flex-wrap:wrap}
  .quick-saved .note-store-grid {grid-template-columns:minmax(0,1fr)!important}
  .quick-saved .note-store-card {display:flex!important;flex-flow:column nowrap!important;align-items:stretch!important;gap:8px!important;border-bottom:1px solid var(--portal-edge)!important}
  .quick-saved .note-store-head {display:flex!important;justify-content:space-between!important}
  .quick-saved .note-date {font-size:.8rem;color:var(--portal-muted)}
  .quick-saved .note-row-copy h3 {margin:0}
  .quick-saved :is(.note-content,.note-transcript p) {overflow-wrap:anywhere;margin:.3rem 0}
  .quick-saved .note-row-actions {align-items:flex-end!important}
  .quick-saved .standalone-note-link {flex:1 1 100%!important}
  .note-transcript>summary {display:list-item!important;cursor:pointer;font-weight:700;color:var(--portal-text);padding:6px 0}
  .note-transcript textarea {width:100%;box-sizing:border-box}
  @media(max-width:980px){.quick-columns{grid-template-columns:minmax(0,1fr)}}
}
@layer lectura {
  .lawyer-dashboard a.action-open-case:hover {background:#c8e9d7!important;color:#124b34!important}
  .quick-saved .note-store-card {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important}
  .quick-saved .note-store-head {display:flex!important;grid-area:1/1;justify-content:flex-start!important;gap:8px!important}
  .quick-saved .note-row-copy {grid-area:2/1/3/-1!important}
  .quick-saved .note-date {grid-area:1/2!important}
  .quick-saved .note-row-actions {grid-area:auto/1/auto/-1!important}
  .quick-saved .note-file {grid-area:auto/1/auto/-1!important}
  .quick-saved .move-form select,.quick-saved .move-form input {max-width:100%;min-width:0}
}

@layer lectura {
  .flow-lawyer .method-cards .method-card {
    background:#f7faff!important;color:#173954!important;text-align:left!important;
    border:1px solid #b9cbdc!important;-webkit-text-fill-color:currentColor!important
  }
  .flow-lawyer .method-cards .method-card.active {background:#e6f1fd!important;border-color:#155ba5!important}
  .flow-lawyer .method-card :is(strong,small) {color:#173954!important;-webkit-text-fill-color:currentColor!important}
  .flow-lawyer .method-card svg {color:#15599f!important;background:#deebf9!important}
  .flow-lawyer .method-card.active svg {background:#15599f!important;color:white!important}
  .flow-lawyer .order-panel .order-features {display:grid!important;grid-template-columns:minmax(0,1fr)!important}
  .flow-lawyer .order-panel :is(.order-feature,.order-plan,.billing-row) {
    display:flex!important;flex-wrap:wrap!important;align-items:baseline!important;justify-content:space-between!important;
    gap:5px 14px!important;text-align:left!important;word-break:normal!important;overflow-wrap:normal!important
  }
  .flow-lawyer .order-panel :is(.order-feature,.order-plan,.billing-row)>* {
    width:auto!important;min-width:0!important;max-width:100%;word-break:normal!important;overflow-wrap:normal!important;white-space:normal!important
  }
  .dashboard-body a.action-open-case,.lawyer-dashboard #expedientes-recientes a.action-open-case {
    background:#13754f!important;border-color:#13754f!important;color:white!important;-webkit-text-fill-color:currentColor!important
  }
  .dashboard-body a.action-open-case svg {stroke:currentColor!important;color:white!important}
  .dashboard-body a.action-open-case:hover,.lawyer-dashboard #expedientes-recientes a.action-open-case:hover {background:#0d5a3c!important}
  #expedientes-recientes .panel-head h2 {font-size:clamp(22px,1.8vw,26px)!important}
  #expedientes-recientes :is(.panel-head p,.dash-btn,.dash-table td) {font-size:14px!important;line-height:1.45!important}
  #expedientes-recientes .dash-table th {font-size:12px!important}
  .dashboard-body :is([data-voice-toggle],[data-record-toggle]) {
    width:54px!important;min-width:54px!important;max-width:54px!important;height:54px!important;min-height:54px!important;
    box-sizing:border-box!important;aspect-ratio:1;border-radius:50%!important;padding:0!important;flex:none!important;
    background:#167952!important;color:white!important;border:3px solid #b7dfcd!important
  }
  .dashboard-body :is([data-voice-toggle],[data-record-toggle])[data-mode=recording] {background:#96560c!important;border-color:#ecd3ae!important}
  .case-detail-page .ai-submit-row {display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important}
  .case-detail-page .ai-submit-row button {flex:0 0 auto!important;width:auto!important;min-width:0!important;min-height:34px!important;height:auto!important;margin:0!important;padding:7px 12px!important;font-size:13px!important;line-height:1.35!important}
  .case-detail-page .ai-submit-row .ai-stop-button {background:#ae2e38!important;color:white!important;border:1px solid #982831!important;-webkit-text-fill-color:currentColor!important}
  .case-detail-page .ai-submit-row .ai-stop-button:disabled {background:#faebec!important;color:#87414a!important;border-color:#e2bdc2!important;opacity:1!important}
  .quick-saved .file-list-line {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(78px,.45fr) minmax(78px,.4fr) minmax(74px,.35fr);
    align-items:center;gap:8px;padding:7px 10px;font-size:12px;line-height:1.4
  }
  .quick-saved .file-list-heading {background:var(--v4-inset);color:var(--portal-text);font-weight:700}
  .file-list-note {border-top:1px solid var(--portal-edge);min-width:0}
  .file-list-note>summary {list-style:none;cursor:pointer;color:var(--portal-text)}
  .file-list-note>summary::-webkit-details-marker {display:none}
  .file-list-title {font-weight:650;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .file-list-title::before {content:'▸';margin-right:7px}
  .file-list-note[open] .file-list-title::before {content:'▾'}
  .file-list-note .note-type-label {display:inline-flex;align-items:center;gap:4px}
  .file-list-note .note-type-label svg {width:15px;height:15px;flex:none}
  .file-list-note .note-state-label {justify-self:start}
  .file-list-detail {padding:8px 12px 12px;overflow-wrap:anywhere}
  @media(max-width:600px){
    .quick-saved .file-list-line {grid-template-columns:minmax(0,1fr) auto;gap:3px 10px}
    .quick-saved .file-list-heading {display:none}
    .file-list-line time {padding-left:16px}
  }
}

/* V24 — scoped fixes in the highest-priority existing important layer.
   Explicit foreground, fill and geometry protect against legacy global rules. */
@layer lectura {
  .lawyer-dashboard #solicitudes .table-actions a.action-contact {
    background:#13754f!important;border:1px solid #13754f!important;
    color:#fff!important;-webkit-text-fill-color:#fff!important;
  }
  .lawyer-dashboard #solicitudes .table-actions a.action-contact:hover {background:#0d5a3c!important;border-color:#0d5a3c!important}
  .lawyer-dashboard .home-case-row .quick-card {
    grid-template-columns:48px minmax(0,1fr)!important;column-gap:12px!important;
  }
  .lawyer-dashboard .quick-card .qicon {
    display:grid!important;place-items:center!important;width:48px!important;height:48px!important;
    min-width:48px!important;min-height:48px!important;padding:0!important;
    background:#e6f0fc!important;border:1px solid #bfd5ed!important;color:#16549b!important;font-size:24px!important;
  }
  .lawyer-dashboard .quick-card .qicon>svg {
    display:block!important;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;
    max-width:none!important;max-height:none!important;opacity:1!important;visibility:visible!important;
    padding:0!important;background:transparent!important;border:0!important;fill:none!important;
    color:#16549b!important;stroke:#16549b!important;stroke-width:1.85!important;
  }
  .lawyer-dashboard .quick-card .qicon>svg :is(path,rect,circle,line,polyline) {stroke:#16549b!important;fill:none!important}
  .lawyer-dashboard #expedientes-recientes .case-chip {background:#e5effe!important;color:#183d6c!important;-webkit-text-fill-color:currentColor!important;border:1px solid #c6daf3!important}
  .lawyer-dashboard #expedientes-recientes .matter-chip {background:#edf2f8!important;color:#344b63!important;-webkit-text-fill-color:currentColor!important;border:1px solid #d3dfeb!important}
  .lawyer-dashboard #expedientes-recientes .state-chip.active {background:#def3e7!important;color:#15553b!important;-webkit-text-fill-color:currentColor!important;border:1px solid #b2ddc6!important}
  .lawyer-dashboard #expedientes-recientes .state-chip.closed {background:#fff1d8!important;color:#795000!important;-webkit-text-fill-color:currentColor!important;border:1px solid #e8d3a7!important}
  html[data-theme="royal-dark"] .lawyer-dashboard #expedientes-recientes .case-chip {background:#26466d!important;color:#e5f0ff!important;border-color:#587da9!important}
  html[data-theme="royal-dark"] .lawyer-dashboard #expedientes-recientes .matter-chip {background:#34495f!important;color:#edf4ff!important;border-color:#667c91!important}
  html[data-theme="royal-dark"] .lawyer-dashboard #expedientes-recientes .state-chip.active {background:#164d3a!important;color:#c0f5d9!important;border-color:#47856c!important}
  html[data-theme="royal-dark"] .lawyer-dashboard #expedientes-recientes .state-chip.closed {background:#59411c!important;color:#ffe8b6!important;border-color:#9d7840!important}
  html[data-theme="royal-dark"] .lawyer-dashboard #expedientes-recientes .dash-table td {background:var(--portal-surface)!important;color:var(--portal-text)!important;border-color:var(--portal-edge)!important;-webkit-text-fill-color:currentColor!important}
  .lawyer-dashboard .welcome-card .welcome-avatar {grid-row:1/4!important}
  .quick-notes-page .qn-stage .qn-stage-copy h1,
  .scanner-page .scn-stage .scn-stage-copy h1 {color:#fff!important;-webkit-text-fill-color:#fff!important}
  .quick-notes-page .qn-console .qn-field>label,
  .scanner-page .scn-console .scn-fields label,
  .scanner-page .scn-save-well label {color:#fff!important;-webkit-text-fill-color:#fff!important}
  .quick-notes-page .qn-voice-main {display:grid!important;grid-template-columns:100px auto minmax(50px,1fr)!important;gap:12px!important}
  .quick-notes-page .qn-voice-main .qn-ready {grid-column:1/-1!important;text-align:left!important}
  .quick-notes-page .qn-voice-box button.qn-big-record[data-voice-toggle] {
    display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:5px!important;
    width:100px!important;min-width:100px!important;max-width:100px!important;height:100px!important;min-height:100px!important;
    border-radius:50%!important;padding:8px!important;aspect-ratio:1!important;box-sizing:border-box!important;
    color:#fff!important;-webkit-text-fill-color:#fff!important;background:#13754f!important;border:3px solid #b7dfcd!important;
  }
  .quick-notes-page .qn-voice-box button.qn-big-record[data-mode="recording"] {background:#96560c!important;border-color:#ecd3ae!important}
  .quick-notes-page .qn-voice-box button.qn-big-record>svg {display:block!important;width:28px!important;height:28px!important;stroke:currentColor!important;color:#fff!important}
  .quick-notes-page .qn-voice-box button.qn-big-record>span {display:block!important;position:static!important;margin:0!important;font-size:13px!important;font-weight:800!important;line-height:1.2!important;white-space:nowrap!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
  .quick-notes-page .qn-wave {min-width:0;overflow:hidden}
  .scanner-page #scannerWorkspace[hidden] {display:none!important}
  .scanner-page #scannerWorkspace.is-open:not([hidden]) {display:grid!important}
  .scanner-page #scannerFrame[hidden] {display:none!important}
  .scanner-page .scn-stage-copy .scn-save-well {margin-top:0!important;display:grid!important;gap:12px!important}
  .scanner-page .scn-save-well .save-actions {display:flex!important;justify-content:flex-end!important}
  .scanner-page .scn-save-well .save-actions button {min-width:0!important;width:auto!important;max-width:100%!important;background:#13754f!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#13754f!important;padding-inline:24px!important}
  .scanner-page .scn-save-well textarea {color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important;background:var(--portal-surface)!important;min-height:105px!important}
  .scanner-page .scn-icon-actions button.scan-icon-action {color:#fff!important;-webkit-text-fill-color:#fff!important;display:grid!important;justify-items:center!important;gap:8px!important}
  .scanner-page .scn-icon-actions button.scan-icon-action>strong {color:#fff!important;-webkit-text-fill-color:#fff!important}
  .scanner-page .scn-icon-actions button.scan-icon-action>.icon-wrap {display:grid!important;place-items:center!important;min-width:58px!important;min-height:58px!important;color:#fff!important}
  .scanner-page .scn-icon-actions button.scan-icon-action>.icon-wrap>svg {display:block!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;color:#fff!important;stroke:#fff!important;fill:none!important;opacity:1!important;visibility:visible!important}
  .scanner-page .scn-icon-actions button.start,.scanner-page .scn-icon-actions button.start>.icon-wrap {background:#13754f!important}
  .scanner-page .scn-icon-actions button.capture,.scanner-page .scn-icon-actions button.capture>.icon-wrap {background:#9b570a!important}
  .scanner-page .scn-icon-actions button.clear,.scanner-page .scn-icon-actions button.clear>.icon-wrap {background:#b32627!important}
  .scanner-page .scn-icon-actions button:disabled {opacity:.76!important;cursor:not-allowed!important}
  .scanner-page .scan-status.show {display:block!important;background:#eaf2fb!important;color:#123c69!important;-webkit-text-fill-color:currentColor!important}
  @media(max-width:600px) {
    .quick-notes-page .qn-voice-main {grid-template-columns:100px minmax(0,1fr)!important}
    .quick-notes-page .qn-voice-main .qn-wave {grid-column:1/-1!important}
  }
}

/* V26: user portal — same visual tokens as the professional dashboard. */
@layer lectura {
  .user-dashboard .hero-panel {display:block!important;margin:0 0 18px!important;min-width:0!important}
  .user-dashboard .hero-panel .user-welcome {
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;
    grid-template-columns:none!important;grid-template-rows:none!important;gap:0!important;min-height:0!important;
    padding:clamp(24px,3vw,40px)!important;border-radius:18px!important;background:var(--portal-banner)!important;
  }
  .user-dashboard .user-welcome-copy {position:relative!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:12px!important;width:100%!important;min-width:0!important}
  .user-dashboard .user-welcome-copy :is(h2,p,.welcome-actions) {position:static!important;grid-column:auto!important;grid-row:auto!important;transform:none!important;margin:0!important;max-width:100%!important;white-space:normal!important}
  .user-dashboard .user-welcome-copy h2 {font-size:clamp(26px,3vw,40px)!important;line-height:1.2!important;color:#fff!important;-webkit-text-fill-color:#fff!important;overflow-wrap:anywhere!important}
  .user-dashboard .user-welcome-copy p {font-size:15px!important;line-height:1.6!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
  .user-dashboard .user-welcome-copy .welcome-actions {padding-top:5px!important;width:auto!important}
  .user-dashboard .user-welcome-copy .welcome-actions a {min-height:44px!important;gap:8px!important}
  .client-area .dash-main a.user-action-profile,.client-area .result-actions a.result-view-profile {
    background:#a64d08!important;border:1px solid #a64d08!important;color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important;
  }
  .client-area .dash-main a.user-action-contact,.client-area .result-actions a.result-contact-primary,
  .public-lawyer-profile .contact-card a.contact-action:is(.whatsapp,.email,.primary) {
    background:#13754f!important;border:1px solid #13754f!important;color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important;
  }
  .client-area .dash-main a.user-action-remove {background:#a92e35!important;border:1px solid #a92e35!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
  .client-area :is(a.user-action-profile,a.user-action-contact,a.user-action-remove,a.result-view-profile,a.result-contact-primary):hover {filter:brightness(.9)!important}
  .client-area :is(a.user-action-profile,a.user-action-contact,a.user-action-remove,a.result-view-profile,a.result-contact-primary):focus-visible {outline:3px solid #60a5fa!important;outline-offset:3px!important}
  .client-area .user-rating-unavailable {background:var(--portal-canvas)!important;border:1px solid var(--portal-edge)!important;color:var(--portal-muted)!important;-webkit-text-fill-color:currentColor!important;cursor:not-allowed!important;opacity:1!important}
  .user-dashboard .user-overview {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;align-items:start!important;margin:0 0 16px!important}
  .user-dashboard .user-overview>.panel {min-width:0!important;margin:0!important}
  @media(min-width:1450px) {.user-dashboard .user-overview{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important}}
  .user-dashboard .user-favorite-row {display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;gap:8px 12px!important;align-items:center!important}
  .user-dashboard .user-favorite-row .user-favorite-actions {grid-column:2!important;justify-content:flex-start!important;width:100%!important}
  .client-area .user-lawyer-photo {position:relative!important;isolation:isolate!important;overflow:hidden!important;display:grid!important;place-items:center!important;background:#e6f0fc!important;color:#16549b!important;border:1px solid #bfd5ed!important;border-radius:12px!important;flex-shrink:0!important}
  .user-dashboard .user-lawyer-photo {width:56px!important;height:56px!important}
  .user-favorites-page .user-lawyer-photo {width:96px!important;height:96px!important}
  .client-area .user-lawyer-photo .user-photo-initial {display:block!important;color:#16549b!important;-webkit-text-fill-color:#16549b!important;font-size:25px!important;font-weight:800!important;position:static!important;opacity:1!important}
  .client-area .user-lawyer-photo img:not([hidden]) {display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;z-index:1!important;visibility:visible!important;opacity:1!important;background:#e6f0fc!important}
  .client-area .user-lawyer-photo img[hidden] {display:none!important}
  .user-favorites-page .favorite-cards {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr))!important;gap:16px!important}
  .user-favorites-page .favorite-card {display:grid!important;grid-template-columns:96px minmax(0,1fr)!important;gap:16px!important;align-items:start!important;border:1px solid var(--portal-edge)!important;border-radius:12px!important;box-shadow:var(--portal-shadow)!important;padding:18px!important}
  .user-favorites-page .favorite-body {min-width:0!important;overflow-wrap:anywhere!important}
  .client-area .dash-main :is(.favorites-hero,.support-control-hero) {border-radius:18px!important;padding:clamp(20px,2vw,30px)!important;gap:16px!important;min-height:0!important}
  .client-area .dash-main :is(.favorites-hero,.support-control-hero) h2 {font-size:clamp(25px,2.8vw,38px)!important;line-height:1.2!important;overflow-wrap:anywhere!important}
  .client-area .dash-main :is(.favorites-hero,.support-control-hero) p {line-height:1.6!important}
  .client-area .dash-main .panel-head h2 {font-size:clamp(21px,1.9vw,29px)!important;line-height:1.25!important;overflow-wrap:anywhere!important}
  .client-area .dash-main .panel-head p {line-height:1.55!important;color:var(--portal-muted)!important;-webkit-text-fill-color:currentColor!important}
  .client-area .dash-main .table-wrap {max-width:100%!important;overflow-x:auto!important}
  :is(.user-dashboard,.user-requests-page) .dash-main .dash-table {width:100%!important;min-width:620px!important;table-layout:auto!important}
  :is(.user-dashboard,.user-requests-page) .dash-main .dash-table th {color:var(--portal-muted)!important;-webkit-text-fill-color:currentColor!important;white-space:normal!important}
  :is(.user-dashboard,.user-requests-page) .dash-main .dash-table td {color:var(--portal-text)!important;-webkit-text-fill-color:currentColor!important;overflow-wrap:break-word!important}
  :is(.user-dashboard,.user-requests-page) .dash-table td:nth-child(4) {white-space:nowrap!important;min-width:104px!important}
  .client-area .dash-main .table-actions {display:flex!important;flex-wrap:wrap!important;gap:7px!important;align-items:center!important}
  .client-area .dash-main .table-actions .dash-btn {display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;min-height:36px!important;padding:8px 12px!important;font-size:12px!important;line-height:1.25!important}
  .user-dashboard .quick-grid {display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))!important;gap:12px!important}
  .user-dashboard .quick-card {display:grid!important;grid-template-columns:46px minmax(0,1fr)!important;gap:3px 12px!important;align-items:center!important;padding:12px!important;border:1px solid var(--portal-edge)!important}
  .user-dashboard .quick-card .qicon {grid-row:1/3!important;display:grid!important;place-items:center!important;width:46px!important;height:46px!important;background:#e6f0fc!important;color:#16549b!important;border:1px solid #bfd5ed!important}
  .user-dashboard .quick-card .qicon svg {display:block!important;width:25px!important;height:25px!important;opacity:1!important;visibility:visible!important;stroke:#16549b!important;fill:none!important;color:#16549b!important}
  .user-dashboard .quick-card .qicon svg :is(path,rect,circle,line,polyline) {stroke:#16549b!important;fill:none!important}
  .user-dashboard .quick-card :is(h3,p) {margin:0!important;line-height:1.45!important}
  html[data-theme="royal-dark"] .client-area .dash-main .dash-table th {color:#f4f8ff!important;-webkit-text-fill-color:#f4f8ff!important}
  html[data-theme="royal-dark"] .client-area .dash-main :is(.favorite-card,.list-item,.quick-card,.panel) {border-color:var(--portal-edge)!important}
  @media(max-width:640px) {
    .user-dashboard .user-favorite-row {grid-template-columns:48px minmax(0,1fr)!important}
    .user-dashboard .user-lawyer-photo {width:48px!important;height:48px!important}
    .user-favorites-page .favorite-card {grid-template-columns:72px minmax(0,1fr)!important;gap:12px!important;padding:14px!important}
    .user-favorites-page .user-lawyer-photo {width:72px!important;height:72px!important}
    .client-area .dash-main :is(.favorites-hero,.support-control-hero) {grid-template-columns:minmax(0,1fr)!important}
  }
}
@layer lectura {
  html#legasist-site body.client-area .dash-main a.user-action-contact,
  html#legasist-site body.client-area .result-actions a.result-contact-primary,
  html#legasist-site body.public-lawyer-profile .contact-card a.contact-action:is(.whatsapp,.email,.primary) {background:#13754f!important;border-color:#13754f!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
  html#legasist-site body.client-area .dash-main a.user-action-profile,
  html#legasist-site body.client-area .result-actions a.result-view-profile {background:#a64d08!important;border-color:#a64d08!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
}
