/* BeforeNine — sign in / join screens */
body.auth-mode { background: #05070c; }
body.auth-mode .app { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; min-height: 100vh; }
.auth-wrap { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; }

/* ---------- hero (left) ---------- */
.auth-hero {
  position: relative; overflow: hidden; padding: 36px 56px 40px; display: flex; flex-direction: column;
  background: radial-gradient(120% 80% at 0% 0%, #0f1f4d 0%, #070b16 55%, #05070c 100%);
  border-right: 1px solid rgba(120,160,255,.12);
}
.grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(120,160,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,255,.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 70% at 40% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 40% 40%, #000 30%, transparent 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; animation: drift 18s ease-in-out infinite alternate; }
.orb.o1 { width: 420px; height: 420px; background: #2f6bff; opacity: .45; top: -120px; left: -80px; }
.orb.o2 { width: 340px; height: 340px; background: #00a3ff; opacity: .22; bottom: -60px; right: 8%; animation-duration: 22s; animation-delay: -6s; }
.orb.o3 { width: 260px; height: 260px; background: #7c5cff; opacity: .22; top: 40%; left: 45%; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }

.auth-brand { position: relative; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: #fff; }
.auth-brand .logo-mark { width: 32px; height: 32px; font-size: 12px; box-shadow: 0 6px 24px rgba(47,107,255,.5); }
.hero-copy { position: relative; margin-top: auto; max-width: 560px; }
.hero-copy h1 { font-size: clamp(40px, 5.2vw, 72px); line-height: .92; letter-spacing: -.05em; word-spacing: .08em; margin: 18px 0 18px; font-weight: 900; color: #fff; }
.grad { background: linear-gradient(100deg, #8fb4ff 0%, #2f6bff 45%, #7c5cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { color: #a9b4cc; font-size: 16px; line-height: 1.6; max-width: 460px; margin: 0; }

.nine-clock { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border-radius: 999px; font-size: 13px; color: #c9d4ee;
  background: rgba(15,24,48,.7); border: 1px solid rgba(120,160,255,.22); backdrop-filter: blur(8px); min-height: 36px; }
.nc-time { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.nc-sep { color: #5a6378; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.nc-msg b { color: #8fb4ff; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #5bd49a; box-shadow: 0 0 0 0 rgba(91,212,154,.6); animation: pulse 2s infinite; }
.pulse-dot.late { background: #8fb4ff; box-shadow: 0 0 0 0 rgba(143,180,255,.6); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(91,212,154,0); } 100% { box-shadow: 0 0 0 0 rgba(91,212,154,0); } }

/* floating product preview */
.hero-stage { position: relative; height: 270px; margin: 34px 0 26px; max-width: 600px; }
.float-card { position: absolute; background: rgba(17,22,36,.78); border: 1px solid rgba(143,180,255,.16); border-radius: 18px;
  backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05); animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.log-card { left: 0; top: 18px; width: 72%; padding: 16px 18px; }
.fc-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: #e6ecf8; margin-bottom: 12px; }
.fc-legend { display: flex; gap: 6px; align-items: center; color: #6f7a92; font-weight: 500; font-size: 11px; }
.fc-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.hl-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin-bottom: 5px; }
.hl-row i, .fc-legend i { background: #1b2233; }
.hl-row i { aspect-ratio: 1; border-radius: 5px; animation: glow 4.8s ease-in-out infinite; }
.hl-row i.mid, .fc-legend i.mid { background: #5b7fd6; }
.hl-row i.hi, .fc-legend i.hi { background: #2f6bff; box-shadow: 0 0 12px rgba(47,107,255,.55); }
@keyframes glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.45); } }
.chip-card { display: flex; gap: 12px; align-items: center; padding: 12px 16px 12px 12px; font-size: 13px; color: #e6ecf8; }
.chip-card b { display: block; font-size: 13px; }
.chip-card small { color: #8a95ad; font-size: 11.5px; }
.chip-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: rgba(47,107,255,.18); color: #8fb4ff; }
.chip-ico.ok { background: rgba(91,212,154,.16); color: #5bd49a; }
.report-chip { right: 0; top: 0; animation-delay: -2s; }
.pay-chip { right: 4%; bottom: 8px; animation-delay: -4s; }
.md-chip { left: 10%; bottom: -6px; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 16px; animation-delay: -1s; }
.md-chip code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 11.5px; color: #8fb4ff; }
.md-chip code + code { color: #c9d4ee; }
.hero-feats { position: relative; display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.hero-feats li { display: inline-flex; gap: 8px; align-items: center; font-size: 12.5px; color: #c9d4ee; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }

/* ---------- panel (right) ---------- */
.auth-panel { display: grid; place-items: center; padding: 40px 28px; background: radial-gradient(90% 60% at 100% 100%, rgba(47,107,255,.10), transparent 70%), #080b12; }
.auth-card { width: min(440px, 100%); }
.auth-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 14px; background: #0f131d; border: 1px solid rgba(255,255,255,.07); margin-bottom: 26px; }
.auth-tabs button { position: relative; z-index: 1; border: 0; background: none; color: #8a93a6; padding: 10px; font-weight: 600; font-size: 13.5px; border-radius: 10px; transition: color .2s; }
.auth-tabs button.on { color: #fff; }
.tab-ink { position: absolute; top: 5px; bottom: 5px; width: calc(50% - 5px); border-radius: 10px; background: linear-gradient(135deg, #2f6bff, #4b7dff);
  box-shadow: 0 6px 20px rgba(47,107,255,.4); transition: transform .35s cubic-bezier(.2,.8,.2,1); left: 5px; }
.tab-ink.join { transform: translateX(100%); }
.auth-body h2 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 8px; color: #fff; }
.auth-body .lead { color: #9aa6bf; margin: 0 0 24px; line-height: 1.55; font-size: 14.5px; }
.fade-in { animation: fadeUp .4s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }

.google-cta { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 18px 8px 8px; border-radius: 14px; font-weight: 700; font-size: 15px;
  background: #fff; color: #10131a; border: 0; cursor: pointer; box-shadow: 0 10px 30px rgba(47,107,255,.25); transition: transform .15s, box-shadow .2s; }
.google-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(47,107,255,.35); }
.google-cta:active { transform: translateY(0); }
.google-cta .g-badge { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #f1f4fa; }
.google-cta .arrow { margin-left: auto; transition: transform .2s; font-size: 18px; }
.google-cta:hover .arrow { transform: translateX(4px); }
.google-cta.solid { justify-content: center; padding: 15px 18px; background: linear-gradient(135deg, #2f6bff, #4b7dff); color: #fff; margin-top: 6px; }
.google-cta.solid .arrow { margin-left: 4px; }
.google-cta.secondary { justify-content: center; padding: 13px; background: #161b28; color: #e6ecf8; box-shadow: none; border: 1px solid rgba(255,255,255,.1); }
.google-cta.secondary .arrow { margin-left: 4px; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 6px; }
.mini-stats div { padding: 12px; border-radius: 12px; background: #0f131d; border: 1px solid rgba(255,255,255,.06); text-align: center; }
.mini-stats b { display: block; color: #fff; font-size: 14px; }
.mini-stats small { color: #6f7a92; font-size: 11px; }
.switch { color: #6f7a92; font-size: 13px; text-align: center; margin: 22px 0 0; }
.link { border: 0; background: none; padding: 0; color: #8fb4ff; font-weight: 600; cursor: pointer; font-size: inherit; }
.link:hover { text-decoration: underline; }
.trust { display: flex; gap: 8px; align-items: center; justify-content: center; color: #5a6378; font-size: 11.5px; margin: 28px 0 0; }

.auth-alert { padding: 11px 14px; border-radius: 12px; font-size: 13px; color: #ffb3b3; background: rgba(255,93,93,.1); border: 1px solid rgba(255,93,93,.25); margin-bottom: 18px; }
.invite-badge { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #b8ccff;
  background: rgba(47,107,255,.14); border: 1px solid rgba(47,107,255,.35); margin-bottom: 16px; }

.steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 4px; position: relative; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; position: relative; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 42px; bottom: -6px; width: 2px; background: linear-gradient(#2f6bff55, transparent); }
.steps li > span { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #8a93a6; background: #121724; border: 1px solid rgba(255,255,255,.08); }
.steps li.active > span { color: #fff; background: linear-gradient(135deg, #2f6bff, #4b7dff); border-color: transparent; box-shadow: 0 6px 18px rgba(47,107,255,.4); }
.steps b { display: block; color: #e6ecf8; font-size: 14px; }
.steps small { color: #6f7a92; font-size: 12px; }

.invite-box { margin: 0 0 18px; }
.invite-box summary { cursor: pointer; color: #8fb4ff; font-size: 13px; font-weight: 600; list-style: none; }
.invite-box summary::-webkit-details-marker { display: none; }
.invite-box summary::before { content: '＋ '; }
.invite-box[open] summary::before { content: '– '; }
.invite-box .input, .code-row .input { width: 100%; margin-top: 10px; padding: 11px 14px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #0f131d; border-color: rgba(255,255,255,.1); }
.code-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; }
.code-row .btn { padding: 11px 16px; }

/* join flow */
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 26px; }
.stepper li { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 11.5px; color: #5a6378; font-weight: 600; }
.stepper li::before { content: ''; height: 4px; border-radius: 4px; background: #1b2233; }
.stepper li.done::before { background: #5bd49a; }
.stepper li.now::before { background: linear-gradient(90deg, #2f6bff, #8fb4ff); box-shadow: 0 0 12px rgba(47,107,255,.6); }
.stepper li span { display: none; }
.stepper li.done { color: #5bd49a; }
.stepper li.now { color: #e6ecf8; }
.join-form { display: grid; gap: 14px; }
.join-form label { display: grid; gap: 7px; font-size: 12.5px; font-weight: 600; color: #a9b4cc; }
.join-form label em { font-style: normal; color: #5a6378; font-weight: 500; margin-left: 4px; }
.join-form .input, .join-form .textarea { width: 100%; padding: 12px 14px; font-size: 14px; background: #0f131d; border-color: rgba(255,255,255,.1); border-radius: 12px; }
.join-form .input:focus, .join-form .textarea:focus, .invite-box .input:focus, .code-row .input:focus { border-color: #2f6bff; box-shadow: 0 0 0 4px rgba(47,107,255,.18); }
.who-chip { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 10px 14px; border-radius: 12px; background: #0f131d; border: 1px solid rgba(255,255,255,.06); font-size: 12.5px; color: #a9b4cc; }
.who-chip svg { width: 16px; height: 16px; flex-shrink: 0; }
.who-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-chip .link { font-size: 12.5px; }

.waiting { display: grid; place-items: center; margin: 4px 0 18px; }
.hourglass { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(47,107,255,.25), rgba(124,92,255,.2)); border: 1px solid rgba(143,180,255,.3); }
.hourglass span { width: 24px; height: 24px; border-radius: 50%; border: 3px solid rgba(143,180,255,.25); border-top-color: #8fb4ff; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pending-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.pending-card div { padding: 12px 14px; border-radius: 12px; background: #0f131d; border: 1px solid rgba(255,255,255,.06); }
.pending-card small { display: block; color: #6f7a92; font-size: 11px; margin-bottom: 2px; }
.pending-card b { color: #e6ecf8; font-size: 13px; }
.big-ico { font-size: 40px; margin-bottom: 8px; }

/* ---------- responsive & motion ---------- */
@media (max-width: 980px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 24px 22px 28px; border-right: 0; border-bottom: 1px solid rgba(120,160,255,.12); }
  .hero-copy { margin-top: 28px; }
  .hero-stage { display: none; }
  .hero-feats { margin-top: 22px; }
  .auth-panel { padding: 32px 18px 48px; }
}
@media (max-width: 480px) {
  .hero-copy h1 { font-size: 42px; }
  .mini-stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .nine-clock .nc-sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .orb, .float-card, .hl-row i, .pulse-dot, .hourglass span, .fade-in { animation: none !important; }
  .tab-ink, .google-cta { transition: none; }
}
.hero-copy h1 .dot { color: #7c5cff; margin-left: -.06em; }
.hero-feats li svg { color: #8fb4ff; }
.big-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #ff9b9b; background: rgba(255,93,93,.1); border: 1px solid rgba(255,93,93,.25); }
.stepper li svg { vertical-align: -1px; }
.trust a { color: #6f7a92; text-decoration: underline; margin-left: 4px; }
