/* V14: architectural graphite, satin platinum and precise, quiet controls. */
.app-shell { grid-template-columns: 280px minmax(0, 1fr); }
.sidebar {
  position: relative; isolation: isolate; min-width: 0; padding: 30px 20px 18px;
  background: linear-gradient(110deg, #191b1d 0%, #121517 38%, #0c1013 100%);
  border-right: 1px solid #b7c1c521; box-shadow: inset -1px 0 #0008;
}
.sidebar::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none; inset: 0;
  background: repeating-linear-gradient(0deg, #ffffff02 0 1px, transparent 1px 4px);
  opacity: .6;
}
.sidebar-top { padding: 0 4px 28px; margin: 0; border: 0; flex-shrink: 0; }
.identity { gap: 14px; min-width: 0; }
.identity-mark {
  position: relative; width: 40px; height: 46px; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
.identity-mark::before, .identity-mark::after { display: none; }
.identity-mark .brand-glyph {
  width: 37px; height: 40px; color: #d8d5ce;
  filter: drop-shadow(0 1px 0 #fff7) drop-shadow(0 3px 3px #000);
}
.identity strong { color: #eeeae2; font-size: 19px; font-weight: 550; letter-spacing: .05em; }
.identity-sub { font-size: 6.8px; letter-spacing: .18em; color: #929b9f; margin-top: 7px; white-space: nowrap; }
.new-chat {
  min-height: 53px; padding: 12px 15px; gap: 12px; flex-shrink: 0;
  border-radius: 6px; border: 1px solid #e6dfd195;
  color: #252727; background: linear-gradient(110deg, #e0d9cc, #b8b6ad 70%, #d0ccc1);
  box-shadow: inset 0 1px #fff9, inset 0 -1px #4e4e4440, 0 5px 16px #0003;
}
.new-chat::before { display: none; }
.new-chat-icon { width: 22px; height: 24px; color: #333b3c; }
.new-chat-icon .ui-icon { width: 20px; height: 20px; stroke-width: 1.4; }
.new-chat-copy { flex: 1; }
.new-chat-copy strong { color: #222b2c; font-size: 13px; font-weight: 600; letter-spacing: .035em; }
.new-chat-arrow { color: #485154; width: 15px; height: 15px; }
.new-chat:hover { background: linear-gradient(110deg, #ede7db, #c7c6bb 70%, #dedacd); border-color: #f2eada; transform: none; }
.new-chat:active { transform: translateY(1px); box-shadow: inset 0 1px 3px #0002; }
.studio-nav { display: grid; gap: 3px; padding: 23px 0 22px; border-bottom: 1px solid #c3cccf17; flex-shrink: 0; }
.studio-nav-item {
  display: flex; align-items: center; gap: 13px; min-height: 43px; width: 100%; padding: 9px 11px;
  border: 1px solid transparent; border-radius: 6px; text-align: left;
  background: transparent; color: #bec6c9; font-size: 12px; letter-spacing: .02em;
}
.studio-nav-item > .ui-icon:first-child { width: 20px; height: 20px; flex-shrink: 0; color: #a7a59b; stroke-width: 1.3; }
.studio-nav-item > span:first-of-type { flex: 1; white-space: nowrap; }
.studio-nav-item kbd, .nav-detail { font-size: 9px; font-weight: 400; color: #747f85; white-space: nowrap; letter-spacing: 0; }
.studio-nav-item kbd { font-family: inherit; }
.studio-nav-item .nav-chevron { width: 12px; height: 12px; color: #707a7f; }
.studio-nav-item:hover { color: #f0ede6; background: #e4e4da08; border-color: #d6d3c815; }
.studio-nav-item:hover > .ui-icon:first-child { color: #ded4c1; }
.sidebar-section-heading { margin: 25px 10px 13px; color: #8e989d; font-size: 10px; letter-spacing: .065em; flex-shrink: 0; }
.sidebar-section-heading span:last-child { font-size: 10px; color: #77838a; border: 0; background: none; padding: 0; min-width: auto; }
.conversation-search {
  display: flex; align-items: center; gap: 9px; min-height: 35px; margin: 0 2px 12px; padding: 0 9px;
  border: 1px solid #a4b5bb1b; border-radius: 5px; background: #080c0f5c; flex-shrink: 0;
}
.conversation-search > .ui-icon { width: 14px; height: 14px; flex-shrink: 0; color: #77858c; }
.conversation-search input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: none; background: none; color: #d7dfe1; font-size: 11px; }
.conversation-search input::placeholder { color: #6f7e85; }
.conversation-search:focus-within { border-color: #bfb49e73; background: #090d10; }
.conversation-search input:focus-visible { outline: none; }
.conversation-list { margin: 0 -3px; padding: 0 3px 15px; min-height: 80px; scrollbar-width: thin; scrollbar-color: #68747844 transparent; }
.conversation-empty { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 10px; color: #7f8b91; line-height: 1.8; font-size: 11px; }
.conversation-empty > .ui-icon { width: 20px; height: 20px; color: #8c999e; stroke-width: 1.25; }
.conversation-group { margin: 11px 10px 8px; color: #8c9699; font-size: 9px; letter-spacing: .04em; }
.conversation-group:first-child { margin-top: 3px; }
.conversation-item { display: flex; align-items: center; gap: 0; min-height: 41px; padding: 2px 3px; border: 1px solid transparent; border-radius: 5px; }
.conversation-item.active { background: #d5cfbb09; border-color: #c8b89121; box-shadow: inset 2px 0 #c1b496; }
.conversation-item:hover { background: #d8dee208; }
.conversation-open { min-width: 0; flex: 1; padding: 9px 7px; gap: 9px; color: #b8c3c8; font-size: 11px; }
.conversation-open .conversation-glyph { width: 14px; height: 14px; color: #7b8a91; flex-shrink: 0; }
.conversation-open span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation-action { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 29px; padding: 5px; border-radius: 4px; color: #849198; opacity: 0; }
.conversation-action .ui-icon { width: 13px; height: 13px; }
.conversation-item:hover .conversation-action, .conversation-item:focus-within .conversation-action, .conversation-action.is-pinned { opacity: 1; }
.conversation-action:hover { color: #efe6d7; background: #d8d2bf0d; }
.pin-action.is-pinned { color: #c9b797; }
.sidebar-bottom { padding: 18px 0 0; margin-top: auto; border: 0; flex-shrink: 0; }
.access-panel {
  position: relative; overflow: hidden; border: 1px solid #8b929546; border-radius: 8px;
  background: linear-gradient(120deg, #2b2f30, #1a2023 50%, #141a1d 100%);
  box-shadow: inset 0 1px #e6e4d914, 0 12px 28px #0003;
}
.access-panel::before { inset: 0 auto auto 0; width: 100%; height: 1px; background: linear-gradient(90deg, #d3c5a7a3, #eff2eb14 70%); }
.access-panel::after { content: ''; position: absolute; pointer-events: none; width: 90px; height: 140px; right: -48px; top: -65px; border: 1px solid #ddd5bb10; transform: rotate(30deg); box-shadow: 0 0 0 12px #ddd5bb03, 0 0 0 25px #ddd5bb03; }
.access-panel-head { padding: 19px 16px 0; font-size: 8px; font-weight: 500; letter-spacing: .15em; color: #b7b5a8; }
.access-state { display: inline-flex; align-items: center; gap: 5px; color: #929e9f; font-size: 9px; letter-spacing: 0; }
.access-state::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #7c878b; }
.access-panel[data-active="true"] .access-state::before { background: #b0c7b3; box-shadow: 0 0 6px #b0c7b340; }
.usage-mini { padding: 25px 16px 19px; background: none; border: 0; box-shadow: none; }
.usage-heading { align-items: baseline; }
.usage-heading-label { color: #b4bebf; font-size: 10px; }
.usage-mini strong { color: #e3dfd4; font-size: 24px; font-weight: 350; letter-spacing: -.035em; }
.usage-track { height: 2px; margin: 17px 0 10px; background: #c2cdd11b; }
.usage-track span { background: linear-gradient(90deg, #8e9b9c, #cbbca0); }
.usage-mini small { color: #8a999f; font-size: 9px; }
.access-trigger { padding: 13px 15px; min-height: 64px; gap: 11px; border-top: 1px solid #b7c4c31a; background: #060a0b23; }
.access-trigger:hover { background: #d9d2bd08; }
.access-icon { width: 27px; height: 30px; border: 0; border-radius: 0; background: none; box-shadow: none; color: #bcb29e; }
.access-icon .ui-icon { width: 22px; height: 22px; stroke-width: 1.2; }
.access-copy strong { color: #d6dbd9; font-size: 12px; font-weight: 500; }
.access-copy small { font-size: 9px; color: #849299; }
.access-chevron { width: 13px; height: 13px; color: #869497; }
.side-footnote { margin: 18px 0 0; text-align: center; color: #67767e; font-size: 8px; letter-spacing: .08em; }
.sidebar-toggle { display: grid; place-items: center; width: 32px; height: 32px; margin-right: 6px; border: 1px solid #acbabe1c; border-radius: 5px; background: #bec7cb04; color: #a8b4ba; }
.sidebar-toggle .ui-icon { width: 17px; height: 17px; stroke-width: 1.4; }
.sidebar-toggle:hover { background: #b8c1bf0d; color: #e1d6c0; border-color: #c8bda747; }
.topbar-overline { color: #849399; }
.toast { z-index: 160; }
.studio-scene-sample.scene-balanced { filter: brightness(.78); }
.sidebar button:focus-visible { outline: 1px solid #d0c0a4; outline-offset: 3px; }
body[data-scene="cinematic"] .chat-surface:has(.empty-state:not([hidden]))::before { opacity: 1; }
body[data-scene="balanced"] .chat-surface:has(.empty-state:not([hidden]))::before { opacity: .74; }
body[data-scene="quiet"] .chat-surface:has(.empty-state:not([hidden]))::before { opacity: .25; }
body[data-reduced-motion="true"] *, body[data-reduced-motion="true"] *::before, body[data-reduced-motion="true"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (min-width: 761px) and (min-height: 501px), (min-width: 951px) {
  body.sidebar-collapsed .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  body.sidebar-collapsed .sidebar { padding: 28px 13px 20px; }
  body.sidebar-collapsed .sidebar-top { padding: 0 5px 28px; }
  body.sidebar-collapsed .identity-type, body.sidebar-collapsed .new-chat-copy,
  body.sidebar-collapsed .new-chat-arrow, body.sidebar-collapsed .studio-nav-item > span,
  body.sidebar-collapsed .studio-nav-item kbd, body.sidebar-collapsed .nav-chevron,
  body.sidebar-collapsed .sidebar-section-heading, body.sidebar-collapsed .conversation-search,
  body.sidebar-collapsed .conversation-list, body.sidebar-collapsed .access-panel-head,
  body.sidebar-collapsed .usage-mini, body.sidebar-collapsed .access-copy,
  body.sidebar-collapsed .access-chevron, body.sidebar-collapsed .side-footnote { display: none; }
  body.sidebar-collapsed .new-chat { padding: 12px; justify-content: center; min-height: 47px; }
  body.sidebar-collapsed .studio-nav { border-bottom: 0; gap: 10px; }
  body.sidebar-collapsed .studio-nav-item { justify-content: center; padding: 12px; height: 46px; }
  body.sidebar-collapsed .access-panel { background: none; border: 0; box-shadow: none; overflow: visible; }
  body.sidebar-collapsed .access-panel::before, body.sidebar-collapsed .access-panel::after { display: none; }
  body.sidebar-collapsed .access-trigger { min-height: 48px; padding: 10px; justify-content: center; border: 1px solid #cbbf9d38; border-radius: 6px; }
}
@media (hover: none) { .conversation-action { opacity: 1; } }
@media (max-width: 760px) {
  .sidebar { position: fixed; width: min(300px, 88vw); padding: 24px 18px 17px; overflow-y: auto; background: linear-gradient(110deg, #191b1d, #0c1013); }
  .sidebar-top { padding-bottom: 22px; }
  .sidebar-toggle { display: none; }
  .studio-nav { padding: 17px 0; }
  .sidebar-section-heading { margin-top: 19px; }
  .conversation-list { flex: 1 0 90px; }
  .sidebar-bottom { padding-top: 12px; }
  .access-panel-head { padding-top: 15px; }
  .usage-mini { padding-top: 18px; padding-bottom: 14px; }
  .side-footnote { margin-top: 13px; }
}
@media (max-height: 760px) and (min-width: 761px) {
  .sidebar { padding-top: 18px; padding-bottom: 12px; overflow-y: auto; }
  .sidebar-top { padding-bottom: 17px; }
  .studio-nav { padding: 12px 0; }
  .studio-nav-item { min-height: 39px; }
  .sidebar-section-heading { margin-top: 15px; margin-bottom: 10px; }
  .conversation-list { min-height: 60px; }
  .conversation-empty { padding-top: 10px; gap: 9px; }
  .sidebar-bottom { padding-top: 10px; }
  .access-panel-head { padding-top: 13px; }
  .usage-mini { padding-top: 16px; padding-bottom: 10px; }
  .access-trigger { min-height: 56px; }
  .side-footnote { margin-top: 12px; }
}
@media (max-height: 640px) { .sidebar { overflow-y: auto; } .conversation-list { flex: 1 0 80px; } }
