/* ── Auth Page ──────────────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 100vh;
}

/* ── Left decorative panel ─────────────────────────────────────────── */
.auth-panel {
  position: relative;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  overflow: hidden;
}

.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/auth-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.45;
  pointer-events: none;
}

.auth-logo {
  position: relative;
  z-index: 1;
  text-decoration: none;
}

.auth-logo img {
  max-height: 3rem;
  filter: brightness(0) invert(1);
}

.auth-logo__text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.75rem;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-panel__quote {
  position: relative;
  z-index: 1;
}

.auth-panel__quote blockquote {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.auth-panel__quote cite {
  font-family: Roboto, sans-serif;
  font-size: 0.75rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Right forms area ──────────────────────────────────────────────── */
.auth-forms {
  display: flex;
  flex-direction: column;
  padding: 3rem 4rem;
  overflow-y: auto;
  background: #fff;
}

/* ── Tabs ──────────────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 0.5px solid #E5E5E5;
  margin-bottom: 2rem;
}

.auth-tab {
  padding: 0 0 0.75rem;
  margin-right: 2rem;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  font-family: Roboto, sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #767676;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -0.5px;
}

.auth-tab.is-active {
  color: #000;
  border-bottom-color: #000;
  font-weight: 500;
}

/* ── Message banner ────────────────────────────────────────────────── */
.auth-message {
  padding: 0.75rem 1rem;
  border-radius: 0;
  font-family: Roboto, sans-serif;
  font-size: 0.8125rem;
  margin-bottom: 1.5rem;
}

.auth-message.is-error {
  background: #fff0f0;
  color: #c0392b;
  border-left: 3px solid #c0392b;
}

.auth-message.is-success {
  background: #f0fff4;
  color: #27ae60;
  border-left: 3px solid #27ae60;
}

/* ── Form panel (login / register) ────────────────────────────────── */
.auth-form-panel {
  display: none;
  flex-direction: column;
  flex: 1;
}

.auth-form-panel.is-active {
  display: flex;
}

.auth-heading {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: #000;
  margin: 0 0 0.5rem;
}

.auth-sub {
  font-family: Roboto, sans-serif;
  font-size: 0.875rem;
  color: #767676;
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

/* ── Google button ─────────────────────────────────────────────────── */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0.5px solid #E5E5E5;
  background: #fff;
  font-family: Roboto, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 1.25rem;
}

.btn-social:hover {
  background: #f8f8f8;
  border-color: #bbb;
}

/* ── Divider ────────────────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: #E5E5E5;
}

.auth-divider span {
  font-family: Roboto, sans-serif;
  font-size: 0.75rem;
  color: #767676;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Form ──────────────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.auth-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: Roboto, sans-serif;
  font-size: 0.75rem;
  color: #767676;
  line-height: 1.2;
}

.auth-forgot {
  font-family: Roboto, sans-serif;
  font-size: 0.75rem;
  color: #767676;
  text-decoration: none;
}

.auth-forgot:hover {
  color: #000;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .auth-input {
  padding-right: 2.5rem;
}

.auth-input {
  width: 100%;
  padding: 0.625rem 0;
  border: none;
  border-bottom: 0.5px solid #767676;
  outline: none;
  background: transparent;
  font-family: Roboto, sans-serif;
  font-size: 0.9375rem;
  color: #000;
  transition: border-color 0.2s;
}

.auth-input::placeholder {
  color: #bbb;
}

.auth-input:focus {
  border-bottom-color: #000;
}

.auth-input.is-invalid {
  border-bottom-color: #c0392b;
}

.auth-toggle-pass {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #767676;
  display: flex;
  align-items: center;
}

.auth-toggle-pass:hover {
  color: #000;
}

/* ── Password strength ──────────────────────────────────────────────── */
.auth-strength {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.auth-strength__bar {
  flex: 1;
  height: 3px;
  background: #E5E5E5;
  position: relative;
  overflow: hidden;
}

.auth-strength__bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--strength, 0%);
  background: var(--strength-color, #E5E5E5);
  transition: width 0.3s, background 0.3s;
}

.auth-strength__label {
  font-family: Roboto, sans-serif;
  font-size: 0.6875rem;
  color: #767676;
  white-space: nowrap;
}

/* ── Field error ────────────────────────────────────────────────────── */
.auth-field-error {
  font-family: Roboto, sans-serif;
  font-size: 0.6875rem;
  color: #c0392b;
  min-height: 1em;
  display: block;
}

/* ── Checkbox ───────────────────────────────────────────────────────── */
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-family: Roboto, sans-serif;
  font-size: 0.8125rem;
  color: #767676;
  line-height: 1.4;
  margin-top: 0.25rem;
}

.auth-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: #000;
  cursor: pointer;
}

.auth-check a {
  color: #000;
  text-decoration: underline;
}

.auth-role-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-role-choice__item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid #E5E5E5;
  border-radius: 0.3125rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.auth-role-choice__item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-role-choice__item span {
  color: #000;
  font-family: Roboto, sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 120%;
}

.auth-role-choice__item:has(input:checked) {
  border-color: #000;
  background: #EBEBEB;
}

/* ── Submit button ──────────────────────────────────────────────────── */
.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
  position: relative;
}

.auth-submit.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.auth-submit.is-loading::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

/* ── Switch link below form ─────────────────────────────────────────── */
.auth-switch {
  margin-top: 1.5rem;
  font-family: Roboto, sans-serif;
  font-size: 0.8125rem;
  color: #767676;
  text-align: center;
}

.auth-switch-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: #000;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    display: none;
  }

  .auth-forms {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 430px) {
  .auth-forms {
    padding: 1.5rem 1rem;
  }

  .auth-fields-row {
    grid-template-columns: 1fr;
  }

  .auth-role-choice {
    grid-template-columns: 1fr;
  }

  .auth-heading {
    font-size: 1.875rem;
  }
}
