* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #10141a;
  color: #e7ecf3;
  margin: 0;
  padding: 24px;
  display: flex;
  justify-content: center;
}

.phone {
  width: 100%;
  max-width: 640px;
}

h1 { margin-bottom: 4px; }
.subtitle { color: #8b93a3; margin-top: 0; }

.status {
  padding: 8px 14px;
  border-radius: 8px;
  display: inline-block;
  font-size: 14px;
  margin-bottom: 16px;
}
.status.idle { background: #263042; color: #9fb0c9; }
.status.connected { background: #1d4b34; color: #7ee2a4; }
.status.ended { background: #4b3a1d; color: #f0c98a; }

.controls { margin-bottom: 16px; }
button {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  margin-right: 10px;
}
#answerBtn { background: #3b82f6; color: white; }
#answerBtn:disabled { background: #2a3446; color: #67728a; cursor: not-allowed; }
#hangupBtn { background: #ef4444; color: white; }
#hangupBtn:disabled { background: #2a3446; color: #67728a; cursor: not-allowed; }

.mic-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #7ee2a4;
}
.mic-indicator.hidden { display: none; }
.pulse {
  width: 12px; height: 12px; border-radius: 50%;
  background: #7ee2a4;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(126,226,164,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(126,226,164,0); }
  100% { box-shadow: 0 0 0 0 rgba(126,226,164,0); }
}

.transcript {
  background: #161c26;
  border-radius: 12px;
  padding: 16px;
  height: 360px;
  overflow-y: auto;
  margin-bottom: 20px;
}
.line { margin-bottom: 12px; line-height: 1.4; }
.line .who { font-weight: 600; margin-right: 6px; }
.line.agent .who { color: #7dc3ff; }
.line.caller .who { color: #ffb27d; }
.line.notice { color: #8b93a3; font-style: italic; }

.report {
  background: #161c26;
  border-radius: 12px;
  padding: 16px;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  max-height: 480px;
  overflow-y: auto;
}
.report.hidden { display: none; }

.login-box { max-width: 380px; margin-top: 10vh; }
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #161c26;
  border-radius: 12px;
  padding: 20px;
}
.login-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #9fb0c9;
}
.login-form input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2a3446;
  background: #10141a;
  color: #e7ecf3;
  font-size: 15px;
}
.login-form input:focus { outline: 2px solid #3b82f6; }
.login-form button { margin-top: 4px; margin-right: 0; }
.login-error {
  background: #4b1d1d;
  color: #f0a8a8;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logout-link {
  color: #8b93a3;
  font-size: 13px;
  text-decoration: none;
}
.logout-link:hover { color: #e7ecf3; }
