/* ============================================================
   Apartments Veronika — Auth Pages (Login / Register / Reset)
   ============================================================ */

/* ── PAGE LAYOUT ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-page__visual {
  position: relative;
  overflow: hidden;
  background: var(--surface2);
}

.auth-page__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay gradient on the visual panel */
.auth-page__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(128, 104, 254, 0.55) 0%,
    rgba(26, 24, 37, 0.40) 100%
  );
}

/* Quote over the visual */
.auth-page__quote {
  position: absolute;
  bottom: 48px;
  left: 40px;
  right: 40px;
  z-index: 1;
  color: #FFFFFF;
}

.auth-page__quote blockquote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  line-height: 1.4;
  margin: 0 0 12px;
  color: #FFFFFF;
}

.auth-page__quote cite {
  font-size: 0.875rem;
  font-style: normal;
  opacity: 0.75;
}

/* ── FORM PANEL ──────────────────────────────────────────── */
.auth-page__form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 64px);
  overflow-y: auto;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card__logo {
  display: inline-flex;
  margin-bottom: 2.5rem;
}

.auth-card__logo img {
  height: 52px;
  width: auto;
}

/* ── TABS (Login / Register toggle) ─────────────────────── */
.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--surface2);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  padding: 9px 20px;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.22s ease;
  text-align: center;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ── HEADINGS ────────────────────────────────────────────── */
.auth-card__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.25;
}

.auth-card__subtitle {
  font-size: 0.9375rem;
  color: var(--text2);
  margin: 0 0 2rem;
}

/* ── FORM FIELDS ─────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group--row {
  flex-direction: row;
  gap: 12px;
}

.form-group--row > .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required {
  color: var(--accent);
  font-size: 0.75rem;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 0.20s ease, box-shadow 0.20s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
  color: var(--text3);
  font-size: 0.875rem;
}

.form-input--error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px var(--error-bg) !important;
}

/* Password field wrapper (for show/hide toggle) */
.form-input-wrap {
  position: relative;
}

.form-input-wrap .form-input {
  padding-right: 44px;
}

.form-input-wrap__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  font-size: 0.9rem;
  line-height: 1;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.form-input-wrap__toggle:hover { color: var(--accent); }

/* ── CHECKBOX / GDPR ─────────────────────────────────────── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-soft);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent);
}

.form-check label {
  font-size: 0.8125rem;
  color: var(--text2);
  line-height: 1.55;
  cursor: pointer;
}

.form-check label a {
  color: var(--accent);
}

/* ── FORGOT / AUXILIARY LINKS ────────────────────────────── */
.auth-aux {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
}

.auth-aux a { color: var(--accent); }

/* ── SUBMIT BUTTON ───────────────────────────────────────── */
.auth-submit {
  margin-top: 0.5rem;
}

/* ── GENERAL ERROR BANNER ────────────────────────────────── */
.auth-error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--error-bg);
  border: 1px solid rgba(229, 62, 62, 0.22);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  animation: av-error-in 0.22s ease both;
}

.auth-error.is-visible { display: flex; }
.auth-error__icon { color: var(--error); flex-shrink: 0; }

/* ── SUCCESS BANNER ──────────────────────────────────────── */
.auth-success {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--success-bg);
  border: 1px solid rgba(46, 204, 113, 0.22);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.auth-success.is-visible { display: flex; }
.auth-success__icon { color: var(--success); flex-shrink: 0; }

/* ── DIVIDER ─────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text3);
  font-size: 0.8125rem;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* ── PASSWORD STRENGTH ───────────────────────────────────── */
.password-strength {
  margin-top: 6px;
  height: 3px;
  background: var(--surface2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.password-strength__bar {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
}

.password-strength--weak   .password-strength__bar { width: 33%; background: var(--error); }
.password-strength--medium .password-strength__bar { width: 66%; background: var(--warning); }
.password-strength--strong .password-strength__bar { width: 100%; background: var(--success); }

/* ── RESET PASSWORD PANEL ────────────────────────────────── */
.auth-reset-panel {
  display: none;
}

.auth-reset-panel.is-visible {
  display: block;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-page__visual {
    display: none;
  }

  .auth-page__form-panel {
    padding: 100px 24px 48px;
    justify-content: flex-start;
  }

  .auth-card {
    max-width: 100%;
  }
}

@media (max-width: 400px) {
  .form-group--row {
    flex-direction: column;
  }
}
