.oa-workspace {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.8rem);
  min-width: 0;
  max-width: 100%;
  height: calc(100dvh - 12rem);
  min-height: 24rem;
}
.oa-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}
.oa-header h2 {
  margin: 0.25rem 0;
}
.oa-header p {
  margin: 0.4rem 0;
  max-width: 72ch;
  color: var(--muted, #aeb7cd);
}
.oa-header a {
  flex-shrink: 0;
}
.oa-controls {
  display: flex;
  align-items: end;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.oa-controls button,
.oa-header a {
  min-height: 44px;
}
.oa-controls label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
}
.oa-controls input,
.oa-controls select {
  min-height: 44px;
  max-width: 100%;
  background: var(--surface-2, #192137);
  color: var(--text, #eef2ff);
  border: 1px solid var(--border-strong, #586174);
  border-radius: 0.6rem;
  padding: 0.55rem;
}
.oa-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.oa-tabs button {
  min-height: 44px;
}
.oa-detail {
  overflow: auto;
  min-height: 8rem;
  flex: 1;
  padding: 0.25rem;
}
.oa-scroll {
  overflow: auto;
  max-width: 100%;
}
.oa-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.oa-scroll th,
.oa-scroll td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border, #56607455);
  text-align: start;
  white-space: nowrap;
}
.oa-detail h3 {
  margin: 0.25rem 0 1rem;
}
.oa-detail details {
  margin: 0.75rem 0;
}
.oa-detail summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
}
.oa-period {
  font-size: 0.85rem;
  color: var(--muted, #aeb7cd);
  margin: 0;
}
.oa-workspace footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted, #aeb7cd);
}
.oa-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.oa-metric {
  display: grid;
  gap: 0.5rem;
  border: 1px solid var(--border, #58617455);
  padding: 1rem;
  border-radius: 0.8rem;
}
.oa-metric strong {
  font-size: 1.7rem;
}
.oa-controls button:focus-visible,
.oa-controls input:focus-visible,
.oa-controls select:focus-visible,
.oa-tabs button:focus-visible,
.oa-detail:focus-visible,
.oa-detail summary:focus-visible {
  outline: 3px solid #bd9cff;
  outline-offset: 3px;
}
@media (max-width: 850px) {
  .oa-workspace {
    height: auto;
    min-height: 0;
  }
  .oa-detail {
    max-height: 55dvh;
    min-height: 12rem;
  }
  .oa-header {
    display: block;
  }
  .oa-header a {
    margin-top: 0.4rem;
  }
  .oa-header p {
    font-size: 0.85rem;
  }
  .oa-metrics {
    grid-template-columns: 1fr;
  }
  .oa-controls button,
  .oa-header a {
    min-height: 44px;
  }
  .oa-controls label {
    flex: 1 1 12rem;
  }
  .oa-controls button {
    flex: 1 1 8rem;
  }
  .oa-workspace footer {
    font-size: 0.75rem;
  }
}
@media (max-height: 620px) {
  .oa-workspace {
    height: auto;
    min-height: 0;
  }
  .oa-detail {
    max-height: 55dvh;
  }
}
