/* MY-SHOP auth — login/register portal styles */
/* split from main.css lines 681-1550 */
/* Auth pages */
.page-auth {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
}

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

.auth-shell--solo {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top, rgba(var(--teal-rgb), 0.08), transparent 45%),
    var(--ink);
  padding: 1.25rem;
}

.auth-shell--solo .auth-main {
  width: min(480px, 100%);
  min-height: auto;
  background: transparent;
  border: 0;
  padding: 0;
}

.auth-shell--solo .auth-card {
  box-shadow: var(--shadow-soft);
}

.auth-shell--solo .auth-toolbar {
  padding: 0 0 0.85rem;
}

.auth-toolbar--end {
  justify-content: flex-end;
}

.auth-visual {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 13.5rem;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.auth-visual > picture {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
}

.auth-visual-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
}

.auth-visual-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(6, 18, 20, 0.2) 0%, rgba(6, 18, 20, 0.55) 42%, rgba(6, 18, 20, 0.92) 100%),
    radial-gradient(ellipse at 20% 15%, rgba(62, 207, 191, 0.28), transparent 42%),
    radial-gradient(ellipse at 85% 80%, rgba(242, 176, 69, 0.2), transparent 40%);
}

.auth-visual-content {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.4rem 1.5rem;
  max-width: 34rem;
}

.auth-visual-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-visual-brand .brand--aside {
  margin: 0;
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 0.92;
  color: #fff;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.auth-visual-lead {
  margin: 0.9rem 0 0;
  color: rgba(215, 230, 226, 0.9);
  font-size: 1.02rem;
  line-height: 1.45;
  max-width: 28ch;
}

.auth-visual-points {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: none;
  gap: 0.65rem;
}

.auth-visual-points li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(6, 18, 20, 0.35);
  backdrop-filter: blur(10px);
  color: rgba(215, 230, 226, 0.92);
  font-size: 0.9rem;
  line-height: 1.35;
}

.auth-visual-points i {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--accent);
}

.auth-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  background: var(--auth-panel-bg);
  border-top: 1px solid var(--auth-panel-border);
}

.auth-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0;
}

.auth-card {
  width: min(440px, 100%);
  margin: 0.75rem auto 2rem;
  padding: 1.35rem 1.2rem 1.6rem;
  border: 1px solid var(--auth-panel-border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(8, 28, 34, 0.08);
}

.auth-card--wide {
  width: min(560px, 100%);
}

html[data-theme="dark"] .auth-card {
  background: rgba(16, 40, 44, 0.72);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .auth-card {
  background: #ffffff;
  border-color: rgba(22, 48, 54, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8),
    0 18px 42px rgba(16, 40, 46, 0.08);
}

.auth-eyebrow {
  margin: 0 0 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  font-size: clamp(1.7rem, 3.8vw, 2.2rem);
  line-height: 1.12;
}

.auth-head p {
  margin: 0.7rem 0 0;
  color: var(--mist-dim);
  max-width: 40ch;
  font-size: 0.98rem;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--mist-dim);
  font-size: 0.9rem;
  font-weight: 600;
  width: fit-content;
  transition: color 0.2s ease;
}

.auth-back:hover {
  color: var(--text-strong);
}

.auth-back i {
  width: 1rem;
  height: 1rem;
}

.auth-form {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.45rem;
}

.auth-section {
  display: grid;
  gap: 0.95rem;
  padding-top: 0.35rem;
}

.auth-section + .auth-section {
  margin-top: 0.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.auth-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist-soft);
}

.auth-submit {
  margin-top: 0.35rem;
  min-height: 3.15rem;
  border-radius: 12px;
  font-size: 1rem;
}

.auth-switch {
  margin: 1.35rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--mist-dim);
  font-size: 0.94rem;
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 700;
}

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

.auth-alt {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}

.auth-alt-label {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist-soft);
}

.auth-alt .btn--ghost {
  min-height: 3rem;
  border-radius: 12px;
}

/* Dual portal login — employee (teal) vs shop (amber) */
.page-auth--portal .auth-main {
  background:
    radial-gradient(ellipse at top right, rgba(var(--teal-rgb), 0.1), transparent 42%),
    radial-gradient(ellipse at bottom left, rgba(var(--accent-rgb), 0.08), transparent 46%),
    var(--auth-panel-bg);
}

.auth-card--portal {
  width: min(460px, 100%);
  margin: 0.55rem auto 1.75rem;
  padding: 1.45rem 1.25rem 1.55rem;
  border-radius: 22px;
  transition:
    border-color 0.28s var(--ease),
    box-shadow 0.28s var(--ease),
    background 0.28s var(--ease);
}

.auth-card--portal[data-login-mode="employee"] {
  border-color: rgba(var(--teal-rgb), 0.28);
  box-shadow:
    0 18px 40px rgba(8, 28, 34, 0.1),
    0 0 0 1px rgba(var(--teal-rgb), 0.08);
}

.auth-card--portal[data-login-mode="shop"] {
  border-color: rgba(var(--accent-rgb), 0.34);
  box-shadow:
    0 18px 40px rgba(8, 28, 34, 0.1),
    0 0 0 1px rgba(var(--accent-rgb), 0.1);
}

html[data-theme="dark"] .auth-card--portal[data-login-mode="employee"] {
  background:
    linear-gradient(165deg, rgba(var(--teal-rgb), 0.1), transparent 42%),
    rgba(16, 40, 44, 0.78);
}

html[data-theme="dark"] .auth-card--portal[data-login-mode="shop"] {
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.12), transparent 42%),
    rgba(16, 40, 44, 0.78);
}

html[data-theme="light"] .auth-card--portal[data-login-mode="employee"] {
  background:
    linear-gradient(165deg, rgba(var(--teal-rgb), 0.08), #fff 38%);
}

html[data-theme="light"] .auth-card--portal[data-login-mode="shop"] {
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.1), #fff 38%);
}

.auth-visual-kicker {
  margin: 0.85rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-shell--portal[data-visual-mode="employee"] .auth-visual-kicker {
  color: #7dfff0;
}

.auth-shell--portal[data-visual-mode="shop"] .auth-visual-kicker {
  color: #ffd27a;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 1.35rem 0 0;
}

.auth-mode-tab {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
  color: var(--mist-dim);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.auth-mode-tab-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  background: var(--chip-bg);
  color: inherit;
}

.auth-mode-tab-icon i {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-mode-tab-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.auth-mode-tab-copy strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}

.auth-mode-tab-copy em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--mist-soft);
}

.auth-mode-tab:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--text-strong) 18%, var(--line));
}

.auth-mode-tab--employee.is-active {
  border-color: rgba(var(--teal-rgb), 0.55);
  background:
    linear-gradient(145deg, rgba(var(--teal-rgb), 0.2), rgba(var(--teal-rgb), 0.05));
  box-shadow: 0 10px 24px rgba(var(--teal-rgb), 0.16);
  color: var(--teal);
}

.auth-mode-tab--employee.is-active .auth-mode-tab-icon {
  background: rgba(var(--teal-rgb), 0.18);
  color: var(--teal);
}

.auth-mode-tab--shop.is-active {
  border-color: rgba(var(--accent-rgb), 0.58);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.05));
  box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.18);
  color: var(--accent);
}

.auth-mode-tab--shop.is-active .auth-mode-tab-icon {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent-deep);
}

html[data-theme="light"] .auth-mode-tab--shop.is-active .auth-mode-tab-icon {
  color: var(--accent);
}

.auth-mode-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-mode-tab--employee.is-active:focus-visible {
  outline-color: var(--teal);
}

.auth-panel {
  position: relative;
  margin-top: 1rem;
  padding: 1.2rem 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  animation: auth-panel-in 0.32s var(--ease);
}

.auth-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-panel--employee {
  background:
    linear-gradient(135deg, rgba(var(--teal-rgb), 0.08), transparent 48%),
    var(--panel-muted);
  border-color: rgba(var(--teal-rgb), 0.22);
}

.auth-panel--employee::before {
  background: linear-gradient(180deg, var(--teal), color-mix(in srgb, var(--teal) 40%, transparent));
}

.auth-panel--shop {
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), transparent 48%),
    var(--panel-muted);
  border-color: rgba(var(--accent-rgb), 0.24);
}

.auth-panel--shop::before {
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent));
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-panel-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.85rem;
  margin-bottom: 0.2rem;
}

.auth-panel-badge {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 14px;
  flex-shrink: 0;
}

.auth-panel-badge i {
  width: 1.2rem;
  height: 1.2rem;
}

.auth-panel--employee .auth-panel-badge {
  background: rgba(var(--teal-rgb), 0.16);
  color: var(--teal);
}

.auth-panel--shop .auth-panel-badge {
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent-deep);
}

html[data-theme="light"] .auth-panel--shop .auth-panel-badge {
  color: var(--accent);
}

.auth-panel-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-panel--employee .auth-panel-kicker {
  color: var(--teal);
}

.auth-panel--shop .auth-panel-kicker {
  color: var(--accent);
}

.auth-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-strong);
}

.auth-panel-head p {
  margin: 0.28rem 0 0;
  color: var(--mist-dim);
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-panel .auth-form {
  margin-top: 1.1rem;
}

.auth-panel .form-alert {
  margin-top: 0.95rem;
}

.auth-switch--compact {
  margin-top: 1rem;
  padding-top: 0.95rem;
}

.auth-submit--employee {
  background: linear-gradient(135deg, var(--teal), color-mix(in srgb, var(--teal) 72%, #0b3d38));
  color: #042421;
  box-shadow: 0 12px 26px rgba(var(--teal-rgb), 0.24);
}

.auth-submit--employee:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(var(--teal-rgb), 0.3);
}

.auth-submit--shop {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--on-accent);
  box-shadow: var(--accent-glow);
}

.auth-submit--shop:hover {
  transform: translateY(-2px);
  box-shadow: var(--accent-glow-strong);
}

.auth-submit[aria-busy="true"] {
  opacity: 0.82;
  cursor: wait;
}

.auth-panel--employee .field input:focus {
  border-color: rgba(var(--teal-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--teal-rgb), 0.16);
}

.auth-panel--shop .field input:focus {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: var(--focus-ring);
}

html[data-theme="light"] .auth-mode-tab {
  background: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .auth-panel--employee,
html[data-theme="light"] .auth-panel--shop {
  background-color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 420px) {
  .auth-mode-tab {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    min-height: 4.4rem;
    gap: 0.45rem;
    padding: 0.75rem 0.55rem;
  }

  .auth-mode-tab-copy em {
    display: none;
  }

  .auth-card--portal {
    padding: 1.2rem 0.95rem 1.35rem;
    border-radius: 18px;
  }

  .auth-panel {
    padding: 1.05rem 0.9rem 1rem;
  }
}

@media (min-width: 768px) {
  .auth-shell--portal .auth-visual-scrim {
    background:
      linear-gradient(105deg, rgba(6, 18, 20, 0.22) 0%, rgba(6, 18, 20, 0.62) 48%, rgba(6, 18, 20, 0.9) 100%),
      radial-gradient(ellipse at 18% 20%, rgba(var(--teal-rgb), 0.28), transparent 42%),
      radial-gradient(ellipse at 82% 78%, rgba(var(--accent-rgb), 0.22), transparent 40%);
  }

  .auth-shell--portal[data-visual-mode="employee"] .auth-visual-scrim {
    background:
      linear-gradient(105deg, rgba(6, 18, 20, 0.22) 0%, rgba(6, 18, 20, 0.62) 48%, rgba(6, 18, 20, 0.9) 100%),
      radial-gradient(ellipse at 22% 18%, rgba(var(--teal-rgb), 0.36), transparent 46%),
      radial-gradient(ellipse at 80% 80%, rgba(var(--teal-rgb), 0.12), transparent 40%);
  }

  .auth-shell--portal[data-visual-mode="shop"] .auth-visual-scrim {
    background:
      linear-gradient(105deg, rgba(6, 18, 20, 0.22) 0%, rgba(6, 18, 20, 0.62) 48%, rgba(6, 18, 20, 0.9) 100%),
      radial-gradient(ellipse at 22% 18%, rgba(var(--accent-rgb), 0.34), transparent 46%),
      radial-gradient(ellipse at 80% 80%, rgba(var(--accent-rgb), 0.14), transparent 40%);
  }

  .auth-card--portal {
    width: min(480px, 100%);
    margin-top: 1rem;
    padding: 1.65rem 1.45rem 1.7rem;
  }
}

.auth-card .field span,
.auth-card .field-label {
  color: var(--mist);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.auth-card .field input,
.auth-card .phone-field > input[type="tel"],
.auth-card .country-trigger {
  min-height: 2.9rem;
  border-radius: 10px;
  border-color: var(--auth-input-border);
  background: var(--input-bg);
}

html[data-theme="light"] .auth-card .field input,
html[data-theme="light"] .auth-card .phone-field > input[type="tel"],
html[data-theme="light"] .auth-card .country-trigger {
  background: var(--panel-muted);
  border-color: var(--line);
  box-shadow: inset 0 1px 1px rgba(16, 40, 46, 0.03);
}

html[data-theme="light"] .auth-card .field input:focus,
html[data-theme="light"] .auth-card .phone-field > input[type="tel"]:focus,
html[data-theme="light"] .auth-card .country-trigger:focus-visible {
  background: #fff;
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: var(--focus-ring);
}

html[data-theme="dark"] .auth-card .field input,
html[data-theme="dark"] .auth-card .phone-field > input[type="tel"],
html[data-theme="dark"] .auth-card .country-trigger {
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="dark"] .auth-card .field input:focus,
html[data-theme="dark"] .auth-card .phone-field > input[type="tel"]:focus,
html[data-theme="dark"] .auth-card .country-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.auth-card .profile-upload {
  border-radius: 14px;
  border-color: var(--auth-input-border);
  background: var(--panel-muted);
  padding: 1rem 1.05rem;
}

html[data-theme="light"] .auth-card .profile-upload {
  background: #f4f8f6;
  border-color: rgba(22, 48, 54, 0.1);
  box-shadow: none;
}

html[data-theme="dark"] .auth-card .profile-upload {
  background: rgba(255, 255, 255, 0.03);
}

.auth-card .profile-upload-btn {
  border-radius: 10px;
  background: var(--surface);
}

html[data-theme="light"] .auth-card .profile-upload-btn {
  background: #fff;
}

.field-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--mist-soft);
}

@media (min-width: 768px) {
  .auth-shell:not(.auth-shell--solo) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    align-items: stretch;
  }

  .auth-shell:not(.auth-shell--solo) .auth-visual {
    grid-column: 1;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    height: 100%;
    position: sticky;
    top: 0;
    align-content: end;
  }

  .auth-shell:not(.auth-shell--solo) .auth-visual-content {
    padding: 2.5rem;
  }

  .auth-shell:not(.auth-shell--solo) .auth-visual-brand .brand--aside {
    font-size: clamp(2.6rem, 4.2vw, 4.2rem);
  }

  .auth-shell:not(.auth-shell--solo) .auth-visual-lead {
    font-size: 1.15rem;
    max-width: 24ch;
  }

  .auth-shell:not(.auth-shell--solo) .auth-visual-points {
    display: grid;
    margin-top: 1.5rem;
  }

  .auth-shell:not(.auth-shell--solo) .auth-main {
    grid-column: 2;
    width: 100%;
    border-top: 0;
    border-left: 1px solid var(--auth-panel-border);
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 2rem;
    overflow-y: auto;
  }

  .auth-toolbar {
    padding: 1.35rem 1.75rem 0;
  }

  .auth-card {
    margin: 1.25rem auto 2.5rem;
    padding: 1.75rem 1.7rem 1.85rem;
  }

  .auth-card--wide {
    width: min(520px, calc(100% - 2.5rem));
  }
}


