@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,400&family=Jost:wght@200;300;400;500&display=swap");

/* ── Workspace Home — institutional CAE dashboard ── */
.ws-home {
  --ws-bg: #000000;
  --ws-bg-gradient: var(--section-page-gradient);
  --ws-surface: #141414;
  --ws-surface-hover: #161616;
  --ws-border: var(--tile-border);
  --ws-gold: var(--brand-gold);
  --ws-amber: var(--brand-amber);
  --ws-muted: var(--text-muted);
  --ws-text: var(--text-primary);
  --ws-risk: #8b3a3a;
  --ws-holding: #5a7a5a;
  --ws-surface-card: var(--tile-bg);
  --ws-surface-overlay: rgba(255, 255, 255, 0.03);
  --ws-inset: var(--tile-bg);
  --ws-track: rgba(255, 255, 255, 0.08);
  --ws-font-display: "Cormorant Garamond", "Times New Roman", serif;
  --ws-font-ui: "Jost", "Inter", sans-serif;
  --ws-radius: var(--tile-radius);
  --ws-unit: 8px;

  min-height: 100%;
  padding: calc(var(--ws-unit) * 3);
  background: var(--ws-bg-gradient);
  color: var(--ws-text);
  font-family: var(--ws-font-ui);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.theme-light .ws-home {
  --ws-bg-gradient: var(--section-page-gradient);
  --ws-surface: var(--panel-bg);
  --ws-surface-hover: var(--page-bg);
  --ws-bg: var(--panel-bg);
  --ws-track: rgba(16, 24, 32, 0.08);
}

.workspace--no-topbar {
  background: var(--page-bg);
}

.theme-light .workspace--no-topbar {
  background: var(--page-bg);
}

.workspace--no-topbar .content {
  padding: 0;
  background: radial-gradient(ellipse at bottom right, rgba(201, 169, 110, 0.1) 0%, rgba(201, 169, 110, 0.04) 35%, var(--page-bg) 70%);
}

.theme-light .workspace--no-topbar .content {
  background: var(--page-bg);
}

/* Zone 1 — Header */
.ws-home-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--ws-unit) * 3);
  margin-bottom: calc(var(--ws-unit) * 3);
  padding-bottom: calc(var(--ws-unit) * 2);
  border-bottom: 1px solid var(--ws-border);
}

.ws-home-header-copy h1 {
  margin: 0 0 4px;
  font-family: var(--ws-font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--ws-text);
}

.ws-home-header-copy p {
  margin: 0;
  font-family: var(--ws-font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--ws-muted);
}

.ws-home-header-actions {
  display: flex;
  align-items: center;
  gap: calc(var(--ws-unit) * 1.5);
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ws-home-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--ws-gold);
  border-radius: var(--ws-radius);
  background: transparent;
  color: var(--ws-gold);
  font-family: var(--ws-font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.ws-home-pill-urgent {
  border-color: var(--ws-amber);
  color: var(--ws-amber);
}

.ws-home-pill-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ws-amber);
  animation: ws-home-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.ws-home-btn {
  padding: 8px 14px;
  border: 1px solid var(--ws-gold);
  border-radius: var(--ws-radius);
  background: transparent;
  color: var(--ws-gold);
  font-family: var(--ws-font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ws-home-btn:hover {
  background: rgba(201, 169, 110, 0.08);
}

/* Layout zones */
.ws-home-zones {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 180px);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 24px;
  align-items: stretch;
}

.workspace-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  height: 100%;
}

.panel,
.ws-home-card {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.agent-execution-hub,
.ws-home-capacity {
  grid-column: 1 / -1;
}

.ws-home-card-grow {
  flex: 1;
  min-height: 0;
}

.ws-home-card-findings {
  flex: 1;
  min-height: 0;
}

/* Top Findings */
.ws-home-findings-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-home-finding-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  height: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ws-home-finding-row:last-child {
  border-bottom: none;
}

.ws-home-finding-severity {
  flex-shrink: 0;
  padding: 2px 8px;
  font-family: var(--ws-font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.ws-home-finding-severity.is-high {
  color: #c9853a;
  background: rgba(200, 83, 58, 0.15);
}

.ws-home-finding-severity.is-medium {
  color: #c9a96e;
  background: rgba(201, 169, 110, 0.12);
}

.ws-home-finding-title {
  overflow: hidden;
  font-family: var(--ws-font-ui);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-home-finding-audit {
  flex-shrink: 0;
  font-family: var(--ws-font-ui);
  font-size: 11px;
  font-weight: 300;
  color: #555b63;
  text-align: right;
  white-space: nowrap;
}

.ws-home-finding-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.15);
  font-family: var(--ws-font-ui);
  font-size: 10px;
  font-weight: 500;
  color: #c9a96e;
}

.ws-home-link-panel {
  margin-top: auto;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: normal;
  text-transform: none;
  color: #c9a96e;
}

/* My Queue — height matched to Audit Universe, scrollable body */
.ws-home-card-queue {
  flex-shrink: 0;
  overflow: hidden;
  min-height: 0;
}

.ws-home-queue-scroll {
  overflow-y: auto;
  min-height: 0;
  margin-right: -4px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #c9a96e transparent;
}

.ws-home-queue-scroll::-webkit-scrollbar {
  width: 2px;
}

.ws-home-queue-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.ws-home-queue-scroll::-webkit-scrollbar-thumb {
  background: #c9a96e;
  border-radius: 1px;
}

.ws-home-card-copilot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 16px;
  border: 1px solid rgba(201, 169, 110, 0.12);
  border-radius: 0;
  background: var(--ws-surface-card);
}

.ws-home-card-copilot:hover {
  background: var(--ws-surface-card);
}

.ws-home-copilot-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}

.ws-home-copilot-globe-wrap {
  padding: 24px 0;
}

.ws-home-copilot-globe {
  display: block;
  width: 140px;
  height: 140px;
  margin: 0 auto;
  cursor: default;
}

.ws-home-copilot-prompt {
  margin: 0 0 16px;
  font-family: var(--ws-font-ui);
  font-size: 13px;
  font-weight: 300;
  color: #8a9099;
  text-align: center;
}

.ws-home-copilot-btn {
  width: 100%;
  height: 38px;
  margin-top: auto;
  border: 1px solid rgba(201, 169, 110, 0.4);
  border-radius: 0;
  background: transparent;
  color: #c9a96e;
  font-family: var(--ws-font-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ws-home-copilot-btn:hover {
  border-color: rgba(201, 169, 110, 1);
  background: rgba(201, 169, 110, 0.06);
}

/* Audit Plan Progress */
.ws-home-plan-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--ws-unit) * 2);
}

.ws-home-plan-ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.ws-home-plan-ring {
  display: block;
}

.ws-home-plan-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ws-home-plan-ring-center strong {
  font-family: var(--ws-font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: #c9a96e;
}

.ws-home-plan-ring-center span {
  margin-top: 4px;
  font-family: var(--ws-font-ui);
  font-size: 10px;
  font-weight: 300;
  color: #6b7a8d;
}

.ws-home-plan-bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-home-plan-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ws-home-plan-bar-head span {
  font-family: var(--ws-font-ui);
  font-size: 12px;
  font-weight: 300;
  color: var(--ws-text);
}

.ws-home-plan-bar-head em {
  font-family: var(--ws-font-ui);
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  color: #c9a96e;
}

.ws-home-plan-bar-track {
  height: 3px;
  border-radius: var(--ws-radius);
  background: var(--ws-track);
  overflow: hidden;
}

.ws-home-plan-bar-fill {
  height: 100%;
  background: var(--ws-gold);
  border-radius: var(--ws-radius);
}

/* Plan at a Glance */
.ws-home-glance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--ws-unit) * 2);
}

.ws-home-glance-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
  padding: calc(var(--ws-unit) * 1.5);
  border: 1px solid var(--tile-border);
  border-radius: var(--tile-radius);
  background: var(--tile-bg);
  color: var(--text-primary);
}

.ws-home-glance-value {
  font-family: var(--ws-font-ui);
  font-size: 36px;
  font-weight: 200;
  line-height: 1;
  color: var(--ws-gold);
}

.ws-home-glance-value.is-amber {
  color: var(--ws-amber);
}

.ws-home-glance-stat span {
  font-family: var(--ws-font-ui);
  font-size: 11px;
  font-weight: 300;
  color: var(--ws-muted);
}

/* Agent Execution Hub */
.ws-home-card-agents {
  gap: calc(var(--ws-unit) * 1.5);
}

.ws-home-agents-head p {
  margin: 4px 0 0;
  font-family: var(--ws-font-ui);
  font-size: 11px;
  font-weight: 300;
  color: #6b7a8d;
}

.ws-home-agents-table-wrap {
  overflow-x: auto;
}

.ws-home-agents-table {
  width: 100%;
  border-collapse: collapse;
}

.ws-home-agents-table th {
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--ws-border);
  font-family: var(--ws-font-ui);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ws-muted);
}

.ws-home-agents-table td {
  height: 44px;
  padding: 0 12px 0 0;
  font-family: var(--ws-font-ui);
  font-size: 13px;
  font-weight: 300;
  color: var(--ws-text);
  vertical-align: middle;
}

.ws-home-agents-table tbody tr.is-alt {
  background: var(--ws-surface-card);
}

.ws-home-agent-name {
  font-weight: 500;
  color: var(--ws-gold) !important;
}

.ws-home-agent-rate {
  font-weight: 400 !important;
}

.ws-home-agent-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 300;
  color: var(--ws-text);
}

.ws-home-agent-status.is-running span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf50;
}

.ws-home-agent-status.is-soon {
  font-style: italic;
  color: #555b63;
}

.ws-home-link-right {
  align-self: flex-end;
  margin-top: 4px;
}

.ws-home-link-right.ws-home-link-panel {
  margin-top: auto;
}

.ws-home-card {
  display: flex;
  flex-direction: column;
  gap: calc(var(--ws-unit) * 2);
  min-height: 0;
  padding: calc(var(--ws-unit) * 2);
  border: 1px solid var(--ws-border);
  border-radius: var(--ws-radius);
  background: var(--ws-surface);
  transition: background 0.2s ease;
}

.ws-home-card:hover {
  background: var(--ws-surface-hover);
}

.ws-home-card-title {
  margin: 0;
  font-family: var(--ws-font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--ws-text);
}

.ws-home-card-title-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ws-home-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ws-gold);
  animation: ws-home-pulse 2s ease-in-out infinite;
}

@keyframes ws-home-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Control monitoring ticker */
.ws-home-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  margin: 0 0 calc(var(--ws-unit) * 2);
  padding: 0 24px;
  background: var(--ws-surface-overlay);
  border-bottom: 1px solid rgba(201, 169, 110, 0.12);
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: middle;
  flex-shrink: 0;
}

.status-dot-lead {
  width: 6px;
  height: 6px;
  margin-right: 0;
}

.status-dot-green {
  background: #4caf50;
}

.status-dot-gold {
  background: #c9a96e;
}

.status-dot-amber {
  background: #c9853a;
}

.status-dot-blink {
  animation: statusBlink 1.8s ease-in-out infinite;
}

.status-dot-blink-fast {
  animation: statusBlink 1.2s ease-in-out infinite;
}

.ws-home-ticker-text {
  font-family: var(--ws-font-ui);
  font-size: 11px;
  font-weight: 300;
  color: #6b7a8d;
}

.ws-home-ticker-alert-inline {
  color: #c9853a;
}

.ws-home-ticker-segment {
  white-space: nowrap;
}

.ws-home-ticker-sep {
  margin: 0 6px;
  color: #6b7a8d;
  opacity: 0.65;
}

/* Audit Universe stats */
.ws-home-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--ws-unit) * 1);
  flex: 1;
}

.ws-home-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: calc(var(--ws-unit) * 1.5);
  border: 1px solid var(--tile-border);
  border-radius: var(--tile-radius);
  background: var(--tile-bg);
  color: var(--text-primary);
}

.ws-home-stat.is-overdue {
  border: 1px solid var(--ws-border);
  border-left: 3px solid var(--ws-amber);
  box-shadow: none;
}

.ws-home-stat.is-overdue strong {
  color: var(--ws-amber);
}

.ws-home-stat strong {
  font-family: var(--ws-font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  color: var(--ws-gold);
}

.ws-home-stat span {
  font-size: 11px;
  color: var(--ws-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* AI Observations */
.ws-home-insights {
  display: flex;
  flex-direction: column;
  gap: var(--ws-unit);
  flex: 1;
}

.ws-home-insight-card {
  padding: calc(var(--ws-unit) * 1.5);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  color: var(--text-primary);
}

.ws-home-insight-card p {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-primary);
}

.ws-home-insight-card span.ws-home-insight-source {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ws-gold);
}

.ws-home-insight-agent {
  display: block;
  margin-top: 4px;
  font-family: var(--ws-font-ui);
  font-size: 10px;
  font-weight: 300;
  font-style: italic;
  color: #555b63;
}

.ws-home-link {
  align-self: flex-start;
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ws-gold);
  font-family: var(--ws-font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.ws-home-link:hover {
  text-decoration: underline;
}

/* My Queue */
.ws-home-queue {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ws-home-queue-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--ws-border);
}

.ws-home-queue-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ws-home-priority {
  width: 6px;
  height: 6px;
  margin-top: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ws-home-priority.is-today {
  background: #c9a96e;
  box-shadow: none;
}

.ws-home-priority.is-future {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ws-home-priority.is-overdue {
  background: #c9853a;
  box-shadow: none;
}

.ws-home-queue-text {
  font-size: 13px;
  color: var(--ws-text);
}

.ws-home-queue-due {
  font-size: 11px;
  color: var(--ws-muted);
  white-space: nowrap;
}

/* Milestones timeline */
.ws-home-timeline {
  margin: 0;
  padding: 0 0 0 12px;
  list-style: none;
  border-left: 1px solid var(--ws-gold);
  flex: 1;
}

.ws-home-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 16px 12px;
}

.ws-home-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ws-gold);
}

.ws-home-timeline li:last-child {
  padding-bottom: 0;
}

.ws-home-timeline time {
  font-size: 11px;
  font-weight: 500;
  color: var(--ws-gold);
}

.ws-home-timeline span {
  font-size: 13px;
  color: var(--ws-text);
}

/* Top Open Risks */
.ws-home-risks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--ws-unit) * 1.5);
  flex: 1;
}

.ws-home-risk-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ws-home-risk-name {
  font-size: 13px;
  color: var(--ws-text);
}

.ws-home-risk-meta {
  display: flex;
  align-items: center;
  gap: 0;
}

.ws-home-risk-meta .ws-home-severity {
  flex: 1;
  min-width: 0;
}

.ws-home-risk-score {
  flex-shrink: 0;
  padding: 0 12px;
  font-family: var(--ws-font-ui);
  font-size: 11px;
  font-weight: 300;
  color: #8a9099;
}

.ws-home-risk-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ws-home-risk-head > span:first-child {
  font-size: 13px;
  color: var(--ws-text);
}

.ws-home-badge {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: var(--ws-radius);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
}

.ws-home-badge-holding {
  border: 1px solid var(--ws-holding);
  color: var(--ws-holding);
}

.ws-home-badge-risk {
  border: 1px solid var(--ws-risk);
  color: var(--ws-risk);
}

.ws-home-severity {
  height: 3px;
  border-radius: var(--ws-radius);
  background: var(--ws-border);
  overflow: hidden;
}

.ws-home-severity-fill {
  height: 100%;
  background: var(--ws-gold);
  border-radius: var(--ws-radius);
}

/* Regulatory Radar */
.ws-home-regulatory {
  display: flex;
  flex-direction: column;
  gap: calc(var(--ws-unit) * 1.5);
  flex: 1;
}

.ws-home-reg-item {
  padding-bottom: calc(var(--ws-unit) * 1.5);
  border-bottom: 1px solid var(--ws-border);
}

.ws-home-reg-item:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.ws-home-reg-tag {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 2px 8px;
  border: 1px solid var(--ws-gold);
  border-radius: var(--ws-radius);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ws-gold);
}

.ws-home-reg-item p {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--ws-text);
}

.ws-home-reg-item time {
  font-size: 10px;
  color: var(--ws-muted);
}

.ws-home-reg-foot {
  margin: auto 0 0;
  padding-top: var(--ws-unit);
  font-family: var(--ws-font-display);
  font-size: 11px;
  font-style: italic;
  font-weight: 400;
  color: var(--ws-gold);
}

/* Team Capacity strip */
.ws-home-capacity {
  display: flex;
  align-items: center;
  gap: calc(var(--ws-unit) * 2);
  margin-top: auto;
  padding: calc(var(--ws-unit) * 1.5) 0 0;
  border-top: 1px solid var(--ws-border);
}

.ws-home-capacity-label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ws-muted);
}

.ws-home-team-row {
  display: flex;
  align-items: center;
  gap: calc(var(--ws-unit) * 2.5);
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ws-home-auditor {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ws-home-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--ws-radius);
  background: var(--ws-border);
  color: var(--ws-gold);
  font-size: 11px;
  font-weight: 500;
}

.ws-home-auditor-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ws-home-auditor-name {
  font-size: 12px;
  color: var(--ws-text);
  white-space: nowrap;
}

.ws-home-capacity-bar {
  width: 60px;
  height: 3px;
  border-radius: var(--ws-radius);
  background: var(--ws-border);
  overflow: hidden;
}

.ws-home-capacity-fill {
  height: 100%;
  background: var(--ws-gold);
  border-radius: var(--ws-radius);
}

.ws-home-capacity-fill.is-over {
  background: var(--ws-risk);
}

/* Workspace AI chat stack */
.ws-home-chat-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: calc(var(--ws-unit) * 1);
}

.ws-home-chat-typing {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 10px 16px 0;
}

.ws-home-chat-typing.is-visible {
  display: flex;
}

.ws-home-chat-typing span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c9a96e;
  animation: ws-home-typing 1.2s ease-in-out infinite;
}

.ws-home-chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.ws-home-chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ws-home-typing {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.ws-home-chat-response {
  display: none;
  margin-bottom: 0;
  padding: 20px;
  border-left: 3px solid #c9a96e;
  background: var(--ws-bg);
  animation: ws-home-chat-fade 300ms ease forwards;
  opacity: 0;
}

.ws-home-chat-response.is-visible {
  display: block;
}

@keyframes ws-home-chat-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ws-home-chat-response p {
  margin: 0;
  font-family: var(--ws-font-ui);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-primary);
}

.ws-home-chat-error {
  color: #c9853a !important;
}

/* Persistent AI chat bar */
.ws-home-chat-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin-top: 0;
  padding: 0 16px;
  background: var(--ws-surface-overlay);
  border-top: 1px solid rgba(201, 169, 110, 0.15);
  border-radius: 0;
}

.ws-home-chat-bar.is-focused {
  border-top-color: rgba(201, 169, 110, 0.5);
}

.ws-home-chat-icon {
  flex-shrink: 0;
  color: var(--ws-gold);
  font-size: 12px;
  line-height: 1;
}

.ws-home-chat-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ws-text);
  font-family: var(--ws-font-ui);
  font-size: 13px;
  font-weight: 300;
  outline: none;
}

.ws-home-chat-input::placeholder {
  color: #555b63;
}

.ws-home-chat-send {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #c9a96e;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.ws-home-chat-send[hidden] {
  display: none;
}

/* Responsive — 1280px minimum */
@media (max-width: 1280px) {
  .ws-home {
    padding: calc(var(--ws-unit) * 2);
  }

  .workspace-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .ws-home-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ws-home-header-actions {
    justify-content: flex-start;
  }

  .ws-home-capacity {
    flex-direction: column;
    align-items: flex-start;
  }

  .ws-home-team-row {
    width: 100%;
  }
}
