/* All optional icon sets retain the original corporate blue sidebar styling. */
:root[data-sidebar-theme="standard-blue-geometric"] .sidebar,
.sidebar-theme-preview[data-theme-preview="standard-blue-geometric"] {
  --menu-icon-front: #26c6c6; --menu-icon-side: #087b91; --menu-icon-top: #91fff3;
  --menu-icon-edge: #36bcc8; --menu-icon-detail: #092e42;
}
:root[data-sidebar-theme="plum-champagne"] .sidebar,
.sidebar-theme-preview[data-theme-preview="plum-champagne"] {
  --menu-icon-front: #accee8; --menu-icon-side: #6887af; --menu-icon-top: #edf7ff;
  --menu-icon-edge: #8faec9; --menu-icon-detail: #283a50; --menu-icon-frame: #e6cf9e;
}
:root[data-sidebar-theme="forest-copper"] .sidebar,
.sidebar-theme-preview[data-theme-preview="forest-copper"] {
  --menu-icon-front: #d79e73; --menu-icon-side: #739b82; --menu-icon-top: #f1ceb0;
  --menu-icon-edge: #a87956; --menu-icon-detail: #163c2b;
}
:root[data-sidebar-theme] .sidebar svg { stroke: none; filter: drop-shadow(0 2px 1px #00000035); }
:root[data-sidebar-theme] .sidebar .nav-module-icon { width: 25px; height: 25px; flex-basis: 25px; }
:root[data-sidebar-theme] .sidebar .nav-tree-nested .nav-module-icon { width: 19px; height: 19px; flex-basis: 19px; }
:root[data-sidebar-theme] .sidebar .nav-leaf-icon { width: 17px; height: 17px; flex-basis: 17px; }
.theme-icon-front { fill: var(--menu-icon-front); stroke: var(--menu-icon-edge); stroke-width: .45; stroke-linejoin: round; }
.theme-icon-side { fill: var(--menu-icon-side); stroke: var(--menu-icon-edge); stroke-width: .35; stroke-linejoin: round; }
.theme-icon-top { fill: var(--menu-icon-top); stroke: var(--menu-icon-edge); stroke-width: .35; stroke-linejoin: round; }
.theme-icon-detail { fill: none; stroke: var(--menu-icon-detail); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-fallback { fill: none; stroke: var(--menu-icon-front); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-frame { fill: #1c1d79; stroke: var(--menu-icon-frame); stroke-width: .9; }
.sidebar-theme-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
/* Theme selection uses the shared page tokens, independently of the chosen sidebar skin. */
.sidebar-themes-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.sidebar-themes-heading h1 { margin: 4px 0 8px; color: var(--ink); font-size: 26px; }
.sidebar-themes-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.sidebar-theme-options { min-width: 0; margin: 0; padding: 0; border: 0; }
.sidebar-theme-options > legend { padding: 0; margin-bottom: 14px; color: var(--ink); font-size: 14px; font-weight: 750; }
.sidebar-theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 18px; }
.sidebar-theme-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 400; cursor: pointer; }
.sidebar-theme-card:hover { border-color: var(--brand-turquoise-dark); }
.sidebar-theme-card.is-selected { border-color: var(--brand-turquoise-dark); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-turquoise) 15%, transparent); }
.sidebar-theme-card:focus-within { outline: 3px solid var(--brand-turquoise); outline-offset: 3px; }
.sidebar-theme-card > input { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; margin: 0; accent-color: var(--brand-turquoise-dark); z-index: 1; }
.sidebar-theme-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 750; }
.sidebar-theme-choice { visibility: hidden; color: var(--brand-turquoise-dark); }
.sidebar-theme-card.is-selected .sidebar-theme-choice { visibility: visible; }
.sidebar-theme-description { color: var(--muted); font-size: 12px; line-height: 1.5; }
.sidebar-theme-status { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.sidebar-theme-preview {
  display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 18px 14px 12px; border-radius: 8px;
  color: var(--menu-text); background: var(--menu-bg); font-size: 11px; line-height: 1.2; text-align: left;
}
.theme-preview-brand { padding-bottom: 6px; font-size: 16px; font-weight: 850; }
.theme-preview-search { display: block; padding: 9px 10px; border: 1px solid var(--menu-line); border-radius: 6px; color: var(--menu-muted); background: var(--menu-panel); }
.theme-preview-root { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.theme-preview-root > b { flex: 1; font-size: 11px; }
.theme-preview-root > span { color: var(--menu-accent); }
.sidebar-theme-preview svg { width: 24px; height: 24px; flex: 0 0 24px; fill: none; stroke: none; }
.theme-preview-tree { display: grid; gap: 3px; margin-left: 12px; padding-left: 10px; border-left: 1px solid var(--menu-line); }
.theme-preview-tree > span { display: flex; align-items: center; gap: 8px; min-height: 29px; padding: 3px 5px; }
.theme-preview-tree svg { width: 17px; height: 17px; flex-basis: 17px; }
.theme-preview-active { color: var(--menu-active-text); background: var(--menu-active); border-radius: 5px; box-shadow: inset 2px 0 var(--menu-accent); }
.sidebar-theme-preview {
  --menu-bg: #20218f; --menu-panel: #181861; --menu-text: #e1e9ea; --menu-muted: #c7ccff; --menu-line: #5470a5;
  --menu-accent: #52d8d3; --menu-active: #1f3b8b; --menu-active-text: #fff;
  background-image: repeating-linear-gradient(136deg, #00000020 0 1px, transparent 1px 34px);
}
.sidebar-theme-preview[data-theme-preview="default"] svg { stroke: var(--menu-accent); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 700px) {
  .sidebar-themes-heading { flex-direction: column; gap: 14px; }
  .sidebar-theme-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
}
@media (max-width: 450px) { .sidebar-theme-grid { grid-template-columns: 1fr; } }
