:root {
    --auth-ink: #112641;
    --auth-muted: #6c7c91;
    --auth-navy: #0b213d;
    --auth-blue: #1d73e8;
    --auth-line: #dfe6ef;
    --auth-canvas: #f5f8fc;
    --auth-danger: #c53d50;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--auth-ink); background: var(--auth-canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.auth-layout { display: grid; min-height: 100dvh; grid-template-columns: minmax(480px, 1.08fr) minmax(430px, .92fr); }

.auth-story { position: relative; display: flex; min-height: 100dvh; overflow: hidden; flex-direction: column; padding: 48px clamp(42px, 5.5vw, 84px) 38px; color: white; background: radial-gradient(circle at 85% 42%, rgba(46,132,221,.43), transparent 27%), radial-gradient(circle at 12% 86%, rgba(30,126,186,.24), transparent 26%), linear-gradient(140deg, #07182e, #0c2c4e 62%, #105287); }
.auth-story::before { position: absolute; top: -190px; left: -170px; width: 440px; height: 440px; content: ""; border: 1px solid rgba(255,255,255,.05); border-radius: 50%; }
.auth-story-brand { position: relative; z-index: 3; display: inline-flex; width: max-content; padding: 10px 14px; border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 12px 35px rgba(2,15,29,.18); }
.auth-story-brand img { display: block; width: auto; height: 28px; }

.story-content { position: relative; z-index: 3; max-width: 620px; margin: auto 0; padding: 45px 0 30px; }
.story-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: #82c9ff; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.story-content h1 { margin: 0; font-size: clamp(39px, 4.5vw, 67px); line-height: 1.04; letter-spacing: -.055em; }
.story-content h1 em { color: #73bdff; font-style: normal; }
.story-content > p { max-width: 545px; margin: 24px 0 0; color: rgba(255,255,255,.64); font-size: 14px; line-height: 1.75; }
.story-experiences { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.story-experiences span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; color: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(255,255,255,.06); backdrop-filter: blur(10px); font-size: 10px; font-weight: 700; }
.story-experiences i { color: #80c7ff; }
.story-footer { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; margin: 0; color: rgba(255,255,255,.43); font-size: 9px; }
.story-footer i { color: #55d2b0; }

.story-network { position: absolute; z-index: 2; right: -80px; bottom: -90px; width: 410px; height: 410px; opacity: .74; }
.network-ring { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.ring-one { inset: 0; }
.ring-two { inset: 70px; border-style: dashed; }
.network-center, .network-node { position: absolute; display: grid; place-items: center; border-radius: 20px; backdrop-filter: blur(12px); }
.network-center { inset: 159px; color: #155484; background: rgba(255,255,255,.92); box-shadow: 0 20px 45px rgba(3,18,34,.25); font-size: 30px; }
.network-node { width: 54px; height: 54px; color: white; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.10); }
.node-one { top: 16px; left: 176px; }
.node-two { top: 180px; right: 12px; }
.node-three { bottom: 26px; left: 65px; }

.auth-panel { display: grid; min-height: 100dvh; place-items: center; padding: 34px clamp(28px, 5vw, 78px); background: #fff; }
.auth-panel-inner { width: min(420px, 100%); }
.mobile-brand { display: none; width: max-content; margin-bottom: 34px; }
.mobile-brand img { display: block; width: auto; height: 31px; }
.auth-heading { margin-bottom: 23px; }
.auth-eyebrow { display: block; margin-bottom: 8px; color: var(--auth-blue); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.auth-heading h2 { margin: 0; color: var(--auth-ink); font-size: 35px; line-height: 1.1; letter-spacing: -.045em; }
.auth-heading p { margin: 10px 0 0; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }

.auth-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 22px; padding: 5px; border-radius: 14px; background: #f0f4f8; }
.auth-methods a { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; color: #75859a; border-radius: 10px; font-size: 11px; font-weight: 780; transition: .2s; }
.auth-methods a:hover { color: var(--auth-ink); }
.auth-methods a.active { color: var(--auth-ink); background: white; box-shadow: 0 4px 13px rgba(27,51,82,.10); }
.auth-methods a.active i { color: var(--auth-blue); }

.auth-alert { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 15px; padding: 11px 13px; color: #a52d3f; border: 1px solid #f5cbd1; border-radius: 11px; background: #fff3f5; font-size: 10px; font-weight: 700; line-height: 1.45; }
.auth-alert i { margin-top: 2px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-field > span { display: block; margin: 0 0 7px 2px; color: #42566f; font-size: 10px; font-weight: 780; }
.auth-field > div { display: flex; min-height: 52px; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid var(--auth-line); border-radius: 13px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.auth-field > div:focus-within { border-color: #6ba7ee; box-shadow: 0 0 0 4px rgba(29,115,232,.08); }
.auth-field > div > i { width: 17px; color: #8190a3; text-align: center; font-size: 13px; }
.auth-field input { width: 100%; min-width: 0; height: 50px; color: var(--auth-ink); border: 0; outline: 0; background: transparent; font-size: 12px; }
.auth-field input::placeholder { color: #a4afbd; }
.password-toggle { display: grid; width: 33px; height: 33px; flex: 0 0 33px; cursor: pointer; place-items: center; color: #7d8ca0; border: 0; border-radius: 9px; background: transparent; }
.password-toggle:hover { color: var(--auth-blue); background: #eef5ff; }
.phone-field b { padding-right: 11px; color: #53667e; border-right: 1px solid var(--auth-line); font-size: 11px; }
.otp-note { display: flex; gap: 8px; align-items: flex-start; margin: -2px 2px 0; color: #7b8b9f; font-size: 9px; line-height: 1.5; }
.otp-note i { margin-top: 2px; color: var(--auth-blue); }

.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -1px 1px 0; }
.auth-options > a { color: var(--auth-blue); font-size: 9px; font-weight: 780; }
.remember-option { display: inline-flex; cursor: pointer; align-items: center; gap: 7px; color: #6f8094; font-size: 9px; font-weight: 650; }
.remember-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.remember-option span { position: relative; display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #cad4e0; border-radius: 5px; background: white; }
.remember-option input:checked + span { border-color: var(--auth-blue); background: var(--auth-blue); }
.remember-option input:checked + span::after { width: 7px; height: 4px; content: ""; border-bottom: 2px solid white; border-left: 2px solid white; transform: rotate(-45deg) translateY(-1px); }

.primary-auth-button { display: inline-flex; min-height: 52px; cursor: pointer; align-items: center; justify-content: center; gap: 10px; color: white; border: 0; border-radius: 13px; background: linear-gradient(135deg, #2179ed, #13549b); box-shadow: 0 12px 25px rgba(28,105,202,.22); font-size: 11px; font-weight: 850; transition: transform .18s, box-shadow .18s; }
.primary-auth-button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(28,105,202,.28); }
.primary-auth-button:disabled { cursor: wait; opacity: .7; transform: none; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 15px; color: #99a5b4; font-size: 8px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { height: 1px; content: ""; flex: 1; background: #e6ebf1; }
.google-auth-button { display: flex; width: 100%; min-height: 50px; cursor: pointer; align-items: center; justify-content: center; gap: 11px; color: #33485f; border: 1px solid var(--auth-line); border-radius: 13px; background: white; font-size: 10px; font-weight: 780; transition: border-color .18s, background .18s; }
.google-auth-button:hover { border-color: #bccbdb; background: #fafcff; }
.google-auth-button img { width: 17px; height: 17px; }
.auth-register { margin: 20px 0 0; color: #718196; text-align: center; font-size: 10px; }
.auth-register a { color: var(--auth-blue); font-weight: 850; }
.auth-legal { margin: 16px 0 0; color: #a0aab7; text-align: center; font-size: 8px; line-height: 1.5; }

.auth-loading { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; align-content: center; color: white; background: rgba(5,20,38,.7); backdrop-filter: blur(5px); }
.auth-loading span { width: 43px; height: 43px; border: 4px solid rgba(255,255,255,.24); border-top-color: white; border-radius: 50%; animation: authSpin .75s linear infinite; }
.auth-loading p { margin: 14px 0 0; font-size: 10px; font-weight: 780; }
@keyframes authSpin { to { transform: rotate(360deg); } }
.auth-toast { position: fixed; z-index: 110; right: 20px; bottom: 20px; max-width: min(350px, calc(100vw - 40px)); padding: 12px 15px; pointer-events: none; color: white; border-radius: 12px; background: #173450; box-shadow: 0 14px 35px rgba(13,36,61,.22); font-size: 10px; font-weight: 720; opacity: 0; transform: translateY(10px); transition: .22s; }
.auth-toast.show { opacity: 1; transform: translateY(0); }
.auth-toast.error { background: #aa3547; }

@media (max-width: 980px) {
    .auth-layout { grid-template-columns: minmax(390px, .85fr) minmax(430px, 1.15fr); }
    .auth-story { padding-right: 40px; padding-left: 40px; }
    .story-content h1 { font-size: 43px; }
    .story-network { right: -160px; opacity: .55; }
}

@media (max-width: 760px) {
    body { background: radial-gradient(circle at 50% -20%, #d9ecff, transparent 45%), #f5f8fc; }
    .auth-layout { display: block; }
    .auth-story { display: none; }
    .auth-panel { min-height: 100dvh; padding: max(27px, env(safe-area-inset-top)) 22px max(27px, env(safe-area-inset-bottom)); background: transparent; }
    .auth-panel-inner { padding: 26px 22px 22px; border: 1px solid rgba(216,226,237,.9); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 22px 55px rgba(32,57,87,.12); backdrop-filter: blur(15px); }
    .mobile-brand { display: inline-flex; }
    .auth-heading h2 { font-size: 31px; }
    .auth-heading { margin-bottom: 21px; }
    .auth-toast { right: 14px; bottom: 14px; }
}

@media (max-width: 390px) {
    .auth-panel { padding-right: 14px; padding-left: 14px; }
    .auth-panel-inner { padding-right: 18px; padding-left: 18px; }
    .mobile-brand { margin-bottom: 27px; }
    .auth-heading h2 { font-size: 28px; }
}

@media (max-height: 700px) and (min-width: 761px) {
    .auth-panel { padding-top: 22px; padding-bottom: 22px; }
    .auth-heading { margin-bottom: 18px; }
    .auth-heading h2 { font-size: 31px; }
    .auth-methods { margin-bottom: 17px; }
    .auth-form { gap: 12px; }
    .auth-divider { margin-top: 16px; margin-bottom: 12px; }
    .auth-register { margin-top: 15px; }
}

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