:root {
  --survey-bg: radial-gradient(circle at 0% 0%, rgba(30,154,214,0.12), transparent 35%),
                radial-gradient(circle at 100% 0%, rgba(15,181,149,0.16), transparent 30%),
                #f5f7fb;
  --admin-bg: radial-gradient(circle at 20% 20%, rgba(30,154,214,0.12), transparent 35%),
               radial-gradient(circle at 80% 0%, rgba(15,181,149,0.16), transparent 25%),
               #f4f7fb;
  --surface: #ffffff;
  --card-surface: #fdfefe;
  --muted-surface: #f8fafc;
  --primary: #1e9ad6;
  --primary-strong: #0c7fb5;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: #6b7280;
  --progress-bg: #eef2f7;
  --glass: rgba(255, 255, 255, 0.9);
  --shadow-soft: rgba(15, 23, 42, 0.06);
  --input-bg: #ffffff;
}

:root.dark-mode {
  color-scheme: dark;

  --survey-bg: radial-gradient(circle at 0% 0%, rgba(30,154,214,0.12), transparent 35%),
                radial-gradient(circle at 100% 0%, rgba(15,181,149,0.14), transparent 30%),
                #0a1120; 

  --admin-bg: #0a1120;

  /* Kart & yüzeyler */
  --surface: #121a2e;        /* Kart yüzeyi (orta koyuluk) */
  --card-surface: #162036;    /* Soru kutuları için daha açık koyu */
  --muted-surface: #1b2640;   /* Option-stack gibi ikincil yüzeyler */

  /* Inputlar */
  --input-bg: #141e33;       
  --border: #2a3550;

  /* Metin */
  --text: #f1f5f9;            /* Daha parlak */
  --muted: #9ca3af;

  /* Efektler */
  --glass: rgba(18, 26, 46, 0.85);
  --shadow-soft: rgba(0, 0, 0, 0.4);

  --progress-bg: #1c253a;
}


* { font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif; }

.survey-body {
  background: var(--survey-bg);
  min-height: 100vh;
  color: var(--text);
}

.survey-wrapper {
  max-width: 1080px;
}

.survey-hero {
  background: linear-gradient(120deg, #0f172a, #0a2b45);
  color: #fff;
}

.survey-panel {
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.progress-thin {
  height: 8px;
  background: var(--progress-bg);
  border-radius: 999px;
}

.progress-thin .progress-bar {
  background: linear-gradient(90deg, #1e9ad6, #13c2c2);
  border-radius: 999px;
}

.question-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.question-item {
  background: var(--card-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px var(--shadow-soft);
}

.question-item .form-check {
  margin-bottom: 8px;
}

.question-item:last-child {
  margin-bottom: 0;
}

.question-item .form-control,
.question-item .form-select {
  border-radius: 12px;
  border-color: var(--border);
  background: var(--input-bg);
  color: var(--text);
}

.question-item .form-control:focus,
.question-item .form-select:focus {
  box-shadow: 0 0 0 0.15rem rgba(30,154,214,0.14);
  border-color: var(--primary);
}

.question-item label.form-check-label {
  margin-left: 4px;
}

.survey-panel .btn-primary {
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 12px 28px rgba(30,154,214,0.3);
}

.admin-body {
  background: var(--admin-bg);
  min-height: 100vh;
  color: var(--text);
}

.auth-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
}

.auth-card {
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(10px);
}

.auth-tabs .nav-link {
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}

.auth-tabs .nav-link.active {
  color: #fff;
  background: linear-gradient(120deg, #1e9ad6, #0c7fb5);
  box-shadow: 0 12px 30px var(--shadow-soft);
}

.admin-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.chip-sub {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}

.chip-title {
  font-weight: 700;
  color: #fff;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-card {
  background: linear-gradient(120deg, #0f172a, #0c2d48);
  position: relative;
  overflow: hidden;
}

.hero-blob {
  position: absolute;
  width: 280px;
  height: 280px;
  right: -40px;
  top: -60px;
  background: radial-gradient(circle, rgba(30,154,214,0.5), transparent 50%);
  filter: blur(12px);
  opacity: 0.7;
}

.pill-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
}

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
}

.modern-tabs .nav-link {
  border: none;
  color: var(--muted);
  padding: 12px 16px;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
}

.modern-tabs .nav-link.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 8px 22px var(--shadow-soft);
}

.admin-card .card-body {
  padding: 1.5rem;
  background: var(--surface);
}

.icon-chip {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
  font-size: 1.2rem;
}

.bg-soft-primary {
  background: rgba(30, 154, 214, 0.12);
}

.modern-form .form-control,
.modern-form .form-select {
  border-radius: 12px;
  border-color: var(--border);
  padding: 10px 12px;
  background: var(--input-bg);
  color: var(--text);
}

.modern-form .form-control:focus,
.modern-form .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(30,154,214,0.16);
  border-color: var(--primary);
}

.option-stack {
  background: var(--muted-surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
}

.option-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 4px 10px var(--shadow-soft);
}

.list-group.modern-list .list-group-item {
  border: 1px solid var(--border);
  margin-bottom: 8px;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px var(--shadow-soft);
  background: var(--surface);
  color: var(--text);
}

.list-group.modern-list .list-group-item-secondary {
  background: linear-gradient(120deg, rgba(30,154,214,0.08), rgba(30,154,214,0.02));
  color: var(--text);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}

.list-group.modern-list .btn-danger.btn-sm {
  border-radius: 10px;
}

#responsesGrid .card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 28px var(--shadow-soft);
}

#responsesGrid .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px var(--shadow-soft);
}

/* Survey improvements */
.survey-card .progress { height: 6px; }

#questionContainer .question-item {
  border-bottom: 0;
  padding: 14px 16px;
}

.fade-in {
  animation: fadeIn 200ms ease-out;
}

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

.required-asterisk { color: #d63384; margin-left: 4px; }

.question-item.has-error .form-control,
.question-item.has-error .form-select,
.question-item.has-error .form-check-input {
  border-color: #dc3545;
  box-shadow: none;
}

.question-error {
  color: #dc3545;
}

.form-text { color: var(--muted); }

/* File attachment cards inside admin responses modal */
.answer-list { gap: 0.35rem; }
.answer-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 0.25rem 0.75rem var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.answer-file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 1.5rem var(--shadow-soft);
  border-color: var(--border);
}
.answer-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.answer-file-meta { line-height: 1.25; }
.answer-file-name {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.answer-file-sub {
  font-size: 0.875rem;
  color: var(--muted);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 8px 18px var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px var(--shadow-soft);
}

.admin-actions {
  gap: 10px;
}

.logout-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.logout-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px var(--shadow-soft);
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.18);
}

.logout-chip .bi {
  font-size: 1rem;
}

:root.dark-mode .theme-toggle {
  background: #0f172a;
  color: #e2e8f0;
}

:root.dark-mode .auth-card {
  background: #0f172a;
  border-color: #2a3550;
}

:root.dark-mode .auth-tabs .nav-link {
  color: var(--muted);
}

:root.dark-mode .auth-tabs .nav-link.active {
  color: #fff;
}

/* Admin durum onay modali */
#confirmStatusModal .modal-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px var(--shadow-soft);
}

#confirmStatusModal .modal-header,
#confirmStatusModal .modal-footer {
  border-color: var(--border);
}

:root.dark-mode #confirmStatusModal .modal-content {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #2a3550;
}

:root.dark-mode #confirmStatusModal .modal-header,
:root.dark-mode #confirmStatusModal .modal-footer {
  border-color: #2a3550;
}

.admin-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  min-height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.admin-status-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px var(--shadow-soft);
}

.admin-status-btn.danger {
  background: linear-gradient(120deg, #f43f5e, #e11d48);
  color: #fff;
  border: none;
}

.admin-status-btn.danger:hover {
  box-shadow: 0 16px 32px rgba(225, 29, 72, 0.35);
}

.admin-status-btn.success {
  background: linear-gradient(120deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
}

.admin-status-btn.success:hover {
  box-shadow: 0 16px 32px rgba(34, 197, 94, 0.35);
}

:root.dark-mode .admin-status-btn {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #2a3550;
}

:root.dark-mode .admin-status-btn.danger,
:root.dark-mode .admin-status-btn.success {
  border: none;
  color: #fff;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-info {
  flex: 1;
  min-width: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.admin-status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.82rem;
}

:root.dark-mode .logout-chip {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

:root.dark-mode .logout-chip:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
}

:root.dark-mode .admin-user-chip {
  background: rgba(20, 30, 51, 0.8);
  border-color: #2a3550;
  color: #e5edff;
}

:root.dark-mode .chip-sub {
  color: #94a3b8;
}

.dark-mode .text-muted { color: var(--muted) !important; }

.hero-blob {
  position: absolute;
  width: 280px;
  height: 280px;
  right: -40px;
  top: -60px;
  background: radial-gradient(circle, rgba(30,154,214,0.5), transparent 50%);
  filter: blur(12px);
  opacity: 0.7;
  pointer-events: none;  
}

/* Her iki tema için de soru etiketlerini net yap */
.question-item .form-label,
.question-item label {
  color: var(--text);
  font-weight: 600;
}

/* Dark mode'da label + input metinlerini özellikle parlat */
:root.dark-mode .question-item .form-label,
:root.dark-mode .question-item label {
  color: #e5edff;   /* daha parlak mavi-beyaz */
}

:root.dark-mode .question-item .form-control,
:root.dark-mode .question-item .form-select {
  color: #e5edff;        /* input içindeki yazı */
  background: #141e33;   /* karttan biraz daha açık */
  border-color: #334155;
}

/* Placeholder'lar da net olsun */
:root.dark-mode .question-item .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* ADMIN DARK MODE İYİLEŞTİRMELERİ */

/* Genel metin rengi */
:root.dark-mode .admin-body {
  color: var(--text);
}

/* Form label ve başlıklar */
:root.dark-mode .admin-body .form-label,
:root.dark-mode .admin-body label,
:root.dark-mode .admin-body .modern-form .form-label {
  color: #e5edff;
  font-weight: 600;
}

/* Input ve select içi metinler */
:root.dark-mode .admin-body .modern-form .form-control,
:root.dark-mode .admin-body .modern-form .form-select {
  color: #e5edff;
  background: #141e33;
  border-color: #334155;
}

/* Placeholder'lar */
:root.dark-mode .admin-body .modern-form .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* Yardım metinleri ve muted text */
:root.dark-mode .admin-body .form-text,
:root.dark-mode .admin-body .text-muted {
  color: var(--muted) !important;
}

/* Tab başlıkları daha net olsun */
:root.dark-mode .admin-body .modern-tabs .nav-link {
  color: var(--muted);
}

:root.dark-mode .admin-body .modern-tabs .nav-link.active {
  color: var(--text);
}

/* Mevcut sorular listesi zaten var(--text) kullanıyor ama garanti olsun */
:root.dark-mode .admin-body .list-group.modern-list .list-group-item {
  color: var(--text);
}

/* 1) Dark mode'da bütün başlık renklerini değiştir */
:root.dark-mode {
  --bs-heading-color: #e5edff; /* Bootstrap heading color override */
}

/* 2) Özellikle admin paneli başlıkları için */
:root.dark-mode .admin-body h2,
:root.dark-mode .admin-body h3,
:root.dark-mode .admin-body h4,
:root.dark-mode .admin-body h5,
:root.dark-mode .admin-body h6,
:root.dark-mode .admin-body .card-title {
  color: #e5edff !important;
}

/* Alt açıklama metni (text-muted vb.) */
:root.dark-mode .admin-body .card-subtitle,
:root.dark-mode .admin-body .text-muted,
:root.dark-mode .admin-body .text-secondary,
:root.dark-mode .admin-body .text-white-50 {
  color: var(--muted) !important;
}

.auth-card {
    max-width: 750px;
    margin: 0 auto;
}
