/* ── shared/css/auth.css ── */
/* Shared layout for Login and Sign Up pages */

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--slate-50, #F8FAFC);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* Left Panel — animated gradient */
.left-panel {
  flex: 1;
  background: linear-gradient(135deg,
    var(--hero-bg-start, #1E293B) 0%,
    var(--hero-bg-mid,   #0F172A) 40%,
    var(--hero-bg-end,   #1D4ED8) 75%,
    var(--hero-bg-start, #1E293B) 100%);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px;
  position: relative;
  overflow: hidden;
}
@keyframes gradientShift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}
.left-panel::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(59,130,246,0.18);
  top: -120px; right: -120px;
  animation: blobFloat1 9s ease-in-out infinite;
  filter: blur(2px);
}
.left-panel::after {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(99,102,241,0.12);
  bottom: -90px; left: -90px;
  animation: blobFloat2 12s ease-in-out infinite;
  filter: blur(3px);
}
@keyframes blobFloat1 {
  0%   { transform: translate(0, 0)      scale(1);    }
  33%  { transform: translate(-30px, 40px) scale(1.06); }
  66%  { transform: translate(20px, -20px) scale(0.96); }
  100% { transform: translate(0, 0)      scale(1);    }
}
@keyframes blobFloat2 {
  0%   { transform: translate(0, 0)       scale(1);    }
  40%  { transform: translate(35px, -45px) scale(1.08); }
  70%  { transform: translate(-15px, 25px) scale(0.94); }
  100% { transform: translate(0, 0)       scale(1);    }
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 60px; z-index: 1; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; }
.brand-text {
  font-size: 32px; font-weight: 700;
  letter-spacing: -0.5px; line-height: 1;
  display: flex; align-items: center;
}
.brand-text .we    { color: #3B82F6; }
.brand-text .drive { color: white; }
.hero-text { z-index: 1; }
.hero-text h1 {
  color: white; font-size: 42px; font-weight: 700;
  line-height: 1.2; margin-bottom: 20px; letter-spacing: -1px;
}
.hero-text h1 span { color: #60A5FA; }
.hero-text p { color: #94A3B8; font-size: 16px; line-height: 1.7; max-width: 400px; }
.features { display: flex; flex-direction: column; gap: 20px; margin-top: 50px; z-index: 1; }
.feature-item { display: flex; align-items: center; gap: 14px; }
.feature-icon {
  width: 40px; height: 40px;
  background: rgba(59,130,246,0.2); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feature-icon .material-icons-round { color: #60A5FA; font-size: 20px; }
.feature-text { color: #CBD5E1; font-size: 14px; }

/* Right Panel — uses CSS vars so night mode works */
.right-panel {
  width: 480px;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--bg-surface, #FFFFFF);
  transition: background 0.4s ease;
  overflow-y: auto; /* Allow scrolling if content is tall */
}
.login-card { width: 100%; max-width: 400px; margin: auto; }
.login-card h2 { font-size: 28px; font-weight: 700; color: var(--text-primary, #1E293B); margin-bottom: 8px; }
.login-card p  { color: var(--text-secondary, #94A3B8); font-size: 14px; margin-bottom: 36px; }
.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; margin-bottom: 20px; }
.form-row .form-group { margin-bottom: 0; flex: 1; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary, #475569); margin-bottom: 8px; }
.input-wrap { position: relative; }
.input-wrap .material-icons-round {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted, #94A3B8); font-size: 20px;
}
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 13px 14px 13px 44px;
  border: 1.5px solid var(--border-color, #E2E8F0);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-primary, #1E293B);
  background: var(--input-bg, #F8FAFC);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
  outline: none;
}
input:focus {
  border-color: var(--primary, #3B82F6);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  background: var(--input-focus-bg, #FFFFFF);
}
.form-options {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.remember { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary, #3B82F6); }
.remember span { font-size: 13px; color: var(--text-secondary, #475569); }
.forgot { font-size: 13px; color: var(--primary, #3B82F6); text-decoration: none; font-weight: 500; }
.forgot:hover { color: var(--primary-dark, #1D4ED8); }
.btn-primary {
  width: 100%; padding: 14px;
  background: var(--primary, #3B82F6);
  color: white; border: none; border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { background: var(--primary-dark, #1D4ED8); box-shadow: 0 4px 14px rgba(59,130,246,0.4); }
.btn-primary:active { transform: scale(0.98); }
.divider {
  display: flex; align-items: center; gap: 12px; margin: 24px 0;
  color: var(--text-muted, #94A3B8); font-size: 13px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color, #E2E8F0); }
.btn-social {
  width: 100%; padding: 13px;
  border: 1.5px solid var(--border-color, #E2E8F0);
  background: var(--bg-surface, #FFFFFF);
  border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--text-primary, #1E293B);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 12px;
}
.btn-social:hover { background: var(--bg-surface-2, #F1F5F9); border-color: var(--text-muted, #94A3B8); }
.btn-social img { width: 20px; height: 20px; }
.signup-link { text-align: center; margin-top: 28px; font-size: 14px; color: var(--text-secondary, #475569); }
.signup-link a { color: var(--primary, #3B82F6); font-weight: 600; text-decoration: none; }
.signup-link a:hover { color: var(--primary-dark, #1D4ED8); }

/* Apple logo: black in day mode, white in night mode */
.apple-logo {
  filter: brightness(0);           /* force black, matches day bg */
  transition: filter 0.35s ease;
}
body.night-mode .apple-logo {
  filter: brightness(0) invert(1); /* invert to white for dark bg */
}

/* Continue as Guest */
.guest-link { text-align: center; margin-top: 20px; }
.btn-guest {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border: 1.5px dashed var(--border-color, #CBD5E1);
  border-radius: 10px;
  color: var(--text-secondary, #64748B);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  width: 100%;
}
.btn-guest:hover {
  border-color: var(--primary, #3B82F6);
  color: var(--primary, #3B82F6);
  background: rgba(59,130,246,0.05);
}

@media (max-width: 900px) {
  .left-panel { display: none; }
  .right-panel { width: 100%; padding: 32px 24px; }
  body { overflow: auto; }
}

@media (max-width: 600px) {
  .right-panel { padding: 24px 16px; }
  .login-card h2 { font-size: 24px; }
  .login-card p { font-size: 13px; margin-bottom: 24px; }
  .form-row { flex-direction: column; gap: 0; }
  .btn-primary { padding: 16px; font-size: 16px; min-height: 48px; }
  .btn-social { padding: 14px; min-height: 48px; }
  .btn-guest { padding: 14px; min-height: 48px; }
  input[type="text"], input[type="email"], input[type="password"] {
    padding: 14px 14px 14px 44px;
    font-size: 16px; /* Prevents iOS zoom */
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESET PASSWORD - Stitch-inspired standalone account flow
   ═══════════════════════════════════════════════════════════════ */
.reset-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -18%, rgba(0, 88, 190, 0.12), transparent 38%),
    radial-gradient(circle at 82% 18%, rgba(183, 200, 225, 0.24), transparent 28%),
    var(--background, var(--bg-body, #f7f9fb));
  color: var(--text-primary, #191c1e);
  overflow-x: hidden;
}

.reset-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px;
}

.reset-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary, #0058be);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.reset-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.reset-tools {
  display: flex;
  gap: 10px;
}

.reset-tools .lang-toggle,
.reset-tools .theme-toggle {
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--outline-variant, #c2c6d6);
  border-radius: 999px;
  background: var(--surface-container-lowest, #fff);
  color: var(--primary, #0058be);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(30, 41, 59, 0.06);
}

.reset-wrapper {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 56px;
}

.reset-card {
  width: min(100%, 456px);
  background: var(--surface-container-lowest, #fff);
  border: 1px solid rgba(194, 198, 214, 0.7);
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(30, 41, 59, 0.1);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.reset-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-fixed, #d8e2ff);
  color: var(--primary, #0058be);
  margin-bottom: 18px;
}

.reset-icon .material-icons-round {
  font-size: 30px;
}

.reset-card h1 {
  color: var(--text-primary, #191c1e);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
}

.reset-card .sub {
  color: var(--text-secondary, #545f73);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.reset-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.reset-progress span {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-container-highest, #e0e3e5);
  transition: background 0.2s ease;
}

.reset-progress span.active {
  background: var(--primary, #0058be);
}

.reset-progress.is-complete span {
  background: #059669;
}

.reset-step,
.success-state {
  display: none;
}

.reset-step.active,
.success-state.active {
  display: block;
  animation: stitchFadeUp 0.35s ease both;
}

.reset-form {
  display: grid;
  gap: 14px;
}

.reset-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reset-link-btn {
  border: none;
  background: transparent;
  color: var(--primary, #0058be);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.otp-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.otp-row input {
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  min-height: 50px;
}

.reset-btn {
  min-height: 46px;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: var(--primary, #0058be);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.reset-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 88, 190, 0.24);
}

.reset-btn.secondary {
  background: transparent;
  color: var(--text-primary, #191c1e);
  border: 1px solid var(--outline-variant, #c2c6d6);
  box-shadow: none;
}

.reset-btn.as-link {
  margin-top: 16px;
}

.reset-hints {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.reset-hints li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary, #545f73);
  font-size: 12px;
  font-weight: 700;
}

.reset-hints .material-icons-round {
  color: #059669;
  font-size: 16px;
}

.success-state {
  text-align: center;
}

.success-state > .material-icons-round {
  color: #059669;
  font-size: 52px;
  margin-bottom: 12px;
}

.success-state h2 {
  color: var(--text-primary, #191c1e);
  font-size: 22px;
  margin-bottom: 8px;
}

.success-state p {
  color: var(--text-secondary, #545f73);
  font-size: 14px;
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  color: var(--primary, #0058be);
  font-size: 13px;
  font-weight: 800;
  margin-top: 18px;
  text-decoration: none;
}

.back-link .material-icons-round {
  font-size: 17px;
}

@media (max-width: 600px) {
  .reset-shell-header {
    padding: 16px;
  }

  .reset-card {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .otp-row {
    gap: 6px;
  }

  .otp-row input {
    min-height: 46px;
    font-size: 18px;
  }
}
