/* Perspektiv brand palette — matches perspektivapp.com */
:root {
  --bg: #080b11;
  --card: #0f141c;
  --card-2: #161c26;
  --border: rgba(255, 255, 255, 0.07);
  --text: #f3f6fa;
  --muted: #8a96a6;
  --faint: #5f6b7a;
  --green: #34d399;
  --green-press: #2bbd86;
  --yellow: #f5cf4a;
  --red: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(45, 84, 150, 0.38), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* --- brand header --- */
.brand {
  position: fixed;
  top: 22px;
  left: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark { display: block; }
.brand-name {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* --- call card --- */
.call {
  width: 100%;
  max-width: 520px;
  padding: 32px 24px 48px;
  text-align: center;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--faint);
  margin: 0 auto 18px;
  transition: background 0.2s;
}
.status-dot.ready { background: var(--green); }
.status-dot.listening { background: var(--green); animation: pulse 1.1s infinite; }
.status-dot.thinking { background: var(--yellow); animation: pulse 0.8s infinite; }
.status-dot.speaking { background: var(--green); animation: pulse 0.6s infinite; }
.status-dot.ended { background: var(--faint); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.45); }
}

h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.subtitle { color: var(--muted); margin: 0 0 28px; font-size: 15px; }

.transcript {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  height: 330px;
  overflow-y: auto;
  margin-bottom: 28px;
}

.line {
  margin: 0 0 14px;
  padding: 11px 15px;
  border-radius: 16px;
  max-width: 85%;
  line-height: 1.5;
  font-size: 15px;
}
.line.agent {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.line.user {
  background: rgba(52, 211, 153, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.34);
  color: #d7f5e7;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.mic {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: var(--green);
  color: #04130c;
  border: none;
  border-radius: 999px;
  padding: 18px 36px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 34px rgba(52, 211, 153, 0.28);
}
.mic:hover:not(:disabled) { transform: translateY(-2px); background: var(--green-press); }
.mic:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.mic.active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 34px rgba(239, 68, 68, 0.32);
}
.mic-icon { font-size: 24px; }
.mic-label { font-size: 14px; font-weight: 600; }

.hint {
  color: var(--muted);
  font-size: 14px;
  margin-top: 18px;
  min-height: 20px;
  font-style: italic;
}

/* --- email modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}
.modal-overlay.hidden { display: none; }
.modal {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 26px;
  text-align: center;
}
.modal h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; }
.modal-sub { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 0 0 22px; }
.modal input {
  width: 100%;
  background: #0a0e15;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
  outline: none;
}
.modal input:focus { border-color: var(--green); }
.modal-err { color: #f87171; font-size: 13px; min-height: 18px; margin: 0 0 10px; }
.modal-start { width: 100%; justify-content: center; }

/* --- admin dashboard --- */
.admin { width: 100%; max-width: 760px; padding: 80px 24px 60px; text-align: center; }
.admin h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 6px; }
.admin-login { max-width: 340px; margin: 28px auto 0; }
.admin-login input {
  width: 100%; background: #0a0e15; border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; color: var(--text); font-size: 15px; font-family: inherit; margin-bottom: 12px; outline: none;
}
.admin-login input:focus { border-color: var(--green); }
.admin-login .mic { width: 100%; justify-content: center; }
.admin-dash { text-align: left; margin-top: 28px; }
.agent-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 14px;
}
.agent-card.off { opacity: 0.6; }
.agent-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.agent-name { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.agent-meta { color: var(--muted); font-size: 13px; margin: 4px 0 6px; }
.agent-url { color: var(--green); font-size: 13px; text-decoration: none; word-break: break-all; }
.agent-url:hover { text-decoration: underline; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.badge.b-on { background: rgba(52,211,153,0.16); color: var(--green); }
.badge.b-off { background: rgba(239,68,68,0.16); color: #f87171; }
.agent-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn {
  border: none; border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background 0.15s, opacity 0.15s;
}
.btn-stop { background: var(--red); color: #fff; }
.btn-go { background: var(--green); color: #04130c; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.5; cursor: default; }
.agent-code {
  margin: 14px 0 0; background: #06090e; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; font-size: 12px; line-height: 1.5; color: #b9c4d2; overflow-x: auto;
  white-space: pre-wrap; max-height: 360px; overflow-y: auto;
}
.admin-section { font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.06em; margin: 30px 0 12px; }
.ho-summary { color: var(--text); font-size: 14.5px; line-height: 1.55; margin: 10px 0 8px; }
.ho-bullets { margin: 0 0 10px; padding-left: 20px; }
.ho-bullets li { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin-bottom: 4px; }
