/* gym Client Interface Styles */

/* Authentication Styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.auth-brand-logo {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.auth-brand-title {
  font-family: 'IM Fell English SC', 'Cinzel', serif;
  color: #123c27;
  margin: 0;
  font-size: 2.1rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.08rem;
  text-align: left;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-brand-title span {
  display: block;
}

.auth-header p {
  color: #6c757d;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.forgot-password {
  margin: 0 auto 24px;
  text-align: center;
}

.link-button {
  background: none;
  border: none;
  color: #1f5130;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.95rem;
}

.forgot-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  text-align: left;
  animation: fadeIn 0.2s ease;
}

.forgot-panel p {
  color: #475467;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.btn.btn-secondary {
  width: 100%;
  margin-top: 4px;
  background: linear-gradient(135deg, #1f5130 0%, #2c7a4f 100%);
  color: #fff;
}

.auth-info {
  min-height: 20px;
  margin-top: 10px;
  font-size: 0.9rem;
  text-align: center;
}

.auth-info.success {
  color: #117a36;
}

.auth-info.error {
  color: #c53030;
}

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

.auth-form {
  display: none;
  text-align: left;
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  color: #333;
  margin-bottom: 24px;
  text-align: center;
  font-weight: 600;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .form-group label {
  color: #495057;
  font-weight: 500;
  margin-bottom: 8px;
}

.auth-form .form-group input {
  padding: 14px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
}

.auth-form .form-group input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-form .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.auth-error {
  margin-top: 15px;
  color: #dc3545;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
}

.auth-switch a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Dashboard Styles */
/* Removed - using trainer-dashboard class now */

/* Dashboard header styles inherited from trainer.css */

.dashboard-header h1 {
  color: #333;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0;
}

.user-welcome {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.user-welcome span {
  font-size: 1.1rem;
  color: #495057;
  font-weight: 500;
}

/* Client-specific stat cards with motivational colors */
/* Stat cards with stronger contrast on gradients */
.stats-grid .stat-card:nth-child(1) {
  background: linear-gradient(135deg, #1f8e3a 0%, #10b981 100%);
  color: #ffffff;
}

.stats-grid .stat-card:nth-child(2) {
  background: linear-gradient(135deg, #f59f00 0%, #f76707 100%);
  color: #ffffff;
}

.stats-grid .stat-card:nth-child(3) {
  background: linear-gradient(135deg, #0ea5b7 0%, #6d28d9 100%);
  color: #ffffff;
}

.stats-grid .stat-card .stat-info h3 {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

/* Ensure subtitle text is readable on gradient backgrounds */
.stats-grid .stat-card .stat-info p {
  color: #ffffff;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Icon contrast tweak */
.stats-grid .stat-card .stat-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25)); }

/* Upcoming Sessions */
.upcoming-sessions {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.upcoming-sessions h2 {
  color: #333;
  margin-bottom: 20px;
  font-weight: 600;
}

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 2px solid #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.session-item:hover {
  border-color: #667eea;
  background: #f8f9fd;
}

.session-info {
  flex-grow: 1;
}

.session-info h4 {
  color: #333;
  margin-bottom: 4px;
  font-weight: 600;
}

.session-info p {
  color: #6c757d;
  margin: 0;
  font-size: 14px;
}

.session-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.session-status.scheduled {
  background: #e3f2fd;
  color: #1976d2;
}

.session-status.completed {
  background: #e8f5e8;
  color: #2e7d32;
}

.session-status.missed {
  background: #ffebee;
  color: #c62828;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  margin-bottom: 8px;
  color: #495057;
}

.empty-state p {
  margin-bottom: 20px;
}

/* Profile Page Styles */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.profile-header {
  text-align: center;
  margin-bottom: 30px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  margin: 0 auto 16px;
}

.profile-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 4px;
  overflow-x: auto;
}

.profile-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.profile-tab:hover { background: #f1f5f9; color: #374151; }

.profile-tab.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff; /* testo bianco per leggibilità */
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Calendar Styles */
.calendar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

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

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.calendar-nav button:not(.btn) {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.calendar-nav .btn { box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.calendar-nav .btn.btn-blue { color: #fff; }
.calendar-nav .btn.btn-amber { color: #fff; }
.calendar-nav button:not(.btn):hover {
  border-color: #667eea;
  color: #667eea;
}

.calendar-month {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.calendar-day-header {
  text-align: center;
  font-weight: 600;
  color: #475569;
  padding: 8px 0;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 6px;
}

.calendar-day {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-height: 90px;
  padding: 8px;
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.calendar-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.calendar-day.other-month {
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  color: #94a3b8;
}

.calendar-day.today {
  outline: 2px solid #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.calendar-day.has-workout { /* Remove custom border styling */ }

.day-number {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  color: #64748b;
}

/* Match trainer calendar event-pill styling exactly */
.workout-indicator {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #3730a3;
  border: 1px solid #c7d2fe;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: grab;
  width: 100%;
  min-height: 22px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.workout-indicator:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.workout-indicator.completed { 
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border-color: #86efac;
}

/* Responsive Design for Client Interface */
@media (max-width: 768px) {
  .auth-card {
    padding: 30px 20px;
    margin: 10px;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .user-welcome {
    justify-content: center;
  }
  
  .profile-tabs {
    flex-wrap: wrap;
  }
  
  .calendar-grid {
    font-size: 14px;
  }
  
  .calendar-day {
    min-height: 80px;
    padding: 4px;
  }
}

/* Global Buttons for user pages (align with trainer styles) */
/* Button styles (.btn, .btn-primary, .btn-secondary, .btn-sm) deduplicated: use shared.css */

@media (max-width: 480px) {
  .auth-container {
    padding: 10px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    grid-template-columns: 1fr;
  }
}
