:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --accent: #0a66c2;
  --accent-contrast: #ffffff;
  --danger: #d5382c;
  --ok: #1a7f37;
  --border: #e5e5ea;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 24px 16px;
}

.phone {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  text-align: center;
  margin-bottom: 4px;
}

.subbrand {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 16px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #b0b0b5;
}
.status-dot[data-state="REGISTERED"] { background: var(--ok); }
.status-dot[data-state="CONNECTING"] { background: #e0a300; }
.status-dot[data-state="INCOMING"],
.status-dot[data-state="CALLING"],
.status-dot[data-state="IN_CALL"],
.status-dot[data-state="MUTED"] { background: var(--accent); }
.status-dot[data-state="ERROR"] { background: var(--danger); }

.dial-input {
  width: 100%;
  font-size: 22px;
  text-align: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
}

.dialpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.dialpad button {
  padding: 14px 0;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}
.dialpad button:active { background: var(--border); }

.primary-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 8px;
}
.primary-btn:disabled { opacity: 0.4; cursor: default; }

.danger-btn { background: var(--danger); }
.ok-btn { background: var(--ok); }
.secondary-btn { background: var(--muted); }

hr.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

.panel { margin-bottom: 12px; }
.panel .label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.panel .value { font-size: 18px; font-weight: 600; }

.call-controls { display: flex; gap: 8px; }
.call-controls button { flex: 1; }

.timer { text-align: center; font-variant-numeric: tabular-nums; font-size: 22px; margin-top: 8px; }

.banner {
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  margin-bottom: 10px;
}
.banner.warning { background: #fff4e5; color: #7a4b00; }
.banner.error { background: #fdecea; color: #8a1c14; }

@media (max-width: 400px) {
  .phone { padding: 16px; }
}
