/* ================================================
   RKD Sports India — Auth Pages
   ================================================ */

@import url('../vendor/css/poppins.css');

:root {
  --red: #D62828;
  --red-dark: #B71C1C;
  --orange: #F77F00;
  --dark: #0D0D0D;
  --dark-blue: #1A2C5B;
  --white: #FFFFFF;
  --light: #F5F5F5;
  --grey: #6C757D;
  --grey-light: #DEE2E6;
  --line: #E8E3DC;
  --ink: #151515;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 70px rgba(0,0,0,0.22);
  --transition: 0.3s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/*
 * The page surface.
 *
 * This rule used to layer a dark gradient over a stock photograph of somebody
 * else's shoes. The photograph was removed — it was not ours to use — and the
 * overlay was left behind on its own, which turned every page into a dark wash
 * that the rest of the design was never built for: "Shopping Cart" rendered in
 * near-black on near-black, the specification table faded to grey on grey, and
 * the shop's filter labels almost disappeared.
 *
 * Restored to the light surface the tokens describe and the white cards, dark
 * headings and grey secondary text all assume. Sections that are meant to be
 * dark — the hero, the Photon panel, the footer — carry their own background
 * and are unaffected.
 */
body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--surface-2);
}

a { color: inherit; }

.auth-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  /* Same native-app status-bar defense as header .container in ecommerce.css. */
  padding-top: max(18px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  /* Overrides ecommerce.css's generic `header { background: ... }` rule,
     which this page also loads (for shared components like toasts) — this
     header is meant to float transparently over the dark hero background,
     with white text designed for that context, not a light card background. */
  background: transparent;
  box-shadow: none;
  border-bottom: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Guaranteed extra breathing room below the status bar in the native app —
   see the matching rule on header .container in ecommerce.css. */
html.capacitor-native .auth-header {
  padding-top: calc(env(safe-area-inset-top) + 36px);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.auth-logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 17px;
  box-shadow: 0 12px 28px rgba(214,40,40,0.28);
}

.auth-logo-text h3,
.auth-logo-text span:first-child {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
}

.auth-logo-text p,
.auth-logo-text span:last-child {
  display: block;
  font-size: 9px;
  color: var(--orange);
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2px;
}

.auth-back,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  transition: all var(--transition);
}

.auth-back:hover,
.back-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px 34px;
}

.auth-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 460px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

/*
 * The panel beside the sign-in form.
 *
 * This was two translucent gradients layered over a photograph. The photograph
 * was removed — it was not ours — and the tints were left behind with nothing
 * underneath, so the panel rendered as a flat muddy brown: the first thing a
 * customer sees when signing in, looking like an image that failed to load.
 *
 * Replaced with the brand's own ground: the dark field the Photon panel uses on
 * the home page, with the mark itself as a watermark.
 */
.auth-visual {
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  padding: 48px;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 25%, rgba(238,28,37,.30) 0%, rgba(238,28,37,0) 58%),
    linear-gradient(135deg, #0A0A0A 0%, #17181C 55%, #2A0C0E 100%);
  position: relative;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  top: 50%;
  right: -12%;
  transform: translateY(-50%);
  width: min(560px, 82%);
  aspect-ratio: 1;
  background: url('../images/photon-mark-white.svg') center / contain no-repeat;
  opacity: .07;
  pointer-events: none;
}

.visual-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.visual-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.visual-content h1,
.visual-content .visual-headline {
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: 0;
  margin-bottom: 16px;
}

.visual-content p {
  max-width: 480px;
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  line-height: 1.75;
}

.visual-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.visual-stats div {
  min-height: 84px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(255,255,255,0.1);
}

.visual-stats strong {
  display: block;
  color: var(--orange);
  font-size: 20px;
  line-height: 1;
}

.visual-stats span {
  display: block;
  margin-top: 7px;
  color: rgba(255,255,255,0.82);
  font-size: 11px;
  line-height: 1.4;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
  position: relative;
}

.auth-card {
  max-width: none;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 0;
  padding: 46px 40px;
  box-shadow: none;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  background: rgba(214,40,40,0.08);
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.card-title,
h1.card-title,
h2 {
  font-size: 32px;
  line-height: 1.12;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 8px;
  letter-spacing: 0;
}

.card-subtitle,
.subtitle {
  color: var(--grey);
  margin-bottom: 28px;
  font-size: 14px;
  line-height: 1.6;
}

.field-group { margin-bottom: 15px; }

.field-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 12px;
  font-weight: 700;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 14px;
  transition: all var(--transition);
  background: var(--white);
}

.field-group .input-box { margin-bottom: 0; }

.input-box:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(214,40,40,0.08);
}

.input-box i {
  color: var(--grey);
  font-size: 15px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.input-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: var(--dark);
  background: transparent;
  font-family: inherit;
  font-weight: 500;
}

.input-box input::placeholder { color: #aaa; font-weight: 400; }

.input-toggle {
  background: none;
  border: none;
  color: var(--grey);
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  transition: color var(--transition);
}

.input-toggle:hover { color: var(--red); }

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  margin: 2px 0 22px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--grey);
}

.remember-label input { accent-color: var(--red); width: 14px; height: 14px; }

.forgot-link {
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
  transition: opacity var(--transition);
}

.forgot-link:hover { opacity: 0.75; }

.btn {
  width: 100%;
  min-height: 50px;
  padding: 15px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  letter-spacing: 0.2px;
  margin-bottom: 16px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(214,40,40,0.38);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--grey-light);
}

.divider span { font-size: 12px; color: var(--grey); font-weight: 500; white-space: nowrap; }

.social-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-social:hover { border-color: var(--red); color: var(--red); }
.btn-social i { font-size: 16px; }

.switch {
  text-align: center;
  font-size: 13px;
  color: var(--grey);
  margin-top: 4px;
}

.switch a {
  color: var(--red);
  text-decoration: none;
  font-weight: 800;
}

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

.terms-text {
  font-size: 12px;
  color: var(--grey);
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.6;
}

.terms-text a { color: var(--red); text-decoration: none; font-weight: 700; }
.terms-text a:hover { text-decoration: underline; }

.auth-message {
  display: none;
  margin: 0 0 18px;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.auth-message.show { display: block; }
.auth-message.error { background: rgba(214,40,40,0.09); color: var(--red-dark); }
.auth-message.success { background: rgba(40,167,69,0.1); color: #1F7A36; }

.auth-footer {
  text-align: center;
  padding: 12px 20px 22px;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  /* Same fix as .auth-header — don't inherit ecommerce.css's generic
     `footer { background: ... }` meant for the main site footer. */
  background: transparent;
}

.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 7px;
}

.auth-footer-links a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
}

.auth-footer-links a:hover { color: var(--white); }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 520px; }
  .auth-visual { display: none; }
  .auth-card { min-height: auto; border-radius: 24px; }
}

@media (max-width: 560px) {
  .auth-header {
    width: min(100% - 28px, 520px);
    padding: 14px 0;
  }
  .auth-logo-text h3,
  .auth-logo-text span:first-child { font-size: 13px; }
  .auth-logo-text p,
  .auth-logo-text span:last-child { font-size: 8px; }
  .auth-container { padding: 10px 14px 26px; }
  .auth-shell { border-radius: 18px; }
  .card { padding: 30px 22px; border-radius: 18px; }
  .card-title,
  h1.card-title,
  h2 { font-size: 26px; }
  .options { align-items: flex-start; flex-direction: column; }
  .auth-footer { padding-bottom: 18px; }
}
