/* ==========================================================================
   Shop sign-in and password pages, in the admin palette.
   Light by default; html.auth-dark (set in auth/partials/theme.blade.php
   from the admin's dark mode choice in this browser) switches to dark.
   ========================================================================== */
:root {
  color-scheme: light;
  --auth-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --auth-outer: #e9edf2;
  --auth-card: #ffffff;
  --auth-input: #f7f8fa;
  --auth-border: #e8eaee;
  --auth-border-strong: #d9dde3;
  /* Rio's text colours for every front-facing page (2026-10-13): headings and
     emphasised copy in the brand navy, body copy in navy at 65% (5.21 on white);
     on navy, headings in pale mint (14.5) and body copy in mint at 72% (8.87). */
  --auth-text: #151e31;
  --auth-text-2: #151e31;
  --auth-muted: rgba(21, 30, 49, 0.65);
  --auth-faint: #94a3b8;
  --auth-on-dark: #d8f6ee;
  --auth-on-dark-text: rgba(238, 255, 250, 0.72);
  --auth-hero-bg: #151e31;
  --auth-glow: rgba(255, 255, 255, 0.14);
  /* ArmPOS green, as an accent (Rio, 2026-10-13: "introduce our green ... keeping the
     work clean and simple not too much"). The brand values of landing-home.css:
     the button green with navy text 8.38:1, its hover; green-600 for links and
     focus, 4.88:1 on white; the page hero's glow, rising from the bottom centre. */
  --auth-btn-bg: #61ce70;
  --auth-btn-hover: #8adcae;
  --auth-btn-fg: #151e31;
  --auth-btn-glow: 0 12px 26px -14px rgba(45, 154, 75, 0.6);
  --auth-accent: #16823f;
  --auth-focus: 0 0 0 3px rgba(22, 130, 63, 0.18);
  /* The page hero's green glow on the brand navy, kept soft: the live site's full
     gradient puts the hero's body copy at 3.7:1 where the text sits (measured) */
  --auth-hero-glow: radial-gradient(ellipse 75% 55% at 50% 100%, rgba(31, 133, 79, 0.6), rgba(26, 105, 68, 0.35) 38%, transparent 74%);
  --auth-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 24px 48px -24px rgba(16, 24, 40, 0.18);
  --auth-danger-bg: rgba(239, 68, 68, 0.1);
  --auth-danger-line: rgba(239, 68, 68, 0.28);
  --auth-danger-text: #b91c1c;
  --auth-success-bg: rgba(22, 163, 74, 0.1);
  --auth-success-line: rgba(22, 163, 74, 0.28);
  --auth-success-text: #15803d;
}

html.auth-dark {
  color-scheme: dark;
  --auth-outer: #050809;
  --auth-card: #070d0f;
  --auth-input: #0a1012;
  --auth-border: #1f2629;
  --auth-border-strong: #2a3337;
  /* Dark surfaces take the on-navy roles; the hero keeps the brand gradient */
  --auth-text: #d8f6ee;
  --auth-text-2: #d8f6ee;
  --auth-muted: rgba(238, 255, 250, 0.72);
  --auth-faint: #69747b;
  --auth-glow: rgba(248, 250, 251, 0.18);
  /* The same green; links and focus in the button green, as green-600 is too dark here */
  --auth-btn-glow: 0 12px 26px -14px rgba(97, 206, 112, 0.4);
  --auth-accent: #61ce70;
  --auth-focus: 0 0 0 3px rgba(97, 206, 112, 0.22);
  --auth-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --auth-danger-bg: rgba(244, 63, 94, 0.12);
  --auth-danger-line: rgba(244, 63, 94, 0.34);
  --auth-danger-text: #fda4af;
  --auth-success-bg: rgba(52, 211, 153, 0.12);
  --auth-success-line: rgba(52, 211, 153, 0.3);
  --auth-success-text: #6ee7b7;
}

html {
  background: var(--auth-outer);
}

body.auth-login,
body.text-left {
  margin: 0;
  background: var(--auth-outer);
  color: var(--auth-text-2);
  font-family: var(--auth-font);
  -webkit-font-smoothing: antialiased;
}

.auth-login *,
.auth-login *::before,
.auth-login *::after,
.auth-wrapper *,
.auth-wrapper *::before,
.auth-wrapper *::after {
  box-sizing: border-box;
}

/* ── Sign-in: hero panel + form card ───────────────────────────────────── */
.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 20px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px;
}

.auth-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  border-radius: 28px;
  background:
    radial-gradient(560px 340px at 88% 108%, var(--auth-glow), transparent 70%),
    radial-gradient(420px 260px at 6% -12%, rgba(255, 255, 255, 0.08), transparent 70%),
    var(--auth-hero-glow),
    var(--auth-hero-bg);
  color: #fff;
}

/* Soft rings, like the reference's glowing cards */
.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.auth-hero::before {
  top: -18%;
  right: -12%;
  width: 62%;
  aspect-ratio: 1;
}

.auth-hero::after {
  top: -4%;
  right: 2%;
  width: 36%;
  aspect-ratio: 1;
}

.auth-page .hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  max-width: 480px;
}

.auth-page .hero-title {
  margin: 0;
  color: var(--auth-on-dark);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.auth-page .hero-subtitle {
  margin: 0;
  color: var(--auth-on-dark-text);
  font-size: 1rem;
  line-height: 1.65;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: 430px;
  padding: 40px 36px;
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  background: var(--auth-card);
  box-shadow: var(--auth-shadow);
}

/* The logo at the top of the form and the heading under it, both at the start, as in
   Rio's reference (2026-10-13: "organise ... just like these people did, welcome on
   the form") */
.auth-page .auth-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
}

.auth-page .auth-panel-inner > header {
  text-align: start;
}

.auth-page .auth-logo img {
  display: block;
  max-width: 200px;
  max-height: 44px;
  object-fit: contain;
}

.auth-page .auth-logo .auth-logo-dark,
html.auth-dark .auth-page .auth-logo.has-dark .auth-logo-light {
  display: none;
}

html.auth-dark .auth-page .auth-logo.has-dark .auth-logo-dark {
  display: block;
}

/* No dark-mode logo: keep the normal logo readable on a light plate */
html.auth-dark .auth-page .auth-logo:not(.has-dark) .auth-logo-light {
  padding: 6px 10px;
  border-radius: 12px;
  background: #fff;
}

.auth-page .panel-title {
  margin: 0 0 8px;
  color: var(--auth-text);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.auth-page .panel-subtitle {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.auth-page .auth-panel-inner form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

/* minmax(0, 1fr): the inputs' natural width must not widen the column */
.auth-page .field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.auth-page .field label {
  color: var(--auth-text-2);
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-page .input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 8px 0 18px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 999px;
  background: var(--auth-input);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-page .input-shell:focus-within {
  border-color: var(--auth-accent);
  box-shadow: var(--auth-focus);
}

.auth-page .input-addon {
  flex: none;
  display: inline-flex;
  color: var(--auth-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

/* The field's icon (auth/partials/field-icon.blade.php) */
.auth-page .input-addon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-page .input-shell:focus-within .input-addon {
  color: var(--auth-accent);
}

.auth-page .input-shell input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--auth-text);
  font: inherit;
  font-size: 0.98rem;
}

.auth-page .input-shell input::placeholder {
  color: var(--auth-muted);
  opacity: 1;
}

.auth-page .input-shell input:focus {
  outline: none;
}

/* Autofill keeps the theme colors */
.auth-page .input-shell input:-webkit-autofill,
.auth-wrapper .auth-input:-webkit-autofill {
  -webkit-text-fill-color: var(--auth-text);
  -webkit-box-shadow: 0 0 0 1000px var(--auth-input) inset;
  caret-color: var(--auth-text);
}

.auth-page .form-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: -4px;
  font-size: 0.85rem;
}

.auth-page .auth-link,
.auth-wrapper .auth-link {
  color: var(--auth-accent);
  font-weight: 500;
  text-decoration: none;
}

.auth-page .auth-link:hover,
.auth-wrapper .auth-link:hover {
  color: var(--auth-accent);
  text-decoration: underline;
}

.auth-page .auth-btn,
.auth-wrapper .auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--auth-btn-bg);
  box-shadow: var(--auth-btn-glow);
  color: var(--auth-btn-fg);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, box-shadow 0.15s;
}

.auth-page .auth-btn:hover,
.auth-wrapper .auth-btn:hover {
  background: var(--auth-btn-hover);
}

.auth-page .auth-btn:focus-visible,
.auth-wrapper .auth-btn:focus-visible {
  outline: none;
  box-shadow: var(--auth-btn-glow), var(--auth-focus);
}

.auth-page .auth-btn:disabled {
  cursor: progress;
  filter: none;
  opacity: 0.85;
}

.auth-page .auth-btn.auth-is-loading .btn-text {
  display: none;
}

.auth-page .auth-btn .btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.auth-page .auth-btn.auth-is-loading .btn-loading {
  display: inline-flex;
}

.auth-page .spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

/* "or" between the sign-in button and another way in */
.auth-page .auth-or {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--auth-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-page .auth-or::before,
.auth-page .auth-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--auth-border-strong);
}

/* Another way in (Google): outlined, the sign-in button's size and roundness */
.auth-page .auth-btn-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 999px;
  background: var(--auth-card);
  color: var(--auth-text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.auth-page .auth-btn-alt:hover {
  border-color: var(--auth-accent);
}

.auth-page .auth-btn-alt:focus-visible {
  outline: none;
  box-shadow: var(--auth-focus);
}

.auth-page .auth-btn-alt svg {
  width: 18px;
  height: 18px;
}

/* "Don't have an account? Sign up" */
.auth-page .auth-switch {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.9rem;
  text-align: center;
}

.auth-page .auth-alert,
.auth-wrapper .auth-alert {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-page .auth-alert ul,
.auth-wrapper .auth-alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.auth-page .auth-alert.error,
.auth-wrapper .auth-alert.error {
  border-color: var(--auth-danger-line);
  background: var(--auth-danger-bg);
  color: var(--auth-danger-text);
}

.auth-page .auth-alert.success,
.auth-wrapper .auth-alert.success {
  border-color: var(--auth-success-line);
  background: var(--auth-success-bg);
  color: var(--auth-success-text);
}

@media (max-width: 1023.98px) {
  .auth-page {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .auth-hero {
    display: none;
  }

  .auth-panel {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .auth-panel-inner {
    gap: 18px;
    padding: 28px 20px;
    border-radius: 22px;
  }

  .auth-page .panel-title {
    font-size: 1.45rem;
  }

  .auth-page .input-shell {
    height: 48px;
  }

  .auth-page .auth-btn {
    height: 50px;
  }
}

/* From a tablet's width up, the hero and the form share one white frame, centred
   with the same space all round (Rio, 2026-10-13: "the left paanel is far left ...
   can we balance this page", then "can we do it the same way we did this", with a
   reference). The form loses its own card inside the frame. Phones are unchanged. */
@media (min-width: 1024px) {
  body.auth-login {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
  }

  .auth-page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 1180px;
    min-height: min(760px, calc(100dvh - 48px));
    gap: 0;
    padding: 12px;
    border: 1px solid var(--auth-border);
    border-radius: 32px;
    background: var(--auth-card);
    box-shadow: var(--auth-shadow);
  }

  /* The form on the left, the hero on the right (Rio's reference, 2026-10-13) */
  .auth-hero {
    order: 2;
    border-radius: 24px;
  }

  .auth-panel {
    align-items: stretch;
    padding: 40px 56px 48px;
  }

  .auth-panel-inner {
    max-width: 400px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  /* The logo at the top of the form side, the rest in the middle of the space below */
  .auth-panel-inner > .auth-logo {
    margin-bottom: auto;
  }

  .auth-panel-inner > :last-child {
    margin-bottom: auto;
  }
}

/* ── Card screens: email verification, password reset ─────────────────── */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
  background: var(--auth-outer);
  font-family: var(--auth-font);
}

.auth-wrapper .auth-card {
  width: 100%;
  max-width: 480px;
  padding: 36px 32px;
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  background: var(--auth-card);
  box-shadow: var(--auth-shadow);
}

.auth-wrapper.auth-card-narrow .auth-card {
  max-width: 440px;
}

.auth-wrapper .auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-wrapper .auth-brand img {
  max-width: 200px;
  max-height: 48px;
  object-fit: contain;
}

html.auth-dark .auth-wrapper .auth-brand img {
  padding: 6px 10px;
  border-radius: 12px;
  background: #fff;
}

.auth-wrapper .auth-title {
  margin: 10px 0 4px;
  color: var(--auth-text);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

.auth-wrapper .auth-subtitle {
  margin: 0 0 22px;
  color: var(--auth-muted);
  font-size: 0.9rem;
  text-align: center;
}

.auth-wrapper .form-group {
  margin-bottom: 16px;
}

.auth-wrapper .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--auth-text-2);
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-wrapper .auth-input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 999px;
  outline: none;
  background: var(--auth-input);
  color: var(--auth-text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-wrapper .auth-input:focus {
  border-color: var(--auth-accent);
  box-shadow: var(--auth-focus);
}

.auth-wrapper .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 18px;
}

.auth-wrapper .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-text-2);
  font-size: 0.85rem;
  accent-color: var(--auth-accent);
}

.auth-wrapper .auth-link {
  font-size: 0.85rem;
}

.auth-wrapper .auth-btn {
  height: 50px;
}

.auth-wrapper .auth-alert {
  margin-bottom: 14px;
}

.auth-wrapper .auth-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.auth-wrapper .auth-actions--center {
  justify-content: center;
  margin-top: 12px;
}
