/* Fixed shell and navigation. No blur, translucent panels or external UI dependencies. */
.app-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: var(--header);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 192px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.9px;
}

.brand-dot {
  color: var(--orange);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 7px;
  background: var(--orange);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

.header-context {
  color: var(--subtle);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.header-account {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  min-width: 0;
}

#sessionName {
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiet-button {
  min-height: 36px;
  padding: 6px 12px;
  background: var(--paper);
}

.menu-toggle,
.menu-close {
  display: none;
}

.app-sidebar {
  position: fixed;
  left: 0;
  top: var(--header);
  bottom: 0;
  z-index: 25;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 27px 18px 18px;
  background: var(--surface-soft);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 12px 13px;
}

.workspace-badge,
.sidebar-label {
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 550;
  color: var(--subtle);
}

.sidebar-label {
  margin: 28px 12px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  margin: 4px 0;
  padding: 10px 12px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.4;
  transition:
    background 0.14s,
    color 0.14s;
}

.nav-link .icon {
  width: 18px;
  height: 18px;
  color: var(--subtle);
}

.nav-link:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.nav-link.active {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--border);
  box-shadow: var(--nav-shadow);
}

.nav-link.active .icon {
  color: var(--orange);
}

.nav-count {
  margin-left: auto;
  background: var(--peach);
  color: var(--accent-text);
  min-width: 24px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}

.sidebar-file {
  margin: 0 12px 12px;
  font-size: 11px;
  color: var(--subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}

.sidebar-profile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 6px;
  border-top: 1px solid var(--border);
}

.profile-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: var(--peach);
  font-size: 11px;
  font-weight: 650;
}

.sidebar-profile > div {
  min-width: 0;
}

.sidebar-profile strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 550;
}

.sidebar-profile div > span {
  display: block;
  font-size: 10px;
  color: var(--subtle);
}

.sidebar-footnote {
  font-size: 10px;
  color: var(--subtle);
  margin: 2px 6px;
}

.sidebar-overlay {
  display: none;
}

.app-area {
  margin-left: var(--sidebar);
  padding-top: var(--header);
  min-height: 100dvh;
}

.workspace-main {
  max-width: 1580px;
  margin: 0 auto;
  padding: 32px 38px 64px;
  min-width: 0;
}

.workspace-overview {
  scroll-margin-top: var(--scroll-offset);
  margin-bottom: 32px;
}

.overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 2px;
}

.title {
  max-width: 780px;
}

.title > p:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.workspace-greeting {
  color: var(--subtle);
  font-size: 12px;
  margin: 10px 0 24px;
}

.overview-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.overview-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.overview-card-accent {
  background: var(--orange);
  border-color: var(--orange);
}

.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
  font-size: 11px;
  color: var(--subtle);
}

.metric-label .icon {
  width: 16px;
  height: 16px;
  color: var(--subtle);
}

.overview-card-accent .metric-label,
.overview-card-accent .metric-label .icon {
  color: var(--on-accent);
}

.metric-value {
  font-size: 40px;
  font-weight: 550;
  letter-spacing: -1.8px;
  line-height: 1.2;
  margin: 20px 0 10px;
  font-variant-numeric: tabular-nums;
}

.overview-card p {
  font-size: 10px;
  color: var(--subtle);
  line-height: 1.5;
  margin: 0;
}

.overview-card-accent p {
  color: var(--on-accent);
}

.metric-link {
  font-size: 10px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: 16px;
  font-weight: 550;
}

.metric-link span {
  font-size: 17px;
  line-height: 1;
}

.metric-indicator {
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 2px;
}

/* Upload progress. */
.progress-panel {
  position: static;
  top: var(--header);
  z-index: 15;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding: 15px 38px 10px;
}

.progress-panel ol {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--subtle);
}

.progress-panel li {
  white-space: nowrap;
}

.progress-panel li.active {
  color: var(--blue);
  font-weight: 650;
}

.progress-panel li.is-complete:not(.active) {
  color: var(--action-hover);
}

.progress-panel p {
  font-size: 10px;
  color: var(--subtle);
  margin: 4px 0 0;
}

progress {
  display: block;
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  accent-color: var(--orange);
  background: var(--border);
}

progress::-webkit-progress-bar {
  background: var(--border);
}

progress::-webkit-progress-value {
  background: var(--orange);
}

progress::-moz-progress-bar {
  background: var(--orange);
}
