/* Minimal sidebar skin; scoped and independently reversible. */
@media screen {
  .app-shell > .sidebar {
    --sb-bg: #f8fafc;
    --sb-text: #101e3d;
    --sb-text-muted: #65748b;
    --sb-border: #dce3ec;
    --sb-divider: #dce3ec;
    --sb-item-hover: #edf1f6;
    --sb-item-active-bg: #fff0e5;
    --sb-item-active-text: #101e3d;
    --sb-item-active-shadow: none;
    --sb-row-height: clamp(22px, calc((100dvh - 230px) / 17), 30px);
    width: 192px;
    min-width: 192px;
    padding: 6px 8px;
    background: var(--sb-bg);
    box-shadow: none;
  }
  .app-shell > .sidebar.theme-dark {
    --sb-bg: #171d27;
    --sb-text: #e7efff;
    --sb-text-muted: #a4b0c2;
    --sb-border: #303a49;
    --sb-divider: #303a49;
    --sb-item-hover: #222d3c;
    --sb-item-active-bg: #3b2c24;
    --sb-item-active-text: #e7efff;
  }
  .sidebar .brand { gap: 7px; padding: 3px 2px 9px; margin-bottom: 8px; }
  .sidebar .brand-logo { width: 28px; height: 28px; background: transparent; box-shadow: none; color: #ea580c; }
  .sidebar .brand-logo svg { width: 25px; height: 25px; }
  .sidebar .brand-logo svg path:first-child { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
  .sidebar .brand-logo svg path:not(:first-child), .sidebar .brand-logo svg circle { display: none; }
  .sidebar .brand-text strong { font-size: 14px; letter-spacing: -.02em; }
  .sidebar .brand-text span { font-size: 8px; letter-spacing: .045em; font-weight: 500; }
  .sidebar .menu { gap: 8px; padding: 0; container-type: size; }
  .sidebar .menu-section { flex: 0 0 auto; gap: 0; margin: 0; }
  .sidebar .menu-section + .menu-section { margin-top: 0; }
  .sidebar .menu-section-title { height: 18px; flex: none; font-size: 10px; line-height: 14px; padding: 0 9px 4px; letter-spacing: .01em; text-transform: none; font-weight: 500; color: var(--sb-text-muted); }
  .sidebar .menu button { --sb-row-height: max(22px, calc((100cqh - 96px) / 17)); }
  .sidebar .menu-icon, .sidebar .menu-icon svg { width: 18px; height: 18px; }
  .sidebar .menu-icon svg { stroke-width: 1.65; }
  .sidebar .menu button { position: relative; flex: none; height: var(--sb-row-height); min-height: var(--sb-row-height); max-height: var(--sb-row-height); grid-template-columns: 16px minmax(0, 1fr); gap: 9px; padding: 0 9px; border-radius: 6px; color: var(--sb-text); box-shadow: none; transition: background-color 150ms ease; }
  .sidebar .menu button:active { transform: none; }
  .sidebar .menu button .menu-icon { color: var(--sb-text); background: transparent; border: 0; box-shadow: none; }
  .sidebar .menu button.active { background: var(--sb-item-active-bg); box-shadow: none; }
  .sidebar .menu button.active .menu-icon { color: #ea580c; }
  .sidebar .menu button.active::after { content: ''; position: absolute; right: 8px; top: calc(50% - 2px); width: 4px; height: 4px; border-radius: 50%; background: #f97316; }
  .app-shell .sidebar .menu button .menu-label { font-size: 14px !important; font-weight: 500 !important; color: var(--sb-text) !important; }
  .app-shell .sidebar .menu button.active .menu-label { font-weight: 600 !important; }
  .sidebar .menu button.active { padding-right: 18px; }
  .sidebar .sidebar-user { margin-top: 8px; padding: 8px 2px 2px; border: 0; border-top: 1px solid var(--sb-divider); border-radius: 0; background: transparent; box-shadow: none; grid-template-columns: 28px minmax(0, 1fr) 28px 28px; gap: 5px; }
  .sidebar .sidebar-user-avatar { background: #ffe6d5; color: #a53c08; font-weight: 600; }
  .sidebar .sidebar-user-info strong { color: var(--sb-text); }
  .sidebar .sidebar-user-info span { color: var(--sb-text-muted); }
  .sidebar .sidebar-user .theme-switch { width: 28px; color: var(--sb-text); }
  .sidebar .sidebar-user .theme-switch::before { inset: 5px; border-radius: 0; border: 0; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2m0 16v2M2 12h2m16 0h2M5 5l1.5 1.5m11 11L19 19M5 19l1.5-1.5m11-11L19 5'/%3E%3C/svg%3E") center / contain no-repeat; }
  .sidebar .sidebar-user .theme-switch-icon, .sidebar .sidebar-user .theme-switch-knob { display: none; }
  .sidebar .sidebar-user .theme-switch[aria-checked="true"]::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M20 15A9 9 0 0 1 9 4a9 9 0 1 0 11 11Z'/%3E%3C/svg%3E"); }
  .sidebar .sidebar-user .sidebar-logout-button { color: var(--sb-text); border-left: 1px solid var(--sb-divider); border-radius: 0; }
  .sidebar :is(.menu button,.theme-switch,.sidebar-logout-button):focus-visible { outline: 2px solid #ea580c !important; outline-offset: -2px; }
  @media (max-height: 600px) {
    .sidebar .menu { gap: 4px; }
    .sidebar .menu button { --sb-row-height: max(22px, calc((100cqh - 84px) / 17)); }
    .sidebar .brand { margin-bottom: 4px; padding-bottom: 6px; }
    .sidebar .sidebar-user { margin-top: 4px; padding-top: 6px; }
  }
  @media (prefers-reduced-motion: reduce) { .sidebar .menu button { transition: none; } }
}
