/* ============================================================
   MyFlowChamp — Login Page (login.html)
   Tokens/components already loaded.
   ============================================================ */

/* ── Page background ──────────────────────────────────────── */
body {
  background:
    radial-gradient(circle at 18% 10%, rgba(108, 99, 255, 0.28), transparent 32rem),
    radial-gradient(circle at 86% 16%, rgba(61, 53, 180, 0.22), transparent 34rem),
    radial-gradient(circle at 50% 100%, rgba(61, 220, 132, 0.07), transparent 28rem),
    var(--mfc-bg);
}

/* ── Page shell ───────────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
/* Subtle grid overlay */
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(144, 144, 170, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 144, 170, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 72%);
  pointer-events: none;
}

/* ── Brand / logo ─────────────────────────────────────────── */
.brand {
  position: absolute;
  top: 24px;
  left: min(32px, 6vw);
  z-index: 2;
}
.logo { height: 40px; width: auto; max-width: 200px; object-fit: contain; }

/* ── Auth wrap (2-col: story + modal) ────────────────────── */
.auth-wrap {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 440px);
  gap: 22px;
  align-items: center;
}

/* ── Story card (left) ────────────────────────────────────── */
.story {
  border: 1px solid var(--mfc-border);
  border-radius: var(--r-lg);
  padding: 34px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(135deg, rgba(108, 99, 255, 0.18), rgba(61, 53, 180, 0.10)),
    var(--mfc-surface);
  box-shadow: 0 32px 100px rgba(2, 6, 23, 0.34);
  overflow: hidden;
  position: relative;
}
.story::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.20);
  pointer-events: none;
}
.story h1 {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  max-width: 600px;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 800;
  color: var(--mfc-text);
}
.story p {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  max-width: 540px;
  color: var(--mfc-text-mid);
  font-size: 17px;
  line-height: 1.6;
}

/* Mini stat grid inside story */
.mini-grid {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mini-card {
  border: 1px solid var(--mfc-border);
  border-radius: var(--r-sm);
  padding: 14px;
  background: rgba(15, 17, 23, 0.52);
}
.mini-card strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--mfc-text);
  line-height: 1;
}
.mini-card span {
  display: block;
  margin-top: 4px;
  color: var(--mfc-text-mid);
  font-size: 12px;
  font-weight: 600;
}

/* ── Auth modal (right) ───────────────────────────────────── */
.auth-modal {
  border: 1px solid rgba(144, 144, 170, 0.22);
  border-radius: var(--r-lg);
  padding: 28px;
  background: rgba(28, 31, 42, 0.90);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 36px 100px rgba(2, 6, 23, 0.48);
}
.auth-modal h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--mfc-text);
  margin: 8px 0 0;
  line-height: 1;
}
.auth-modal > p {
  margin: 10px 0 0;
  color: var(--mfc-text-mid);
  font-size: 15px;
  line-height: 1.55;
}

/* ── Form ─────────────────────────────────────────────────── */
form {
  margin-top: 24px;
  display: grid;
  gap: 14px;
}
label {
  display: block;
  color: var(--mfc-text-mid);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}
.input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--mfc-border);
  border-radius: var(--r-sm);
  background: rgba(15, 17, 23, 0.72);
  color: var(--mfc-text);
  padding: 0 14px;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--mfc-text-dim); }
.input:focus {
  border-color: var(--mfc-indigo);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.18);
}

/* ── Error message ────────────────────────────────────────── */
.message {
  display: none;
  margin-top: 14px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  border-radius: var(--r-sm);
  background: rgba(255, 107, 107, 0.10);
  color: #FCA5A5;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.message:not(.hidden) { display: block; }

/* ── Auth links (signup / forgot) ─────────────────────────── */
.auth-links {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--mfc-text-mid);
  font-size: 14px;
  font-weight: 600;
}
.auth-links a {
  color: var(--mfc-indigo);
  transition: color 0.15s ease;
}
.auth-links a:hover { color: var(--mfc-text); }

/* ── Kicker ───────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C4B5FD;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; padding-top: 54px; align-items: stretch; }
  .story { min-height: auto; padding: 24px; }
  .auth-modal { width: min(520px, 100%); margin: 0 auto; }
}
@media (max-width: 560px) {
  .page { padding: 16px; align-items: flex-start; overflow: visible; }
  .brand { top: 18px; left: 18px; }
  .logo { height: 36px; }
  .story { display: none; }
  .auth-wrap { padding-top: 60px; }
  .auth-modal { margin-top: 72px; padding: 20px; width: 100%; }
  .auth-links { display: grid; justify-content: flex-start; }
}
