/* Horas trabajadas · feriados */
.hh-fer-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.hh-fer-chip{font-size:11.5px;font-weight:700;border-radius:999px;padding:3px 10px;background:#fbf1e3;color:#9a5a14;white-space:nowrap}
.hh-fer-box{width:min(860px,calc(100vw - 32px))}
.hh-fer-body{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(320px,1.3fr);gap:14px;align-items:start}
.hh-fer-body.solo{grid-template-columns:1fr}
.hh-fer-body #hhFerMsg{grid-column:1/-1}
.hh-fer-g{grid-template-columns:1fr}
@media(max-width:700px){.hh-fer-body{grid-template-columns:1fr}}
.hh-fer-lista{display:flex;flex-direction:column;gap:6px;max-height:320px;overflow-y:auto}
.hh-fer-fila{display:flex;align-items:center;gap:12px;padding:8px 12px;background:#fff;border:1px solid #e5e1d8;border-radius:10px;font-size:13px}
.hh-fer-fila span{flex:1;min-width:0;color:#4a463e}
.hh-fer-x{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:#a03050;font-size:18px;line-height:1;cursor:pointer;transition:background .15s}
.hh-fer-x:hover{background:#fbe9e7}
.hh-fer-vacio{font-size:13px;color:#8a8478;padding:6px 2px}
#hhFerModal .err{margin:0;padding:8px 12px;border-radius:10px;background:#fbe9e7;color:#b42318;font-size:13px}

/* ---- Pantalla Horas trabajadas: a todo el ancho, encabezado + cifras + detalle ---- */
.hh-root{display:flex;flex-direction:column;gap:14px;width:100%;min-width:0;animation:hhIn .18s ease}
@keyframes hhIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.hh-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 20px;align-items:center;background:linear-gradient(135deg,#fff 0%,#f6faf6 100%);border:1px solid #e5e1d8;border-radius:20px;padding:18px 22px;box-shadow:0 10px 30px -20px rgba(42,39,34,.3)}
.hh-top-l{display:flex;align-items:center;gap:14px;min-width:0}
.hh-ico{width:52px;height:52px;border-radius:16px;flex:none}
.hh-tit{min-width:0}
.hh-kick{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#2f6d3c}
.hh-tit h1{margin:1px 0 0;font-size:25px;font-weight:700;letter-spacing:-.02em;color:#2a2722;line-height:1.15}
.hh-top-r{display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.hh-rango{display:inline-flex;align-items:center;gap:4px;background:#fff;border:1px solid #e5e1d8;border-radius:14px;padding:4px;box-shadow:0 4px 14px -10px rgba(42,39,34,.3)}
.hh-rango-t{display:flex;flex-direction:column;align-items:center;padding:0 12px;line-height:1.2}.hh-rango-t small{font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#8a8478}.hh-rango-t b{font-size:14px;color:#2a2722}
.hh-nav{width:34px;height:34px;border:0;border-radius:10px;background:#faf8f3;font-size:20px;line-height:1;color:#4a463e;cursor:pointer;transition:background .15s,color .15s}
.hh-nav:hover:not(:disabled){background:#ebf3ec;color:#2f6d3c}.hh-nav:disabled{opacity:.35;cursor:not-allowed}
.hh-pill{font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:3px 9px;border-radius:999px;background:#e4f0e6;color:#2f6d3c}
.hh-ayuda{font-size:12.5px;color:#6f6a62;margin-top:4px}
.hh-acciones{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.hh-dias{grid-column:1/-1;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;padding-top:12px;border-top:1px dashed #d9d4c7}
.hh-dia{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff;border:1px solid #e5e1d8;border-radius:12px;padding:8px 12px;font-size:12px;color:#6f6a62;transition:transform .15s}
.hh-dia:hover{transform:translateY(-1px)}.hh-dia b{font-size:13px;color:#2a2722}
.hh-dia.vacio b{color:#c4bfb2;font-weight:500}
.hh-dia.hoy{border-color:#3d7a4e;box-shadow:0 0 0 3px rgba(61,122,78,.14)}
.hh-dia.fer{background:#fbf1e3;border-color:#e8c98f;color:#9a5a14}.hh-dia.fer b{color:#9a5a14;font-size:12px}
@media(max-width:900px){.hh-top{grid-template-columns:1fr}.hh-top-r{align-items:flex-start}.hh-acciones{justify-content:flex-start}.hh-dias{grid-template-columns:repeat(3,minmax(0,1fr))}}
.hh-btn{height:36px;padding:0 14px;border:1px solid #e0dbd0;border-radius:10px;background:#fff;color:#4a463e;font:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:transform .15s,box-shadow .15s,border-color .15s}
.hh-btn:hover{transform:translateY(-1px);box-shadow:0 8px 16px -12px rgba(42,39,34,.4);border-color:#cfc9bb}
.hh-btn.warn{color:#c0562e}.hh-btn.pri{background:#2f6d3c;border-color:#2f6d3c;color:#fff}
.hh-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.hh-kpi{position:relative;display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid #e5e1d8;border-radius:16px;padding:14px 16px 14px 20px;overflow:hidden;box-shadow:0 8px 24px -20px rgba(42,39,34,.3);transition:transform .15s}
.hh-kpi:hover{transform:translateY(-1px)}
.hh-kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--c,#2f6d3c)}
.hh-kpi-t{font-size:11.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:#6f6a62}
.hh-kpi-v{font-size:27px;font-weight:700;color:var(--c,#2a2722);line-height:1.15}.hh-kpi-v small{font-size:13px;font-weight:600;color:#8a8478}
.hh-kpi-s{font-size:11.5px;color:#6f6a62}
.hh-main{background:#fff;border:1px solid #e5e1d8;border-radius:18px;overflow:hidden;box-shadow:0 8px 24px -18px rgba(42,39,34,.25)}
.hh-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 16px;border-bottom:1px solid #eee9de;background:#faf8f3}
.hh-tabs{display:inline-flex;gap:4px;background:#fff;border:1px solid #e5e1d8;border-radius:12px;padding:3px}
.hh-tab{height:32px;padding:0 14px;border:0;border-radius:9px;background:transparent;font:inherit;font-size:13px;font-weight:600;color:#6f6a62;cursor:pointer;transition:background .15s,color .15s}
.hh-tab:hover{background:#f3f1ec}.hh-tab.on{background:#2f6d3c;color:#fff}
.hh-filtros{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hh-chips{display:inline-flex;gap:6px}
.hh-chip{height:32px;padding:0 12px;border:1px solid #e0dbd0;border-radius:999px;background:#fff;font:inherit;font-size:12.5px;font-weight:600;color:#4a463e;cursor:pointer;transition:background .15s,border-color .15s}
.hh-chip em{font-style:normal;font-weight:500;opacity:.7;margin-left:3px}
.hh-chip:hover{border-color:#cfc9bb}.hh-chip.on{background:#ebf3ec;border-color:#3d7a4e;color:#2f6d3c}
.hh-busca{display:inline-flex;gap:6px;align-items:center}
.hh-busca input{height:36px;min-width:220px;padding:0 12px;border:1.5px solid #e7e2d8;border-radius:10px;background:#fff;font:inherit;font-size:13px;color:#2a2722}
.hh-busca input:focus{outline:none;border-color:#3d7a4e;box-shadow:0 0 0 3px rgba(61,122,78,.15)}
.hh-notas{display:flex;gap:16px;flex-wrap:wrap;padding:8px 16px;font-size:12px;color:#6f6a62;border-bottom:1px solid #f0ede6}.hh-notas .warn{color:#b5772a}
.hh-main .hh-box{border:0}
.hh-root .hh-mx{border:1px solid #e5e1d8;border-radius:18px;margin-top:0!important}
@media(max-width:1100px){.hh-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.hh-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.hh-acciones{justify-content:flex-start}.hh-busca input{min-width:0;flex:1}.hh-busca{flex:1}}

/* ---- Por operario: la justificación de las horas extra es una columna más ---- */
.hh-tbl.hh-op .th,.hh-tbl.hh-op .tr2{
  grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr) 52px 34px 52px 46px 38px minmax(0,.6fr) 46px minmax(0,.55fr) minmax(0,.6fr) minmax(240px,2.4fr) 78px}
@container hh (max-width: 980px){
  .hh-tbl.hh-op .th,.hh-tbl.hh-op .tr2{
    grid-template-columns:minmax(0,1.3fr) 52px 34px 46px minmax(0,.65fr) 46px minmax(0,.55fr) minmax(0,.6fr) minmax(220px,2.2fr) 78px}
}
@container hh (max-width: 760px){
  .hh-tbl.hh-op .tr2 > [data-hhcol="12"]{grid-column:1/-1}
}
.hh-just-c{min-width:0;align-self:start}
.hh-just-no{color:#d8d4cc}
.hh-just{display:flex;align-items:flex-start;gap:8px;max-width:100%;border-radius:12px;border:1px solid transparent;font:inherit;font-size:12.5px;line-height:1.4}
.hh-just-t{min-width:0;flex:1;white-space:normal;overflow-wrap:anywhere;text-align:left}
.hh-just-t i{display:block;font-style:normal;font-size:11px;font-weight:500;opacity:.7;margin-top:2px}
.hh-just.falta{height:30px;align-items:center;padding:0 12px;background:#fbf1e3;border-color:#e8c98f;color:#9a5a14;font-weight:700;cursor:pointer;transition:background .15s,transform .15s}
.hh-just.falta:hover{background:#f8e8cc;transform:translateY(-1px)}
.hh-just.falta .hh-just-t{white-space:nowrap}
.hh-just.ok{padding:7px 8px 7px 12px;background:#eef4fb;border-color:#cfdff5;color:#1f4e86;font-weight:500}
.hh-just-e{flex:none;display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:8px;background:#fff;color:#1f4e86;cursor:pointer;box-shadow:0 1px 3px rgba(31,78,134,.18);transition:background .15s,transform .15s}
.hh-just-e:hover{background:#dbe8f7;transform:translateY(-1px)}
.hh-just-in{display:block;width:100%;min-height:58px;padding:8px 10px;border:1.5px solid #3d7a4e;border-radius:12px;font:inherit;font-size:12.5px;line-height:1.4;background:#fff;box-shadow:0 0 0 3px rgba(61,122,78,.15);box-sizing:border-box;resize:vertical}
.hh-just-in:focus{outline:none}
.hh-tbl.hh-op .tr2{align-items:start}
.hh-tbl.hh-op .tr2 > div:not(.hh-just-c){align-self:center}

/* Mandar a pagar */
.hh-btn.ok{color:#18794a;background:#e3f4ea;border-color:#bfe3cd}
.hh-pg-box{width:min(620px,calc(100vw - 32px))}
.hh-pg-sts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}
.hh-pg-st{display:flex;flex-direction:column;gap:2px;background:#fff;border:1px solid #ebe4d4;border-radius:12px;padding:9px 12px}
.hh-pg-st span{font-size:10.5px;font-weight:500;letter-spacing:.05em;text-transform:uppercase;color:#948b7b}.hh-pg-st b{font-size:17px;font-weight:600}
.hh-pg-lista{max-height:180px;overflow-y:auto;border:1px solid #f0e9da;border-radius:12px;background:#fff}
.hh-pg-f{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 12px;border-bottom:1px solid #f5efe2;font-size:13px}.hh-pg-f:last-child{border-bottom:0}
.hh-pg-f small{margin-left:6px;font-size:10.5px;color:#948b7b}
.hh-pg-pasos{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:5px;font-size:13px;color:#5f594e;line-height:1.45}
.hh-pg-err{margin-top:2px;padding:9px 12px;border-radius:12px;background:#fdecec;color:#b42318;font-size:13px}
@media(max-width:560px){.hh-pg-sts{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Reportes PDF / Excel: menú desplegable de planillas (js/modulos/horas_reportes.js) */
.hh-rep-b{display:inline-flex;align-items:center;gap:7px}
.hh-rep-menu{position:fixed;z-index:9999;width:min(380px,calc(100vw - 16px));background:#fff;border:1px solid #e5e1d8;border-radius:16px;box-shadow:0 18px 40px -16px rgba(42,39,34,.35);padding:6px;animation:hh-rep-in .14s ease}
@keyframes hh-rep-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.hh-rep-h{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:8px 10px 6px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#6f6a62}
.hh-rep-h small{font-weight:500;letter-spacing:0;text-transform:none;color:#8a8478}
.hh-rep-it{display:flex;align-items:center;gap:11px;width:100%;text-align:left;font:inherit;background:transparent;border:0;border-radius:11px;padding:9px 10px;cursor:pointer;transition:background .12s}
.hh-rep-it:hover:not(:disabled){background:#ebf3ec}
.hh-rep-it:disabled{opacity:.5;cursor:default}
.hh-rep-ico{flex:none;width:32px;height:32px;border-radius:10px;background:#f1f6f2;color:#2f6d3c;display:inline-flex;align-items:center;justify-content:center}
.hh-rep-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.hh-rep-tx b{font-size:13.5px;font-weight:600;color:#24211c}
.hh-rep-tx small{font-size:12px;color:#8a8478}
.hh-rep-n{flex:none;min-width:24px;text-align:center;font-size:11.5px;font-weight:700;color:#2f6d3c;background:#ebf3ec;border-radius:99px;padding:2px 8px}
.hh-rep-n:empty{display:none}
@media (prefers-reduced-motion:reduce){.hh-rep-menu{animation:none}}
