/* The workspace sidebar: one column — brand, new conversation, places,
   conversation history, account. This file owns its appearance; shell geometry
   is in monochrome.css, history rows in session-list.css, the plan card in membership.css. */
.monochrome-shell .workspace-sidebar{--nav-radius:9px;--nav-icon:18px;--nav-primary:#e7e9ee;--nav-secondary:#8a92a1;--nav-hover:#ffffff09;--nav-selected:#ffffff12;--nav-line:#ffffff0f;--nav-focus:#a9a8ff;display:flex;flex-direction:column;gap:0;padding:16px 12px 12px;background:#0f1115;border-right:1px solid var(--nav-line);box-shadow:none;font-size:14px;color:var(--nav-primary);overflow:hidden}
html[data-theme=light] .monochrome-shell .workspace-sidebar{--nav-primary:#1f2329;--nav-secondary:#565d6b;--nav-hover:#00000006;--nav-selected:#0000000e;--nav-line:#e6e8ec;--nav-focus:#5d5cde;background:#f7f7f8}

.monochrome-shell .sidebar-brand-row{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-height:36px;margin:0 0 14px;padding:0 6px}
.monochrome-shell .sidebar-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:1;color:var(--nav-primary)}
.monochrome-shell .sidebar-brand .brand-mark{display:grid;place-items:center;width:30px;height:30px;flex:none;border:0;border-radius:9px;background:var(--nav-selected)}
.monochrome-shell .sidebar-brand .brand-mark svg{width:20px;height:20px}
.monochrome-shell .sidebar-brand img{width:30px;height:30px;object-fit:contain;border-radius:9px}
.monochrome-shell .sidebar-brand .brand-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:650;letter-spacing:-.015em}

.monochrome-shell .sidebar-new{display:flex;align-items:center;justify-content:flex-start;gap:10px;flex:0 0 auto;width:100%;min-height:40px;margin:0 0 10px;padding:0 12px;border:0;border-radius:10px;background:#eceef2;color:#14181f;font:inherit;font-size:14px;font-weight:600;line-height:20px;box-shadow:none;cursor:pointer;transition:background-color .14s,opacity .14s}
.monochrome-shell .sidebar-new:hover{background:#fff;color:#14181f;opacity:1}
.monochrome-shell .sidebar-new>svg{width:18px;height:18px;flex:none;stroke-width:2}
html[data-theme=light] .monochrome-shell .sidebar-new{background:#1f2329;color:#fff;box-shadow:none}
html[data-theme=light] .monochrome-shell .sidebar-new:hover{background:#343a46;color:#fff}

.monochrome-shell .workspace-nav{display:flex;flex-direction:column;flex:0 0 auto;gap:1px;min-height:0;margin:0;padding:0;border:0;overflow:visible}
.monochrome-shell .workspace-nav-link{display:flex;align-items:center;gap:11px;flex:0 0 auto;width:100%;min-width:0;min-height:36px;margin:0;padding:7px 10px;border:0;border-radius:var(--nav-radius);background:transparent;color:var(--nav-primary);font:inherit;font-size:14px;font-weight:400;line-height:22px;text-align:left;box-shadow:none;cursor:pointer;transition:background-color .14s,color .14s}
.monochrome-shell .workspace-nav-link>svg{width:var(--nav-icon);height:var(--nav-icon);flex:none;color:var(--nav-secondary);stroke-width:1.7}
.monochrome-shell .workspace-nav-link>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monochrome-shell .workspace-nav-link:hover{background:var(--nav-hover);color:var(--nav-primary)}
.monochrome-shell .workspace-nav-link.active,html[data-theme=light] .monochrome-shell .workspace-nav-link.active{background:var(--nav-selected);color:var(--nav-primary);font-weight:550;box-shadow:none}
.monochrome-shell .workspace-nav-link.active>svg,html[data-theme=light] .monochrome-shell .workspace-nav-link.active>svg{color:var(--nav-primary)}

/* History fills the space between the places and the account footer. */
.monochrome-shell .sidebar-history{display:flex;flex-direction:column;flex:1 1 0;min-height:0;margin:10px 0 0;padding:10px 0 0;border:0;border-top:1px solid var(--nav-line)}
.monochrome-shell .history-search{position:relative;display:flex;align-items:center;gap:8px;flex:0 0 auto;height:36px;margin:0 0 6px;padding:0 10px;border:1px solid var(--nav-line);border-radius:var(--nav-radius);background:transparent;color:var(--nav-secondary);transition:border-color .14s,background-color .14s}
.monochrome-shell .history-search:focus-within{border-color:var(--nav-focus);background:transparent}
.monochrome-shell .history-search>svg{position:static;flex:none;width:15px;height:15px;stroke-width:1.8;pointer-events:none}
/* The wrapper owns the focus ring; an inner input shadow creates two vertical seams. */
.monochrome-shell .history-search input{flex:1;min-width:0;width:auto;height:100%;padding:0;border:0;border-radius:0;background:transparent;color:var(--nav-primary);font:inherit;font-size:13px;line-height:20px;outline:0;box-shadow:none}
.monochrome-shell .workspace-sidebar .history-search input:focus-visible{outline:0}
.monochrome-shell .history-search input::placeholder{color:var(--nav-secondary);opacity:1}
.monochrome-shell .history-search input::-webkit-search-cancel-button{display:none}
.monochrome-shell .history-search>kbd{position:static;flex:none;padding:0 5px;border:1px solid var(--nav-line);border-radius:5px;background:transparent;color:var(--nav-secondary);font:inherit;font-size:10px;line-height:17px;white-space:nowrap;pointer-events:none}
.monochrome-shell .history-search:focus-within>kbd{display:none}
.monochrome-shell .history-list{flex:1 1 0;min-height:0;max-height:none;margin:0 -4px 0 0;padding:0 4px 6px 0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:auto;scrollbar-width:thin;scrollbar-color:transparent transparent}
.monochrome-shell .history-list:hover,.monochrome-shell .history-list:focus-within{scrollbar-color:var(--line-strong) transparent}
.monochrome-shell .history-group{margin:0}
.monochrome-shell .history-group-title{margin:0;padding:12px 10px 4px;color:var(--nav-secondary);font-size:12px;font-weight:500;line-height:18px;letter-spacing:.01em}
.monochrome-shell .history-empty{margin:0;padding:14px 10px;color:var(--nav-secondary);font-size:12px;line-height:1.6}
.monochrome-shell .history-empty small{display:block;margin-top:3px;font-size:11px}

.monochrome-shell .sidebar-footer{flex:0 0 auto;margin:0;padding:12px 0 env(safe-area-inset-bottom,0px);border-top:1px solid var(--nav-line)}
html[data-theme=light] .monochrome-shell .sidebar-footer{border-top-color:var(--nav-line)}
.monochrome-shell .sidebar-account-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:6px;padding:0 0 8px}
.monochrome-shell .sidebar-account-links:empty{display:none}
.monochrome-shell .sidebar-account-links .workspace-nav-link{justify-content:center;gap:7px;min-height:32px;margin:0;padding:5px 8px;border:1px solid var(--nav-line);color:var(--nav-primary);font-size:12.5px;line-height:20px}
.monochrome-shell .sidebar-account-links .workspace-nav-link>svg{width:15px;height:15px}
.monochrome-shell .sidebar-account-links .workspace-upgrade>svg{color:#8f8dff}
html[data-theme=light] .monochrome-shell .sidebar-account-links .workspace-upgrade>svg{color:#5d5cde}
.monochrome-shell .sidebar-utilities{display:block}
.monochrome-shell .sidebar-utilities:empty{display:none}
.monochrome-shell .sidebar-membership,html[data-theme=light] .monochrome-shell .sidebar-membership{display:block;padding:0;border:0;border-radius:10px;background:transparent}
.monochrome-shell .sidebar-membership strong{font-size:13px}
.monochrome-shell .sidebar-profile-row{display:flex;align-items:center;gap:4px;margin:0;padding:8px 0 0}
.monochrome-shell .sidebar-profile{display:flex;align-items:center;gap:9px;flex:1;min-width:0;min-height:36px;padding:3px 6px;border-radius:var(--nav-radius);color:var(--nav-primary);font-size:13px;font-weight:500}
.monochrome-shell .sidebar-profile>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.monochrome-shell .sidebar-profile .avatar{position:relative;display:grid;place-items:center;width:28px;height:28px;flex:none;overflow:hidden;border-radius:50%;background:var(--nav-selected);color:var(--nav-primary);font-size:12px;font-weight:600}
.monochrome-shell .sidebar-profile .avatar img{position:absolute;inset:0;z-index:1;width:100%;height:100%;object-fit:cover}
.monochrome-shell .sidebar-profile:hover,.monochrome-shell .sidebar-profile[aria-current=page]{background:var(--nav-hover)}
.monochrome-shell .sidebar-console,html[data-theme=light] .monochrome-shell .sidebar-console{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:28px;padding:0 9px;border:1px solid var(--nav-line);border-radius:7px;background:transparent;color:var(--nav-secondary);font-size:12px;font-weight:500;line-height:1;white-space:nowrap}
.monochrome-shell .sidebar-console:hover{background:var(--nav-hover);color:var(--nav-primary)}
.monochrome-shell .sidebar-profile-row>.icon-btn{width:32px;height:32px;flex:none;border-radius:8px;color:var(--nav-secondary)}
.monochrome-shell .sidebar-profile-row>.icon-btn:hover{background:var(--nav-hover);color:var(--nav-primary)}
.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:14px 12px 12px}
 .monochrome-shell .workspace-nav-link{min-height:42px;font-size:15px}
 .monochrome-shell .sidebar-account-links .workspace-nav-link{min-height:38px;font-size:13px}
 .monochrome-shell .sidebar-new{min-height:44px}
 .monochrome-shell .history-search{height:40px}
 .monochrome-shell .history-search input{font-size:16px}
 .monochrome-shell .history-search>kbd{display:none}
}
/* Short windows (a laptop at 150–175 % scaling). The history keeps at least
   three rows: first the two account links give way (both are reachable from
   the plan card and the top bar), then the plan card shrinks to one line, and
   only below that does the whole column scroll. */
.monochrome-shell .history-list{min-height:112px}
@media(max-height:700px){
 .monochrome-shell .sidebar-account-links{display:none}
 .monochrome-shell .sidebar-footer{padding-top:8px}
}
@media(max-height:620px){
 .monochrome-shell .sidebar-membership .membership-mini-sub{display:none}
 .monochrome-shell .sidebar-membership .membership-mini-meter{margin-bottom:2px}
 .monochrome-shell .sidebar-brand-row{margin-bottom:8px}
 .monochrome-shell .sidebar-history{margin-top:6px;padding-top:6px}
 .monochrome-shell .workspace-nav-link{min-height:36px;padding-top:6px;padding-bottom:6px}
 .monochrome-shell .sidebar-new{min-height:40px}
 .monochrome-shell .history-group-title{padding-top:8px}
}
@media(max-height:520px){
 .monochrome-shell .workspace-sidebar{overflow-y:auto;overscroll-behavior:contain}
 .monochrome-shell .sidebar-history{flex:0 0 auto}
 .monochrome-shell .history-list{flex:0 0 auto;max-height:200px}
}
@media(prefers-reduced-motion:reduce){.monochrome-shell .workspace-sidebar *{transition:none!important}}
