/* Web del equipo técnico: vacaciones y horarios */
:root {
  --p0: #2a78d6; --p1: #eb6834; --p2: #1baf7a; --p3: #eda100;
  --p4: #e87ba4; --p5: #008300; --p6: #6250d6; --p7: #e34948;
  --fest: #fef2f2; --fest-ink: #b91c1c;
  --vac: #ecfdf5; --vac-ink: #047857;
  --pend: #fffbeb; --pend-ink: #b45309;
  --weekend: #f6f7f9;
}
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--atp-azul); color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.person { display: inline-flex; align-items: center; gap: 8px; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav h2 { min-width: 190px; text-align: center; font-size: 18px; text-transform: capitalize; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--border); }

/* ---- Calendario mensual (mi horario) ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal .hd { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fcfcfd; text-transform: capitalize; }
.cal .day { min-height: 96px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; display: flex; flex-direction: column; gap: 4px; }
.cal .day.out { background: #fafafa; }
.cal .day.out .num { color: var(--muted-2); }
.cal .day.we { background: var(--weekend); }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--atp-azul); }
.cal .num { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; }
.pill { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 4px 6px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.pill small { display: block; font-weight: 500; opacity: .8; }
.pill.turno { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.pill.fest { background: var(--fest); color: var(--fest-ink); border: 1px solid #fecaca; }
.pill.vac { background: var(--vac); color: var(--vac-ink); border: 1px solid #a7f3d0; }
.pill.pend { background: var(--pend); color: var(--pend-ink); border: 1px dashed #fcd34d; }
.pill.nota { background: none; color: var(--muted); font-weight: 400; padding: 0 2px; }

/* ---- Cuadrante del equipo ---- */
.grid-wrap { overflow-x: auto; }
table.cuad { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
table.cuad th, table.cuad td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; padding: 0; height: 40px; min-width: 40px; }
table.cuad thead th { background: #fcfcfd; color: var(--muted); font-weight: 600; padding: 6px 2px; position: sticky; top: 0; z-index: 1; line-height: 1.2; }
table.cuad thead th .wd { display: block; font-size: 10px; font-weight: 500; text-transform: uppercase; }
table.cuad th.name, table.cuad td.name { position: sticky; left: 0; background: #fff; z-index: 2; text-align: left; padding: 0 12px; min-width: 190px; white-space: nowrap; }
table.cuad thead th.name { z-index: 3; background: #fcfcfd; }
table.cuad td.name small { display: block; color: var(--muted); font-size: 11px; }
table.cuad td.tot { min-width: 96px; padding: 0 10px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
table.cuad td.tot small { display: block; color: var(--muted); font-size: 11px; }
table.cuad .we { background: var(--weekend); }
table.cuad .fe { background: var(--fest); }
table.cuad .td-today { box-shadow: inset 0 -3px 0 var(--atp-azul); }
table.cuad td.cell { cursor: default; position: relative; }
table.cuad.editable td.cell { cursor: pointer; }
table.cuad.editable td.cell:hover { outline: 2px solid var(--atp-azul); outline-offset: -2px; }
table.cuad td.cell.sel { outline: 2px solid var(--atp-azul); outline-offset: -2px; background: #eff6ff; }
.c-t { display: block; font-weight: 700; color: #1e3a8a; font-size: 13px; }
.c-h { display: block; font-size: 10px; color: var(--muted); }
.c-v { display: inline-block; font-weight: 700; color: var(--vac-ink); background: var(--vac); border-radius: 4px; padding: 3px 6px; }
.c-p { display: inline-block; font-weight: 700; color: var(--pend-ink); background: var(--pend); border: 1px dashed #fcd34d; border-radius: 4px; padding: 2px 5px; }
.c-n { position: absolute; top: 2px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--atp-azul); }
tr.cov td { font-weight: 700; font-variant-numeric: tabular-nums; }
tr.cov td.low { color: #b91c1c; background: #fef2f2; }
.toolbar-sticky { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tpl-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-btns .btn { flex-direction: column; gap: 0; padding: 6px 12px; line-height: 1.2; }
.tpl-btns .btn small { font-weight: 400; font-size: 11px; color: var(--muted); }

/* ---- Resúmenes ---- */
.sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.meter { height: 8px; border-radius: 4px; background: var(--atp-gray); overflow: hidden; margin-top: 8px; }
.meter > div { height: 100%; background: var(--atp-azul); border-radius: 4px; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.list-item:last-child { border-bottom: none; }
.list-item .grow { flex: 1; min-width: 200px; }
.st { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-pendiente, .st-pendiente_companero, .st-pendiente_aprobacion { background: var(--pend); color: var(--pend-ink); }
.st-aprobada, .st-aprobado { background: var(--vac); color: var(--vac-ink); }
.st-rechazada, .st-rechazado { background: #fef2f2; color: #b91c1c; }
.st-cancelada, .st-cancelado { background: var(--atp-gray); color: var(--muted); }
.wd-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-pick label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.wd-pick input { accent-color: var(--atp-azul); }
.swatches { display: flex; gap: 6px; }
.swatches button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 2px var(--text); }
input.mini { width: 72px; padding: 6px 8px; }

@media (max-width: 980px) { .sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cal .day { min-height: 70px; padding: 4px; }
  .pill { font-size: 10px; padding: 2px 4px; }
  .pill small { display: none; }
  .cal .hd { font-size: 10px; padding: 6px 2px; }
  .month-nav h2 { min-width: 140px; font-size: 16px; }
  .hide-sm { display: none !important; }
}
@media print {
  .topbar, .grad-bar, .no-print, #toast { display: none !important; }
  .container { padding: 0; max-width: none; }
  .card { box-shadow: none; }
}
form.tpl { flex-wrap: nowrap; gap: 6px; }
form.tpl input[type=time] { width: 104px !important; padding: 8px 6px; }
form.tpl input[name=nombre] { min-width: 0 !important; }
@media (max-width: 760px) { form.tpl { flex-wrap: wrap; } }
