:root {
  --bg: #0b1021;
  --panel: #121a32;
  --primary: #4f8bff;
  --text: #e8edff;
  --muted: #9aa3c2;
}

* {
  box-sizing: border-box;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(79, 139, 255, 0.18), transparent 25%),
    radial-gradient(circle at 80% 10%, rgba(135, 96, 255, 0.16), transparent 25%),
    var(--bg);
  color: var(--text);
}

.container {
  width: min(420px, 95vw);
  background: linear-gradient(145deg, rgba(18, 26, 50, 0.92), rgba(18, 26, 50, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.layout-main,
.layout-side {
  width: 100%;
}

@media (min-width: 900px) {
  .container {
    width: min(1100px, 96vw);
  }

  .layout-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .layout-main {
    flex: 1.1;
  }

  .layout-side {
    flex: 1;
  }
}

h1 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

p {
  margin: 0 0 20px;
  color: var(--muted);
}

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

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

select,
button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 16, 33, 0.9);
  color: var(--text);
  font-size: 1rem;
}

select option,
select optgroup {
  background: #121a32;
  color: var(--text);
}

select:focus,
button:focus {
  outline: 2px solid var(--primary);
}

.radio-group {
  display: flex;
  gap: 12px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--muted);
}

.start-btn {
  background: linear-gradient(135deg, #4f8bff, #8c6bff);
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease;
  margin-top: 8px;
}

.start-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(79, 139, 255, 0.25);
}

.status {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  min-height: 20px;
}

.controls {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.controls button {
  width: 50%;
  cursor: pointer;
}

.cost-info {
  padding: 12px;
  border-radius: 10px;
  background: rgba(79, 139, 255, 0.08);
  border: 1px dashed rgba(79, 139, 255, 0.3);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  margin-top: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

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

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79, 139, 255, 0.15);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(79, 139, 255, 0.4);
}

.badge.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.inline-actions {
  display: flex;
  gap: 10px;
  margin: 12px 0 6px;
}

.inline-actions button {
  width: auto;
}

.log-window {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  color: var(--text);
}

.log-entry {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 6px;
}

.micro-copy {
  color: var(--muted);
  font-size: 0.9rem;
}

.debug-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.debug-link:hover {
  text-decoration: underline;
}

.small-link-button {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
}

.small-link-button:hover {
  text-decoration: underline;
}

.transcript-line {
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.transcript-line.agent {
  border-color: rgba(79, 139, 255, 0.4);
  background: rgba(79, 139, 255, 0.08);
}

.transcript-line.neutral {
  color: var(--muted);
}

