:root {
    color-scheme: light;
    --brand: #087f83;
    --brand-strong: #05666a;
    --accent: #0aa6a6;
    --bg: #f3f7f6;
    --surface: #fbfdfc;
    --surface-alt: #e9f1ef;
    --text: #152523;
    --muted: #4b615e;
    --border: #bacbc7;
    --focus: #ffb000;
    --success: #11734b;
    --success-bg: #e0f3e8;
    --warning: #8a5700;
    --warning-bg: #fff1ce;
    --danger: #a32d36;
    --danger-bg: #fae6e8;
    --shadow: 0 8px 24px rgba(17, 49, 46, .09);
    --radius: .75rem;
    --sidebar: 16rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
}
html[data-theme="dark"] {
    color-scheme: dark; --bg: #12201f; --surface: #192b29; --surface-alt: #213936; --text: #edf7f5;
    --muted: #b8ceca; --border: #42615c; --brand: #37c3c0; --brand-strong: #69d9d5; --accent: #2cb6b3;
    --success: #7bd8a9; --success-bg: #183b2d; --warning: #ffd27c; --warning-bg: #49381b;
    --danger: #ff9da4; --danger-bg: #47252a; --shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
@media (prefers-color-scheme: dark) {
    html[data-theme="system"] { color-scheme: dark; --bg: #12201f; --surface: #192b29; --surface-alt: #213936; --text: #edf7f5; --muted: #b8ceca; --border: #42615c; --brand: #37c3c0; --brand-strong: #69d9d5; --accent: #2cb6b3; --success: #7bd8a9; --success-bg: #183b2d; --warning: #ffd27c; --warning-bg: #49381b; --danger: #ff9da4; --danger-bg: #47252a; --shadow: 0 8px 24px rgba(0,0,0,.25); }
}
* { box-sizing: border-box; }
.public-card { width: min(36rem, calc(100% - 2rem)); margin: 10vh auto; padding: clamp(1.25rem, 4vw, 2.5rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
html { min-width: 20rem; }
body { margin: 0; background: var(--bg); color: var(--text); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-main { width: min(29rem, 100%); padding: 0; }
.login-card h1 { margin: 0; font-size: 2rem; }
.login-form { display: grid; gap: 1rem; margin-top: 1.2rem; }
.login-form label { display: grid; gap: .35rem; font-weight: 650; }
.workspace-context-main { width: min(38rem, 100%); }
.context-session { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.context-session p { margin: 0; overflow-wrap: anywhere; }
.context-session span { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { width: 100%; min-height: 2.933rem; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); }
textarea { resize: vertical; }
a { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .7rem 1rem; background: var(--surface); color: var(--text); }
.skip-link:focus { top: 1rem; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 1.25rem; overflow-y: auto; overscroll-behavior: contain; background: #123b39; color: #f0fbf9; display: flex; flex-direction: column; gap: 1.5rem; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.brand { color: #fff; text-decoration: none; font-size: 1.3rem; font-weight: 750; display: flex; align-items: center; gap: .65rem; }
.brand b, .sidebar nav b { font: inherit; }
.brand span { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .65rem; background: #24b3af; color: #102b2a; }
.sidebar-collapse { width: 2.933rem; min-height: 2.933rem; padding: 0; color: #fff; background: transparent; border-color: #4e7470; }
.workspace-chip { padding: .8rem; border: 1px solid #4e7470; border-radius: .65rem; display: grid; }
.workspace-chip span, .sidebar-footer small { color: #c5d9d6; font-size: .933rem; }
.workspace-chip a { margin-top: .45rem; color: #e2f8f5; font-size: .933rem; }
.sidebar nav { display: grid; gap: .35rem; }
.sidebar nav a { color: #eff8f7; text-decoration: none; padding: .7rem .8rem; border-radius: .5rem; display: flex; gap: .65rem; align-items: center; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { background: #27625e; }
.nav-group { margin: .9rem .75rem .25rem; color: #bed4d1; font-size: .933rem; text-transform: uppercase; letter-spacing: .06em; }
.sidebar-footer { margin-top: auto; display: grid; }
.app-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 4rem; display: flex; align-items: center; gap: .7rem; padding: .65rem clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid var(--border); background: var(--surface); }
.topbar-spacer { flex: 1; }
.mobile-nav { display: none; width: 2.933rem; padding: 0; }
main { max-width: 100rem; padding: clamp(1rem, 3vw, 2.5rem); margin: 0 auto; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.2; }
.page-header p { margin: .35rem 0 0; color: var(--muted); }
.eyebrow { color: var(--brand-strong) !important; text-transform: uppercase; letter-spacing: .08em; font-size: .933rem; font-weight: 750; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1rem, 2.5vw, 1.5rem); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.summary-grid .card { margin: 0; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.metric-card { min-width: 0; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card span, .metric-card strong { display: block; overflow-wrap: anywhere; }
.metric-card span { color: var(--muted); font-size: .933rem; }
.metric-card strong { margin-top: .2rem; font-size: 1.5rem; }
.activity-list { margin: .75rem 0 0; padding-left: 1.25rem; display: grid; gap: .55rem; }
.activity-list li { overflow-wrap: anywhere; }
.activity-list small { color: var(--muted); }
.definition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .85rem 1.25rem; margin: 0 0 1.25rem; }
.definition-grid div { min-width: 0; }
.definition-grid dt { color: var(--muted); font-size: .933rem; font-weight: 700; }
.definition-grid dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.code-block { max-width: 100%; padding: 1rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-alt); border: 1px solid var(--border); border-radius: .5rem; }
.section-card form label { display: grid; gap: .35rem; font-weight: 650; }
.section-card form input[type="checkbox"] { width: auto; min-height: auto; }
.metric { display: flex; gap: .85rem; align-items: center; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 1.35rem; }
.metric span:not(.status-icon) { color: var(--muted); }
.status-icon { width: 2.35rem; height: 2.35rem; flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-bg); font-weight: 800; }
.status-icon svg { width: 1.2rem; height: 1.2rem; stroke: currentColor; fill: none; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.status-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.status-list li { display: flex; gap: .75rem; }
.status-list li > span:first-child { color: var(--success); font-weight: 800; }
h2 { margin: 0 0 .45rem; font-size: 1.3rem; }
.button, button { min-height: 2.933rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); padding: .5rem .8rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 650; }
.button:hover, button:hover { border-color: var(--brand); }
.button.primary { border-color: var(--brand); background: var(--brand); color: #fff; }
html[data-theme="dark"] .button.primary { color: #102321; }
.button.quiet { background: transparent; }
.button.small { min-height: 2.933rem; padding: .35rem .65rem; font-size: .933rem; }
.button.danger-quiet { color: var(--danger); border-color: var(--danger); }
.button.disabled { opacity: .5; pointer-events: none; }
.icon-button, .help-button { width: 2.933rem; padding: 0; border-radius: 50%; }
.help-button { width: 2.933rem; min-height: 2.933rem; font-size: .933rem; }
.help-button.inline { margin-left: .35rem; vertical-align: middle; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.section-heading p { margin: 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid label, .dialog-card label, .danger-zone label, .filters label, .table-settings label { display: grid; gap: .35rem; font-weight: 650; }
label small, .choice small, .form-actions span, details summary small, td small { display: block; color: var(--muted); font-size: .933rem; font-weight: 400; }
.span-2 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--border); border-radius: .5rem; padding: .8rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.choice { display: block !important; padding: .35rem; }
.choice input { width: auto; min-height: auto; margin-right: .35rem; }
.tabs-radio { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.tabs-radio label { display: flex; align-items: center; gap: .4rem; }
.tabs-radio input { width: auto; min-height: auto; }
.form-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.filters { display: grid; grid-template-columns: minmax(14rem, 2fr) repeat(3, minmax(9rem, 1fr)) auto auto; gap: .7rem; align-items: end; margin-bottom: 1rem; }
.table-settings { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
.table-settings form { display: flex; gap: .6rem; align-items: end; }
.table-settings select { min-width: 7rem; }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow: auto; border: 1px solid var(--border); border-radius: .5rem; }
table { width: 100%; border-collapse: collapse; min-width: 55rem; background: var(--surface); }
.responsive-table { width: 100%; max-width: 100%; table-layout: fixed; }
.responsive-table th, .responsive-table td { overflow-wrap: anywhere; }
th, td { padding: .85rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
html[data-density="compact"] th, html[data-density="compact"] td { padding: .45rem .65rem; }
th { background: var(--surface-alt); font-size: 1rem; }
th a { color: var(--text); text-decoration: none; display: flex; justify-content: space-between; gap: .5rem; }
tbody tr:last-child td { border-bottom: 0; }
.empty-state { padding: 2rem; text-align: center; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .2rem .55rem; font-weight: 700; font-size: .933rem; }
.status .status-icon { width: 1.25rem; height: 1.25rem; background: transparent; }
.summary-card { padding: 1rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--surface); display: grid; gap: .25rem; }
.summary-card strong { font-size: 1.35rem; }
.header-actions, .review-actions, .segmented-control { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.segmented-control label { min-height: 2.933rem; display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border: 1px solid var(--border); border-radius: .5rem; }
.segmented-control input { width: auto; min-height: auto; }
[data-input-panel] { margin-top: 1rem; }
.status.active { color: var(--success); background: var(--success-bg); }
.status.inactive { color: var(--muted); background: var(--surface-alt); }
.status.warning { color: var(--warning); background: var(--warning-bg); }
.status.danger { color: var(--danger); background: var(--danger-bg); }
.pagination { display: flex; justify-content: center; align-items: center; gap: .75rem; margin-top: 1rem; }
.pagination form, .pagination label { display: flex; align-items: center; gap: .45rem; }
.pagination select { width: auto; }
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border: 1px solid; border-radius: .6rem; margin-bottom: 1rem; }
.alert.success { color: var(--success); background: var(--success-bg); }
.alert.warning, .metric.warning { color: var(--warning); background: var(--warning-bg); }
.alert.error { color: var(--danger); background: var(--danger-bg); }
details summary { cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; }
details[open] summary { margin-bottom: 1rem; }
.technical-details { margin: 1rem 0; padding: 1rem; }
.technical-details dl { display: grid; grid-template-columns: 10rem minmax(0,1fr); gap: .5rem; }
.technical-details dd { margin: 0; overflow-wrap: anywhere; }
.danger-zone { margin: 1rem 0; border-color: var(--danger); background: var(--danger-bg); }
dialog { width: min(36rem, calc(100% - 2rem)); padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(8, 25, 24, .68); }
.dialog-card { padding: 1.4rem; display: grid; gap: 1rem; }
.copy-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.copy-row input { flex: 1 1 20rem; min-width: 0; }
details > summary { cursor: pointer; font-weight: 700; }
details ol { padding-left: 1.4rem; }
@media (max-width: 640px) {
    .copy-row { align-items: stretch; }
    .copy-row input, .copy-row .button { flex-basis: 100%; }
}
.tooltip { position: fixed; z-index: 200; max-width: 19rem; padding: .5rem .65rem; background: var(--text); color: var(--surface); border-radius: .4rem; font-size: .933rem; line-height: 1.4; pointer-events: none; box-shadow: var(--shadow); }
.app-shell.nav-collapsed { grid-template-columns: 4.5rem minmax(0, 1fr); }
.nav-collapsed .sidebar { padding-inline: .65rem; align-items: center; }
.nav-collapsed .brand b, .nav-collapsed .workspace-chip, .nav-collapsed .nav-group, .nav-collapsed .sidebar nav b, .nav-collapsed .sidebar-footer { display: none; }
.nav-collapsed .brand-row { flex-direction: column; }
.nav-collapsed .sidebar nav a { justify-content: center; min-width: 2.9rem; }
@media (max-width: 75rem) { .filters { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 50rem) {
    .app-shell { display: block; }
    .sidebar { position: fixed; z-index: 50; left: 0; transform: translateX(-105%); transition: transform .18s ease; width: min(18rem, 85vw); }
    .app-shell.nav-collapsed { display: block; }
    .nav-collapsed .sidebar { padding: 1.25rem; align-items: stretch; }
    .nav-collapsed .brand-row { flex-direction: row; }
    .nav-collapsed .brand b, .nav-collapsed .workspace-chip, .nav-collapsed .nav-group, .nav-collapsed .sidebar nav b, .nav-collapsed .sidebar-footer { display: revert; }
    .nav-collapsed .sidebar nav a { justify-content: flex-start; }
    .sidebar-collapse { display: none; }
    .sidebar.open { transform: translateX(0); }
    .mobile-nav { display: inline-flex; }
    .page-header { align-items: stretch; flex-direction: column; }
    .form-grid, .filters { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .table-settings, .table-settings form { justify-content: stretch; flex-wrap: wrap; }
    .responsive-table { display: block; width: 100%; max-width: 100%; min-width: 0; background: transparent; }
    .responsive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .responsive-table tbody, .responsive-table tr { display: block; width: 100%; }
    .responsive-table tr { margin-bottom: .75rem; padding: .85rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface); }
    .responsive-table td { display: grid !important; width: 100%; grid-template-columns: minmax(7rem, .8fr) minmax(0, 1.5fr); gap: .7rem; padding: .45rem 0; border: 0; overflow-wrap: anywhere; }
    .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: .933rem; font-weight: 700; }
    .responsive-table .empty-state { display: block; }
    .responsive-table .empty-state::before { content: none; }
}

/* O4b: Descubrimiento */
.discovery-filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(11rem,1fr)); gap: .75rem; align-items: end; }
.discovery-filters label { display: grid; gap: .35rem; font-weight: 650; }
.discovery-table { min-width: 86rem; }
.discovery-table.wide { min-width: 112rem; }
.discovery-table.candidates { min-width: 110rem; }
.discovery-task-form { max-width: 58rem; }
.future-source-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.future-source-grid .card { min-width: 0; }
.operational-list { display: grid; gap: .65rem; }
@media (max-width: 64rem) { .future-source-grid { grid-template-columns: 1fr; } }
@media (max-width: 50rem) {
    .discovery-table-region { overflow: visible; border: 0; }
    .discovery-table, .discovery-table.wide, .discovery-table.candidates { min-width: 0; }
    .discovery-table.candidates tr { display: grid; grid-template-columns: 3.25rem minmax(0,1fr); }
    .discovery-table.candidates td { grid-column: 1 / -1; }
    .discovery-table.candidates .selection-cell { grid-column: 1; grid-row: 1; display: flex; justify-content: center; }
    .discovery-table.candidates .selection-cell::before { content: none; }
    .discovery-table.candidates .domain-cell { grid-column: 2; grid-row: 1; display: block; min-width: 0; }
}

/* O2d: detalle operativo, contactos y Empresas y profesionales */
.detail-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.section-card { min-width: 0; margin: 1rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: .7rem; background: var(--surface); }
.section-card > summary { min-height: 2.75rem; align-items: center; font-size: 1.15rem; }
.section-card pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .8rem; margin-top: 1rem; }
.contact-card { min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: .65rem; background: var(--surface-alt); }
.contact-card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.contact-value { font-size: 1.1rem; font-weight: 750; overflow-wrap: anywhere; }
.inline-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.inline-metadata div { min-width: 0; }
.inline-metadata dt { color: var(--muted); font-size: .933rem; }
.inline-metadata dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.inline-actions { border-top: 1px solid var(--border); padding-top: .7rem; }
.inline-actions form + form { margin-top: .65rem; }
.stack-form, .inline-form { display: grid; gap: .7rem; }
.inline-form { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); align-items: end; width: 100%; }
.stack-form label, .inline-form label, .account-filters label { display: grid; gap: .35rem; font-weight: 650; }
.compact-list { margin: .5rem 0; padding-left: 1.25rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.timeline li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem; border-bottom: 1px solid var(--border); }
.account-filters { display: grid; grid-template-columns: repeat(4, minmax(10rem, 1fr)); gap: .7rem; align-items: end; margin-bottom: 1rem; }
.account-table { min-width: 78rem; }
.account-form { max-width: 50rem; }
body { overflow-x: clip; }
@media (max-width: 64rem) { .account-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 50rem) {
    .account-filters { grid-template-columns: 1fr; }
    .account-filters .span-2 { grid-column: auto; }
    .account-table-region { overflow: visible; border: 0; }
    .account-table { min-width: 0; }
    .inline-metadata { grid-template-columns: 1fr; }
    .timeline li { flex-direction: column; gap: .2rem; }
}
@media (max-width: 34rem) { .pagination { justify-content: space-between; flex-wrap: wrap; } .topbar .button.quiet { padding-inline: .55rem; } }
@media (max-width: 34rem) { .context-session { align-items: stretch; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* O1b: listado operativo de prospectos */
.list-totals { display: flex; gap: .75rem; margin: 0; flex-wrap: wrap; }
.list-totals div { min-width: 9.5rem; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--surface); }
.list-totals dt { color: var(--muted); font-size: .933rem; }
.list-totals dd { margin: 0; font-size: 1.35rem; font-weight: 750; }
.prospect-toolbar, .prospect-list, .prospect-filter-form { min-width: 0; }
.prospect-search { display: grid; grid-template-columns: minmax(14rem, 1fr) auto auto; gap: .65rem; align-items: end; }
.prospect-search label { grid-column: 1 / -1; font-weight: 650; }
.toolbar-options { display: grid; grid-template-columns: repeat(3, minmax(10rem, 1fr)); gap: .75rem; margin-top: .85rem; }
.toolbar-options label { display: grid; gap: .35rem; font-weight: 650; }
.filter-count { color: var(--muted); }
.filter-panel { margin-top: 1rem; border: 1px solid var(--border); border-radius: .65rem; padding: .85rem; }
.filter-panel > summary { font-size: 1.05rem; }
.general-filters { display: grid; grid-template-columns: repeat(4, minmax(10rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.general-filters label { display: grid; gap: .35rem; font-weight: 650; }
.facet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.facet-group { min-width: 0; }
.facet-option { min-height: 2.75rem; display: grid; grid-template-columns: 1.35rem minmax(0, 1fr) auto; align-items: center; gap: .45rem; padding: .25rem; font-weight: 500; }
.facet-option input, .selection-cell input { width: 1.2rem; height: 1.2rem; min-height: auto; }
.facet-option.unavailable { color: var(--muted); }
.facet-more { margin-top: .25rem; }
.facet-more summary { min-height: 2.75rem; align-items: center; color: var(--brand-strong); }
.active-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; align-items: center; }
.filter-chip { display: inline-flex; align-items: center; min-height: 2.75rem; gap: .35rem; padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }
.filter-chip:hover { border-color: var(--brand); }
.clear-filters { min-height: 2.75rem; display: inline-flex; align-items: center; padding: .35rem; }
.selection-summary { color: var(--muted); text-align: right; }
.selection-summary strong { color: var(--text); }
.prospect-table { min-width: 78rem; }
.prospect-table th:first-child, .prospect-table td:first-child { width: 3.25rem; }
.prospect-table .domain-cell { min-width: 13rem; }
.domain-cell > strong { display: block; overflow-wrap: anywhere; }
.domain-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.selection-cell { text-align: center; }
.selection-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.select-all-results { margin-top: .85rem; padding: .85rem; border: 1px solid var(--brand); border-radius: .6rem; background: var(--surface-alt); }
.select-all-results p, .selection-note { margin: 0 0 .65rem; }
.selection-note { margin-top: .8rem; color: var(--muted); }
.empty-state h3 { margin: 0 0 .35rem; font-size: 1.2rem; color: var(--text); }
.empty-state p { margin: 0; }
.numbered-pagination { flex-wrap: wrap; }
.page-numbers { display: flex; gap: .35rem; }
.page-jump input[type="number"] { width: 5rem; }

@media (max-width: 75rem) {
    .general-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 50rem) {
    .list-totals { width: 100%; }
    .list-totals div { flex: 1 1 9rem; }
    .prospect-search, .toolbar-options, .general-filters { grid-template-columns: 1fr; }
    .prospect-search label { grid-column: auto; }
    .prospect-table-region { overflow: visible; border: 0; }
    .prospect-table { min-width: 0; }
    .prospect-table tr { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); }
    .prospect-table td { grid-column: 1 / -1; }
    .prospect-table .selection-cell { grid-column: 1; grid-row: 1; display: flex; align-items: flex-start; justify-content: center; padding-top: .6rem; }
    .prospect-table .selection-cell::before { content: none; }
    .prospect-table .domain-cell { grid-column: 2; grid-row: 1; display: block; min-width: 0; }
    .selection-summary { text-align: left; }
    .numbered-pagination { justify-content: flex-start; }
}
@media (max-width: 34rem) {
    .page-numbers { order: 4; width: 100%; overflow-x: auto; padding-bottom: .25rem; }
    .page-jump { width: 100%; flex-wrap: wrap; }
}

/* O1c: acciones individuales y masivas resumibles */
.bulk-action-bar { display: grid; grid-template-columns: minmax(14rem, 1fr) minmax(22rem, 1.5fr); gap: 1rem; padding: 1rem; margin-bottom: 1rem; border: 2px solid var(--brand); border-radius: .7rem; background: var(--surface-alt); }
.bulk-action-bar h3, .bulk-action-bar p { margin: 0; }
.bulk-action-bar p { margin-top: .35rem; }
.bulk-action-form { display: grid; grid-template-columns: minmax(12rem, 1fr) auto; gap: .7rem; align-items: end; }
.bulk-action-form > label, .bulk-action-options label, .row-actions label { display: grid; gap: .35rem; font-weight: 650; }
.bulk-action-form details { grid-column: 1 / -1; padding: .7rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); }
.bulk-action-help { grid-column: 1 / -1; color: var(--muted); line-height: 1.55; }
.bulk-action-options { display: grid; grid-template-columns: repeat(3, minmax(10rem, 1fr)); gap: .7rem; }
.help-text { color: var(--muted); line-height: 1.55; }
.row-action-cell { min-width: 11rem; }
.row-actions { position: relative; }
.row-actions > summary { min-height: 2.933rem; align-items: center; color: var(--brand-strong); }
.row-actions form { display: grid; gap: .65rem; min-width: 16rem; padding-top: .25rem; }
.action-summary { display: grid; gap: 1rem; }
.action-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .7rem; margin: 0; }
.action-counts div { padding: .8rem; border: 1px solid var(--border); border-radius: .55rem; background: var(--surface-alt); }
.action-counts dt { color: var(--muted); }
.action-counts dd { margin: .2rem 0 0; font-size: 1.35rem; font-weight: 750; }
.action-counts.compact dd { font-size: 1.1rem; }
.progress-summary { display: grid; gap: .65rem; }
.progress-summary progress { width: 100%; min-height: 1rem; accent-color: var(--brand); }
.action-controls { padding-top: .35rem; border-top: 1px solid var(--border); }
.action-controls form { margin: 0; }
.button.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.technical-list { margin-top: 1rem; }

@media (max-width: 62rem) {
    .bulk-action-bar { grid-template-columns: 1fr; }
}
@media (max-width: 50rem) {
    .bulk-action-form, .bulk-action-options { grid-template-columns: 1fr; }
    .bulk-action-form details { grid-column: auto; }
    .row-action-cell { min-width: 0; }
    .row-actions form { min-width: 0; }
    .action-controls, .action-controls form, .action-controls .button { width: 100%; }
    .technical-details dl { grid-template-columns: 1fr; }
}
