@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #f9fafb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: linear-gradient(135deg, #eef2ff 0%, #f9fafb 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 420px;
  padding: 40px 32px;
  animation: rise .4s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 24px;
  margin-bottom: 20px;
}

h1 { font-size: 26px; font-weight: 600; margin-bottom: 6px; }

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
  font-weight: 400;
}

.form-group { margin-bottom: 18px; }

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  transition: .2s;
  background: #fff;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}

.btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: .2s;
  margin-top: 6px;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99,102,241,.25);
}

.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover:not(:disabled) { border-color: var(--primary); box-shadow: none; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

.auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
  display: none;
}

.alert.error   { background: #fee2e2; color: #991b1b; display: block; }
.alert.success { background: #d1fae5; color: #065f46; display: block; }

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.otp-inputs input {
  width: 52px;
  height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0;
}

.otp-inputs input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}

.otp-inputs input.filled {
  border-color: var(--primary);
  background: #eef2ff;
}

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.dashboard { max-width: 520px; text-align: center; }

.dashboard .avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 600;
  margin: 0 auto 20px;
}