/* ==========================================================================
   Vino — Login & Account Creation Styles (login.css)
   ========================================================================== */

body.login-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Centered Brand Presentation */
.brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.brand-title {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
  line-height: 1.1;
  color: var(--text);
}

.brand-subtitle {
  font-size: 11px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.brand-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 400;
}

/* Auth Card */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 32px 30px 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  position: relative;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.5;
}

.card-header-label {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--text);
}

/* Name row (sign-up only) */
.name-row {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease,
    margin-bottom 0.3s ease;
}

.name-row.visible {
  display: grid;
  max-height: 120px;
  opacity: 1;
}

.name-row .form-input {
  padding-left: 14px;
}

/* Form Elements */
.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.6px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.form-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 14px 12px 42px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}

.form-input::placeholder {
  color: #6C5558;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 161, 91, 0.15);
  background: var(--surface-elevated);
}

.form-input:focus + .input-icon,
.form-group:focus-within .input-icon {
  color: var(--gold);
}

/* Password Toggle Button */
.toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.toggle-pwd:hover {
  color: var(--text);
}

/* Helper Row (Remember me / Forgot pwd) */
.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px;
  font-size: 12.5px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
}

.checkbox-label input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--surface-2);
  outline: none;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-label input:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.checkbox-label input:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #241318;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-link {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.forgot-link:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--gold);
  color: #241318;
  border: none;
  border-radius: 24px;
  padding: 13px 24px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(201, 161, 91, 0.22);
}

.btn-submit:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 161, 91, 0.35);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Auth mode toggle (sign in / create account) */
.auth-toggle {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-toggle a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.auth-toggle a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
}

/* Alert / Message Banner */
.alert-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}

.alert-banner.error {
  display: flex;
  background: rgba(229, 83, 83, 0.12);
  border: 1px solid rgba(229, 83, 83, 0.35);
  color: #F87171;
}

.alert-banner.success {
  display: flex;
  background: rgba(201, 161, 91, 0.12);
  border: 1px solid rgba(201, 161, 91, 0.35);
  color: var(--gold);
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #241318;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px 20px 20px;
  }

  .brand-title {
    font-size: 30px;
  }
}
