/* PlayListMod branding. Existing layout and controls are preserved. */
:root {
  --plm-navy: #0b1228;
  --plm-blue: #087bff;
  --plm-purple: #7546ed;
  --plm-line: #dce3f2;
  --iptv-blue: #5865e8;
  --iptv-blue-dark: #172444;
  --iptv-bg: #f4f6fc;
  --iptv-line: #dce3f2;
  --iptv-text: #24314c;
}
body { background-color: var(--iptv-bg); color: var(--iptv-text); }
.sidebar.grouped-sidebar,
body.night-mode .sidebar.grouped-sidebar {
  background: var(--plm-navy) !important;
  border-color: #25304b !important;
}
.grouped-sidebar :is(.nav-toggle, .nav-root-link, .nav-group > summary),
.grouped-sidebar .nav-toggle > span,
.grouped-sidebar .nav-meta {
  color: #c9d4f0 !important;
}
.grouped-sidebar .nav-submenu > a { color: #aab9da !important; }
.grouped-sidebar .nav-submenu > a:hover,
.grouped-sidebar :is(.nav-root-link, .nav-group > summary):hover {
  background: #1b2848 !important;
  color: #fff !important;
}
.grouped-sidebar .nav-submenu > a.selected,
.grouped-sidebar .current-group > summary {
  background: #252d60 !important;
  color: #d6d6ff !important;
}
.grouped-sidebar .nav-meta { border-color: #25304b; }
.grouped-sidebar .nav-toggle > span img {
  width: 170px;
  height: 42px;
  object-fit: contain;
  vertical-align: middle;
}
.top, .manager-header, .user-management-page .top,
.playlist-manager-page .manager-header {
  background: linear-gradient(105deg, #112347, #23204d) !important;
  color: #f5f7ff !important;
}
:is(.top, .manager-header) :is(h1, h2) { color: #f5f7ff !important; }
:is(.top, .manager-header) input[type="search"],
:is(.top, .manager-header) .top-search input,
.user-top-search input, .manager-search input {
  background: #f0f3fc !important;
  color: #25314e !important;
  border-color: #67769b !important;
}
:where(button, input, select) { accent-color: #655bec; }
:is(button, a):focus-visible, :is(input, select, textarea):focus-visible {
  outline: 2px solid #158dff;
  outline-offset: 3px;
}
:is(.primary, .btn-primary, .user-primary, .create-save,
.reference-wizard footer button, .creation-primary) {
  background: linear-gradient(105deg, #397afa, #7650e7) !important;
  color: white !important;
  border-color: #6565ed !important;
}
:is(.user-list tr.active, .channel-row.active, .channel-row.selected,
.channelstable tr.selected, .movie.active, .movie.multi-selected) {
  background-color: #e4e8ff !important;
}
:is(.user-card, .detail, .listpanel, .user-list, .manager-card,
.reference-wizard, .creation-card) { border-color: var(--plm-line); }
body.night-mode { --iptv-bg: #0e162b; --iptv-text: #e7edfc; --iptv-line: #2a3853; }
body.night-mode :is(.shell,.layout,.main,.workspace,.detail,.listing,.pad,
.movie-basic-reference,.channel-detail-form,.channelstable th,
.channelstable td,.columns,.media-category>summary,.movie,
.editor-tools-dropdown,.advanced-menu>div,.user-card,.user-list) {
  background-color: #121d33 !important;
  color: #e7edfc !important;
  border-color: #2a3853 !important;
}
body.night-mode :is(.user-list tr.active,.channel-row.active,
.channel-row.selected,.channelstable tr.selected,.movie.active,.movie.multi-selected) {
  background-color: #303864 !important;
}
body.night-mode :is(input, select, textarea) {
  background: #1a2741 !important;
  color: #ecf1ff !important;
  border-color: #425274 !important;
}
.plm-signin { background: radial-gradient(ellipse at top, #17295b, #080e20 70%); color: #e9efff; }
.plm-signin main {
  background: #121d34;
  border: 1px solid #2c3a5a;
  box-shadow: 0 22px 70px #02061166;
}
.plm-signin h1 img { display: block; width: 280px; max-width: 100%; height: auto; margin-bottom: 24px; }
.plm-signin input { background: #0c162a; color: #edf2ff; border-color: #40506f; }
.plm-signin button { background: linear-gradient(105deg, #397afa, #7650e7); color: #fff; }
.plm-signin .error { color: #ff9fae; }
@media (prefers-reduced-motion: reduce) {
  :is(button, a, input, select) { transition: none !important; }
}
