﻿:root {
  --bg: #f5f6f8;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --primary: #f6821f;
  --border: #e5e7eb;
  --error: #dc2626;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --card: #1b1e25;
    --text: #e8e8e8;
    --muted: #9ca3af;
    --border: #2d313a;
    --error: #f87171;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.back {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back:hover { color: var(--primary); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 36px;
  padding: 30px 16px 48px;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Quầng sáng nền */
.glow {
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  animation: float 14s ease-in-out infinite alternate;
}
.glow-1 { background: #f6821f; top: -160px; left: -140px; }
.glow-2 { background: #c8102e; bottom: -180px; right: -140px; animation-delay: -7s; }

@keyframes float {
  to { transform: translate(60px, 40px) scale(1.15); }
}

/* Tiêu đề chào mừng */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  animation: rise 0.9s cubic-bezier(.2,.8,.2,1) both;
}

.eyebrow {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-radius: 999px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.welcome {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.15;
}

.welcome .line {
  font-size: clamp(1rem, 3.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.welcome .brand {
  font-size: clamp(1.35rem, 6.2vw, 4.2rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: linear-gradient(100deg, #c8102e 0%, #f6821f 30%, #ffd166 50%, #f6821f 70%, #c8102e 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 24px rgba(246, 130, 31, 0.28));
  animation: shine 5s linear infinite;
}

.divider {
  width: 120px;
  height: 4px;
  margin: 22px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

@keyframes shine {
  to { background-position: -250% center; }
}

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

@media (prefers-reduced-motion: reduce) {
  .glow, .hero, .welcome .brand { animation: none; }
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.25);
}

.tabs { display: flex; gap: 4px; margin-bottom: 16px; }

.tab {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.tab.active { color: var(--text); border-color: var(--primary); }

form { display: grid; gap: 10px; }

input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

button {
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: wait; }

button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }

.msg { color: var(--error); min-height: 1.2em; margin: 12px 0 0; }

.muted { color: var(--muted); }
