.app-window {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cfc7dc;
  border-radius: 28px;
  background: var(--app-bg);
  box-shadow: var(--shadow-app);
}

.app-topbar {
  min-height: 56px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
}

.app-brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-size: 10px;
}

.app-search {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 430px;
  padding: 0 13px;
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--muted-foreground);
  font-size: 11px;
}

.app-user {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 9px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.app-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 850;
}

.app-journey-header {
  padding: 17px 22px 0;
  background: var(--surface);
}

.app-journey-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-breadcrumb {
  margin-bottom: 3px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.app-journey-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-journey-title h3 {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.app-journey-title span {
  color: var(--muted-foreground);
  font-size: 11px;
}

.app-header-actions {
  display: flex;
  gap: 7px;
}

.app-tabs {
  display: flex;
  gap: 22px;
  margin-top: 16px;
  padding: 0 2px;
}

.app-tabs button {
  position: relative;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.app-tabs button.active {
  color: var(--foreground);
}

.app-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.app-content {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 16px 18px 20px;
}

.app-section-back {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.app-section-back:hover {
  background: var(--surface-soft);
  color: var(--foreground);
}

.metric-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.metric-card {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 54px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  text-align: left;
}

.metric-card.active {
  border-color: #c9bff1;
  background: var(--accent-soft);
}

.metric-card span:first-child {
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.closeout-strip,
.closeout-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #cbdcff;
  background: #f0f6ff;
}

.closeout-strip {
  padding: 9px 10px 9px 14px;
  border-radius: var(--radius-card);
}

.closeout-ribbon {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 9px 11px;
  border-radius: 19px;
  box-shadow: 0 8px 20px rgba(47, 110, 229, 0.08);
}

.closeout-lead,
.closeout-actions,
.closeout-facts {
  display: flex;
  align-items: center;
}

.closeout-lead {
  min-width: 170px;
  gap: 9px;
}

.closeout-copy strong,
.closeout-copy span {
  display: block;
}

.closeout-copy strong {
  font-size: 11px;
}

.closeout-copy span {
  margin-top: 1px;
  color: var(--muted-foreground);
  font-size: 9px;
}

.closeout-facts {
  flex: 1;
  justify-content: center;
  gap: 18px;
}

.closeout-fact span,
.closeout-fact strong {
  display: block;
}

.closeout-fact span {
  color: var(--muted-foreground);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.closeout-fact strong {
  margin-top: 1px;
  font-size: 11px;
}

.closeout-actions {
  gap: 6px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.summary-card {
  min-width: 0;
  min-height: 76px;
  padding: 11px;
  border-radius: 17px;
  background: var(--surface);
}

.summary-card.emphasis {
  background: var(--primary);
  color: white;
}

.summary-card.favorable {
  background: var(--success-soft);
}

.summary-card.warning {
  background: var(--warning-soft);
}

.summary-card label {
  display: block;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-card.emphasis label {
  color: #bdb6da;
}

.summary-card strong {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  white-space: nowrap;
}

.summary-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 8px;
}

.summary-card.emphasis small {
  color: #bdb6da;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8px minmax(320px, 390px);
  gap: 8px;
  align-items: start;
}

.workspace-splitter {
  min-height: 480px;
  display: grid;
  place-items: center;
  color: #a49bb5;
}

.workspace-splitter::after {
  content: "";
  width: 3px;
  height: 38px;
  border-radius: 3px;
  background: #c9c1d5;
}
