/* Theme packs: color only, keep flat admin structure */

/* ---- Game ---- */
html.theme-game-night_blue {
  --bg: #e9eef5;
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --line: #d5dce6;
  --text: #1e2a3a;
  --muted: #6a7788;
  --accent: #2f6fed;
  --accent-2: #2458c4;
  --sidebar: #1f2d3d;
  --sidebar-text: #d7deea;
  --sidebar-muted: #93a1b3;
  --sidebar-active: #172433;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f2f5f9;
  --stat-bg: #ffffff;
  --focus-ring: #2f6fed;
}

html.theme-game-jade_gold {
  --bg: #eef2ef;
  --panel: #ffffff;
  --panel-2: #f5f8f5;
  --line: #d5dfd8;
  --text: #1d2b22;
  --muted: #66786d;
  --accent: #2f7d4d;
  --accent-2: #24633d;
  --sidebar: #24372c;
  --sidebar-text: #e4eee7;
  --sidebar-muted: #a3b7ab;
  --sidebar-active: #1b2a21;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f1f6f2;
  --stat-bg: #ffffff;
  --focus-ring: #2f7d4d;
}
html.theme-game-jade_gold .nav-item.active { border-left-color: #c2a24a; }
html.theme-game-jade_gold .btn-primary { background: #2f7d4d; border-color: #2f7d4d; }
html.theme-game-jade_gold .top-title::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  background: #c2a24a;
  vertical-align: 1px;
}

html.theme-game-vermilion {
  --bg: #f3eeed;
  --panel: #ffffff;
  --panel-2: #faf5f4;
  --line: #e2d6d4;
  --text: #2a1f1e;
  --muted: #7a6765;
  --accent: #c24b3c;
  --accent-2: #9e3a2e;
  --sidebar: #3a2624;
  --sidebar-text: #f0e6e4;
  --sidebar-muted: #bda6a3;
  --sidebar-active: #2c1c1a;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f7f0ef;
  --stat-bg: #ffffff;
  --focus-ring: #c24b3c;
}

/* ---- CPS ---- */
html.theme-cps-slate_tech {
  --bg: #eceff3;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --line: #d7dce4;
  --text: #1f2733;
  --muted: #667384;
  --accent: #3b6fd9;
  --accent-2: #2f59b0;
  --sidebar: #2a3340;
  --sidebar-text: #e4e9f0;
  --sidebar-muted: #9aa7b8;
  --sidebar-active: #202833;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f1f4f8;
  --stat-bg: #ffffff;
  --focus-ring: #3b6fd9;
}

html.theme-cps-teal_ledger {
  --bg: #eaf2f1;
  --panel: #ffffff;
  --panel-2: #f3f8f7;
  --line: #d2e0de;
  --text: #1c2b2a;
  --muted: #5f7774;
  --accent: #1f8a7a;
  --accent-2: #176c60;
  --sidebar: #1f3532;
  --sidebar-text: #e3f0ee;
  --sidebar-muted: #97b3af;
  --sidebar-active: #172825;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #eff6f5;
  --stat-bg: #ffffff;
  --focus-ring: #1f8a7a;
}

html.theme-cps-bronze_board {
  --bg: #f2efe9;
  --panel: #ffffff;
  --panel-2: #f8f5f0;
  --line: #e0d8cc;
  --text: #2a241c;
  --muted: #756955;
  --accent: #9a6b3a;
  --accent-2: #7d552c;
  --sidebar: #3a3024;
  --sidebar-text: #f2ebe1;
  --sidebar-muted: #b9aa95;
  --sidebar-active: #2b241b;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f5f1ea;
  --stat-bg: #ffffff;
  --focus-ring: #9a6b3a;
}

/* ---- Promoter ---- */
html.theme-promoter-pine_earn {
  --bg: #ebf2ec;
  --panel: #ffffff;
  --panel-2: #f4f8f4;
  --line: #d4e0d6;
  --text: #1d2b20;
  --muted: #607567;
  --accent: #2d8a55;
  --accent-2: #236b42;
  --sidebar: #24382b;
  --sidebar-text: #e5f0e9;
  --sidebar-muted: #a0b8a9;
  --sidebar-active: #1a2a20;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f0f6f1;
  --stat-bg: #ffffff;
  --focus-ring: #2d8a55;
}

html.theme-promoter-copper_glow {
  --bg: #f3eee9;
  --panel: #ffffff;
  --panel-2: #faf6f1;
  --line: #e3d8cd;
  --text: #2b221b;
  --muted: #786555;
  --accent: #c47a3f;
  --accent-2: #a36330;
  --sidebar: #3b2c22;
  --sidebar-text: #f4ebe2;
  --sidebar-muted: #bda593;
  --sidebar-active: #2c2119;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f7f1ea;
  --stat-bg: #ffffff;
  --focus-ring: #c47a3f;
}

html.theme-promoter-silver_desk {
  --bg: #f0f2f5;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --line: #dcdfe6;
  --text: #303133;
  --muted: #909399;
  --accent: #409eff;
  --accent-2: #337ecc;
  --sidebar: #304156;
  --sidebar-text: #e8eef5;
  --sidebar-muted: #a8b3c2;
  --sidebar-active: #263445;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f5f7fa;
  --stat-bg: #ffffff;
  --focus-ring: #409eff;
}

/* Admin */
html.theme-admin-default {
  --bg: #eef1f5;
  --panel: #ffffff;
  --panel-2: #f7f8fa;
  --line: #d8dde6;
  --text: #1f2a37;
  --muted: #6b7785;
  --accent: #2f6fed;
  --accent-2: #2458c4;
  --sidebar: #243447;
  --sidebar-text: #d7deea;
  --sidebar-muted: #9aa8bc;
  --sidebar-active: #1b2838;
  --topbar-bg: #ffffff;
  --input-bg: #ffffff;
  --thead-bg: #f3f5f8;
  --stat-bg: #ffffff;
  --focus-ring: #2f6fed;
}

/* Dark-mode override for themed systems that prefer dense ops look on login */
html[class*="theme-game-"] .login-body,
html[class*="theme-cps-"] .login-body,
html[class*="theme-promoter-"] .login-body,
html.theme-admin-default .login-body {
  background: #dde3ea;
}
html[class*="theme-"] .login-card {
  background: #fff;
  border-color: #cfd6e0;
  color: #1f2a37;
}
html[class*="theme-"] .login-card h1 { color: #1f2a37; }
html[class*="theme-"] .login-card label { color: #6b7785; }
html[class*="theme-"] .login-card input,
html[class*="theme-"] .login-card select {
  background: #fff;
  color: #1f2a37;
  border-color: #cfd6e0;
}

/* Theme picker in admin */
.theme-system-block { margin-bottom: 14px; }
.theme-system-block h3 {
  margin: 0 0 4px;
  border-bottom: 0;
  padding-bottom: 0;
}
.theme-system-block .sub {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-option {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}
.theme-option:hover { border-color: #aeb8c6; }
.theme-option.active {
  border-color: var(--accent);
  background: #f5f8ff;
}
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-swatches { display: flex; gap: 4px; margin-bottom: 8px; }
.theme-swatches span {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,.12);
}
.theme-option strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}
.theme-option p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.theme-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid #cfd6e0;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: #fff;
}
.theme-option.active .theme-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.theme-mini-preview {
  margin-top: 10px;
  height: 42px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #d8dde6;
  display: flex;
}
.theme-mini-preview .side { width: 22%; }
.theme-mini-preview .main {
  flex: 1;
  padding: 7px;
  display: flex;
  gap: 5px;
  background: #f3f5f8;
}
.theme-mini-preview .bar {
  flex: 1;
  border-radius: 1px;
  opacity: .95;
}
@media (max-width: 960px) {
  .theme-options { grid-template-columns: 1fr; }
}
