.cal-wrapper {
  padding: 16px 12px 60px;
  font-family: var(--f-body, 'Plus Jakarta Sans', sans-serif);
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Navegación semana ──────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 8px;
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1.5px solid var(--line, #e0deda);
  background: var(--white, #fafaf8);
  color: var(--ink, #0e0e0d);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
  font-size: 16px;
}

.cal-nav-btn:hover {
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
}

.cal-nav-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #0e0e0d);
  text-align: center;
  text-transform: capitalize;
}

/* ── Días de la semana ──────────────────── */
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-soft, #5c5c58);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.15s;
  text-align: center;
}

.cal-day:hover { background: var(--off, #f4f3f0); }

.cal-day-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #0e0e0d);
  line-height: 1;
}

.cal-day.active {
  background: var(--navy, #0f1c47);
  color: rgba(255,255,255,0.7);
}

.cal-day.active .cal-day-num { color: #fff; }
.cal-day.hoy .cal-day-num    { color: var(--accent, #2563eb); }
.cal-day.active.hoy .cal-day-num { color: #fff; }

/* ── Selector de cancha (móvil) ─────────── */
.cal-cancha-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.cal-cancha-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy, #0f1c47);
  text-align: center;
  flex: 1;
}

.cal-cancha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 1.5px solid var(--line, #e0deda);
  background: var(--white, #fafaf8);
  color: var(--ink, #0e0e0d);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s;
  flex-shrink: 0;
}

.cal-cancha-btn:hover {
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
}

.cal-cancha-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cal-cancha-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-bottom: 12px;
}

.cal-cancha-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line, #e0deda);
  transition: background 0.2s, transform 0.2s;
}

.cal-cancha-dot.active {
  background: var(--navy, #0f1c47);
  transform: scale(1.3);
}

/* ── Tabla desktop ──────────────────────── */
.cal-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--line, #e0deda);
  border-radius: 16px;
  background: var(--white, #fafaf8);
}

.cal-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.cal-table thead th {
  padding: 12px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy, #0f1c47);
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}

.cal-table thead th:first-child {
  width: 60px;
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  border-radius: 14px 0 0 0;
}

.cal-table thead th:last-child {
  border-right: none;
  border-radius: 0 14px 0 0;
}

.cal-table tbody tr { border-bottom: 1px solid var(--off, #f4f3f0); }
.cal-table tbody tr:last-child { border-bottom: none; }

.cal-table tbody td {
  vertical-align: top;
  padding: 0;
  border-right: 1px solid var(--off, #f4f3f0);
  min-height: 64px;
}

.cal-table tbody td:last-child { border-right: none; }

.cal-hour-cell {
  padding: 10px 8px 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft, #5c5c58);
  background: var(--off, #f4f3f0);
  text-align: right;
  white-space: nowrap;
  border-right: 1px solid var(--line, #e0deda) !important;
}

.cal-slot {
  padding: 6px;
  min-height: 64px;
  vertical-align: top;
}

/* ── Tarjeta partido ────────────────────── */
.cal-card {
  display: block;
  background: var(--navy, #0f1c47);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 4px;
  text-decoration: none;
  transition: opacity 0.18s, transform 0.18s;
}

.cal-card:hover { opacity: 0.88; transform: translateY(-1px); }

.cal-card.finalizado {
  background: var(--accent-bg, #eff6ff);
  border: 1.5px solid rgba(37,99,235,0.2);
}

.cal-card-cat {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.cal-card.finalizado .cal-card-cat { color: var(--accent, #2563eb); }

.cal-card-vs {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Equipo local: logo izquierda + nombre ── */
.cal-team-item {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

/* ── Equipo visitante: nombre + logo derecha ── */
.cal-team-vis {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.cal-card-team {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}

.cal-card.finalizado .cal-card-team { color: var(--navy, #0f1c47); }

.cal-card-sep {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent, #2563eb);
  flex-shrink: 0;
}

.cal-card.finalizado .cal-card-sep { color: var(--ink-soft, #5c5c58); }

.cal-card-score {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent, #2563eb);
  margin-top: 3px;
}

/* ── Móvil: slider de canchas ───────────── */
.cal-mobile-slider {
  display: none;
  overflow: hidden;
  border: 1.5px solid var(--line, #e0deda);
  border-radius: 16px;
  background: var(--white, #fafaf8);
  touch-action: pan-y;
  user-select: none;
}

.cal-mobile-col {
  display: none;
  width: 100%;
}

.cal-mobile-col.active { display: block; }

.cal-mobile-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  border-bottom: 1px solid var(--off, #f4f3f0);
  min-height: 56px;
}

.cal-mobile-row:last-child { border-bottom: none; }

.cal-mobile-row.row-empty { min-height: 44px; }

.cal-mobile-hour {
  padding: 12px 8px 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft, #5c5c58);
  background: var(--off, #f4f3f0);
  text-align: right;
  border-right: 1px solid var(--line, #e0deda);
  white-space: nowrap;
  line-height: 1.3;
}

.cal-mobile-slot { padding: 6px; min-height: 44px; }

/* Empty */
.cal-empty-day {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-soft, #5c5c58);
  font-size: 13px;
  border: 1.5px solid var(--line, #e0deda);
  border-radius: 16px;
  background: var(--white, #fafaf8);
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 640px) {
  .cal-cancha-nav    { display: flex; }
  .cal-cancha-dots   { display: flex; }
  .cal-table-wrap    { display: none; }
  .cal-mobile-slider { display: block; }

  .cal-day { font-size: 9px; padding: 6px 1px; }
  .cal-day-num { font-size: 14px; }
  .cal-nav-title { font-size: 12px; }
}

/* ── Logo equipo en cards del calendario ── */
.cal-team-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
}

.cal-card.finalizado .cal-team-logo {
  background: rgba(37,99,235,0.12);
  color: var(--navy, #0f1c47);
}

.cal-team-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}