* {
  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-ink,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-ink,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-ink,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-ink,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-ink,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;
  }
}

/* Acceso Isabella: marca legible y el mismo color de acción que la tienda. */
.store-auth-brand { width: min(250px, 100%); height: auto; min-height: 72px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.store-auth-brand img { width: 100%; height: auto; max-width: 100%; max-height: none; border-radius: 0; }
.store-auth-card h1 { font-family: Georgia, serif; font-size: 25px; font-weight: 400; color:var(--auth-primary-ink,var(--auth-primary)); }
.store-auth-field-error { display: block; color: #b42332; font-size: 13px; line-height: 1.4; }
.store-auth-field-error[hidden] { display: none; }
.store-auth-field:has(input[aria-invalid="true"]) { border-color: #b42332; }
.store-auth-alert.swal2-popup { width: 420px; max-width: calc(100% - 32px); padding: 28px 24px; border-radius: 8px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.2); font-family: Arial, sans-serif; }
.store-auth-alert .swal2-title { padding: 0; font-family: inherit; font-size: 24px; font-weight: 600; color: #302a2d; }
.store-auth-alert .swal2-html-container { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: #66616a; }
.store-auth-alert .swal2-icon { margin: 0 auto 22px; }
.store-auth-alert-confirm { min-height: 44px; padding: 10px 30px; border: 0; border-radius: 6px; background: var(--auth-button, #72223b); color: var(--auth-button-text, #fff); font-weight: 600; cursor: pointer; }
.store-auth-alert-confirm:hover { filter: brightness(.92); }
.store-auth-alert-confirm:focus-visible { outline: 3px solid #cfa866; outline-offset: 3px; }
.store-auth-alert-progress { background: #32966b; }
.store-auth-alert-enter { animation: store-auth-alert-in .28s ease-out both; }
.store-auth-alert-exit { animation: store-auth-alert-out .18s ease-in both; }
@keyframes store-auth-alert-in { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes store-auth-alert-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(.97); } }
@media (prefers-reduced-motion: reduce) { .store-auth-alert-enter, .store-auth-alert-exit { animation: none; } .store-auth-alert .swal2-icon * { animation: none !important; } }
.store-auth-submit { background: var(--auth-button) !important; color: var(--auth-button-text) !important; box-shadow: 0 5px 16px color-mix(in srgb, var(--auth-primary) 14%, transparent); }
.store-auth-open { overflow: hidden; }
.store-auth-open .swal2-container { z-index: 1100; }
.store-auth-overlay { --auth-primary: var(--store-primary, #72223b); --auth-primary-ink:var(--store-primary-ink,#72223b); --auth-secondary: var(--store-secondary, #c6a35f); --auth-button: var(--store-button, #72223b); --auth-button-text: var(--store-button-text, #fff); position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20,16,18,.5); font-family: Arial,sans-serif; }
.store-auth-modal-shell { position: relative; width: 440px; max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px #0003; }
.store-auth-overlay .store-auth-shell { min-height: 0; padding: 0; }
.store-auth-overlay .store-auth-card { padding: 40px 28px 24px; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.store-auth-close { position: absolute; z-index: 2; right: 8px; top: 8px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #302a2d; cursor: pointer; }
.store-auth-close:hover { background: #f3edef; color: #302a2d; }
.store-auth-close:focus-visible { outline: 2px solid var(--auth-primary); outline-offset: -2px; }
.store-auth-recovery-title { margin: 0 0 18px; font-size: 22px; line-height: 1.3; }
@media(max-width:480px) { .store-auth-overlay { padding: 8px; } .store-auth-modal-shell { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); } .store-auth-overlay .store-auth-card { padding: 40px 20px 20px; } }
@media (max-width: 767px) {
  .store-auth-shell { padding: 60px 12px 24px; align-items: start; }
  .store-auth-card { padding: 12px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .store-auth-brand { width: min(220px,100%); min-height: 0; margin-inline: auto; }
  .store-auth-field input { font-size: 16px; min-height: 48px; }
  .store-auth-tabs button,.store-auth-submit { min-height: 48px; }
  .store-auth-back { top: 12px; left: 12px; min-height: 44px; }
}
