/* ==========================================================================
   Portal del curso de Enfoque Diferencial (inducción y reinducción).
   Mismo diseño de la Encuesta de Clima Organizacional (ClimaOrganizacional.aspx):
   encabezado institucional, logo lateral, tarjeta con pasos; responsive para
   celular y PC. Tokens del sistema (verde esmeralda).
   ========================================================================== */
:root {
    --accent: #059669; --accent-d: #047857; --accent-l: #ecfdf5;
    --bg-mod: #f1f4fb; --surf: #fff; --surf2: #f7f9fc;
    --border: #e4e9f2; --border2: #c8d3e8;
    --green: #00c27a; --green-l: #e6f9f2;
    --red: #f03e3e; --red-l: #fdecec;
    --amber: #f59f00; --amber-l: #fef5e6;
    --text: #0d1b2e; --t2: #5c6f8a; --t3: #94a3b8;
    --r: 10px; --rl: 14px; --rx: 18px;
    --sh: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --sh2: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
    --tr: 0.17s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', sans-serif;
    --falt: 'Space Grotesk', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg-mod); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }

/* Encabezado y pie institucional */
.rso-top { width: 100%; background: var(--surf); border-bottom: 1px solid var(--border); padding: 14px 20px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.rso-top img { width: 38px; height: 38px; object-fit: contain; }
.rso-top-txt { font-family: var(--falt); font-weight: 700; font-size: 15px; color: var(--text); line-height: 1.3; text-align: left; }
.rso-top-txt small { display: block; font-family: var(--font); font-weight: 500; font-size: 11px; color: var(--t2); }
.rso-bottom { width: 100%; text-align: center; padding: 16px 20px 22px; font-size: 12px; color: var(--t3); line-height: 1.6; }
.rso-bottom a { color: var(--accent-d); text-decoration: none; font-weight: 600; }

.rso-main { width: 100%; flex: 1; display: flex; padding: 20px 0; }
.rso-main-inner { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; display: flex; align-items: flex-start; justify-content: center; gap: 40px; flex-wrap: wrap; }
.container { width: 100%; max-width: 640px; padding: 20px 0; }
.container.ancho { max-width: 760px; }

.rso-side-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; flex-shrink: 0; max-width: 240px; padding-top: 30px; }
.rso-side-logo-ring { position: relative; }
.rso-side-logo-ring::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #34d399); opacity: .18; animation: rsoPulso 2.8s ease-in-out infinite; }
@keyframes rsoPulso { 0%, 100% { transform: scale(1); opacity: .18; } 50% { transform: scale(1.08); opacity: .32; } }
.rso-side-ico { position: relative; width: 150px; height: 150px; border-radius: 50%; background: var(--surf); box-shadow: var(--sh2), 0 0 0 8px var(--surf); display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--accent); }
.rso-side-img { position: relative; width: 150px; height: 150px; border-radius: 50%; object-fit: contain; background: var(--surf); box-shadow: var(--sh2), 0 0 0 8px var(--surf); display: block; }
@media (min-width: 1000px) { .rso-side-img { width: 200px; height: 200px; } }
@media (max-width: 999px) { .solo-inicio .rso-side-img { width: 120px; height: 120px; } }
.rso-side-title { font-family: var(--falt); font-weight: 800; font-size: 19px; color: var(--text); text-align: center; line-height: 1.2; }
.rso-side-title span { color: var(--accent); }
.rso-side-divider { width: 46px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), #34d399); }
.rso-side-sub { font-size: 12.5px; color: var(--t2); text-align: center; line-height: 1.6; }
.rso-side-sub b { color: var(--accent-d); font-weight: 700; }
@media (max-width: 999px) { .rso-side-logo { display: none; } .rso-side-logo.solo-inicio { display: flex; padding-top: 0; } .solo-inicio .rso-side-ico { width: 110px; height: 110px; font-size: 46px; } }
@media (min-width: 1000px) { .rso-side-ico { width: 200px; height: 200px; font-size: 84px; } .rso-side-title { font-size: 23px; } }

.card { background: var(--surf); border-radius: var(--rx); box-shadow: var(--sh2); padding: 30px; margin-bottom: 20px; }
@media (max-width: 480px) { .card { padding: 22px 18px; border-radius: var(--rl); } .rso-main-inner { padding: 0 12px; } }
.title { font-family: var(--falt); font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 10px; text-align: center; }
.subtitle { font-size: 14px; color: var(--t2); text-align: center; margin-bottom: 26px; }
.text-center { text-align: center; }
.ico-grande { font-size: 48px; color: var(--accent); margin-bottom: 15px; }

.step { display: none; animation: fadeIn 0.3s ease-in-out; }
.step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.info-text { font-size: 14px; color: var(--t2); line-height: 1.6; margin-bottom: 16px; }
.info-box { background: var(--accent-l); border: 1px solid #c8ede0; border-radius: var(--r); padding: 15px 18px; margin-bottom: 20px; font-size: 13.5px; color: var(--accent-d); line-height: 1.6; }
.instr-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--t2); background: var(--surf2); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; margin-bottom: 20px; line-height: 1.5; }
.instr-line i { color: var(--accent); font-size: 16px; margin-top: 2px; }

/* Formularios */
.input-group { margin-bottom: 18px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 14px; color: var(--text); }
.input-group label small { color: var(--t3); font-weight: 400; }
.input-group input, .input-group select { width: 100%; padding: 12px 15px; border: 1px solid var(--border); border-radius: var(--r); font-family: var(--font); font-size: 15px; outline: none; transition: var(--tr); background: #fff; }
.input-group input:focus, .input-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-l); }
.fila-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .fila-2 { grid-template-columns: 1fr; } }
.select2-container .select2-selection--single { height: 46px; border: 1px solid var(--border); border-radius: var(--r); }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 46px; padding-left: 15px; color: var(--text); font-size: 15px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }
.select2-dropdown { border-color: var(--border); border-radius: var(--r); font-family: var(--font); }
.select2-results__option--highlighted { background: var(--accent) !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; border: none; padding: 13px 20px; border-radius: var(--r); font-family: var(--font); font-size: 15px; font-weight: 600; cursor: pointer; transition: var(--tr); width: 100%; text-decoration: none; }
.btn:hover { background: var(--accent-d); }
.btn:disabled { background: var(--border2); cursor: not-allowed; }
.btn.gris { background: #e4e9f2; color: #5c6f8a; }
.btn.gris:hover { background: #d6dde9; }
.btn.borde { background: #fff; color: var(--accent-d); border: 1.5px solid var(--accent); }
.botones { display: flex; gap: 10px; margin-top: 10px; }
.botones .btn { flex: 1; }

/* Botones de opción (pasos del registro) */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
@media (max-width: 480px) { .options-grid { grid-template-columns: 1fr; } }
.opt-btn { background: var(--surf2); border: 1px solid var(--border); padding: 16px 14px; border-radius: var(--r); text-align: center; cursor: pointer; font-weight: 500; font-size: 14.5px; transition: var(--tr); color: var(--t2); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.opt-btn i { font-size: 24px; }
.opt-btn:hover { border-color: var(--accent); color: var(--accent); }
.opt-btn.selected { background: var(--accent-l); border-color: var(--accent); color: var(--accent-d); font-weight: 600; box-shadow: 0 0 0 2px var(--accent) inset; }
.opt-btn.grupo { flex-direction: row; text-align: left; justify-content: flex-start; padding: 12px 14px; }
.opt-btn.grupo i { font-size: 18px; width: 34px; height: 34px; border-radius: 9px; color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.opt-btn.ninguno { grid-column: 1 / -1; }

.progress-bar { height: 6px; background: var(--border); border-radius: 3px; margin-bottom: 22px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s ease; }
.paso-lbl { font-size: 12px; color: var(--t3); text-align: center; margin-bottom: 8px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* Panel del participante */
.perfil { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--accent-l); border-radius: var(--rl); margin-bottom: 18px; }
.perfil-av { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex: 0 0 auto; }
.perfil-info { flex: 1; min-width: 0; }
.perfil-nom { font-weight: 700; font-size: 15px; }
.perfil-doc { font-size: 12.5px; color: var(--t2); }
.perfil-salir { color: var(--red); background: none; border: none; font-size: 18px; cursor: pointer; padding: 6px; }

.estado { border-radius: var(--rl); padding: 18px; margin-bottom: 18px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid; }
.estado i.e-ico { font-size: 26px; margin-top: 2px; }
.estado h3 { font-family: var(--falt); font-size: 17px; margin-bottom: 4px; }
.estado p { font-size: 13.5px; line-height: 1.55; }
.estado.pendiente { background: var(--amber-l); border-color: #fcd581; color: #8a5a00; }
.estado.vencida { background: var(--red-l); border-color: #f7b4b4; color: #a61e1e; }
.estado.vigente { background: var(--green-l); border-color: #9be7c6; color: #046c4e; }
.estado.encurso { background: #eef4ff; border-color: #bcd2fb; color: #1d4ed8; }

.lista-cursos { display: grid; gap: 12px; }
.curso-item { border: 1px solid var(--border); border-radius: var(--rl); padding: 16px; background: var(--surf2); }
.curso-item h4 { font-family: var(--falt); font-size: 15.5px; margin-bottom: 4px; }
.curso-item p { font-size: 13px; color: var(--t2); line-height: 1.5; margin-bottom: 10px; }
.curso-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: #fff; border: 1px solid var(--border); color: var(--t2); }
.chip.ok { background: var(--green-l); border-color: #9be7c6; color: #047857; }
.chip.warn { background: var(--amber-l); border-color: #fcd581; color: #8a5a00; }
.chip.bad { background: var(--red-l); border-color: #f7b4b4; color: #c92a2a; }

.seccion-t { font-family: var(--falt); font-size: 16px; font-weight: 700; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.seccion-t i { color: var(--accent); }

/* Ruta del curso (módulos) */
.ruta-curso { display: grid; gap: 10px; }
.mod { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--rl); background: #fff; cursor: pointer; transition: var(--tr); }
.mod:hover { border-color: var(--accent); }
.mod-n { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--surf2); border: 1px solid var(--border); color: var(--t2); flex: 0 0 auto; }
.mod.visto .mod-n { background: var(--accent); border-color: var(--accent); color: #fff; }
.mod.bloq { opacity: .55; cursor: not-allowed; }
.mod-t { flex: 1; font-weight: 600; font-size: 14px; line-height: 1.35; }
.mod-t small { display: block; font-weight: 400; color: var(--t2); font-size: 12px; margin-top: 2px; }
.mod i.fa-chevron-right { color: var(--t3); }
.mod.prueba .mod-n { background: #eef4ff; border-color: #bcd2fb; color: #1d4ed8; }
.mod.prueba.visto .mod-n { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

/* Contenido de un módulo */
.lec-top { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--rl); color: #fff; margin-bottom: 18px; background: linear-gradient(120deg, var(--lec-color, var(--accent)) 0%, #0d1b2e 150%); }
.lec-top .lec-ico { width: 50px; height: 50px; border-radius: 13px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto; }
.lec-top h2 { font-family: var(--falt); font-size: 19px; line-height: 1.25; }
.lec-top p { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.lec-texto { font-size: 14.5px; line-height: 1.7; white-space: pre-line; margin-bottom: 14px; }
.lec-lista { list-style: none; display: grid; gap: 8px; margin-bottom: 8px; }
.lec-lista li { display: flex; gap: 10px; align-items: flex-start; background: var(--surf2); border: 1px solid var(--border); border-radius: var(--r); padding: 11px 13px; font-size: 14px; line-height: 1.55; }
.lec-lista li i { color: var(--accent); margin-top: 4px; }
.lec-lista.claves li { background: var(--accent-l); border-color: #a7f3d0; font-weight: 500; }
.sino { display: grid; gap: 12px; }
.sino-col { border-radius: var(--rl); padding: 13px; border: 1px solid; }
.sino-col.si { background: var(--green-l); border-color: #9be7c6; }
.sino-col.no { background: var(--red-l); border-color: #f7b4b4; }
.sino-col h4 { font-family: var(--falt); font-size: 15px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.sino-col.si h4 { color: #047857; } .sino-col.no h4 { color: #c92a2a; }
.sino-it { background: #fff; border-radius: var(--r); padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; line-height: 1.55; }
.sino-it em { display: block; margin-top: 5px; font-size: 12.5px; color: var(--t2); }
.paso-r { position: relative; margin: 0 0 12px 18px; padding: 11px 13px 11px 22px; border-left: 3px solid var(--accent); background: var(--surf2); border-radius: 0 var(--r) var(--r) 0; font-size: 13.5px; line-height: 1.55; }
.paso-r b { display: block; font-family: var(--falt); font-size: 14px; margin-bottom: 3px; }
.paso-r::before { content: attr(data-n); position: absolute; left: -16px; top: 9px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--surf); }
.paso-r small { display: block; margin-top: 5px; color: var(--t2); }
.ruta-nom { font-weight: 700; font-size: 14.5px; margin: 14px 0 10px; }
.lec-doc { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px dashed var(--accent); border-radius: var(--rl); color: var(--accent-d); text-decoration: none; font-weight: 600; font-size: 14px; margin-top: 16px; }
.lec-doc:hover { background: var(--accent-l); }
.tabs-lec { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.tab-lec { flex: 0 0 auto; border: 1px solid var(--border); background: #fff; border-radius: 99px; padding: 7px 13px; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--t2); cursor: pointer; }
.tab-lec.activo { background: var(--accent); border-color: var(--accent); color: #fff; }
.pan-lec { display: none; }
.pan-lec.activo { display: block; animation: fadeIn .25s ease; }

/* Preguntas */
.question-text { font-size: 17px; font-weight: 600; margin-bottom: 20px; line-height: 1.45; }
.tipo-badge { background: var(--accent-l); color: var(--accent-d); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; margin-bottom: 12px; }
.opciones { display: grid; gap: 10px; margin-bottom: 22px; }
.opcion { display: flex; gap: 12px; align-items: flex-start; padding: 14px 15px; border: 1.5px solid var(--border); border-radius: var(--r); cursor: pointer; font-size: 14.5px; line-height: 1.45; background: #fff; transition: var(--tr); }
.opcion:hover { border-color: var(--accent); }
.opcion .letra { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--t2); flex: 0 0 auto; }
.opcion.selected { border-color: var(--accent); background: var(--accent-l); }
.opcion.selected .letra { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Retroalimentación inmediata: la válida en verde, el error en rojo */
.opcion.bloqueada { cursor: default; }
.opcion.bloqueada:hover { border-color: var(--border); }
.opcion.correcta, .opcion.correcta:hover { border-color: var(--green); background: var(--green-l); color: #046c4e; font-weight: 600; }
.opcion.correcta .letra { background: var(--green); border-color: var(--green); color: #fff; }
.opcion.incorrecta, .opcion.incorrecta:hover { border-color: var(--red); background: var(--red-l); color: #a61e1e; }
.opcion.incorrecta .letra { background: var(--red); border-color: var(--red); color: #fff; }
.retro { border-radius: var(--r); padding: 12px 14px; font-size: 13.5px; line-height: 1.55; margin-top: 4px; border: 1px solid; animation: fadeIn .25s ease; }
.retro b { display: block; margin-bottom: 4px; }
.retro.ok { background: var(--green-l); border-color: #9be7c6; color: #046c4e; }
.retro.mal { background: var(--red-l); border-color: #f7b4b4; color: #a61e1e; }
.retro span { color: var(--text); }

/* Resultado */
.puntaje { font-family: var(--falt); font-size: 54px; font-weight: 800; text-align: center; line-height: 1; margin: 10px 0 6px; }
.puntaje.ok { color: var(--accent); } .puntaje.mal { color: var(--red); }
.revision { display: grid; gap: 10px; margin-top: 16px; }
.rev { border-radius: var(--r); padding: 12px 14px; font-size: 13.5px; line-height: 1.5; border: 1px solid; }
.rev.ok { background: var(--green-l); border-color: #9be7c6; }
.rev.mal { background: var(--red-l); border-color: #f7b4b4; }
.rev b { display: block; margin-bottom: 4px; }
.rev small { display: block; margin-top: 5px; color: var(--t2); }

#loader { position: fixed; inset: 0; background: rgba(255,255,255,0.9); z-index: 9999; display: none; align-items: center; justify-content: center; flex-direction: column; }
.spinner { border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin-bottom: 15px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
