/* ==========================================================================
   LA CLAVE STUDIO FITNESS — WEB APP STYLES
   Módulos: Alumnas, Administrador, Reservas, Cerradura y Cumpleaños
   ========================================================================== */

.app-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-main);
}

/* Sidebar de Navegación */
.app-sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.sidebar-brand img {
  height: 44px;
  width: auto;
}

.sidebar-brand-text h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
  text-transform: uppercase;
}

.sidebar-brand-text span {
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition);
}

.nav-item-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item-btn:hover {
  background: var(--primary-subtle);
  color: var(--primary-dark);
}

.nav-item-btn.active {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px rgba(14, 154, 167, 0.25);
}

.sidebar-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.role-switcher-card {
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
}

.role-switcher-card label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

.role-select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 600;
  background: #fff;
  color: var(--primary-dark);
}

/* Área Principal de Contenido */
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

.app-topbar,
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 1.1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(12px);
}

.topbar-left h1,
.header-welcome h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.2rem;
  letter-spacing: -0.2px;
}

.topbar-left p,
.header-welcome p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.topbar-user,
.header-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.header-profile .user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  line-height: 1.25;
}

.header-profile .user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.header-profile .user-role {
  font-size: 0.72rem;
}

.user-badge-pill {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--primary-subtle);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.user-details {
  line-height: 1.2;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.user-role {
  font-size: 0.72rem;
  color: var(--secondary);
  font-weight: 600;
}

/* Contenido de Vistas */
.app-content,
.app-content-body {
  padding: 1.75rem 2rem;
  flex-grow: 1;
}

.tab-view,
.tab-content {
  display: none !important;
}

.tab-view.active,
.tab-content.active {
  display: block !important;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tarjetas de Estadísticas / Resumen */
.stats-grid,
.admin-top-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.stat-card-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 0.2rem;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
}

.clickable-stat {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.clickable-stat:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--primary-subtle);
}

.clickable-stat:active {
  transform: translateY(-1px);
}

.clickable-stat::after {
  content: "↗";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.45;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.clickable-stat:hover::after {
  opacity: 1;
  color: var(--primary);
}

.sidebar-portal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sidebar-portal-btn.portal-student {
  background: var(--primary-subtle);
  color: var(--primary-dark);
  border: 1.5px solid rgba(14, 154, 167, 0.35);
}

.sidebar-portal-btn.portal-student:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.sidebar-portal-btn.portal-web {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1.5px solid var(--border-light);
}

.sidebar-portal-btn.portal-web:hover {
  background: var(--bg-subtle);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}

.stat-card-icon.coral {
  background: #ffeaa7;
  color: #d35400;
}

.stat-card-icon.rose {
  background: #ffe4e6;
  color: var(--accent-rose);
}

.stat-card-info h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.stat-card-info .stat-number {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}

/* Alerta de Cumpleaños Banner */
.birthday-alert-box {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  color: #2d3436;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
}

.birthday-alert-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.birthday-icon {
  font-size: 2rem;
}

.birthday-alert-box h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #2c3e50;
}

.birthday-alert-box p {
  font-size: 0.88rem;
  color: #34495e;
}

/* Dashboard de Alumna */
.student-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

/* Tarjeta de Plan Activo - Diseño Glassmorphic Moderno */
.active-plan-card {
  background: linear-gradient(135deg, #096d77 0%, #0e9aa7 50%, #17b3c2 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 12px 30px rgba(14, 154, 167, 0.25);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.active-plan-card::after {
  content: '';
  position: absolute;
  right: -25px;
  bottom: -25px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: var(--radius-full);
  pointer-events: none;
}

.active-plan-top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.plan-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.plan-modality-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.2;
}

.active-plan-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.active-plan-desc {
  font-size: 0.9rem;
  opacity: 0.95;
  margin-bottom: 1.15rem;
  line-height: 1.45;
}

.btn-auto-schedule {
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 800;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-auto-schedule:hover {
  background: #f8fafc;
  transform: translateY(-1px);
}

.preset-pattern-btn {
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.preset-pattern-btn:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.preset-pattern-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 3px 8px rgba(14, 154, 167, 0.35);
}

/* Grilla de Métricas del Plan Activo */
.active-plan-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

@media (max-width: 768px) {
  .active-plan-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.plan-meta-box {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 0.65rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.meta-box-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.3rem;
  width: 100%;
}

.meta-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.meta-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.meta-classes-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  line-height: 1;
  width: 100%;
}

.count-total,
.count-booked,
.count-remaining {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.count-label {
  font-size: 0.7rem;
  opacity: 0.85;
  font-weight: 600;
  white-space: nowrap;
}

.meta-date-display {
  width: 100%;
  text-align: center;
}

.count-expiry {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Tarjeta Cerradura Inteligente */
.smart-lock-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.lock-pin-display {
  background: var(--bg-subtle);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.lock-pin-code {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--primary-dark);
  font-family: monospace;
}

/* Modales y Toasts */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%; right: 0;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog,
.modal-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 90%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast-msg {
  background: var(--bg-surface);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

.toast-msg.success { border-left-color: var(--success); }
.toast-msg.danger { border-left-color: var(--danger); }
.toast-msg.warning { border-left-color: var(--warning); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 992px) {
  .app-sidebar {
    width: 80px;
    padding: 1rem 0.5rem;
  }
  .sidebar-brand-text, .nav-item-btn span {
    display: none;
  }
  .student-grid {
    grid-template-columns: 1fr;
  }
}

/* Pantalla Completa de Autenticación / Login Alumnas */
.auth-fullscreen-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  background: radial-gradient(circle at 10% 20%, rgba(14, 154, 167, 0.08) 0%, rgba(253, 251, 247, 1) 50%, rgba(232, 67, 147, 0.08) 100%);
  position: relative;
}

.auth-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.07);
  border: 1px solid var(--border-light);
  width: 100%;
  max-width: 460px;
  padding: 2.75rem 2.25rem;
  text-align: center;
  position: relative;
}

.auth-card-logo {
  height: 62px;
  width: auto;
  margin-bottom: 1.25rem;
  object-fit: contain;
}

.auth-card h2 {
  color: var(--primary-dark);
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.auth-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.auth-card form {
  text-align: left;
}

.auth-card .form-group {
  margin-bottom: 1.15rem;
}

.auth-card .btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.5rem;
}

/* =========================================================================
   CALENDARIO MENSUAL DE RESERVAS PARA ALUMNAS
   ========================================================================= */
.calendar-view-toggle-bar {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-subtle);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-light);
  width: fit-content;
}

.calendar-toggle-btn {
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.calendar-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.monthly-calendar-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.monthly-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.monthly-calendar-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: capitalize;
}

.calendar-nav-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  color: var(--primary-dark);
}

.calendar-nav-btn:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-light);
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-week-day-title {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.4rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-day-cell {
  min-height: 72px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.4rem;
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-day-cell:hover:not(.other-month):not(.disabled) {
  border-color: var(--primary-light);
  background: var(--primary-subtle);
  transform: translateY(-1px);
}

.calendar-day-cell.other-month {
  opacity: 0.3;
  cursor: default;
  background: var(--bg-subtle);
}

.calendar-day-cell.disabled,
.calendar-day-cell.past-day {
  opacity: 0.42;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.calendar-day-cell.past-day .calendar-day-number {
  color: #94a3b8;
}

/* Día de Hoy Destacado en Turquesa / Aqua Brillante */
.calendar-day-cell.today {
  border: 2px solid var(--primary) !important;
  background: linear-gradient(135deg, rgba(14, 154, 167, 0.14) 0%, rgba(14, 154, 167, 0.24) 100%) !important;
  box-shadow: 0 0 10px rgba(14, 154, 167, 0.3);
}

.calendar-day-cell.today .calendar-day-number {
  color: var(--primary-dark);
  font-weight: 800;
}

.calendar-today-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--primary);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 3px rgba(14, 154, 167, 0.4);
}

/* Día de Vencimiento / Renovación del Plan en Coral / Rosa Intenso */
.calendar-day-cell.plan-expiry {
  border: 2px dashed var(--accent-coral) !important;
  background: linear-gradient(135deg, rgba(232, 67, 147, 0.14) 0%, rgba(214, 48, 49, 0.2) 100%) !important;
  box-shadow: 0 0 10px rgba(232, 67, 147, 0.25);
}

.calendar-day-cell.plan-expiry .calendar-day-number {
  color: var(--accent-coral);
  font-weight: 800;
}

.calendar-expiry-badge {
  font-size: 0.6rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-coral) 0%, #d63031 100%);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 3px rgba(232, 67, 147, 0.4);
}

.calendar-day-cell.selected {
  border-color: var(--primary-dark) !important;
  background: var(--primary-subtle) !important;
  box-shadow: 0 0 0 2px var(--primary);
}

.calendar-day-cell.has-classes {
  border-color: var(--secondary-light);
}

.calendar-day-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.calendar-class-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.calendar-selected-summary {
  background: linear-gradient(135deg, rgba(14, 154, 167, 0.06) 0%, rgba(232, 67, 147, 0.06) 100%);
  border-left: 4px solid var(--primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Tarjeta Compacta y Elegante de Horarios (Con Instructora) */
.schedule-card-clean {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.schedule-card-clean:hover {
  border-color: var(--primary-light);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.schedule-card-clean .card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.schedule-card-clean .discipline-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0.15rem 0 0.25rem 0;
}

.schedule-card-clean .instructor-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.schedule-card-clean .book-class-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

/* =========================================================================
   BOTÓN HAMBURGER Y BACKDROP PARA DISPOSITIVOS MÓVILES Y TABLETS
   ========================================================================= */
.mobile-menu-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.55rem;
  color: var(--primary-dark);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-right: 0.25rem;
}

.mobile-menu-toggle-btn:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-light);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%; right: 0;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* =========================================================================
   SISTEMA DE DISEÑO RESPONSIVO MULTIPLATAFORMA (MÓVILES, TABLETS, LAPTOPS, PC)
   ========================================================================= */

/* 1. Laptops y Pantallas Medianas (hasta 1200px) */
@media (max-width: 1200px) {
  .student-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.5rem;
  }
  .app-content {
    padding: 1.5rem;
  }
  .active-plan-meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

/* 2. Tablets y Pantallas Táctiles (hasta 992px) */
@media (max-width: 992px) {
  .mobile-menu-toggle-btn {
    display: inline-flex;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: -290px;
    width: 280px;
    height: 100vh;
    z-index: 200;
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.18);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-sidebar.mobile-open {
    left: 0;
  }

  .app-main {
    width: 100%;
    margin-left: 0;
  }

  .app-topbar {
    padding: 0.85rem 1.25rem;
  }

  .topbar-left h1 {
    font-size: 1.15rem;
  }

  .topbar-left p {
    display: none;
  }

  .student-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }
}

/* 3. Tablets en Vertical y Celulares (hasta 768px) */
@media (max-width: 768px) {
  .app-content {
    padding: 1rem;
  }

  .active-plan-card {
    padding: 1.35rem;
  }

  .active-plan-name {
    font-size: 1.45rem;
  }

  .active-plan-meta-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .plan-meta-box {
    padding: 0.75rem 1rem;
  }

  .smart-lock-card {
    padding: 1.5rem 1rem;
  }

  .lock-pin-code {
    font-size: 1.9rem;
    letter-spacing: 0.2em;
  }

  /* Calendario Móvil */
  .monthly-calendar-container {
    padding: 0.75rem;
  }

  .calendar-days-grid {
    gap: 3px;
  }

  .calendar-day-cell {
    min-height: 48px;
    padding: 0.25rem;
  }

  .calendar-day-number {
    font-size: 0.75rem;
  }

  .calendar-class-pill {
    font-size: 0.58rem;
    padding: 0.1rem 0.2rem;
  }

  .calendar-today-badge,
  .calendar-expiry-badge {
    display: none;
  }

  .schedule-card-clean {
    padding: 0.75rem 0.9rem;
  }

  /* Tablas Responsivas */
  .table-responsive,
  .data-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }

  .table {
    min-width: 540px;
  }

  /* Modales en Móvil */
  .modal-box {
    width: 94% !important;
    max-width: 94% !important;
    margin: 1rem;
    padding: 1.25rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .topbar-user .user-details {
    display: none;
  }
}

/* 4. Celulares Pequeños (hasta 480px) */
@media (max-width: 480px) {
  .topbar-left h1 {
    font-size: 0.98rem;
  }

  .active-plan-card {
    padding: 1.15rem;
  }

  .count-remaining {
    font-size: 1.6rem;
  }

  .active-plan-top-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
  }
}

