﻿/* DAT-050.1 / M2 - UI de Control Presencia y consolidación de identidad visual */
.epa-header--m2 { min-height: 76px; }
.epa-brand--app img { width: 300px; height: 68px; padding: 0; background: transparent; object-fit: contain; }
.epa-sidebar__footer--corporate { text-align: center; }
.epa-sidebar__footer--corporate img { width: min(100%, 190px); margin: 0 auto 10px; border-radius: 5px; }
.epa-sidebar__footer--corporate small { text-align: center; font-size: .72rem; }
.epa-hero__app-avatar { width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%; background: #eaf5ff; padding: 8px; }
.epa-hero__app-avatar img { width: 100%; height: 100%; display: block; }

/* Login aprobado */
.epa-login-v2 { min-height: 100vh; background: radial-gradient(circle at 12% 72%, rgba(27,118,213,.08), transparent 30%), #f4f8fc; }
.epa-login-topbar { height: 76px; padding: 0 54px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(100deg,#06437e,#07559e); color:#fff; }
.epa-login-topbar img { width: 280px; height: 66px; object-fit: contain; object-position: left center; }
.epa-login-v2__card { width: min(980px, calc(100% - 40px)); min-height: 590px; margin: 62px auto; display: grid; grid-template-columns: 40% 60%; overflow: hidden; background:#fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(13,55,99,.13); }
.epa-login-v2__brand { padding: 58px 38px 34px; display:flex; flex-direction:column; justify-content:space-between; align-items:center; background: linear-gradient(160deg,#073f79,#075397); }
.epa-login-v2__app-logo { width: 100%; max-width: 330px; }
.epa-login-v2__corporate { width:100%; padding-top:24px; border-top:1px solid rgba(255,255,255,.22); text-align:center; }
.epa-login-v2__corporate img { width: min(100%, 300px); background:#fff; border-radius:7px; padding:5px; }
.epa-login-v2__form { padding: 62px 64px 34px; display:flex; flex-direction:column; justify-content:center; }
.epa-login-v2__form h1 { margin:0; color:var(--epa-heading); font-size:2rem; }
.epa-login-v2__form > p { color:var(--epa-muted); margin:8px 0 34px; }
.epa-login-v2__remember { margin:-2px 0 22px; }
.epa-login-v2__form footer { margin-top:34px; padding-top:22px; border-top:1px solid var(--epa-border); color:var(--epa-muted); text-align:center; font-size:.8rem; }

/* Mi fichaje */
.epa-attendance-page { max-width: 1180px; }
.epa-alert--error { color:#a52c2c; background:#fff0f0; border:1px solid #ffd2d2; }
.epa-muted { color:var(--epa-muted); }
.epa-attendance-unlinked { padding:50px; text-align:center; background:#fff; border:1px solid var(--epa-border); border-radius:12px; box-shadow:var(--epa-shadow); }
.epa-attendance-unlinked img { width:100px; }
.epa-punch-hero { display:grid; grid-template-columns:1.4fr .8fr .8fr; gap:18px; align-items:center; padding:24px; background:#fff; border:1px solid var(--epa-border); border-radius:12px; box-shadow:var(--epa-shadow); }
.epa-punch-identity { display:flex; gap:18px; align-items:center; }
.epa-punch-identity img { width:82px; height:82px; }
.epa-punch-identity h2 { margin:0; color:var(--epa-heading); }
.epa-punch-identity p { margin:5px 0 0; color:var(--epa-muted); }
.epa-live-clock, .epa-attendance-state { min-height:110px; padding:18px; border-radius:10px; display:flex; flex-direction:column; justify-content:center; }
.epa-live-clock { background:#eef7ff; color:var(--epa-heading); }
.epa-live-clock span,.epa-attendance-state span { font-size:.78rem; color:var(--epa-muted); }
.epa-live-clock strong { font-size:2rem; margin:4px 0; }
.epa-live-clock small { color:var(--epa-muted); }
.epa-attendance-state { background:#f2f5f8; }
.epa-attendance-state strong { margin-top:5px; font-size:1.35rem; }
.epa-attendance-state--working { background:#e9f9ef; color:#087d38; }
.epa-attendance-state--paused { background:#fff6dd; color:#9a6800; }
.epa-attendance-state--finished { background:#e9f2fb; color:#2f5c88; }
.epa-punch-actions { margin-top:18px; padding:22px; background:#fff; border:1px solid var(--epa-border); border-radius:12px; box-shadow:0 4px 16px rgba(10,48,88,.04); }
.epa-punch-buttons { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.epa-punch-button { min-height:128px; border:0; border-radius:12px; padding:18px 12px; color:#fff; cursor:pointer; box-shadow:0 7px 18px rgba(10,50,90,.12); }
.epa-punch-button:disabled { filter:grayscale(.5); opacity:.35; cursor:not-allowed; box-shadow:none; }
.epa-punch-button__icon,.epa-punch-button strong,.epa-punch-button small { display:block; }
.epa-punch-button__icon { font-size:2rem; margin-bottom:8px; }
.epa-punch-button strong { font-size:1.05rem; }
.epa-punch-button small { margin-top:5px; opacity:.9; }
.epa-punch-button--entry { background:linear-gradient(135deg,#0875ed,#0752aa); }
.epa-punch-button--pause { background:linear-gradient(135deg,#f0ad00,#d88900); }
.epa-punch-button--resume { background:linear-gradient(135deg,#20bd5f,#0c8b3c); }
.epa-punch-button--exit { background:linear-gradient(135deg,#ef6b37,#cb3b22); }
.epa-punch-comment { display:block; margin-top:18px; }
.epa-punch-comment span { display:block; margin-bottom:7px; font-weight:700; color:var(--epa-heading); }
.epa-punch-comment input { width:100%; height:44px; border:1px solid #cbd7e3; border-radius:7px; padding:0 12px; }
.epa-day-timeline { margin-top:18px; padding:22px; background:#fff; border:1px solid var(--epa-border); border-radius:12px; box-shadow:0 4px 16px rgba(10,48,88,.04); }
.epa-timeline { list-style:none; padding:12px 0 0; margin:0; }
.epa-timeline li { display:grid; grid-template-columns:64px 22px 1fr; gap:10px; align-items:start; min-height:62px; }
.epa-timeline time { color:var(--epa-heading); font-weight:800; }
.epa-timeline__dot { width:12px; height:12px; margin-top:4px; border-radius:50%; background:var(--epa-primary); box-shadow:0 0 0 5px #e9f4ff; }
.epa-timeline li:not(:last-child) .epa-timeline__dot::after { content:""; display:block; width:2px; height:46px; margin:12px 0 0 5px; background:#dce6ef; }
.epa-timeline strong,.epa-timeline small { display:block; }
.epa-timeline small { color:var(--epa-muted); margin-top:3px; }
.epa-timeline .is-annulled { opacity:.5; text-decoration:line-through; }
.epa-filter-card { display:flex; align-items:end; gap:14px; margin-bottom:16px; padding:16px; background:#fff; border:1px solid var(--epa-border); border-radius:10px; }
.epa-filter-card label span { display:block; margin-bottom:6px; font-size:.8rem; font-weight:700; color:var(--epa-heading); }
.epa-filter-card input { height:40px; border:1px solid #cbd7e3; border-radius:7px; padding:0 10px; }

@media(max-width:900px){
  .epa-brand--app img{width:220px}.epa-punch-hero{grid-template-columns:1fr 1fr}.epa-punch-identity{grid-column:1/-1}.epa-punch-buttons{grid-template-columns:1fr 1fr}
  .epa-login-v2__card{grid-template-columns:1fr;margin:24px auto}.epa-login-v2__brand{display:none}.epa-login-v2__form{padding:38px 30px}.epa-login-topbar{padding:0 20px}.epa-login-topbar img{width:240px}
}
@media(max-width:560px){
  .epa-brand--app img{width:190px}.epa-punch-hero{grid-template-columns:1fr}.epa-punch-identity{grid-column:auto}.epa-punch-buttons{grid-template-columns:1fr 1fr}.epa-punch-button{min-height:112px}.epa-filter-card{align-items:stretch;flex-direction:column}.epa-filter-card label,.epa-filter-card input,.epa-filter-card button{width:100%}
}

/* DAT-050.2 - Detalle de jornada */
.epa-day-link { color:var(--epa-heading); font-weight:800; text-decoration:none; }
.epa-day-link:hover { color:var(--epa-primary); text-decoration:underline; }
.epa-table-action { text-align:right; white-space:nowrap; }
.epa-table-action a { color:var(--epa-primary-dark); font-weight:800; text-decoration:none; }
.epa-table-action a:hover { text-decoration:underline; }
.epa-page-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.epa-day-detail-page { max-width:1180px; }
.epa-day-detail-hero { display:grid; grid-template-columns:1fr 270px; gap:18px; align-items:center; padding:22px; background:#fff; border:1px solid var(--epa-border); border-radius:12px; box-shadow:var(--epa-shadow); }
.epa-day-detail-person { display:flex; align-items:center; gap:17px; }
.epa-day-detail-person img { width:76px; height:76px; }
.epa-day-detail-person h2 { margin:0; color:var(--epa-heading); }
.epa-day-detail-person p { margin:5px 0 0; color:var(--epa-muted); }
.epa-day-detail-state { min-height:92px; padding:18px; display:flex; flex-direction:column; justify-content:center; background:#f3f7fb; border-radius:10px; }
.epa-day-detail-state span { font-size:.78rem; color:var(--epa-muted); }
.epa-day-detail-state strong { margin-top:6px; font-size:1.25rem; }
.epa-state-text--working { color:#087d38; }.epa-state-text--paused { color:#9a6800; }.epa-state-text--finished { color:#2f5c88; }
.epa-day-summary-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-top:16px; }
.epa-day-summary-grid article { min-height:108px; padding:18px; display:flex; flex-direction:column; justify-content:center; background:#fff; border:1px solid var(--epa-border); border-radius:11px; box-shadow:0 4px 14px rgba(10,48,88,.04); }
.epa-day-summary-grid article span { color:var(--epa-muted); font-size:.8rem; }
.epa-day-summary-grid article strong { margin-top:6px; color:var(--epa-heading); font-size:1.55rem; }
.epa-day-summary-grid article.is-work { background:#eefaf2; }.epa-day-summary-grid article.is-work strong { color:#087d38; }
.epa-day-summary-grid article.is-break { background:#fff8e5; }.epa-day-summary-grid article.is-break strong { color:#9a6800; }
.epa-day-detail-card { margin-top:16px; padding:22px; background:#fff; border:1px solid var(--epa-border); border-radius:12px; box-shadow:var(--epa-shadow); }
.epa-punch-detail-table td { vertical-align:middle; }
.epa-punch-detail-table td:first-child strong,.epa-punch-detail-table td:first-child small { display:block; }
.epa-punch-detail-table td:first-child small { margin-top:2px; color:var(--epa-muted); }
.epa-punch-detail-table tr.is-annulled { opacity:.55; text-decoration:line-through; }
.epa-punch-type { display:inline-flex; align-items:center; min-width:122px; padding:6px 10px; border-radius:999px; font-size:.78rem; font-weight:800; }
.epa-punch-type--entry { color:#0758af; background:#e9f4ff; }
.epa-punch-type--pause { color:#946400; background:#fff4d7; }
.epa-punch-type--resume { color:#087d38; background:#e9f9ef; }
.epa-punch-type--exit { color:#b23a23; background:#fff0e9; }
.epa-day-audit-note { margin-top:16px; padding:16px 18px; border-left:4px solid #5b89b5; background:#f3f8fd; border-radius:8px; color:var(--epa-muted); }
.epa-day-audit-note strong { display:block; color:var(--epa-heading); margin-bottom:4px; }
.epa-day-audit-note p { margin:0; }
@media(max-width:900px){
  .epa-day-detail-hero{grid-template-columns:1fr}.epa-day-summary-grid{grid-template-columns:repeat(2,1fr)}.epa-page-actions{justify-content:flex-start}
}
@media(max-width:560px){
  .epa-day-summary-grid{grid-template-columns:1fr 1fr}.epa-day-detail-person{align-items:flex-start}.epa-day-detail-person img{width:62px;height:62px}.epa-punch-type{min-width:auto}.epa-punch-detail-table{min-width:720px}
}

/* DAT-050.3 - Incidencias de jornada */
.epa-incidents-page{max-width:1180px}.epa-incident-empty{display:flex;gap:18px;align-items:center;padding:30px;background:#eefaf2;border:1px solid #caecd7;border-radius:12px}.epa-incident-empty>span{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#12a94f;color:#fff;font-size:1.5rem;font-weight:900}.epa-incident-empty h2{margin:0;color:var(--epa-heading)}.epa-incident-empty p{margin:5px 0 0;color:var(--epa-muted)}
.epa-incident-list{display:grid;gap:12px}.epa-incident-card{display:grid;grid-template-columns:46px 1fr auto;gap:16px;align-items:center;padding:18px;background:#fff;border:1px solid var(--epa-border);border-left:5px solid #e1a400;border-radius:12px;box-shadow:0 4px 14px rgba(10,48,88,.04)}.epa-incident-card--error{border-left-color:#d94848}.epa-incident-card__icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#fff4d7;color:#946400;font-size:1.3rem;font-weight:900}.epa-incident-card--error .epa-incident-card__icon{background:#ffecec;color:#b83333}.epa-incident-card__top{display:flex;align-items:start;justify-content:space-between;gap:12px}.epa-incident-card h2{margin:6px 0 0;color:var(--epa-heading);font-size:1.05rem}.epa-incident-card p{margin:7px 0;color:var(--epa-muted)}.epa-incident-meta{display:flex;gap:18px;color:var(--epa-muted);font-size:.8rem}.epa-chip--warning{background:#fff1bf!important;color:#8a6200!important}.epa-chip--danger{background:#ffe0e0!important;color:#a42d2d!important}.epa-incident-count{display:inline-grid;place-items:center;min-width:30px;height:26px;border-radius:999px;background:#fff1bf;color:#8a6200;font-weight:800;text-decoration:none}.epa-day-incidents{margin-top:16px;padding:20px;background:#fffaf0;border:1px solid #f0ddb0;border-radius:12px}.epa-day-incident-row{display:flex;flex-direction:column;gap:4px;padding:12px 0;border-top:1px solid #f0e3c5}.epa-day-incident-row:first-of-type{border-top:0}.epa-day-incident-row strong{color:#8a6200}.epa-day-incident-row span{color:var(--epa-muted)}
@media(max-width:700px){.epa-incident-card{grid-template-columns:40px 1fr}.epa-incident-card>a{grid-column:1/-1}.epa-incident-card__top{flex-direction:column}.epa-incident-meta{flex-direction:column;gap:4px}}

/* EPA-UI: ajuste consolidado de anchura de tablas de trazabilidad
   Alcance: solo Detalle de jornada y Corregir jornada.
   No modifica lógica, estados, navegación ni datos. */

/* Escritorio: la tabla se adapta al ancho de la tarjeta y evita scroll horizontal. */
@media (min-width: 1100px) {
  .epa-punch-detail-table,
  .epa-correction-history-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }

  .epa-punch-detail-table th,
  .epa-punch-detail-table td,
  .epa-correction-history-table th,
  .epa-correction-history-table td {
    padding-left: 8px;
    padding-right: 8px;
    overflow-wrap: anywhere;
  }

  .epa-punch-detail-table th,
  .epa-correction-history-table th {
    font-size: .70rem;
    letter-spacing: .02em;
  }

  /* Detalle de jornada: 9 columnas. */
  .epa-punch-detail-table th:nth-child(1),
  .epa-punch-detail-table td:nth-child(1) { width: 8%; }
  .epa-punch-detail-table th:nth-child(2),
  .epa-punch-detail-table td:nth-child(2) { width: 10%; }
  .epa-punch-detail-table th:nth-child(3),
  .epa-punch-detail-table td:nth-child(3) { width: 10%; }
  .epa-punch-detail-table th:nth-child(4),
  .epa-punch-detail-table td:nth-child(4) { width: 11%; }
  .epa-punch-detail-table th:nth-child(5),
  .epa-punch-detail-table td:nth-child(5) { width: 20%; }
  .epa-punch-detail-table th:nth-child(6),
  .epa-punch-detail-table td:nth-child(6) { width: 8%; }
  .epa-punch-detail-table th:nth-child(7),
  .epa-punch-detail-table td:nth-child(7) { width: 9%; }
  .epa-punch-detail-table th:nth-child(8),
  .epa-punch-detail-table td:nth-child(8) { width: 12%; }
  .epa-punch-detail-table th:nth-child(9),
  .epa-punch-detail-table td:nth-child(9) { width: 12%; }

  /* Corregir jornada: 9 columnas. */
  .epa-correction-history-table th:nth-child(1),
  .epa-correction-history-table td:nth-child(1) { width: 8%; }
  .epa-correction-history-table th:nth-child(2),
  .epa-correction-history-table td:nth-child(2) { width: 10%; }
  .epa-correction-history-table th:nth-child(3),
  .epa-correction-history-table td:nth-child(3) { width: 10%; }
  .epa-correction-history-table th:nth-child(4),
  .epa-correction-history-table td:nth-child(4) { width: 11%; }
  .epa-correction-history-table th:nth-child(5),
  .epa-correction-history-table td:nth-child(5) { width: 8%; }
  .epa-correction-history-table th:nth-child(6),
  .epa-correction-history-table td:nth-child(6) { width: 9%; }
  .epa-correction-history-table th:nth-child(7),
  .epa-correction-history-table td:nth-child(7) { width: 20%; }
  .epa-correction-history-table th:nth-child(8),
  .epa-correction-history-table td:nth-child(8) { width: 12%; }
  .epa-correction-history-table th:nth-child(9),
  .epa-correction-history-table td:nth-child(9) { width: 12%; }

  .epa-punch-detail-table td:nth-child(1),
  .epa-punch-detail-table td:nth-child(6),
  .epa-punch-detail-table td:nth-child(7),
  .epa-punch-detail-table td:nth-child(9),
  .epa-correction-history-table td:nth-child(1),
  .epa-correction-history-table td:nth-child(5),
  .epa-correction-history-table td:nth-child(6),
  .epa-correction-history-table td:nth-child(9) {
    white-space: nowrap;
  }
}

/* Pantallas más estrechas: se mantiene scroll horizontal para no degradar legibilidad. */
@media (max-width: 1099px) {
  .epa-punch-detail-table,
  .epa-correction-history-table {
    min-width: 980px;
  }
}

/* EPA-UI: ajuste de anchura v2 de tablas de trazabilidad
   Solo presentación. No altera estados, cálculos, navegación ni datos. */

/* En escritorio y portátil normal, ajustar la tabla al ancho real de la tarjeta. */
.epa-punch-detail-table,
.epa-correction-history-table {
  width: 100%;
  max-width: 100%;
}

/* A partir de 720px evitamos el min-width global de .epa-table que provocaba
   scroll horizontal incluso cuando la tarjeta podía contener las 9 columnas. */
@media (min-width: 720px) {
  .epa-punch-detail-table,
  .epa-correction-history-table {
    min-width: 0 !important;
    table-layout: fixed;
  }

  .epa-punch-detail-table th,
  .epa-punch-detail-table td,
  .epa-correction-history-table th,
  .epa-correction-history-table td {
    padding: 9px 6px;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .epa-punch-detail-table th,
  .epa-correction-history-table th {
    font-size: .68rem;
    letter-spacing: .015em;
  }

  /* Columnas compactas. */
  .epa-punch-detail-table th:nth-child(1),
  .epa-punch-detail-table td:nth-child(1),
  .epa-correction-history-table th:nth-child(1),
  .epa-correction-history-table td:nth-child(1) { width: 9%; }

  .epa-punch-detail-table th:nth-child(2),
  .epa-punch-detail-table td:nth-child(2),
  .epa-correction-history-table th:nth-child(2),
  .epa-correction-history-table td:nth-child(2) { width: 11%; }

  .epa-punch-detail-table th:nth-child(3),
  .epa-punch-detail-table td:nth-child(3),
  .epa-correction-history-table th:nth-child(3),
  .epa-correction-history-table td:nth-child(3) { width: 11%; }

  .epa-punch-detail-table th:nth-child(4),
  .epa-punch-detail-table td:nth-child(4),
  .epa-correction-history-table th:nth-child(4),
  .epa-correction-history-table td:nth-child(4) { width: 12%; }

  /* Estado y efectividad. */
  .epa-punch-detail-table th:nth-child(6),
  .epa-punch-detail-table td:nth-child(6),
  .epa-correction-history-table th:nth-child(5),
  .epa-correction-history-table td:nth-child(5) { width: 9%; }

  .epa-punch-detail-table th:nth-child(7),
  .epa-punch-detail-table td:nth-child(7),
  .epa-correction-history-table th:nth-child(6),
  .epa-correction-history-table td:nth-child(6) { width: 10%; }

  /* Observación: columna prioritaria. */
  .epa-punch-detail-table th:nth-child(5),
  .epa-punch-detail-table td:nth-child(5),
  .epa-correction-history-table th:nth-child(7),
  .epa-correction-history-table td:nth-child(7) { width: 20%; }

  /* Auditoría. */
  .epa-punch-detail-table th:nth-child(8),
  .epa-punch-detail-table td:nth-child(8),
  .epa-correction-history-table th:nth-child(8),
  .epa-correction-history-table td:nth-child(8) { width: 10%; }

  /* Acciones. */
  .epa-punch-detail-table th:nth-child(9),
  .epa-punch-detail-table td:nth-child(9),
  .epa-correction-history-table th:nth-child(9),
  .epa-correction-history-table td:nth-child(9) { width: 8%; }

  .epa-punch-detail-table td:nth-child(1),
  .epa-punch-detail-table td:nth-child(6),
  .epa-punch-detail-table td:nth-child(7),
  .epa-correction-history-table td:nth-child(1),
  .epa-correction-history-table td:nth-child(5),
  .epa-correction-history-table td:nth-child(6) {
    white-space: nowrap;
  }

  .epa-punch-detail-table .epa-button,
  .epa-correction-history-table .epa-button {
    min-width: 0;
    padding-left: 9px;
    padding-right: 9px;
  }
}

/* Solo en móvil estrecho se fuerza scroll para proteger la legibilidad. */
@media (max-width: 719px) {
  .epa-punch-detail-table,
  .epa-correction-history-table {
    min-width: 900px;
  }
}

/* EPA-UI: ajuste final Corregir jornada - solo CSS
   Soluciona el pequeño overflow horizontal de la tabla de 9 columnas
   sin alterar ninguna funcionalidad de la pantalla. */

.epa-correction-history-table {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 720px) {
  .epa-correction-history-table {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed;
  }

  .epa-correction-history-table th,
  .epa-correction-history-table td {
    box-sizing: border-box;
    padding-left: 5px;
    padding-right: 5px;
    overflow-wrap: normal;
    word-break: normal;
  }

  /* Las proporciones suman deliberadamente menos del 100%.
     El margen restante absorbe bordes/padding y evita el overflow. */
  .epa-correction-history-table th:nth-child(1),
  .epa-correction-history-table td:nth-child(1) { width: 8%; }

  .epa-correction-history-table th:nth-child(2),
  .epa-correction-history-table td:nth-child(2) { width: 10%; }

  .epa-correction-history-table th:nth-child(3),
  .epa-correction-history-table td:nth-child(3) { width: 11%; }

  .epa-correction-history-table th:nth-child(4),
  .epa-correction-history-table td:nth-child(4) { width: 12%; }

  .epa-correction-history-table th:nth-child(5),
  .epa-correction-history-table td:nth-child(5) { width: 8%; }

  .epa-correction-history-table th:nth-child(6),
  .epa-correction-history-table td:nth-child(6) { width: 9%; }

  .epa-correction-history-table th:nth-child(7),
  .epa-correction-history-table td:nth-child(7) { width: 20%; }

  .epa-correction-history-table th:nth-child(8),
  .epa-correction-history-table td:nth-child(8) { width: 10%; }

  .epa-correction-history-table th:nth-child(9),
  .epa-correction-history-table td:nth-child(9) { width: 8%; }

  .epa-correction-history-table td:nth-child(1),
  .epa-correction-history-table td:nth-child(5),
  .epa-correction-history-table td:nth-child(6) {
    white-space: nowrap;
  }

  .epa-correction-history-table .epa-button {
    min-width: 0;
    max-width: 100%;
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* En móvil se conserva expresamente el scroll horizontal existente. */
@media (max-width: 719px) {
  .epa-correction-history-table {
    min-width: 900px;
  }
}

/* EPA-UI: Corregir jornada - ancho y acciones visibles
   SOLO PRESENTACIÓN.
   Mantiene intactos Rectificar, Anular, propuesta automática, estados,
   efectividad, navegación, cálculos y datos. */

@media (min-width: 720px) {
  .epa-correction-history-table {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-spacing: 0;
  }

  .epa-correction-history-table th,
  .epa-correction-history-table td {
    box-sizing: border-box;
    padding-left: 5px;
    padding-right: 5px;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .epa-correction-history-table th {
    font-size: .67rem;
    letter-spacing: .012em;
  }

  /* Distribución exacta de las 9 columnas = 100%. */
  .epa-correction-history-table th:nth-child(1),
  .epa-correction-history-table td:nth-child(1) { width: 8%; }

  .epa-correction-history-table th:nth-child(2),
  .epa-correction-history-table td:nth-child(2) { width: 10%; }

  .epa-correction-history-table th:nth-child(3),
  .epa-correction-history-table td:nth-child(3) { width: 10%; }

  .epa-correction-history-table th:nth-child(4),
  .epa-correction-history-table td:nth-child(4) { width: 12%; }

  .epa-correction-history-table th:nth-child(5),
  .epa-correction-history-table td:nth-child(5) { width: 8%; }

  .epa-correction-history-table th:nth-child(6),
  .epa-correction-history-table td:nth-child(6) { width: 9%; }

  .epa-correction-history-table th:nth-child(7),
  .epa-correction-history-table td:nth-child(7) { width: 20%; }

  .epa-correction-history-table th:nth-child(8),
  .epa-correction-history-table td:nth-child(8) { width: 11%; }

  .epa-correction-history-table th:nth-child(9),
  .epa-correction-history-table td:nth-child(9) { width: 12%; }

  .epa-correction-history-table td:nth-child(1),
  .epa-correction-history-table td:nth-child(5),
  .epa-correction-history-table td:nth-child(6) {
    white-space: nowrap;
  }

  /* La causa del desbordamiento era la columna Acciones:
     Rectificar y Anular estaban compitiendo horizontalmente por el ancho.
     Los apilamos visualmente sin tocar los enlaces ni su lógica. */
  .epa-correction-history-table td:last-child {
    white-space: normal !important;
  }

  .epa-correction-history-table td:last-child .epa-button {
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 4px;
    margin: 0 0 5px 0;
    font-size: .72rem;
    white-space: nowrap;
  }

  .epa-correction-history-table td:last-child .epa-button:last-child {
    margin-bottom: 0;
  }
}

/* En móvil estrecho se conserva el scroll horizontal por legibilidad. */
@media (max-width: 719px) {
  .epa-correction-history-table {
    min-width: 900px;
  }
}
