/* ==========================================================================
   KPSS Merkezi Atama Tercih Rehberi — İnsan Odaklı Kurumsal Tasarım Sistemi
   Gündüz (Light) & Gece (Dark) Modu — Marka Paleti: Lacivert (#0B2A5B) & Kehribar (#D97706)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Varsayılan: Gündüz Modu (Ferah, Kurumsal, Kağıt Beyazı) */
  --bg-page: #f5f7fa;
  --bg-header: rgba(255, 255, 255, 0.94);
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --brand: #0b2a5b;
  --brand-hover: #071e42;
  --brand-soft: #eff6ff;
  --brand-border: #bfdbfe;
  --accent: #d97706;
  --accent-soft: #fffbeb;
  --accent-border: #fde68a;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px -14px rgba(15, 23, 42, 0.1);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
}

html[data-theme="dark"] {
  --bg-page: #0d1321;
  --bg-header: rgba(17, 24, 39, 0.92);
  --bg-surface: #141c2e;
  --bg-subtle: #111827;
  --bg-muted: #1b263b;
  --bg-input: #0e1626;
  --border-subtle: #23304a;
  --border-strong: #334569;
  --text-main: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: rgba(37, 99, 235, 0.15);
  --brand-border: rgba(59, 130, 246, 0.35);
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.12);
  --accent-border: rgba(245, 158, 11, 0.35);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25), 0 14px 32px -14px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Temel Tipografi & Sayfa Zemini */
body {
  font-family: var(--font-sans) !important;
  background-color: var(--bg-page) !important;
  color: var(--text-main) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.tabular-nums, .font-mono {
  font-variant-numeric: tabular-nums;
}

/* Yapay Zeka İzi Veren Neon Mesh / Glow Temizliği */
.bg-mesh {
  background-color: var(--bg-page) !important;
  background-image: none !important;
}

html[data-theme="light"] .bg-mesh {
  background-image: linear-gradient(180deg, #ffffff 0%, #f5f7fa 240px) !important;
}

html[data-theme="dark"] .bg-mesh {
  background-image: linear-gradient(180deg, #111827 0%, #0d1321 260px) !important;
}

/* Logo Çerçevesi: Gündüz modunda doğal (kutusuz), gece modunda temiz beyaz kapsül */
.logo-wrap {
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}
html[data-theme="light"] .logo-wrap {
  background: transparent !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  --tw-ring-shadow: 0 0 #0000 !important;
}
html[data-theme="dark"] .logo-wrap {
  background: #ffffff !important;
  border-radius: 0.65rem !important;
  padding: 4px 10px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Gündüz / Gece Modu Anahtarı (İki Bölmeli Kurumsal Toggle) */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9999px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  user-select: none;
}
.theme-switch:hover {
  border-color: var(--border-strong);
}
.theme-switch-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.18s ease;
}
.theme-switch-seg i {
  font-size: 11px;
}
.theme-switch-label {
  display: none;
}
@media (min-width: 640px) {
  .theme-switch-label {
    display: inline;
  }
}
html[data-theme="light"] .theme-switch-seg[data-mode="light"] {
  background: #ffffff;
  color: #b45309;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
html[data-theme="dark"] .theme-switch-seg[data-mode="dark"] {
  background: #0d1321;
  color: #93c5fd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Kurumsal Kart & Girdi Sınıfları */
.surface-card,
.glass-card {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: var(--shadow-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.glass-input {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-main) !important;
}
.glass-input::placeholder {
  color: var(--text-muted) !important;
}
.glass-input:focus {
  background: var(--bg-surface) !important;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-soft) !important;
}

/* Kurumsal Ana ve Yardımcı Butonlar (Neon Gradient Yerine Net Düz Renk) */
.btn-brand {
  background-color: var(--brand) !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-sm) !important;
}
.btn-brand:hover {
  background-color: var(--brand-hover) !important;
}

.btn-emerald {
  background-color: #047857 !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-sm) !important;
}
.btn-emerald:hover {
  background-color: #065f46 !important;
}

.btn-indigo {
  background-color: #3730a3 !important;
  color: #ffffff !important;
  box-shadow: var(--shadow-sm) !important;
}
.btn-indigo:hover {
  background-color: #312e81 !important;
}

/* Gece Modu Rafine İnce Ayarlar (Aşırı Parlayan Glow Kaldırma) */
html[data-theme="dark"] header {
  background-color: var(--bg-header) !important;
  border-color: var(--border-subtle) !important;
}
html[data-theme="dark"] .shadow-sky-500\/25,
html[data-theme="dark"] .shadow-sky-500\/20,
html[data-theme="dark"] .shadow-emerald-500\/25,
html[data-theme="dark"] .shadow-indigo-500\/25 {
  --tw-shadow-color: rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .bg-gradient-to-r.from-sky-500.to-indigo-600 {
  background-image: none !important;
  background-color: #1d4ed8 !important;
}
html[data-theme="dark"] .bg-gradient-to-r.from-sky-500.to-indigo-600:hover {
  background-color: #1e40af !important;
}
html[data-theme="dark"] .bg-gradient-to-r.from-emerald-500.to-teal-600 {
  background-image: none !important;
  background-color: #059669 !important;
}
html[data-theme="dark"] .bg-gradient-to-r.from-emerald-500.to-teal-600:hover {
  background-color: #047857 !important;
}
html[data-theme="dark"] .bg-gradient-to-r.from-indigo-500.to-violet-600 {
  background-image: none !important;
  background-color: #4338ca !important;
}
html[data-theme="dark"] .bg-gradient-to-r.from-indigo-500.to-violet-600:hover {
  background-color: #3730a3 !important;
}

/* ==========================================================================
   GÜNDÜZ MODU (LIGHT THEME) — TÜM SAYFALAR, TABLOLAR, KARTLAR VE MODALLAR
   Dinamik JS ile üretilen satırlar/rozetler dahil %100 yüksek kontrast!
   ========================================================================== */

html[data-theme="light"] header {
  background-color: var(--bg-header) !important;
  border-bottom-color: var(--border-subtle) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

/* Yüzeyler (tüm opaklık varyantları dahil) */
html[data-theme="light"] [class*="bg-slate-950"] {
  background-color: #f8fafc !important;
}

/* Modal karartma perdesi (sadece fixed inset-0 olan overlay'ler) */
html[data-theme="light"] .fixed.inset-0[class*="bg-slate-950"] {
  background-color: rgba(15, 23, 42, 0.55) !important;
}

html[data-theme="light"] [class*="bg-slate-900"] {
  background-color: #ffffff !important;
}

html[data-theme="light"] [class*="bg-slate-800"] {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .hover\:bg-slate-700:hover,
html[data-theme="light"] .hover\:bg-slate-700\/90:hover,
html[data-theme="light"] .hover\:bg-slate-800:hover,
html[data-theme="light"] .hover\:bg-slate-800\/70:hover,
html[data-theme="light"] .hover\:bg-slate-800\/40:hover,
html[data-theme="light"] .hover\:bg-slate-800\/35:hover {
  background-color: #e2e8f0 !important;
}

/* Özel Gradient Bantlar -> Ferah Açık Kurumsal Yüzeyler */
html[data-theme="light"] .bg-gradient-to-r.from-slate-900\/90,
html[data-theme="light"] .bg-gradient-to-r.from-slate-950,
html[data-theme="light"] .bg-gradient-to-r.from-emerald-950\/90,
html[data-theme="light"] .bg-gradient-to-r.from-sky-950\/90,
html[data-theme="light"] .bg-gradient-to-r.from-emerald-950\/60,
html[data-theme="light"] .bg-gradient-to-r.from-indigo-950\/60 {
  background-image: none !important;
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="light"] .bg-gradient-to-br.from-amber-950\/40 {
  background-image: none !important;
  background-color: #fffbeb !important;
  border-color: #fcd34d !important;
}

/* Kurumsal Düz Aksiyon Butonları (Gündüz Modu) */
html[data-theme="light"] .bg-gradient-to-r.from-sky-500.to-indigo-600 {
  background-image: none !important;
  background-color: #0b2a5b !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(11, 42, 91, 0.18) !important;
}
html[data-theme="light"] .bg-gradient-to-r.from-sky-500.to-indigo-600:hover {
  background-color: #071e42 !important;
}

html[data-theme="light"] .bg-gradient-to-r.from-emerald-500.to-teal-600 {
  background-image: none !important;
  background-color: #047857 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(4, 120, 87, 0.18) !important;
}
html[data-theme="light"] .bg-gradient-to-r.from-emerald-500.to-teal-600:hover {
  background-color: #065f46 !important;
}

html[data-theme="light"] .bg-gradient-to-r.from-indigo-500.to-violet-600 {
  background-image: none !important;
  background-color: #3730a3 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(55, 48, 163, 0.18) !important;
}
html[data-theme="light"] .bg-gradient-to-r.from-indigo-500.to-violet-600:hover {
  background-color: #312e81 !important;
}

html[data-theme="light"] .bg-sky-600,
html[data-theme="light"] .bg-sky-600\/90 {
  background-color: #0b2a5b !important;
  color: #ffffff !important;
}
html[data-theme="light"] .bg-sky-600:hover,
html[data-theme="light"] .bg-sky-600\/90:hover {
  background-color: #071e42 !important;
}

/* Kenarlıklar & Ayırıcılar */
html[data-theme="light"] .border-slate-800,
html[data-theme="light"] .border-slate-800\/90,
html[data-theme="light"] .border-slate-800\/80,
html[data-theme="light"] .border-slate-800\/70,
html[data-theme="light"] .border-slate-800\/60,
html[data-theme="light"] .border-slate-700,
html[data-theme="light"] .border-slate-700\/80,
html[data-theme="light"] .border-slate-700\/70,
html[data-theme="light"] .border-slate-700\/60 {
  border-color: #e2e8f0 !important;
}
html[data-theme="light"] .divide-slate-800 > :not([hidden]) ~ :not([hidden]),
html[data-theme="light"] .divide-slate-800\/70 > :not([hidden]) ~ :not([hidden]),
html[data-theme="light"] .divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]) {
  border-color: #e2e8f0 !important;
}

/* Metin Kontrastları (Butonlar içindeki beyaz yazılar korunur!) */
html[data-theme="light"] .text-white {
  color: #0f172a !important;
}
html[data-theme="light"] button.text-white,
html[data-theme="light"] a.text-white,
html[data-theme="light"] button.text-white *,
html[data-theme="light"] a.text-white *,
html[data-theme="light"] .bg-sky-600,
html[data-theme="light"] .bg-sky-600 *,
html[data-theme="light"] .bg-emerald-600,
html[data-theme="light"] .bg-emerald-600 *,
html[data-theme="light"] .bg-indigo-600,
html[data-theme="light"] .bg-indigo-600 *,
html[data-theme="light"] .bg-rose-600,
html[data-theme="light"] .bg-rose-600 *,
html[data-theme="light"] .btn-brand,
html[data-theme="light"] .btn-brand *,
html[data-theme="light"] .btn-emerald,
html[data-theme="light"] .btn-emerald *,
html[data-theme="light"] .btn-indigo,
html[data-theme="light"] .btn-indigo *,
html[data-theme="light"] .avatar-badge {
  color: #ffffff !important;
}

html[data-theme="light"] .text-slate-100,
html[data-theme="light"] .text-slate-200 {
  color: #1e293b !important;
}
html[data-theme="light"] .text-slate-300 {
  color: #334155 !important;
}
html[data-theme="light"] .text-slate-400 {
  color: #64748b !important;
}
html[data-theme="light"] .text-slate-500 {
  color: #64748b !important;
}

html[data-theme="light"] .hover\:text-white:hover {
  color: #0f172a !important;
}
html[data-theme="light"] button.text-white:hover,
html[data-theme="light"] a.text-white:hover {
  color: #ffffff !important;
}

/* Renkli Vurgu Metinleri -> Gündüz Modunda Yüksek Kontrastlı Koyu Tonlar */
html[data-theme="light"] .text-sky-300,
html[data-theme="light"] .text-sky-400 {
  color: #0b4a8c !important;
}
html[data-theme="light"] .text-indigo-300,
html[data-theme="light"] .text-indigo-400 {
  color: #3730a3 !important;
}
html[data-theme="light"] .text-emerald-300,
html[data-theme="light"] .text-emerald-400 {
  color: #047857 !important;
}
html[data-theme="light"] .text-teal-300,
html[data-theme="light"] .text-teal-400 {
  color: #0f766e !important;
}
html[data-theme="light"] .text-amber-200,
html[data-theme="light"] .text-amber-200\/75,
html[data-theme="light"] .text-amber-300,
html[data-theme="light"] .text-amber-400 {
  color: #b45309 !important;
}
html[data-theme="light"] .text-rose-300,
html[data-theme="light"] .text-rose-400 {
  color: #be123c !important;
}
html[data-theme="light"] .text-violet-300,
html[data-theme="light"] .text-violet-400 {
  color: #6d28d9 !important;
}

/* Renkli Rozet, ÖSYM Kodu Butonları & Alarm Kutuları -> Pastel Dolgu + Koyu Net Yazı */
html[data-theme="light"] [class*="bg-sky-950"],
html[data-theme="light"] [class*="bg-sky-900"],
html[data-theme="light"] .bg-sky-600\/20,
html[data-theme="light"] .bg-sky-500\/15,
html[data-theme="light"] .bg-sky-500\/10 {
  background-color: #eff6ff !important;
}
html[data-theme="light"] button[class*="bg-sky-950"]:hover {
  background-color: #0b2a5b !important;
  color: #ffffff !important;
  border-color: #0b2a5b !important;
}
html[data-theme="light"] button[class*="bg-sky-950"]:hover * {
  color: #ffffff !important;
}
html[data-theme="light"] [class*="border-sky-800"],
html[data-theme="light"] [class*="border-sky-700"],
html[data-theme="light"] .border-sky-500\/40 {
  border-color: #bfdbfe !important;
}

html[data-theme="light"] [class*="bg-indigo-950"],
html[data-theme="light"] [class*="bg-indigo-900"],
html[data-theme="light"] .bg-indigo-500\/15,
html[data-theme="light"] .bg-indigo-500\/10 {
  background-color: #eef2ff !important;
}
html[data-theme="light"] button[class*="bg-indigo-950"]:hover {
  background-color: #3730a3 !important;
  color: #ffffff !important;
  border-color: #3730a3 !important;
}
html[data-theme="light"] button[class*="bg-indigo-950"]:hover * {
  color: #ffffff !important;
}
html[data-theme="light"] [class*="border-indigo-900"],
html[data-theme="light"] [class*="border-indigo-800"],
html[data-theme="light"] [class*="border-indigo-700"] {
  border-color: #c7d2fe !important;
}

html[data-theme="light"] [class*="bg-emerald-950"],
html[data-theme="light"] [class*="bg-emerald-900"],
html[data-theme="light"] .bg-emerald-600\/20,
html[data-theme="light"] .bg-emerald-500\/15,
html[data-theme="light"] .bg-emerald-500\/10 {
  background-color: #ecfdf5 !important;
}
html[data-theme="light"] button[class*="bg-emerald-950"]:hover {
  background-color: #047857 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
}
html[data-theme="light"] button[class*="bg-emerald-950"]:hover * {
  color: #ffffff !important;
}
html[data-theme="light"] [class*="border-emerald-800"],
html[data-theme="light"] [class*="border-emerald-700"],
html[data-theme="light"] .border-emerald-500\/40,
html[data-theme="light"] .border-emerald-500\/30 {
  border-color: #a7f3d0 !important;
}

html[data-theme="light"] [class*="bg-teal-950"],
html[data-theme="light"] .bg-teal-500\/10 {
  background-color: #f0fdfa !important;
}
html[data-theme="light"] [class*="border-teal-800"] {
  border-color: #99f6e4 !important;
}

html[data-theme="light"] [class*="bg-amber-950"],
html[data-theme="light"] [class*="bg-amber-900"],
html[data-theme="light"] .bg-amber-500\/15,
html[data-theme="light"] .bg-amber-500\/10 {
  background-color: #fffbeb !important;
}
html[data-theme="light"] [class*="border-amber-800"],
html[data-theme="light"] [class*="border-amber-700"],
html[data-theme="light"] .border-amber-500\/30 {
  border-color: #fde68a !important;
}

html[data-theme="light"] [class*="bg-rose-950"],
html[data-theme="light"] [class*="bg-rose-900"],
html[data-theme="light"] .bg-rose-500\/10 {
  background-color: #fff1f2 !important;
}
html[data-theme="light"] button[class*="bg-rose-950"]:hover {
  background-color: #be123c !important;
  color: #ffffff !important;
  border-color: #be123c !important;
}
html[data-theme="light"] button[class*="bg-rose-950"]:hover * {
  color: #ffffff !important;
}
html[data-theme="light"] [class*="border-rose-800"],
html[data-theme="light"] [class*="border-rose-700"] {
  border-color: #fecdd3 !important;
}

/* Tablo Hover & Girdi Alanları (Gündüz Modu) */
html[data-theme="light"] .table-dark tbody tr:hover {
  background-color: #f8fafc !important;
}
html[data-theme="light"] thead.bg-slate-950 {
  background-color: #f8fafc !important;
  color: #475569 !important;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
html[data-theme="light"] input:disabled,
html[data-theme="light"] input[readonly] {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}
html[data-theme="light"] input::placeholder {
  color: #94a3b8 !important;
}

/* Gölgeleri Kurumsal ve Sade Tut */
html[data-theme="light"] .shadow-2xl,
html[data-theme="light"] .shadow-xl {
  box-shadow: var(--shadow-card) !important;
}

/* Sekme Butonları (Rehber & Giriş) */
html[data-theme="light"] .tab-btn.bg-sky-600 {
  background-color: #0b2a5b !important;
  color: #ffffff !important;
}
html[data-theme="light"] .tab-btn.bg-sky-600 * {
  color: #ffffff !important;
}
html[data-theme="light"] .border-sky-500 {
  border-color: #0b2a5b !important;
}
html[data-theme="light"] .border-emerald-500 {
  border-color: #047857 !important;
}

