:root {
  color-scheme: dark;
  --bg: #08090d;
  --surface: #10131b;
  --surface-raised: #151923;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .15);
  --text: #f0f2f8;
  --text-soft: #c6cbd7;
  --muted: #9299ab;
  --muted-2: #71798b;
  --violet: #988cff;
  --violet-strong: #7c6dff;
  --cyan: #55d7e8;
  --red: #ff8292;
  --font-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { color: #08090d; background: var(--cyan); }

html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: var(--bg); font-family: var(--font-sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.login-shell { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(480px, 1.08fr); min-height: 100vh; }
.brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; overflow: hidden; padding: clamp(32px, 5vw, 72px); border-right: 1px solid var(--border); background: radial-gradient(circle at 30% 28%, rgba(124, 109, 255, .2), transparent 27rem), linear-gradient(145deg, #11131d 0%, #090a0f 70%); }
.brand-panel::after { position: absolute; right: -9rem; bottom: -11rem; width: 31rem; height: 31rem; content: ''; border: 1px solid rgba(85, 215, 232, .12); border-radius: 50%; box-shadow: 0 0 0 5rem rgba(152, 140, 255, .025), 0 0 0 10rem rgba(85, 215, 232, .018); pointer-events: none; }
.brand-lockup, .mobile-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; }
.brand-mark { display: flex; align-items: end; gap: 3px; width: 31px; height: 31px; padding: 5px; border: 1px solid rgba(152, 140, 255, .42); border-radius: 9px; background: linear-gradient(135deg, rgba(152, 140, 255, .2), rgba(85, 215, 232, .09)); box-shadow: inset 0 0 14px rgba(152, 140, 255, .14); }
.brand-mark span { display: block; width: 4px; border-radius: 2px; background: var(--violet); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 14px; opacity: .82; }
.brand-mark span:nth-child(3) { height: 20px; background: var(--cyan); }
.brand-name { color: var(--text); font-size: 17px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
.brand-name span { color: var(--violet); }
.brand-caption { margin-top: 4px; color: var(--muted-2); font: 9px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }

.brand-message { position: relative; z-index: 1; max-width: 590px; margin: auto 0; padding: 70px 0; }
.brand-message h1 { max-width: 13ch; margin: 0; font-size: clamp(38px, 4.5vw, 66px); line-height: 1.03; letter-spacing: -.04em; text-wrap: balance; }
.brand-message p { max-width: 55ch; margin: 24px 0 0; color: var(--muted); font-size: clamp(14px, 1.2vw, 17px); }
.security-notes { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 14px 24px; color: var(--muted); font-size: 11px; }
.security-notes div { display: flex; align-items: center; gap: 8px; }
.security-notes svg { width: 16px; height: 16px; color: var(--cyan); }

.form-panel { display: grid; place-items: center; min-height: 100vh; padding: 44px clamp(24px, 7vw, 110px); background: radial-gradient(circle at 100% 0%, rgba(124, 109, 255, .08), transparent 27rem), var(--bg); }
.form-wrap { width: min(100%, 440px); animation: form-enter .55s var(--ease) both; }
.mobile-brand { display: none; margin-bottom: 42px; }
.form-heading h2 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.12; letter-spacing: -.035em; }
.form-heading p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.environment-notice { display: flex; align-items: flex-start; gap: 9px; margin-top: 24px; padding: 11px 12px; color: #aab6c9; border: 1px solid rgba(85, 215, 232, .16); border-radius: 10px; background: rgba(85, 215, 232, .055); font-size: 11px; }
.environment-notice svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; color: var(--cyan); }

form { display: grid; gap: 19px; margin-top: 30px; }
.field-group { display: grid; gap: 8px; }
.field-group label { color: var(--text-soft); font-size: 12px; font-weight: 700; }
.input-wrap { display: flex; align-items: center; min-height: 50px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 11px; background: rgba(255, 255, 255, .025); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.input-wrap:focus-within { border-color: rgba(152, 140, 255, .65); background: rgba(152, 140, 255, .045); box-shadow: 0 7px 24px rgba(0, 0, 0, .16); }
.input-wrap > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--muted-2); }
.input-wrap input { width: 100%; min-width: 0; height: 48px; padding: 0 11px; color: var(--text); caret-color: var(--cyan); border: 0; outline: 0; background: transparent; font-size: 14px; }
.input-wrap input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 40px #11141c inset; caret-color: var(--cyan); }
.password-toggle { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; color: var(--muted-2); border-radius: 8px; background: transparent; }
.password-toggle:hover { color: var(--text-soft); background: rgba(255, 255, 255, .05); }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.captcha-block { min-height: 88px; }
#recaptcha-container { min-height: 78px; }
.captcha-status { margin: 8px 0 0; color: var(--muted-2); font-size: 11px; }
.form-error { padding: 11px 12px; color: #ffacb7; border: 1px solid rgba(255, 130, 146, .22); border-radius: 10px; background: rgba(255, 130, 146, .07); font-size: 12px; }
.submit-button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 18px; color: #090a0f; border-radius: 11px; background: var(--violet); box-shadow: 0 11px 28px rgba(80, 67, 199, .2); font-size: 13px; font-weight: 800; transition: transform .18s var(--ease), background .18s ease, box-shadow .18s ease; }
.submit-button:hover:not(:disabled) { background: #a69cff; box-shadow: 0 15px 34px rgba(80, 67, 199, .28); transform: translateY(-1px); }
.submit-button:disabled { cursor: not-allowed; opacity: .48; box-shadow: none; }
.submit-button svg { width: 17px; height: 17px; }
.button-loader { display: none; width: 16px; height: 16px; border: 2px solid rgba(9, 10, 15, .3); border-top-color: #090a0f; border-radius: 50%; animation: spin .65s linear infinite; }
.submit-button.loading .button-loader { display: block; }
.submit-button.loading > svg { display: none; }
.privacy-copy { max-width: 42ch; margin: 22px auto 0; color: var(--muted-2); font-size: 10px; text-align: center; }

@keyframes form-enter { from { opacity: .35; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100svh; padding: 34px 22px; }
  .mobile-brand { display: flex; }
}

@media (max-width: 390px) {
  .form-panel { place-items: start center; padding: 26px 16px; }
  .mobile-brand { margin-bottom: 34px; }
  .input-wrap input { font-size: 16px; }
  #recaptcha-container { width: 304px; max-width: calc(100vw - 32px); transform-origin: left top; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
