/* Customer auth — logo + login / register panels */

.auth-body {
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(193, 154, 86, 0.16), transparent 60%),
    linear-gradient(180deg, #faf7f0 0%, var(--cream) 60%, #f2ecdf 100%);
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-top {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-back {
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}

.auth-back:hover {
  color: var(--ink);
  border-color: var(--gold);
}

.auth-main {
  flex: 1;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
  padding: 40px 0 70px;
}

.auth-logo-large {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  background: var(--ink);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  box-shadow: 0 24px 50px -26px rgba(10, 31, 51, 0.7);
}

.auth-logo-large svg {
  width: 48px;
  height: 48px;
}

.auth-intro h1 {
  margin-top: 18px;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.auth-intro > p {
  margin-top: 18px;
  max-width: 430px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--muted);
}

.auth-points {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #4c5560;
}

.auth-points .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--gold-600);
  display: grid;
  place-items: center;
  flex: none;
}

.auth-points .tick .icon {
  width: 12px;
  height: 12px;
}

.auth-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ink);
}

.auth-card-register {
  background: linear-gradient(180deg, #fffdf8 0%, #fbf5e8 100%);
  border-color: #e4d3b2;
}

.auth-card-register::before {
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300));
}

.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold-600);
  text-transform: uppercase;
}

.card-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold);
}

.auth-card h2 {
  margin-top: 10px;
  font-size: 26px;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.card-lead {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
  min-height: 36px;
}

.auth-card form {
  margin-top: 18px;
  display: grid;
  gap: 13px;
}

.auth-card .field > label {
  color: var(--muted);
  font-size: 11.5px;
}

.auth-card .field > label {
  display: block;
}

.auth-card .field > label em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: var(--muted-2);
  font-size: 9.5px;
}

.auth-card .input {
  height: 44px;
  font-size: 14px;
}

.password-wrap {
  position: relative;
}
.password-wrap .input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.password-toggle:hover {
  color: var(--ink);
  background: var(--cream);
}

.password-toggle .icon {
  width: 16px;
  height: 16px;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.code-row .code-btn {
  height: 44px;
  padding: 0 10px;
  font-size: 10.5px;
  white-space: nowrap;
}

.code-hint {
  min-height: 14px;
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.code-hint.ok {
  color: var(--green);
}

.reset-field {
  margin-top: 10px;
  text-align: left;
}

.auth-modal .reset-field > label {
  font-size: 11px;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted-2);
  font-size: 20px;
  line-height: 1;
}

.auth-modal {
  position: relative;
}

.auth-submit {
  height: 46px;
  margin-top: 4px;
}

.form-error {
  display: none;
  padding: 8px 10px;
  border-radius: 7px;
  background: #fbeceb;
  border: 1px solid #efd1cc;
  color: #913d31;
  font-size: 11.5px;
  line-height: 1.5;
}

.form-error.show {
  display: block;
}

.auth-switch {
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

.auth-switch a {
  margin-left: 4px;
  color: var(--gold-600);
  font-weight: 600;
  border-bottom: 1px solid var(--gold-300);
}

.auth-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--muted-2);
}

.auth-footer {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--muted-2);
}

/* success modal */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(7, 24, 40, 0.56);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.auth-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.auth-modal {
  width: min(380px, 100%);
  background: var(--paper);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(0.99);
  transition: transform 0.3s var(--ease);
}

.auth-modal-backdrop.open .auth-modal {
  transform: none;
}

.auth-modal .ok-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.auth-modal .ok-mark .icon {
  width: 28px;
  height: 28px;
}

.auth-modal h2 {
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.auth-modal > p {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.success-email {
  margin: 18px 0;
  padding: 11px 14px;
  border-radius: 9px;
  background: var(--cream);
  border: 1px dashed var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

@media (max-width: 1080px) {
  .auth-main {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 20px 0 56px;
  }
  .auth-intro > p {
    max-width: 640px;
  }
  .auth-cards {
    max-width: 820px;
  }
}

@media (max-width: 720px) {
  .auth-top {
    width: calc(100% - 32px);
    padding: 16px 0;
  }
  .auth-main {
    width: calc(100% - 32px);
  }
  .auth-cards {
    grid-template-columns: 1fr;
  }
  .auth-intro h1 {
    font-size: 34px;
  }
  .auth-logo-large {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    margin-bottom: 16px;
  }
  .auth-logo-large svg {
    width: 38px;
    height: 38px;
  }
  .auth-card {
    padding: 24px 20px;
  }
  .auth-top-actions .auth-back {
    display: none;
  }
  .auth-footer {
    width: calc(100% - 32px);
  }
}


.brand-logo { display: block; width: auto; height: 36px; }
@media (max-width: 600px) { .brand-logo { height: 30px; } }

/* Rebrand auth layout */
.auth-logo-large {
  width: 220px;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  display: block;
  box-shadow: none;
}
.auth-logo-large img { display: block; width: 100%; height: auto; }
.auth-cards {
  grid-template-columns: minmax(0, 460px);
  justify-content: center;
  max-width: 460px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.auth-card[hidden] { display: none !important; }
.auth-top-actions .btn { white-space: nowrap; }
@media (max-width: 720px) {
  .auth-logo-large { width: 180px; }
  .auth-cards { max-width: 100%; }
}
