/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #334155;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.dashboard-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #3b82f6 100%);
  color: #ffffff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(147, 197, 253, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.dashboard-header h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #bfdbfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-header p {
  font-size: 18px;
  color: #bfdbfe;
  margin-bottom: 24px;
  font-weight: 500;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 24px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name {
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
}

.user-email {
  font-size: 13px;
  color: #bfdbfe;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-logout {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-left: 12px;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* Flash Messages */
.flash-messages {
  margin: 20px auto;
  max-width: 1200px;
  padding: 0 24px;
}

.flash {
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

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

.flash-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.flash-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.flash-icon {
  font-weight: bold;
  font-size: 18px;
}

/* Dashboard Container */
.dashboard-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

/* Section */
.dashboard-section {
  background: #ffffff;
  border-radius: 20px;
  padding: 48px;
  margin-bottom: 40px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-section:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.06);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-icon {
  font-size: 42px;
  margin-bottom: 16px;
  display: inline-block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-header p {
  font-size: 17px;
  color: #64748b;
  font-weight: 500;
}

/* Modules Grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.module-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.module-card:hover::before {
  transform: scaleX(1);
}

.module-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
  border-color: #bfdbfe;
}

.module-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.module-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.3;
}

.module-card p {
  font-size: 15px;
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.6;
}

.module-duration {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #3b82f6;
  background: #eff6ff;
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.module-link {
  display: inline-block;
  color: #2563eb;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.module-link:hover {
  color: #1d4ed8;
  transform: translateX(4px);
}

/* Services */
.services-content {
  text-align: center;
}

.services-content p {
  font-size: 16px;
  margin-bottom: 28px;
  color: #475569;
  line-height: 1.7;
}

.services-list {
  list-style: none;
  margin: 24px auto;
  max-width: 600px;
  text-align: left;
}

.services-list li {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 15px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s ease;
  border-radius: 8px;
}

.services-list li:hover {
  background: #f8fafc;
}

.services-list li:last-child {
  border-bottom: none;
}

.service-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

/* Forms */
.training-form,
.team-form {
  max-width: 640px;
  margin: 40px auto 0;
  padding: 32px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.training-form h3,
.team-form h3 {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 24px;
  text-align: center;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #94a3b8;
}

.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  font-size: 12px;
}

/* Footer */
.dashboard-footer {
  text-align: center;
  padding: 40px 0;
  color: #64748b;
  font-size: 14px;
  border-top: 1px solid #e2e8f0;
  margin-top: 40px;
  background: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 40px 0;
  }

  .dashboard-header h1 {
    font-size: 28px;
  }

  .dashboard-header p {
    font-size: 16px;
  }

  .user-badge {
    flex-direction: column;
    text-align: center;
  }

  .btn {
    width: 100%;
    margin: 8px 0 0 0;
  }

  .dashboard-section {
    padding: 32px 24px;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .modules-grid {
    grid-template-columns: 1fr;
  }

  .training-form,
  .team-form {
    padding: 24px;
  }
}



/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 24px;
  border-radius: 8px;
  width: 90%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: #000;
}

/* Ensure module cards can hold the button nicely */
.module-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-card .btn-register {
  margin-top: auto; /* push button to bottom */
}

.register-btn {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.register-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.32);
}

.register-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.register-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}