/* ===== Poliza Match - Fase de escala (compartido por sitio y panel) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.code, pre.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; background: #f4f6f8; border: 1px solid var(--border, #e3e7eb); border-radius: 8px; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; width: 100%; }

/* Lectura automática */
.extraction { border: 1px dashed var(--border, #e3e7eb); border-radius: 10px; padding: 10px 12px; margin: 10px 0; display: grid; gap: 8px; font-size: .88rem; }
.extraction.is-good { border-color: var(--green, #a9d52f); background: rgba(169, 213, 47, .08); }
.extraction.is-partial { border-color: #d58a1b; background: rgba(213, 138, 27, .07); }
.extraction .data { margin: 0; }

/* Matriz de coberturas en el formulario de ofertas */
.coverage-inputs { margin: 12px 0; }
.coverage-inputs summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.table.compact input:not([type="checkbox"]) { width: 100%; min-width: 90px; padding: 5px 8px; border: 1px solid var(--border, #e3e7eb); border-radius: 6px; }

/* Comparador y recomendación (propuesta pública) */
.recommendation { background: rgba(169, 213, 47, .12); border-left: 4px solid var(--green, #a9d52f); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.recommendation ul { margin: 6px 0 0 18px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.compare-table th, .compare-table td { padding: 8px 10px; border-bottom: 1px solid #e9ecef; text-align: center; vertical-align: top; }
.compare-table th[scope="row"] { text-align: left; font-weight: 500; }
.compare-table .is-rec { background: rgba(169, 213, 47, .1); }
.renewal-box .renewal-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; margin-top: 10px; }
.renewal-compare > div { border: 1px solid #e9ecef; border-radius: 10px; padding: 12px; display: grid; gap: 2px; }
.renewal-compare > div.is-best { border-color: var(--green, #a9d52f); background: rgba(169, 213, 47, .08); }
.renewal-compare strong { font-size: 1.2rem; }
.pos { color: #4d7a0a; } .neg { color: var(--red, #c22a22); }

/* Reseñas */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.review { background: #fff; border: 1px solid #e9ecef; border-radius: 14px; padding: 16px; margin: 0; display: grid; gap: 8px; }
.review-stars { color: #d58a1b; letter-spacing: 2px; }
.review cite { font-style: normal; font-size: .85rem; color: #6c757d; }
.review-box { border: 1px solid var(--border, #e3e7eb); border-radius: 10px; padding: 12px; margin: 10px 0 18px; }
.review-box legend { font-weight: 600; padding: 0 6px; }
.review-box textarea { width: 100%; margin-top: 8px; }

/* Chequeo anual */
.gap-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border, #e3e7eb); }
.gap-row:last-child { border-bottom: 0; }
.gap-row .badge { margin-left: 6px; }
.score-ring { width: 140px; height: 140px; margin: 12px auto; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 10px solid #e9ecef; }
.score-ring span { font-size: 2.2rem; font-weight: 700; line-height: 1; } .score-ring small { color: #6c757d; }
.score-green { border-color: var(--green, #a9d52f); } .score-amber { border-color: #d58a1b; } .score-red { border-color: var(--red, #c22a22); }
.text-center { text-align: center; }

/* Simulador */
.sim-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.sim-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border, #e3e7eb); border-radius: 10px; }
.sim-row input { width: 90px; text-align: right; padding: 6px 8px; border: 1px solid var(--border, #e3e7eb); border-radius: 8px; }
.sim-result { text-align: center; }
.sim-result .table { text-align: left; }
.sim-total { font-size: 2.2rem; font-weight: 700; color: #4d7a0a; margin: 6px 0; }

/* Asistente de siniestros */
.wizard-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 14px; padding: 0; flex-wrap: wrap; }
.wizard-steps li { flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 8px; background: #e9ecef; font-size: .85rem; color: #495057; }
.wizard-steps li::before { content: attr(data-step-label) ". "; font-weight: 700; }
.wizard-steps li.is-active { background: var(--green, #a9d52f); color: #15201a; font-weight: 600; }
.wizard-steps li.is-done { background: rgba(169, 213, 47, .25); }
.wizard-step { display: none; } .wizard-step.is-active { display: block; }
.first-steps { margin: 6px 0 14px 20px; display: grid; gap: 6px; }
.assist-box { border: 1px solid var(--border, #e3e7eb); border-radius: 10px; padding: 12px; margin: 10px 0; display: grid; gap: 8px; justify-items: start; }

/* Páginas para buscadores */
.seo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.seo-cta { position: sticky; top: 90px; }
.check-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.check-list i { color: #4d7a0a; margin-right: 6px; }
.link-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.link-list.columns { grid-template-columns: 1fr 1fr; }
.faq { border-bottom: 1px solid #e9ecef; padding: 10px 0; } .faq summary { cursor: pointer; font-weight: 600; } .faq p { margin-top: 6px; }
.calc-result { margin-top: 10px; font-size: 1.05rem; }

/* Widget de socios */
.widget-title { font-size: 1.6rem; margin-bottom: 4px; }
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 16px 0; }
.widget-option { display: grid; justify-items: center; gap: 6px; padding: 16px 10px; border: 1px solid #e9ecef; border-radius: 12px; text-align: center; color: inherit; background: #fff; }
.widget-option:hover { border-color: var(--green, #a9d52f); text-decoration: none; }
.widget-option i { font-size: 1.5rem; color: #4d7a0a; }

/* Certificaciones */
.cert-chip { display: inline-flex; align-items: center; gap: 6px; margin: 6px 6px 0 0; padding: 4px 10px; border-radius: 999px; background: rgba(169, 213, 47, .18); color: #3d5f08; font-size: .82rem; font-weight: 600; }
.certificate { text-align: center; }
.certificate-head { font-size: 1.1rem; font-weight: 700; color: #4d7a0a; margin-bottom: 10px; }
.certificate h1 { font-size: 1.6rem; margin: 6px 0; }
.certificate .data { max-width: 380px; margin: 14px auto; text-align: left; }

@media (max-width: 900px) {
    .seo-grid { grid-template-columns: 1fr; }
    .seo-cta { position: static; }
    .gap-row { flex-direction: column; }
}
@media print { .sidebar, .topbar, .actions { display: none !important; } .main { margin: 0 !important; } }

/* Roles y permisos */
.role-list { display: grid; gap: 8px; margin-bottom: 12px; }
.role-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--border, #e3e7eb); border-radius: 10px; cursor: pointer; }
.role-option:has(input:checked) { border-color: var(--green, #a9d52f); background: rgba(169, 213, 47, .08); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.perm-grid fieldset { border: 1px solid var(--border, #e3e7eb); border-radius: 10px; padding: 8px 12px; }
.perm-grid legend { font-weight: 600; padding: 0 6px; }
.perm-matrix .perm-group th { background: #f4f6f8; text-align: left; }
.perm-matrix input[type="checkbox"] { width: 18px; height: 18px; }

/* Marca: logotipo e isotipo */
.logo-img { display: inline-flex; align-items: center; line-height: 0; }
.logo-img img { height: 40px; width: auto; display: block; }
.mobile-menu-header .logo-img img { height: 32px; }
.logo-lockup { display: inline-flex; align-items: center; gap: 10px; }
.logo-lockup img { height: 36px; width: auto; }
.brand-lockup { display: flex !important; align-items: center; gap: 8px; }
.brand-lockup img { height: 26px; width: auto; flex: none; }
.auth-logo { display: block; text-align: center; margin: 0 auto 14px; }
.auth-logo img { height: 92px; width: auto; display: inline-block; }
@media (max-width: 600px) {
    .logo-img img { height: 32px; }
    .auth-logo img { height: 72px; }
}

/* Cookies y avisos de privacidad */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000; max-width: 920px; margin: 0 auto; background: #fff; color: #212529;
    border: 1px solid #dfe3e8; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.18); padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.cookie-banner[hidden], .cookie-modal[hidden] { display: none; }
.cookie-banner-text { flex: 1 1 380px; }
.cookie-banner-text p { margin: 4px 0 0; }
.cookie-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cookie-modal { position: fixed; inset: 0; z-index: 2100; background: rgba(15, 23, 38, .55); display: grid; place-items: center; padding: 16px; }
.cookie-modal-card { background: #fff; color: #212529; border-radius: 14px; padding: 20px; max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; display: grid; gap: 12px; }
.cookie-modal-card h2 { font-size: 1.2rem; margin: 0; }
.cookie-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid #e9ecef; border-radius: 10px; }
.cookie-option input { margin-top: 4px; }
.privacy-notice { border: 1px solid #e3e7eb; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: .85rem; background: #fafbfc; }
.privacy-notice summary { cursor: pointer; font-weight: 600; }
.privacy-notice dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; margin: 8px 0 0; }
.privacy-notice dt { color: #6c757d; } .privacy-notice dd { margin: 0; }
.legal-changes { background: #f6f9ef; border-left: 4px solid #a9d52f; border-radius: 8px; padding: 10px 14px; margin: 12px 0; font-size: .9rem; }
.legal-changes ul { margin: 6px 0 0 18px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 10px 0; }
.legal-table th, .legal-table td { border: 1px solid #e3e7eb; padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-table th { background: #f4f6f8; }
@media (max-width: 600px) { .privacy-notice dl { grid-template-columns: 1fr; } .cookie-banner { bottom: 8px; left: 8px; right: 8px; } }
.incident-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border, #e3e7eb); }
.incident-row details { min-width: min(100%, 260px); }
@media (max-width: 760px) { .incident-row { flex-direction: column; } }
