:root {
  --bg: #0f1420;
  --panel: #1a2130;
  --panel-2: #232c3d;
  --text: #e8edf5;
  --muted: #8a97ad;
  --accent: #4f8cff;
  --green: #29c26f;
  --red: #ef4b5b;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #1c2740, var(--bg));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 16px;
}

.app { width: 100%; max-width: 380px; }

.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.hidden { display: none !important; }

h1 { margin: 0; font-size: 26px; text-align: center; }
.subtitle { margin: 4px 0 20px; text-align: center; color: var(--muted); font-size: 13px; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 18px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  outline: none;
}
input[type="text"]:focus { border-color: var(--accent); }

.btn {
  border: none;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform .05s ease, filter .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); width: 100%; margin-top: 14px; }
.btn.call { background: var(--green); flex: 1; }
.btn.hangup { background: var(--red); flex: 1; }
.btn.ghost { background: var(--panel-2); }
.btn.tiny { padding: 6px 10px; font-size: 12px; }

.status { text-align: center; font-size: 13px; color: var(--muted); min-height: 18px; margin-top: 10px; }

.me {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.me strong { color: var(--text); }
.me .btn { margin-left: auto; }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.online { background: var(--green); box-shadow: 0 0 8px var(--green); }

.call-status {
  text-align: center;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 12px;
  min-height: 20px;
}

.dial-display {
  text-align: center;
  font-size: 24px !important;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.dialpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.key {
  padding: 16px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  cursor: pointer;
}
.key:active { background: var(--accent); }

.actions { display: flex; gap: 10px; align-items: stretch; }
.actions .ghost { flex: 0 0 56px; }

.incoming {
  margin-top: 18px;
  padding: 18px;
  background: var(--panel-2);
  border-radius: var(--radius);
  text-align: center;
  animation: pulse 1.2s infinite;
}
.incoming p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.incoming-from { font-size: 28px; font-weight: 700; margin-bottom: 14px; }
.incoming-actions { display: flex; gap: 10px; }
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(79,140,255,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(79,140,255,0); }
}

.roster {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: var(--muted);
}
.roster-title { color: var(--muted); }
.roster-list { color: var(--text); }
