/**
 * Admin UI palettes (sidebar picker). Default tokens live in admin.css :root.
 * html[data-admin-ui-theme] is set from localStorage by admin-theme.js / head boot.
 */

/* ---- Sidebar theme picker (mini “sidebar + main” graphic) ---- */
.pv2-theme-picker {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.85rem 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.pv2-theme-picker__label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pv2-muted);
  margin-bottom: 0.55rem;
}
.pv2-theme-picker__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.pv2-theme-opt {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.28rem;
  margin: 0;
  padding: 0.38rem 0.32rem 0.42rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  color: var(--pv2-text);
  font: inherit;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pv2-theme-opt:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}
.pv2-theme-opt:focus-visible {
  outline: 2px solid var(--pv2-accent-soft);
  outline-offset: 2px;
}
.pv2-theme-opt--on {
  border-color: var(--pv2-accent-soft);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}
.pv2-theme-swatch {
  display: flex;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.pv2-theme-swatch__side {
  width: 38%;
  flex-shrink: 0;
  background: var(--sw-side);
}
.pv2-theme-swatch__main {
  flex: 1;
  min-width: 0;
  background: var(--sw-main);
  display: flex;
  flex-direction: column;
  padding: 3px 4px 4px;
  gap: 3px;
}
.pv2-theme-swatch__bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--sw-bar);
  width: 72%;
  margin-top: auto;
}
.pv2-theme-opt__cap {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--pv2-muted);
  letter-spacing: 0.01em;
}
.pv2-theme-opt--on .pv2-theme-opt__cap {
  color: var(--pv2-text);
}

/* ---- Ocean (cool cyan / slate) ---- */
html[data-admin-ui-theme="ocean"] {
  --pv2-bg: #0c4a6e;
  --pv2-bg2: #082f49;
  --pv2-accent: #0284c7;
  --pv2-accent-hover: #0369a1;
  --pv2-accent-soft: #7dd3fc;
  --pv2-accent-glow: rgba(14, 165, 233, 0.32);
  --pv2-text: #f0f9ff;
  --pv2-muted: #94a3b8;
  --pv2-card: #ffffff;
  --pv2-border: #cbd5e1;
  --pv2-main-bg: #f0f9ff;
  --pv2-body-text: #0f172a;
  --pv2-link: #0369a1;
  --pv2-link-hover: #0c4a6e;
  --pv2-text-accent: #075985;
  --pv2-text-accent-hover: #0c4a6e;
  --pv2-ghost-hover-bg: #e0f2fe;
  --pv2-accent-border-user: rgba(3, 105, 161, 0.28);
  --pv2-accent-border-strong: rgba(14, 165, 233, 0.4);
  --pv2-btn-grad-top: #38bdf8;
  --pv2-menu-shadow: rgba(15, 23, 42, 0.08);
  --pv2-dash-ok: #0369a1;
  --pv2-info-border: rgba(14, 165, 233, 0.22);
  --pv2-info-title: #075985;
  --pv2-main-glow-a: rgba(56, 189, 248, 0.12);
  --pv2-main-glow-b: rgba(12, 74, 110, 0.06);
  --pv2-auth-glow-a: rgba(14, 165, 233, 0.35);
  --pv2-auth-glow-b: rgba(125, 211, 252, 0.12);
  --pv2-user-link-hover-bg: rgba(56, 189, 248, 0.18);
  --pv2-nav-active-bg: rgba(56, 189, 248, 0.18);
  --pv2-login-logo-border: rgba(125, 211, 252, 0.45);
}

html[data-admin-ui-theme="ocean"] body.pv2-auth {
  background: linear-gradient(155deg, #082f49 0%, var(--pv2-bg) 42%, #0a1628 100%);
}

/* ---- Plum (violet) ---- */
html[data-admin-ui-theme="plum"] {
  --pv2-bg: #3b0764;
  --pv2-bg2: #2e0550;
  --pv2-accent: #9333ea;
  --pv2-accent-hover: #7e22ce;
  --pv2-accent-soft: #d8b4fe;
  --pv2-accent-glow: rgba(168, 85, 247, 0.35);
  --pv2-text: #faf5ff;
  --pv2-muted: #c4b5fd;
  --pv2-card: #fefcff;
  --pv2-border: #e9d5ff;
  --pv2-main-bg: #faf5ff;
  --pv2-body-text: #1e1b4b;
  --pv2-link: #6d28d9;
  --pv2-link-hover: #4c1d95;
  --pv2-text-accent: #5b21b6;
  --pv2-text-accent-hover: #3b0764;
  --pv2-ghost-hover-bg: #f3e8ff;
  --pv2-accent-border-user: rgba(109, 40, 217, 0.28);
  --pv2-accent-border-strong: rgba(168, 85, 247, 0.38);
  --pv2-btn-grad-top: #a855f7;
  --pv2-menu-shadow: rgba(59, 7, 100, 0.1);
  --pv2-dash-ok: #6d28d9;
  --pv2-info-border: rgba(147, 51, 234, 0.22);
  --pv2-info-title: #5b21b6;
  --pv2-main-glow-a: rgba(168, 85, 247, 0.1);
  --pv2-main-glow-b: rgba(59, 7, 100, 0.05);
  --pv2-auth-glow-a: rgba(168, 85, 247, 0.38);
  --pv2-auth-glow-b: rgba(216, 180, 254, 0.12);
  --pv2-user-link-hover-bg: rgba(168, 85, 247, 0.2);
  --pv2-nav-active-bg: rgba(168, 85, 247, 0.22);
  --pv2-login-logo-border: rgba(216, 180, 254, 0.45);
}

html[data-admin-ui-theme="plum"] body.pv2-auth {
  background: linear-gradient(155deg, #1e0539 0%, var(--pv2-bg) 42%, #0f172a 100%);
}

/* ---- Graphite (neutral operator console) ---- */
html[data-admin-ui-theme="graphite"] {
  --pv2-bg: #1e293b;
  --pv2-bg2: #0f172a;
  --pv2-accent: #64748b;
  --pv2-accent-hover: #475569;
  --pv2-accent-soft: #cbd5e1;
  --pv2-accent-glow: rgba(148, 163, 184, 0.28);
  --pv2-text: #f8fafc;
  --pv2-muted: #94a3b8;
  --pv2-card: #ffffff;
  --pv2-border: #e2e8f0;
  --pv2-main-bg: #f8fafc;
  --pv2-body-text: #0f172a;
  --pv2-link: #334155;
  --pv2-link-hover: #0f172a;
  --pv2-text-accent: #334155;
  --pv2-text-accent-hover: #0f172a;
  --pv2-ghost-hover-bg: #f1f5f9;
  --pv2-accent-border-user: rgba(71, 85, 105, 0.28);
  --pv2-accent-border-strong: rgba(100, 116, 139, 0.35);
  --pv2-btn-grad-top: #94a3b8;
  --pv2-menu-shadow: rgba(15, 23, 42, 0.08);
  --pv2-dash-ok: #334155;
  --pv2-info-border: rgba(100, 116, 139, 0.22);
  --pv2-info-title: #334155;
  --pv2-main-glow-a: rgba(148, 163, 184, 0.12);
  --pv2-main-glow-b: rgba(15, 23, 42, 0.04);
  --pv2-auth-glow-a: rgba(148, 163, 184, 0.3);
  --pv2-auth-glow-b: rgba(203, 213, 225, 0.1);
  --pv2-user-link-hover-bg: rgba(148, 163, 184, 0.2);
  --pv2-nav-active-bg: rgba(148, 163, 184, 0.15);
  --pv2-login-logo-border: rgba(203, 213, 225, 0.4);
}

html[data-admin-ui-theme="graphite"] body.pv2-auth {
  background: linear-gradient(155deg, #020617 0%, var(--pv2-bg) 42%, #0f172a 100%);
}
