/* Standalone login: no dashboard styles or application assets. */
:root { color-scheme: dark; --green: #00e676; --paper: #f0f3ee; --muted: #8a958c; --line: #26302b; }
* { box-sizing: border-box; }
body { margin: 0; background: #080b09; color: var(--paper); font-family: Inter, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
.auth-overlay { display: none; min-height: 100svh; padding: 0 5.2%; background: radial-gradient(ellipse at 80% 50%, #10201855, transparent 65%); }
.auth-overlay.active { display: flex; flex-direction: column; }
.login-header, .login-footer { width: 100%; max-width: 1280px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.login-header { height: 108px; flex-grow: 1; }
.login-brand { display: inline-flex; align-items: center; gap: 0; text-decoration: none; }
.login-brand svg { width: 29px; height: 31px; color: var(--green); flex: none; transform: translateY(-2px); }
.login-brand > span { font: 600 31px/1 'Space Grotesk', sans-serif; letter-spacing: -1.7px; }
.brand-period { color: var(--green); }
.login-header-note, .form-index, .art-topline, .art-kicker, .art-bottomline, .login-footer, .auth-legal { font: 400 10px/1.5 'IBM Plex Mono', monospace; letter-spacing: 1.3px; }
.login-header-note { display: flex; gap: 10px; align-items: center; color: #a4aea6; }
.signal-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #00e67666; }
.auth-shell { width: 100%; max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: .86fr 1.14fr; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #101511; box-shadow: 0 30px 80px #0003; }
.auth-box { width: 100%; max-width: 476px; padding: 48px 54px 38px; align-self: center; justify-self: center; }
.auth-form-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; color: #8e9f92; }
.form-index { font-size: 9px; }
.form-spark { font-size: 26px; line-height: 1; color: var(--green); }
.auth-heading { font: 500 clamp(27px, 2.4vw, 34px)/1.15 'Space Grotesk', sans-serif; letter-spacing: -1.35px; margin: 0 0 12px; }
.auth-copy { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0 0 28px; max-width: 300px; }
.auth-field { margin-bottom: 19px; }
.auth-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.form-label { display: block; font-size: 11px; font-weight: 500; letter-spacing: .2px; margin-bottom: 9px; color: #c3ccc4; }
.auth-input-wrap { position: relative; }
.form-input { display: block; width: 100%; min-width: 0; height: 49px; padding: 0 14px; border: 1px solid #303a32; border-radius: 7px; background: #0b100d; color: var(--paper); font-size: 13px; outline: none; transition: border-color .2s, box-shadow .2s; }
.form-input::placeholder { color: #6a786e; }
.form-input:hover { border-color: #48554a; }
.form-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #00e67612; }
.form-input:disabled { color: #9aa79d; opacity: .8; }
.form-input:-webkit-autofill { -webkit-text-fill-color: var(--paper); box-shadow: 0 0 0 100px #101d15 inset; }
#authPassword { padding-right: 46px; }
.auth-visibility-btn { position: absolute; right: 3px; top: 3px; height: 43px; width: 40px; border: 0; background: none; color: #829388; border-radius: 5px; }
.auth-visibility-btn:hover { color: var(--paper); }
.auth-forgot button { border: 0; background: none; color: #9aac9d; font-size: 10px; padding: 0 0 8px; }
.auth-forgot button:hover { color: var(--green); }
.btn-submit { width: 100%; min-height: 49px; margin-top: 2px; padding: 14px 18px; background: var(--green); color: #032613; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 12px; transition: background .2s, box-shadow .2s; }
.btn-submit::after { content: '↗'; font-size: 18px; line-height: .6; }
.btn-submit:hover:not(:disabled) { background: #3aee95; box-shadow: 0 4px 24px #00e6761c; }
.auth-mode-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 23px; font-size: 11px; color: var(--muted); }
.auth-mode-switch button { border: 0; background: none; color: var(--paper); font-size: inherit; padding: 0; text-decoration: underline; text-decoration-color: #768379; text-underline-offset: 4px; }
.auth-mode-switch button:hover { color: var(--green); }
.auth-legal { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 30px 0 0; font-size: 8px; letter-spacing: 1px; }
.auth-legal a { color: #859589; text-decoration: none; }
.auth-legal a:hover { color: var(--green); }
.auth-legal-sep { color: #3a493d; }
.auth-error { display: none; font-size: 12px; line-height: 1.6; padding: 12px; margin-bottom: 18px; border: 1px solid #773842; border-radius: 7px; background: #3c192355; color: #ffb6bd; }
.auth-error.active { display: block; }
.auth-error.success { color: #8cf5b8; border-color: #287647; background: #183d2355; }
.auth-reset-helper { margin: 6px 0 16px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.auth-google-btn-wrap { position: relative; height: 42px; width: 100%; max-width: 400px; margin-inline: auto; border: 1px solid #354238; border-radius: 7px; background: #151d17; }
.auth-google-btn-wrap:hover, .auth-google-btn-wrap:focus-within { border-color: #839589; background: #1b271f; }
.auth-google-custom-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; pointer-events: none; font-size: 12px; }
#authGoogleButton { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; opacity: .001; }
/* Keep native SDK iframe dimensions and margins: percentage heights collapse
   its auto-sized wrapper and break the hit target. The SDK receives our width. */
#authGoogleButton iframe { color-scheme: light; }
#authGoogleStatus { font-size: 12px; line-height: 1.5; color: #ffb6bd; margin: 10px 0 0; }
.auth-google-divider { display: flex; align-items: center; gap: 15px; color: #7e8d82; font: 10px/1.5 'IBM Plex Mono', monospace; margin: 21px 0; }
.auth-google-divider::before, .auth-google-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
#authGoogleRetry { font-size: 11px; color: #c0d3c5; padding: 9px; border: 1px dashed #526256; border-radius: 6px; background: transparent; margin-top: 10px; width: 100%; }
.auth-google-profile { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.auth-google-profile img { flex: 0 0 64px; width: 64px; height: 64px; border: 1px solid #303a32; border-radius: 7px; background: #0b100d; object-fit: cover; }
.auth-google-profile .auth-field { margin: 0; min-width: 0; flex: 1; }
.login-art { position: relative; min-height: 680px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 30px 36px 24px; border-left: 1px solid var(--line); background: radial-gradient(ellipse at 50% 32%, #36c86a1c, transparent 55%), radial-gradient(ellipse at 54% 36%, #13362380, transparent 60%), #0a110c; isolation: isolate; }
.login-art::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .16; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.94' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.38' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
.art-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #96ac9b; font-size: 8px; letter-spacing: 1px; }
.art-topline > span:first-child { display: flex; align-items: center; gap: 9px; }
.art-edition { color: #667e6c; }
.ascii-stage { position: absolute; inset: 42px -24px 260px; z-index: -1; }
#loginAscii { width: 100%; height: 100%; display: block; opacity: .92; }
.art-cross { position: absolute; font: 18px/1 'IBM Plex Mono', monospace; color: #50755b; }
.cross-one { left: 9%; top: 15%; }.cross-two { right: 11%; bottom: 15%; }
.art-message { margin-top: auto; padding: 350px 0 28px; }
.art-kicker { color: #8fab97; font-size: 8px; letter-spacing: 1.4px; }
.art-message h2 { font: 400 clamp(36px, 4.1vw, 58px)/1.04 'Space Grotesk', sans-serif; letter-spacing: -2.8px; margin: 16px 0; }
.art-message em { color: #5dee9c; font-style: normal; }
.art-message p { color: #8caa96; font-size: 12px; line-height: 1.75; margin: 0; }
.art-bottomline { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #263a2d; padding-top: 17px; font-size: 7px; letter-spacing: .8px; color: #779482; }
#asciiMotion { border: 0; background: transparent; color: #b0c8b7; display: flex; align-items: center; gap: 7px; padding: 6px 0 6px 6px; font: 9px/1 'IBM Plex Mono', monospace; white-space: nowrap; }
#asciiMotion:hover { color: var(--green); }
.motion-symbol { font-size: 12px; }
.login-footer { flex-grow: 1; height: 80px; min-height: 80px; font-size: 8px; color: #7c8a7e; letter-spacing: 1px; }
.login-footer > span:last-child { display: flex; align-items: center; gap: 24px; text-transform: none; letter-spacing: .3px; }
.footer-arrow { font-size: 21px; color: #a5b4a6; }
/* Budget vertical space from the viewport; allow natural scrolling only when
   the form itself needs it (keyboard, zoom, errors or longer registration steps). */
@media (min-width: 761px) {
  .login-header { height: clamp(52px, 10dvh, 108px); }
  .login-footer { height: clamp(32px, 6dvh, 80px); min-height: clamp(32px, 6dvh, 80px); }
  .auth-box { padding-block: clamp(18px, 4dvh, 48px); }
  .login-art { min-height: clamp(440px, calc(100dvh - 150px), 680px); }
  .art-message { padding-top: clamp(100px, calc(100dvh - 540px), 350px); }
}
@media (max-width: 1050px) {
  .auth-overlay { padding: 0 30px; }.auth-box { padding: 42px 32px; }.login-art { padding: 28px; }.art-message h2 { font-size: 45px; }.art-bottomline > span { max-width: 155px; }
}
@media (max-width: 760px) {
  .auth-google-profile img { flex-basis: 56px; width: 56px; height: 56px; }
  .auth-overlay { padding: 0 20px; }.login-header { height: 80px; }.login-brand > span { font-size: 28px; }.login-brand svg { width: 26px; height: 28px; }
  .login-header-note { font-size: 7px; letter-spacing: .6px; gap: 7px; }.auth-shell { max-width: 480px; grid-template-columns: 1fr; border-radius: 12px; }
  .login-art { order: -1; min-height: 184px; height: 184px; padding: 22px 26px; border-left: 0; border-bottom: 1px solid var(--line); }
  .art-topline { font-size: 6px; letter-spacing: .7px; }.art-edition { display: none; }.art-topline .signal-dot { width: 4px; height: 4px; }
  .ascii-stage { inset: -35px -60px -45px 36%; opacity: .75; mask-image: linear-gradient(90deg, transparent, #000 55%); }.cross-one, .cross-two { display: none; }
  .art-message { padding: 0; margin-top: auto; }.art-kicker, .art-message p { display: none; }.art-message h2 { font-size: 31px; line-height: 1.08; letter-spacing: -1.3px; margin: 0; }
  .art-bottomline { border: 0; position: absolute; right: 20px; bottom: 21px; padding: 0; }.art-bottomline > span, .motion-label { display: none; }#asciiMotion { padding: 9px; }
  .auth-box { max-width: none; padding: 27px 26px 28px; }.auth-form-head { margin-bottom: 21px; }.form-index { font-size: 8px; }.form-spark { font-size: 22px; }
  .auth-heading { font-size: 29px; }.auth-copy { font-size: 12px; margin-bottom: 22px; }.form-input { font-size: 16px; }.auth-legal { margin-top: 24px; }.login-footer { max-width: 480px; height: 65px; min-height: 65px; font-size: 7px; }
}
@media (max-width: 360px) { .auth-overlay { padding: 0 12px; }.auth-box { padding-inline: 20px; }.login-header-note { font-size: 6px; }.art-message h2 { font-size: 28px; } }
@media (max-height: 850px) {
  .auth-form-head { margin-bottom: 14px; }
  .auth-copy { margin-bottom: 16px; }
  .auth-field { margin-bottom: 13px; }
  .auth-google-divider { margin-block: 13px; }
  .auth-mode-switch { margin-top: 16px; }
  .auth-legal { margin-top: 18px; }
}
@media (max-width: 760px) and (max-height: 950px) {
  .login-header { height: 56px; }
  .login-footer { height: 36px; min-height: 36px; }
  .login-art { height: clamp(84px, 14dvh, 130px); min-height: 0; padding: 14px 26px; }
  .art-topline { display: none; }
  .art-message h2 { font-size: 27px; }
  .auth-box { padding-block: 16px; }
}
@media (min-width: 761px) and (max-height: 700px) {
  .login-header { height: 44px; }
  .login-footer { height: 31.5px; min-height: 28px; }
  .auth-box { padding-block: 16px; }
  .auth-form-head { display: none; }
  .login-art { min-height: 0; padding-block: 20px; }
  .art-message { padding-top: 80px; }
  .art-message h2 { font-size: 38px; }
  .ascii-stage { bottom: 230px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.registration-photo-button { position: relative; flex: 0 0 64px; width: 64px; height: 64px; padding: 0; border: 1px solid #303a32; border-radius: 7px; background: #0b100d; color: var(--green); }
.registration-photo-button:hover { border-color: var(--green); }
.auth-google-profile .registration-photo-button img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.registration-photo-placeholder { font-size: 24px; }
.registration-photo-edit { position: absolute; right: -4px; bottom: -4px; padding: 5px; border: 1px solid #354238; border-radius: 5px; font-size: 10px; background: #151d17; color: var(--green); }
.registration-photo-editor { display: none; position: fixed; inset: 0; z-index: 100; overflow: auto; padding: 24px; background: #000b; align-items: safe center; justify-content: center; }
.registration-photo-editor.active { display: flex; }
.registration-photo-panel { width: min(100%, 384px); padding: 24px; border: 1px solid #354238; border-radius: 12px; background: #101511; }
.registration-photo-panel h2 { margin: 0 0 8px; font: 500 24px 'Space Grotesk', sans-serif; }
.registration-photo-panel p { color: var(--muted); font-size: 12px; margin-bottom: 20px; }
#profileCropCanvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 7px; touch-action: none; cursor: grab; }
#profileCropCanvas.dragging { cursor: grabbing; }
.registration-photo-panel label { display: block; margin-top: 16px; font-size: 12px; }
#profileCropZoom { width: 100%; accent-color: var(--green); margin: 12px 0 20px; }
.photo-cancel { width: 100%; margin-top: 12px; padding: 10px; border: 0; background: none; color: var(--paper); }
@media (max-width: 760px) { .registration-photo-button { flex-basis: 56px; width: 56px; height: 56px; } }
