/* Base rules for the workspace navigation. The sidebar's appearance and its
   breakpoints are owned by workspace-v2.css, which loads later;
   history rows: session-list.css; quota card: membership.css. */
/* Session actions stay independent of administrator-controlled account links. */
.monochrome-shell .sidebar-profile-row{position:relative}
.monochrome-shell .sidebar-avatar-trigger{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:4px;border:0;border-radius:var(--nav-radius);background:transparent;color:var(--nav-primary);cursor:pointer}
.monochrome-shell .sidebar-avatar-trigger .avatar{position:relative;display:grid;place-items:center;width:28px;height:28px;overflow:hidden;border-radius:50%;background:var(--nav-selected);font-size:12px;font-weight:600}
.monochrome-shell .sidebar-avatar-trigger .avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.monochrome-shell .sidebar-avatar-trigger:hover,.monochrome-shell .sidebar-avatar-trigger[aria-expanded=true]{background:var(--nav-hover)}
.monochrome-shell .sidebar-user-menu{position:absolute;bottom:calc(100% + 6px);left:0;right:0;z-index:5;display:flex;flex-direction:column;gap:4px;padding:5px;border:1px solid var(--line-strong);border-radius:var(--nav-radius);background:var(--paper);box-shadow:0 8px 24px #0002}
.monochrome-shell .sidebar-user-menu[hidden]{display:none}
.monochrome-shell .sidebar-user-menu :is(a,button),.monochrome-shell .sidebar-session-actions button{display:flex;align-items:center;gap:9px;width:100%;min-height:40px;padding:8px 10px;border:0;border-radius:var(--nav-radius);background:transparent;color:var(--nav-primary);font:inherit;font-size:14px;text-align:left;cursor:pointer}
.monochrome-shell .sidebar-user-menu :is(a,button):hover,.monochrome-shell .sidebar-session-actions button:hover{background:var(--nav-hover)}
.monochrome-shell .sidebar-session-actions{display:block;margin-top:5px}
.monochrome-shell [data-user-menu=logout]:disabled{cursor:wait;opacity:.55}
@media(max-width:760px){.monochrome-shell .sidebar-avatar-trigger{width:44px;height:44px}.monochrome-shell .sidebar-user-menu :is(a,button),.monochrome-shell .sidebar-session-actions button{min-height:44px;font-size:14px}}
/* In short drawers, scroll the history rather than pushing account actions below the viewport. */
@media(max-height:520px){
 .monochrome-shell #workspace-navigation{overflow-y:hidden}
 .monochrome-shell .workspace-sidebar .sidebar-history{flex:1 1 0;min-height:0}
 .monochrome-shell .workspace-sidebar .history-list{flex:1 1 0;min-height:0;max-height:none}
}
.monochrome-shell .workspace-sidebar {
 --nav-primary:#e3e4e8; --nav-secondary:#a0a3ad;
 --nav-hover:#202226; --nav-selected:#292c31; --nav-focus:#aeb9ce;
 --nav-radius:8px; --nav-icon:18px;
 padding:16px 12px 12px; overflow:hidden;
 font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
 font-size:14px; font-weight:400; color:var(--nav-primary);
}
html[data-theme=light] .monochrome-shell .workspace-sidebar {
 --nav-primary:#30343b; --nav-secondary:#616773;
 --nav-hover:#eceef1; --nav-selected:#e6e8ec; --nav-focus:#65728c;
}
.monochrome-shell .sidebar-brand-row {display:flex;align-items:center;gap:8px;min-height:34px;flex-shrink:0;margin-bottom:14px;padding:0 6px}
.monochrome-shell .sidebar-brand {display:flex;align-items:center;gap:9px;min-width:0;flex:1;color:var(--nav-primary)}
.monochrome-shell .sidebar-brand .brand-name {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:600;letter-spacing:-.2px}
.monochrome-shell .sidebar-brand .brand-mark {display:grid;place-items:center;width:28px;height:28px;flex-shrink:0}
.monochrome-shell .sidebar-brand img {width:28px;height:28px;object-fit:contain;border-radius:7px}
.monochrome-shell .sidebar-brand .brand-mark svg {width:24px;height:24px}
.monochrome-shell .sidebar-brand-row .icon-btn {width:30px;height:30px;color:var(--nav-secondary)}

/* Shared row geometry aligns navigation and conversation titles. */
.monochrome-shell .sidebar-new,.monochrome-shell .workspace-nav-link {
 display:flex;align-items:center;gap:10px;flex:0 0 auto;width:100%;min-width:0;
 min-height:38px;padding:8px 10px;border:0;border-radius:var(--nav-radius);
 background:transparent;color:var(--nav-primary);text-align:left;
 font:inherit;font-size:14px;font-weight:400;line-height:22px;
 transition:background-color .14s,color .14s;cursor:pointer;
}
.monochrome-shell .sidebar-new {justify-content:flex-start;min-height:40px;margin:0 0 10px;border:1px solid var(--line);background:var(--surface);font-weight:500;box-shadow:none}
.monochrome-shell .sidebar-new>svg,.monochrome-shell .workspace-nav-link>svg {width:var(--nav-icon);height:var(--nav-icon);flex-shrink:0;stroke-width:1.65}
.monochrome-shell .workspace-nav-link>span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monochrome-shell .sidebar-new:hover,.monochrome-shell .workspace-nav-link:hover {background:var(--nav-hover);color:var(--nav-primary)}
.monochrome-shell .workspace-nav-link.active {background:var(--nav-selected);font-weight:550}
.monochrome-shell .workspace-upgrade {margin-top:4px}

.monochrome-shell .workspace-nav {
 display:flex;flex:1 1 auto;flex-direction:column;min-height:0;gap:2px;
 overflow-y:auto;overflow-x:hidden;padding:2px 2px 8px;border:0;
 overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:transparent transparent;
}
.monochrome-shell .workspace-nav:hover,.monochrome-shell .workspace-nav:focus-within,
.monochrome-shell .history-list:hover,.monochrome-shell .history-list:focus-within {scrollbar-color:var(--line-strong) transparent}
.monochrome-shell :is(.workspace-nav,.history-list)::-webkit-scrollbar {width:4px}
.monochrome-shell :is(.workspace-nav,.history-list)::-webkit-scrollbar-track {background:transparent}
.monochrome-shell :is(.workspace-nav,.history-list)::-webkit-scrollbar-thumb {background:transparent;border-radius:999px}
.monochrome-shell :is(.workspace-nav,.history-list):is(:hover,:focus-within)::-webkit-scrollbar-thumb {background:var(--line-strong)}
.monochrome-shell .sidebar-history {display:flex;flex-direction:column;flex:0 0 auto;min-height:0;margin:5px 0 3px;padding:0;border:0}
.monochrome-shell .history-search {position:relative;display:flex;align-items:center;flex-shrink:0;margin:0 0 6px;color:var(--nav-secondary)}
.monochrome-shell .history-search input {width:100%;min-width:0;height:34px;padding:7px 44px 7px 38px;border:1px solid var(--line);border-radius:var(--nav-radius);background:transparent;color:var(--nav-primary);font:inherit;font-size:12px;line-height:18px;transition:border-color .14s}
.monochrome-shell .history-search input::placeholder {color:var(--nav-secondary);opacity:1}
.monochrome-shell .history-search>svg {position:absolute;left:11px;width:16px;height:16px;pointer-events:none;stroke-width:1.65}
.monochrome-shell .history-search>kbd {position:absolute;right:7px;padding:1px 3px;font-size:9px;line-height:16px;border:1px solid var(--line);background:transparent;color:var(--nav-secondary);pointer-events:none}
.monochrome-shell .history-list {flex:0 0 auto;min-height:0;max-height:min(378px,40dvh);padding:0 2px 2px 0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:transparent transparent}
.monochrome-shell .history-empty {margin:0;padding:12px 10px;font-size:12px;line-height:1.6;color:var(--nav-secondary)}
.monochrome-shell .history-empty small {display:block;font-size:11px;margin-top:3px}
.monochrome-shell :is(.sidebar-history,.history-list)[hidden] {display:none}

.monochrome-shell .sidebar-footer {flex:0 0 auto;margin-top:6px;padding-top:9px;padding-bottom:env(safe-area-inset-bottom,0px);border-top:1px solid var(--line)}
.monochrome-shell .sidebar-utilities {display:block}
.monochrome-shell .sidebar-utilities:empty {display:none}
.monochrome-shell .sidebar-profile-row {display:flex;align-items:center;gap:6px;padding:8px 2px 0}
.monochrome-shell .sidebar-profile {display:flex;align-items:center;gap:8px;min-width:0;flex:1;color:var(--nav-primary);font-size:12px;border-radius:var(--nav-radius)}
.monochrome-shell .sidebar-profile>span:last-child {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monochrome-shell .sidebar-profile .avatar {position:relative;width:28px;height:28px;flex-shrink:0;overflow:hidden;background:var(--nav-hover);color:var(--nav-primary);font-size:11px;font-weight:500}
.monochrome-shell .sidebar-profile .avatar img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}
.monochrome-shell .sidebar-console {display:inline-flex;align-items:center;justify-content:center;min-height:30px;flex-shrink:0;padding:5px 7px;border:1px solid var(--line);border-radius:var(--nav-radius);background:transparent;color:var(--nav-primary);font-size:12px;font-weight:500;line-height:18px;white-space:nowrap}
.monochrome-shell .sidebar-console:hover,.monochrome-shell .sidebar-profile:hover {background:var(--nav-hover)}
.monochrome-shell .sidebar-profile-row>.icon-btn {width:30px;height:30px;flex-shrink:0;color:var(--nav-secondary)}
.monochrome-shell .workspace-sidebar :is(button,a,input):focus-visible {outline:2px solid var(--nav-focus);outline-offset:-2px}

@media(max-width:760px) {
 .monochrome-shell .workspace-sidebar {padding:16px 12px 12px}
 .monochrome-shell .sidebar-new,.monochrome-shell .workspace-nav-link {min-height:42px}
 .monochrome-shell .history-search input {font-size:16px;height:38px}
}
}
@media(prefers-reduced-motion:reduce) {
 .monochrome-shell .workspace-sidebar * {transition:none!important}
}
/* Shared navigation tokens. The sidebar itself is owned by workspace-v2.css. */
.monochrome-shell{--nav-primary:#e8eaf0;--nav-secondary:#9ca4b4;--nav-hover:#222834;--nav-selected:#2c3547;--nav-focus:#9dabce;--nav-radius:12px;--nav-icon:19px}
html[data-theme=light] .monochrome-shell{--nav-primary:#273247;--nav-secondary:#748099;--nav-hover:#eaf0f8;--nav-selected:#e1e9f6;--nav-focus:#5e76ac}
.monochrome-shell .workspace-sidebar{padding:22px 14px 15px;background:linear-gradient(155deg,var(--paper),var(--surface));border-right:1px solid var(--line);box-shadow:8px 0 34px #00000006}
.monochrome-shell .sidebar-brand-row{margin-bottom:22px;padding:0 4px}
.monochrome-shell .sidebar-brand .brand-name{font-size:17px;letter-spacing:.1px}
.monochrome-shell .brand-mark{background:var(--accent-faint);border:1px solid var(--line);border-radius:10px}
.monochrome-shell .sidebar-new{min-height:43px;border-radius:12px;background:var(--ink);color:var(--paper);border:0;box-shadow:0 4px 14px #0000000d;font-weight:550;margin-bottom:22px}
.monochrome-shell .sidebar-new:hover{background:var(--ink);color:var(--paper);opacity:.88}
.monochrome-shell .workspace-nav{gap:0;padding:0;min-height:0;overflow-y:auto;scrollbar-color:transparent transparent}
.monochrome-shell .workspace-nav:hover{scrollbar-color:var(--line-strong) transparent}
.monochrome-shell .workspace-nav-link{min-height:42px;padding:10px 11px;margin:2px 0;border-radius:12px;font-size:14px;line-height:21px;color:var(--nav-secondary)}
.monochrome-shell .workspace-nav-link.active{background:var(--nav-selected);color:var(--nav-primary);font-weight:550;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--line-strong) 45%,transparent)}
.monochrome-shell .workspace-nav-link:hover{background:var(--nav-hover);color:var(--nav-primary)}
.monochrome-shell .sidebar-footer{padding-top:14px;border-top:1px solid var(--line)}
.monochrome-shell .sidebar-profile-row{gap:7px;padding-top:12px}.monochrome-shell .sidebar-profile{font-size:12px}.monochrome-shell .sidebar-console{font-size:10px}
.model-specifications{display:flex;gap:7px;margin-right:6px}.model-specification{display:flex;flex-direction:column;gap:3px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--surface) 72%,var(--hover));min-width:76px;text-align:center}.model-specification small{font-size:9px;color:var(--muted);letter-spacing:.5px}.model-specification strong{font-size:14px;font-weight:600;line-height:18px;font-variant-numeric:tabular-nums}
.admin-shell .admin-sidebar{width:248px;padding:27px 16px 18px;background:linear-gradient(150deg,var(--paper),var(--surface));border-right:1px solid var(--line);box-shadow:8px 0 35px #00000005;scrollbar-width:thin;scrollbar-color:transparent transparent}.admin-shell .admin-sidebar:hover{scrollbar-color:var(--line-strong) transparent}
.admin-shell .admin-main{margin-left:248px}.admin-sidebar-title .brand{font-weight:650}.admin-group{margin:5px 0 12px}.admin-group summary{font-size:11px;font-weight:550;color:var(--muted);padding:12px 10px;letter-spacing:.4px;border-top:1px solid var(--line)}.admin-sidebar .admin-link,.admin-group .admin-link{font-size:13px;line-height:20px;min-height:40px;padding:10px 12px;border-radius:11px;gap:10px;color:var(--muted);margin:2px 0}.admin-sidebar .admin-link.active,.admin-group .admin-link.active{color:var(--ink);font-weight:600;background:var(--hover);box-shadow:inset 0 0 0 1px var(--line)}.admin-sidebar .admin-link:hover{color:var(--ink);background:var(--hover)}
@media(max-width:1120px){.model-specification{min-width:65px;padding:6px 8px}.admin-shell .admin-sidebar{width:226px}.admin-shell .admin-main{margin-left:226px}}
@media(max-width:760px){.monochrome-shell .workspace-sidebar{padding:24px 18px 16px}.monochrome-shell .workspace-nav-link{min-height:45px;font-size:15px}.model-intro-top{flex-wrap:wrap}.model-intro-actions{margin-left:auto;gap:4px}.model-specifications{gap:4px;margin:0}.model-specification{min-width:60px;padding:5px 7px}.model-specification strong{font-size:12px}.admin-shell .admin-main{margin-left:0}.admin-shell .admin-sidebar{width:290px}}

/* Separate new-session actions in the shared sidebar menu. */
.monochrome-shell .sidebar-new-modes button+button{margin-top:4px}
