:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --subtle: #64748b;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --focus-ring: rgba(29, 78, 216, 0.18);
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;
  --danger-ink: #b91c1c;
  --info-bg: #eff6ff;
  --info-line: #bfdbfe;
  --info-ink: #1e3a8a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(640px 380px at 14% 18%, rgba(59, 130, 246, 0.11), transparent 70%),
    radial-gradient(560px 360px at 86% 80%, rgba(14, 165, 233, 0.09), transparent 70%);
}

.layout {
  position: relative;
  max-width: 980px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3rem;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.brand-icon {
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.22);
}

.brand-name {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-tag {
  display: block;
  font-size: 0.82rem;
  color: var(--subtle);
}

.hero-title {
  margin: 0 0 0.9rem;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.hero-desc {
  margin: 0 0 1.8rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 44ch;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.95rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
}

.feature-list strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.feature-list span {
  display: block;
  font-size: 0.82rem;
  color: var(--subtle);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  margin-top: 0.36rem;
  flex: none;
}

.dot-ok { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14); }
.dot-blue { background: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); }
.dot-slate { background: #64748b; box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.12); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2rem;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.03);
}

.card-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.card-head p {
  margin: 0 0 1.5rem;
  color: var(--subtle);
  font-size: 0.9rem;
}

.form {
  display: grid;
  gap: 1.05rem;
}

.alert {
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger-ink);
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.42rem;
  color: #1e293b;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.42rem;
}

.label-row label {
  margin-bottom: 0;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
}

.link-btn:hover { text-decoration: underline; }

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  font-size: 0.94rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--focus-ring);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 2.6rem;
}

.icon-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--subtle);
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.checkbox-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.submit-btn {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.submit-btn:hover:not(:disabled) { background: var(--accent-hover); }
.submit-btn:disabled { opacity: 0.72; cursor: wait; }

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

.help-note {
  margin-top: 1rem;
  padding: 0.7rem 0.88rem;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  color: var(--info-ink);
}

.card-foot {
  margin-top: 1.45rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  font-size: 0.79rem;
  color: #94a3b8;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.15rem;
  }
  .hero-title { font-size: 1.6rem; }
  .card { padding: 1.5rem; }
}
