/* Dark / Light theme — overrides the shared CSS variables used by admin and student layouts */
.theme-toggle { width:34px; height:34px; padding:0; border:1px solid var(--border); border-radius:50%; background:var(--bg); color:var(--text); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0; transition:border-color .15s; }
.theme-toggle:hover { border-color:var(--pink); }
.theme-toggle svg { width:16px; height:16px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --pink-light: #3b2330;
  --white:      #1f1b1e;
  --bg:         #151215;
  --border:     #3a3036;
  --text:       #ececec;
  --muted:      #a79ca3;
  --shadow:     0 2px 12px rgba(0,0,0,0.45);
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .search-wrap input,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .pag-btn,
[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not([type=hidden]),
[data-theme="dark"] select,
[data-theme="dark"] textarea { background:var(--white); color:var(--text); }
[data-theme="dark"] .btn-pink { color:#fff; }
[data-theme="dark"] thead tr { background:#2a2228; }
[data-theme="dark"] tbody tr { border-bottom-color:var(--border); }
[data-theme="dark"] tbody tr:hover { background:#2a2228; }
[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .search-wrap input::placeholder { color:#7d727a; }
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#ffffff"] { background-color:var(--white) !important; }
[data-theme="dark"] [style*="color:#1a1a1a"],
[data-theme="dark"] [style*="color:#2D2D2D"] { color:var(--text) !important; }
[data-theme="dark"] .notif-badge { border-color:var(--white); }
[data-theme="dark"] body { background:var(--bg); }
[data-theme="dark"] .nav-item,
[data-theme="dark"] .nav-item svg { color:#fff; }
/* ไอคอน SVG แบบ fill (ไม่มี fill attr) ใน sidebar ให้เป็นสีขาว */
html[data-theme="dark"] .sidebar svg:not([fill]) { fill:currentColor; }
html[data-theme="dark"] .sidebar svg path[fill="#000"],
html[data-theme="dark"] .sidebar svg path[fill="#000000"] { fill:currentColor; }
/* ใส่โดย theme.js: สีตัวอักษรอ่านยากบนพื้นหลังสว่าง/มืด */
html[data-theme="dark"] .dm-dark-text { color:#1f1a1d !important; }
html[data-theme="dark"] .dm-light-text { color:#ececec !important; }
[data-theme="dark"] .nav-item:hover { color:var(--pink); }
[data-theme="dark"] .nav-item.active { color:#fff; }
[data-theme="dark"] .nav-link { color:#d6cfd3; }
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active { color:#fff; }
[data-theme="dark"] .lang-toggle { border-color:var(--border) !important; }
[data-theme="dark"] [style*="color:#555"] { color:#d6cfd3 !important; }
[data-theme="dark"] .alert-success { background:#1d3322; color:#9ad6a1; border-color:#2c4d33; }
[data-theme="dark"] .alert-error   { background:#3a1f21; color:#f2a3a3; border-color:#5a2d30; }
[data-theme="dark"] .alert-info    { background:#1b2a3a; color:#9cc4f0; border-color:#2a4058; }
