/* Alpha.6 workspace surfaces, navigation and preference disclosures. */
:root:not([data-theme="dark"]) {
  --canvas:#f2eff3;
  --gradient:radial-gradient(ellipse at 12% 8%,#e9dee866 0,transparent 48%),linear-gradient(135deg,#f4f0f5,#efeaf1 60%,#f4f0f5);
  --surface:#f7f4f8;
  --card:#f9f6fa;
  --sidebar:#f6f2f7;
  --soft:#ede7ef;
  --hover:#eee6ef;
  --active:#e8dce7;
  --input:#faf7fb;
  --line:#ddd4e0;
  --line-soft:#e7dfea;
  --muted:#6e6276;
  --subtle:#766a7f;
  --notice:#eee7f0;
  --terminal-bg:#f4f0f5;
  --terminal-toolbar:#ede5ee;
  --auth-shadow:0 18px 60px #36223c0a,0 2px 7px #36223c04;
}
.sidebar {padding:18px 14px 12px;overflow:visible;gap:0;}
.sidebar-header {flex:none;min-width:0;padding-bottom:12px;border-bottom:1px solid var(--line-soft);}
.sidebar-header .brand {margin:0;padding:0 12px;min-height:42px;max-width:100%;}
.sidebar-header .sidebar-controls {margin:10px 0 0;padding:0 6px;gap:5px;}
.sidebar-header .sidebar-controls .btn {width:28px;height:28px;min-height:28px;padding:0;color:var(--muted);font-size:18px;}
.sidebar-scroll {flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:12px 0;scrollbar-gutter:stable;}
.sidebar .sidebar-scroll .nav {display:flex;flex-direction:column;flex-shrink:0;min-height:0;gap:4px;overflow:visible;padding:0;}
.sidebar .nav-item {min-height:42px;padding:10px 12px;gap:11px;border-radius:9px;font-size:13px;}
.sidebar .nav-icon {width:19px;height:19px;}
.sidebar .nav-label,.sidebar .workspace-vms .nav-label {display:block;margin:0;padding:20px 12px 8px;line-height:1.35;letter-spacing:.035em;font-size:11px;}
.sidebar .workspace-vms {padding:0;margin:0;overflow:visible;}
.sidebar .workspace-vm-list {overflow:visible;max-height:none;padding:0;}
.sidebar .workspace-vm-list>.hint {padding:4px 12px;font-size:12px;}
.sidebar .sidebar-vm-row {gap:0;min-height:40px;}
.sidebar .sidebar-vm-row .sidebar-vm-open {display:flex;align-items:center;gap:11px;min-height:40px;padding:10px 12px;line-height:1.35;border:0;font-size:12px;}
.sidebar-vm-open>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sidebar .sidebar-vm-row>.btn:last-child {width:28px;min-width:28px;padding:6px 4px;margin-right:4px;color:var(--muted);}
.sidebar-bottom {position:static;flex:none;margin:0;padding-top:10px;border-top:1px solid var(--line-soft);}
.sidebar .profile {width:100%;min-height:58px;margin:0;padding:9px 12px;gap:10px;border:0;border-radius:10px;}
.sidebar .profile>div {flex:1;min-width:0;}
.sidebar .profile-name {max-width:none;width:100%;line-height:1.5;}
.sidebar .profile small {display:block;line-height:1.5;}
.profile-chevron {flex:none;color:var(--muted);font-size:17px;line-height:1;margin-left:auto;transition:transform .15s;}
.profile[aria-expanded="true"] .profile-chevron {transform:rotate(180deg);}
.shell[data-sidebar="collapsed"] .sidebar {padding:18px 8px 12px;}
.shell[data-sidebar="collapsed"] .sidebar-header .brand {padding:0;min-height:42px;}
.shell[data-sidebar="collapsed"] .sidebar-header .sidebar-controls {padding:0;}
.shell[data-sidebar="collapsed"] .sidebar-scroll {scrollbar-gutter:auto;}
.shell[data-sidebar="collapsed"] .sidebar .nav-item {padding:10px 8px;justify-content:center;}
.shell[data-sidebar="collapsed"] .sidebar .profile {padding:10px 0;justify-content:center;}
.shell[data-sidebar="collapsed"] .profile-chevron {display:none;}
.shell[data-sidebar="hidden"] .sidebar {overflow:hidden;}
.preference-menu {position:relative;min-width:0;}
.preference-popover {position:fixed;z-index:10010;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;padding:10px;border:1px solid var(--line);border-radius:15px;background:var(--surface);box-shadow:0 14px 50px #24102926;color:var(--text);}
.preference-popover[popover]{margin:0;inset:auto;}
.account-menu-diagnostics{padding:4px 8px 10px;border-bottom:1px solid var(--line-soft);margin-bottom:5px;}
.account-menu-diagnostics .hint{margin:2px 0 9px;font-size:11px;line-height:1.6;}
.account-menu-field{display:flex;gap:10px;justify-content:space-between;font-size:11px;margin-top:5px;color:var(--muted);}
.account-menu-field>span:last-child{text-align:end;max-width:175px;overflow-wrap:anywhere;}
.preference-popover-head {display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 6px 10px;font-size:12px;color:var(--muted);}
.preference-popover-head .preference-dismiss {width:27px;height:27px;min-height:27px;padding:0;font-size:19px;}
.preference-popover .preferences-controls,.preference-popover .preferences-inline,.shell[data-sidebar="collapsed"] .preference-popover .preferences-inline {display:grid;grid-template-columns:1fr;gap:9px;order:initial;margin:0;padding:10px 6px;}
.preference-popover .preference-field,.sidebar .preference-popover .preference-field,#preferences .preference-popover .preference-field {display:grid;grid-template-columns:1fr;gap:5px;width:100%;font-size:12px;color:var(--muted);}
.preference-popover .preference-select,#preferences .preference-popover select,.sidebar .preference-popover .preference-select {display:block;width:100%;max-width:none;min-height:38px;padding:7px 28px 7px 10px;border:1px solid var(--input-line);border-radius:8px;background:var(--input);font-size:13px;}
.account-menu-link.btn {width:100%;display:flex;align-items:center;gap:11px;justify-content:flex-start;padding:10px;border:0;font-size:13px;text-align:left;}
.account-menu-link.active {background:var(--active);color:var(--accent);}
.account-menu-logout.btn {width:100%;margin-top:7px;padding:10px;border:0;border-top:1px solid var(--line-soft);border-radius:0 0 8px 8px;color:var(--error-text);font-size:13px;text-align:left;}
.preference-backdrop {display:none;position:fixed;inset:0;z-index:10000;background:var(--backdrop);}
#preferences {padding:0;border:0;background:transparent;box-shadow:none;backdrop-filter:none;}
#preferences .preferences-trigger {display:flex;align-items:center;gap:8px;min-height:36px;padding:7px 11px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:12px;color:var(--muted);}
.preferences-trigger .nav-icon {width:16px;height:16px;}
.login-wrap {min-height:100dvh;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:26px;padding:88px 24px 32px;}
.login-card {width:min(480px,100%);padding:38px 40px 28px;border-radius:20px;position:relative;}
.login-card::before {content:"";position:absolute;left:40px;right:40px;top:0;height:2px;border-radius:0 0 4px 4px;background:var(--accent);opacity:.65;}
.login-card .login-brand {margin:0 0 30px;gap:14px;}
.login-card .login-brand .brand-mark {width:52px;height:52px;font-size:27px;border-radius:14px;}
.login-card .login-brand h1 {font-size:18px;letter-spacing:-.25px;}
.login-introduction {text-align:left;margin-bottom:25px;}
.login-eyebrow {margin:0 0 7px;font-size:11px;font-weight:600;letter-spacing:.08em;color:var(--accent);}
.login-introduction h2 {margin:0 0 12px;font-size:27px;font-weight:650;letter-spacing:-.6px;line-height:1.35;color:var(--strong);}
.login-description {font-size:13px;line-height:1.85;color:var(--muted);max-width:34em;}
.login-card>.btn.primary {min-height:46px;font-size:14px;font-weight:600;border-radius:10px;box-shadow:0 3px 8px #560c3010;}
.login-card>.btn.primary::after {content:"→";margin-left:12px;font-weight:400;}
.login-card>.btn.primary:disabled::after {content:"…";}
.login-card .error {margin:0 0 16px;font-size:12px;text-align:left;}
.login-account-note {margin-top:12px;color:var(--muted);font-size:11px;text-align:center;}
.login-capabilities {display:flex;flex-wrap:wrap;justify-content:center;gap:12px 28px;margin-top:25px;padding-top:21px;border-top:1px solid var(--line-soft);}
.login-capabilities>span {display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px;}
.login-capabilities .nav-icon {width:15px;height:15px;}
.login-footer {color:var(--muted);font-size:11px;text-align:center;}
@media(max-width:760px) {
  .shell .sidebar {padding:16px 14px 12px;overflow:visible;}
  .shell .sidebar .sidebar-scroll .nav {overflow:visible;}
  .shell .sidebar .nav-item {min-height:42px;padding:10px 12px;}
  .shell .sidebar .nav-label {padding-top:20px;}
  .shell .sidebar .sidebar-bottom {margin:0;padding-top:10px;}
  .shell .sidebar .profile {padding:9px 12px;}
  .preference-backdrop:not([hidden]) {display:block;}
  .preference-popover {left:12px!important;right:12px!important;bottom:12px!important;top:auto!important;width:auto!important;max-height:min(calc(var(--preference-viewport-height,100dvh) - 32px),560px)!important;border-radius:20px;padding:14px 14px max(14px,env(safe-area-inset-bottom));}
  .preference-popover-head {font-size:13px;padding-bottom:12px;}
  .preference-popover .preferences-controls,.preference-popover .preferences-inline {gap:12px;}
  #preferences {top:16px;right:16px;}
  #preferences .preferences-trigger {padding:8px 10px;}
  .login-wrap {padding:88px 20px 28px;gap:24px;}
  .login-card {padding:32px 28px 26px;border-radius:18px;}
  .login-card::before {left:28px;right:28px;}
  .login-introduction h2 {font-size:25px;}
}
@media(max-width:380px) {
  .login-wrap {padding-left:14px;padding-right:14px;}
  .login-card {padding-left:22px;padding-right:22px;}
  .login-introduction h2 {font-size:23px;}
}
@media(prefers-reduced-motion:reduce) {.profile-chevron {transition:none;}}

.workspace-bar .icon-button .nav-icon {width:18px;height:18px;display:block;}
