/* ---------- Kod Editörü koyu teması ----------
   Yalnızca Kod Editörü sayfasında (CodeEditorLayout kökü .ce-themed) ve <html data-ce-theme="dark"> iken geçerlidir;
   diğer sayfalar etkilenmez. Siyah değil, "yumuşak koyu" arduvaz: zemin #1F2328, panel #1B1F24, sayfa #171B20;
   metin saf beyaz değil (#E1E4E8), ikincil metin #8E98A5 (yüzeyde 5:1 üzeri karşıtlık).
   Tailwind renkleri sabit değer olduğundan, sayfanın kullandığı sınıflar burada yeniden eşlenir.
   Monaco temasıyla (softdev-slate-dark, monaco-interop.js) aynı palet. */

html[data-ce-theme="dark"] .ce-themed {
    color-scheme: dark;
    background-color: #1F2328;
    color: #E1E4E8;
}

/* Yüzeyler */
html[data-ce-theme="dark"] .ce-themed .bg-surface { background-color: #1F2328; }
html[data-ce-theme="dark"] .ce-themed .bg-surface-2,
html[data-ce-theme="dark"] .ce-themed .bg-subtle { background-color: #272C33; }
html[data-ce-theme="dark"] .ce-themed .bg-sidebar { background-color: #1B1F24; }
html[data-ce-theme="dark"] .ce-themed .bg-canvas { background-color: #171B20; }
html[data-ce-theme="dark"] .ce-themed .bg-white { background-color: #E6E8EB; }
html[data-ce-theme="dark"] .ce-themed .bg-line { background-color: #30363D; }
html[data-ce-theme="dark"] .ce-themed .bg-line-strong { background-color: #3D444D; }
html[data-ce-theme="dark"] .ce-themed .bg-faint { background-color: #6B7480; }
html[data-ce-theme="dark"] .ce-themed .bg-ink\/30 { background-color: rgba(8, 10, 13, 0.62); }

/* Vurgu zeminleri (yumuşak, saydam) */
html[data-ce-theme="dark"] .ce-themed .bg-primary-soft,
html[data-ce-theme="dark"] .ce-themed .bg-info-soft { background-color: rgba(59, 130, 246, 0.16); }
html[data-ce-theme="dark"] .ce-themed .bg-success-soft { background-color: rgba(34, 170, 110, 0.16); }
html[data-ce-theme="dark"] .ce-themed .bg-warning-soft { background-color: rgba(217, 119, 6, 0.18); }
html[data-ce-theme="dark"] .ce-themed .bg-danger-soft { background-color: rgba(220, 60, 48, 0.18); }
html[data-ce-theme="dark"] .ce-themed .bg-ai-soft { background-color: rgba(124, 92, 252, 0.20); }

/* Metin */
html[data-ce-theme="dark"] .ce-themed .text-ink { color: #E1E4E8; }
html[data-ce-theme="dark"] .ce-themed .text-ink-soft { color: #C3C9D1; }
html[data-ce-theme="dark"] .ce-themed .text-muted { color: #8E98A5; }
html[data-ce-theme="dark"] .ce-themed .text-faint { color: #7A8490; }
html[data-ce-theme="dark"] .ce-themed .text-primary,
html[data-ce-theme="dark"] .ce-themed .text-brand,
html[data-ce-theme="dark"] .ce-themed .text-info { color: #6EA0F5; }
html[data-ce-theme="dark"] .ce-themed .text-primary-ink,
html[data-ce-theme="dark"] .ce-themed .text-info-ink { color: #8DB4FF; }
html[data-ce-theme="dark"] .ce-themed .text-success { color: #3FBF86; }
html[data-ce-theme="dark"] .ce-themed .text-success-ink { color: #58C99A; }
html[data-ce-theme="dark"] .ce-themed .text-warning { color: #E0A04A; }
html[data-ce-theme="dark"] .ce-themed .text-warning-ink { color: #E8B063; }
html[data-ce-theme="dark"] .ce-themed .text-danger { color: #F0766B; }
html[data-ce-theme="dark"] .ce-themed .text-danger-ink { color: #F28B82; }
html[data-ce-theme="dark"] .ce-themed .text-ai { color: #A28BFF; }
html[data-ce-theme="dark"] .ce-themed .text-ai-ink { color: #B9A8FF; }

/* Çizgiler ve halkalar */
html[data-ce-theme="dark"] .ce-themed .border-line,
html[data-ce-theme="dark"] .ce-themed .divide-line > :not([hidden]) ~ :not([hidden]) { border-color: #30363D; }
html[data-ce-theme="dark"] .ce-themed .border-line-strong { border-color: #3D444D; }
html[data-ce-theme="dark"] .ce-themed .border-primary,
html[data-ce-theme="dark"] .ce-themed .border-info { border-color: #4C8DF6; }
html[data-ce-theme="dark"] .ce-themed .border-success { border-color: #2FAE78; }
html[data-ce-theme="dark"] .ce-themed .border-warning { border-color: #D98A2B; }
html[data-ce-theme="dark"] .ce-themed .border-danger { border-color: #E5604F; }
html[data-ce-theme="dark"] .ce-themed .border-ai { border-color: #8F75FF; }
html[data-ce-theme="dark"] .ce-themed .ring-line { --tw-ring-color: #30363D; }
html[data-ce-theme="dark"] .ce-themed .ring-primary,
html[data-ce-theme="dark"] .ce-themed .ring-primary-ring,
html[data-ce-theme="dark"] .ce-themed .focus-visible\:ring-primary-ring:focus-visible { --tw-ring-color: #4C7FD6; }

/* Üzerine gelme */
html[data-ce-theme="dark"] .ce-themed .hover\:bg-subtle:hover { background-color: #272C33; }
html[data-ce-theme="dark"] .ce-themed .hover\:bg-surface:hover { background-color: #2B3138; }
html[data-ce-theme="dark"] .ce-themed .hover\:bg-line-strong:hover { background-color: #3D444D; }
html[data-ce-theme="dark"] .ce-themed .hover\:bg-primary-soft:hover { background-color: rgba(59, 130, 246, 0.22); }
html[data-ce-theme="dark"] .ce-themed .hover\:bg-danger-soft:hover { background-color: rgba(220, 60, 48, 0.24); }
html[data-ce-theme="dark"] .ce-themed .hover\:bg-primary-hover:hover { background-color: #3B73F0; }
html[data-ce-theme="dark"] .ce-themed .hover\:text-ink:hover { color: #F0F2F5; }
html[data-ce-theme="dark"] .ce-themed .hover\:text-primary-ink:hover { color: #A9C6FF; }
html[data-ce-theme="dark"] .ce-themed .hover\:border-ink-soft:hover { border-color: #C3C9D1; }
html[data-ce-theme="dark"] .ce-themed .hover\:border-primary-ring:hover { border-color: #4C7FD6; }
html[data-ce-theme="dark"] .ce-themed .hover\:border-danger:hover { border-color: #E5604F; }

/* Form kontrolleri: zeminden biraz koyu (içe gömük), kenarlık belirgin */
html[data-ce-theme="dark"] .ce-themed .field-input {
    background-color: #181C21;
    border-color: #3D444D;
    color: #E1E4E8;
}
html[data-ce-theme="dark"] .ce-themed .field-input::placeholder { color: #7A8490; }
html[data-ce-theme="dark"] .ce-themed .field-input:hover { border-color: #566070; }
html[data-ce-theme="dark"] .ce-themed .field-input:focus { border-color: #4C8DF6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28); }
html[data-ce-theme="dark"] .ce-themed .field-input:disabled { background-color: #22272D; color: #7A8490; }
html[data-ce-theme="dark"] .ce-themed select.field-input option { background-color: #1F2328; color: #E1E4E8; }

/* Kart ve tablo */
html[data-ce-theme="dark"] .ce-themed .card,
html[data-ce-theme="dark"] .ce-themed .tbl-wrap { background-color: #1F2328; border-color: #30363D; box-shadow: none; }
html[data-ce-theme="dark"] .ce-themed .tbl thead th { background-color: #22272D; color: #8E98A5; border-bottom-color: #30363D; }
html[data-ce-theme="dark"] .ce-themed .tbl tbody td { border-bottom-color: #30363D; }
html[data-ce-theme="dark"] .ce-themed .tbl tbody tr:hover td { background-color: #252B32; }
html[data-ce-theme="dark"] .ce-themed .tbl tbody tr.is-selected td { background-color: #272C33; }

/* Tipografi yardımcıları (değişkenle renklendirilenler) */
html[data-ce-theme="dark"] .ce-themed .t-page,
html[data-ce-theme="dark"] .ce-themed .t-section,
html[data-ce-theme="dark"] .ce-themed .t-sub,
html[data-ce-theme="dark"] .ce-themed .t-card { color: #E1E4E8; }
html[data-ce-theme="dark"] .ce-themed .t-body { color: #C3C9D1; }
html[data-ce-theme="dark"] .ce-themed .t-helper,
html[data-ce-theme="dark"] .ce-themed .t-meta,
html[data-ce-theme="dark"] .ce-themed .t-label { color: #8E98A5; }

/* Kaydırma çubuğu, metin seçimi, kod arama vurgusu */
html[data-ce-theme="dark"] .ce-themed ::-webkit-scrollbar-thumb { background: #3D444D; background-clip: content-box; }
html[data-ce-theme="dark"] .ce-themed ::-webkit-scrollbar-thumb:hover { background: #566070; background-clip: content-box; }
html[data-ce-theme="dark"] .ce-themed * { scrollbar-color: #3D444D transparent; }
html[data-ce-theme="dark"] .ce-themed ::selection,
html[data-ce-theme="dark"] .ce-themed *::selection { background: rgba(76, 141, 246, 0.38); color: inherit; }
html[data-ce-theme="dark"] .ce-themed .softdev-hit-line { background: rgba(250, 204, 21, 0.16); }
