/* Standalone account pages share the workbench's tokens, without changing its assets. */
[hidden] { display: none !important; }
.auth-page { min-height: 100vh; height: auto; background: radial-gradient(ellipse at 10% 0%, #e8eaff 0, transparent 48%), var(--paper, #f5f7fb); overflow-x: hidden; }
.auth-login-shell { position: relative; z-index: 1; max-width: 1100px; min-height: 100vh; margin: 0 auto; padding: 64px 32px; display: grid; grid-template-columns: 1fr 440px; gap: 90px; align-items: center; }
.auth-intro { align-self: center; }
.auth-brand-mark { position: relative; overflow: hidden; width: 56px; height: 56px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 26px; font-weight: 700; border-radius: 17px; box-shadow: var(--glow); margin-bottom: 30px; }
.auth-eyebrow { color: var(--pine); letter-spacing: .14em; font-size: 11px; font-weight: 700; margin-bottom: 12px; }
.auth-intro h1 { font-size: 34px; line-height: 1.35; letter-spacing: -.03em; margin-bottom: 14px; }
.auth-intro > p:not(.auth-eyebrow) { font-size: 17px; color: var(--ink-3); }
.auth-intro > .auth-lead { font-size: 20px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.auth-lead b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-intro > .auth-sub { font-size: 15px; }
.auth-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 12px; }
.auth-points li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: rgba(255,255,255,.72); border: 1px solid rgba(199,210,254,.8); border-radius: 999px; box-shadow: 0 6px 16px -12px rgba(79,70,229,.5); }
.auth-points svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; fill: #fff; background: var(--grad); flex: none; }
.auth-points li:nth-child(2) svg { background: linear-gradient(135deg, #6366F1, #22B8CF); }
.auth-points li:nth-child(3) svg { background: linear-gradient(135deg, #8B5CF6, #EC4899); }
.auth-points li:nth-child(4) svg { background: linear-gradient(135deg, #F59E0B, #F97316); }
.auth-intro-note { margin-top: 34px; padding-left: 18px; border-left: 3px solid var(--pine-200); max-width: 365px; }
.auth-intro-note strong { display: block; margin-bottom: 8px; }
.auth-intro-note p, .auth-subtitle, .auth-form-note, .auth-muted { color: var(--ink-3); font-size: 13px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.auth-login-card { position: relative; padding: 30px; box-shadow: 0 2px 6px rgba(15,23,42,.04), 0 30px 60px -28px rgba(67,56,202,.35); }
.auth-login-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #6366F1, #8B5CF6, #F59E0B); opacity: .85; }
.auth-tabs { position: relative; display: flex; background: var(--paper); border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 28px; }
.auth-tabs button { position: relative; z-index: 1; flex: 1; border-radius: 7px; padding: 10px 8px; color: var(--ink-3); transition: color .25s; }
.auth-tabs button:hover { color: var(--pine); }
.auth-tabs button[aria-selected="true"] { color: var(--pine); background: white; font-weight: 600; box-shadow: var(--shadow-1); }
@supports selector(:has(a)) {
  .auth-tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 6px); border-radius: 7px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 12px -6px rgba(79,70,229,.35); transition: transform .45s cubic-bezier(.34,1.4,.5,1); }
  .auth-tabs:has(#register-tab[aria-selected="true"])::before { transform: translateX(calc(100% + 4px)); }
  .auth-tabs button[aria-selected="true"] { background: transparent; box-shadow: none; }
}
.auth-login-card h2 { font-size: 24px; margin-bottom: 4px; }
.auth-subtitle { margin-bottom: 25px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.auth-field label { font-size: 13px; font-weight: 600; transition: color .2s; }
.auth-field input, .auth-field select, .auth-filter input, .auth-filter select { width: 100%; min-width: 0; height: 42px; padding: 8px 12px; background: white; border: 1px solid var(--line-hard); border-radius: 8px; }
.auth-field input:focus, .auth-filter input:focus, .auth-filter select:focus { border-color: var(--pine); }
.auth-field input[aria-invalid="true"] { border-color: var(--clay); }
.auth-field-error { color: #bf2630; font-size: 12px; min-height: 0; }
.auth-field-error:empty { display: none; }
.auth-form-error { color: #bf2630; font-size: 13px; margin: 12px 0; }
.auth-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: 8px 15px; border-radius: 9px; font-size: 13px; font-weight: 600; border: 1px solid var(--line-hard); background: #fff; white-space: nowrap; gap: 6px; transition: background .15s; }
.auth-btn:hover { background: var(--paper); }
.auth-btn-primary { background: var(--pine); border-color: var(--pine); color: white; }
.auth-btn-primary:hover { background: var(--pine-700); }
.auth-btn-danger { color: #bf2630; }
.auth-btn:disabled { opacity: .6; cursor: wait; }
.auth-submit { width: 100%; min-height: 44px; margin-top: 4px; }
.auth-form-note { text-align: center; margin-top: 20px; }
.auth-notice { border-radius: 8px; padding: 11px 14px; color: var(--pine-700); background: var(--pine-050); font-size: 13px; margin-bottom: 18px; overflow-wrap: anywhere; }
.auth-notice[data-error="true"] { background: var(--clay-050); color: #bf2630; }
.auth-noscript { position: relative; z-index: 1; text-align: center; color: #bf2630; padding: 20px; }
body.auth-page .site-footer { z-index: 2; }

/* ---------- Login page: live feedback on the card ---------- */
.auth-login-card .auth-field input { transition: border-color .2s, box-shadow .25s, background-color .2s; }
.auth-login-card .auth-field input:hover { border-color: #b4bdf8; }
.auth-login-card .auth-field input:focus { outline: none; border-color: var(--pine); background: #fdfdff; box-shadow: 0 0 0 4px rgba(99,102,241,.14), 0 8px 18px -12px rgba(79,70,229,.6); }
.auth-login-card .auth-field:focus-within label { color: var(--pine); }
.auth-login-card .auth-field input[aria-invalid="true"] { box-shadow: 0 0 0 3px rgba(229,72,77,.12); }
.auth-login-card .auth-field-error:not(:empty), .auth-login-card .auth-form-error:not(:empty) { animation: auth-fade-in .3s ease both; }
.auth-login-card .auth-submit { position: relative; overflow: hidden; min-height: 46px; font-size: 14px; letter-spacing: .04em; border: 0; background: linear-gradient(110deg, #4F46E5 0%, #7C3AED 55%, #6366F1 100%); background-size: 200% 100%; box-shadow: 0 10px 22px -12px rgba(79,70,229,.8); transition: background-position .5s ease, transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .25s; }
.auth-login-card .auth-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
.auth-login-card .auth-submit:hover { background: linear-gradient(110deg, #4F46E5 0%, #7C3AED 55%, #6366F1 100%); background-size: 200% 100%; background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(79,70,229,.85); }
.auth-login-card .auth-submit:hover::after { transform: translateX(120%); transition: transform .8s ease; }
.auth-login-card .auth-submit:active { transform: translateY(0) scale(.975); box-shadow: 0 6px 14px -10px rgba(79,70,229,.8); transition-duration: .08s; }
.auth-login-card .auth-submit:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(99,102,241,.3); }
.auth-login-card .auth-submit:disabled { opacity: .85; transform: none; }
.auth-login-card .auth-submit:disabled::after { animation: auth-sheen 1.1s ease-in-out infinite; }
.auth-login-card [role="tabpanel"]:not([hidden]) { animation: auth-panel-in .45s cubic-bezier(.2,.8,.2,1) both; }
.auth-login-card form:has(.auth-form-error:not(:empty)) { animation: auth-shake .45s cubic-bezier(.36,.07,.19,.97) both; }

/* ---------- Login page: entrance ---------- */
.auth-intro > * { animation: auth-rise .7s cubic-bezier(.2,.8,.2,1) both; }
.auth-intro > :nth-child(2) { animation-delay: .08s; }
.auth-intro > :nth-child(3) { animation-delay: .16s; }
.auth-intro > :nth-child(4) { animation-delay: .24s; }
.auth-intro > :nth-child(5) { animation-delay: .32s; }
.auth-intro > :nth-child(6) { animation-delay: .4s; }
.auth-intro > :nth-child(7) { animation-delay: .5s; }
.auth-points li { animation: auth-pop .5s cubic-bezier(.34,1.56,.64,1) both; }
.auth-points li:nth-child(1) { animation-delay: .5s; }
.auth-points li:nth-child(2) { animation-delay: .58s; }
.auth-points li:nth-child(3) { animation-delay: .66s; }
.auth-points li:nth-child(4) { animation-delay: .74s; }
.auth-points li { transition: transform .25s, box-shadow .25s; }
.auth-points li:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgba(79,70,229,.6); }
.auth-intro > .auth-brand-mark { animation: auth-mark-in .8s cubic-bezier(.34,1.56,.64,1) both, auth-breathe 4.8s ease-in-out 1s infinite; }
.auth-brand-mark::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%); transform: translateX(-110%); animation: auth-gloss 5.5s ease-in-out 1.2s infinite; }
.auth-login-card { animation: auth-card-in .85s cubic-bezier(.2,.8,.2,1) .18s both; }

/* ---------- Login page: background scene ---------- */
.auth-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.auth-scene::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(79,70,229,.16) 1px, transparent 1.6px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 80%); opacity: .7; }
.auth-orb { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; will-change: transform; }
.auth-orb-a { left: -14vmax; top: -18vmax; background: radial-gradient(circle, rgba(99,102,241,.26), transparent 66%); animation: auth-drift-a 26s ease-in-out infinite alternate; }
.auth-orb-b { right: -16vmax; top: -10vmax; background: radial-gradient(circle, rgba(167,139,250,.24), transparent 66%); animation: auth-drift-b 32s ease-in-out infinite alternate; }
.auth-orb-c { left: 22vw; bottom: -26vmax; background: radial-gradient(circle, rgba(251,191,36,.18), transparent 64%); animation: auth-drift-c 30s ease-in-out infinite alternate; }
.auth-orb-d { right: -8vmax; bottom: -22vmax; width: 36vmax; height: 36vmax; background: radial-gradient(circle, rgba(45,212,191,.14), transparent 66%); animation: auth-drift-a 36s ease-in-out -9s infinite alternate-reverse; }
.auth-deco { position: absolute; display: block; }
.auth-net { right: 3%; top: 4%; width: 250px; color: #818CF8; opacity: .55; animation: auth-fade-in 1.4s ease .6s both; }
.auth-net-lines { stroke-dasharray: 4 5; animation: auth-flow 14s linear infinite; }
.auth-node { transform-box: fill-box; transform-origin: center; animation: auth-pulse 3.6s ease-in-out infinite; }
.auth-node:nth-child(2) { animation-delay: -.7s; } .auth-node:nth-child(3) { animation-delay: -1.4s; }
.auth-node:nth-child(4) { animation-delay: -2.1s; fill: #A78BFA; } .auth-node:nth-child(5) { animation-delay: -2.8s; fill: #F59E0B; } .auth-node:nth-child(6) { animation-delay: -1s; }
.auth-chart { left: 2%; bottom: 4.5%; width: min(320px, 24vw); opacity: .75; }
.auth-chart-grid { animation: auth-fade-in 1s ease .4s both; }
.auth-chart-line { stroke-dasharray: 1; animation: auth-draw 2.2s cubic-bezier(.6,.1,.3,1) .6s both; }
.auth-chart-area { animation: auth-fade-in 1.2s ease 2s both; }
.auth-chart-dots circle { transform-box: fill-box; transform-origin: center; animation: auth-pop .45s cubic-bezier(.34,1.56,.64,1) both; }
.auth-chart-dots circle:nth-child(1) { animation-delay: .95s; } .auth-chart-dots circle:nth-child(2) { animation-delay: 1.3s; }
.auth-chart-dots circle:nth-child(3) { animation-delay: 1.65s; } .auth-chart-dots circle:nth-child(4) { animation-delay: 2s; }
.auth-chart-dots circle:nth-child(5) { animation-delay: 2.35s; }
.auth-chart-star { transform-box: fill-box; transform-origin: center; animation: auth-pop .6s cubic-bezier(.34,1.56,.64,1) 2.6s both, auth-twinkle 3.2s ease-in-out 3.2s infinite; }
.auth-float { opacity: .75; animation: auth-fade-in 1.2s ease both, auth-float 11s ease-in-out infinite alternate; }
.auth-cube { left: 5%; top: 13%; width: 58px; color: #6366F1; animation-delay: .3s, -2s; }
.auth-book { left: 35%; top: 8%; width: 50px; color: #8B5CF6; animation-delay: .5s, -6s; animation-duration: 1.2s, 13s; }
.auth-puzzle { left: 47%; top: 64%; width: 46px; color: #F59E0B; animation-delay: .7s, -4s; animation-duration: 1.2s, 12s; }
.auth-pencil { right: 4%; bottom: 13%; width: 56px; color: #EC6A8C; animation-delay: .9s, -8s; animation-duration: 1.2s, 14s; }
.auth-star { right: 6.5%; top: 52%; width: 28px; color: #FBBF24; animation-delay: 1.1s, -3s; animation-duration: 1.2s, 9s; }
.auth-spark { width: 18px; color: #A78BFA; animation: auth-twinkle 3.6s ease-in-out infinite; }
.auth-spark-a { left: 25%; top: 22%; }
.auth-spark-b { left: 52%; top: 32%; width: 14px; color: #F59E0B; animation-delay: -1.2s; }
.auth-spark-c { right: 18%; bottom: 8%; width: 16px; color: #818CF8; animation-delay: -2.4s; }

@keyframes auth-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes auth-pop { from { opacity: 0; transform: scale(.6); } }
@keyframes auth-fade-in { from { opacity: 0; } }
@keyframes auth-card-in { from { opacity: 0; transform: translateY(26px) scale(.97); } }
@keyframes auth-panel-in { from { opacity: 0; transform: translateX(10px); } }
@keyframes auth-mark-in { from { opacity: 0; transform: scale(.4) rotate(-14deg); } }
@keyframes auth-breathe { 50% { box-shadow: 0 14px 32px -8px rgba(124,58,237,.6), 0 0 0 7px rgba(99,102,241,.1); } }
@keyframes auth-gloss { 0%, 55% { transform: translateX(-110%); } 85%, 100% { transform: translateX(110%); } }
@keyframes auth-sheen { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes auth-shake { 15%, 55% { transform: translateX(-7px); } 35%, 75% { transform: translateX(6px); } 90% { transform: translateX(-2px); } }
@keyframes auth-drift-a { to { transform: translate(9vmax, 7vmax) scale(1.08); } }
@keyframes auth-drift-b { to { transform: translate(-8vmax, 10vmax) scale(.92); } }
@keyframes auth-drift-c { to { transform: translate(12vmax, -6vmax) scale(1.1); } }
@keyframes auth-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes auth-flow { to { stroke-dashoffset: -90; } }
@keyframes auth-pulse { 50% { transform: scale(1.5); opacity: .55; } }
@keyframes auth-twinkle { 0%, 100% { transform: scale(.75) rotate(0); opacity: .45; } 50% { transform: scale(1.1) rotate(25deg); opacity: 1; } }
@keyframes auth-float { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-16px) rotate(5deg); } }

@media (max-width: 900px) {
  .auth-login-shell { grid-template-columns: 1fr 400px; gap: 35px; padding: 40px 24px; }
  .auth-intro h1 { font-size: 27px; }
  .auth-points { grid-template-columns: 1fr; }
  .auth-book, .auth-puzzle, .auth-spark-b, .auth-chart { display: none; }
}
@media (max-width: 640px) {
  .auth-login-shell { display: block; max-width: 460px; padding: 26px 18px 64px; }
  .auth-intro { margin-bottom: 20px; }
  .auth-intro .auth-brand-mark { width: 42px; height: 42px; font-size: 22px; border-radius: 12px; margin-bottom: 14px; }
  .auth-intro h1 { font-size: 25px; margin-bottom: 4px; }
  .auth-intro > p:not(.auth-eyebrow) { font-size: 13px; }
  .auth-intro > .auth-lead { font-size: 15px; margin-bottom: 2px; }
  .auth-points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
  .auth-points li { font-size: 12px; padding: 4px 8px 4px 5px; gap: 5px; white-space: nowrap; }
  .auth-points svg { width: 17px; height: 17px; }
  .auth-eyebrow { display: none; }
  .auth-intro-note { display: none; }
  .auth-login-card { padding: 22px 20px; }
  .auth-tabs { margin-bottom: 20px; }
  .auth-subtitle { margin-bottom: 18px; }
  .auth-net, .auth-pencil, .auth-star, .auth-spark-c { display: none; }
  .auth-cube { left: auto; right: 6%; top: 2.5%; width: 40px; opacity: .55; }
  .auth-spark-a { left: auto; right: 22%; top: 9%; width: 13px; }
  .auth-orb { width: 70vmax; height: 70vmax; }
}

@media (max-height: 820px) and (min-width: 641px) { .auth-chart { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before, .auth-page *::after { animation: none !important; transition: none !important; }
}
