/* ============================================================
   COMPONENTES UI: FITTRACK PWA
   ============================================================ */

/* 1. Header Superior & Banner Offline */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 14px 0;
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 16px;
  gap: 10px;
}

.header-top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.brand-badge {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.offline-badge {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}
.offline-badge.visible {
  display: inline-flex;
}

/* 2. Tarjetas (Cards) */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, background-color 0.2s;
}

.card:hover {
  background: var(--bg-card);
}

.card-clickable {
  cursor: pointer;
}
.card-clickable:active {
  transform: scale(0.985);
  border-color: var(--color-primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

/* 3. Botones Ergonómicos (Fat-finger friendly) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-min-height);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
}

.btn-accent {
  background: var(--color-accent);
  color: #121212;
  font-weight: 700;
}

.btn-danger {
  background: var(--color-danger);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* 4. Formularios e Inputs Móviles */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-control {
  width: 100%;
  min-height: var(--touch-min-height);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
  outline: none;
}

/* 5. Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-premium {
  background: rgba(255, 179, 0, 0.16);
  color: #FFB300;
  border: 1px solid rgba(255, 179, 0, 0.4);
}

.badge-free {
  background: rgba(100, 116, 139, 0.2);
  color: #94A3B8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-success {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

/* 6. Barra de Navegación Inferior (Bottom Navigation) */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(18, 23, 33, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: var(--safe-bottom);
  height: calc(var(--nav-height) + var(--safe-bottom));
  max-width: 600px;
  margin: 0 auto;
  pointer-events: auto !important;
  box-sizing: border-box;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  gap: 4px;
  transition: color 0.15s, transform 0.1s;
  cursor: pointer;
  pointer-events: auto !important;
  background: transparent;
  border: none;
  padding: 6px 0;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
  position: relative;
  z-index: 10;
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-item * {
  pointer-events: none;
}

.nav-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* 7. Mini Timer Flotante Persistente */
#mini-timer-bar {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 32px);
  max-width: 568px;
  background: linear-gradient(135deg, #1f2737, #131822);
  border: 1px solid var(--color-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 179, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#mini-timer-bar.active {
  display: flex;
  transform: translateX(-50%) translateY(0);
}

.mini-timer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-timer-clock {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-accent);
}

/* 8. Toasts de Notificación */
#toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  z-index: 6000; /* Siempre por encima de modales y menús */
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: slideInDown 0.25s ease-out;
}

.toast-success { border-color: var(--color-primary); color: #00E676; }
.toast-error   { border-color: var(--color-danger); color: #FF5252; }
.toast-warning { border-color: var(--color-accent); color: #FFB300; }

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Modal Overlay - Siempre en primer plano sobre cualquier menú */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5000; /* Siempre sobre la barra de abajo (3000) y drawer (4000) */
  display: flex;
  align-items: center; /* Centrado y flotante en todas las pantallas */
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.7);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* Items de ejercicios dentro del modal interactivo */
.modal-exercise-item {
  width: 100%;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  display: block;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-exercise-item * {
  pointer-events: none;
}

/* Botón de cierre ergonómico para todos los modales (Touch target de 44x44px) */
.modal-close-icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0;
  margin: -6px -6px 0 0;
  line-height: 1;
  transition: color 0.15s, background-color 0.15s, transform 0.1s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  pointer-events: auto !important;
}

.modal-close-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.modal-close-icon-btn:active {
  transform: scale(0.9);
}

/* Tarjetas interactivas de selección dentro de modales */
.modal-choice-card {
  width: 100%;
  text-align: left;
  padding: 16px;
  margin: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  display: block;
  pointer-events: auto !important;
}

.modal-choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.modal-choice-card:active {
  transform: scale(0.97);
}

.modal-choice-card * {
  pointer-events: none;
}

/* Banner de Entrenamiento en Curso */
.active-workout-banner {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.14), var(--bg-surface));
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.15);
  position: relative;
  z-index: 2;
}

.active-workout-banner button {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto !important;
  cursor: pointer;
}

/* 9. Calendario Interactivo de Bitácora */
.calendar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-month-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: capitalize;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-weekday {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
  text-transform: uppercase;
}

.calendar-day-btn {
  position: relative;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
}

.calendar-day-btn:active {
  transform: scale(0.92);
}

.calendar-day-btn.empty {
  visibility: hidden;
  pointer-events: none;
}

.calendar-day-btn.today {
  border: 1px dashed var(--color-primary);
}

.calendar-day-btn.has-activity {
  background: var(--bg-card);
}

.calendar-day-btn.selected {
  background: var(--color-primary) !important;
  color: var(--text-inverse) !important;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.45);
}

.activity-dot {
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
}

.calendar-day-btn.selected .activity-dot {
  background: var(--text-inverse);
}

/* ============================================================
   8. NUEVAS FUNCIONALIDADES: PRs, WhatsApp, Racha, Buscador, 1RM
   ============================================================ */

/* 8.1 Badge de Récord Personal (PR) */
.badge-pr {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.15));
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  animation: pulsePr 2.5s ease-in-out infinite;
}

@keyframes pulsePr {
  0%, 100% { box-shadow: 0 0 4px rgba(251, 191, 36, 0.2); }
  50% { box-shadow: 0 0 12px rgba(251, 191, 36, 0.55); }
}

/* 8.2 Botón de Compartir por WhatsApp */
.btn-whatsapp {
  background: #25D366 !important;
  color: #062b11 !important;
  border: 1px solid #1ebe5d !important;
  font-weight: 700 !important;
  text-shadow: none;
}
.btn-whatsapp:hover, .btn-whatsapp:active {
  background: #20bd5a !important;
  color: #031c0a !important;
  transform: scale(0.98);
}

/* 8.3 Widget Semanal de Rendimiento y Racha */
.weekly-widget {
  background: linear-gradient(145deg, #111a28 0%, #0b1120 100%);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.weekly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.weekly-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
  margin-bottom: 12px;
}

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

.weekly-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  font-size: 0.72rem;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
}

.weekly-day-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-2px);
}

.weekly-day-pill:active {
  transform: scale(0.95);
}

.weekly-day-pill.completed {
  background: rgba(0, 230, 118, 0.16);
  border-color: rgba(0, 230, 118, 0.45);
  color: var(--color-primary);
  font-weight: 700;
}

.weekly-day-pill.today {
  border-color: var(--color-accent);
}

.weekly-day-pill.selected {
  background: linear-gradient(180deg, rgba(0, 230, 118, 0.3), rgba(0, 230, 118, 0.12)) !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.5);
  transform: translateY(-4px) scale(1.06);
  color: var(--color-primary);
  font-weight: 800;
}

/* Modal / Tarjeta Flotante Sobrepuesta de Detalle del Día Semanal */
.weekly-day-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInOverlay 0.2s ease-out;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.weekly-day-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 230, 118, 0.15);
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 8.4 Buscador en Tiempo Real */
.search-bar-wrap {
  position: relative;
  margin-bottom: 12px;
  width: 100%;
}

.search-bar-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-left: 38px;
  padding-right: 14px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar-wrap input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.25);
  outline: none;
}

.search-bar-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

/* ============================================================
   8.4.1 Creador de Rutinas Modal Rediseñado (Mobile-First UX)
   ============================================================ */
.routine-modal-content {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  max-height: 90vh !important;
  width: 100% !important;
  max-width: 560px !important;
}

.routine-modal-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: var(--bg-surface);
}

.routine-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.routine-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.45);
}

.filter-chips-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.routine-filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.routine-filter-chip:active {
  transform: scale(0.95);
}

.routine-filter-chip.active {
  background: rgba(0, 230, 118, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}

.routine-create-ej-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  margin-bottom: 8px;
}

.routine-create-ej-item.selected {
  border-color: var(--color-primary);
  background: rgba(0, 230, 118, 0.06);
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.14);
}

.routine-create-ej-item .routine-ej-toggle-btn {
  padding: 4px 10px;
  font-size: 0.76rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
}

/* 8.5 Pestañas y Asistente 1RM / Discos */
.calc-tabs {
  display: flex;
  background: var(--bg-card);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.calc-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.calc-tab-btn.active {
  background: var(--color-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.plate-calc-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080d1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 24px 12px;
  margin: 16px 0;
  overflow-x: auto;
}

.bar-sleeve {
  height: 14px;
  background: linear-gradient(180deg, #94a3b8 0%, #475569 100%);
  border-radius: 2px;
  min-width: 30px;
}

.plate-disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 900;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  margin: 0 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.3);
}

.plate-25 { height: 110px; width: 22px; background: #dc2626; } /* Rojo */
.plate-20 { height: 100px; width: 20px; background: #2563eb; } /* Azul */
.plate-15 { height: 86px;  width: 18px; background: #eab308; color: #1e293b !important; text-shadow: none; } /* Amarillo */
.plate-10 { height: 72px;  width: 16px; background: #16a34a; } /* Verde */
.plate-5  { height: 56px;  width: 14px; background: #f8fafc; color: #0f172a !important; text-shadow: none; } /* Blanco */
.plate-2-5 { height: 44px; width: 12px; background: #1e293b; border-color: #64748b; } /* Negro */
.plate-1-25 { height: 36px; width: 10px; background: #64748b; } /* Gris */

/* Fecha y Hora en Header Superior (Al lado de la versión) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.header-calc-btn {
  height: 32px;
  box-sizing: border-box;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--color-accent);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
  user-select: none;
}
.header-calc-btn:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--color-accent);
}
.header-calc-btn:active {
  transform: scale(0.97);
}

.header-datetime-badge {
  height: 32px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0 10px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  user-select: none;
}

.header-date-short {
  display: inline;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
}

.header-date-sep {
  color: var(--text-muted);
  opacity: 0.4;
  font-size: 0.7rem;
}

.header-time {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.78rem;
}

.live-time-dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--color-primary);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.btn-refresh {
  height: 32px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
  user-select: none;
}
.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-primary);
}
.btn-refresh:active {
  transform: scale(0.97);
}

.btn-refresh .version-tag {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.72rem;
}

.header-menu-btn {
  height: 32px;
  width: 32px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
  user-select: none;
  flex-shrink: 0;
}
.header-menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-primary);
}
.header-menu-btn:active {
  transform: scale(0.95);
}

/* Responsividad Header */
@media (max-width: 560px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 0 12px 0;
  }
  .header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .brand-title {
    font-size: 1.15rem;
  }
  .header-actions {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  .header-calc-btn {
    flex-shrink: 0;
  }
  .header-datetime-badge {
    flex: 1;
    justify-content: center;
  }
  .btn-refresh {
    flex-shrink: 0;
  }
}

@media (max-width: 380px) {
  .header-calc-btn,
  .header-datetime-badge,
  .btn-refresh,
  .header-menu-btn {
    height: 30px;
    padding: 0 6px;
    font-size: 0.7rem;
    gap: 4px;
  }
  .header-date-short,
  .header-date-sep {
    display: none;
  }
}

/* 8.6 Medidor Visual de IMC */
.imc-gauge-container {
  position: relative;
  margin: 18px 0 10px 0;
}

.imc-gauge-bar {
  height: 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, 
    #38bdf8 0%, #38bdf8 25%, 
    #00E676 25%, #00E676 55%, 
    #FFB300 55%, #FFB300 80%, 
    #FF5252 80%, #FF5252 100%
  );
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.imc-gauge-pointer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.imc-pointer-pin {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #ffffff;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.8));
}

.imc-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
}

.imc-category-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.85rem;
  margin-top: 4px;
}

.imc-advice-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 14px;
}

.imc-advice-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.imc-advice-item:last-child {
  margin-bottom: 0;
}

/* ============================================================
   7. MENÚ LATERAL DESLIZABLE (DRAWER MENU)
   ============================================================ */
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 4000;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.drawer-backdrop.open {
  display: block !important;
}

.app-drawer {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 84%;
  max-width: 320px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 4001;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.6);
  padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px) 16px;
  box-sizing: border-box;
}

.app-drawer.open {
  display: flex !important;
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-muted);
}

.drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--text-inverse);
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.drawer-user-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.drawer-user-role {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-top: 2px;
}

.drawer-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}

.drawer-close-btn:hover,
.drawer-close-btn:active {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 6px;
}

.drawer-menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 230, 118, 0.15);
  font-family: inherit;
  transition: background 0.15s, color 0.15s, transform 0.08s;
  box-sizing: border-box;
}

.drawer-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.drawer-menu-item:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.14);
}

.drawer-menu-item.active {
  background: var(--color-primary-soft) !important;
  color: var(--color-primary) !important;
  border-color: rgba(0, 230, 118, 0.3) !important;
}

.drawer-menu-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drawer-menu-badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.drawer-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-app-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0 4px;
}

/* ============================================================
   8. PANEL DE ENTRENADOR PRO (FORMATO PC & MÓVIL RESPONSIVE)
   ============================================================ */

/* Expansión del contenedor en pantallas de escritorio para el Entrenador */
#app-container.trainer-wide-mode {
  max-width: 1400px;
  transition: max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 992px) {
  #app-container.trainer-wide-mode {
    padding-left: 28px;
    padding-right: 28px;
  }
}

.trainer-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.trainer-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.trainer-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.trainer-kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.trainer-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.trainer-kpi-val {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.trainer-kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trainer-dashboard-container {
  width: 100%;
  box-sizing: border-box;
  padding-bottom: calc(var(--nav-height, 65px) + 50px);
}

/* Layout Split-Screen Desktop & Responsivo Móvil */
.trainer-pc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 992px) {
  .trainer-pc-layout {
    grid-template-columns: 360px 1fr;
  }
}

@media (min-width: 1200px) {
  .trainer-pc-layout {
    grid-template-columns: 400px 1fr;
  }
}

@media (max-width: 991px) {
  .trainer-pc-layout {
    display: block;
  }
  .trainer-clients-sidebar.hide-on-mobile-detail {
    display: none !important;
  }
  .trainer-detail-panel.hide-on-mobile-list {
    display: none !important;
  }
  .trainer-clients-sidebar,
  .trainer-detail-panel {
    width: 100%;
    max-width: 100%;
  }
}

/* Columna Izquierda: Directorio de Alumnos */
.trainer-clients-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trainer-sidebar-search {
  position: relative;
}

.trainer-sidebar-search input {
  padding-left: 36px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  background: var(--bg-primary);
}

.trainer-sidebar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.trainer-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.trainer-filter-pill {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.trainer-filter-pill.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.trainer-client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 340px);
  overflow-y: auto;
  padding-right: 4px;
}

.trainer-client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.trainer-client-card:hover {
  border-color: rgba(0, 230, 118, 0.35);
  background: rgba(0, 230, 118, 0.03);
  transform: translateX(3px);
}

.trainer-client-card.active {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.12), rgba(0, 230, 118, 0.03));
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.15);
}

.trainer-client-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--text-inverse);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.trainer-client-info {
  flex: 1;
  min-width: 0;
}

.trainer-client-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trainer-client-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.trainer-client-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Columna Derecha: Expediente del Alumno */
.trainer-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.trainer-profile-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.trainer-profile-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-primary);
}

.trainer-profile-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trainer-profile-avatar-lg {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--text-inverse);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.3);
  flex-shrink: 0;
}

.trainer-phone-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.trainer-phone-input {
  max-width: 180px;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
}

/* Tarjeta Inteligente de WhatsApp */
.trainer-wsp-box {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.08), rgba(18, 23, 33, 0.95));
  border: 1px solid rgba(37, 211, 102, 0.28);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.trainer-wsp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.trainer-wsp-templates {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.trainer-wsp-tpl-btn {
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.25);
  color: #25D366;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.trainer-wsp-tpl-btn:hover, .trainer-wsp-tpl-btn.active {
  background: #25D366;
  color: #0c1e14;
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.4);
}

.trainer-wsp-textarea {
  width: 100%;
  min-height: 85px;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid rgba(37, 211, 102, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.45;
  resize: vertical;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.trainer-wsp-textarea:focus {
  border-color: #25D366;
  outline: none;
  box-shadow: 0 0 12px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp-send {
  background: #25D366;
  color: #062b16;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-whatsapp-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Tarjetas de Asignación y Avances */
.trainer-section-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.trainer-assign-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  align-items: center;
}

.trainer-assign-select {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
}

.trainer-assigned-routine-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-top: 8px;
}

.trainer-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 10px;
}

.trainer-history-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.trainer-history-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-primary);
}

.trainer-prs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.trainer-pr-pill {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

/* ==========================================================================
   22. DASHBOARD ACTION GRID (Botones Grandes Cuadrados de Acceso Directo)
   ========================================================================== */
.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .dashboard-action-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }
}

.dashboard-action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 125px;
  padding: 16px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-align: left;
  width: 100%;
}

.dashboard-action-card * {
  pointer-events: none;
}

.dashboard-action-card:hover {
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dashboard-action-card:active {
  transform: scale(0.96);
}

/* Temas Cromáticos */
.dashboard-action-card.theme-primary {
  background: linear-gradient(145deg, rgba(0, 230, 118, 0.12) 0%, var(--bg-card) 75%);
  border-color: rgba(0, 230, 118, 0.38);
}
.dashboard-action-card.theme-primary:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(0, 230, 118, 0.22);
}

.dashboard-action-card.theme-info {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.12) 0%, var(--bg-card) 75%);
  border-color: rgba(56, 189, 248, 0.38);
}
.dashboard-action-card.theme-info:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.22);
}

.dashboard-action-card.theme-warning {
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.12) 0%, var(--bg-card) 75%);
  border-color: rgba(251, 191, 36, 0.38);
}
.dashboard-action-card.theme-warning:hover {
  border-color: #fbbf24;
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.22);
}

.dashboard-action-card.theme-purple {
  background: linear-gradient(145deg, rgba(192, 132, 252, 0.12) 0%, var(--bg-card) 75%);
  border-color: rgba(192, 132, 252, 0.38);
}
.dashboard-action-card.theme-purple:hover {
  border-color: #c084fc;
  box-shadow: 0 8px 24px rgba(192, 132, 252, 0.22);
}

.dashboard-action-card.theme-gold {
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.14) 0%, var(--bg-card) 75%);
  border-color: rgba(234, 179, 8, 0.45);
}
.dashboard-action-card.theme-gold:hover {
  border-color: #eab308;
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.25);
}

.dashboard-action-card.theme-teal {
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.12) 0%, var(--bg-card) 75%);
  border-color: rgba(20, 184, 166, 0.38);
}
.dashboard-action-card.theme-teal:hover {
  border-color: #14b8a6;
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.22);
}

/* Elementos Internos */
.dashboard-action-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.dashboard-action-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.theme-primary .dashboard-action-icon-box {
  background: rgba(0, 230, 118, 0.16);
  color: var(--color-primary);
}
.theme-info .dashboard-action-icon-box {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
}
.theme-warning .dashboard-action-icon-box {
  background: rgba(251, 191, 36, 0.16);
  color: #fbbf24;
}
.theme-purple .dashboard-action-icon-box {
  background: rgba(192, 132, 252, 0.16);
  color: #c084fc;
}
.theme-gold .dashboard-action-icon-box {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
}
.theme-teal .dashboard-action-icon-box {
  background: rgba(20, 184, 166, 0.16);
  color: #14b8a6;
}

.dashboard-action-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 6px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.theme-primary .dashboard-action-badge {
  background: rgba(0, 230, 118, 0.18);
  color: var(--color-primary);
}
.theme-info .dashboard-action-badge {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}
.theme-warning .dashboard-action-badge {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
}
.theme-purple .dashboard-action-badge {
  background: rgba(192, 132, 252, 0.18);
  color: #c084fc;
}
.theme-gold .dashboard-action-badge {
  background: rgba(234, 179, 8, 0.22);
  color: #eab308;
}
.theme-teal .dashboard-action-badge {
  background: rgba(20, 184, 166, 0.18);
  color: #14b8a6;
}

.dashboard-action-body {
  display: flex;
  flex-direction: column;
}

.dashboard-action-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-bottom: 2px;
  color: var(--text-primary);
  line-height: 1.2;
}

.dashboard-action-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.25;
}





