* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-container {
  width: 340px;
  padding: 40px 32px;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  border: 1px solid rgba(148,163,184,0.2);
  text-align: center;
}

.auth-container h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -.5px;
}

/* ── Telegram button ── */
.btn-telegram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: #2AABEE;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}
.btn-telegram:hover { background: #1d97d6; }
.btn-telegram:disabled { opacity: .6; cursor: not-allowed; }

/* ── Cancel button ── */
.btn-cancel {
  margin-top: 16px;
  background: none;
  border: 1px solid rgba(148,163,184,0.3);
  color: #9ca3af;
  border-radius: 999px;
  padding: 8px 20px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .2s;
}
.btn-cancel:hover { border-color: #6b7280; color: #e5e7eb; }

/* ── Instruction text ── */
.tg-instruction {
  font-size: 14px;
  color: #cbd5e1;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Waiting indicator ── */
.tg-waiting {
  margin-top: 20px;
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #334155;
  border-top-color: #2AABEE;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error ── */
.error {
  margin-top: 12px;
  font-size: 13px;
  color: #f97373;
}

/* ── Dashboard layout ── */
.layout { min-height: 100vh; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(15,23,42,0.95);
  border-bottom: 1px solid rgba(148,163,184,0.2);
}
.topbar .brand { font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

#logout-btn {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.3);
  background: none;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 13px;
}
#logout-btn:hover { background: rgba(255,255,255,.06); }

.content { padding: 20px; }
