:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #17191d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f6f8;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid #c9ced8;
  background: #fff;
  color: #17191d;
  min-height: 36px;
  border-radius: 6px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover {
  border-color: #8d96a8;
}

button.danger {
  background: #9f1d2f;
  color: #fff;
  border-color: #9f1d2f;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.setup,
.auth {
  width: min(92vw, 420px);
  margin: 18vh auto 0;
}

.auth h1,
.setup h1 {
  margin: 0 0 18px;
  font-size: 32px;
}

.app {
  min-height: 100vh;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #dde1e8;
}

.topbar h1,
.detail h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.eyebrow {
  color: #697386;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.session {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4d5564;
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid #dde1e8;
  background: #fafbfc;
}

label {
  display: grid;
  gap: 5px;
  color: #4d5564;
  font-size: 13px;
  font-weight: 600;
}

select,
input,
textarea {
  border: 1px solid #c9ced8;
  border-radius: 6px;
  background: #fff;
  color: #17191d;
  min-height: 36px;
  padding: 7px 9px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  min-height: calc(100vh - 133px);
}

.queue {
  border-right: 1px solid #dde1e8;
  background: #fff;
  overflow: auto;
}

.case-list {
  display: grid;
}

.case-row {
  border: 0;
  border-bottom: 1px solid #eef0f4;
  border-radius: 0;
  min-height: 76px;
  text-align: left;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.case-row[aria-selected="true"] {
  background: #edf4ff;
}

.case-row strong {
  font-size: 14px;
}

.case-row span {
  color: #697386;
  font-size: 13px;
}

.detail {
  overflow: auto;
  padding: 22px 24px 48px;
}

.empty {
  color: #697386;
}

.detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.status-pill {
  min-width: 72px;
  text-align: center;
  border: 1px solid #c9ced8;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.detail-grid section,
.actions {
  background: #fff;
  border: 1px solid #dde1e8;
  border-radius: 8px;
  padding: 14px;
}

h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.45;
  color: #303743;
}

.report,
.audit-row {
  border-top: 1px solid #eef0f4;
  padding: 10px 0;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.report:first-child,
.audit-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.actions {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result {
  min-height: 20px;
  color: #4d5564;
  font-size: 13px;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .queue {
    max-height: 34vh;
    border-right: 0;
    border-bottom: 1px solid #dde1e8;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .toolbar {
    padding-left: 16px;
    padding-right: 16px;
  }
}
