* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body.store-auth-page {
  min-height: 100%;
  margin: 0;
}

body.store-auth-page {
  color: #332719;
  background-color: var(--auth-bg, #fffaf1);
  background-image: var(--auth-backdrop);
  background-attachment: fixed;
  font-family: "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

.store-auth-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 64px 24px 32px;
}

.store-auth-back {
  position: absolute;
  top: 24px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #5e4a35;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease, transform .2s ease;
}

.store-auth-back:hover {
  color: var(--auth-primary);
  transform: translateX(-2px);
}

.store-auth-back svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-auth-card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
  padding: 32px 34px 28px;
  background: rgba(255, 255, 255, .93);
  border: 1px solid color-mix(in srgb, var(--auth-secondary) 38%, white);
  border-radius: 18px;
  box-shadow: 0 26px 75px rgba(89, 59, 26, .18);
  backdrop-filter: blur(14px);
}

.store-auth-brand {
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(151, 101, 43, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 28px rgba(89, 59, 26, .1);
}

.store-auth-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 50%;
}

.store-auth-card h1 {
  margin: 0;
  color: #2f2114;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 700;
  letter-spacing: .07em;
  text-align: center;
}

.store-auth-intro {
  margin: 8px 0 22px;
  color: #796650;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.store-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 22px;
  padding: 5px;
  background: rgba(151, 101, 43, .08);
  border: 1px solid rgba(151, 101, 43, .1);
  border-radius: 13px;
}

.store-auth-tabs button {
  min-height: 42px;
  padding: 8px 12px;
  color: #735f49;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.store-auth-tabs button:hover {
  color: var(--auth-primary);
}

.store-auth-tabs button.is-active {
  color: #352414;
  background: #fff;
  box-shadow: 0 7px 18px rgba(85, 55, 25, .1);
}

.store-auth-form {
  display: grid;
  gap: 9px;
}

.store-auth-form label {
  margin-top: 3px;
  color: #4f3d2c;
  font-size: 12px;
  font-weight: 800;
}

.store-auth-field {
  position: relative;
  display: flex;
  align-items: center;
}

.store-auth-field > svg {
  position: absolute;
  left: 14px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #9a8269;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.store-auth-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px 0 44px;
  color: #332719;
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dfd1c0;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.store-auth-password input {
  padding-right: 52px;
}

.store-auth-field input::placeholder {
  color: #ac9d8e;
}

.store-auth-field input:focus {
  background: #fff;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-primary) 17%, transparent);
}

.store-auth-password-toggle {
  position: absolute;
  right: 7px;
  width: 38px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #8e785f;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.store-auth-password-toggle:hover {
  color: var(--auth-primary);
  background: rgba(151, 101, 43, .08);
}

.store-auth-password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-auth-password-toggle[aria-pressed="true"] .password-slash {
  display: none;
}

.store-auth-recovery {
  justify-self: end;
  margin: 2px 0 3px;
  color: var(--auth-primary);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.store-auth-recovery:hover {
  text-decoration: underline;
}

.store-auth-submit {
  min-height: 50px;
  margin-top: 5px;
  padding: 0 18px;
  color: var(--auth-button-text);
  background-color: var(--auth-button);
  background-image: linear-gradient(105deg, var(--auth-secondary) 0%, var(--auth-button) 100%);
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 13px 25px color-mix(in srgb, var(--auth-button) 28%, transparent);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.store-auth-submit:hover {
  filter: brightness(.98);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px color-mix(in srgb, var(--auth-button) 34%, transparent);
}

.store-auth-submit:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.store-auth-switch {
  margin: 20px 0 0;
  color: #796650;
  font-size: 13px;
  text-align: center;
}

.store-auth-switch button {
  padding: 0;
  color: var(--auth-primary);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.store-auth-switch button:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .store-auth-shell {
    align-items: start;
    padding: 74px 14px 20px;
  }

  .store-auth-back {
    top: 20px;
    left: 18px;
  }

  .store-auth-card {
    max-width: 100%;
    padding: 26px 18px 22px;
    border-radius: 15px;
  }

  .store-auth-brand {
    width: 74px;
    height: 74px;
  }

  .store-auth-brand img {
    width: 62px;
    height: 62px;
  }
}
