@import url("../../foundation/src/foundation.css");

html, body { min-height: 100%; margin: 0; }
body { overflow-x: hidden; }

.to-global-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  color: var(--to-text-primary);
  background: var(--to-bg-canvas);
  font-family: var(--to-font-sans);
  font-size: var(--to-font-size-sm);
  line-height: var(--to-line-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.to-skip-link { position: fixed; left: var(--to-space-4); top: var(--to-space-3); z-index: var(--to-z-toast); padding: var(--to-space-3) var(--to-space-4); border-radius: var(--to-radius-md); color: var(--to-action-on-primary); background: var(--to-action-primary); transform: translateY(-150%); }
.to-skip-link:focus { transform: translateY(0); }

.to-shell-sidebar { position: sticky; top: 0; z-index: var(--to-z-overlay); height: 100dvh; min-width: 0; display: flex; flex-direction: column; padding: .75rem; border-right: 0; color: #f3fbf7; background: #0b241c; box-shadow: none; overflow: hidden; }
.to-shell-sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: var(--to-space-2); padding-bottom: .75rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.to-shell-brand { display: flex; min-width: 0; align-items: center; gap: var(--to-space-3); }
.to-shell-brand img { width: 2.25rem; height: 2.25rem; object-fit: contain; border-radius: .55rem; }
.to-shell-wordmark { display: block; color: #fff; font-size: 1rem; font-weight: var(--to-weight-semibold); line-height: var(--to-line-tight); letter-spacing: -.04em; }
.to-shell-wordmark > span { color: var(--to-color-brand-500); }
.to-shell-brand small, .to-shell-profile-compact small { display: block; color: rgba(232,246,238,.62); font-size: .6875rem; }
.to-shell-brand small { display: none; }
.to-shell-nav { display: grid; align-content: start; gap: .125rem; margin-block: .875rem; overflow-y: auto; scrollbar-width: thin; }
.to-shell-nav__item { width: 100%; min-height: 2.55rem; display: grid; grid-template-columns: var(--to-icon-md) minmax(0,1fr) auto; align-items: center; gap: .625rem; padding: .45rem .625rem; border: 1px solid transparent; border-radius: .55rem; color: rgba(239,249,243,.7); background: transparent; cursor: pointer; text-align: left; font-size: .8125rem; transition: color var(--to-duration-fast) var(--to-ease-standard), background var(--to-duration-fast) var(--to-ease-standard), border-color var(--to-duration-fast) var(--to-ease-standard); }
.to-shell-nav__item:hover { color: #fff; background: rgba(255,255,255,.08); }
.to-shell-nav__item[aria-current="page"] { color: #fff; border-color: rgba(89,197,130,.22); background: #1c7a4c; font-weight: var(--to-weight-semibold); box-shadow: none; }
.to-shell-nav__item .to-badge { justify-self: end; min-width: 1.625rem; justify-content: center; }
.to-shell-sidebar__lower { display: grid; gap: .75rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.12); }
.to-shell-shortcuts { display: grid; gap: var(--to-space-1); }
.to-shell-shortcuts > button.to-button { min-height: 2rem; justify-content: flex-start; padding-inline: .45rem; border-color: transparent; color: rgba(239,249,243,.72); background: transparent; font-size: .72rem; }
.to-shell-shortcuts .to-button:hover:not(:disabled) { color: #fff; background: rgba(255,255,255,.08); }
.to-shell-profile-compact { display: flex; align-items: center; gap: var(--to-space-3); min-width: 0; }
.to-shell-profile-compact > div { min-width: 0; }
.to-shell-profile-compact strong { display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; }
.to-shell-avatar { width: 2rem; height: 2rem; display: grid; place-items: center; flex: none; border-radius: 50%; color: #dff7e8; background: rgba(87,190,127,.24); font-weight: var(--to-weight-semibold); font-size: .7rem; }
.to-shell-demo-status:empty { display: none; }
.to-shell-demo-status { margin: 0; color: var(--to-text-secondary); font-size: var(--to-font-size-xs); }
.to-shell-mobile-close, .to-shell-mobile-brand, .to-shell-mobile-nav { display: none; }
.to-shell-sidebar__top > .to-button { color: rgba(255,255,255,.72); border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }

@media (min-width: 80.0625rem) {
  .to-shell-sidebar__top > .to-button { display: none; }
}

.to-shell-content { min-width: 0; }
.to-shell-topbar { position: sticky; top: 0; z-index: var(--to-z-sticky); min-height: 4.25rem; display: flex; align-items: center; justify-content: space-between; gap: var(--to-space-4); padding: .65rem 1.125rem; border-bottom: 1px solid var(--to-border-default); background: color-mix(in srgb, var(--to-bg-surface) 94%, transparent); backdrop-filter: blur(14px); }
.to-shell-context { min-width: 0; display: none; }
.to-shell-quick-search.to-button { width: min(29rem, 42vw); min-height: 2.75rem; justify-content: flex-start; border-color: var(--to-border-default); color: var(--to-text-secondary); background: var(--to-bg-canvas); box-shadow: none; font-weight: var(--to-weight-regular); }
.to-shell-context__title { display: block; font-size: var(--to-font-size-lg); line-height: var(--to-line-tight); }
.to-shell-context__phase { display: block; color: var(--to-text-secondary); font-size: var(--to-font-size-xs); }
.to-shell-utilities { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: var(--to-space-1); }
.to-shell-utilities > button.to-button { position: relative; border-color: var(--to-border-default); color: var(--to-text-primary); background-color: var(--to-bg-surface); }
.to-shell-utilities > .to-button:hover:not(:disabled) { background: var(--to-bg-subtle); }
.to-shell-utilities > .to-button .to-badge { position: absolute; left: 1.45rem; top: -.35rem; width: 1.2rem; min-width: 1.2rem; max-width: 1.2rem; min-height: 1.2rem; padding-inline: 0; overflow: hidden; white-space: nowrap; justify-content: center; font-size: .625rem; }
.to-shell-utilities > [data-utility-id="search"] { display: none; }
.to-shell-profile-menu { position: absolute; right: 0; top: calc(100% + var(--to-space-2)); z-index: var(--to-z-dropdown); width: 15rem; padding: var(--to-space-2); border: 1px solid var(--to-border-default); border-radius: var(--to-radius-lg); background: var(--to-bg-elevated); box-shadow: var(--to-shadow-overlay); }
.to-shell-profile-menu[hidden] { display: none; }
.to-shell-profile-menu__identity { display: grid; padding: var(--to-space-3); border-bottom: 1px solid var(--to-border-default); }
.to-shell-profile-menu__identity span { color: var(--to-text-secondary); font-size: var(--to-font-size-xs); }
.to-shell-profile-menu [role="menuitem"] { width: 100%; min-height: var(--to-touch-target); padding: var(--to-space-2) var(--to-space-3); border: 0; border-radius: var(--to-radius-md); color: var(--to-text-primary); background: transparent; text-align: left; cursor: pointer; }
.to-shell-profile-menu [role="menuitem"]:hover { background: var(--to-bg-subtle); }
.to-shell-main { width: min(100%, var(--to-layout-max)); min-width: 0; margin-inline: auto; padding: 1rem 1.125rem 2.5rem; }

.to-workspace-placeholder { min-height: min(34rem, calc(100dvh - 9rem)); display: grid; align-content: center; justify-items: start; max-width: 52rem; padding: clamp(1.5rem, 5vw, 4rem); border: 1px solid var(--to-border-default); border-radius: var(--to-radius-xl); background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--to-state-new-bg) 70%, transparent), transparent 38%), var(--to-bg-surface); box-shadow: var(--to-shadow-raised); }
.to-workspace-placeholder__eyebrow { margin: 0 0 var(--to-space-2); color: var(--to-action-primary); font-size: var(--to-font-size-xs); font-weight: var(--to-weight-semibold); letter-spacing: .08em; text-transform: uppercase; }
.to-workspace-placeholder h1 { margin: 0; font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -.055em; }
.to-workspace-placeholder__lead { max-width: 40rem; margin-block: var(--to-space-5); color: var(--to-text-secondary); font-size: var(--to-font-size-lg); }
.to-workspace-placeholder__meta { width: min(100%, 36rem); display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--to-space-3); margin: 0; }
.to-workspace-placeholder__meta > div { padding: var(--to-space-3); border-radius: var(--to-radius-md); background: var(--to-bg-subtle); }
.to-workspace-placeholder dt { color: var(--to-text-secondary); font-size: var(--to-font-size-xs); }
.to-workspace-placeholder dd { margin: var(--to-space-1) 0 0; font-weight: var(--to-weight-semibold); }
.to-workspace-placeholder__note { margin: var(--to-space-6) 0 0; color: var(--to-text-secondary); font-size: var(--to-font-size-xs); }

.to-shell-surface { width: min(calc(100% - 2rem), 42rem); max-width: 42rem; max-height: min(44rem, calc(100dvh - 2rem)); padding: 0; border: 0; border-radius: var(--to-radius-xl); color: var(--to-text-primary); background: var(--to-bg-elevated); box-shadow: var(--to-shadow-overlay); }
.to-shell-surface::backdrop { background: var(--to-overlay); }
.to-shell-surface[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
.to-shell-surface__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--to-space-4); padding: var(--to-space-5); border-bottom: 1px solid var(--to-border-default); }
.to-shell-surface__header h2 { margin: 0; font-size: var(--to-font-size-xl); }
.to-shell-surface__header p { margin: var(--to-space-1) 0 0; color: var(--to-text-secondary); }
.to-shell-surface__body { min-height: 0; overflow: auto; padding: var(--to-space-5); }
.to-command-surface { align-self: start; margin-top: min(12vh, 7rem); }
.to-command-surface .to-search { width: 100%; }
.to-shell-search-results { display: grid; gap: var(--to-space-1); }
.to-shell-search-results .to-button { justify-content: flex-start; text-align: left; }
.to-shell-textarea { width: 100%; min-height: 8rem; resize: vertical; padding: var(--to-space-3); border: 1px solid var(--to-border-default); border-radius: var(--to-radius-md); color: var(--to-text-primary); background: var(--to-bg-surface); }
.to-shell-assistant-copy { padding: var(--to-space-4); border-radius: var(--to-radius-lg); color: var(--to-state-ai-text); background: var(--to-state-ai-bg); font-size: var(--to-font-size-md); }
.to-shell-more-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--to-space-2); }
.to-shell-more-list .to-button { justify-content: flex-start; }

.to-global-shell[data-sidebar-mode="collapsed"] { grid-template-columns: 5rem minmax(0,1fr); }
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-sidebar { padding-inline: var(--to-space-3); }
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-brand > div,
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-nav__label,
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-profile-compact > div,
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-shortcuts .to-button__content > :not(.to-icon),
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-demo-status { display: none; }
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-sidebar__top { justify-content: center; flex-wrap: wrap; }
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-nav__item { grid-template-columns: 1fr; justify-items: center; padding-inline: 0; }
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-nav__item .to-badge { position: absolute; margin: -1.6rem 0 0 1.6rem; }
.to-global-shell[data-sidebar-mode="collapsed"] .to-shell-profile-compact { justify-content: center; }

@media (min-width: 64.0625rem) and (max-width: 80rem) {
  .to-global-shell { grid-template-columns: 5rem minmax(0,1fr); }
  .to-shell-sidebar { padding-inline: var(--to-space-3); }
  .to-shell-brand > div, .to-shell-nav__label, .to-shell-profile-compact > div, .to-shell-shortcuts .to-button__content > :not(.to-icon), .to-shell-demo-status { display: none; }
  .to-shell-sidebar__top { justify-content: center; flex-wrap: wrap; }
  .to-shell-nav__item { grid-template-columns: 1fr; justify-items: center; padding-inline: 0; }
  .to-shell-nav__item .to-badge { position: absolute; margin: -1.6rem 0 0 1.6rem; }
  .to-shell-profile-compact { justify-content: center; }
}

@media (max-width: 64rem) {
  .to-global-shell { display: block; }
  .to-shell-sidebar { position: fixed; left: 0; width: min(20rem, calc(100% - 3rem)); transform: translateX(-105%); transition: transform var(--to-duration-base) var(--to-ease-standard); }
  .to-global-shell[data-nav-open="true"] .to-shell-sidebar { transform: translateX(0); }
  .to-global-shell[data-nav-open="true"]::after { content: ""; position: fixed; inset: 0; z-index: calc(var(--to-z-overlay) - 1); background: var(--to-overlay); }
  .to-shell-mobile-close { display: flex; justify-content: flex-end; }
  .to-shell-sidebar__top > .to-button { display: none; }
  .to-shell-mobile-brand { display: flex; align-items: center; gap: var(--to-space-3); }
  .to-shell-context { margin-right: auto; }
  .to-shell-quick-search { display: none !important; }
  .to-shell-context { display: block; }
  .to-shell-utilities > [data-utility-id="search"] { display: inline-flex; }
}

@media (max-width: 48rem) {
  .to-global-shell { padding-bottom: 4.75rem; }
  .to-shell-topbar { min-height: 4rem; padding-inline: var(--to-space-3); }
  .to-shell-context__phase { display: none; }
  .to-shell-mobile-brand .to-shell-wordmark { display: none; }
  .to-shell-utilities { gap: 0; }
  .to-shell-utilities > [data-utility-id="chat"], .to-shell-utilities > [data-utility-id="help"] { display: none; }
  .to-shell-main { padding: var(--to-space-4); }
  .to-workspace-placeholder { min-height: calc(100dvh - 9.5rem); padding: var(--to-space-6); }
  .to-workspace-placeholder__meta { grid-template-columns: 1fr; }
  .to-shell-mobile-nav { position: fixed; inset: auto 0 0; z-index: var(--to-z-sticky); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: var(--to-space-1); padding: var(--to-space-2); padding-bottom: max(var(--to-space-2), env(safe-area-inset-bottom)); border-top: 1px solid var(--to-border-default); background: color-mix(in srgb, var(--to-bg-surface) 94%, transparent); backdrop-filter: blur(14px); }
  .to-shell-mobile-nav button { min-width: 0; min-height: 3.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--to-space-1); padding: var(--to-space-1); border: 0; border-radius: var(--to-radius-md); color: var(--to-text-secondary); background: transparent; font-size: .6875rem; cursor: pointer; }
  .to-shell-mobile-nav button[aria-current="page"] { color: var(--to-action-primary); background: var(--to-state-new-bg); font-weight: var(--to-weight-semibold); }
  .to-shell-mobile-nav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .to-shell-surface { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .to-command-surface { margin: 0; }
  .to-shell-more-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .to-shell-sidebar { transition-duration: 1ms; }
}
.to-shell-attention-drawer .to-notification{grid-template-columns:minmax(0,1fr) auto;gap:.5rem .75rem}.to-shell-attention-drawer .to-notification>.to-badge{grid-column:1;justify-self:start}.to-shell-attention-drawer .to-notification__content{grid-column:1;line-height:1.35}.to-shell-attention-drawer .to-notification>.to-button{grid-column:2;grid-row:1/span 2;align-self:center;max-width:10rem;white-space:normal}.to-shell-attention-drawer .to-notification__content strong{display:block;margin-bottom:.16rem}.to-shell-attention-drawer .to-notification .to-card__meta{font-size:.72rem;color:var(--to-text-secondary)}
