.tr-reservation {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.tr-reservation label {
  display: block;
  margin-top: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.tr-reservation input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  margin-top: 0.45rem;
  border-radius: 12px;
  border: 1px solid #cbd5f5;
  font-size: 0.98rem;
}

.tr-reservation button:not(.tr-cal-cell):not(.tr-cal-toggle-btn):not(.tr-cal-nav) {
  width: auto;
  padding: 0.75rem 0.9rem;
  margin-top: 0.45rem;
  border-radius: 12px;
  background: #303e63 !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tr-reservation button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
}

.tr-calendar {
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.tr-calendar button,
.tr-calendar .tr-cal-cell,
.tr-calendar .tr-cal-toggle-btn,
.tr-calendar .tr-cal-nav {
  box-shadow: none !important;
}

.tr-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.tr-mobile-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  display: none;
}

.tr-cal-title {
  font-weight: 700;
  color: #0f172a;
}

.tr-cal-nav {
  width: auto;
  padding: 0.25rem 0.6rem;
  background: rgba(48, 62, 99, 0.08);
  color: #22304d;
  border-radius: 999px;
  font-size: 0.85rem;
}

.tr-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.tr-cal-toggle {
  display: inline-flex;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.tr-cal-toggle-btn {
  width: auto;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(48, 62, 99, 0.08) !important;
  color: #22304d !important;
  border: none;
  font-size: 0.85rem;
}

.tr-cal-toggle-btn.is-active {
  background: #303e63 !important;
  color: #fff !important;
}

.tr-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.tr-cal-error {
  grid-column: 1 / -1;
  padding: 0.6rem;
  text-align: center;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 10px;
}

.tr-cal-cell {
  border-radius: 14px;
  padding: 0.65rem;
  border: 1px solid transparent;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  min-width: 0;
}

@media (max-width: 600px) {
  .tr-reservation {
    padding: 1.2rem;
  }

  .tr-calendar {
    padding: 0.8rem;
  }

  .tr-cal-weekdays {
    font-size: 0.7rem;
    gap: 0.25rem;
  }

  .tr-cal-grid {
    gap: 0.25rem;
  }

  .tr-cal-cell {
    padding: 0.35rem;
    border-radius: 10px;
  }

  .tr-cal-day {
    font-size: 0.78rem;
  }

  .tr-cal-meta {
    font-size: 0.6rem;
  }

  .tr-cal-legend {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .tr-legend {
    font-size: 0.7rem;
  }
}

@media (max-width: 420px) {
  .tr-cal-meta {
    display: none;
  }

  .tr-cal-weekdays {
    gap: 0.2rem;
  }

  .tr-cal-weekdays span {
    font-size: 0;
  }

  .tr-cal-weekdays span::after {
    content: attr(data-short);
    font-size: 0.65rem;
  }

  .tr-cal-cell {
    padding: 0.25rem;
    border-radius: 8px;
  }

  .tr-cal-day {
    font-size: 0.7rem;
  }

  .tr-mobile-hint {
    display: block;
  }
}

.tr-cal-cell:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

.tr-cal-past {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.tr-cal-cell.is-selected {
  outline: 2px solid #0f172a;
 /* outline-offset: 2px;*/
}

.tr-cal-muted {
  opacity: 0.6;
}

.tr-cal-cell::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -8px);
  background: #0f172a;
  color: #fff;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.tr-cal-cell:hover::after {
  opacity: 1;
  transform: translate(-50%, -12px);
}

.tr-cal-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.12);
}

.tr-cal-empty {
  background: transparent;
  border: none;
  cursor: default;
  box-shadow: none;
}

.tr-cal-day {
  font-weight: 700;
  color: #0f172a;
}

.tr-cal-meta {
  font-size: 0.75rem;
  color: #475569;
}

.tr-calendar .tr-cal-good {
  background: #eaf7f0 !important;
  border-color: #86efac !important;
}

.tr-calendar .tr-cal-limited {
  background: #fff4e5 !important;
  border-color: #fdba74 !important;
}

.tr-calendar .tr-cal-full {
  background: #fdecea !important;
  border-color: #fca5a5 !important;
}

.tr-calendar .tr-cal-none {
  background: #f1f5f9;
  border-color: #e2e8f0;
  opacity: 0.7;
}

.tr-calendar .tr-cal-closed {
  background: #e5e7eb !important;
  border-color: #9ca3af !important;
  color: #6b7280;
}

.tr-cal-legend {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: 0.8rem;
}

.tr-legend {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.tr-legend-green {
  background: #eaf7f0;
  border-color: #86efac;
}

.tr-legend-orange {
  background: #fff4e5;
  border-color: #fdba74;
}

.tr-legend-red {
  background: #fdecea;
  border-color: #fca5a5;
}

.tr-legend-none {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.tr-class-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 1rem;
}

.tr-class-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: 16px;
  border: 2px solid #cbd5f5;
  background: #fff;
}

.tr-class-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tr-class-students {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.tr-class-students-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.tr-class-students ul {
  margin: 0;
  padding-left: 1rem;
}

.tr-class-students li {
  display: grid;
  gap: 0.1rem;
  margin-bottom: 0.2rem;
}

.tr-class-students small {
  color: #475569;
}

.tr-class-students.empty {
  color: #64748b;
  font-style: italic;
}

.tr-monitor-hours {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tr-training-list {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.tr-training-card {
  display: block;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.tr-training-image {
  margin-top: 0.6rem;
}

.tr-training-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.tr-training-body h5 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.tr-training-body p {
  margin: 0 0 0.35rem;
  color: #0f172a;
}

.tr-training-section {
  margin: 0.4rem 0;
  color: #0f172a;
}

.tr-training-section strong {
  display: block;
  margin-bottom: 0.2rem;
}

.tr-training-list-items {
  margin: 0;
  padding-left: 1.1rem;
}

.tr-training-list-items li {
  margin-bottom: 0.2rem;
}

.tr-monitor-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
}

.tr-monitor-tab {
  border: 1px solid #e2e8f0;
  background: rgba(48, 62, 99, 0.08);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: #22304d;
}

.tr-monitor-tab.is-active {
  background: #303e63;
  color: #fff;
  border-color: #303e63;
}

.tr-monitor-panel {
  display: none;
}

.tr-monitor-panel.is-active {
  display: block;
}


.tr-monitor-hours-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 0.8rem;
}

.tr-monitor-hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
}

.tr-monitor-hours-table th,
.tr-monitor-hours-table td {
  padding: 0.6rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.tr-hide-prices .tr-price {
  display: none;
}

.tr-status-green {
  border-color: #1f8f5f;
  background: #eaf7f0;
}

.tr-status-orange {
  border-color: #c7771a;
  background: #fff4e5;
}

.tr-status-red {
  border-color: #c03a2b;
  background: #fdecea;
}

.tr-message {
  padding: 0.8rem;
  border-radius: 12px;
  background: #eef7ff;
  border: 1px solid #b5d9ff;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

#tr-form-message.is-success {
  background: #eaf7f0;
  border-color: #86efac;
  color: #14532d;
}

#tr-form-message.is-error {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.tr-message.is-success {
  background: #eaf7f0;
  border-color: #86efac;
  color: #14532d;
}

.tr-message.is-error {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.tr-credits {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tr-credits-header {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.tr-credits-balance {
  margin-bottom: 0.8rem;
}

.tr-coupon-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.tr-coupon-card {
  padding: 0.8rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 0.35rem;
}

.tr-coupon-card button {
  width: auto;
}

.tr-payment-methods {
  margin-top: 1rem;
  padding: 0.8rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tr-payment-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.tr-payment-methods label {
  display: inline-flex;
  align-items: center;
  margin: 0.35rem 0;
  font-weight: 500;
  gap: 0.45rem;
}

.tr-payment-methods input[type='radio'] {
  width: auto;
}

.tr-account {
  max-width: 1280px;
}

.tr-account-tabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tr-tab {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(48, 62, 99, 0.08);
  color: #22304d;
  text-decoration: none;
  font-weight: 600;
}

.tr-tab.is-active {
  background: #303e63;
  color: #fff;
}

.tr-account table,
.tr-account th,
.tr-account td {
  text-align: center;
}

.tr-auth-actions {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tr-auth-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: #303e63;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.tr-auth-btn.tr-auth-secondary {
  background: rgba(48, 62, 99, 0.08);
  color: #22304d;
}

.tr-cancel-btn {
  width: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(48, 62, 99, 0.08) !important;
  color: #22304d !important;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.tr-icon-btn {
  min-width: 28px;
  height: 28px;
  line-height: 24px;
  text-align: center;
  font-size: 16px;
  padding: 0;
}

@media (max-width: 600px) {
  .tr-account table {
    font-size: 0.85rem;
  }
  .tr-account th,
  .tr-account td {
    padding: 0.35rem 0.4rem;
  }

  .tr-account .tr-user-reservas-table thead {
    display: none;
  }

  .tr-account .tr-user-reservas-table tbody,
  .tr-account .tr-user-reservas-table tr,
  .tr-account .tr-user-reservas-table td {
    display: block;
    width: 100%;
    text-align: left;
  }

  .tr-account .tr-user-reservas-table tr {
    margin: 0 0 0.8rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #dbe3f3;
    border-radius: 12px;
    background: #fff;
  }

  .tr-account .tr-user-reservas-table td {
    border: none;
    padding: 0.22rem 0;
  }

  .tr-account .tr-user-reservas-table td::before {
    display: inline-block;
    min-width: 88px;
    margin-right: 0.35rem;
    color: #64748b;
    font-weight: 600;
  }

  .tr-account .tr-user-reservas-table td:nth-child(1)::before {
    content: "Clase:";
  }
  .tr-account .tr-user-reservas-table td:nth-child(2)::before {
    content: "Fecha:";
  }
  .tr-account .tr-user-reservas-table td:nth-child(3)::before {
    content: "Hora:";
  }
  .tr-account .tr-user-reservas-table td:nth-child(4)::before {
    content: "Plazas:";
  }
  .tr-account .tr-user-reservas-table td:nth-child(5)::before {
    content: "Estado:";
  }
  .tr-account .tr-user-reservas-table td:nth-child(6)::before {
    content: "Acción:";
  }

  .tr-account .tr-user-reservas-table .tr-empty-row td {
    text-align: center;
    padding: 0.35rem 0;
  }

  .tr-account .tr-user-reservas-table .tr-empty-row td::before {
    content: "";
    display: none;
  }
}

.tr-select {
  width: auto;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: #303e63 !important;
  color: #fff !important;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.tr-select:disabled {
  background: rgba(48, 62, 99, 0.15);
  color: #94a3b8;
  cursor: not-allowed;
}

@media (min-width: 720px) {
  .tr-class-list {
    grid-template-columns: 1fr 1fr;
  }
}
