/* ===== المظهر المسائي (داكن) ===== */
:root[data-theme="dark"] {
  --pri: #43a047; --pri-d: #81c784; --pri-l: #1f3326; --bg: #0f1512; --card: #18211c; --line: #2c3a32; --txt: #e3ebe6; --mut: #93a5a0;
  --good: #66bb6a; --bad: #ef5350; color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); color: var(--txt); }
[data-theme="dark"] a { color: #9ccc65; }
[data-theme="dark"] .top { background: #0b2614; }
[data-theme="dark"] :is(.side, .tile, .farm, .house, .kpi, .tbl-w, .lsec, .phase, .flock-info, .empty, .stage, .machine, .qrbox, .prog, .slicer, .dbar, .dtile, .bd-card, .kc, .ch, .mbox, .ibox, .iform .mfoot, .mfoot, .rep-row, .hb, .trol, .tasks, .trace-res a, .login form, .bd-t td.nm) { background: var(--card); color: var(--txt); border-color: var(--line); }
[data-theme="dark"] :is(.rep, .tbl th, .kc-f, .auto, .fld input[readonly], .hboard, .mbody .note, .note) { background: #212c26; color: var(--txt); border-color: var(--line); }
[data-theme="dark"] .tbl td { border-color: #24302a; } [data-theme="dark"] .tbl tr:hover td { background: #1d2822; }
[data-theme="dark"] :is(.fld input, .fld select, .fld textarea, .filters input, .filters select, .dbar select, .dbar input, .bd-search, .hsel select, .login input) { background: #111a15; color: var(--txt); border-color: #34463c; }
[data-theme="dark"] .btn { background: #1e2a23; color: var(--txt); border-color: #34463c; } [data-theme="dark"] .btn:hover { background: #26352c; }
[data-theme="dark"] .btn.pri { background: #2e7d32; border-color: #2e7d32; color: #fff; } [data-theme="dark"] .btn.ghost { background: transparent; }
[data-theme="dark"] .side a { color: var(--txt); } [data-theme="dark"] .side a.on { background: #2e7d32; color: #fff; } [data-theme="dark"] .side a:hover, [data-theme="dark"] .side a.cur { background: var(--pri-l); }
[data-theme="dark"] .chip { background: #23362a; color: #a5d6a7; } [data-theme="dark"] .chip.on { background: #2e7d32; color: #fff; }
[data-theme="dark"] .ftabs a { color: var(--txt); } [data-theme="dark"] .ftabs a.on { background: var(--pri-l); color: #a5d6a7; }
[data-theme="dark"] .tbl.daily th { background: #14532d; }
[data-theme="dark"] .tbl tr.alert td, [data-theme="dark"] .tbl tr.locked td { background: #2a1d1d; } [data-theme="dark"] .tbl tr.cur td, [data-theme="dark"] .bd-t tr.total td { background: #1f3326; }
[data-theme="dark"] .bd-t td.lv-g { background: #18291c; } [data-theme="dark"] .bd-t td.lv-y { background: #2b2a14; } [data-theme="dark"] .bd-t td.lv-o { background: #2e2114; } [data-theme="dark"] .bd-t td.lv-r { background: #2e1717; }
[data-theme="dark"] .kb { background: #2a3530; } [data-theme="dark"] .kb s { background: #e0e0e0; }
[data-theme="dark"] .dtile.done { background: #18291c; border-color: #2e7d32; } [data-theme="dark"] .dtile.todo { background: #2b2a14; border-color: #8d6e00; } [data-theme="dark"] .dtile.late { background: #2e1717; border-color: #8e2b2b; }
[data-theme="dark"] .fridge { background: linear-gradient(180deg, #26313a, #1b242b); border-color: #455a64; } [data-theme="dark"] .fr-top { background: #37474f; color: #eceff1; } [data-theme="dark"] .fr-body { background: linear-gradient(180deg, #13232e, #172630); border-color: #2b4a5a; }
[data-theme="dark"] .egg-sq { color: #212121; }
[data-theme="dark"] .cold, [data-theme="dark"] .cold-r { background: #12303a; } [data-theme="dark"] .recv { background: #152a40; } [data-theme="dark"] .setter-r { background: #3a2a12; } [data-theme="dark"] .hatcher-r { background: #3a1a28; } [data-theme="dark"] .chick { background: #34320f; } [data-theme="dark"] .misc { background: #222c27; }
[data-theme="dark"] .room small, [data-theme="dark"] .room b { color: var(--txt); }
[data-theme="dark"] .bd-card.best { background: linear-gradient(135deg, #2b2a14, var(--card)); border-color: #6d5c10; }
[data-theme="dark"] .sx-f { background: #18291c; } [data-theme="dark"] .sx-m { background: #13263a; }
[data-theme="dark"] .kpi.sale-in { background: #13263a; } [data-theme="dark"] .kpi.sale-out { background: #2e2114; }
[data-theme="dark"] .task { background: #1d2822; } [data-theme="dark"] .task.done { background: #18291c; } [data-theme="dark"] .task.late { background: #2e1717; }
[data-theme="dark"] #tip { background: var(--card); border-color: var(--line); }
[data-theme="dark"] .login { background: linear-gradient(135deg, #07170d, #1b3d22 60%, #4a3d0b); }
/* أزرار المظهر واللغة */
.prefs { display: inline-flex; gap: 4px; } .prefs .btn { min-width: 38px; justify-content: center; }
.login .prefs { position: absolute; top: 14px; left: 14px; } .login .prefs .btn { background: #ffffffcc; }
/* الاتجاه من اليسار لليمين للغة الإنجليزية */
[dir="ltr"] .side { border-left: 0; border-right: 1px solid var(--line); }
[dir="ltr"] .side .sub { margin: 2px 0 8px 14px; border-right: 0; border-left: 2px solid var(--pri-l); padding: 0 0 0 6px; }
[dir="ltr"] .kpi { border-right: 1px solid var(--line); border-left: 4px solid var(--pri); }
[dir="ltr"] .tbl th { text-align: left; } [dir="ltr"] .kv th { text-align: left; }
[dir="ltr"] .rep-row { padding: 10px 10px 10px 34px; } [dir="ltr"] .rep-i { right: auto; left: 8px; } [dir="ltr"] .rep-del { left: auto; right: 6px; }
[dir="ltr"] .bd-t td.nm, [dir="ltr"] .bd-t th:first-child { right: auto; left: 0; }
[dir="ltr"] .kb s { right: auto; left: 50%; } [dir="ltr"] .bd-t td.kp { border-right: 0; border-left: 3px solid transparent; }
[dir="ltr"] .lv-g { border-left-color: var(--lv-g) !important; } [dir="ltr"] .lv-y { border-left-color: var(--lv-y) !important; } [dir="ltr"] .lv-o { border-left-color: var(--lv-o) !important; } [dir="ltr"] .lv-r { border-left-color: var(--lv-r) !important; }
