:root {
  color-scheme: dark;
  --bg: #050506;
  --surface: #101113;
  --surface-2: #17191d;
  --line: #2b2d33;
  --line-strong: #3a3d45;
  --text: #f4f4f5;
  --muted: #a4a8b2;
  --dim: #6f7480;
  --red: #d71920;
  --white: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 8%, rgba(215, 25, 32, 0.12), transparent 28rem),
    linear-gradient(135deg, #030304 0%, #0a0b0d 48%, #15161a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.brand {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 860px;
  margin-bottom: 12px;
  color: var(--white);
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.subtitle {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.status-strip {
  display: inline-flex;
  align-items: center;
  min-width: 210px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 19, 0.88);
  box-shadow: var(--shadow);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--dim);
  box-shadow: 0 0 0 6px rgba(111, 116, 128, 0.14);
}

.status-dot.live {
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(215, 25, 32, 0.16);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(300px, 1fr) minmax(320px, 1.08fr);
  gap: 18px;
  align-items: stretch;
}

.voice-panel, .conversation-panel, .lead-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 17, 19, 0.88);
  box-shadow: var(--shadow);
}

.voice-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 620px;
  padding: 24px;
}

.mic-orbit {
  display: grid;
  place-items: center;
  min-height: 270px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)), #0b0c0e;
}

.mic-core {
  display: grid;
  place-items: center;
  width: 146px;
  height: 146px;
  border: 1px solid rgba(215, 25, 32, 0.42);
  border-radius: 999px;
  background: linear-gradient(160deg, #191b20 0%, #0c0d0f 100%);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.04), 0 0 60px rgba(215, 25, 32, 0.18);
}

.mic-core span {
  width: 52px;
  height: 78px;
  border: 4px solid var(--white);
  border-bottom-width: 12px;
  border-radius: 28px;
  position: relative;
}

.mic-core span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 46px;
  height: 26px;
  border-bottom: 4px solid var(--red);
  border-left: 4px solid var(--red);
  border-right: 4px solid var(--red);
  border-radius: 0 0 28px 28px;
  transform: translateX(-50%);
}

.button-row { display: grid; gap: 10px; margin: 22px 0; }

.button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: 0.5; }
.primary { background: var(--red); }
.secondary { border-color: var(--line-strong); background: var(--surface-2); }
.ghost { border-color: rgba(215, 25, 32, 0.38); background: rgba(215, 25, 32, 0.08); }

.status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-list span {
  min-height: 34px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-list span.active {
  border-color: rgba(215, 25, 32, 0.7);
  color: var(--white);
  background: rgba(215, 25, 32, 0.12);
}

.error-text {
  min-height: 40px;
  margin: 16px 0 0;
  color: #ff9ca0;
  font-size: 13px;
  line-height: 1.45;
}

.conversation-panel, .lead-panel {
  min-height: 620px;
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.saved-pill {
  min-width: 94px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.saved-pill.sent {
  border-color: rgba(215, 25, 32, 0.7);
  color: var(--white);
  background: rgba(215, 25, 32, 0.12);
}

.transcript {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 530px;
  overflow: auto;
  padding-right: 6px;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 470px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--dim);
  text-align: center;
}

.message {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c0d0f;
}

.message strong {
  display: block;
  margin-bottom: 7px;
  color: var(--white);
  font-size: 12px;
  text-transform: uppercase;
}

.message p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.lead-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

label { display: grid; gap: 7px; }

label span {
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0c0e;
  color: var(--text);
  outline: none;
  padding: 10px 12px;
}

textarea { resize: vertical; line-height: 1.45; }

input:focus, select:focus, textarea:focus {
  border-color: rgba(215, 25, 32, 0.76);
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

.wide { grid-column: 1 / -1; }

@media (max-width: 1060px) {
  .workspace { grid-template-columns: 1fr 1fr; }
  .voice-panel { grid-column: 1 / -1; min-height: auto; }
  .mic-orbit { min-height: 220px; }
}

@media (max-width: 740px) {
  .shell { width: min(100% - 24px, 1180px); padding: 28px 0; }
  .hero { display: grid; gap: 18px; }
  h1 { font-size: 42px; }
  .status-strip { width: 100%; min-width: 0; }
  .workspace, .lead-grid { grid-template-columns: 1fr; }
  .conversation-panel, .lead-panel { min-height: auto; padding: 18px; }
  .transcript { max-height: 380px; }
  .empty { min-height: 220px; }
}

@media (max-width: 600px) {
  .shell { width: min(366px, calc(100% - 24px)); margin-left: 12px; margin-right: auto; }
}

@media (max-width: 480px) {
  .status-list { grid-template-columns: 1fr; }
  .voice-panel { padding: 18px; }
  .mic-orbit { min-height: 190px; }
  .mic-core { width: 126px; height: 126px; }
}
