/**
 * CSS Específico para Templates de Cardio
 * Seguindo o padrão modular do projeto
 */

/* ===== META SEMANAL PREMIUM DESIGN ===== */
.weekly-goal-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fdf8 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(46, 125, 50, 0.1);
  transition: all 0.3s ease;
}

.weekly-goal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(46, 125, 50, 0.12) !important;
}

/* Header com gradiente e efeito de profundidade */
.bg-gradient-cardio {
  background: linear-gradient(135deg, #43a047 0%, #66bb6a 50%, #81c784 100%);
  position: relative;
}

.goal-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.goal-badge .badge {
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Progress Bar Premium */
.progress-container {
  position: relative;
}

.progress-label {
  font-size: 0.85rem;
  letter-spacing: 0.2px;
}

.progress-percentage {
  color: #2e7d32;
  text-shadow: 0 1px 2px rgba(46, 125, 50, 0.1);
  font-size: 0.9rem;
}

.progress-premium {
  position: relative;
  height: 10px;
  border-radius: 18px;
  overflow: visible;
  margin: 0.3rem 0;
}

.progress-track {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f1f8e9 0%, #e8f5e8 100%);
  border-radius: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.progress-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, #43a047 0%, #66bb6a 50%, #81c784 100%);
  border-radius: 20px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(67, 160, 71, 0.3);
  overflow: hidden;
}

.progress-glow {
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-thumb {
  position: absolute;
  top: -4px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #2e7d32, #43a047);
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 12px rgba(46, 125, 50, 0.4);
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.thumb-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Status Section */
.goal-status-text {
  padding: 1rem 0;
  border-radius: 12px;
}

.status-icon {
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

.motivation-text {
  font-style: italic;
  color: #666 !important;
}

/* Stats Cards Premium */
.goal-stats-grid {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  flex: 1;
  background: linear-gradient(135deg, #f8fdf8 0%, #f1f8e9 100%);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Stats Cards Compactas */
.stat-card-compact {
  background: linear-gradient(135deg, #f8fdf8 0%, #f1f8e9 100%);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 10px;
  padding: 0.6rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.stat-card-compact::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(76, 175, 80, 0.05) 0%,
    transparent 50%
  );
  transition: all 0.3s ease;
  transform: scale(0);
}

.stat-card-compact:hover::before {
  transform: scale(1);
}

.stat-card-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
}

.stat-icon-compact {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #43a047, #66bb6a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(67, 160, 71, 0.3);
  flex-shrink: 0;
}

.stat-number-compact {
  font-size: 1.1rem;
  font-weight: 700;
  color: #2e7d32;
  line-height: 1;
  margin-bottom: 0.05rem;
}

.stat-unit-compact {
  font-size: 0.6rem;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.remaining-card .stat-number-compact {
  color: #ff7043;
}

.remaining-card .stat-icon-compact {
  background: linear-gradient(135deg, #ff7043, #ff8a65);
}

.days-card .stat-number-compact {
  color: #42a5f5;
}

.days-card .stat-icon-compact {
  background: linear-gradient(135deg, #42a5f5, #64b5f6);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(76, 175, 80, 0.05) 0%,
    transparent 50%
  );
  transition: all 0.3s ease;
  transform: scale(0);
}

.stat-card:hover::before {
  transform: scale(1);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.3);
}

.stat-icon-bg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #43a047, #66bb6a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(67, 160, 71, 0.3);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2e7d32;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-unit {
  font-size: 0.8rem;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.remaining-card .stat-number {
  color: #ff7043;
}

.remaining-card .stat-icon-bg {
  background: linear-gradient(135deg, #ff7043, #ff8a65);
}

.days-card .stat-number {
  color: #42a5f5;
}

.days-card .stat-icon-bg {
  background: linear-gradient(135deg, #42a5f5, #64b5f6);
}

/* Quick Action Button */
.pulse-btn {
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Quick Action Button Compacto */
.pulse-btn-compact {
  border-radius: 20px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  font-size: 0.9rem;
  box-shadow: 0 3px 12px rgba(13, 110, 253, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pulse-btn::before,
.pulse-btn-compact::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.pulse-btn:hover::before,
.pulse-btn-compact:hover::before {
  left: 100%;
}

.pulse-btn:hover,
.pulse-btn-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

/* Responsive Design */
@media (max-width: 992px) {
  .goal-stats-grid {
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card-compact {
    padding: 0.75rem;
  }

  .progress-premium {
    height: 10px;
  }

  .progress-thumb {
    width: 16px;
    height: 16px;
    top: -3px;
  }
}

@media (max-width: 768px) {
  .weekly-goal-card .card-body {
    padding: 1.5rem;
  }

  .goal-badge .badge {
    font-size: 0.75rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-number-compact {
    font-size: 1.1rem;
  }

  .stat-unit-compact {
    font-size: 0.6rem;
  }

  .pulse-btn-compact {
    font-size: 0.85rem;
    padding: 0.4rem 1.2rem;
  }
}

/* === TEMPLATES SECTION === */
.templates-section {
  background: linear-gradient(135deg, #f8fdf8 0%, #f0f9f0 100%);
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid #e8f5e8;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
}

.templates-section label {
  color: #2d5a2d;
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === TEMPLATE BUTTONS === */
.template-btn {
  position: relative;
  transition: all 0.3s ease;
  min-width: 160px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.6rem 1rem;
  font-weight: 500;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* Gradientes em tons de verde para cardio - progressão de intensidade */
.btn-template-light {
  background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e8 100%);
  color: #2d5a2d;
  border-color: #c3e6cb;
}

.btn-template-light:hover {
  background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
  color: #155724;
  border-color: #b1dfbb;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.btn-template-medium {
  background: linear-gradient(135deg, #e8f5e8 0%, #c3e6cb 100%);
  color: #155724;
  border-color: #a3d9a5;
}

.btn-template-medium:hover {
  background: linear-gradient(135deg, #c3e6cb 0%, #a3d9a5 100%);
  color: #0f4419;
  border-color: #7bc142;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

.btn-template-intense {
  background: linear-gradient(135deg, #c3e6cb 0%, #7bc142 100%);
  color: #ffffff;
  border-color: #6ab04c;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-template-intense:hover {
  background: linear-gradient(135deg, #7bc142 0%, #6ab04c 100%);
  color: #ffffff;
  border-color: #5a9e3a;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}

.template-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.template-btn:active {
  transform: translateY(0);
}

.template-btn i {
  font-size: 1.1rem;
  opacity: 0.8;
}

.template-btn span {
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* Animação de seleção em verde vibrante */
.template-btn.selected {
  animation: templateGlow 0.8s ease;
  background: linear-gradient(135deg, #7bc142 0%, #6ab04c 100%) !important;
  border-color: #5a9e3a !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(123, 193, 66, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.template-btn.selected i {
  color: #ffffff;
  opacity: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes templateGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(123, 193, 66, 0);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(123, 193, 66, 0.5);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(123, 193, 66, 0.4);
  }
}

/* === FORM ENHANCEMENTS === */
.form-control-lg {
  font-size: 1.1rem;
  padding: 0.75rem;
  border-radius: 8px;
}

.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* === BUTTON ENHANCEMENTS === */
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
}

#clear-quick-form:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
  transform: translateY(-1px);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .template-btn {
    min-width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    justify-content: center;
  }

  .templates-section .d-flex {
    flex-direction: column;
  }

  .form-control-lg {
    font-size: 1rem;
  }

  /* Tamanho mínimo para toque em dispositivos móveis */
  .btn {
    min-height: 44px;
  }

  .form-control {
    min-height: 48px;
    font-size: 16px; /* Previne zoom no iOS */
  }

  .templates-section {
    padding: 1rem;
  }

  .template-btn span {
    font-size: 0.95rem;
  }
}

/* === LOADING STATES === */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* === ACCESSIBILITY === */
.template-btn:focus,
.btn:focus,
.form-control:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
  .templates-section {
    background-color: #2b2b2b;
    border-color: #404040;
  }

  .templates-section label {
    color: #ffffff;
  }
}

/* === WEEKLY LOG STYLES === */
.weekly-log-container {
  max-height: 400px;
  overflow-y: auto;
}

.weekly-log-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f9f0;
  transition: background-color 0.2s ease;
}

.weekly-log-item:hover {
  background-color: #f8fdf8;
}

.weekly-log-item:last-child {
  border-bottom: none;
}

.log-date {
  font-weight: 600;
  color: #2d5a2d;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.log-main-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.log-distance {
  font-size: 1.1rem;
  font-weight: 700;
  color: #155724;
}

.log-time {
  font-size: 0.95rem;
  color: #6c757d;
  font-weight: 500;
}

.log-details {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: #6c757d;
}

.log-detail-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.log-detail-item i {
  font-size: 0.8rem;
  opacity: 0.7;
}

.log-actions {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
}

.weekly-log-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.weekly-log-empty i {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

/* Performance indicator */
.log-performance {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.performance-light {
  background-color: #e8f5e8;
  color: #2d5a2d;
}

.performance-moderate {
  background-color: #d4edda;
  color: #155724;
}

.performance-intense {
  background-color: #c3e6cb;
  color: #0f4419;
}

/* Scroll customizado */
.weekly-log-container::-webkit-scrollbar {
  width: 6px;
}

.weekly-log-container::-webkit-scrollbar-track {
  background: #f8fdf8;
}

.weekly-log-container::-webkit-scrollbar-thumb {
  background: #c3e6cb;
  border-radius: 3px;
}

.weekly-log-container::-webkit-scrollbar-thumb:hover {
  background: #a3d9a5;
}

/* ===== QUICK REGISTER PREMIUM COLAPSÁVEL ===== */

/* Card Principal */
.quick-register-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(13, 110, 253, 0.1);
  transition: all 0.3s ease;
}

.quick-register-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(13, 110, 253, 0.12) !important;
}

/* Header Premium */
.bg-gradient-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 50%, #0d6efd 100%);
  position: relative;
}

.register-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 70% 30%,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.cursor-pointer {
  cursor: pointer;
}

.expand-register-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.expand-register-icon.rotated {
  transform: rotate(180deg);
}

/* Título responsivo */
.register-title {
  font-size: 1rem;
}

@media (max-width: 768px) {
  .register-title {
    font-size: 0.85rem;
  }

  .register-title i {
    font-size: 0.9rem;
  }

  .quick-register-card .card-header small {
    font-size: 0.7rem;
  }
}

/* Form Inputs Premium */
.form-control-premium {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.form-control-premium:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
  background: white;
}

.input-group-text {
  border: 2px solid #e9ecef;
  border-left: none;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
  color: #6c757d;
}

.form-control-premium:focus + .input-group-text {
  border-color: #0d6efd;
}

/* Templates Grid Premium */
.templates-section-premium {
  background: linear-gradient(135deg, #f8fbff 0%, #f0f4ff 100%);
  border: 1px solid rgba(13, 110, 253, 0.1);
  border-radius: 12px;
  padding: 1rem;
}

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

/* Template Cards Compactos */
.template-card-compact {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.6rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.template-card-compact::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: left 0.5s;
}

.template-card-compact:hover::before {
  left: 100%;
}

.template-card-compact:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.15);
  border-color: #0d6efd;
}

.template-card-compact.active {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.25);
}

/* Layout interno compacto */
.template-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.template-icon-small {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.template-info {
  flex: 1;
  text-align: left;
}

.template-title-compact {
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.template-data {
  font-size: 0.7rem;
  opacity: 0.85;
  line-height: 1.2;
}

/* Variações de cores compactas */
.template-light {
  border-color: #28a745;
}

.template-light:hover,
.template-light.active {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border-color: #28a745;
  color: white;
}

.template-medium {
  border-color: #ffc107;
}

.template-medium:hover,
.template-medium.active {
  background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
  border-color: #ffc107;
  color: #212529;
}

.template-intense {
  border-color: #dc3545;
}

.template-intense:hover,
.template-intense.active {
  background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
  border-color: #dc3545;
  color: white;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-register-premium {
  flex: 2;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-register-premium::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-register-premium:hover::before {
  left: 100%;
}

.btn-register-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
}

.btn-clear-premium {
  flex: 1;
  border-radius: 20px;
  font-weight: 600;
  border: 2px solid #6c757d;
  transition: all 0.3s ease;
}

.btn-clear-premium:hover {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
  transform: translateY(-2px);
}

/* Preview Footer */
.card-footer {
  border-radius: 0 0 16px 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .templates-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .template-card-compact {
    padding: 0.5rem;
  }

  .template-row {
    gap: 0.5rem;
  }

  .template-icon-small {
    font-size: 1.1rem;
  }

  .template-title-compact {
    font-size: 0.75rem;
  }

  .template-data {
    font-size: 0.65rem;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-register-premium,
  .btn-clear-premium {
    flex: none;
  }
}

/* ===== ESTATÍSTICAS PREMIUM DESIGN ===== */
.stats-premium-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fdff 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(33, 150, 243, 0.1);
  transition: all 0.3s ease;
}

.stats-premium-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(33, 150, 243, 0.12) !important;
}

/* Header com gradiente azul/roxo */
.bg-gradient-stats {
  background: linear-gradient(135deg, #1976d2 0%, #2196f3 50%, #42a5f5 100%);
  position: relative;
}

.stats-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 70% 30%,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  pointer-events: none;
}

/* Cards de estatísticas individuais */
.stat-card-premium {
  background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid rgba(33, 150, 243, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 70px;
}

.stat-card-premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.2);
}

.stat-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #2196f3, #42a5f5);
  border-radius: 0 2px 2px 0;
}

/* Ícones das estatísticas */
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.stat-sessions .stat-icon {
  background: linear-gradient(135deg, #ff9800, #ffc107);
  color: #fff;
}

.stat-distance .stat-icon {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  color: #fff;
}

.stat-average .stat-icon {
  background: linear-gradient(135deg, #2196f3, #42a5f5);
  color: #fff;
}

.stat-time .stat-icon {
  background: linear-gradient(135deg, #9c27b0, #ba68c8);
  color: #fff;
}

/* Conteúdo das estatísticas */
.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1565c0;
  line-height: 1.2;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #424242;
  line-height: 1;
  margin-bottom: 1px;
}

.stat-sublabel {
  font-size: 0.65rem;
  color: #757575;
  line-height: 1;
}

/* Card de insight */
.stats-insight {
  margin-top: 8px;
}

.insight-card {
  background: linear-gradient(135deg, #fff3e0 0%, #fffbf3 100%);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}

.insight-text {
  color: #e65100;
  font-weight: 500;
}

/* Responsividade para estatísticas */
@media (max-width: 768px) {
  .stat-card-premium {
    min-height: 65px;
    padding: 10px;
  }
  
  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    margin-right: 10px;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .stat-sublabel {
    font-size: 0.6rem;
  }
  
  .insight-card {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .stats-premium-card .card-header h6 {
    font-size: 0.9rem;
  }
  
  .stats-premium-card .card-header small {
    font-size: 0.7rem;
  }
  
  .stat-value {
    font-size: 0.95rem;
  }
}

/* ===== HISTÓRICO SEMANAL PREMIUM DESIGN ===== */
.weekly-history-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(156, 39, 176, 0.1);
  transition: all 0.3s ease;
}

.weekly-history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(14, 165, 233, 0.12) !important;
}

/* Header com gradiente azul-teal */
.bg-gradient-history {
  background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
  position: relative;
}

.history-header-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
  pointer-events: none;
}

/* Container do log premium */
.weekly-log-premium {
  min-height: 120px;
  position: relative;
}

/* Loading premium */
.loading-premium {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
}

.spinner-premium {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(14, 165, 233, 0.1);
  border-top: 3px solid #0ea5e9;
  border-radius: 50%;
  animation: premium-spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes premium-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text p {
  color: #0ea5e9;
  margin: 0;
}

/* Resumo da semana */
.week-summary {
  margin-top: 12px;
}

.summary-card {
  background: linear-gradient(135deg, #f3e5f5 0%, #fce4ec 100%);
  border: 1px solid rgba(156, 39, 176, 0.15);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.summary-card:hover {
  background: linear-gradient(135deg, #f1e4f3 0%, #fae2ea 100%);
  border-color: rgba(156, 39, 176, 0.25);
}

.summary-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #9c27b0, #ba68c8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.summary-content {
  flex: 1;
}

.summary-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a148c;
  margin-bottom: 4px;
}

.summary-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.summary-stat {
  color: #6a1b9a;
}

.summary-stat strong {
  color: #4a148c;
}

.summary-divider {
  color: #ba68c8;
  font-weight: bold;
}

/* Anel de progresso da semana */
.week-progress-ring {
  position: relative;
  width: 40px;
  height: 40px;
}

.week-progress-ring svg {
  transform: rotate(-90deg);
}

.progress-bg {
  fill: none;
  stroke: rgba(156, 39, 176, 0.1);
  stroke-width: 2;
}

.progress-fill {
  fill: none;
  stroke: #9c27b0;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 94;
  stroke-dashoffset: 94;
  transition: stroke-dashoffset 0.8s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: #7b1fa2;
}

/* Cor para ícone purple */
.text-purple {
  color: #0ea5e9 !important;
}

/* Estilos para os itens do histórico - ULTRA COMPACTO */
.weekly-log-premium .log-item,
.weekly-log-item {
  background: linear-gradient(135deg, #ffffff 0%, #fcfcfc 100%);
  border: 1px solid rgba(14, 165, 233, 0.08);
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 0.4rem;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.06);
}

.weekly-log-item:hover {
  border-color: rgba(14, 165, 233, 0.15);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
  transform: translateY(-1px);
}

/* Cabeçalho do Item - Ultra Compacto */
.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(14, 165, 233, 0.06);
}

.log-date {
  color: #0ea5e9;
  font-weight: 600;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
}

.log-date i {
  opacity: 0.8;
  margin-right: 0.15rem;
  font-size: 0.7rem;
}

.log-actions {
  display: flex;
  gap: 0.15rem;
}

/* Conteúdo Principal - Ultra Compacto */
.log-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.log-primary-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  background: rgba(14, 165, 233, 0.02);
  border: 1px solid rgba(14, 165, 233, 0.06);
  border-radius: 6px;
  padding: 0.4rem;
}

.stat-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  min-width: 55px;
}

.stat-value {
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
  line-height: 1;
}

.stat-value.primary {
  font-size: 0.9rem;
  color: #0ea5e9;
}

.stat-value.secondary {
  color: #475569;
  font-size: 0.8rem;
}

.stat-label {
  font-size: 0.6rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  font-weight: 500;
  text-align: center;
  line-height: 1;
}

.stat-separator {
  color: rgba(14, 165, 233, 0.3);
  font-size: 0.9rem;
  font-weight: bold;
}

/* Badge de Performance - Ultra Compacto */
.performance-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  border: 1px solid;
  align-self: center;
  line-height: 1;
}

.performance-badge.leve {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(22, 163, 74, 0.06));
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.15);
}

.performance-badge.moderado {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(245, 158, 11, 0.06));
  color: #d97706;
  border-color: rgba(251, 191, 36, 0.15);
}

.performance-badge.intenso {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(220, 38, 38, 0.06));
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.15);
}

/* Stats Secundárias - Uma Linha com Ícones Alinhados e Centralizados */
.log-secondary-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.6);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  gap: 0.5rem;
  min-height: 2.2rem;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.stat-inline {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: center;
}

.stat-inline i {
  color: #0ea5e9;
  font-size: 0.75rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* Botão de Deletar - Mais Achatado */
.log-btn {
  width: 18px;
  height: 20px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  font-size: 0.65rem;
  transition: all 0.3s ease;
}

.log-btn:hover,
.log-btn-delete:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #991b1b;
  transform: scale(1.05);
}

/* Mobile Responsiveness para histórico - TUDO NA MESMA LINHA */
@media (max-width: 576px) {
  .weekly-log-item {
    padding: 0.5rem;
    margin-bottom: 0.35rem;
  }
  
  .log-header {
    margin-bottom: 0.35rem;
    padding-bottom: 0.25rem;
  }
  
  .log-date {
    font-size: 0.7rem;
  }
  
  .log-content {
    gap: 0.35rem;
  }
  
  .log-primary-stats {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.35rem;
  }
  
  .log-secondary-stats {
    padding: 0.35rem 0.4rem;
    gap: 0.3rem;
    /* FORÇA TUDO NA MESMA LINHA NO MOBILE */
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-height: 2rem;
  }
  
  .stat-group {
    min-width: 50px;
  }
  
  .stat-item {
    flex-shrink: 1;
    min-width: 0;
    height: 100%;
  }
  
  .stat-value {
    font-size: 0.8rem;
  }
  
  .stat-value.primary {
    font-size: 0.85rem;
  }
  
  .stat-value.secondary {
    font-size: 0.75rem;
  }
  
  .stat-label {
    font-size: 0.6rem;
  }
  
  .stat-inline {
    font-size: 0.7rem;
    gap: 0.2rem;
    flex-shrink: 1;
    align-items: center;
  }
  
  .stat-inline i {
    font-size: 0.7rem;
    line-height: 1;
  }
  
  .performance-badge {
    font-size: 0.55rem;
    padding: 0.1rem 0.4rem;
  }
  
  .log-btn {
    width: 16px !important;
    height: 16px !important;
    font-size: 0.55rem !important;
    border-radius: 2px !important;
    padding: 0 !important;
    min-height: 16px !important;
    max-height: 16px !important;
    line-height: 1 !important;
  }
}

.weekly-log-premium .empty-state p {
  color: #ba68c8;
  font-size: 0.85rem;
  margin: 0;
}

/* Responsividade para histórico */
@media (max-width: 768px) {
  .weekly-history-card .card-header h6 {
    font-size: 0.9rem;
  }
  
  .weekly-history-card .card-header small {
    font-size: 0.7rem;
  }
  
  .summary-card {
    padding: 10px 12px;
  }
  
  .summary-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  
  .summary-stats {
    font-size: 0.7rem;
  }
  
  /* Responsividade para layout de 2 linhas */
  .weekly-log-item {
    padding: 5px 8px;
    min-height: 38px;
  }
  
  .weekly-log-item .log-date {
    font-size: 0.7rem;
    margin-bottom: 1px;
  }
  
  .weekly-log-item .log-main-info .d-flex {
    gap: 8px !important;
  }
  
  .weekly-log-item .log-distance {
    font-size: 0.8rem;
  }
  
  .weekly-log-item .log-time {
    font-size: 0.7rem;
  }
  
  .weekly-log-item .log-details {
    gap: 10px;
  }
  
  .weekly-log-item .log-detail-item {
    font-size: 0.65rem;
  }
}

@media (max-width: 576px) {
  /* Mobile com fontes maiores para melhor legibilidade */
  .weekly-log-item {
    padding: 4px 6px;
    min-height: 35px;
    margin-bottom: 2px;
  }
  
  .weekly-log-item .log-date {
    font-size: 0.7rem;
    margin-bottom: 1px;
  }
  
  .weekly-log-item .log-main-info .d-flex {
    gap: 6px !important;
  }
  
  .weekly-log-item .log-distance {
    font-size: 0.8rem;
  }
  
  .weekly-log-item .log-time,
  .weekly-log-item .log-performance {
    font-size: 0.7rem;
  }
  
  .weekly-log-item .log-details {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  
  .weekly-log-item .log-detail-item {
    font-size: 0.65rem;
    white-space: nowrap;
  }
  
  .weekly-log-item .log-btn {
    width: 16px !important;
    height: 16px !important;
    font-size: 0.55rem !important;
    padding: 0 !important;
    border-radius: 2px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    line-height: 1 !important;
  }
}

/* ===== OCULTAR RODAPÉ NO MOBILE ===== */
@media (max-width: 991.98px) {
  .footer-fixed {
    display: none !important;
  }
}

/* ===== MODAL COMPACTO PARA MOBILE ===== */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 1rem 0.5rem;
  }
  
  .modal-sm {
    max-width: calc(100vw - 2rem);
  }
  
  .modal-content {
    border-radius: 12px;
  }
  
  .modal-header {
    padding: 0.75rem 1rem 0.5rem;
  }
  
  .modal-body {
    padding: 0.5rem 1rem;
  }
  
  .modal-footer {
    padding: 0.5rem 1rem 0.75rem;
  }
  
  .modal-title {
    font-size: 0.9rem;
  }
  
  #workout-details {
    font-size: 0.8rem;
    padding: 0.5rem !important;
    border-radius: 8px;
  }
  
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}
