/* ============ CHIPS SELECCIONABLES (checkbox / radio con aspecto de chip) ============ */
.chip--check, .chip--radio { cursor: pointer; }
.chip--check:has(input:checked), .chip--radio:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-hi); }
.chip--radio:has(input:checked) { background: color-mix(in srgb, var(--c, var(--accent)) 18%, var(--s2)); border-color: color-mix(in srgb, var(--c, var(--accent)) 60%, transparent); color: var(--tx); }
.chip--check:has(input:focus-visible), .chip--radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ HOY ============ */
.hoy { display: grid; gap: var(--sp-8); }
.hoy__main, .hoy__side { display: flex; flex-direction: column; gap: var(--sp-8); min-width: 0; }
@media (min-width: 1100px) { .hoy { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.hero__t { font-size: var(--t-2xl); font-weight: 800; }
.mini { display: flex; flex-direction: column; margin-top: var(--sp-4); border-top: 1px solid var(--line); }
.mini li { display: grid; grid-template-columns: 52px 1fr auto; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); align-items: center; }
.mini li:last-child { border-bottom: 0; }
.hero { padding: var(--sp-5); }

/* ============ CALENDARIO ============ */
.cal__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.cal__nav { display: flex; align-items: center; gap: var(--sp-1); }
.cal__titulo { min-width: 9.5rem; text-align: center; font-size: var(--t-lg); font-weight: 700; }
.cal .chips--scroll { margin-top: var(--sp-3); }
.cal__canales { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-3); }
.cal__body { margin-top: var(--sp-4); }
@media (max-width: 719px) {
  .cal__tools { flex-direction: column; align-items: stretch; }
  .cal__tools .seg { display: flex; }
  .cal__tools .seg__btn { flex: 1; padding: 0; }
  .cal__nav { justify-content: space-between; }
}

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Mes */
.mes { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.mes__cab, .mes__sem { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mes__cab { border-bottom: 1px solid var(--line); background: var(--s2); }
.mes__cab span { padding: var(--sp-2) 0; text-align: center; font-size: var(--t-xs); font-weight: 700; color: var(--tx-3); text-transform: uppercase; letter-spacing: 0.04em; }
.mes__sem + .mes__sem { border-top: 1px solid var(--line); }
.mc { position: relative; min-height: 64px; padding: var(--sp-1); display: flex; flex-direction: column; align-items: center; gap: 4px; border-left: 1px solid var(--line); cursor: pointer; }
.mc:first-child { border-left: 0; }
.mc__num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: var(--t-sm); color: var(--tx); font-variant-numeric: tabular-nums; }
.mc--fuera .mc__num { color: var(--tx-3); font-weight: 500; }
.mc--hoy .mc__num { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.mc--sel { background: var(--accent-soft); }
.mc--dom { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.mc--sel.mc--dom { background: var(--accent-soft); }
.mc__chips { display: none; width: 100%; flex-direction: column; gap: 2px; min-width: 0; }
.mc__dots { display: flex; gap: 3px; min-height: 7px; }
.mc.drop, .tg__col.drop { background: var(--accent-soft); }

.mchip { display: flex; align-items: center; gap: 5px; width: 100%; min-height: 24px; padding: 0 6px; border-radius: 6px; font-size: var(--t-xs); font-weight: 600; text-align: left; color: var(--tx); background: color-mix(in srgb, var(--c) 17%, var(--s2)); overflow: hidden; }
.mchip:hover { background: color-mix(in srgb, var(--c) 28%, var(--s2)); }
.mchip .i { color: color-mix(in srgb, var(--c) 80%, white); width: 13px; height: 13px; }
.mchip__h { color: color-mix(in srgb, var(--c) 78%, white); flex-shrink: 0; }
.mchip--hecha { opacity: 0.55; text-decoration: line-through; }
.mchip--mas { background: none; color: var(--tx-2); font-weight: 600; min-height: 22px; }
.mchip--mas:hover { background: var(--s3); }

.daypanel { margin-top: var(--sp-5); }
@media (min-width: 720px) {
  .mc { min-height: 118px; align-items: stretch; padding: 6px; }
  .mc__num { align-self: flex-end; width: 28px; height: 28px; }
  .mc__chips { display: flex; }
  .mc__dots { display: none; }
  .daypanel { display: none; }
}

/* Semana y día: cuadrícula de horas */
.tg { --head-h: 56px; --colmin: 92px; overflow: auto; max-height: calc(100dvh - 300px); min-height: 380px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-lg); overscroll-behavior: contain; }
.tg[data-cols="1"] { --colmin: 0px; }
.tg__inner { min-width: calc(56px + var(--cols) * var(--colmin)); }
.tg__head, .tg__all { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.tg__head { position: sticky; top: 0; z-index: 4; background: var(--s2); border-bottom: 1px solid var(--line); }
.tg__corner { position: sticky; left: 0; z-index: 3; background: inherit; }
.tg__dia { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--sp-2) 0; min-height: var(--head-h); border-left: 1px solid var(--line); font-size: var(--t-xs); font-weight: 600; color: var(--tx-2); }
.tg__dia strong { font-size: var(--t-lg); color: var(--tx); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.tg__dia--hoy strong { background: var(--accent); color: var(--accent-ink); }
.tg__dia--hoy { color: var(--accent-hi); }
.tg__all { position: sticky; top: var(--head-h); z-index: 3; border-bottom: 1px solid var(--line); background: var(--s1); }
.tg__lbl { display: grid; place-items: center; font-size: var(--t-xs); color: var(--tx-3); padding: var(--sp-1); text-align: center; line-height: 1.2; }
.tg__allcol { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-left: 1px solid var(--line); min-width: 0; }
.tg__body { position: relative; display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.tg__gut { position: sticky; left: 0; z-index: 2; background: var(--s1); }
.tg__h { position: absolute; right: 8px; transform: translateY(-50%); font-size: var(--t-xs); color: var(--tx-3); }
.tg__col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hh); cursor: pointer; }
.tg__col--hoy { background-color: color-mix(in srgb, var(--accent) 3.5%, transparent); }
.tg__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; pointer-events: none; }
.tg__now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.ev { position: absolute; z-index: 1; padding: 4px 8px; border-radius: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; text-align: left; overflow: hidden; background: color-mix(in srgb, var(--c) 20%, var(--s2)); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); font-size: var(--t-sm); }
.ev:hover { background: color-mix(in srgb, var(--c) 32%, var(--s2)); z-index: 3; }
.ev__t { font-weight: 700; max-width: 100%; }
.ev__h { font-size: var(--t-xs); color: var(--tx-2); }
.ev--hecha { opacity: 0.55; }

/* ============ TAREAS ============ */
.rapida { display: flex; gap: var(--sp-2); }
.rapida .input { flex: 1; }

/* ============ EQUIPO ============ */
.buscar { position: relative; }
.buscar .i { position: absolute; left: 14px; top: 14px; color: var(--tx-3); pointer-events: none; }
.buscar .input { padding-left: 44px; }
.tabla { display: flex; flex-direction: column; }
.tabla__cab, .tabla__fila { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, 44px) 56px 60px; gap: var(--sp-2); align-items: center; padding: var(--sp-3) var(--sp-4); text-align: left; }
.tabla__cab { font-size: var(--t-xs); font-weight: 700; color: var(--tx-3); text-transform: uppercase; letter-spacing: 0.04em; background: var(--s2); border-bottom: 1px solid var(--line); }
.tabla__fila { min-height: 56px; border-bottom: 1px solid var(--line); width: 100%; }
.tabla__fila:last-child { border-bottom: 0; }
.tabla__fila:hover { background: var(--s2); }
.tabla__n { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; font-weight: 600; }
.tabla__cab span:not(:first-child), .tabla__fila > span:not(:first-child) { text-align: center; }
@media (max-width: 480px) { .tabla__cab, .tabla__fila { grid-template-columns: minmax(0, 1fr) 30px 30px 30px 44px 56px; gap: 4px; padding-inline: var(--sp-3); } }

/* Semana en el celular: los 7 días caben sin desplazarse de lado */
@media (max-width: 719px) {
  .tg { --head-h: 52px; --colmin: 50px; max-height: calc(100dvh - 330px); }
  .tg__inner { min-width: 0; }
  .tg__head, .tg__all, .tg__body { grid-template-columns: 42px repeat(var(--cols), minmax(0, 1fr)); }
  .tg[data-cols="1"] .tg__head, .tg[data-cols="1"] .tg__all, .tg[data-cols="1"] .tg__body { grid-template-columns: 52px minmax(0, 1fr); }
  .tg__dia strong { width: 28px; height: 28px; font-size: var(--t-md); }
  .tg__h { right: 4px; }
  .tg:not([data-cols="1"]) .ev { padding: 2px 3px; border-radius: 6px; }
  .tg:not([data-cols="1"]) .ev__h { display: none; }
  .tg:not([data-cols="1"]) .ev__t { font-size: var(--t-xs); white-space: normal; word-break: break-word; line-height: 1.15; }
  .tg:not([data-cols="1"]) .tg__lbl { font-size: 10px; }
  .tg:not([data-cols="1"]) .mchip span.trunc { display: none; }
  .tg:not([data-cols="1"]) .mchip { justify-content: center; padding: 0; }
}
