/* =========================================================
   Auth Pages — Cúpora
   Login, Registro, Admin Login, Staff Login
   Solo tokens --cup-* de cupora-design-system.css
   ========================================================= */

/* ─── Padding-top bajo header fijo (84px) ─────────────── */
.auth-section {
  padding-top: calc(var(--header-height, 84px) + var(--space-6, 32px));
}

/* ─── Split login card (customer) ─────────────────────── */
.auth-login-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  padding: 0;
  max-width: 860px;
  margin-inline: auto;
}

.auth-brand-panel {
  background: var(--cup-sand, #eadcc8);
  padding: var(--space-7) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-brand-logo {
  width: 88px;
  height: auto;
  display: block;
}

.auth-form-panel {
  padding: clamp(32px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  justify-content: center;
}

/* Strip la tarjeta de quote-form dentro del panel */
.auth-form-panel .quote-form {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: none;
  margin: 0;
}

.auth-form-panel .customer-auth-form {
  margin-top: 0;
}

.auth-form-heading h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  color: var(--cup-ink-black);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}

.auth-form-heading p {
  font-size: var(--fs-small);
  color: var(--cup-ink-muted);
  line-height: var(--lh-body);
}

/* ─── Register card ────────────────────────────────────── */
.auth-register-card {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 48px);
}

.auth-register-card > h1 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}

.auth-register-card > p {
  font-size: var(--fs-small);
  color: var(--cup-ink-muted);
  line-height: var(--lh-body);
  margin-bottom: 0;
}

/* Strip quote-form card treatment inside register (evita nested cards) */
.auth-register-card .quote-form {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  max-width: none;
  margin-inline: 0;
  display: grid;
  gap: var(--space-4, 1.25rem);
  margin-top: var(--space-5, 1.75rem);
}

/* ─── Staff login card ─────────────────────────────────── */
.auth-staff-card {
  max-width: 460px;
  margin-inline: auto;
}

.auth-staff-card > h1 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
}

.auth-staff-card > p {
  font-size: var(--fs-small);
  color: var(--cup-ink-muted);
  line-height: var(--lh-body);
  margin-bottom: var(--space-4);
}

/* ─── Admin login (standalone) ─────────────────────────── */
.admin-login-page {
  background:
    radial-gradient(ellipse 80% 60% at 15% 40%, rgba(234, 220, 200, 0.72) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 85% 75%, rgba(218, 142, 137, 0.09) 0%, transparent 60%),
    #fbf6ee;
}

.admin-auth-logo {
  width: 120px;
  height: auto;
  display: block;
  margin-bottom: var(--space-6);
}

.admin-login-card h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
  text-wrap: balance;
}

.admin-login-card .admin-auth-desc {
  font-size: var(--fs-small);
  color: var(--cup-ink-muted);
  line-height: var(--lh-body);
  margin-bottom: var(--space-5);
}

/* ─── Input focus (admin-form, non-quote-form) ─────────── */
.form-field input,
.form-field select,
.form-field textarea {
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(139, 111, 55, 0.42);
  box-shadow: 0 0 0 4px rgba(139, 111, 55, 0.10);
}

/* ─── Custom checkbox (Emil Kowalski) ──────────────────── */
.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--cup-ink-muted);
  cursor: pointer;
  user-select: none;
}

/* Especificidad alta (.customer-auth-form .auth-checkbox input[type]) = 0,3,1
   Gana sobre .quote-form input (0,1,1) y .cupora-experience input (0,1,1) */
.customer-auth-form .auth-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  display: block;
  width: 15px;
  height: 15px;
  min-height: 15px;
  padding: 0;
  border-radius: 3px;
  border: 1px solid rgba(47, 47, 47, 0.2);
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: none;
  box-shadow: none;
}

.customer-auth-form .auth-checkbox input[type="checkbox"]:checked {
  border-color: var(--cup-gold);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 3.5L4 6.5L9 1' stroke='%238b6f37' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
}

.customer-auth-form .auth-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--cup-gold-light);
  outline-offset: 2px;
}

/* ─── Button press feedback (Emil Kowalski) ────────────── */
.btn {
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1),
              background-color 0.2s ease,
              box-shadow 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

/* ─── Reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .form-field input,
  .form-field select,
  .form-field textarea,
  .auth-checkbox input {
    transition: none;
  }
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-login-card {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    padding: var(--space-4) var(--space-5);
    flex-direction: row;
    justify-content: flex-start;
  }

  .auth-brand-logo {
    width: 72px;
  }

  .auth-form-panel {
    padding: var(--space-5);
  }
}
