/* Accent palette. Loaded last so buttons, links, and shell chrome follow the choice. */
html[data-accent=olive]{--pine:#3d4a12;--pine-2:#5a6b19;--gold:#c4a035;--eyebrow:#5c4a12}
html[data-accent=navy]{--pine:#12304d;--pine-2:#1a4a73;--gold:#d3a33f;--eyebrow:#1a4068}
html[data-accent=teal]{--pine:#0f4c4c;--pine-2:#176b6b;--gold:#d4b45a;--eyebrow:#0f4c4c}
html[data-accent=wine]{--pine:#4a1828;--pine-2:#6b2440;--gold:#d3a33f;--eyebrow:#6b2440}
html[data-accent=slate]{--pine:#1e293b;--pine-2:#334155;--gold:#c9a227;--eyebrow:#334155}
html[data-accent=emerald]{--pine:#0b5d3b;--pine-2:#127a4e;--gold:#c4a035;--eyebrow:#0b5d3b}
html[data-accent=sky]{--pine:#0c4a6e;--pine-2:#0369a1;--gold:#d3a33f;--eyebrow:#0c4a6e}
html[data-accent=indigo]{--pine:#312e81;--pine-2:#4338ca;--gold:#d3a33f;--eyebrow:#312e81}
html[data-accent=plum]{--pine:#5b2156;--pine-2:#7a2d72;--gold:#d3a33f;--eyebrow:#5b2156}
html[data-accent=copper]{--pine:#7a3e12;--pine-2:#9a4f16;--gold:#c4a035;--eyebrow:#7a3e12}
html[data-accent=rose]{--pine:#9f1239;--pine-2:#be185d;--gold:#d3a33f;--eyebrow:#9f1239}

html[data-theme=dark]:not([data-accent]),
html[data-theme=dark][data-accent=pine]{--pine:#2f7a5c;--pine-2:#8ed0b2}
html[data-theme=dark][data-accent=olive]{--pine:#5c7018;--pine-2:#d4e07a}
html[data-theme=dark][data-accent=navy]{--pine:#1d5f96;--pine-2:#9ec5ef}
html[data-theme=dark][data-accent=teal]{--pine:#0f6e6e;--pine-2:#7dcece}
html[data-theme=dark][data-accent=wine]{--pine:#8a3050;--pine-2:#f0a3b8}
html[data-theme=dark][data-accent=slate]{--pine:#3d4f66;--pine-2:#cbd5e1}
html[data-theme=dark][data-accent=emerald]{--pine:#0f7a4a;--pine-2:#8ee0b8}
html[data-theme=dark][data-accent=sky]{--pine:#0e6294;--pine-2:#9ed4f5}
html[data-theme=dark][data-accent=indigo]{--pine:#4f46c8;--pine-2:#c7c4ff}
html[data-theme=dark][data-accent=plum]{--pine:#8a347f;--pine-2:#f0b6ea}
html[data-theme=dark][data-accent=copper]{--pine:#9a5418;--pine-2:#f0c39a}
html[data-theme=dark][data-accent=rose]{--pine:#be185d;--pine-2:#fecdd8}

html{
  --accent:var(--pine);
  --ag-accent:var(--pine);
  --brand:var(--pine);
  --accent-on:#fff;
  --accent-soft:color-mix(in srgb, var(--pine) 14%, #fff);
  --focus-ring:0 0 0 3px color-mix(in srgb, var(--pine) 32%, transparent);
  --btn-h:40px;
  --btn-h-sm:32px;
  --btn-h-lg:44px;
  --btn-radius:.65rem;
  --card-radius:.9rem;
  --card-bg:var(--surface,var(--bg-elevated,#fff));
  --card-fg:var(--text,#17231f);
  --card-muted:var(--text-muted,var(--muted,#5c6e66));
  --card-border:color-mix(in srgb, var(--accent,var(--pine)) 42%, #c5d5cc);
}
html[data-theme=dark]{
  --accent-soft:color-mix(in srgb, var(--pine) 28%, #0d1713);
  --card-border:color-mix(in srgb, var(--pine-2,var(--accent)) 58%, #1a2b24);
  --link-fg:var(--pine-2);
  --link-hover:#fff;
}

.accent-emerald{background:#0b5d3b}
.accent-sky{background:#0c4a6e}
.accent-indigo{background:#312e81}
.accent-plum{background:#5b2156}
.accent-copper{background:#7a3e12}
.accent-rose{background:#9f1239}

.admin-grid>.accent-palette-card{grid-column:1 / -1}
.accent-palette-card .accent-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.accent-preview{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1rem}
.accent-preview :is(.primary-button,.secondary-button){min-height:2.6rem;padding:0 1.1rem;pointer-events:none}
@media (max-width:900px){
  .accent-palette-card .accent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:520px){
  .accent-palette-card .accent-grid{grid-template-columns:1fr}
}

html:not([data-theme=dark]) :is(.primary-button,a.primary-button,button.primary-button,summary.primary-button,.approve-button,.inline-action){
  background:var(--pine);
  border-color:var(--pine);
  color:var(--accent-on);
}
html:not([data-theme=dark]) :is(.primary-button,a.primary-button,button.primary-button,summary.primary-button,.approve-button,.inline-action):hover{
  background:var(--pine-2);
  border-color:var(--pine-2);
  color:var(--accent-on);
}
html:not([data-theme=dark]) :is(.secondary-button,a.secondary-button,button.secondary-button,.text-button,a.text-button,button.text-button,.mobile-menu){
  color:var(--pine);
}
html[data-theme=dark] :is(.primary-button,a.primary-button,button.primary-button,summary.primary-button,.approve-button,.inline-action){
  background:var(--pine) !important;
  border-color:var(--pine-2) !important;
  color:#fff !important;
}
html[data-theme=dark] :is(.primary-button,a.primary-button,button.primary-button,summary.primary-button,.approve-button,.inline-action):hover{
  background:color-mix(in srgb, var(--pine) 78%, #fff) !important;
  border-color:var(--pine-2) !important;
}

.app-frame>.sidebar .sidebar-nav a.nav-item.active,
.sidebar a.nav-item.active{
  background:var(--pine);
  border-color:var(--pine);
  color:#fff;
}
html[data-theme=dark] .app-frame>.sidebar .sidebar-nav a.nav-item.active{
  background:var(--pine);
  border-color:var(--pine-2);
  color:#fff;
}
.app-frame>.sidebar .sidebar-nav a.nav-item:hover:not(.active),
.app-frame>.sidebar .sidebar-nav summary.nav-item:hover{
  color:var(--pine);
}
html[data-theme=dark] .app-frame>.sidebar .sidebar-nav a.nav-item:hover:not(.active),
html[data-theme=dark] .app-frame>.sidebar .sidebar-nav summary.nav-item:hover{
  color:var(--pine-2);
}
.app-frame>.sidebar .ws-ico{color:var(--pine)}
html[data-theme=dark] .app-frame>.sidebar .ws-ico{color:var(--pine-2)}
.abos-new>summary{background:var(--pine);color:#fff}
.cc-card strong,.cc-kpis strong{color:var(--pine)}
html[data-theme=dark] :where(.cc-card,.cc-kpis .surface) strong{color:var(--pine-2)}
.cc-quick a{background:var(--accent-soft);color:var(--pine)}
html[data-theme=dark] .cc-quick a{background:var(--accent-soft);color:var(--pine-2);border-color:transparent}
.quality-hero{background:linear-gradient(120deg,var(--pine),var(--pine-2))}
.avatar,.small-avatar{background:var(--pine)}
html[data-theme=dark] .usage-table a,
html[data-theme=dark] .data-table a,
html[data-theme=dark] .farm-list-actions a{color:var(--pine-2)}
