/* ==========================================================================
   FILE: static/css/accounts/auth.css
   PURPOSE: страницы регистрации и входа Ovelant
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(90deg, var(--brand-blue-black) 0%, var(--brand-ink) 50%, var(--brand-soft-background) 50%, var(--brand-soft-background) 100%);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  min-height: 100vh;
}

.auth-brand-panel {
  --text: #FFFFFF;
  --text-soft: rgba(255, 255, 255, 0.74);
  --text-muted: rgba(255, 255, 255, 0.58);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px clamp(32px, 6vw, 92px);
  background:
    radial-gradient(circle at 78% 16%, rgba(106, 64, 248, 0.28), transparent 32%),
    linear-gradient(180deg, var(--brand-blue-black), var(--brand-ink));
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--text);
  font-weight: 850;
}

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  --brand-mark-stroke: 4px;
  --brand-mark-triangle-x: 5px;
  --brand-mark-triangle-y: 13px;
  color: #FFFFFF;
  border-radius: 10px;
  background: transparent;
}

.auth-brand-name {
  color: #FFFFFF;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.auth-copy {
  max-width: 680px;
  padding: 80px 0;
}

.auth-copy span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.auth-copy h1 {
  margin: 0;
  max-width: 720px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.96;
  font-weight: 300;
  letter-spacing: -0.06em;
}

.auth-copy p {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.auth-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-points div {
  min-height: 120px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.auth-points strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.auth-points span {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  background: var(--brand-soft-background);
}

.auth-form-card {
  width: min(100%, 460px);
  color: var(--brand-ink);
}

.auth-back-link {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--brand-violet);
  font-size: 0.92rem;
  font-weight: 800;
}

.auth-form-heading {
  margin-bottom: 28px;
}

.auth-form-heading h2 {
  margin: 0;
  color: var(--brand-ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.auth-form-heading p {
  max-width: 390px;
  margin: 12px 0 0;
  color: var(--brand-text-secondary);
  font-size: 1rem;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  color: var(--brand-ink);
  font-size: 0.95rem;
  font-weight: 850;
  text-decoration: none;
  border: 1px solid var(--brand-border-soft);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 12px 26px rgba(8, 18, 48, 0.045);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.auth-google-button:hover {
  color: var(--brand-ink);
  border-color: #94A3B8;
  box-shadow: 0 16px 34px rgba(8, 18, 48, 0.07);
  transform: translateY(-1px);
}

.auth-google-button span {
  display: inline-flex;
  width: 22px;
  height: 22px;
}

.auth-google-button svg {
  width: 22px;
  height: 22px;
}

.auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--brand-text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  content: "";
  background: var(--brand-border-soft);
}

.auth-messages {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-message {
  margin: 0;
  padding: 12px 14px;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.42;
  font-weight: 650;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  background: #FFFFFF;
}

.auth-message-error {
  color: #991B1B;
  border-color: #FECACA;
  background: #FEF2F2;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.form-check label {
  color: var(--brand-ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.form-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  color: var(--brand-ink);
  font: inherit;
  border: 1px solid var(--brand-border-soft);
  border-radius: 12px;
  background: #FFFFFF;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-field input:focus {
  border-color: var(--brand-violet);
  box-shadow: 0 0 0 4px rgba(106, 64, 248, 0.12);
}

.form-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
}

.form-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand-violet);
}

.form-check label {
  color: var(--brand-text-secondary);
  font-weight: 600;
  line-height: 1.45;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  margin-top: 4px;
  color: #FFFFFF;
  font: inherit;
  font-weight: 850;
  border: 0;
  border-radius: 14px;
  background: var(--brand-gradient-violet-horizon);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  background: var(--brand-violet-deep);
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--brand-text-secondary);
  font-size: 0.95rem;
}

.auth-switch a {
  color: var(--brand-violet);
  font-weight: 800;
}

.form-errors {
  padding: 14px 16px;
  color: #991B1B;
  border: 1px solid #FECACA;
  border-radius: 12px;
  background: #FEF2F2;
}

.form-errors p,
.field-error {
  margin: 0;
}

.field-error {
  color: #DC2626;
  font-size: 0.84rem;
}

/* Responsive */

@media (max-width: 980px) {
  .auth-page {
    background: var(--bg);
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: auto;
  }

  .auth-copy {
    padding: 58px 0;
  }

  .auth-form-panel {
    background: var(--bg);
    padding-top: 0;
  }

  .auth-form-card {
    padding: 28px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
  }

  .auth-form-heading h2 {
    color: var(--text);
  }

  .auth-form-heading p,
  .auth-switch {
    color: var(--text-muted);
  }

  .form-field label,
  .form-check label {
    color: var(--text-soft);
  }
}

@media (max-width: 720px) {
  .auth-brand-panel,
  .auth-form-panel {
    padding: 28px;
  }

  .auth-copy h1 {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
  }

  .auth-points {
    grid-template-columns: 1fr;
  }
}
