/* Los dos tableros del panel (prefijo tb-, 14/11/2026): Reservas e Inicio. Mockups aprobados en
   clinicann-union/circuito-2026-11-14 (mockup.html, tablero 12, y tablero-inicio.html). Sin colores sueltos:
   los puntos y bordes salen de panel-tokens.css (--e-*, --tb-*). */
.tb { display: flex; flex-direction: column; min-height: 0 }
.tb-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.tb-seg { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--hr-linea); border-radius: 10px; padding: 3px }
.tb-seg button { height: 30px; padding: 0 12px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink2); background: none; border: 0; cursor: pointer }
.tb-seg button.on { background: var(--hr-sel); color: var(--hr-titulo) }
.tb-busca { margin-left: auto; width: 320px; max-width: 100%; height: 38px; border: 1px solid var(--hr-linea); border-radius: 10px; background: var(--card);
  display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--ink2) }
.tb-busca input { border: 0; outline: 0; background: none; font: inherit; font-size: 13.5px; color: var(--ink); flex: 1; min-width: 0 }
.tb-busca svg { width: 16px; height: 16px; flex: none }
.tb-resumen { font-size: 19px; line-height: 1.4; margin: 14px 0 2px; color: var(--ink); text-wrap: balance }
.tb-resumen b { color: var(--hr-titulo) }
.tb-resumen small { display: block; font-size: 13px; color: var(--ink2); margin-top: 2px }
.tb-filtros { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap }
.tb-filtros .tb-lab { font-size: 12px; font-weight: 700; color: var(--ink2); margin-right: 4px; letter-spacing: .04em }
.tb-fchip { height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--hr-linea); background: var(--card); font: inherit; font-size: 12.5px;
  font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; cursor: pointer }
.tb-fchip em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink2) }
.tb-fchip.on { border-color: var(--hr-titulo); box-shadow: inset 0 0 0 1px var(--hr-titulo); background: var(--hr-sel) }
.tb-fchip.tb-frios { margin-left: auto }
.tb-fchip svg { width: 14px; height: 14px }

/* el tablero: a 1920 todas las columnas entran, cada una con su propio scroll */
.tb-tablero { display: grid; gap: 12px; margin-top: 14px; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; height: var(--tb-alto, 70vh); min-height: 360px }
.tb-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; min-height: 0; min-width: 0 }
.tb-colh { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); padding: 2px 4px 10px }
.tb-colh > div { flex: 1; min-width: 0 }
.tb-colh small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; margin-top: 2px }
.tb-colh small a { color: var(--hr-titulo); font-weight: 700; cursor: pointer }
.tb-colh em { font-style: normal; background: var(--card); border: 1px solid var(--hr-linea); border-radius: 9px; padding: 0 7px; color: var(--ink) }
.tb-cards { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; flex: 1; padding: 1px 2px 2px 1px; scrollbar-width: thin }
.tb-vacio { font-size: 13px; color: var(--ink2); padding: 8px 4px }
.tb-mas-col { align-self: flex-start; margin: 2px 0 4px; font-size: 12.5px }

/* la tarjeta */
.tb-tj { position: relative; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--tb-c, var(--hr-contorno)); border-radius: 10px;
  padding: 9px 10px 10px; box-shadow: var(--hr-sombra); flex: none }
.tb-tj:hover { border-color: var(--hr-contorno); border-left-color: var(--tb-c, var(--hr-contorno)) }
.tb-tj[data-col="nueva"], .tb-tj[data-col="pidio"] { --tb-c: var(--tb-nueva) }
.tb-tj[data-col="preparando"], .tb-tj[data-col="firmo"] { --tb-c: var(--tb-prep) }
.tb-tj[data-col="lista"], .tb-tj[data-col="res"] { --tb-c: var(--tb-lista) }
.tb-tj[data-col="entregada"], .tb-tj[data-col="ret"] { --tb-c: var(--tb-ent) }
.tb-tj[data-col="lead"] { --tb-c: var(--tb-lead) }
.tb-tj[data-col="firma"] { --tb-c: var(--tb-firma) }
/* Inicio de la invitación (15/11/2026): Para invitar, Invitados y Socios activos */
.tb-tj[data-col="invitar"] { --tb-c: var(--tb-pidio) }
.tb-tj[data-col="invitados"] { --tb-c: var(--tb-prep) }
.tb-tj[data-col="activo"] { --tb-c: var(--tb-lista) }
.tb-res { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--hr-ok-texto);
  background: var(--hr-sel); border-radius: 6px; padding: 1px 7px; cursor: pointer; border: 0; font-family: inherit }
.tb-res:hover { text-decoration: underline }
.tb-res svg { width: 13px; height: 13px; flex: none }
.tb-res { flex-wrap: wrap; column-gap: 4px; text-align: left }
.tb-nw { white-space: nowrap }
.iv-corto { display: none }
.tb-apagada { font-size: 13px; color: var(--ink2); margin-top: 6px }
.tb-nom { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 3px 7px; font-size: 14px; line-height: 20px; font-weight: 700; padding-right: 28px; min-width: 0 }
/* el nombre ocupa dos renglones antes que cortarse; la chapa de sede baja si no entra */
.tb-nom .tb-n { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 31px); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.tb-nom .tb-sede, .tb-nom .tb-deb { margin-top: 2px }
.tb-deb { display: inline-flex; align-items: center; gap: 4px; color: var(--hr-ok-texto); font-size: 15px; flex: none }
.tb-deb.mal { color: var(--dan) }
.tb-deb small { font-size: 11px; font-weight: 700 }
.tb-pv { width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--hr-sel); color: var(--hr-titulo); display: grid; place-items: center; flex: none }
.tb-pv svg { width: 15px; height: 15px }
.tb-sede { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 0 5px; background: var(--surface-2); border: 1px solid var(--hr-linea); color: var(--ink2); flex: none }
.tb-it { font-size: 13px; line-height: 18px; margin-top: 4px; overflow-wrap: anywhere }
.tb-it b { font-weight: 700 }
.tb-cod { font-size: 22px; font-weight: 700; letter-spacing: .18em; font-variant-numeric: tabular-nums; color: var(--hr-titulo); margin-top: 6px }
.tb-cod small { font-size: 11px; letter-spacing: 0; font-weight: 600; color: var(--ink2); margin-left: 6px }
.tb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; font-size: 12px; color: var(--ink2); margin-top: 5px }
.tb-meta .tb-at { color: var(--hr-at-texto); font-weight: 600 }
.tb-acc { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap }
.tb-acc .btn { height: 30px; padding: 0 8px; font-size: 12px; white-space: nowrap }
.tb-acc .tb-pri { background: var(--hr-acento); border-color: var(--hr-acento-borde); color: var(--hr-sobre-acento); font-weight: 700 }
.tb-acc .tb-pri:hover { background: var(--hr-acento-hover) }
.tb-mas { position: absolute; right: 5px; top: 5px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ink2);
  background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1 }
.tb-mas:hover { background: var(--surface-2) }

/* etiqueta del REPROCANN: punto + palabra (nunca sólo color) */
.tb-et { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap }
.tb-et i { width: 8px; height: 8px; border-radius: 4px; background: var(--c); flex: none }
.tb-et.hueco i { background: none; box-shadow: inset 0 0 0 2px var(--c) }
.tb-et small { font-weight: 500; color: var(--ink2); font-size: 12px }
.tb-tag { white-space: nowrap; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; background: var(--hr-at-fondo); border: 1px solid var(--hr-at-borde); color: var(--hr-at-texto) }

/* teléfono: una columna por vez, con chips arriba */
.tb-chips { display: none }
.tb-sel2 { display: none }
@media (max-width: 760px) {
  .tb-top { gap: 8px }
  .tb-busca { width: auto; flex: 1; margin-left: 0 }
  .tb-top .tb-seg { display: none }
  .tb-resumen { font-size: 15px; margin-top: 10px }
  .tb-filtros { display: none }
  .tb-sel2 { display: flex; gap: 8px; margin-top: 10px }
  .tb-sel2 .btn { flex: 1; justify-content: space-between; height: 36px; font-size: 13px }
  .tb-chips { display: flex; gap: 5px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none }
  .tb-chips button { flex: none; height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--hr-linea); background: var(--card); font: inherit; font-size: 12.5px;
    font-weight: 600; color: var(--ink2); display: flex; align-items: center; gap: 6px; cursor: pointer }
  .tb-chips button em { font-style: normal; font-size: 11px; font-weight: 700; background: var(--surface-2); border-radius: 8px; padding: 0 5px; color: var(--ink) }
  .tb-chips button.on { background: var(--hr-titulo); border-color: var(--hr-titulo); color: var(--hr-sobre-primario) }
  .tb-chips button.on em { background: color-mix(in srgb, var(--hr-sobre-primario) 20%, transparent); color: var(--hr-sobre-primario) }
  .tb-tablero { display: block; height: auto; min-height: 0; margin-top: 4px }
  .tb-col { display: none; background: none; border: 0; padding: 0 }
  .tb-col.tb-visible { display: flex }
  .tb-colh { display: none }
  .tb-cards { overflow: visible }
  .tb-acc .btn { height: 36px; padding: 0 14px; font-size: 13.5px }
}
.tb-solo-movil { display: none }
@media (max-width: 760px) { .tb-solo-desk { display: none } .tb-solo-movil { display: inline } }
.tb-sel2 svg { width: 16px; height: 16px; flex: none }

/* Padrón: la invitación a la app (prefijo iv-, 15/11/2026, mockup clinicann-union/invitacion-2026-11-15, P1 y P2) */
.iv-cab { display: flex; align-items: flex-start; gap: 16px }
.iv-cab .tb-resumen { flex: 1; min-width: 0 }
.iv-todos { margin-top: 14px; height: 42px; padding: 0 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap }
.iv-todos svg, #iv-mandar svg { width: 17px; height: 17px }
.iv-card { margin-top: 12px; padding: 0; overflow: hidden }
.iv-tabla th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2) }
.iv-tabla td { vertical-align: middle; padding-top: 9px; padding-bottom: 9px }
.iv-tabla tr[data-socio-id] { cursor: pointer }
.iv-socio { display: flex; align-items: center; gap: 10px; min-width: 0 }
.iv-socio b { display: block; font-size: 14px }
.iv-socio small { display: block; font-size: 12px; color: var(--ink2); overflow-wrap: anywhere }
.iv-socio small.iv-sinmail { color: var(--hr-at-texto); font-weight: 600 }
.iv-vin { color: var(--ink2) }
.iv-est { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap }
.iv-pt { width: 8px; height: 8px; border-radius: 4px; background: var(--c); flex: none; display: inline-block }
.iv-pt.hueco { background: none; box-shadow: inset 0 0 0 2px var(--c) }
.iv-tabla .btn { height: 32px; font-size: 13px; white-space: nowrap }
.iv-hoja.pn-mod-card { max-width: 1180px; padding: 22px 26px }
.iv-hoja h3 { font-size: 22px; margin: 0 }
.iv-bajada { margin: 4px 0 14px; color: var(--ink2) }
.iv-movil-res { display: none }
.iv-p2 { display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -26px }
.iv-p2 > section { padding: 16px 22px; min-width: 0; max-height: 56vh; overflow-y: auto }
.iv-p2 > section + section { border-left: 1px solid var(--line) }
.iv-p2 h4 { display: flex; justify-content: space-between; margin: 0 0 10px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2) }
.iv-p2 h4 em { font-style: normal; color: var(--ink) }
.iv-pers { list-style: none; margin: 0; padding: 0 }
.iv-pers li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.iv-pers li small { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--ink2) }
.iv-grupo { margin-bottom: 14px; font-size: 12.5px }
.iv-grupo > .iv-pt { margin-right: 6px }
.iv-grupo p { margin: 2px 0 6px; color: var(--ink2) }
.iv-pie-col { font-size: 13px; color: var(--ink2); margin: 6px 0 0; text-wrap: balance }
.iv-link { background: none; border: 0; padding: 8px 0 0; font: inherit; font-weight: 700; color: var(--hr-titulo); cursor: pointer }
.iv-mail { border: 1px solid var(--hr-linea); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; background: var(--card) }
.iv-mail p { margin: 0 0 8px }
.iv-mail-de { font-size: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px }
.iv-mail-btn { display: inline-block; background: var(--hr-titulo); color: var(--hr-sobre-primario); border-radius: 8px; padding: 9px 16px; font-weight: 700; margin: 4px 0 8px }
.iv-mail small { display: block; font-size: 12px; color: var(--ink2) }
.iv-p2-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; color: var(--ink2); font-size: 13.5px }
#iv-mandar { height: 42px; padding: 0 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px }
@media (max-width: 760px) {
  .iv-cab { flex-direction: column; gap: 0 }
  .iv-todos { width: 100%; justify-content: center; margin-top: 10px }
  .iv-tabla th:nth-child(2), .iv-tabla td:nth-child(2), .iv-tabla th:nth-child(3), .iv-tabla td:nth-child(3),
  .iv-tabla th:nth-child(4), .iv-tabla td:nth-child(4), .iv-tabla th:nth-child(5), .iv-tabla td:nth-child(5) { display: none }
  .iv-tabla { table-layout: fixed }
  .iv-tabla th:nth-child(1) { width: auto } .iv-tabla th:nth-child(6) { width: 112px } .iv-tabla th:nth-child(7) { width: 52px } .iv-tabla td:nth-child(7) { padding: 0 4px; overflow: visible }
  .iv-socio > div { min-width: 0 }
  .iv-tabla td { overflow: hidden; padding-left: 8px; padding-right: 8px }
  .iv-tabla .tb-pv { display: none }
  .iv-socio small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal }
  .iv-tabla .iv-uno { padding: 0 12px }
  .iv-largo { display: none } .iv-corto { display: inline }
  .iv-tabla th:nth-child(6) { width: 112px }
  .iv-no { white-space: normal; align-items: flex-start; font-size: 12px }
  #so-invitar .tb-filtros { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px }
  #so-invitar .tb-fchip { flex: none }
  .iv-hoja.pn-mod-card { padding: 18px 16px }
  .iv-bajada, .iv-solo-desk { display: none }
  .iv-movil-res { display: block; margin: 6px 0 12px; color: var(--ink2) }
  .iv-p2 { grid-template-columns: 1fr; margin: 0 -16px }
  .iv-p2 > section { max-height: none; padding: 12px 16px }
  .iv-p2 > section + section { border-left: 0; border-top: 1px solid var(--line) }
  .iv-p2-pie { flex-direction: column; align-items: stretch }
  .iv-p2-pie > span { display: none }
}
