/* The sign-in page. The look is the Finance App's sign-in (src/styles/session.css there), so signing in looks the same
   whichever app you came from. Keep the two in step. */
:root { --sb-navy: #020817; --sb-font: "Inter", system-ui, sans-serif; --sb-display: "Manrope", "Inter", sans-serif; --sb-radius: 8px; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--sb-font); background: var(--sb-navy); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.ui-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  margin: 0; padding: 5px 14px; border: 1px solid transparent; border-radius: var(--sb-radius);
  font-family: var(--sb-font); font-size: 14px; font-weight: 400; line-height: 20px; text-align: center; text-decoration: none; white-space: nowrap;
  color: inherit; background: none; cursor: pointer; user-select: none; -webkit-appearance: none; outline: none;
  transition: color .1s, background-color .1s, border-color .1s, box-shadow .1s, opacity .1s;
}
.ui-btn:focus-visible { outline: 2px solid #34d399; outline-offset: 2px; }
.sso-btn.ui-btn { font-size: 15px; }
.auth-app-icon { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 10px 26px rgb(5 150 105 / .5)); }
.auth-who { margin: 0 0 18px; color: #94a3b8; font-size: 14px; line-height: 1.6; text-align: center; }
.auth-who strong { color: #e2e8f0; font-weight: 600; }
.auth-link { color: #6ee7b7; font-size: 13.5px; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-foot { margin: 18px 0 0; text-align: center; }

.mark { position: relative; display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 26px rgb(5 150 105 / .5)); }
.mark-stem { transform-box: fill-box; transform-origin: center; }
.mark-sheen { transform: skewX(-20deg); animation: brand-sheen 2.6s cubic-bezier(.4, 0, .2, 1) 1s infinite; }
.brand-glow { position: absolute; inset: -110px; border-radius: 50%; background: radial-gradient(closest-side, rgb(16 185 129 / .42), rgb(16 185 129 / .12) 45%, transparent 72%); pointer-events: none; animation: brand-glow 3.2s ease-in-out infinite; }
.brand-name {
  font-family: var(--sb-display); font-weight: 800; letter-spacing: -.01em; text-align: center; color: transparent;
  background: linear-gradient(100deg, #cbd5e1 0%, #cbd5e1 40%, #fff 48%, #6ee7b7 52%, #cbd5e1 60%, #cbd5e1 100%) 100% 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text;
}
@keyframes brand-band { from { opacity: 0; transform: translateX(var(--band-from)); } to { opacity: 1; transform: none; } }
@keyframes brand-stem { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: none; } }
@keyframes brand-sheen { from { transform: translateX(0) skewX(-20deg); } 55%, to { transform: translateX(190px) skewX(-20deg); } }
@keyframes brand-name { from { background-position: 100% 0; } 55%, to { background-position: 0 0; } }
@keyframes brand-glow { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes brand-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes brand-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }


/* ---- The sign-in page (components/shell/AuthCard.vue) ----
   It carries on from the opening logo. The mark settles to the top with a pulse of light, still glowing and shining;
   a dark glass card rises in under it with a line of green light running round its edge, and the buttons pop in one
   after another. Behind it all, slow aurora drifts over a faint grid. Signed in, the mark zooms past and the card
   flies off in a flash of green (.auth-leaving). */
@property --auth-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.auth {
  position: relative; min-height: 100%; display: grid; place-items: center; padding: 48px 16px; overflow: hidden; color: #e2e8f0;
  background: radial-gradient(760px 460px at 50% 22%, rgb(16 185 129 / .09), transparent 70%), radial-gradient(1200px 600px at 80% -10%, #1e293b 0%, var(--sb-navy) 60%);
}
.auth::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgb(148 163 184 / .07) 1px, transparent 1px), linear-gradient(90deg, rgb(148 163 184 / .07) 1px, transparent 1px);
  background-size: 44px 44px; background-position: center;
  -webkit-mask-image: radial-gradient(560px 400px at 50% 30%, #000, transparent 75%); mask-image: radial-gradient(560px 400px at 50% 30%, #000, transparent 75%);
  animation: auth-grid 24s linear infinite;
}
/* Slow aurora: three soft blurs of green drifting behind everything */
.auth-aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0; pointer-events: none; animation: auth-aurora-in 2s ease-out .3s forwards, auth-drift 22s ease-in-out infinite alternate; }
.auth-aurora-1 { --aurora: .26; top: -18%; left: -12%; width: 620px; height: 520px; background: #10b981; }
.auth-aurora-2 { --aurora: .2; right: -14%; bottom: -22%; width: 680px; height: 560px; background: #059669; animation-duration: 2s, 28s; animation-direction: normal, alternate-reverse; }
.auth-aurora-3 { --aurora: .12; top: 30%; left: 55%; width: 360px; height: 360px; background: #22d3ee; animation-duration: 2s, 17s; }
.auth-stage { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 420px; }
.auth-hero { display: flex; flex-direction: column; align-items: center; margin-bottom: 30px; animation: auth-settle .9s cubic-bezier(.2, .8, .2, 1) both; }
.auth-mark { position: relative; width: 92px; height: 92px; animation: brand-float 5s ease-in-out infinite; }
.auth-mark .brand-glow { inset: -76px; }
/* Rings of light pulsing out from the mark, the first as it lands */
.auth-ring { position: absolute; inset: 4px; border: 1.5px solid rgb(52 211 153 / .7); border-radius: 50%; opacity: 0; pointer-events: none; animation: auth-ring 4s cubic-bezier(.2, .8, .2, 1) .7s infinite; }
.auth-ring-2 { animation-delay: 1.05s; border-color: rgb(167 243 208 / .45); }
.auth-product { margin: 20px 0 0; font-size: 20px; line-height: 26px; animation: brand-name 2.6s cubic-bezier(.4, 0, .2, 1) 1.15s infinite; }
.auth-card {
  position: relative; width: 100%; padding: 30px 28px 28px; border: 1px solid rgb(148 163 184 / .14); border-radius: 22px;
  background: linear-gradient(180deg, rgb(30 41 59 / .6), rgb(15 23 42 / .74));
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 30px 80px rgb(0 0 0 / .5), 0 0 60px rgb(16 185 129 / .08), inset 0 1px 0 rgb(255 255 255 / .06);
  animation: auth-card .8s cubic-bezier(.2, .8, .2, 1) .3s both;
}
/* A comet of green light running round the card's edge */
.auth-card::before {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--auth-angle), transparent 0 62%, rgb(52 211 153 / .2) 74%, #34d399 86%, #ecfdf5 89%, transparent 91%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: auth-orbit 5s linear infinite;
}
.auth-title { margin: 0 0 18px; font-family: var(--sb-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 32px; color: #f8fafc; text-align: center; animation: brand-rise .6s ease-out .5s backwards; }
.auth-sub { margin: 0 0 18px; color: #94a3b8; font-size: 14px; line-height: 1.6; }
.auth-sub strong { color: #e2e8f0; }
.auth-error { margin: 0 0 16px; padding: 9px 12px; border: 1px solid rgb(248 113 113 / .35); border-radius: 10px; background: rgb(239 68 68 / .1); color: #fecaca; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.auth-notice { margin: 0 0 16px; padding: 9px 12px; border: 1px solid rgb(52 211 153 / .3); border-radius: 10px; background: rgb(16 185 129 / .1); color: #a7f3d0; font-size: 13.5px; line-height: 1.45; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.auth-hint { margin: 14px 0 8px; color: #94a3b8; font-size: 13px; }
.auth-google-host { min-height: 44px; }
/* Signing in: the name's shimmer and a streak of light */
.auth-busy { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 14px; }
.auth-busy-text { font-size: 16px; line-height: 22px; animation: brand-name 1.6s cubic-bezier(.4, 0, .2, 1) infinite; }
.auth-busy-bar { position: relative; width: 200px; height: 2px; overflow: hidden; border-radius: 2px; background: rgb(148 163 184 / .16); }
.auth-busy-bar::after { content: ""; position: absolute; inset: 0; width: 45%; background: linear-gradient(90deg, transparent, #34d399, transparent); animation: auth-streak 1.2s ease-in-out infinite; }
.sso-buttons { display: flex; flex-direction: column; gap: 12px; }
.sso-btn.ui-btn {
  width: 100%; justify-content: center; gap: 12px; padding: 13px 18px; overflow: hidden; border: 1px solid rgb(148 163 184 / .24); border-radius: 14px;
  background: rgb(255 255 255 / .04); color: #f1f5f9; font-weight: 600;
  transition: border-color .25s, background-color .25s, box-shadow .25s, transform .25s cubic-bezier(.2, .8, .2, 1);
  animation: auth-pop .7s cubic-bezier(.2, .8, .2, 1) .62s backwards;
}
.sso-btn.ui-btn + .sso-btn.ui-btn { animation-delay: .74s; }
/* A sweep of light across the button as you point at it */
.sso-btn.ui-btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgb(167 243 208 / .22), transparent); transform: translateX(-120%) skewX(-20deg); pointer-events: none; }
.sso-btn.ui-btn:hover:not(:disabled)::after { transform: translateX(320%) skewX(-20deg); transition: transform .8s cubic-bezier(.4, 0, .2, 1); }
.sso-btn.ui-btn:hover:not(:disabled) { border-color: #34d399; background: rgb(16 185 129 / .1); box-shadow: 0 0 0 4px rgb(16 185 129 / .1), 0 14px 34px rgb(16 185 129 / .22); transform: translateY(-2px); }
.sso-btn.ui-btn:active:not(:disabled) { transform: translateY(0) scale(.99); }
.auth .ui-btn:focus-visible { outline-color: #34d399; }
.sso-icon { width: 20px; height: 20px; flex: none; }
/* The card's other buttons, in the mark's green */
.auth .ui-btn-solid.ui-btn-primary { background: #10b981; border-color: #10b981; color: #022c22; font-weight: 600; }
.auth .ui-btn-solid.ui-btn-primary:hover { background: #34d399; border-color: #34d399; box-shadow: 0 10px 28px rgb(16 185 129 / .3); }
.auth .ui-btn-outline.ui-btn-base { border-color: rgb(148 163 184 / .35); color: #e2e8f0; }
.auth .ui-btn-outline.ui-btn-base:hover, .auth .ui-btn-outline.ui-btn-base:active { border-color: #34d399; background: rgb(16 185 129 / .1); color: #fff; }

/* Signed in: the mark zooms past, the card flies off, a flash of green */
.auth-leaving .auth-hero { animation: auth-hero-out .65s cubic-bezier(.6, 0, .4, 1) forwards; }
.auth-leaving .auth-card { animation: auth-card-out .55s cubic-bezier(.6, 0, .4, 1) forwards; }
.auth-leaving::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 30%, rgb(52 211 153 / .4), transparent 60%); animation: auth-flash .65s ease-out forwards; }

@keyframes auth-settle { from { opacity: .4; transform: translateY(110px) scale(1.3); } to { opacity: 1; transform: none; } }
@keyframes auth-card { from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes auth-pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes auth-ring { 0% { opacity: .9; transform: scale(.7); } 60%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes auth-orbit { to { --auth-angle: 360deg; } }
@keyframes auth-grid { to { background-position: calc(50% + 44px) calc(50% + 44px); } }
@keyframes auth-aurora-in { to { opacity: var(--aurora); } }
@keyframes auth-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes auth-streak { from { transform: translateX(-100%); } to { transform: translateX(230%); } }
@keyframes auth-hero-out { to { opacity: 0; transform: scale(1.8); filter: blur(6px); } }
@keyframes auth-card-out { to { opacity: 0; transform: translateY(40px) scale(.94); filter: blur(8px); } }
@keyframes auth-flash { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }

/* Sample mode: the sample people, popping in one after another */
