:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172235;
  background: #f3f5f8;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 32px; background: #162d4b; color: white;
}
.brand { font-weight: 800; letter-spacing: 1.5px; font-size: 18px; }
.subtitle { opacity: .75; margin-top: 4px; font-size: 13px; }
.topright { display: flex; gap: 20px; align-items: center; font-size: 12px; }
.topright button {
  border: 1px solid #60738a; background: transparent; color: white;
  padding: 8px 14px; border-radius: 7px;
}
.container { max-width: 1500px; margin: auto; padding: 30px; }
.heading { display: flex; justify-content: space-between; align-items: center; }
h1 { font-size: 28px; margin: 0; }
.heading p { color: #6d7888; margin-top: 7px; }
.badge {
  background: #e3ebf5; color: #254c7a; border-radius: 20px;
  padding: 8px 13px; font-size: 12px;
}
.kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 22px 0; }
.kpi {
  background: white; border: 1px solid #e3e8ef; border-radius: 12px;
  padding: 22px; box-shadow: 0 3px 12px #192d4a08;
}
.kpi span { color: #778294; display: block; font-size: 13px; }
.kpi strong { display: block; margin-top: 10px; font-size: 34px; }
.workspace { display: grid; grid-template-columns: 370px minmax(0,1fr); gap: 18px; }
.panel {
  background: white; border: 1px solid #e3e8ef; border-radius: 12px;
  padding: 22px; min-width: 0;
}
.panelhead { display: flex; align-items: center; justify-content: space-between; }
h2 { font-size: 17px; margin: 0 0 18px; }
.filtros { display: grid; gap: 9px; margin-bottom: 15px; }
.filtros input, .filtros select {
  width: 100%; padding: 11px; border: 1px solid #dce2eb; border-radius: 8px;
  background: white;
}
.empleados { max-height: 660px; overflow: auto; }
.empleado {
  display: block; width: 100%; text-align: left; padding: 13px;
  background: white; border: 0; border-bottom: 1px solid #edf0f4;
}
.empleado:hover, .empleado.activo { background: #edf4fc; }
.empleado strong { display: block; font-size: 13px; }
.empleado small { display: block; color: #798494; margin-top: 5px; }
.ficha { min-height: 105px; color: #687486; }
.ficha h3 { color: #172235; margin: 0 0 8px; }
.ficha p { margin: 5px 0; font-size: 13px; }
.separador { height: 1px; background: #e8edf2; margin: 25px 0; }
.calendario-control {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; margin: 10px 0 20px;
}
.calendario-control button {
  border: 1px solid #dce2eb; background: white;
  border-radius: 7px; padding: 7px 15px;
}
.leyenda { display: flex; flex-wrap: wrap; gap: 15px; font-size: 12px; margin-bottom: 17px; }
.leyenda span { display: flex; align-items: center; gap: 6px; }
.leyenda i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.vacaciones { background: #3d9d74; }
.it { background: #db7878; }
.licencias { background: #e5ae4f; }
.otros { background: #8a91ad; }
.calendario { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.dia, .dia-cabecera {
  text-align: center; padding: 10px 3px; border-radius: 6px; font-size: 12px;
}
.dia { background: #f6f8fb; min-height: 39px; }
.dia-cabecera { color: #718095; font-weight: 700; }
.dia.vacaciones { background: #cdebdc; }
.dia.it { background: #f6d6d6; }
.dia.licencias { background: #f8e8bf; }
.dia.otros { background: #e2e4ee; }
.dia.vacio { background: transparent; }

.dia[role="button"] {
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}

.dia[role="button"]:hover {
  box-shadow: inset 0 0 0 2px #527ba8;
}

.dia[role="button"]:focus-visible {
  outline: 3px solid #245b99;
  outline-offset: 2px;
}

.dia.semana-seleccionada {
  box-shadow: inset 0 0 0 2px #4177b5;
}

.dia.hoy {
  outline: 3px solid #193d68;
  outline-offset: -3px;
  font-weight: 800;
}

.calendario-control #irHoy {
  font-size: 12px;
  font-weight: 700;
  background: #edf4fc;
}
.ausencias-mes { margin-top: 20px; }
.ausencia {
  padding: 11px 0; border-bottom: 1px solid #edf0f4;
  font-size: 12px; display: flex; justify-content: space-between; gap: 12px;
}
.mensaje { color: #a13737; font-size: 13px; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .topbar { padding: 16px; }
  .topright { flex-direction: column; gap: 7px; align-items: flex-end; }
  .container { padding: 16px; }
  .heading { align-items: flex-start; }
}


/* RRHH-07A-5B · Navegación funcional */

.kpi-accion {
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.kpi-accion:hover,
.kpi-accion:focus-visible {
  border-color: #4a7caf;
  box-shadow: 0 4px 18px #254c7a20;
}

.kpi-accion small {
  display: block;
  margin-top: 9px;
  color: #61758c;
}

.resultados {
  margin-bottom: 18px;
}

[hidden] {
  display: none !important;
}

.lista-resultados {
  display: grid;
  gap: 5px;
}

.panelhead button {
  border: 1px solid #dce2eb;
  background: white;
  border-radius: 7px;
  padding: 7px 12px;
}

.panel-calendario {
  margin-top: 18px;
}

.calendario {
  gap: 8px;
}

.dia-interactivo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 86px;
  border: 1px solid #e4e9f0;
  background: #f8fafc;
  padding: 12px 4px;
  color: #172235;
}

.dia-interactivo strong {
  font-size: 15px;
}

.dia-interactivo small {
  color: #687486;
  font-size: 11px;
}

.dia-interactivo:hover {
  border-color: #4177b5;
}

.dia-interactivo.semana-seleccionada {
  background: #edf4ff;
  box-shadow: inset 0 0 0 2px #4177b5;
}

.dia-interactivo.hoy {
  outline: 3px solid #193d68;
  outline-offset: -3px;
}

.indicadores-dia {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.indicadores-dia i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.encabezado-ausencias {
  margin-top: 26px;
}

.ausencia-interactiva {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  background: white;
  color: inherit;
  cursor: pointer;
}

.ausencia-interactiva:hover {
  background: #edf4fc;
}

.ausencia-interactiva strong,
.ausencia-interactiva small {
  display: block;
}

.ausencia-interactiva small {
  color: #687486;
  margin-top: 5px;
}

.ausencia-fechas {
  white-space: nowrap;
  color: #687486;
}

@media (max-width: 650px) {
  .dia-interactivo {
    min-height: 65px;
    padding: 7px 2px;
    gap: 5px;
  }

  .dia-interactivo small {
    font-size: 9px;
  }

  .ausencia-interactiva {
    flex-direction: column;
  }

  .ausencia-fechas {
    white-space: normal;
  }
}


/* RRHH-07B-3 · Ficha compacta */

.workspace {
  align-items: start;
}

.ficha-panel {
  align-self: start;
}

.ficha-panel .panelhead h2 {
  margin-bottom: 10px;
}

.ficha-compacta {
  min-height: 0;
}

.ficha-compacta h3 {
  margin: 0 0 13px;
  font-size: 17px;
}

.ficha-datos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}

.ficha-datos span {
  display: block;
  color: #718095;
  font-size: 11px;
  margin-bottom: 4px;
}

.ficha-datos strong {
  display: block;
  color: #172235;
  font-size: 13px;
}

/* RRHH-07B-3 · Histórico */

.panel-historico {
  margin-top: 18px;
}

.filtros-historico {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 15px 0 20px;
}

.filtros-historico label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #687486;
}

.filtros-historico select {
  min-width: 190px;
  padding: 10px;
  border: 1px solid #dce2eb;
  border-radius: 7px;
  background: white;
}

.resumen-historico {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.resumen-historico > div {
  padding: 14px;
  background: #f5f8fc;
  border-radius: 8px;
}

.resumen-historico span {
  display: block;
  color: #718095;
  font-size: 12px;
}

.resumen-historico strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
}

.historico-estado {
  font-size: 12px;
  color: #687486;
}

@media (max-width: 650px) {
  .ficha-datos {
    grid-template-columns: 1fr;
  }

  .resumen-historico {
    grid-template-columns: 1fr;
  }

  .filtros-historico,
  .filtros-historico label,
  .filtros-historico select {
    width: 100%;
  }
}


/* RRHH-07C-2 · Histórico individual */

.ficha-separador {
  margin: 18px 0;
}

.ficha h4 {
  color: #172235;
  font-size: 14px;
  margin: 0 0 13px;
}

.filtros-ficha {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 12px;
}

.filtros-ficha select {
  padding: 8px 10px;
  border: 1px solid #dce2eb;
  border-radius: 7px;
  background: white;
  max-width: 100%;
}

.resumen-ficha-ausencias {
  padding: 10px 12px;
  background: #f5f8fc;
  border-radius: 7px;
  color: #254c7a;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.listado-ficha-ausencias {
  max-height: 430px;
  overflow-y: auto;
}

.fila-ficha-ausencia {
  padding: 11px 0;
  border-bottom: 1px solid #edf0f4;
}

.fila-ficha-cabecera {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
}

.fila-ficha-cabecera strong {
  color: #254c7a;
}

.fila-ficha-cabecera span {
  color: #687486;
}

.fila-ficha-ausencia p {
  margin: 6px 0 0;
  color: #687486;
  font-size: 12px;
}


/* RRHH-07C-3 · Indicadores anuales de disponibilidad */

.panel-ratios-empleado {
  margin: 16px 0;
}

.panel-ratios-empleado h4 {
  margin-bottom: 12px;
}

.ratios-empleado {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ratio-tarjeta {
  padding: 12px;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  background: #f8fafc;
}

.ratio-tarjeta span {
  display: block;
  font-size: 11px;
  color: #687486;
  margin-bottom: 6px;
}

.ratio-tarjeta strong {
  display: block;
  font-size: 20px;
  color: #172235;
}

.ratio-tarjeta:last-child {
  background: #eaf4ee;
  border-color: #cce5d5;
}

.ratio-tarjeta:last-child strong {
  color: #17663a;
}

.nota-ratios {
  font-size: 11px;
  line-height: 1.5;
  color: #687486;
  margin: 12px 0 0;
}

@media (max-width: 520px) {
  .ratios-empleado {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   RRHH-13B · Identidad corporativa Grúas Alhambra
   Referencia: Tarifario GA
   ========================================================= */

:root {
  font-family: Inter, Arial, sans-serif;
  color: #17191c;
  background: #eef2ee;
}

body {
  background: #eef2ee;
  color: #17191c;
}

.topbar {
  background: #336433;
  border-bottom: 5px solid #F9CE0A;
}

.rrhh-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  color: white;
}

.rrhh-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

.subtitle {
  color: #e4eee4;
  opacity: 1;
}

.topright button {
  border-color: #b6cdb6;
  color: white;
}

.topright button:hover {
  background: #F9CE0A;
  color: #17191c;
}

.heading p,
.kpi span,
.empleado small,
.ficha,
.dia-cabecera {
  color: #687269;
}

.badge {
  background: #e4eee4;
  color: #336433;
}

.kpi,
.panel {
  border-color: #d9dfd9;
  box-shadow: 0 12px 34px rgba(18,24,29,.06);
}

.kpi-accion:hover,
.kpi-accion:focus-visible {
  border-color: #336433;
  box-shadow: 0 4px 18px rgba(51,100,51,.16);
}

.kpi-accion:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #F9CE0A;
  outline-offset: 2px;
}

.empleado:hover,
.empleado.activo {
  background: #f0f7f0;
}

.filtros input,
.filtros select {
  border-color: #cfd4d8;
}

.calendario-control button,
.panelhead button {
  border-color: #cfd4d8;
}

.calendario-control #irHoy {
  background: #F9CE0A;
  color: #17191c;
  border-color: #F9CE0A;
}

.dia[role="button"]:hover,
.dia-interactivo:hover {
  border-color: #336433;
  box-shadow: inset 0 0 0 2px #336433;
}

.dia[role="button"]:focus-visible {
  outline: 3px solid #F9CE0A;
}

.dia.semana-seleccionada,
.dia-interactivo.semana-seleccionada {
  box-shadow: inset 0 0 0 2px #336433;
}

.dia.hoy,
.dia-interactivo.hoy {
  outline: 3px solid #336433;
}

.dia-interactivo.semana-seleccionada {
  background: #f0f7f0;
}

@media (max-width: 600px) {
  .rrhh-logo {
    width: 44px;
    height: 44px;
  }

  .rrhh-brand {
    gap: 10px;
    font-size: 14px;
  }
}
