/* Base tokens — light, clean, modern */
:root {
  /* Background */
  --bg-1: #f8fafc; /* slate-50 */
  --bg-2: #eef2ff; /* indigo-50 */
  --bg-3: #e0f2fe; /* sky/cyan-100 */

  /* Surfaces */
  --card-bg: #ffffff;
  --border: #e6e8ee; /* neutral soft */
  --shadow: 0 18px 50px rgba(2, 6, 23, 0.10);

  /* Text */
  --text: #0f172a;   /* slate-900 */
  --muted: #64748b;  /* slate-500 */

  /* Brand */
  --primary: #2563eb;       /* blue-600 */
  --primary-hover: #1d4ed8; /* blue-700 */
  --ring: rgba(37, 99, 235, 0.26);
  --radius: 20px;

  /* States */
  --success: #10b981;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, Segoe UI, Roboto, PingFang SC, Microsoft YaHei, Noto Sans CJK SC, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at -10% -20%, var(--bg-2) 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 0%, var(--bg-3) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, #f1f5f9 100%);
}

.page { min-height: 100vh; display: grid; place-items: center; padding: 32px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
  user-select: none;
}
.brand .logo {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}
.brand h1 { margin: 0; font-size: 18px; letter-spacing: .5px; }
.brand p { margin: 0; opacity: .8; font-size: 12px; }

.card { width: 100%; max-width: 760px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px 40px 72px; position: relative; }
.card-title { margin: 0 0 22px 0; font-size: 36px; font-weight: 800; color: #0b1220; letter-spacing: .2px; }

.auth-form { display: grid; gap: 20px; }
.field { display: grid; gap: 12px; }
.label { color: var(--muted); font-size: 14px; }
.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 14px;
  border: 1px solid #e6e8ee;
  background: #f8fafc;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  min-height: 52px;
}
.input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--ring);
}
.input::placeholder { color: #94a3b8; }

.actions { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.actions-center { justify-content: center; }
.btn {
  appearance: none;
  border: none;
  padding: 14px 22px;
  font-size: 16px;
  border-radius: 14px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, box-shadow .15s ease;
  min-height: 50px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { background: var(--primary-hover); }

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

/* bottom-right forgot link inside card */
.forgot-link { position: absolute; bottom: 20px; right: 20px; font-weight: 600; }
.register-link { position: absolute; bottom: 52px; right: 20px; font-weight: 600; }

/* register page inline layout for code sending */
.inline-group { display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: center; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* tips */
.tip { margin-top: 6px; font-size: 12px; color: var(--muted); }
.tip.success { color: var(--success); }
.tip.error { color: var(--danger); }

/* Deprecated modal styles removed (now separate page) */

@media (max-width: 640px) {
  .card { max-width: 94vw; padding: 28px 22px 56px; border-radius: 16px; }
  .card-title { font-size: 28px; }
  .btn { width: 100%; }
}

/* legal links below the auth card */
.legal-links {
  text-align: center;
  margin-top: 12px;
  color: var(--muted);
}
.legal-links a { color: var(--primary); font-weight: 600; text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
