/* dark.css — Gece modu. theme.js, <html data-theme="dark"> yaptığında devreye girer.
   Çoğu sayfa renk değişkenlerini (--bg, --panel…) kullanır; burada değişkenler ve elle yazılmış açık renkler ezilir. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0f1517; --panel:#172023; --panel2:#1d2a2d; --line:#2b3b3f;
  --ink:#e6eeee; --sub:#9db0b2; --sub2:#7f9395;
  --story:#1c928c; --post:#9a8ff7; --reels:#e8814c;
  --ok:#4cc38a; --warn:#e5a93d; --err:#f0807a;
}
html[data-theme="dark"] body { background:var(--bg); color:var(--ink); }
html[data-theme="dark"] ::selection { background:rgba(28,146,140,.45); }
html[data-theme="dark"] img { color-scheme:light; }

/* Sayfa içine satır içi (inline) yazılmış açık renkler */
html[data-theme="dark"] [style*="background:#fff"], html[data-theme="dark"] [style*="background: #fff"] { background:var(--panel) !important; }
html[data-theme="dark"] [style*="background:#f1f5f4"], html[data-theme="dark"] [style*="background:#eef3f2"] { background:var(--panel2) !important; }
html[data-theme="dark"] [style*="background:#fbeceb"] { background:rgba(240,128,122,.14) !important; border-color:rgba(240,128,122,.35) !important; color:var(--err) !important; }
html[data-theme="dark"] [style*="color:#172326"] { color:var(--ink) !important; }
html[data-theme="dark"] [style*="color:#647376"] { color:var(--sub) !important; }

/* Genel */
html[data-theme="dark"] .btn.primary { color:#fff; }
html[data-theme="dark"] .pbar { background:#263639; }
html[data-theme="dark"] .video-sim { background:#0a0e0f; }
html[data-theme="dark"] .overlay { background:rgba(0,0,0,.6); }
html[data-theme="dark"] .item-menu, html[data-theme="dark"] .time-picker-panel, html[data-theme="dark"] .nav-menu { box-shadow:0 12px 32px rgba(0,0,0,.5); }
html[data-theme="dark"] .item-menu-btn { background:rgba(255,255,255,.12); }
html[data-theme="dark"] .upload-label { background:rgba(28,146,140,.12); }
html[data-theme="dark"] .nav-dd[open] > summary { background:var(--panel2); }

/* Reklam sayfaları: durum etiketleri */
html[data-theme="dark"] .am-st.on, html[data-theme="dark"] .am-sdot.on, html[data-theme="dark"] .aa-chip.on { color:var(--ok); }
html[data-theme="dark"] .am-st.wait, html[data-theme="dark"] .am-sdot.wait, html[data-theme="dark"] .aa-chip.wait, html[data-theme="dark"] .aa-flag.warn { color:var(--warn); }
html[data-theme="dark"] .am-st.warn, html[data-theme="dark"] .am-sdot.warn, html[data-theme="dark"] .aa-chip.warn, html[data-theme="dark"] .aa-flag.crit,
html[data-theme="dark"] .am-fb.bad .n, html[data-theme="dark"] .aa-fb.bad .n { color:var(--err); }
html[data-theme="dark"] .am-st.off, html[data-theme="dark"] .am-sdot.off, html[data-theme="dark"] .aa-chip.off, html[data-theme="dark"] .aa-flag.info { background:var(--panel2); color:var(--sub); }

/* Tasarım stüdyosu: şeffaflık deseni ve ilgili alanlar */
html[data-theme="dark"] .ds-stage { background:repeating-conic-gradient(#1c282a 0% 25%, #223134 0% 50%) 50%/24px 24px; }
html[data-theme="dark"] .bk-logo .pv { background:repeating-conic-gradient(#25353a 0% 25%, #2d4046 0% 50%) 50%/16px 16px; }
html[data-theme="dark"] .gp-ph, html[data-theme="dark"] .gp-drop { background:var(--panel2); }
html[data-theme="dark"] .gp-pair img { background:repeating-conic-gradient(#1c282a 0% 25%, #223134 0% 50%) 50%/16px 16px; }
html[data-theme="dark"] .gp-warn, html[data-theme="dark"] .bk-warn, html[data-theme="dark"] .warn { background:rgba(229,169,61,.14); border-color:rgba(229,169,61,.4); color:#f0c97a; }
html[data-theme="dark"] .ap-sum { background:rgba(76,195,138,.1); border-color:rgba(76,195,138,.3); }
html[data-theme="dark"] .reg-box { background:rgba(240,128,122,.1); border-color:rgba(240,128,122,.35); }
html[data-theme="dark"] .reg-h { color:var(--err); } html[data-theme="dark"] .reg-i.warn b { color:var(--warn); } html[data-theme="dark"] .reg-i.high b { color:var(--err); } html[data-theme="dark"] .reg-a { color:var(--sub); }
html[data-theme="dark"] .b:hover, html[data-theme="dark"] .gp-b:hover, html[data-theme="dark"] .ap-b:hover, html[data-theme="dark"] .rd-b:hover, html[data-theme="dark"] .bk-b:hover, html[data-theme="dark"] .dk-b:hover { background:#25363a; border-color:#3a4f54; }
html[data-theme="dark"] .gp-card, html[data-theme="dark"] .ap-card, html[data-theme="dark"] .bk-card, html[data-theme="dark"] .rd-card, html[data-theme="dark"] .ctl .c, html[data-theme="dark"] .ap-slot { box-shadow:none; }

/* Bildirim zili ve paneli (push_ui.php) */
html[data-theme="dark"] #nGate { background:var(--bg); }
html[data-theme="dark"] #nGate .ng-card { background:var(--panel); border-color:var(--line); color:var(--ink); box-shadow:none; }
html[data-theme="dark"] #nGate p { color:var(--sub); } html[data-theme="dark"] #nGate ol { color:var(--ink); }
html[data-theme="dark"] #nBell { background:var(--panel); border-color:var(--line); box-shadow:0 6px 20px rgba(0,0,0,.5); }
html[data-theme="dark"] #nBell.need::before { border-color:var(--panel); }
html[data-theme="dark"] #nPanel { background:var(--panel); border-color:var(--line); box-shadow:0 10px 40px rgba(0,0,0,.55); }
html[data-theme="dark"] #nPanel .np-head { border-color:var(--line); color:var(--ink); }
html[data-theme="dark"] #nPanel .np-head button, html[data-theme="dark"] #nEnableBtn { color:#4dc3bc !important; }
html[data-theme="dark"] #nPanel .np-item { border-color:var(--line); color:var(--ink); }
html[data-theme="dark"] #nPanel .np-item.unread { background:var(--panel2); }
html[data-theme="dark"] #nPanel .np-b { color:var(--sub); } html[data-theme="dark"] #nPanel .np-d, html[data-theme="dark"] #nPanel .np-empty { color:var(--sub2); }
html[data-theme="dark"] #nEnable { background:#2b2616 !important; border-color:var(--line) !important; color:var(--ink) !important; }
html[data-theme="dark"] #nDiag { border-color:var(--line) !important; color:var(--sub2) !important; }
html[data-theme="dark"] #nBanner { background:var(--panel); border-color:var(--line); color:var(--ink); box-shadow:0 10px 30px rgba(0,0,0,.5); }
html[data-theme="dark"] #nBanner button { background:var(--panel2); border-color:var(--line); color:var(--sub); }
html[data-theme="dark"] #nBanner .nb-yes { background:var(--story); border-color:var(--story); color:#fff; }

/* Mesajlaşma penceresi (thread_ui.php) ve talep kartı */
html[data-theme="dark"] #thBox { background:var(--panel); }
html[data-theme="dark"] #thHead { border-color:var(--line); }
html[data-theme="dark"] #thTitle { color:var(--ink); } html[data-theme="dark"] #thSub { color:var(--sub); }
html[data-theme="dark"] #thClose { background:var(--panel2); color:var(--ink); }
html[data-theme="dark"] #thList { background:var(--bg); }
html[data-theme="dark"] .th-empty, html[data-theme="dark"] .th-meta { color:var(--sub2); }
html[data-theme="dark"] .th-msg { box-shadow:none; }
html[data-theme="dark"] .th-msg.theirs { background:var(--panel2); border-color:var(--line); color:var(--ink); }
html[data-theme="dark"] .th-msg.mine { background:#164a47; border-color:#1f6561; color:var(--ink); }
html[data-theme="dark"] .th-msg.theirs .th-name { color:#4dc3bc; } html[data-theme="dark"] .th-msg.mine .th-name { color:var(--sub); }
html[data-theme="dark"] .th-tick { color:#6f8386; } html[data-theme="dark"] .th-tick.read { color:#4fb3ef; }
html[data-theme="dark"] #thForm { background:var(--panel); border-color:var(--line); }
html[data-theme="dark"] #thInput { background:var(--panel2); border-color:var(--line); color:var(--ink); }
html[data-theme="dark"] .th-attach { background:var(--panel2); }
html[data-theme="dark"] #thNote { background:var(--panel); color:var(--sub); } html[data-theme="dark"] #thNote.err { color:var(--err); }
html[data-theme="dark"] .th-card { background:var(--panel2); border-color:var(--line); color:var(--ink); }
html[data-theme="dark"] .th-card:hover { border-color:var(--story); box-shadow:none; }
html[data-theme="dark"] .th-card .th-s { color:var(--sub); } html[data-theme="dark"] .th-card.unread .th-s { color:var(--ink); }

/* Hesabım > Görünüm seçenekleri */
.theme-opt.on { border-color:var(--story); box-shadow:0 0 0 2px rgba(22,124,120,.25); }
html[data-theme="dark"] .theme-opt.on { box-shadow:0 0 0 2px rgba(28,146,140,.4); }
