/* One navigation shell shared by the integrated workspace and platform pages. */
.platform-nav {
  position: fixed; inset: 0 auto 0 0; z-index: 45;
  width: 260px; padding: 25px 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 9px;
  box-sizing: border-box; background: #141517; color: #b5b9c4;
  border-right: 1px solid #36383f;
  font: 17px/1.65 system-ui, -apple-system, "Noto Sans TC", sans-serif;
}
.platform-nav .brand { font-size: 23px; font-weight: 750; color: #fff; margin: 0 10px 22px; text-decoration: none; }
.platform-nav .caption { font-size: 13px; letter-spacing: .06em; margin: 12px 9px; color: #b5b9c4; }
.platform-nav nav { display: grid; gap: 6px; }
.platform-nav :is(nav a, nav button, .platform-link) {
  display: block; width: 100%; box-sizing: border-box; text-align: left;
  border: 0; border-radius: 10px; background: transparent; padding: 10px 12px;
  font: inherit; color: #b5b9c4; text-decoration: none; cursor: pointer;
}
.platform-nav :is(nav a, nav button, .platform-link):hover,
.platform-nav :is(.active, [aria-current=page]) { background: #292b30; color: #fff; text-decoration: none; }
.platform-nav :is(a, button):focus-visible { outline: 2px solid #b4a0ff; outline-offset: 3px; }
.platform-nav .nav-foot { margin-top: auto; font-size: 13px; color: #b5b9c4; padding: 24px 9px; }
.platform-nav .nav-account { display: flex; gap: 12px; align-items: center; padding: 0 9px; }
.platform-nav .nav-account :is(a,button) { color: #b5b9c4; background: #292b30; border: 1px solid #36383f; border-radius: 9px; padding: 6px 10px; font: inherit; text-decoration: none; cursor: pointer; }
body:has(>.platform-nav)>.app { display: block; margin-left: 260px; }
body:has(>.platform-nav)>.wrap { margin-left: 260px; width: auto; padding-left: 32px; padding-right: 32px; }
body:has(>.platform-nav) .ag-side { display: none !important; }
body.agent:has(>.platform-nav) { padding: 0; }
body.agent:has(>.platform-nav)>.app { display: flex; height: 100vh; border: 0; border-radius: 0; }
body:has(>.platform-nav)>.app>.rail { display: none !important; }
body:has(>.platform-nav)>main { margin-left: 260px; }
@media(max-width:900px) {
  .platform-nav { position: static; width: 100%; border-right: 0; border-bottom: 1px solid #36383f; padding: 12px; }
  .platform-nav nav { grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); }
  .platform-nav .brand { margin: 0 10px 8px; }
  .platform-nav .nav-foot, .platform-nav .nav-account { display: none; }
  body:has(>.platform-nav)>.app, body:has(>.platform-nav)>.wrap, body:has(>.platform-nav)>main { margin-left: 0; }
  body.agent:has(>.platform-nav) { height: auto; overflow: auto; }
  body.agent:has(>.platform-nav)>.app { height: calc(100dvh - 100px); min-height: 650px; }
}
/* Keep the mobile conversation below the shared navigation, with an accessible return action. */
@media(max-width:900px) {
  body.agent:has(>.platform-nav) .ag-work { overflow: auto; }
  body.agent:has(>.platform-nav) .ag-page { flex: none; max-height: 240px; }
  body.agent:has(>.platform-nav) .ag-panel {
    position: relative; inset: auto; flex: none; width: auto;
    margin: 0 12px 12px; height: 70dvh; min-height: 420px;
  }
}
