/* ==================== RESET & BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
}

/* ==================== NAVBAR ==================== */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.nav-brand i { font-size: 1.5rem; }

.nav-links { display: flex; gap: 0.5rem; }

.nav-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
  color: white;
  background: rgba(255,255,255,0.15);
}

/* ==================== PAGES ==================== */
.page { display: none; }
.page.active { display: block; }

/* ==================== FORM PAGE ==================== */
.form-container {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.form-header {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.form-header h1 {
  font-size: 1.6rem;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.form-header h1 i { color: var(--warning); }

.form-header > p {
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.info-box {
  background: var(--primary-light);
  border-radius: 8px;
  padding: 1.25rem;
  border-left: 4px solid var(--primary);
}

.info-box h3 {
  font-size: 0.95rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.info-box ul {
  list-style: none;
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.7;
}

.info-box li::before {
  content: '•';
  color: var(--primary);
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Step Indicator */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--gray-200);
  color: var(--gray-500);
  transition: all 0.3s;
}

.step span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gray-400);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.step.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.step.active span {
  background: var(--primary);
}

.step.completed {
  background: var(--success-light);
  color: var(--success);
}

.step.completed span {
  background: var(--success);
}

/* Form Steps */
.form-step {
  display: none;
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  animation: fadeIn 0.3s ease;
}

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

.form-step h2 {
  font-size: 1.25rem;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-100);
}

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

/* Form Groups */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.required { color: var(--danger); }

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  color: var(--gray-800);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.radio-label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.radio-label input[type="radio"]:checked + span,
.radio-label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--gray-100);
}

/* Buttons */
.btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-300); }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #15803d; transform: translateY(-1px); }

.btn-danger {
  background: var(--danger);
  color: white;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}
.btn-danger:hover { background: #b91c1c; }

.btn-outline {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-full { width: 100%; justify-content: center; }

/* Success Card */
.success-card {
  text-align: center;
  background: white;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
  animation: fadeIn 0.4s ease;
}

.success-card i {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: 1rem;
}

.success-card h2 {
  font-size: 1.5rem;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.success-card p {
  color: var(--gray-500);
  margin-bottom: 2rem;
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 2rem;
}

.login-card {
  background: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.login-header h2 {
  font-size: 1.3rem;
  color: var(--gray-800);
}

.error-text {
  color: var(--danger);
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ==================== DASHBOARD ==================== */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  color: var(--gray-800);
}

.dashboard-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-total .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-kampus .stat-icon { background: var(--success-light); color: var(--success); }
.stat-ogrenci .stat-icon { background: var(--purple-light); color: var(--purple); }
.stat-yarisma .stat-icon { background: var(--warning-light); color: var(--warning); }

.stat-info h3 {
  font-size: 1.75rem;
  color: var(--gray-900);
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.15rem;
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.chart-card.full-width {
  margin-bottom: 1.5rem;
}

.chart-card h3 {
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-card h3 i {
  color: var(--primary);
}

/* Table Section */
.table-section {
  background: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.table-section > h3 {
  font-size: 1.1rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filters-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filters-bar input,
.filters-bar select {
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.85rem;
  min-width: 140px;
  background: white;
}

.filters-bar input:focus,
.filters-bar select:focus {
  outline: none;
  border-color: var(--primary);
}

.filters-bar input[type="text"] {
  flex: 1;
  min-width: 200px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-weight: 600;
  padding: 0.75rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid var(--gray-200);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

tbody tr:hover { background: var(--gray-50); }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-muzik { background: #fef3c7; color: #92400e; }
.badge-gorsel { background: #ede9fe; color: #5b21b6; }
.badge-beden { background: #dcfce7; color: #166534; }
.badge-gold { background: #fef3c7; color: #92400e; }
.badge-silver { background: #f3f4f6; color: #374151; }
.badge-bronze { background: #fed7aa; color: #9a3412; }
.badge-info { background: var(--primary-light); color: var(--primary-dark); }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
    height: auto;
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .nav-brand { font-size: 1rem; }

  .step-indicator {
    flex-direction: column;
    gap: 0.25rem;
  }

  .form-header h1 { font-size: 1.3rem; }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .filters-bar {
    flex-direction: column;
  }

  .filters-bar input,
  .filters-bar select {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-container {
    padding: 0 0.5rem;
  }

  .form-step, .form-header {
    padding: 1.25rem;
  }
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

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