/* ============================================================
   DimeClip — Login (Broadcast OS)
   Loaded AFTER marketing.css. Login-specific only; does NOT
   touch shared marketing rules. Mobile-first; the phone view
   is the priority surface (owner signs in from a phone).
   ============================================================ */

/* ---- Page shell ------------------------------------------------ */
/* Mobile-first: single column, scrollable, atmospheric backdrop so
   the form never floats in a flat void. Desktop split is restored
   in the wide-screen block below. */
.login-grid {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(620px 460px at 50% -6%, rgba(43, 224, 140, 0.13), transparent 62%),
    radial-gradient(720px 520px at 92% 8%, rgba(77, 163, 255, 0.06), transparent 58%),
    var(--bg);
}

/* ---- Form pane ------------------------------------------------- */
.login-form-pane {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 26px 22px 30px;
  gap: 0;
}

.login-logo {
  align-self: center;
  margin-bottom: 22px;
}
.login-logo svg { width: 28px; height: 28px; }
.login-logo span { font-size: 21px; }

/* ---- Mobile brand moment (above the form) ---------------------- */
.login-pitch {
  margin: 0 auto 26px;
  width: min(100%, 400px);
  text-align: center;
}
.login-pitch-eyebrow {
  margin: 0 0 14px;
  display: flex;
  justify-content: center;
}
.login-pitch-head {
  margin: 0 0 18px;
  color: var(--text0);
  font-family: "Archivo", sans-serif;
  font-size: clamp(26px, 8.4vw, 34px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

/* Compact broadcast score-strip (mobile) */
.login-scorebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--border2);
  border-radius: 14px;
  background:
    radial-gradient(130% 150% at 50% -40%, rgba(77, 163, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #10141b, var(--surface) 78%);
  box-shadow: 0 20px 46px -28px rgba(0, 0, 0, 0.85);
}
.lsb-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: none;
}
.lsb-team-away { flex-direction: row-reverse; }
.login-scorebar img {
  width: 32px;
  height: 32px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.55));
}
.lsb-meta { display: flex; flex-direction: column; gap: 2px; line-height: 1; min-width: 0; }
.lsb-team-away .lsb-meta { align-items: flex-end; }
.lsb-code {
  color: var(--text0);
  font-family: "Archivo", sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.lsb-rec {
  color: var(--text4);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.lsb-core {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: none;
}
.lsb-score {
  font-family: "Archivo", sans-serif;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  margin-top: -2px; /* optical lift: heavy numerals sit low against the SUM/APX codes */
}
.lsb-lead { color: var(--accent); text-shadow: 0 0 22px rgba(43, 224, 140, 0.32); }
.lsb-muted { color: var(--text2); }
.lsb-clock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 92, 92, 0.4);
  border-radius: 999px;
  padding: 3px 8px;
  color: #ff7b7b;
  background: rgba(255, 92, 92, 0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.lsb-clock .rec-dot { width: 5px; height: 5px; }

/* Feature trio (mobile) */
.login-feats {
  list-style: none;
  margin: 18px auto 0;
  padding: 0;
  display: grid;
  gap: 9px;
  width: min(100%, 360px);
  text-align: left;
}
.login-feats li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text1);
  font-size: 13.5px;
  line-height: 1.3;
}
.lf-ic {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-weak);
  border: 1px solid rgba(43, 224, 140, 0.3);
}

/* ---- The form card -------------------------------------------- */
.login-box {
  flex: none;
  width: min(100%, 400px);
  margin: 0 auto;
  padding: 24px 22px 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 24, 31, 0.5), rgba(14, 17, 22, 0.72));
  box-shadow: 0 28px 70px -34px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
}
.login-box h1 {
  margin: 0 0 6px;
  color: var(--text0);
  font-family: "Archivo", sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.login-box > p {
  color: var(--text2);
  font-size: 14.5px;
  line-height: 1.45;
  margin: 0 0 24px;
}

/* SSO / Google button */
/* RETURNING SESSION — when login.js recognizes a remembered account it sets
   body[data-returning]; collapse the SSO button, the OR divider, the email/password
   form and the mode-switch links so the page leads with ONE action (the
   #signed-in-panel "Continue as you"), instead of stacking three sign-in paths.
   "Use another account" signs out, which clears the attribute and restores these. */
body[data-returning] .sso-stack,
body[data-returning] .or-divider,
body[data-returning] #login-form,
body[data-returning] .login-switch { display: none; }
body[data-returning] .signed-in-panel { margin-top: 4px; }

.sso-stack { display: grid; gap: 10px; margin-bottom: 20px; }
.sso-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 13px;
  color: var(--text0);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}
.sso-button:hover:not(:disabled) {
  border-color: var(--text4);
  background: var(--surface2);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.9);
}
.sso-button:active:not(:disabled) { transform: translateY(0); }
.sso-button:disabled { opacity: 0.55; cursor: default; }

/* OR divider */
.or-divider { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.or-divider span:not(.or-label) {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}
.or-label {
  color: var(--text4);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
}

/* Inputs */
.login-form { display: grid; gap: 17px; }
.login-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.input-row { display: flex; justify-content: space-between; align-items: center; }
.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text0);
  background: rgba(8, 10, 13, 0.55);
  font-size: 15px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.login-form input::placeholder { color: var(--text4); }
.login-form input[type="email"]:hover,
.login-form input[type="password"]:hover { border-color: var(--text5); }
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(8, 10, 13, 0.75);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.pw-toggle {
  background: none;
  border: 0;
  padding: 2px 2px;
  margin: -2px -2px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text3);
  transition: color 140ms ease;
}
.pw-toggle:hover { color: var(--text0); }
.forgot-link { display: inline-block; margin-top: 10px; font-size: 12.5px; }

.remember {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 0 !important;
  color: var(--text2);
  font-size: 13.5px;
  cursor: pointer;
}
.remember input { width: 17px; height: 17px; accent-color: var(--accent); }

/* Primary CTA */
.login-form .btn-primary {
  width: 100%;
  min-height: 52px;
  margin-top: 2px;
  font-size: 16px;
  border-radius: 12px;
  box-shadow: 0 14px 34px -12px rgba(43, 224, 140, 0.5);
}
.login-form .btn-primary:hover { box-shadow: 0 18px 40px -12px rgba(43, 224, 140, 0.6); }

/* Status / error / success */
.status-line { min-height: 0; color: var(--text3); font-size: 13px; }
.status-line:not(:empty) { margin-top: 14px; }
.status-line.is-error {
  color: #ffb1b1;
  border: 1px solid rgba(255, 107, 107, 0.34);
  border-radius: 12px;
  padding: 11px 13px;
  background: rgba(255, 107, 107, 0.08);
}
.status-line.is-ok {
  color: var(--accent-hi);
  border: 1px solid rgba(43, 224, 140, 0.34);
  border-radius: 12px;
  padding: 11px 13px;
  background: var(--accent-weak);
}

.login-switch {
  text-align: center;
  font-size: 13.5px;
  color: var(--text3);
  margin: 20px 0 0;
}
.login-legal {
  font-size: 12px;
  color: var(--text4);
  text-align: center;
  line-height: 1.5;
  margin: 16px 0 0;
}

.login-footer {
  margin-top: 22px;
  text-align: center;
  color: var(--text5);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.login-footer a { color: var(--text5); text-decoration: none; }
.login-footer a:hover { color: var(--text2); }

/* Busy spinner override (keep accent-aware) */
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  margin: -8.5px 0 0 -8.5px;
  border-radius: 50%;
  border: 2px solid rgba(8, 20, 14, 0.35);
  border-top-color: var(--on-accent);
  animation: dc-spin 0.6s linear infinite;
}
@keyframes dc-spin { to { transform: rotate(360deg); } }

/* ---- Brand pane (desktop content; hidden on mobile) ----------- */
.login-brand { display: none; }
.login-brand-inner { position: relative; z-index: 1; }
.login-brand-head {
  margin: 22px 0 16px;
  color: var(--text0);
  font-family: "Archivo", sans-serif;
  font-size: clamp(34px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.03em;
}
.login-brand-lede {
  margin: 0 0 26px;
  color: var(--text2);
  font-size: 16px;
  line-height: 1.6;
}
.login-brand-feats {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 13px;
}
.login-brand-feats li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text1);
  font-size: 14.5px;
  line-height: 1.45;
}
.login-brand-feats b { color: var(--text0); font-weight: 700; }
.login-brand-feats .lf-ic { margin-top: 1px; }

.login-quote {
  margin: 28px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}
.login-quote blockquote {
  margin: 0;
  color: var(--text0);
  font-family: "Archivo", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
}
.login-quote figcaption {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 15px;
}
.lq-av {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--on-accent);
  background: linear-gradient(150deg, var(--accent-hi), var(--accent));
  font-family: "Archivo", sans-serif;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 0 0 2px var(--bg2), 0 0 0 3px rgba(43, 224, 140, 0.5);
}
.lq-meta { display: flex; flex-direction: column; line-height: 1.25; }
.lq-meta b { color: var(--text0); font-size: 14px; }
.lq-meta small { color: var(--text4); font-family: "JetBrains Mono", monospace; font-size: 11px; }

/* Larger broadcast bar variant for the desktop card */
.login-scorebar-lg { justify-content: space-between; padding: 15px 20px; border-radius: 0; border: 0; border-bottom: 1px solid var(--border); box-shadow: none; }
.login-scorebar-lg img { width: 42px; height: 42px; }
.login-scorebar-lg .lsb-score { font-size: 34px; margin-top: -3px; }
.login-scorebar-lg .lsb-core { gap: 14px; }

.login-mini-card {
  margin-top: 6px;
  border: 1px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 90px -34px rgba(0, 0, 0, 0.85);
}

/* ============================================================
   DESKTOP / WIDE: restore an elevated split (form | brand)
   ============================================================ */
@media (min-width: 880px) {
  .login-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    background:
      radial-gradient(700px 520px at 8% 6%, rgba(43, 224, 140, 0.07), transparent 58%),
      var(--bg);
  }

  /* Form pane centers its card vertically */
  .login-form-pane {
    justify-content: center;
    padding: 40px 56px;
  }
  .login-logo {
    position: absolute;
    top: 36px;
    left: 56px;
    align-self: flex-start;
    margin: 0;
  }

  /* Mobile pitch is replaced by the dedicated brand pane */
  .login-pitch { display: none; }

  .login-box {
    width: min(100%, 396px);
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
  }
  .login-box h1 { font-size: 33px; margin-bottom: 8px; }
  .login-box > p { font-size: 15px; margin-bottom: 28px; }

  .login-footer {
    position: absolute;
    bottom: 30px;
    left: 56px;
    right: auto;
    margin: 0;
    text-align: left;
  }

  /* Brand pane visible + elevated */
  .login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 56px 60px;
    border-left: 1px solid var(--border);
    background: linear-gradient(160deg, #0d1713, var(--bg2) 60%);
  }
  .login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(760px 520px at 72% 16%, rgba(43, 224, 140, 0.15), transparent 60%);
  }
  .login-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(820px 560px at 70% 6%, #000, transparent 76%);
  }
  .login-brand-inner { max-width: 470px; }
}

/* Roomier desktop padding on very wide screens */
@media (min-width: 1280px) {
  .login-form-pane { padding: 40px clamp(56px, 7vw, 110px); }
  .login-brand { padding: 64px clamp(60px, 6vw, 96px); }
  .login-brand-inner { max-width: 500px; }
}

/* Short viewports: let the mobile column breathe without forcing full height */
@media (max-width: 879px) {
  .login-grid { min-height: auto; }
  .login-form-pane { min-height: auto; }
}
