/* Quality Life Panel — gece modu. <html data-theme="dark"> iken geçerli; gündüz tasarımına dokunmaz. */

/* ---------- Gece / gündüz anahtarı (iki temada da görünür) ---------- */
.theme-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: transparent; color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.theme-toggle:hover { background: var(--tint-2); color: var(--text); }
.theme-toggle .tt-ic { display: inline-flex; flex-shrink: 0; }
.theme-toggle .tt-sun { display: none; }
.theme-toggle .tt-label { flex: 1; text-align: left; }
.theme-toggle .tt-track { width: 38px; height: 22px; border-radius: 999px; background: #CBD5D5; position: relative; flex-shrink: 0; transition: background .2s; }
.theme-toggle .tt-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.theme-toggle[aria-pressed="true"] .tt-track { background: var(--primary); }
.theme-toggle[aria-pressed="true"] .tt-track::after { transform: translateX(16px); }
.theme-toggle[aria-pressed="true"] .tt-moon { display: none; }
.theme-toggle[aria-pressed="true"] .tt-sun { display: inline-flex; }
.sheet .theme-toggle { min-height: 46px; margin-top: 12px; }
/* Tema değişirken yumuşak geçiş (yalnızca düğmeye basınca, kısa süre) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { transition: background-color .25s ease, color .25s ease, border-color .25s ease, fill .25s ease, stroke .25s ease !important; }

/* ---------- Koyu palet ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #1E9B95; --primary-dark: #7AD9D2; --accent: #2DD4BF;
  --tint: #143634; --tint-2: #112A2A;
  --text: #E4EDED; --text-2: #A8B8B8; --text-3: #8A9C9C;
  --line: #28373A; --line-2: #1F2B2D;
  --bg: #0D1415; --card: #152022;
  --ok: #4CC77A;   --ok-bg: #12301F;
  --warn: #F0A33A; --warn-bg: #3A2A12;
  --err: #F87171;  --err-bg: #3B1818;
  --info: #7BA6FF; --info-bg: #17284A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 1px rgba(0, 0, 0, .3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
  /* Bazı sayfaların gömülü stillerinde kullanılan yedek değişkenler */
  --panel: #152022; --muted: #8A9C9C; --surface: #152022; --surface-2: #101A1B;
}
/* Sipariş sayfası değişkenleri kendi kapsayıcısında (.hbt-tpt-wrap) tanımlı: orada geçersiz kılınır */
html[data-theme="dark"] .hbt-tpt-wrap {
  --hbt-primary: #E4EDED; --hbt-secondary: #4D7FF0; --hbt-bg-color: #101A1B; --hbt-card-bg: #152022;
  --hbt-text-main: #C5D2D2; --hbt-text-muted: #8FA2A2; --hbt-border: #2A3A3D;
  --hbt-shadow: 0 4px 6px -1px rgba(0, 0, 0, .4), 0 2px 4px -1px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .theme-toggle .tt-track { background: #3A4A4D; }
html[data-theme="dark"] .theme-toggle[aria-pressed="true"] .tt-track { background: var(--primary); }
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }

/* Düğmeler: beyaz yazılı dolu düğmeler koyu zeminde yeterli kontrast için biraz koyulaştırılır */
html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .brand-mark, html[data-theme="dark"] .nav-badge, html[data-theme="dark"] .nt-tab.on, html[data-theme="dark"] .nt-new { background: #12807B; }
html[data-theme="dark"] .btn-primary:hover { background: #169089; color: #fff; }
html[data-theme="dark"] .btn-ghost:hover { border-color: #34494C; }
html[data-theme="dark"] .btn-soft:hover { background: #1B4A47; }
html[data-theme="dark"] .btn-danger { border-color: #5B2A2A; }

/* Menü ve genel yüzeyler */
html[data-theme="dark"] .nav a { color: var(--text-2); }
html[data-theme="dark"] .nav a:hover, html[data-theme="dark"] .nav-group-btn:hover { color: var(--text); }
html[data-theme="dark"] .auth { background: radial-gradient(1200px 600px at 50% -10%, #12302F 0%, var(--bg) 60%); }
html[data-theme="dark"] .toast { background: #2A3A3D; color: #E4EDED; }
html[data-theme="dark"] .sheet-grab { background: #3A4A4D; }
html[data-theme="dark"] .progress { background: #263538; }
html[data-theme="dark"] .pill-mute { background: #1F2B2D; }
html[data-theme="dark"] .flash-ok { color: #9BE3B4; border-color: #1F5A37; }
html[data-theme="dark"] .flash-err { color: #F5B5B5; border-color: #6B2525; }
html[data-theme="dark"] .flash-info { color: #B3C8FF; border-color: #2A4A8C; }
html[data-theme="dark"] .note { border-color: #1F4543; color: #8FD6D0; }
html[data-theme="dark"] .note-warn { border-color: #5C4420; color: #F5C77E; }

/* Sabit çubuklar: soru cevaplama işlem çubuğu ve eğitim düzenleme üst çubuğu (yarı saydam, sabit renkli) */
html[data-theme="dark"] .action-bar { background: rgba(21, 32, 34, .94); border-top-color: var(--line); }
html[data-theme="dark"] .tbar { background: rgba(13, 20, 21, .94); }

/* Yeni gelen satır vurgusu: koyu zeminde açık sarı yerine koyu amber (yazı okunur kalsın) */
@keyframes hbt-flash-dark { 0%, 100% { background-color: transparent; } 30%, 60% { background-color: #4A3A12; } }
html[data-theme="dark"] #orders-table tbody tr.hbt-new-row td, html[data-theme="dark"] tr.kd-new td { animation-name: hbt-flash-dark; }

/* Telefon: üst başlık ve alt menü (yarı saydam, sabit renkli) */
html[data-theme="dark"] .topbar { background: rgba(13, 20, 21, .88); border-bottom-color: rgba(40, 55, 58, .8); }
html[data-theme="dark"] .bottomnav { background: rgba(21, 32, 34, .94); border-top-color: var(--line); }
html[data-theme="dark"] .sheet-backdrop { background: rgba(0, 0, 0, .55); }
html[data-theme="dark"] dialog.sheet-dialog::backdrop { background: rgba(0, 0, 0, .6); }

/* Form alanları */
html[data-theme="dark"] .input, html[data-theme="dark"] .select, html[data-theme="dark"] .textarea { background-color: #101819; border-color: #34464A; color: var(--text); }
html[data-theme="dark"] .tfield .textarea { background: #101819; }
html[data-theme="dark"] .input::placeholder, html[data-theme="dark"] .textarea::placeholder { color: #6B7E7E; }
html[data-theme="dark"] .switch .track { background: #3A4A4D; }
html[data-theme="dark"] .radio-card { background: var(--card); }
html[data-theme="dark"] .radio-card:has(input:checked) { background: var(--tint-2); }
html[data-theme="dark"] .checklist .box { border-color: #3A4A4D; }

/* Soru ekranları */
html[data-theme="dark"] .segmented { background: #1B2628; }
html[data-theme="dark"] .segmented a[aria-current="page"] { background: #2A3A3D; box-shadow: none; }
html[data-theme="dark"] .qcard:hover { border-color: #2D5755; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .qcustomer, html[data-theme="dark"] .ocust, html[data-theme="dark"] .mini-stats > div, html[data-theme="dark"] .qdraft.is-sent { background: #1A2527; }
html[data-theme="dark"] .qtext.big, html[data-theme="dark"] .treal-q, html[data-theme="dark"] .qa-q { background: #182224; }
html[data-theme="dark"] .qdraft { border-color: #25504D; background: #12292A; }
html[data-theme="dark"] .qdraft-text { color: var(--text); }
html[data-theme="dark"] .ctx-row { border-bottom-color: var(--line-2); }
html[data-theme="dark"] .ocard.is-defective { border-color: #5B2A2A; }
html[data-theme="dark"] .wh-item.own { border-color: #2D6B66; }
html[data-theme="dark"] .tfield { border-left-color: #3A4A4D; }
html[data-theme="dark"] .tfield.req-missing { box-shadow: inset 0 0 0 1px #6B2A2A; }
html[data-theme="dark"] .tfield.is-ai { background: #132122; }
html[data-theme="dark"] .seg2 button { background: #1B2628; }
html[data-theme="dark"] .seg2 button[aria-pressed="true"][data-v="TASLAK"] { background: #4A3511; color: #F5C77E; }
html[data-theme="dark"] .treal-a { color: #6FDB9C; }
html[data-theme="dark"] .star { background: #1B2628; color: #3A4A4D; }
html[data-theme="dark"] .star.on { background: #3A2D10; border-color: #8A6A1B; color: #F59E0B; }
html[data-theme="dark"] .qa-q { border-left-color: #3A4A4D; }
html[data-theme="dark"] .qa-a { color: #A7F0C0; }
html[data-theme="dark"] .test-out { border-color: #25504D; }
html[data-theme="dark"] .test-col { background: #182224; }
html[data-theme="dark"] .chart .bar-q { fill: #25504D; }
html[data-theme="dark"] .p-thumb-empty { background: #1F2B2D; }

/* Sipariş tabloları (orders-wp.css) */
html[data-theme="dark"] .hbt-btn-primary { background: #3A6AE0; }
html[data-theme="dark"] .hbt-btn-primary:hover { background: #4D7FF0; }
html[data-theme="dark"] .hbt-btn-outline { background: var(--hbt-card-bg); }
html[data-theme="dark"] .hbt-btn-outline:hover { border-color: #3A4A4D; }
html[data-theme="dark"] .hbt-btn-excel { background: #10291E; color: #34D399; border-color: #1F5A45; }
html[data-theme="dark"] .hbt-btn-tv { background: #221B3A; color: #A78BFA; border-color: #5B46A6; }
html[data-theme="dark"] .hbt-btn-ok { background: #12301F; color: #4CC77A; border-color: #1F5A37; }
html[data-theme="dark"] table.hbt-orders tbody td { border-bottom-color: #1F2B2D; }
html[data-theme="dark"] tfoot.hbt-totals td { background: #101A1B; }
html[data-theme="dark"] .profit-positive td { background-color: #10291C !important; }
html[data-theme="dark"] .profit-negative td { background-color: #33181A !important; color: #FCA5A5 !important; }
html[data-theme="dark"] .default-comm-row td { background-color: #33280F !important; color: #F5C77E !important; }
html[data-theme="dark"] .cost-missing td { background-color: #3A2D10 !important; }
html[data-theme="dark"] td.bg-light-red { background-color: #5B2020 !important; color: #FECACA !important; }
html[data-theme="dark"] .status-cancelled-row { background-color: #152022 !important; }
html[data-theme="dark"] .pg-btn.current { background: #1B2628; }
html[data-theme="dark"] .hbt-prod-row { background: #152022; border-bottom-color: #1F2B2D; }
html[data-theme="dark"] .hbt-prod-row.on { background: #14233F; }
html[data-theme="dark"] .hbt-seq { background: #14233F; border-color: #2A4A8C; }
html[data-theme="dark"] .hbt-modal-foot { background: #101A1B; }
html[data-theme="dark"] .hbt-toast-message { background: #1B2628; }
html[data-theme="dark"] dialog, html[data-theme="dark"] .hbt-modal { background: var(--card); color: var(--text); }
html[data-theme="dark"] #orders-card:fullscreen { background: var(--bg); }
html[data-theme="dark"] #orders-card:fullscreen table.hbt-orders thead th { background: #101A1B; }
html[data-theme="dark"] .hbt-filter-group input, html[data-theme="dark"] .hbt-filter-group select, html[data-theme="dark"] .hbt-search input,
html[data-theme="dark"] .hbt-length select, html[data-theme="dark"] .hbt-modal select, html[data-theme="dark"] .hbt-modal input { background: #101819; }
html[data-theme="dark"] table.hbt-orders thead th { background: var(--card); }
html[data-theme="dark"] .pg-btn { background: transparent; }
html[data-theme="dark"] .pg-btn:hover:not(.current):not(.disabled) { background: #1B2628; }
html[data-theme="dark"] .table th { background: #101A1B; }

/* Bildirim sayfası ve diğer sayfalara gömülü stiller */
html[data-theme="dark"] .nt-tab, html[data-theme="dark"] .nt-seg a, html[data-theme="dark"] .nt-item, html[data-theme="dark"] .nt-item.unread, html[data-theme="dark"] .nt-empty { background: var(--card); }
html[data-theme="dark"] .nt-item.read, html[data-theme="dark"] .nt-select-row { background: #121B1D; }
html[data-theme="dark"] .nt-seg a.on { background: #2A3A3D; }
html[data-theme="dark"] .nt-item.read .nt-title, html[data-theme="dark"] .nt-body { color: var(--text-2); }
html[data-theme="dark"] .nt-pill { background: #1F2B2D; color: var(--text-2); }
html[data-theme="dark"] .hbt-sale-bubble { background: #3B1818; color: #FCA5A5; }

/* Satır içi sabit renkler (görünümlerdeki style="...") */
html[data-theme="dark"] [style*="background:#F1F5F9"], html[data-theme="dark"] [style*="background:#f1f5f9"] { background: #1F2B2D !important; }
html[data-theme="dark"] [style*="background:#E2E8F0"] { background: #263538 !important; }
html[data-theme="dark"] div[style*="background:#fff"] { background: var(--card) !important; }
html[data-theme="dark"] [style*="color:#15803D"], html[data-theme="dark"] [style*="color:#46b450"] { color: var(--ok) !important; }
html[data-theme="dark"] [style*="color:#B45309"] { color: var(--warn) !important; }
html[data-theme="dark"] [style*="color:#64748B"], html[data-theme="dark"] [style*="color:#64748b"] { color: var(--text-3) !important; }
html[data-theme="dark"] [style*="color:#7F1D1D"] { color: #F5B5B5 !important; }
html[data-theme="dark"] [style*="border-color:#F3C9C9"] { border-color: #5B2A2A !important; }
html[data-theme="dark"] [style*="background-color:#F0FDF4"] { background-color: #10291C !important; }
html[data-theme="dark"] [style*="background-color:#FEF2F2"] { background-color: #33181A !important; }
html[data-theme="dark"] [style*="background-color:#FFFBEB"] { background-color: #33280F !important; }
html[data-theme="dark"] [style*="background-color:#FEF3C7"] { background-color: #3A2D10 !important; }
html[data-theme="dark"] [style*="background-color:#F8FAFC"] { background-color: #152022 !important; }
