:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --dark: #0f172a;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --r: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .15), transparent 35%), var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--primary);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
  margin-bottom: 18px;
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 800;
}

.field small {
  color: var(--muted);
  line-height: 1.4;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  background: #ffffff;
  outline: none;
  color: var(--text);
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.app {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
}

.side {
  background: var(--dark);
  color: #ffffff;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
  color: #ffffff;
}

.brand:hover {
  text-decoration: none;
}

.brand .logo {
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 15px;
}

.brand b {
  font-size: 18px;
}

.brand span {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #cbd5e1;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 800;
}

.nav a.active,
.nav a:hover {
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
  text-decoration: none;
}

.note {
  margin-top: auto;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 18px;
}

.main {
  padding: 28px;
  max-width: 1360px;
  width: 100%;
  min-width: 0;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.top h1 {
  margin: 0;
  font-size: 30px;
}

.top p {
  margin: 8px 0 0;
  color: var(--muted);
}

.user {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  height: max-content;
}

.user form {
  margin: 0;
}

.user button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 900;
  padding: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.card,
.stat-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  padding: 22px;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.stat {
  font-size: 34px;
  font-weight: 900;
  margin-top: 8px;
}

.green {
  color: var(--green);
}

.red {
  color: var(--red);
}

.muted {
  color: var(--muted);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.grid-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 900;
  gap: 8px;
}

.btn.small,
button.small {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
}

.btn:hover,
button:hover {
  text-decoration: none;
}

.btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.btn.is-loading,
button.is-loading {
  position: relative;
  pointer-events: none;
}

.btn.is-loading::before,
button.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin .75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn.primary,
button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.btn.ghost,
button.ghost {
  background: transparent;
}

.btn.red,
button.red {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

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

.table th,
.table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.table th {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #e5e7eb;
  color: #374151;
}

.badge.completed {
  background: #dcfce7;
  color: #166534;
}

.badge.failed {
  background: #fee2e2;
  color: #991b1b;
}

.badge.running,
.badge.queued {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.no_answer {
  background: #f3f4f6;
  color: #4b5563;
}

.badge.busy,
.badge.declined,
.badge.dropped,
.badge.timeout {
  background: #ffedd5;
  color: #9a3412;
}

.badge.answering_machine {
  background: #fef3c7;
  color: #92400e;
}

.badge.not_relevant {
  background: #e0e7ff;
  color: #3730a3;
}

.history-overview {
  margin-bottom: 20px;
}

.history-overview-heading,
.history-toolbar,
.history-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.history-overview-heading {
  margin-bottom: 14px;
}

.history-overview-heading h2,
.history-toolbar h2 {
  margin: 0;
  font-size: 20px;
}

.history-overview-heading p,
.history-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.history-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.history-status-filter {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .035);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.history-status-filter:hover {
  border-color: #bfdbfe;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .08);
  text-decoration: none;
  transform: translateY(-1px);
}

.history-status-filter.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.history-status-filter strong {
  font-size: 26px;
  line-height: 1;
}

.history-status-filter .badge {
  max-width: 100%;
  line-height: 1.2;
  white-space: normal;
}

.history-status-name {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.history-toolbar {
  margin-bottom: 14px;
}

.history-toolbar-actions,
.history-sort {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-sort label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.history-sort select {
  min-width: 176px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 34px 8px 11px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
}

.history-phone,
.history-recording {
  font-weight: 800;
}

.recording-player {
  display: block;
  width: min(100%, 520px);
}

.history-duration {
  color: #334155;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  white-space: nowrap;
}

.history-row-action {
  width: 1%;
  white-space: nowrap;
  text-align: right !important;
}

.history-pagination {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.history-pagination div {
  display: flex;
  gap: 8px;
}

.form-card {
  max-width: 880px;
}

.agent-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.agent-editor-layout .form-card {
  max-width: none;
}

.prompt-history {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.prompt-history-heading h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.prompt-version-list {
  border-top: 1px solid var(--line);
}

.prompt-version {
  border-bottom: 1px solid var(--line);
}

.prompt-version summary {
  display: grid;
  gap: 5px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.prompt-version summary::-webkit-details-marker {
  display: none;
}

.prompt-version summary span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prompt-version summary time,
.prompt-version-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.prompt-version-body {
  padding: 0 0 14px;
}

.prompt-version-meta {
  margin-bottom: 10px;
}

.prompt-version-text {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  color: #334155;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  background: #f8fafc;
}

.form-section h2 {
  margin: 0;
  font-size: 20px;
}

.form-section p {
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 16px;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.check {
  display: flex;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 18px;
  line-height: 1.4;
}

.check input {
  margin-top: 3px;
}

.agents {
  display: grid;
  gap: 16px;
}

.agent-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.agent-card p,
.card p {
  color: var(--muted);
  line-height: 1.5;
}

.hint {
  background: #eff6ff;
  color: #1e40af;
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.5;
}

.advanced {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #f8fafc;
}

.advanced summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--muted);
}

.advanced .field {
  margin: 14px 0 0;
}

.connection-status {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.connection-status div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.connection-status span {
  color: var(--muted);
  font-weight: 800;
}

.provision-log {
  margin-top: 18px;
  max-height: 260px;
}

.warn {
  margin-top: 18px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.5;
}

.flash {
  margin-bottom: 18px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 16px;
  padding: 14px 16px;
}

.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.summary {
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  line-height: 1.55;
  color: #334155;
  overflow: auto;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.card-heading h2 {
  margin: 0;
}

.log-panel summary {
  width: max-content;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.log-panel summary::-webkit-details-marker {
  display: none;
}

.log-panel summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
}

.log-panel[open] summary::before {
  content: "▼";
}

.log-summary {
  margin-top: 14px;
}

.log-actions {
  margin-top: 14px;
}

.split {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
}

.detail-column {
  display: grid;
  gap: 18px;
}

.comment-form {
  margin-bottom: 16px;
}

.comment-form .field {
  margin-bottom: 10px;
}

.comment-list {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.comment {
  min-width: 0;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  line-height: 1.45;
  color: #334155;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  white-space: normal;
}

.comment-empty {
  margin-top: 8px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 16px;
  font-size: 14px;
}

.kv div:nth-child(odd) {
  color: var(--muted);
  font-weight: 900;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.empty {
  color: var(--muted);
  margin: 0;
}

pre {
  margin: 0;
}

.is-hidden {
  display: none !important;
}

.agent-form-toolbar,
.voice-test-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.voice-tests-launch {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, .9fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 18px;
}

.voice-tests-launch h2,
.voice-tests-launch p {
  margin: 0;
}

.voice-tests-launch p,
.section-copy {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.voice-tests-launch-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.voice-tests-launch-form .field {
  margin-bottom: 0;
}

.voice-tests-table {
  min-width: 1000px;
}

.voice-test-recording {
  width: 250px;
  height: 36px;
}

.voice-test-layout {
  display: grid;
  grid-template-columns: minmax(340px, .85fr) minmax(420px, 1.15fr);
  gap: 18px;
  margin-bottom: 18px;
}

.voice-test-layout > *,
.voice-test-result-grid > * {
  min-width: 0;
}

.voice-test-console,
.voice-test-transcript-panel {
  min-height: 520px;
}

.voice-test-console {
  display: flex;
  flex-direction: column;
}

.voice-test-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.voice-test-heading h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

.voice-test-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.voice-test-stage {
  flex: 1;
  min-height: 315px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.voice-test-stage strong {
  max-width: 320px;
  font-size: 18px;
  line-height: 1.35;
}

.voice-test-stage time {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.voice-test-mic {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #f8fafc;
  color: #64748b;
  font-size: 36px;
  box-shadow: 0 0 0 12px #f1f5f9;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.voice-test-stage[data-speaking="agent"] .voice-test-mic {
  background: #eff6ff;
  border-color: #60a5fa;
  color: var(--primary);
  box-shadow: 0 0 0 12px #dbeafe;
}

.voice-test-stage[data-speaking="user"] .voice-test-mic {
  background: #ecfdf5;
  border-color: #4ade80;
  color: var(--green);
  box-shadow: 0 0 0 12px #dcfce7;
}

.voice-test-stage.is-muted .voice-test-mic {
  background: #fef2f2;
  border-color: #f87171;
  color: var(--red);
  box-shadow: 0 0 0 12px #fee2e2;
}

.voice-test-controls {
  min-height: 48px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.voice-test-start {
  min-width: 168px;
}

.voice-test-error {
  margin-top: 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  padding: 11px 12px;
  line-height: 1.45;
  font-size: 14px;
}

#voice-test-audio-host audio {
  display: none;
}

.voice-test-transcript-panel {
  display: flex;
  flex-direction: column;
}

.voice-test-transcript {
  flex: 1;
  max-height: 455px;
  overflow-y: auto;
  margin-top: 18px;
  padding: 4px 6px 4px 0;
}

.voice-test-turn {
  max-width: 88%;
  margin-bottom: 14px;
}

.voice-test-turn span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.voice-test-turn p {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.voice-test-turn.agent {
  margin-right: auto;
}

.voice-test-turn.user {
  margin-left: auto;
}

.voice-test-turn.user span {
  text-align: right;
}

.voice-test-turn.user p {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.voice-test-history {
  margin-bottom: 20px;
}

.voice-test-detail-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.voice-test-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr);
  align-items: start;
  gap: 18px;
}

.voice-test-result-main h2 {
  margin: 4px 0 0;
}

.voice-test-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.voice-test-meta div {
  min-width: 0;
  padding: 14px;
  background: #f8fafc;
}

.voice-test-meta dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.voice-test-meta dd {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.voice-test-recording-panel {
  margin-top: 22px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.voice-test-recording-panel h3,
.voice-test-dialogue h3 {
  margin: 0;
  font-size: 17px;
}

.voice-test-detail-player {
  width: 100%;
  margin-top: 12px;
}

.voice-test-dialogue {
  margin-top: 22px;
}

.voice-test-transcript-static {
  max-height: none;
  overflow: visible;
}

.voice-test-comments {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.badge.starting,
.badge.ready {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.cancelled {
  background: #f3f4f6;
  color: #4b5563;
}

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

  .side {
    gap: 18px;
  }

  .note {
    margin-top: 0;
  }

  .cards,
  .grid2,
  .grid-settings,
  .inline-fields,
  .split,
  .agent-editor-layout {
    grid-template-columns: 1fr;
  }

  .voice-test-layout {
    grid-template-columns: 1fr;
  }

  .voice-tests-launch,
  .voice-test-result-grid {
    grid-template-columns: 1fr;
  }

  .voice-test-comments {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .prompt-history {
    position: static;
    max-height: none;
  }

  .top,
  .agent-card,
  .history-overview-heading,
  .history-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-toolbar-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .main {
    padding: 18px;
  }

  .voice-test-console,
  .voice-test-transcript-panel {
    min-height: 440px;
  }
}

@media (max-width: 520px) {
  .voice-tests-launch-form,
  .voice-test-meta {
    grid-template-columns: 1fr;
  }

  .voice-test-detail-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .history-status-grid {
    grid-template-columns: 1fr;
  }

  .history-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-sort {
    align-items: flex-start;
    flex-direction: column;
  }

  .voice-test-layout {
    display: block;
  }

  .voice-test-console,
  .voice-test-transcript-panel {
    min-height: 0;
    margin-bottom: 16px;
  }

  .voice-test-stage {
    min-height: 285px;
  }

  .voice-test-controls .btn {
    width: 100%;
  }

  .voice-test-turn {
    max-width: 96%;
  }
}
