:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f2f5f7;
  --line: #dce3e8;
  --text: #20262b;
  --muted: #6a737b;
  --accent: #3f7f72;
  --accent-strong: #28665a;
  --warn: #b0822f;
  --error: #b15142;
  --shadow: 0 20px 55px rgba(36, 48, 58, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Instrument Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fbfcfd, var(--bg));
}
button, input, select { font: inherit; }
.shell { max-width: 1440px; margin: 0 auto; padding: 32px 24px 48px; }
.topbar, .card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 28px;
  margin-bottom: 22px;
}
.eyebrow, .section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-size: .76rem;
}
h1, h2 { margin: 0; font-family: "Fraunces", Georgia, serif; letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: 1.25rem; }
.subtitle { max-width: 60ch; color: var(--muted); line-height: 1.55; margin: 10px 0 0; }
.status-panel { display: grid; justify-items: end; gap: 8px; }
.pill {
  display: inline-flex;
  border: 1px solid rgba(63,127,114,.18);
  background: #e8f3f0;
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 700;
}
.pill.warn { color: var(--warn); background: #fff7e5; border-color: #f0d59a; }
.pill.ok { color: var(--accent-strong); }
.grid {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(0, 1.25fr);
  gap: 22px;
  align-items: start;
}
.card { padding: 24px; }
.wide { grid-column: 1 / -1; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head.small { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 600; font-size: .86rem; }
.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}
.input:focus { border-color: #a9c7c0; box-shadow: 0 0 0 4px rgba(63,127,114,.11); }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.ghost { background: #f8fafb; }
.calls { display: grid; gap: 14px; }
.empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.call { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fbfcfd; }
.call-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.call-head span { color: var(--accent-strong); font-weight: 700; }
.transcript { display: grid; gap: 8px; margin-bottom: 12px; }
.line {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
.line strong { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.logs { max-height: 420px; overflow: auto; display: grid; gap: 8px; }
.log {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
}
.log span { font-weight: 800; color: var(--accent-strong); font-size: .8rem; }
.log.error span { color: var(--error); }
.log p { margin: 0; color: var(--muted); word-break: break-word; }
.muted { color: var(--muted); }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  opacity: 0;
  transform: translateY(12px);
  border-radius: 14px;
  padding: 12px 15px;
  background: rgba(32,38,43,.94);
  color: #fff;
  transition: .18s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: rgba(177,81,66,.96); }
@media (max-width: 920px) {
  .topbar, .grid, .form-grid, .actions { grid-template-columns: 1fr; }
  .topbar { display: grid; }
  .status-panel { justify-items: start; }
}
