/* =============================================
   KARDEX — Historial de asistencia (día / semana)
   ============================================= */

.kardex-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
.kardex-scroll::-webkit-scrollbar { display: none; }

/* ───────────────────────────
   VISTA DIARIA
─────────────────────────── */

/* Tarjeta principal del día */
.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 14px;
}

/* Fila entrada → salida */
.day-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.time-block i        { font-size: 22px; color: var(--primary); }
.time-block .time-val { font-size: clamp(16px, 4.5vw, 20px); font-weight: 800; color: var(--text); }
.time-block .time-lbl { font-size: 11px; color: var(--text3); font-weight: 500; }

.time-sep {
  color: var(--border);
  padding: 0 6px;
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
}

/* Total horas centrado */
.day-total {
  text-align: center;
  margin-bottom: 16px;
}

.day-total .total-val {
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.day-total .total-lbl {
  font-size: 12px;
  color: var(--text2);
  margin-top: 5px;
}

/* Barra de progreso vs meta */
.progress-wrap { margin-bottom: 16px; }

.progress-bar-bg {
  height: 8px;
  background: var(--primary-50);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.55s ease;
  max-width: 100%;
}

.progress-bar-fill.over { background: var(--success); }

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
}

/* Stats del día (almuerzo, entrada, salida) */
.day-stats {
  display: flex;
  gap: 8px;
}

.day-stat-item {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
}

.day-stat-item .val { font-size: clamp(12px, 3.5vw, 14px); font-weight: 700; color: var(--text); }
.day-stat-item .lbl { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* Fila de estado (chip + overtime) */
.day-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px 4px;
}

.overtime-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: var(--bg-success);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Día sin registro / fin de semana */
.day-absent {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 20px;
  text-align: center;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.day-absent i    { font-size: 48px; color: var(--text3); }
.day-absent p    { font-size: 15px; font-weight: 700; color: var(--text2); }
.day-absent span { font-size: 12px; color: var(--text3); }

/* ───────────────────────────
   VISTA SEMANAL
─────────────────────────── */

/* Resumen 2×2 */
.week-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.week-summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wscard-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.wscard-icon.purple  { background: var(--primary-50);  color: var(--primary); }
.wscard-icon.green   { background: var(--bg-success);  color: var(--success); }
.wscard-icon.orange  { background: var(--bg-warning);  color: var(--warning); }
.wscard-icon.red     { background: var(--bg-danger);   color: var(--danger);  }

.wscard-val  { font-size: clamp(16px, 4.5vw, 20px); font-weight: 800; color: var(--text); line-height: 1; }
.wscard-lbl  { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* Ítems por día en la semana */
.week-day-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.week-day-badge {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--primary-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.week-day-badge.absent { background: var(--bg-danger);  color: var(--danger); }
.week-day-badge.late   { background: var(--bg-warning); color: var(--warning); }

.week-day-badge .bd-day { font-size: 19px; font-weight: 800; line-height: 1; }
.week-day-badge .bd-dow { font-size: 9px;  font-weight: 700; margin-top: 1px; }

.week-day-info        { flex: 1; min-width: 0; }
.week-day-name        { font-size: clamp(12px, 3.5vw, 14px); font-weight: 700; color: var(--text); margin-bottom: 3px; }
.week-day-times       { font-size: clamp(10px, 2.8vw, 11px); color: var(--text2); }

.week-day-hours {
  font-size: clamp(13px, 3.5vw, 15px);
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  margin-right: 6px;
}
