/* loginwithemail.css — app-shell compliant */

:root {
  --s-navy:    #001f3e;
  --s-blue:    #1e4990;
  --s-cream:   #f6f8ec;
  --s-lime:    #dbe64c;
  --s-green:   #74c465;
  --s-muted:   rgba(246, 248, 236, 0.80);   /* secondary text — readable */
  --s-dim:     rgba(246, 248, 236, 0.62);   /* tertiary text — still clear */
  --s-input:   rgba(255, 255, 255, 0.10);
  --s-border:  rgba(255, 255, 255, 0.22);
  --s-font:    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

/* ── App background — SPORTIFY brand gradient (LOCKED — do not edit) ── */
.app {
  background:
    radial-gradient(
      circle at 100% 100%,
      rgba(219, 230, 76, 0.92) 0%,
      rgba(116, 196, 101, 0.82) 26%,
      rgba(0, 128, 76, 0.55) 50%,
      transparent 72%
    ),
    radial-gradient(
      circle at 40% 55%,
      rgba(0, 128, 76, 0.68) 0%,
      rgba(30, 73, 144, 0.32) 44%,
      transparent 70%
    ),
    radial-gradient(
      circle at 0% 18%,
      rgba(0, 31, 62, 0.85) 0%,
      transparent 55%
    ),
    linear-gradient(
      110deg,
      #001f3e 0%,
      #102f64 27%,
      #00724b 60%,
      #74c465 82%,
      #dbe64c 100%
    ) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center !important;
}

/* ── Scroll container ── */
.auth-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: calc(var(--safe-top) + 4px) 24px 48px;
  display: flex;
  flex-direction: column;
  font-family: var(--s-font);
  -webkit-font-smoothing: antialiased;
}
.auth-scroll::-webkit-scrollbar { display: none; }

/* ── Back button ── */
.auth-topbar {
  margin-bottom: 16px;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--s-border);
  color: var(--s-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.12s;
}
.back-btn:active { background: rgba(255,255,255,0.18); }

/* ── Logo ── */
.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.auth-logo {
  height: 96px;
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.30));
}

/* ── Hero copy ── */
.auth-hero {
  text-align: center;
  margin-bottom: 24px;
}

.auth-hero h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.08;
  color: var(--s-cream);
  margin: 0 0 6px;
}

.auth-hero p {
  font-size: 14px;
  font-weight: 400;
  color: var(--s-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Error alert ── */
.alert-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.13);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: var(--s-cream);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 16px;
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 0;
}

/* ── Field group ── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.85px;
  text-transform: uppercase;
  color: var(--s-dim);
}

/* ── Input wrapper ── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 15px;
  color: var(--s-muted);
  pointer-events: none;
  z-index: 1;
}

.field-input {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 1px solid var(--s-border);
  background: var(--s-input);
  color: var(--s-cream);
  font-family: var(--s-font);
  font-size: 14px;
  font-weight: 500;
  padding: 0 48px 0 44px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field-input::placeholder {
  color: rgba(246, 248, 236, 0.35);
  font-weight: 400;
}

.field-input:focus {
  border-color: rgba(219, 230, 76, 0.60);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 0 0 3px rgba(219, 230, 76, 0.12);
}

/* Autofill — delay background transition so long it never visually changes */
.field-input:-webkit-autofill,
.field-input:-webkit-autofill:hover,
.field-input:-webkit-autofill:focus,
.field-input:-webkit-autofill:active {
  -webkit-text-fill-color: #f6f8ec !important;
  caret-color: #f6f8ec;
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}

/* Eye toggle */
.eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--s-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  z-index: 1;
}
.eye-btn:active { opacity: 0.7; }

/* ── Forgot password ── */
.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.forgot-link {
  font-size: 13px;
  font-weight: 800;
  color: var(--s-lime);
  text-decoration: none;
  letter-spacing: 0.1px;
}

/* ── Log In button — lime CTA, clean shadow ── */
.login-btn {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: var(--s-lime);
  color: var(--s-navy);
  font-family: var(--s-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  transition: transform 0.10s ease, opacity 0.10s ease;
}

.login-btn:active {
  transform: scale(0.984);
  opacity: 0.92;
}

/* ── OR divider ── */
.or-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.or-line {
  flex: 1;
  height: 1px;
  background: var(--s-border);
}

.or-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--s-dim);
}

/* ── Google button — same layout as login.php btn-google ── */
.google-btn {
  width: 100%;
  height: 56px;
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: var(--s-cream);
  font-family: var(--s-font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.10);
  transition: background 0.12s, transform 0.10s;
}

.google-btn:active {
  transform: scale(0.984);
  background: rgba(255,255,255,0.20);
}

.google-btn .btn-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-btn .btn-label {
  text-align: center;
}

/* ── Sign up row ── */
.signup-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.signup-muted {
  font-size: 13px;
  font-weight: 500;
  color: var(--s-muted);
}

.signup-cta {
  font-size: 13px;
  font-weight: 800;
  color: var(--s-lime);
  text-decoration: none;
  letter-spacing: 0.1px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.50);
}

/* ── iPhone home indicator ── */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  pointer-events: none;
  z-index: 10;
}

/* ── Security note ── */
.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 0 8px;
}

.security-icon {
  font-size: 20px;
  color: var(--s-green);
  flex-shrink: 0;
  opacity: 0.85;
}

.security-note span {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--s-dim);
  line-height: 1.5;
}
