.workspace { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 14px 22px;
  background: #2f2923;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand { padding: 0 10px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand p { margin: 0 0 8px; color: #d6aa76; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.brand h1 { margin: 0; font-size: 24px; }
.module-nav { display: grid; gap: 12px; margin-top: 20px; }
.module-group {
  display: grid;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.module-group:last-child { border-bottom: 0; padding-bottom: 0; }
.module-group-toggle {
  width: 100%;
  margin: 0 0 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d6aa76;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.module-group-toggle::after {
  content: "+";
  float: right;
  color: rgba(255,255,255,.5);
}
.module-group.expanded .module-group-toggle::after { content: "-"; }
.module-group-toggle:hover {
  background: rgba(255,255,255,.07);
  color: #f2c99c;
}
.module-group:not(.expanded) .module-button { display: none; }
.module-button {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,.72);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.module-button b { color: #b99166; font-family: Georgia, serif; font-size: 12px; }
.module-button:hover { background: rgba(255,255,255,.07); color: #fff; }
.module-button.active { background: #976733; color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.module-button.active b { color: #f7dbc0; }
.sidebar-status { margin-top: 18px; padding: 12px 10px; color: rgba(255,255,255,.65); font-size: 12px; }
.sidebar-status i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #62b477; }
.workspace-main { min-width: 0; }

.app-header {
  width: calc(100% - 2 * var(--content-gutter));
  margin: 0 auto;
  padding: 30px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.eyebrow, .report-kicker {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
}
.app-header h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.app-subtitle { margin: 10px 0 0; color: var(--muted); }
.connection-badge {
  padding: 9px 13px;
  border: 1px solid rgba(151, 103, 51, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: #62513e;
  font-size: 13px;
}
.connection-badge span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #4d9e62;
  box-shadow: 0 0 0 4px rgba(77, 158, 98, .14);
}

.workspace-tabs-shell {
  width: calc(100% - 2 * var(--content-gutter));
  margin: -4px auto 14px;
  padding: 0;
}
.workspace-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.workspace-tab {
  min-width: 150px;
  max-width: 260px;
  height: 38px;
  padding: 0 7px 0 13px;
  border: 1px solid rgba(151, 103, 51, .24);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
  color: #5d554d;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 0 0 auto;
}
.workspace-tab[aria-selected="true"] {
  border-color: rgba(151, 103, 51, .64);
  background: #fffdfa;
  box-shadow: 0 8px 24px rgba(59, 48, 35, .08);
  color: var(--gold);
}
.workspace-tab-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
}
.workspace-tab-close {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #9b8d7f;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.workspace-tab-close:hover {
  background: #f1e7da;
  color: #7f4f20;
}
