* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
  font-family: 'Poppins', sans-serif; 
  background: linear-gradient(135deg, #667eea, #764ba2); 
  min-height: 100vh; 
  padding: 20px; 
  transition: background 0.3s ease;
}
body.dark-mode {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
}
.container { 
  max-width: 1400px; 
  margin: 0 auto; 
  background: white; 
  border-radius: 20px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.15); 
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
}
body.dark-mode .container {
  background: #1f2937;
  color: #f3f4f6;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
h1 { 
  background: linear-gradient(135deg, #4e6bf0, #764ba2); 
  color: white; 
  text-align: center; 
  padding: 30px; 
  font-size: 2.8em; 
  margin: 0; 
  transition: background 0.3s ease;
}
body.dark-mode h1 {
  background: linear-gradient(135deg, #1d4ed8, #3b0764);
}
#toggle-dark-mode {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #4e6bf0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  z-index: 10;
}
body.dark-mode #toggle-dark-mode {
  background: #374151;
  color: #fff;
  border-color: #60a5fa;
}
#toggle-dark-mode:hover {
  transform: scale(1.05);
}
.form-section { 
  padding: 40px; 
  display: none; 
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.form-section.active { 
  display: block; 
  opacity: 1;
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.input-group { 
  margin-bottom: 25px; 
}
label { 
  display: block; 
  font-weight: 600; 
  color: #4e6bf0; 
  margin-bottom: 8px; 
  transition: color 0.3s ease;
}
body.dark-mode label {
  color: #93c5fd;
}
input { 
  width: 100%; 
  max-width: 320px; 
  padding: 15px; 
  border: 2px solid #e1e5e9; 
  border-radius: 12px; 
  font-size: 16px; 
  transition: all 0.3s ease;
}
body.dark-mode input {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}
input:focus { 
  outline: none; 
  border-color: #4e6bf0; 
  box-shadow: 0 0 0 3px rgba(78, 107, 240, 0.2);
}
body.dark-mode input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.btn-primary, .btn-success, .btn-secondary {
  padding: 16px 36px; 
  border: none; 
  border-radius: 12px; 
  font-size: 1.1em; 
  font-weight: 600; 
  cursor: pointer; 
  margin: 8px 6px;
  min-width: 140px;
  transition: all 0.3s ease;
}
.btn-primary { 
  background: linear-gradient(135deg, #4e6bf0, #667eea); 
  color: white; 
}
body.dark-mode .btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}
.btn-success { 
  background: linear-gradient(135deg, #28a745, #20c997); 
  color: white; 
}
body.dark-mode .btn-success {
  background: linear-gradient(135deg, #15803d, #059669);
}
.btn-secondary { 
  background: #6c757d; 
  color: white; 
}
body.dark-mode .btn-secondary {
  background: #4b5563;
}
.btn-primary:hover, .btn-success:hover, .btn-secondary:hover { 
  transform: translateY(-4px); 
  box-shadow: 0 12px 30px rgba(0,0,0,0.2); 
}
h2 { 
  color: #4e6bf0; 
  margin: 35px 0 20px; 
  font-size: 1.9em; 
  border-left: 5px solid #4e6bf0; 
  padding-left: 15px; 
  transition: all 0.3s ease;
}
body.dark-mode h2 {
  color: #93c5fd;
  border-left-color: #60a5fa;
}
.custom-slot, .break-item {
  background: #f8f9ff; 
  padding: 22px; 
  border-radius: 15px; 
  margin-bottom: 18px; 
  border-left: 5px solid #4e6bf0;
  transition: all 0.3s ease;
}
body.dark-mode .custom-slot, body.dark-mode .break-item {
  background: #374151;
  border-left-color: #60a5fa;
}
.slots-grid, .days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.day-column {
  background: #f0f4ff;
  border-radius: 15px;
  padding: 20px;
  border-left: 6px solid #4e6bf0;
  transition: all 0.3s ease;
}
body.dark-mode .day-column {
  background: #1f2937;
  border-left-color: #60a5fa;
}
.day-column h3 {
  background: #4e6bf0;
  color: white;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.2em;
  transition: background 0.3s ease;
}
body.dark-mode .day-column h3 {
  background: #1d4ed8;
}
.session-block {
  background: white;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border-left: 4px solid #4e6bf0;
  transition: all 0.3s ease;
}
body.dark-mode .session-block {
  background: #4b5563;
  border-left-color: #60a5fa;
}
.session-block h4 {
  color: #4e6bf0;
  margin-bottom: 12px;
  font-size: 1.1em;
  transition: color 0.3s ease;
}
body.dark-mode .session-block h4 {
  color: #93c5fd;
}
.break-controls button {
  margin-right: 12px;
}
.form-actions, .export-buttons {
  text-align: center;
  margin-top: 30px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
#agenda-preview { 
  margin-top: 30px; 
  overflow-x: auto; 
  border-radius: 12px;
}
#agenda-preview table { 
  width: 100%; 
  border-collapse: separate; 
  border-spacing: 0; 
  min-width: 900px; 
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}
body.dark-mode #agenda-preview table {
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
#agenda-preview th { 
  background: #4e6bf0; 
  color: white; 
  padding: 16px; 
  text-align: center; 
  font-weight: 600;
}
body.dark-mode #agenda-preview th {
  background: #1d4ed8;
}
#agenda-preview td { 
  padding: 16px; 
  text-align: left; 
  border-bottom: 1px solid #eee; 
  vertical-align: top;
}
body.dark-mode #agenda-preview td {
  border-bottom: 1px solid #4b5563;
}
.slot1 { background: #e3f2fd; }
body.dark-mode .slot1 { background: #1e40af; color: #dbeafe; }
.slot2 { background: #fff3e0; }
body.dark-mode .slot2 { background: #78350f; color: #fed7aa; }
.break-row td { 
  background: #fff8e1; 
  font-style: italic; 
  color: #d35400; 
  font-weight: 600;
}
body.dark-mode .break-row td {
  background: #713f12;
  color: #fdba74;
}
.session-title { 
  font-weight: bold; 
  color: #4e6bf0; 
  font-size: 1.05em;
  margin-bottom: 6px;
}
body.dark-mode .session-title {
  color: #93c5fd;
}
.trainer { 
  color: #27ae60; 
  font-weight: 600; 
  margin-top: 8px;
  font-size: 0.95em;
}
body.dark-mode .trainer {
  color: #4ade80;
}
#agenda-preview ul { 
  margin: 8px 0 0 18px; 
  padding-left: 0; 
  list-style: disc;
}
#agenda-preview ul li {
  margin-bottom: 4px;
  color: #333;
}
body.dark-mode #agenda-preview ul li {
  color: #d1d5db;
}
.calendar-header { 
  text-align: center; 
  background: #4e6bf0; 
  color: white; 
  padding: 14px; 
  font-size: 1.4em; 
  font-weight: 600;
  border-radius: 12px 12px 0 0; 
  margin-bottom: 0;
}
body.dark-mode .calendar-header {
  background: #1d4ed8;
}

@media print {
  body { background: white; }
  .container { box-shadow: none; border-radius: 0; }
  #toggle-dark-mode, .export-buttons { display: none; }
  #agenda-preview table { min-width: auto; font-size: 12px; }
}
@media (max-width: 768px) {
  .container { padding: 10px; border-radius: 15px; }
  h1 { font-size: 2em; padding: 20px; }
  .form-section { padding: 20px; }
  .slots-grid, .days-grid { grid-template-columns: 1fr; }
  input, .btn-primary, .btn-success, .btn-secondary { max-width: 100%; }
  #toggle-dark-mode { top: 10px; right: 10px; padding: 8px 16px; font-size: 0.9em; }
  .export-buttons { flex-direction: column; }
  .btn-primary, .btn-success, .btn-secondary { width: 100%; margin: 6px 0; }
  #agenda-preview table { min-width: 600px; font-size: 0.8em; }
}