/* Revisa mi horario — estilos propios. Usa las variables de shared.css. */

.rh-privacidad {
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--primary-light, #ecfdf5); border: 1px solid var(--primary, #059669);
  border-radius: 12px; padding: .9rem 1rem; margin: 1.5rem 0;
}
.rh-privacidad i { color: var(--primary, #059669); margin-top: .2rem; }
.rh-privacidad p { margin: 0; font-size: .95rem; }

.rh-panel, .rh-resultados {
  background: var(--bg-card, #fff); border: 1px solid var(--border, #e5e7eb);
  border-radius: 14px; padding: 1.25rem; margin: 1.5rem 0;
}
.rh-panel h2, .rh-resultados h2 { margin-top: 0; font-size: 1.25rem; }
.rh-resultados h3 { font-size: 1.05rem; margin: 1.5rem 0 .6rem; }

.rh-campo { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; min-width: 0; }
.rh-campo label { font-weight: 600; font-size: .95rem; }
.rh-sub { font-weight: 400; color: var(--text-muted, #6b7280); font-size: .85rem; }
.rh-campo input[type="number"], .rh-campo input[type="file"], .rh-alternativa textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem;
  padding: .6rem .7rem; border: 1px solid var(--border, #d1d5db); border-radius: 10px;
  background: var(--bg, #fff); color: var(--text, #111827);
}
.rh-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 0 1rem; }
.rh-fila > * { min-width: 0; }
.rh-nota { font-size: .87rem; color: var(--text-muted, #6b7280); margin: .25rem 0 1rem; }

.rh-botones { display: flex; flex-wrap: wrap; gap: .6rem; margin: .75rem 0; }
.rh-btn {
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  min-height: 44px; padding: .6rem 1.1rem; border-radius: 10px;
  border: 1px solid var(--primary, #059669); background: transparent; color: var(--primary-dark, #047857);
}
.rh-btn--primario { background: var(--primary, #059669); color: #fff; }
.rh-btn:disabled { opacity: .6; cursor: progress; }
.rh-btn:focus-visible { outline: 3px solid var(--primary, #059669); outline-offset: 2px; }

.rh-alternativa { margin-top: 1rem; border-top: 1px solid var(--border, #e5e7eb); padding-top: .75rem; }
.rh-alternativa summary { cursor: pointer; font-weight: 600; color: var(--primary-dark, #047857); min-height: 44px; display: flex; align-items: center; }
.rh-alternativa label { display: block; font-size: .9rem; margin: .5rem 0 .3rem; }

.rh-estado { margin: .5rem 0 0; font-weight: 600; }
.rh-estado--error { color: #b91c1c; }

.rh-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: .75rem; }
.rh-dato { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: .8rem; min-width: 0; }
.rh-dato span { display: block; font-size: .8rem; color: var(--text-muted, #6b7280); }
.rh-dato strong { display: block; font-size: 1.35rem; margin-top: .2rem; overflow-wrap: anywhere; }
.rh-dato--mas strong { color: #b45309; }
.rh-dato--menos strong { color: #1d4ed8; }

.rh-tabla-wrap { overflow-x: auto; max-width: 100%; }
.rh-tabla-alta { max-height: 60vh; overflow-y: auto; }
.rh-table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.rh-table th, .rh-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--border, #e5e7eb); text-align: right; white-space: nowrap; }
.rh-table th:first-child, .rh-table td:first-child { text-align: left; }
.rh-table tfoot td { font-weight: 700; }
.rh-dif { color: #b91c1c; font-weight: 700; }
.rh-editable input { width: 5.2rem; font: inherit; padding: .3rem; border: 1px solid var(--border, #d1d5db); border-radius: 6px; background: var(--bg, #fff); color: var(--text, #111827); }

.rh-errores { padding-left: 1.4rem; }
.rh-errores li { margin-bottom: .5rem; }
.rh-ok { color: var(--primary-dark, #047857); font-weight: 600; }
.rh-aviso { margin-bottom: .75rem; }
.rh-aviso summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.rh-aviso ul { padding-left: 1.2rem; font-size: .9rem; }

.rh-acciones { margin-top: 1.5rem; }
#rh-copia-manual textarea { width: 100%; box-sizing: border-box; font: inherit; }

.rh-cta {
  margin-top: 1.5rem; padding: 1rem; border-radius: 12px;
  background: var(--bg-section, #f9fafb); border: 1px solid var(--border, #e5e7eb); font-size: .93rem;
}
.rh-cta p { margin: 0 0 .5rem; }
.rh-cta p:last-child { margin: 0; }

/* Informe para el PDF: se pinta fuera de la pantalla, siempre en claro. */
/* `display:flex` en el <summary> quita el triángulo: se pinta a mano. */
.rh-alternativa summary::before, .rh-aviso summary::before { content: '▸'; margin-right: .45rem; }
.rh-alternativa[open] > summary::before, .rh-aviso[open] > summary::before { content: '▾'; }

/* Adaptar con IA: sólo aparece si el navegador no sabe leer el horario. */
.rh-ia {
  margin-top: 1rem; padding: 1rem; border-radius: 12px;
  border: 1px solid var(--ss, #f59e0b); background: var(--bg-section, #fffbeb);
}
.rh-ia h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.rh-ia p { margin: 0 0 .5rem; }
.rh-aviso-ia { border-left: 4px solid var(--ss, #f59e0b); padding: .6rem .8rem; margin: 0 0 1rem; background: var(--bg-section, #fffbeb); border-radius: 8px; }

/* Quién revisa: empleado o titular. */
.rh-perfil { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: .6rem .9rem .8rem; margin: 0 0 1rem; min-width: 0; }
.rh-perfil legend { font-weight: 600; padding: 0 .3rem; }
.rh-perfil label { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; min-height: 44px; cursor: pointer; }
.rh-perfil input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary, #059669); }

/* Parte del año y cuadrantes de todo el equipo */
.rh-check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 600; font-size: .95rem; margin: .25rem 0 .75rem; cursor: pointer; min-height: 44px; }
.rh-check input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; flex: none; accent-color: var(--primary, #059669); }
.rh-parcial { border-left: 3px solid var(--primary, #059669); padding-left: .85rem; margin-bottom: .5rem; }
.rh-campo input[type="date"], .rh-campo select {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; min-height: 44px;
  padding: .55rem .7rem; border: 1px solid var(--border, #d1d5db); border-radius: 10px;
  background: var(--bg, #fff); color: var(--text, #111827);
}
.rh-campo input:disabled { opacity: .55; }
.rh-equipo { margin-bottom: 1rem; }
.rh-equipo .rh-alternativa { margin-top: .25rem; }
.rh-enlace {
  font: inherit; font-weight: 600; color: var(--primary-dark, #047857); background: none; border: 0;
  padding: .35rem 0; min-height: 36px; cursor: pointer; text-align: left; text-decoration: underline; white-space: normal;
}
.rh-table td.rh-dato--mas { color: #b45309; font-weight: 700; }
.rh-table td.rh-dato--menos { color: #1d4ed8; font-weight: 700; }
