:root {
  --deep-green: #0b3d2e;
  --deep-green-light: #0f4d3a;
  --lime: #a8e063;
  --lime-bright: #d4ff5c;
  --white: #ffffff;
  --white-soft: rgba(255, 255, 255, 0.92);
  --white-muted: rgba(255, 255, 255, 0.62);
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.22);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.18);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--deep-green);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.view {
  position: relative;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding:
    calc(28px + var(--safe-top))
    24px
    calc(24px + var(--safe-bottom));
}

.view[hidden] {
  display: none !important;
}

.view--active.view-enter {
  animation: screenIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#screen-home {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 32px;
}

#screen-customer-login {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Role selection screen (onboarding) ---- */
#screen-role {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(168, 224, 99, 0.18), transparent 60%),
    radial-gradient(110% 85% at 0% 100%, rgba(212, 255, 92, 0.1), transparent 55%),
    linear-gradient(160deg, #0e4a38 0%, #0b3d2e 48%, #092f22 100%);
}

/* subtle glass ring + soft radial blob behind the content (pure decoration) */
#screen-role::before,
#screen-role::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

#screen-role::before {
  width: 320px;
  height: 320px;
  top: 10%;
  right: -150px;
  border: 1.5px solid rgba(212, 255, 92, 0.1);
  box-shadow:
    inset 0 0 0 42px rgba(255, 255, 255, 0.02),
    0 0 80px rgba(168, 224, 99, 0.08);
}

#screen-role::after {
  width: 260px;
  height: 260px;
  bottom: 4%;
  left: -130px;
  background: radial-gradient(circle, rgba(168, 224, 99, 0.1), transparent 70%);
}

.glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 0;
}

.glow-top {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -60px;
  background: var(--lime);
}

.glow-bottom {
  width: 220px;
  height: 220px;
  bottom: 80px;
  left: -70px;
  background: var(--lime-bright);
  opacity: 0.18;
}

.brand,
.choices,
.footer {
  position: relative;
  z-index: 1;
}

.brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  text-align: center;
  padding-top: 14px;
  padding-bottom: 10px;
}

.logo-wrap {
  width: 108px;
  height: 108px;
  margin-bottom: 20px;
  filter: drop-shadow(var(--shadow-soft));
  animation: floatIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* soft halo behind the brandmark (role screen only) */
#screen-role .logo-wrap {
  filter: none;
  border-radius: 50%;
  box-shadow: 0 0 70px rgba(212, 255, 92, 0.14);
}

.logo-wrap--sm {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  animation: none;
}

.logo {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-name {
  font-size: clamp(2.1rem, 7vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--white);
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  animation: fadeUp 0.7s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-tagline {
  margin-top: 10px;
  padding: 0 6px;
  font-size: 0.92rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.05em;
  line-height: 1.6;
  animation: fadeUp 0.7s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.choice-card {
  appearance: none;
  border: none;
  width: 100%;
  min-height: 104px;
  padding: 20px 20px 20px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 100%);
  color: var(--deep-green);
  cursor: pointer;
  text-align: left;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    background 0.22s ease;
  -webkit-tap-highlight-color: transparent;
  animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.choice-card:nth-child(1) {
  animation-delay: 0.24s;
}

.choice-card:nth-child(2) {
  animation-delay: 0.32s;
}

.choice-card:active {
  transform: scale(0.98);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (hover: hover) {
  .choice-card:hover {
    transform: translateY(-3px);
    box-shadow:
      0 24px 52px rgba(0, 0, 0, 0.26),
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      0 2px 4px rgba(0, 0, 0, 0.06);
  }

  .choice-card:hover .choice-arrow {
    transform: translateX(3px);
  }
}

.choice-card:focus-visible {
  outline: 3px solid var(--lime-bright);
  outline-offset: 3px;
}

.choice-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.choice-icon svg {
  width: 30px;
  height: 30px;
}

.customer-icon {
  background: linear-gradient(145deg, #0f4d3a 0%, #0b3d2e 100%);
  color: var(--lime-bright);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.shopkeeper-icon {
  background: linear-gradient(145deg, var(--lime-bright) 0%, var(--lime) 100%);
  color: var(--deep-green);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.choice-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.choice-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--deep-green);
}

.choice-sub {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(11, 61, 46, 0.64);
  line-height: 1.4;
}

.choice-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--lime-bright) 0%, var(--lime) 100%);
  display: grid;
  place-items: center;
  color: var(--deep-green);
  flex-shrink: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 10px rgba(168, 224, 99, 0.25);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.choice-arrow svg {
  width: 20px;
  height: 20px;
}

.choice-card:active .choice-arrow {
  transform: scale(0.92);
}

.footer {
  text-align: center;
  padding-top: 4px;
}

.footer p {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeUp 0.7s 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-top {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}

.back-btn {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, transform 0.18s ease;
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

.back-btn:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.16);
}

.back-btn:focus-visible {
  outline: 3px solid var(--lime-bright);
  outline-offset: 2px;
}

.login-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
}

.login-heading {
  font-size: clamp(1.65rem, 6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-align: center;
}

.login-sub {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--white-muted);
  text-align: center;
  max-width: 280px;
}

.login-form {
  width: 100%;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--white-muted);
  padding-left: 4px;
}

.field input {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 16px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--deep-green);
  background: var(--white-soft);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.field input::placeholder {
  color: rgba(11, 61, 46, 0.38);
}

.field input:focus {
  outline: none;
  box-shadow:
    var(--shadow-card),
    0 0 0 3px rgba(212, 255, 92, 0.45);
}

.field-input-wrap {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.field-prefix {
  flex-shrink: 0;
  height: 54px;
  min-width: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field-input-wrap input {
  flex: 1;
  min-width: 0;
}

.btn-primary {
  appearance: none;
  border: none;
  width: 100%;
  height: 56px;
  margin-top: 8px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--deep-green);
  background: linear-gradient(145deg, var(--lime-bright) 0%, var(--lime) 100%);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary:active {
  transform: scale(0.985);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.login-alt {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  font-size: 0.92rem;
  color: var(--white-muted);
}

.link-btn {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--lime-bright);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.link-btn:focus-visible {
  outline: 2px solid var(--lime-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 481px) {
  .view {
    padding-top: calc(48px + var(--safe-top));
    padding-bottom: calc(40px + var(--safe-bottom));
  }

  .logo-wrap {
    width: 120px;
    height: 120px;
  }

  .choice-card {
    min-height: 108px;
    padding: 22px 24px 22px 20px;
  }

  .choice-icon {
    width: 60px;
    height: 60px;
  }
}

/* Desktop / tablet: keep the premium column feel but give it room to breathe */
@media (min-width: 900px) {
  #screen-role {
    max-width: 560px;
    gap: 34px;
  }

  #screen-role .logo-wrap {
    width: 132px;
    height: 132px;
  }

  #screen-role .choice-card {
    min-height: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   PROVIDED CRAYOCART LOGO IMAGE (app/assets/image.png, 2172x724,
   3:1, white background baked into the asset). The image itself
   is never modified — CSS sizes it with a locked aspect ratio
   (height fixed, width auto, object-fit: contain) so it is never
   stretched, cropped, or recolored. Scoped additions only.
   ============================================================ */

.auth-brand--logo {
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.auth-logo-img {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(230px, 100%);
  object-fit: contain;
  object-position: left center;
}

.auth-logo-img--sm { height: 44px; max-width: 200px; }

/* Role gate (dark background): the logo keeps its own clean white chip */
.logo-wrap--img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin-bottom: 22px;
  padding: 12px 24px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

#screen-role .logo-wrap--img {
  width: auto;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22), 0 0 70px rgba(212, 255, 92, 0.14);
}

.role-logo-img {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(210px, 62vw);
  object-fit: contain;
}

/* keeps the h1 for heading structure without visually duplicating the wordmark */
.brand-name--sr,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .auth-logo-img { height: 46px; }
  .auth-logo-img--sm { height: 40px; }
  .role-logo-img { height: 40px; }
}

@media (max-width: 420px) {
  .auth-logo-img { height: 40px; }
  .auth-logo-img--sm { height: 36px; max-width: 170px; }
  .role-logo-img { height: 34px; }
  .logo-wrap--img { padding: 10px 18px; border-radius: 16px; margin-bottom: 18px; }
}

/* The role screen's decorative orbs (#screen-role::before/::after) intentionally
   poke past the screen edges; at ~768px tablet width that poking exceeds the
   viewport by a few px and produced a horizontal scrollbar. Clip only the
   horizontal overflow at the root — no scroll container is created and the
   vertical scrolling behaviour is unchanged (clip pairs with visible). */
html,
body {
  overflow-x: clip;
}

/* ============================================================
   AUTH REDESIGN — split-screen login. Scoped to .auth-screen
   (#screen-login / #screen-otp only). The role-gate screen
   (#screen-role) and every other page keep their existing styles.
   All JS hooks (#login-form, #login-email, #otp-form, #otp-code,
   #otp-resend, #otp-back, .btn-primary, .link-btn) are unchanged.
   ============================================================ */

.auth-screen#screen-login,
.auth-screen#screen-otp {
  max-width: none;
  margin: 0;
  padding: 0;
  color: #123527;
  background:
    radial-gradient(90% 70% at 88% -10%, rgba(168, 224, 99, 0.25), transparent 60%),
    radial-gradient(70% 60% at -10% 110%, rgba(168, 224, 99, 0.18), transparent 55%),
    linear-gradient(165deg, #f5fbf7 0%, #e6f4ea 52%, #d5ecdc 100%);
}

.auth-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 100dvh;
  padding: clamp(16px, 3.5vw, 44px);
  gap: clamp(20px, 4vw, 60px);
}

/* ---- left panel: login card ---- */
.auth-card {
  flex: 0 1 520px;
  margin: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #ffffff;
  border-radius: 28px;
  padding: clamp(24px, 3.2vw, 44px);
  box-shadow:
    0 30px 70px rgba(11, 61, 46, 0.12),
    0 4px 16px rgba(11, 61, 46, 0.06);
}

.auth-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 4vh, 32px);
}

.auth-card-top { margin-bottom: 20px; }

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand ~ .auth-title { margin-top: clamp(18px, 3vh, 26px); }

.auth-logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(11, 61, 46, 0.18);
}

.auth-logo--sm { width: 46px; height: 46px; }

.auth-logo svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.auth-wordmark {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b3d2e;
}

.auth-wordmark em { font-style: normal; color: #17a24c; }

.auth-brand-tag {
  margin-top: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #7a9184;
}

.auth-welcome { text-align: right; }
.auth-welcome strong { display: block; font-size: 0.95rem; font-weight: 700; color: #14532d; }
.auth-welcome span { display: block; margin-top: 2px; font-size: 0.78rem; color: #7a9184; }

.auth-title {
  font-size: clamp(1.7rem, 2.4vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f2c1f;
}

.auth-sub {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #5c7265;
}

.auth-sub strong { color: #14532d; font-weight: 700; }

/* JS-facing form hooks kept identical — restyled for light UI */
.auth-screen .login-form { margin-top: 24px; gap: 18px; }
.auth-screen .field { gap: 8px; }

.auth-screen .field-label {
  text-transform: none;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #3f5a4d;
  padding-left: 2px;
}

.auth-input { position: relative; display: block; }

.auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #8aa394;
  pointer-events: none;
}

.auth-screen .field input {
  height: 54px;
  border: 1.5px solid #dfeae2;
  border-radius: 14px;
  background: #fbfdfb;
  color: #123527;
  font-weight: 500;
  padding: 0 16px 0 46px;
  box-shadow: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-screen .field input::placeholder { color: #a9bdb1; }

.auth-screen .field input:focus {
  outline: none;
  border-color: #17a24c;
  box-shadow: 0 0 0 4px rgba(23, 162, 76, 0.14);
}

.auth-screen .auth-code-input {
  letter-spacing: 0.3em;
  font-size: 1.2rem;
  font-weight: 700;
}

/* primary button — solid CrayoCart green; the arrow is a ::after so
   the busy-state textContent swap in app.js keeps working untouched */
.auth-screen .btn-primary {
  height: 56px;
  margin-top: 6px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 1.02rem;
  background: linear-gradient(145deg, #1ca353 0%, #12853f 100%);
  box-shadow: 0 14px 28px rgba(18, 133, 63, 0.28);
}

.auth-screen .btn-primary::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  vertical-align: -3px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 12h15m0 0-6-6m6 6-6 6' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 12h15m0 0-6-6m6 6-6 6' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@media (hover: hover) {
  .auth-screen .btn-primary:hover::after { transform: translateX(3px); }
}

.auth-screen .btn-primary:disabled { opacity: 0.78; cursor: default; }
.auth-screen .btn-primary:disabled::after { opacity: 0.35; transform: none; }

.auth-screen .btn-primary:focus-visible {
  outline: 3px solid rgba(23, 162, 76, 0.5);
  outline-offset: 3px;
}

/* secondary links on light background */
.auth-screen .login-alt { margin-top: 16px; font-size: 0.92rem; color: #5c7265; }
.auth-screen .link-btn { color: #15803d; }
.auth-screen .link-btn:focus-visible { outline-color: #15803d; }

.auth-screen .back-btn { background: #eef6f0; color: #14532d; }
.auth-screen .back-btn:active { background: #e2efe6; }
.auth-screen .back-btn:focus-visible { outline-color: #15803d; }

/* status message injected inline by app.js — recolored for the light
   card (!important overrides the JS-injected dark-theme inline styles;
   the auth logic itself is untouched) */
.auth-screen .login-message {
  background: #eaf7ee !important;
  color: #136c37 !important;
  border: 1px solid #c4e6cf;
  box-shadow: 0 8px 18px rgba(11, 61, 46, 0.06) !important;
}

/* signup + legal */
.auth-signup {
  margin-top: 18px;
  text-align: center;
  font-size: 0.92rem;
  color: #5c7265;
}

.auth-signup-link {
  color: #15803d;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

.auth-signup-link:hover { color: #0f6a30; }

.auth-signup-link:focus-visible {
  outline: 2px solid #15803d;
  outline-offset: 3px;
  border-radius: 4px;
}

.auth-legal {
  margin-top: clamp(16px, 3vh, 26px);
  padding-top: 16px;
  border-top: 1px solid #edf3ee;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #7a9184;
}

.auth-legal strong { color: #3f6b52; font-weight: 600; }

/* ---- right panel: promotional side ---- */
.auth-promo {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(80% 55% at 80% 0%, rgba(255, 255, 255, 0.65), transparent 60%),
    linear-gradient(170deg, #f0faf2 0%, #ddf0e3 48%, #c9e7d3 100%);
  box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.08);
}

.promo-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  padding: clamp(22px, 2.6vw, 42px);
  gap: clamp(12px, 2vh, 20px);
}

.promo-badge {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(21, 128, 61, 0.16);
  font-size: 0.78rem;
  font-weight: 600;
  color: #14532d;
}

.promo-badge svg { width: 15px; height: 15px; color: #17a24c; }

.promo-heading {
  margin-top: clamp(4px, 1.5vh, 14px);
  font-size: clamp(1.85rem, 2.9vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #0d2b1e;
  max-width: 14ch;
}

.promo-heading span { color: #17a24c; }

.promo-sub {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #40604f;
  max-width: 44ch;
}

.promo-benefits {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  width: 100%;
  margin-top: clamp(4px, 1vh, 10px);
}

.promo-benefits li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  padding: 14px 8px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(21, 128, 61, 0.08);
}

.promo-benefits strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: #123527;
  margin-top: 6px;
}

.promo-benefits li > span:last-child { font-size: 0.72rem; color: #5c7265; }

.promo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.promo-icon svg { width: 22px; height: 22px; }
.promo-icon--shops { background: #ddf2e3; color: #17843b; }
.promo-icon--heart { background: #fde5ea; color: #d6455d; }
.promo-icon--bolt  { background: #fdf0d3; color: #b97f10; }
.promo-icon--leaf  { background: #ebe4fa; color: #7452cf; }

.promo-art {
  margin-top: auto;
  align-self: center;
  width: 100%;
  max-width: 560px;
}

.promo-art svg { display: block; width: 100%; height: auto; }

.promo-footer {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.promo-script {
  font-family: "Caveat", "DM Sans", cursive;
  font-size: 1.45rem;
  font-weight: 600;
  color: #166534;
}

.promo-caps {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #40604f;
}

/* ---- responsive: below 960px the promo panel STACKS below the login
   card (never hidden); desktop keeps the side-by-side split ---- */
@media (max-width: 960px) {
  .auth-screen .auth-shell {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: clamp(14px, 4vw, 28px);
    gap: clamp(16px, 3vw, 36px);
  }

  .auth-card,
  .auth-promo {
    flex: 0 0 auto;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }

  .promo-inner { gap: clamp(12px, 2.5vw, 18px); }

  .promo-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .promo-art { margin-top: 4px; }
}

@media (max-width: 1120px) and (min-width: 961px) {
  .promo-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .auth-screen .auth-shell { padding: 12px; }
  .auth-card { border-radius: 22px; padding: 22px 18px; }
  .auth-brand-row { flex-direction: column; gap: 14px; }
  .auth-welcome { text-align: left; }

  .auth-promo { border-radius: 22px; }
  .promo-inner { padding: 20px 16px; }
  .promo-heading { font-size: 1.6rem; max-width: none; }
  .promo-badge {
    align-self: stretch;
    justify-content: center;
    text-align: center;
    font-size: 0.72rem;
  }
  .promo-benefits strong { font-size: 0.82rem; }
  .promo-footer { align-self: center; align-items: center; }
}

@media (max-height: 640px) and (min-width: 961px) {
  .promo-art { display: none; }
}
/* __CC_AUTH_END__ */
