:root {
    /* Paleta W-UP */
    --brand: #a95af7;
    --bg: #F7F6FC;
    --surface: #FFFFFF;
    --text: #1f1a2e;
    --muted: #6b6580;
    --border: #e4e0f0;
    --primary: #a95af7;
    --primary-hover: #9443e6;
    --primary-text: #7a35c7; /* variante oscura para enlaces y texto sobre fondo claro */
    --primary-soft: #f1e6fe;
    --error: #b42318;
    --error-bg: #fef3f2;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); border-top: 4px solid var(--brand); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { height: 36px; width: auto; }
.nav a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.nav a.active, .nav a:hover { color: var(--primary-text); }

main.container { padding-top: 32px; padding-bottom: 48px; }

.hero { margin-bottom: 24px; }
.faq-section { margin-top: 48px; }
.faq-heading { margin-bottom: 24px; }
.faq-heading h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.faq-group { margin-top: 28px; }
.faq-group h3 { margin: 0 0 12px; font-size: 1.1rem; }
.faq-item { margin: 0; border-top: 1px solid var(--border); background: var(--surface); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary { padding: 16px 42px 16px 16px; cursor: pointer; color: var(--text); font-weight: 600; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 16px; top: 12px; color: var(--primary-text); font-size: 1.35rem; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.faq-answer { padding: 0 16px 16px; color: var(--muted); }
.faq-answer p { margin: 0; }
.faq-cta { margin-top: 36px; padding: 24px; border-radius: var(--radius); background: var(--primary-soft); }
.faq-cta p:not(.eyebrow) { color: var(--muted); }
.faq-cta .btn { margin-top: 4px; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--primary-text); font-weight: 600; margin: 0 0 4px; }
h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; }
.lead { color: var(--muted); margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }

fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-weight: 600; margin-bottom: 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.field label { display: block; font-size: .9rem; margin-bottom: 4px; }
.field input, .field select {
    width: 100%; padding: 10px 12px; font: inherit;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
}
.field input:focus, .field select:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field .invalid { border-color: var(--error); }
.error { color: var(--error); font-size: .85rem; margin: 4px 0 0; }
.muted { color: var(--muted); font-size: .85rem; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background: var(--error-bg); color: var(--error); }

.actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.btn {
    display: inline-block; padding: 11px 22px; border: 0; border-radius: 8px;
    background: var(--primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--primary-hover); }
.btn-secondary { background: transparent; color: var(--primary-text); border: 1px solid var(--primary); }
.btn-secondary:hover { background: var(--bg); }

.result { text-align: center; }
.result .badge { width: min(220px, 60%); height: auto; margin: 16px auto; display: block; }
.result .actions { justify-content: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0; }
.stats div { border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.stats dt { color: var(--muted); font-size: .9rem; }
.stats dd { margin: 4px 0; font-size: 1.6rem; font-weight: 700; }
.stats p { margin: 0 0 8px; font-size: .95rem; }

.site-footer { color: var(--muted); font-size: .85rem; padding: 24px 0; border-top: 1px solid var(--border); }

a { color: var(--primary-text); }
textarea, .field textarea {
    width: 100%; padding: 10px 12px; font: inherit; resize: vertical;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text);
}
.field + .field, .grid + .field { margin-top: 16px; }
.company-chip { display: inline-block; margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--bg); font-weight: 600; }
.alert-success { background: #ecfdf3; color: #067647; }
.stats dd.dd-sm { font-size: 1.2rem; }
.cta { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 24px; }
.cta h2 { font-size: 1.15rem; margin: 0 0 4px; }

/* Administración */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.kpi span { color: var(--muted); font-size: .85rem; }
.kpi strong { display: block; font-size: 1.8rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: var(--bg); }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg); }
.pill-comprometida { background: #d5fbfb; color: #0b6b72; }
.pill-responsable { background: #e7e7e9; color: #3f3f46; }
.pill-transformadora { background: #dfeafa; color: #1e4fa3; }
.pill-referente { background: #f3d6f2; color: #9b1f8f; }
.pill-pendiente { background: #fef6e7; color: #93370d; }
.pill-agendada { background: var(--primary-soft); color: var(--primary-text); }
.pill-realizada { background: #ecfdf3; color: #067647; }
.pill-cancelada { background: #f2f4f7; color: #667085; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { padding: 8px 10px; font: inherit; border: 1px solid var(--border); border-radius: 8px; }
.filters a { padding: 6px 12px; border-radius: 999px; text-decoration: none; border: 1px solid var(--border); color: var(--muted); }
.filters a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.detail dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; }
.section-title { font-size: 1.1rem; margin: 24px 0 12px; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary-text); cursor: pointer; }
.pagination { margin-top: 16px; }
.narrow { max-width: 420px; margin: 0 auto; }
.narrow h1 { margin-bottom: 4px; }
.narrow .lead { margin-bottom: 20px; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 16px; font-size: .9rem; }
.admin-nav { margin-bottom: 24px; }
.admin-nav .logout { margin-left: auto; }
.form .field + .field { margin-top: 16px; }
.page-head h1 a { color: inherit; text-decoration: none; }
.form .grid > .field, .grid > .field { margin-top: 0; }

/* Evaluación IIE */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.section-title.first { margin-top: 0; }
.scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0 0; }
.scale div { background: var(--bg); border-radius: 8px; padding: 12px; }
.scale dt { font-weight: 600; }
.scale dd { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.scale-value { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; margin-right: 4px; }
.dimension-list { padding-left: 20px; margin: 0; }
.dimension-list li { margin-bottom: 6px; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 20px; }
.step { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.step.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.indicator { position: relative; margin-bottom: 16px; }
.indicator.invalid { border-color: var(--error); }
.indicator-code { position: absolute; top: 16px; right: 16px; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: .8rem; line-height: 1.4; }
.indicator-name { margin: 0 56px 8px 0; font-size: 1.1rem; }
.indicator-desc { margin: 0 0 8px; }
.indicator-evidence { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.level { position: relative; }
.level input { position: absolute; opacity: 0; }
.level span { display: block; height: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); }
.level span strong { color: var(--primary-text); margin-right: 4px; }
.level input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.level input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
details { margin-top: 12px; }
details summary { cursor: pointer; color: var(--primary-text); font-size: .9rem; }
details textarea { margin-top: 8px; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.evidence { margin-top: 14px; }
.evidence-title { margin: 0 0 8px; font-weight: 600; font-size: .9rem; }
.file-list { list-style: none; margin: 0 0 10px; padding: 0; }
.file-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: .9rem; }
.file-list li.removing .file-name { text-decoration: line-through; opacity: .6; }
.file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-remove { color: var(--error); font-size: .85rem; cursor: pointer; }
.file-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.file-row input[type="file"] { flex: 1; min-width: 0; font: inherit; font-size: .9rem; color: var(--muted); }
.file-row input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.file-row input[type="file"]::file-selector-button:hover { border-color: var(--primary); color: var(--primary-text); }
.file-row-remove { border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.file-row-remove:hover { color: var(--error); }
.file-links { list-style: none; margin: 6px 0 0; padding: 0; }
.file-links li { margin-bottom: 4px; }
.file-links .muted { white-space: nowrap; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.copy-field { display: flex; gap: 8px; margin: 8px 0; }
.copy-field input { flex: 1; min-width: 0; padding: 9px 12px; font: inherit; font-size: .85rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.kpi small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.kpi strong.kpi-sm { font-size: 1.1rem; padding-top: 8px; }
.bar-col { min-width: 200px; }
.bar { display: inline-block; vertical-align: middle; width: 120px; height: 8px; border-radius: 999px; background: var(--primary-soft); margin-right: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--primary); }
td.wrap { white-space: normal; min-width: 220px; }

/* Estados de solicitudes de sello */
.pill-en_revision { background: var(--primary-soft); color: var(--primary-text); }
.pill-otorgado { background: #ecfdf3; color: #067647; }
.pill-rechazado { background: #f2f4f7; color: #667085; }
a.pill { text-decoration: none; }
.filters select { background: var(--surface); }

/* Formulario de postulación */
.form fieldset + fieldset { margin-top: 8px; }
.form fieldset > .field, .form fieldset > div > .field { margin-top: 16px; }
.form fieldset > .grid { margin-top: 16px; }
.form fieldset > .grid:first-of-type { margin-top: 0; }
.phone { display: flex; gap: 8px; }
.phone select { flex: 0 0 auto; width: auto; max-width: 48%; }
.phone input { flex: 1; min-width: 0; }
.check { align-items: flex-start; }
.check input { margin-top: 4px; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; border-radius: 10px; }

/* Landing */
.lp-hero {
    position: relative; overflow: hidden; color: var(--text);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, .78) 0%, rgba(250, 245, 255, .70) 50%, rgba(241, 230, 254, .62) 100%),
        #f1e6fe url("../images/fondo.jpg") center / cover no-repeat;
}
.lp-hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 112px; max-width: 1300px; }
.lp-kicker { display: inline-block; margin: 0 0 16px; padding: 6px 14px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-weight: 600; font-size: .85rem; }
.lp-hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.08; margin-bottom: 16px; letter-spacing: -.02em; }
.lp-hero h1 span { background: linear-gradient(90deg, #7a35c7 0, #a95af7 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { font-size: 1.12rem; color: #4a4160; margin: 0 0 28px; max-width: 40ch; }
.lp-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-light { background: #fff; color: #6b2bb5; box-shadow: 0 10px 30px rgba(60, 10, 110, .25); }
.btn-light:hover { background: #f7f0ff; }
.lp-link { color: var(--primary-text); font-weight: 600; }
.lp-hero .btn { box-shadow: 0 12px 30px rgba(122, 53, 199, .3); }
.lp-hero-art { position: relative; min-height: 320px; }
.lp-orb {
    position: absolute; inset: 0; margin: auto; width: 250px; height: 250px; border-radius: 50%; display: grid; place-content: center; text-align: center;
    background: rgba(255, 255, 255, .45); border: 1px solid rgba(169, 90, 247, .3); backdrop-filter: blur(12px);
    box-shadow: inset 0 0 60px rgba(169, 90, 247, .12), 0 30px 60px rgba(95, 34, 168, .18);
    animation: lp-float 7s ease-in-out infinite;
}
.lp-orb strong { font-size: 4.5rem; line-height: 1; color: var(--primary-text); }
.lp-orb span { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); }
.lp-chip {
    position: absolute; padding: 10px 16px; border-radius: 12px; background: #fff; color: var(--text);
    font-size: .9rem; box-shadow: 0 12px 30px rgba(95, 34, 168, .16); white-space: nowrap; animation: lp-float 6s ease-in-out infinite;
}
.lp-chip strong { color: var(--primary-text); }
.lp-chip-1 { top: 4%; left: 0; animation-delay: -1s; }
.lp-chip-2 { top: 46%; right: -4%; animation-delay: -3s; }
.lp-chip-3 { bottom: 2%; left: 8%; animation-delay: -5s; }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .lp-orb, .lp-chip { animation: none; } }
.lp-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; fill: var(--bg); }

.lp-section { padding: 64px 0; }
.lp-section .container, .lp-final .container { max-width: 1300px; }
.lp-alt { background: var(--surface); }
.lp-title { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0 0 32px; letter-spacing: -.01em; }
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.lp-steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.lp-steps h3 { margin: 12px 0 6px; }
.lp-steps p { margin: 0; color: var(--muted); }
.lp-step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 700; }
.lp-dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.lp-dim { border-radius: 16px; padding: 20px; background: var(--bg); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.lp-dim:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(122, 53, 199, .12); }
.lp-dim h3 { font-size: 1.02rem; margin: 12px 0 4px; }
.lp-dim p { margin: 0; }
.lp-dim-code { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; }
.lp-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 24px; }
.lp-levels-note { margin: 16px 0 0; text-align: center; }
.lp-final { text-align: center; color: #fff; padding: 64px 0; background: linear-gradient(135deg, #7a35c7, #a95af7); }
.lp-final h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 0 0 8px; }
.lp-final p { margin: 0 0 24px; opacity: .95; }
@media (max-width: 760px) {
    .lp-hero-inner { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 96px; }
    .lp-hero-art { min-height: 260px; }
    .lp-orb { width: 200px; height: 200px; }
    .lp-chip-2 { top: 4%; right: 0; }
}

/* Reporte de resultados */
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.report-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; margin-bottom: 20px; }
.ring { position: relative; width: 150px; height: 150px; margin: 0; }
.ring svg { width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 12; }
.ring-track { stroke: var(--primary-soft); }
.ring-value { stroke: var(--primary); stroke-linecap: round; }
.ring figcaption { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring figcaption strong { font-size: 1.7rem; line-height: 1.1; }
.ring figcaption span { color: var(--muted); font-size: .85rem; }
.report-score p { margin: 0; }
.report-points { font-size: 2.4rem; font-weight: 700; line-height: 1.2; }
.report-points small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.report-level { margin-top: 6px !important; }
.report-level .pill { margin-right: 6px; }
.report-level-desc { margin-top: 4px !important; max-width: 52ch; }

/* Niveles del Sello IIE: colores de la lámina "El Sello IIE". */
.seal-card { border-radius: 28px; padding: 28px 24px; color: #1b2559; }
.seal-card p { margin: 0; }
.seal-card-stage { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .02em; }
.seal-card-name { margin: 8px 0 12px !important; color: var(--primary); font-weight: 800; font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.25; text-transform: uppercase; overflow-wrap: anywhere; }
.seal-card-icon { display: block; width: 112px; max-width: 100%; height: auto; margin: 20px auto 18px; }
.seal-card-kicker { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--seal-caption); }
.seal-card.seal-card-branded { text-align: center; background: radial-gradient(circle at 50% 38%, var(--seal-center) 0%, var(--seal-middle) 55%, var(--seal-edge) 100%); color: var(--seal-text); }
.seal-card-branded .seal-card-name { color: var(--seal-title); letter-spacing: .04em; overflow-wrap: normal; }
.seal-card-branded .seal-card-stage { color: var(--seal-caption); }
.seal-card-branded.seal-card-responsable { --seal-center: #c9b46a; --seal-middle: #b09d56; --seal-edge: #847638; --seal-title: #82712f; --seal-caption: #f3e4ad; --seal-text: #403617; }
.seal-card-branded.seal-card-transformadora { --seal-center: #bdbdbd; --seal-middle: #999; --seal-edge: #606060; --seal-title: #565656; --seal-caption: #505050; --seal-text: #292929; }
.seal-card-branded.seal-card-referente { --seal-center: #858585; --seal-middle: #484848; --seal-edge: #050505; --seal-title: #000; --seal-caption: #dedede; --seal-text: #f5f5f5; }
.seal-card-range { font-weight: 700; }
.seal-card-desc { margin-top: 16px !important; line-height: 1.5; }
.lp-levels .seal-card-desc, .lp-levels .seal-card-note { text-align: justify; hyphens: auto; }
.seal-card-note { margin-top: 14px !important; font-size: .9rem; opacity: .8; }
.seal-card-comprometida { background: #ccfdfb; }
.lp-levels .seal-card-comprometida { text-align: center; background: #fff; border: 2px solid var(--primary); }
.lp-levels .seal-card-comprometida .seal-card-name { color: var(--primary-text); }
.lp-levels .seal-card-action { margin-top: 28px; }
.seal-card-responsable { background: #dededf; }
.seal-card-transformadora { background: #dfe9f6; }
.seal-card-referente { background: #f0d4f1; }
.seal-card-compact { min-width: 190px; padding: 20px 22px; border-radius: 22px; text-align: left; }
.seal-card-compact .seal-card-name { font-size: 1.05rem; margin: 6px 0 8px !important; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 20px; }
.chart-note { margin: -6px 0 16px; }
.hbars { display: grid; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 52px; gap: 10px; align-items: center; font-size: .88rem; }
.hbar-label { line-height: 1.25; }
.hbar-label strong { color: var(--primary-text); }
.hbar-track { position: relative; height: 14px; background: var(--bg); border-radius: 4px; }
.hbar-fill { position: absolute; inset: 0 auto 0 0; background: var(--primary); border-radius: 0 4px 4px 0; }
.hbar-tick { position: absolute; top: -3px; bottom: -3px; border-left: 1px dashed var(--muted); opacity: .6; }
.hbar-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar-axis { margin-top: -4px; }
.hbar-axis .hbar-track { background: none; height: 16px; }
.hbar-axis span { position: absolute; transform: translateX(-50%); font-size: .72rem; color: var(--muted); }
.stack { display: flex; gap: 2px; height: 36px; border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.stack-seg { display: grid; place-items: center; min-width: 24px; font-weight: 700; font-size: .85rem; }
.seq-0 { background: #ece3fb; color: var(--text); }
.seq-1 { background: #cba6f7; color: var(--text); }
.seq-2 { background: #9b4ff0; color: #fff; }
.seq-3 { background: #5f22a8; color: #fff; }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.seal-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; border: 2px solid var(--primary); background: linear-gradient(135deg, #fff 0, var(--primary-soft) 100%); }
.seal-cta h2 { margin: 0 0 4px; font-size: 1.25rem; }
.seal-cta p { margin: 0; max-width: 52ch; }
.table-wrap.flat { border: 0; border-radius: 0; }
.dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-soft); }
.dots i.on { background: var(--primary); }
.report-foot { margin-top: 16px; }
@media (max-width: 640px) {
    .report-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .hbar { grid-template-columns: 1fr 52px; }
    .hbar-label { grid-column: 1 / -1; }
}

/* Impresión / PDF del reporte */
@media print {
    @page { margin: 14mm; }
    body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .site-header .nav, .no-print, .site-footer, .alert { display: none !important; }
    .site-header { border: 0; }
    main.container { padding-top: 8px; max-width: none; }
    .card { break-inside: avoid; box-shadow: none; }
    tr { break-inside: avoid; }
    .report-grid { grid-template-columns: 1fr; }
    .section-title { break-after: avoid; }
    .table-wrap { overflow: visible; }
}
.report main.container { max-width: 1080px; }
.wide .container { max-width: 1200px; }

/* Fondo con imagen y tarjetas translúcidas (registro y evaluación) */
.form-bg {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, .78) 0%, rgba(250, 245, 255, .70) 50%, rgba(241, 230, 254, .62) 100%),
        #6b2bb5 url("../images/fondo.jpg") center / cover no-repeat;
    background-attachment: fixed;
}
.form-bg .site-header { background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); }
.form-bg .site-footer { border-top-color: rgba(122, 53, 199, .15); }
.form-bg main.container { padding-top: 48px; padding-bottom: 64px; }
.form-bg .hero h1, .form-bg .report-head h1, .form-bg main > h1 { color: var(--text); }
.form-bg .hero .lead, .form-bg .report-head .lead, .form-bg main > .lead { color: #4a4160; }
.form-bg .card .eyebrow { color: var(--primary-text); }
.form-bg .card .section-title { color: var(--text); }
.form-bg .card, .form-bg .table-wrap {
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(95, 34, 168, .14);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}
.form-bg .card .table-wrap { box-shadow: none; border-radius: 0; background: transparent; border: 0; backdrop-filter: none; }
.form-bg .card { padding: 36px; }
.form-bg .steps .step:not(.current) { background: rgba(255, 255, 255, .8); }
.form-bg .sticky-actions { background: rgba(255, 255, 255, .78); backdrop-filter: blur(12px); border-radius: 14px; padding: 12px 16px; margin-top: 16px; }
.form-bg .btn-secondary { background: rgba(255, 255, 255, .9); }

/* Más aire en el formulario */
.form-bg .form legend { font-size: 1.15rem; color: var(--primary-text); margin-bottom: 20px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-soft); width: 100%; }
.form-bg .form fieldset { margin-bottom: 32px; }
.form-bg .form .grid { gap: 24px 28px; }
.form-bg .form fieldset > .field, .form-bg .form fieldset > div > .field, .form-bg .form fieldset > .grid { margin-top: 24px; }
.form-bg .form fieldset > .grid:first-of-type { margin-top: 0; }
.form-bg .field label { font-weight: 600; margin-bottom: 8px; color: #3b3150; }
.form-bg .field input, .form-bg .field select, .form-bg .phone select, .form-bg .phone input {
    padding: 13px 14px; border-radius: 10px; background: rgba(255, 255, 255, .8); border-color: rgba(169, 90, 247, .22);
    transition: border-color .15s, box-shadow .15s;
}
.form-bg .field input:focus, .form-bg .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(169, 90, 247, .2); }
.form-bg .phone { gap: 12px; }
.form-bg .form .check { margin-top: 8px; padding: 16px; border-radius: 12px; background: var(--primary-soft); }
.form-bg .form .actions { margin-top: 28px; }

@media (max-width: 640px) {
    .form-bg .card { padding: 22px; }
    .form-bg { background-attachment: scroll; }
}
@media print {
    .form-bg { background: #fff; }
    .form-bg .card, .form-bg .table-wrap { background: #fff; box-shadow: none; backdrop-filter: none; border-color: var(--border); }
    .form-bg .report-head h1, .form-bg .section-title { color: var(--text); }
    .form-bg .report-head .lead, .form-bg .eyebrow { color: var(--muted); }
}
.form-bg .form fieldset > .grid > .field { margin-top: 0; }
.form-bg .level span { background: rgba(255, 255, 255, .75); }
.form-bg .sticky-actions { background: rgba(255, 255, 255, .55); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* Evaluación en tabla (una dimensión por paso, como el Excel del instrumento). */
.scale-hint { display: inline-block; margin-left: 12px; font-size: .88rem; white-space: nowrap; }
.scale-hint strong { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 4px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-size: .78rem; }
.iie-table-wrap { margin-top: 20px; overflow: hidden; }
.iie-table { font-size: .9rem; table-layout: fixed; }
.iie-table th, .iie-table td { white-space: normal; vertical-align: top; padding: 14px; }
.iie-table thead th { background: var(--primary); color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 0; }
.iie-table .col-code { width: 64px; }
.iie-table .col-name { width: 22%; }
.iie-table .col-score { width: 196px; }
.iie-table tbody tr:nth-child(even) td { background: rgba(241, 230, 254, .35); }
.iie-table tbody tr.invalid td { background: var(--error-bg); }
.iie-table tbody tr.invalid .score-picker span { border-color: var(--error); }
.iie-table .col-desc { line-height: 1.5; }
.code-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: .8rem; }
.score-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.score-picker label { position: relative; }
.score-picker input { position: absolute; opacity: 0; }
.score-picker span { display: grid; place-items: center; height: 40px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-weight: 700; color: var(--primary-text); cursor: pointer; transition: background .15s, border-color .15s; }
.score-picker span:hover { border-color: var(--primary); }
.score-picker input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(169, 90, 247, .35); }
.score-picker input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.iie-table tfoot td { background: var(--primary-soft); font-weight: 600; border-bottom: 0; }
.iie-table .subtotal-label { text-align: right; color: var(--primary-text); }
.iie-table .subtotal-value { font-size: 1rem; }
.iie-table .subtotal-value strong { font-size: 1.2rem; color: var(--primary-text); }
.form-bg .iie-table-wrap { padding: 0; }

@media (max-width: 860px) {
    .iie-table, .iie-table tbody, .iie-table tr, .iie-table td, .iie-table tfoot { display: block; width: auto !important; }
    .iie-table thead { display: none; }
    .iie-table tbody tr { padding: 16px; border-bottom: 1px solid var(--border); }
    .iie-table tbody tr td { padding: 4px 0; border: 0; background: transparent !important; }
    .iie-table tbody tr:nth-child(even) { background: rgba(241, 230, 254, .35); }
    .iie-table tbody tr.invalid { background: var(--error-bg); }
    .iie-table td.col-desc::before, .iie-table td.col-score::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-top: 8px; }
    .iie-table td.col-code { float: right; }
    .iie-table td.col-score { padding-top: 8px; }
    .iie-table tfoot tr { display: flex; justify-content: space-between; padding: 14px 16px; background: var(--primary-soft); }
    .iie-table tfoot td { padding: 0; }
}
