:root {
  --ink: #1A1735;
  --violet: #5B5BF7;
  --violet-hover: #4848E0;
  --violet-soft: #EEECFF;
  --gold: #F5A623;
  --paper: #FAF7F2;
  --muted: #686579;
  --line: #E9E5E0;
  --white: #FFFFFF;
  --error: #D92D20;
  --error-soft: #FFF0F1;
  --green: #0A9D60;
  --green-soft: #E7F8EF;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  font-family: Montserrat, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 12% 15%, rgba(91,91,247,0.1), transparent 32%),
              radial-gradient(circle at 88% 85%, rgba(245,166,35,0.08), transparent 30%),
              var(--paper);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; min-width: 0; }

.auth-nav {
  height: 76px;
  padding: 0 clamp(20px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link {
  display: flex;
  align-items: center;
}
.logo-link img {
  height: 36px;
  width: auto;
  display: block;
}
.back {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .2s;
}
.back:hover {
  color: var(--violet);
}

.auth-main {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 24px 20px 60px;
}
.auth-card {
  width: min(100%, 480px);
  padding: 40px 38px 34px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 70px rgba(26, 23, 53, 0.08);
  backdrop-filter: blur(16px);
}
.auth-head {
  text-align: center;
  margin-bottom: 28px;
}
.auth-head h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
  color: var(--ink);
}
.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.google-btn, .submit-btn {
  width: 100%;
  min-height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 800;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all .2s;
}
.google-btn {
  background: var(--white);
  border: 1.5px solid var(--line);
  color: var(--ink);
}
.google-btn:hover {
  border-color: #BDB9F0;
  background: var(--paper);
}
.google-btn svg {
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.divider:before, .divider:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.field {
  margin-bottom: 18px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 7px;
  color: var(--ink);
}
.field input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 16px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  font-size: 0.86rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder {
  color: #AAA7B7;
}
.field input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(91, 91, 247, 0.12);
}

.password-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.password-line a {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--violet);
}
.password-line a:hover {
  text-decoration: underline;
}

.submit-btn {
  border: 0;
  background: var(--violet);
  color: var(--white);
  box-shadow: 0 12px 25px rgba(91, 91, 247, 0.22);
  margin-top: 6px;
}
.submit-btn:hover {
  background: var(--violet-hover);
  transform: translateY(-1px);
}
.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.terms {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}
.terms a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
}

.switch {
  text-align: center;
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.switch a {
  color: var(--violet);
  font-weight: 800;
}

.form-note {
  display: none;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  animation: fadeIn .2s ease-out;
}
.form-note.show {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .auth-nav {
    height: 64px;
    padding: 0 16px;
  }
  .logo-link img {
    height: 32px;
  }
  .back span {
    display: none;
  }
  .auth-main {
    min-height: calc(100vh - 64px);
    padding: 18px 12px 36px;
  }
  .auth-card {
    padding: 28px 20px 24px;
    border-radius: var(--radius-lg);
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
