:root {
  --accent: #2563eb;
  --bg: #0f172a;
  --panel: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --danger: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; flex-direction: column; }

#loginScreen.active {
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--panel);
  padding: 32px;
  border-radius: 12px;
  width: 320px;
}

.login-card h1 { color: var(--accent); font-size: 20px; margin: 0 0 20px; }

.login-card input {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f172a;
  color: var(--text);
}

.login-card button, .btn-primary {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger { background: var(--danger); }
.status { padding: 8px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.status.err { background: #7f1d1d; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--panel);
}

.topbar .brand { font-weight: 700; color: var(--accent); }

.conn-pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #334155; }
.conn-pill.registered { background: #14532d; }
.conn-pill.connecting { background: #78350f; }

.app-body { display: flex; flex: 1; }
.rail { width: 220px; background: var(--panel); padding: 16px; }
.rail button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px;
  margin-bottom: 4px;
  background: none;
  border: none;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
}
.rail button.active { background: var(--accent); }

.panel { display: none; flex: 1; padding: 24px; overflow-y: auto; }
.panel.active { display: block; }

.dialpad { display: grid; grid-template-columns: repeat(3, 60px); gap: 10px; margin: 16px 0; }
.dialpad button { padding: 16px; font-size: 18px; border-radius: 8px; border: none; background: var(--panel); color: var(--text); cursor: pointer; }

#dialInput { font-size: 24px; padding: 10px; width: 240px; margin-bottom: 12px; background: var(--panel); color: var(--text); border: 1px solid #334155; border-radius: 6px; }

.list-row { padding: 12px; border-bottom: 1px solid #334155; display: flex; justify-content: space-between; }
