/* GoAI Accounting: sign in, create account, invites. Split screen: animated brand panel + form. */
:root {
  --a-brand: #1f68dd; --a-brand-2: #6d4cff; --a-ink: #0b1220; --a-text: #1c2430; --a-muted: #5d6877;
  --a-line: #dde2e8; --a-bg: #ffffff; --a-field: #f7f9fc; --a-ok: #11805a; --a-err: #c42b2b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--a-text); background: var(--a-bg); -webkit-font-smoothing: antialiased; }
a { color: var(--a-brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

.auth-shell { display: grid; grid-template-columns: minmax(420px, 46%) 1fr; min-height: 100vh; }

/* ---------- brand panel ---------- */
.brand-panel { position: relative; overflow: hidden; color: #fff; padding: 44px 52px; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 0% 0%, #1b3f9a 0%, #0d1b47 45%, #070d24 100%); isolation: isolate; }
.brand-panel::before { /* faint grid */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 75%); }
.aurora { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: -1; will-change: transform; }
.aurora.a1 { width: 460px; height: 460px; background: #2f7bff; top: -120px; left: -80px; animation: drift1 18s ease-in-out infinite alternate; }
.aurora.a2 { width: 380px; height: 380px; background: #7b5cff; bottom: -120px; right: -100px; animation: drift2 22s ease-in-out infinite alternate; }
.aurora.a3 { width: 260px; height: 260px; background: #18c4a0; top: 45%; left: 40%; opacity: .32; animation: drift3 26s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(120px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-110px, -80px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-90px, 70px) scale(1.25); } }

.brand-top { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #3d8bff, #7b5cff); box-shadow: 0 8px 24px rgba(61,139,255,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.brand-top em { font-style: normal; font-weight: 500; opacity: .7; }
.brand-copy { margin: auto 0 0; padding-top: 40px; max-width: 470px; }
.brand-copy h2 { font-size: clamp(30px, 3.1vw, 42px); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 750; }
.brand-copy h2 span { background: linear-gradient(90deg, #8ec0ff, #c3b2ff 55%, #7ff0d2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-copy p { font-size: 16px; color: rgba(255,255,255,.72); margin: 0; }

.float-cards { position: relative; height: 230px; margin: 34px 0 10px; }
.glass { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; font-size: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0,0,0,.28); white-space: nowrap; animation: bob 7s ease-in-out infinite; }
.glass b { display: block; font-size: 14px; } .glass small { color: rgba(255,255,255,.65); font-size: 12.5px; }
.glass .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; flex: none; }
.glass .num { font-variant-numeric: tabular-nums; font-weight: 700; margin-left: 6px; }
.g1 { top: 0; left: 0; } .g1 .dot { background: rgba(24,196,160,.25); color: #7ff0d2; }
.g2 { top: 78px; left: 22%; animation-delay: -2.3s; } .g2 .dot { background: rgba(61,139,255,.28); color: #9cc6ff; }
.g3 { top: 158px; left: 6%; animation-delay: -4.6s; } .g3 .dot { background: rgba(123,92,255,.3); color: #c9bcff; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.brand-foot { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.6); margin-top: 26px; }
.brand-foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- form side ---------- */
.form-side { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(20px, 6vw, 96px); position: relative; }
.form-wrap { width: 100%; max-width: 410px; margin: 0 auto; animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--a-brand); background: #eef4ff; padding: 5px 10px; border-radius: 999px; margin-bottom: 16px; }
.form-wrap h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; color: var(--a-ink); font-weight: 750; }
.lede { color: var(--a-muted); margin: 0 0 26px; }

.f { margin-bottom: 16px; }
.f label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--a-text); }
.f label small { font-weight: 500; color: var(--a-muted); }
.inp { position: relative; }
.inp input { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--a-line); border-radius: 12px; background: var(--a-field);
  font: inherit; color: var(--a-ink); transition: border-color .15s, box-shadow .15s, background .15s; outline: none; }
.inp input:hover { border-color: #c5ccd5; }
.inp input:focus { border-color: var(--a-brand); background: #fff; box-shadow: 0 0 0 4px rgba(31,104,221,.14); }
.inp .peek { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--a-muted);
  font: 600 12.5px/1 inherit; padding: 8px; cursor: pointer; border-radius: 8px; }
.inp .peek:hover { color: var(--a-text); background: #eef1f5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-go { position: relative; width: 100%; height: 50px; border: 0; border-radius: 12px; cursor: pointer; font: 700 15.5px/1 inherit; color: #fff;
  background: linear-gradient(135deg, #2d7bf4 0%, #1f68dd 45%, #5b46e8 100%); background-size: 160% 160%; background-position: 0 0;
  box-shadow: 0 10px 24px rgba(31,104,221,.32), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .15s, box-shadow .15s, background-position .4s; margin-top: 6px; }
.btn-go:hover { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 14px 30px rgba(31,104,221,.4), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-go:active { transform: translateY(0); }
.btn-go[disabled] { opacity: .7; cursor: progress; }
.btn-ghost { width: 100%; height: 48px; border-radius: 12px; border: 1.5px solid var(--a-line); background: #fff; color: var(--a-text);
  font: 600 15px/1 inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .15s, background .15s; }
.btn-ghost:hover { border-color: #b9c2ce; background: #f8fafc; }

.or { display: flex; align-items: center; gap: 12px; color: var(--a-muted); font-size: 13px; margin: 22px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--a-line); }
.foot-note { margin-top: 26px; font-size: 13.5px; color: var(--a-muted); text-align: center; }
.legal { text-align: center; font-size: 12px; color: #98a2b0; margin-top: 36px; }

.msg { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; animation: rise .3s both; }
.msg.error { background: #fdeeee; color: #8c1f1f; border: 1px solid #f4cccc; }
.msg.success { background: #e7f6ee; color: #0b5c40; border: 1px solid #bfe5d0; }
.msg.info { background: #eef4ff; color: #16438f; border: 1px solid #cddcfb; }

/* 6-digit code boxes */
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 6px 0 18px; }
.code-boxes input { width: 100%; min-width: 0; padding: 0; height: 60px; text-align: center; font: 700 26px/1 inherit; color: var(--a-ink); border: 1.5px solid var(--a-line); border-radius: 12px;
  background: var(--a-field); outline: none; transition: border-color .15s, box-shadow .15s, transform .1s; font-variant-numeric: tabular-nums; caret-color: var(--a-brand); }
.code-boxes input:focus { border-color: var(--a-brand); background: #fff; box-shadow: 0 0 0 4px rgba(31,104,221,.14); }
.code-boxes input.filled { border-color: #9dbcf2; background: #fff; }
.code-boxes.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* steps (invite / first account) */
.steps { display: flex; gap: 8px; margin: 0 0 22px; }
.steps i { flex: 1; height: 5px; border-radius: 99px; background: #e6eaf0; position: relative; overflow: hidden; }
.steps i.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #2d7bf4, #5b46e8); animation: fill .6s ease both; }
@keyframes fill { from { transform: translateX(-100%); } }

.qr-card { display: grid; grid-template-columns: 148px 1fr; gap: 18px; align-items: center; padding: 16px; border: 1.5px solid var(--a-line); border-radius: 16px; margin-bottom: 18px; background: #fbfcfe; }
.qr-card img { width: 148px; height: 148px; border-radius: 10px; image-rendering: pixelated; background: #fff; border: 1px solid var(--a-line); }
.qr-card ol { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--a-muted); } .qr-card li { margin: 4px 0; }
.qr-card li b { color: var(--a-text); }
.key { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; background: #eef1f5; padding: 6px 8px; border-radius: 8px; word-break: break-all; display: block; margin-top: 6px; color: var(--a-text); }

.invite-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; margin-bottom: 22px;
  background: linear-gradient(135deg, #f2f6ff, #f6f2ff); border: 1px solid #dfe6fb; }
.invite-card .org-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; flex: none;
  background: linear-gradient(135deg, #2d7bf4, #6d4cff); box-shadow: 0 6px 16px rgba(45,123,244,.35); }
.invite-card b { display: block; color: var(--a-ink); } .invite-card small { color: var(--a-muted); }

.panel[hidden] { display: none; }
.dropzone { display: block; border: 2px dashed #c9d3e1; border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; background: #fafbfd;
  transition: border-color .15s, background .15s; margin-bottom: 16px; color: var(--a-muted); font-size: 14px; }
.dropzone:hover, .dropzone.over { border-color: var(--a-brand); background: #f3f7ff; }
.dropzone b { display: block; color: var(--a-text); font-size: 15px; margin-bottom: 2px; }
.dropzone input { display: none; }
.back { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 18px; cursor: pointer; background: none; border: 0; padding: 0; color: var(--a-muted); font: 600 14px/1 inherit; }
.back:hover { color: var(--a-text); }
.strength { height: 4px; border-radius: 99px; background: #e6eaf0; margin-top: 8px; overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s, background .25s; }

/* ---------- small screens: brand panel becomes a header ---------- */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-panel { padding: 22px 20px 26px; min-height: 0; }
  .brand-copy { margin-top: 18px; padding-top: 0; } .brand-copy h2 { font-size: 24px; margin-bottom: 6px; } .brand-copy p { font-size: 14px; }
  .float-cards, .brand-foot { display: none; }
  .form-side { padding: 28px 16px 64px; justify-content: flex-start; }
  .qr-card { grid-template-columns: 1fr; justify-items: center; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
