/* v0.6.8 — appearance only, scoped to Clean. Legacy module content remains light. */
.aui-shell .aui-preferences[hidden] { display:none !important; }
.aui-shell .aui-preferences { position:relative; flex:none; color:var(--aui-text); font:14px/1.45 var(--aui-font); }
.aui-shell .aui-preferences summary { cursor:pointer; border:1px solid var(--aui-border); border-radius:6px; padding:8px 10px; background:var(--aui-surface); color:var(--aui-text); }
.aui-shell .aui-preferences-panel { position:absolute; z-index:40; right:0; top:calc(100% + 6px); width:240px; max-width:calc(100vw - 32px); box-sizing:border-box; display:grid; gap:12px; padding:14px; background:var(--aui-surface); border:1px solid var(--aui-border); border-radius:10px; box-shadow:0 8px 24px #0002; }
.aui-shell .aui-preferences-panel label { display:grid; gap:4px; color:var(--aui-text); }
.aui-shell .aui-preferences-panel select { width:100%; min-height:38px; padding:5px; background:var(--aui-surface); color:var(--aui-text); border:1px solid var(--aui-border); border-radius:6px; font:inherit; }
.aui-shell .aui-pref-note { margin:0; color:var(--aui-muted); font:12px/1.4 var(--aui-font); }
.aui-shell .aui-preferences :focus-visible { outline:3px solid var(--aui-focus); outline-offset:2px; }
.aui-login .aui-preferences { margin:16px auto 0; width:fit-content; }
.aui-login .aui-preferences-panel { position:static; margin-top:6px; }
@media(max-width:800px) { .aui-shell .aui-topbar .aui-preferences { flex:1 1 100%; } .aui-shell .aui-topbar .aui-preferences-panel { position:static; width:100%; max-width:none; margin-top:6px; } }
html[data-aui-theme="dark"] body.aui-shell .aui-legacy-content,
html[data-aui-theme="dark"] body.aui-shell .aui-legacy-actions,
html[data-aui-theme="dark"] body.aui-shell .aui-mode { color-scheme:light; color: #1e293b; background:#fff; 
  --aui-primary: #004077;
  --aui-primary-hover: #00315c;
  --aui-sidebar: #ffffff;
  --aui-sidebar-muted: #64748b;
  --aui-sidebar-active: #e8f0fa;
  --aui-bg: #f5f7fa;
  --aui-surface: #fff;
  --aui-text: #1e293b;
  --aui-muted: #64748b;
  --aui-border: #e2e8f0;
  --aui-success: #246843;
  --aui-success-bg: #e4f4eb;
  --aui-warning: #81571b;
  --aui-warning-bg: #fef3df;
  --aui-danger: #a52b39;
  --aui-danger-bg: #fce8ea;
  --aui-focus: #1768ba;
  --aui-font: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --aui-s1: 4px; --aui-s2: 8px; --aui-s3: 12px; --aui-s4: 16px;
  --aui-s5: 24px; --aui-s6: 32px;
  --aui-radius: 10px;
  --aui-sidebar-width: 242px;
  --aui-header-height: 64px;
}
html[data-aui-theme="dark"] body.aui-shell,
html[data-aui-theme="dark"] body.aui-shell .aui-kit {
  color-scheme:dark;
  --aui-primary:#9ccaff; --aui-primary-hover:#b5d8ff;
  --aui-sidebar:#202936; --aui-sidebar-muted:#a9b9cc; --aui-sidebar-active:#28476b;
  --aui-bg:#161d27; --aui-surface:#222c3a; --aui-text:#e2e8f0; --aui-muted:#a9b9cc; --aui-border:#465264;
  --aui-success:#9be2b7; --aui-success-bg:#214735;
  --aui-warning:#f3ce89; --aui-warning-bg:#48371f;
  --aui-danger:#ffb3ba; --aui-danger-bg:#522a35; --aui-focus:#9ccaff;
  color:var(--aui-text);
}
html[data-aui-theme="dark"] .aui-shell .aui-kit { background:var(--aui-bg); }
html[data-aui-theme="dark"] .aui-shell a.aui-nav-link { color:var(--aui-text); }
html[data-aui-theme="dark"] .aui-shell a.aui-nav-link:hover { background:var(--aui-bg); }
html[data-aui-theme="dark"] .aui-shell a.aui-nav-link[aria-current="page"] { background:var(--aui-sidebar-active); color:var(--aui-primary); }
html[data-aui-theme="dark"] .aui-shell :is(.aui-topbar,.aui-login-main,.aui-kit) .aui-button:not(.aui-button-primary):not(.aui-button-danger):hover,
html[data-aui-theme="dark"] .aui-shell .aui-menu-toggle:hover { background:#304258; border-color:#71839a; }
html[data-aui-theme="dark"] .aui-shell :is(.aui-topbar,.aui-login-main,.aui-kit) .aui-button-primary,
html[data-aui-theme="dark"] .aui-shell .aui-kit .aui-page-current,
html[data-aui-theme="dark"] .aui-shell .aui-brand-mark { background:#245a88; border-color:#6596c4; color:#fff; }
html[data-aui-theme="dark"] .aui-shell :is(.aui-topbar,.aui-login-main,.aui-kit) .aui-button-primary:hover { background:#316a9c; color:#fff; }
html[data-aui-theme="dark"] .aui-shell .aui-kit .aui-button-danger { background:#a52b39; border-color:#db7884; color:#fff; }
html[data-aui-theme="dark"] .aui-shell .aui-kit .aui-input:not([aria-invalid=true]),
html[data-aui-theme="dark"] .aui-login .aui-login-form input:not([type=hidden]) { border-color:#71839a; }
html[data-aui-theme="dark"] .aui-shell .aui-skip { background:var(--aui-surface); }
html[data-aui-density="compact"] .aui-shell .aui-kit .aui-table :is(th,td) { padding:7px 12px; }
.aui-shell .aui-topbar .aui-preferences-panel { left:0; right:auto; }
@media(min-width:801px) and (max-width:1150px) { .aui-shell .aui-topbar { flex-wrap:wrap; gap:10px; } }
@media(min-width:801px) and (max-width:1150px) { .aui-shell .aui-topbar .aui-preferences { flex:1 1 100%; order:3; } .aui-shell .aui-topbar .aui-preferences-panel { position:static; width:100%; max-width:none; margin-top:6px; } }
