/* Futbol Platform — estilos del panel. Sin estilos inline (CSP style-src 'self'). */
:root { --app-sidebar-w: 250px; --app-navbar-h: 56px; }

.app-body { min-height: 100vh; }
.app-navbar { min-height: var(--app-navbar-h); z-index: 1030; }
.brand-escudo { width: 32px; height: 32px; object-fit: contain; }
.context-form .form-select { max-width: 12rem; min-width: 8.5rem; }
@media (max-width: 575.98px) { .context-form .form-select { max-width: 7.5rem; min-width: 5.5rem; font-size: .8rem; } }

.app-layout { display: flex; min-height: calc(100vh - var(--app-navbar-h)); }
.app-main { flex: 1 1 auto; min-width: 0; }
@media (min-width: 992px) {
  .app-sidebar { width: var(--app-sidebar-w); flex: 0 0 var(--app-sidebar-w); position: sticky; top: var(--app-navbar-h); height: calc(100vh - var(--app-navbar-h)); overflow-y: auto; }
}
.app-sidebar .nav-link { padding: .45rem .75rem; border-radius: .5rem; }
.sidebar-seccion { letter-spacing: .05em; font-size: .7rem; }

/* Auth */
.auth-card { max-width: 440px; }
.auth-escudo { width: 72px; height: 72px; object-fit: contain; }

/* Avatares con iniciales (8 colores, sin estilos inline) */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; color: #fff; object-fit: cover; flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.avatar-md { width: 40px; height: 40px; font-size: .9rem; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.avatar-c0 { background: #2563eb; } .avatar-c1 { background: #16a34a; } .avatar-c2 { background: #db2777; } .avatar-c3 { background: #9333ea; }
.avatar-c4 { background: #ea580c; } .avatar-c5 { background: #0891b2; } .avatar-c6 { background: #4f46e5; } .avatar-c7 { background: #b45309; }

/* Muestra de color (el color real lo aplica app.js desde data-color) */
.swatch { display: inline-block; width: 1rem; height: 1rem; border-radius: .25rem; border: 1px solid rgba(0,0,0,.2); vertical-align: middle; }
.escudo-sm { width: 28px; height: 28px; object-fit: contain; }
.escudo-md { width: 64px; height: 64px; object-fit: contain; }

/* Tarjetas de partido */
.partido-card .marcador { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.resultado-V { color: var(--bs-success); } .resultado-E { color: var(--bs-secondary); } .resultado-D { color: var(--bs-danger); }

/* Calendario mensual */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-head { font-size: .75rem; text-transform: uppercase; text-align: center; color: var(--bs-secondary-color); padding: .25rem 0; }
.cal-dia { min-height: 92px; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .35rem; padding: .25rem; font-size: .8rem; }
.cal-dia.fuera { opacity: .45; }
.cal-dia.hoy { border-color: var(--bs-primary); box-shadow: inset 0 0 0 1px var(--bs-primary); }
.cal-evento { display: block; border-radius: .25rem; padding: .1rem .25rem; margin-top: .2rem; text-decoration: none; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-evento.finalizado { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
@media (max-width: 575.98px) { .cal-dia { min-height: 64px; font-size: .7rem; } }

/* Convocatoria */
.conv-contador { font-variant-numeric: tabular-nums; }
.conv-contador.excedido { color: var(--bs-danger); font-weight: 700; }
.conv-fila.seleccionado { background: var(--bs-success-bg-subtle); }
.estado-contadores .badge { font-size: .85rem; }

/* Tablas → tarjetas en móvil */
@media (max-width: 767.98px) {
  .table-cards thead { display: none; }
  .table-cards tr { display: block; border: 1px solid var(--bs-border-color); border-radius: .5rem; margin-bottom: .5rem; padding: .25rem .5rem; }
  .table-cards td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .25rem 0; }
  .table-cards td::before { content: attr(data-label); font-weight: 600; color: var(--bs-secondary-color); }
  .table-cards td[data-label=""]::before { content: none; }
}

/* QR */
.qr-box { width: 240px; height: 240px; image-rendering: pixelated; }

/* Botones táctiles cómodos en iPad */
@media (pointer: coarse) { .btn { min-height: 40px; } .form-control, .form-select { min-height: 42px; } }

.text-pre { white-space: pre-line; }
.cursor-pointer { cursor: pointer; }

/* Tipos de evento (panel): chip de botón de consola y reordenación por arrastre */
.evento-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem; border-radius: .4rem; background: #64748b;
  color: #0b1120; font-weight: 700; font-size: .8rem; letter-spacing: .02em; white-space: nowrap; }
.evento-chip-lg { font-size: 1rem; padding: .6rem 1rem; min-height: 56px; }
.drag-handle { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.arrastrando { opacity: .6; outline: 2px dashed var(--bs-primary); }
.w-1 { width: 1%; }
