/* TrustNeo Phase 165 — Premium Auth Experience V3
   Compact fintech login + preserved role-specific 3-step registration wizard. */
:root{--tn165-blue:#3157e8;--tn165-blue-strong:#2448cd;--tn165-blue-soft:#f1f5ff;--tn165-canvas:#f5f7fa;--tn165-surface:#fff;--tn165-line:#e4e8ef;--tn165-line-strong:#d4dae4;--tn165-ink:#18202f;--tn165-muted:#6f7a8c;--tn165-soft:#fafbfc;--tn165-radius:16px;--tn165-shadow:0 18px 50px rgba(24,32,47,.065)}
body.tn113-auth-page{background:var(--tn165-canvas)!important;color:var(--tn165-ink)!important}
body.tn113-auth-page .tn141-auth-top{height:64px!important;padding:0 clamp(18px,3.4vw,46px)!important;background:rgba(245,247,250,.97)!important;border-bottom:1px solid var(--tn165-line)!important;backdrop-filter:blur(10px)}
body.tn113-auth-page .tn113-auth-brand>i{width:34px!important;height:34px!important;border-radius:10px!important;background:var(--tn165-blue)!important;box-shadow:none!important}
body.tn113-auth-page .tn113-auth-brand strong{font-size:15px!important;letter-spacing:-.02em}
body.tn113-auth-page .tn113-auth-brand small{font-size:9px!important;color:#8a94a4!important}
body.tn113-auth-page .tn113-back-home{font-size:11px!important;color:#687487!important;font-weight:700!important}
body.tn113-auth-page .tn141-auth-main{min-height:calc(100vh - 112px)!important;display:grid!important;align-items:center!important}

/* Shared shell */
.tn165-auth-shell{width:min(1080px,calc(100% - 40px))!important;min-height:0!important;margin:24px auto!important;border:1px solid var(--tn165-line)!important;border-radius:var(--tn165-radius)!important;background:var(--tn165-surface)!important;box-shadow:var(--tn165-shadow)!important;overflow:hidden!important;padding:0!important}
.tn165-auth-panel{background:#fff!important;align-items:center!important}
.tn165-card-head{margin-bottom:18px!important}
.tn165-card-head .tn113-kicker{color:var(--tn165-blue)!important;font-size:9px!important;letter-spacing:.08em!important;text-transform:uppercase!important}
.tn165-card-head h2{margin:5px 0 5px!important;color:var(--tn165-ink)!important;font-size:30px!important;line-height:1.08!important;letter-spacing:-.04em!important}
.tn165-card-head p{color:var(--tn165-muted)!important;font-size:11.5px!important;line-height:1.45!important}
.tn165-form{gap:13px!important}
.tn165-form label,.tn165-register-form label{color:#374256!important;font-size:11.5px!important;font-weight:750!important;gap:5px!important}
.tn165-form input:not([type=checkbox]):not([type=radio]),.tn165-register-form input:not([type=checkbox]):not([type=radio]){min-height:44px!important;height:44px!important;border:1px solid var(--tn165-line-strong)!important;border-radius:11px!important;background:#fff!important;padding:0 12px!important;color:var(--tn165-ink)!important;font-size:12.5px!important;box-shadow:none!important}
.tn165-form input:hover,.tn165-register-form input:hover{border-color:#c1c9d6!important}
.tn165-form input:focus,.tn165-register-form input:focus{border-color:#8298ef!important;box-shadow:0 0 0 3px rgba(49,87,232,.1)!important;outline:0!important}
.tn165-form input::placeholder,.tn165-register-form input::placeholder{color:#a1a9b5!important}
.tn165-primary{min-height:46px!important;height:46px!important;border-radius:11px!important;background:var(--tn165-blue)!important;box-shadow:none!important;font-size:12px!important;font-weight:800!important}
.tn165-primary:hover{background:var(--tn165-blue-strong)!important;box-shadow:none!important;transform:none!important}
.tn165-secondary{min-height:44px!important;height:44px!important;border:1px solid var(--tn165-line-strong)!important;border-radius:11px!important;background:#fff!important;color:#586579!important;font-size:11.5px!important;font-weight:750!important;box-shadow:none!important}
.tn165-secondary:hover{background:#fafbfd!important;border-color:#c7ced9!important}
.tn165-auth-switch{margin-top:14px!important;font-size:11px!important;color:#7c8797!important}
.tn165-auth-switch a{color:var(--tn165-blue)!important;font-weight:800!important}

/* Login: 40 / 60 split, compact form side dominant */
.tn165-login-shell{grid-template-columns:minmax(300px,40%) minmax(460px,60%)!important;min-height:520px!important}
.tn165-login-story{min-height:520px!important;padding:38px 36px!important;background:#f1f4f8!important;border-right:1px solid var(--tn165-line)!important;justify-content:flex-start!important;color:var(--tn165-ink)!important}
.tn165-login-story:after{display:none!important}
.tn165-story-wrap{max-width:350px;display:flex;flex-direction:column;height:100%}
.tn165-story-brand{display:flex;align-items:center;gap:9px;color:#1c2738}
.tn165-story-brand>i{display:grid;place-items:center;width:31px;height:31px;border-radius:9px;background:var(--tn165-blue);color:#fff;font-size:13px;font-style:normal;font-weight:900}
.tn165-story-brand>strong{font-size:14px;letter-spacing:-.02em}
.tn165-story-kicker{display:block;margin-top:46px;color:var(--tn165-blue);font-size:9px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.tn165-login-story h1{margin:10px 0 11px!important;color:#192333!important;font-size:clamp(31px,3.4vw,42px)!important;line-height:1.02!important;letter-spacing:-.045em!important;font-weight:760!important}
.tn165-login-story p{margin:0!important;max-width:330px;color:#6c788a!important;font-size:12.5px!important;line-height:1.55!important}
.tn165-trust-points{display:grid;gap:0;margin-top:30px;border-top:1px solid #dfe4eb}
.tn165-trust-points>div{display:grid;grid-template-columns:25px 1fr;gap:9px;padding:11px 0;border-bottom:1px solid #dfe4eb}
.tn165-trust-points>div>i{display:grid;place-items:center;width:23px;height:23px;border-radius:7px;background:#fff;color:var(--tn165-blue);font-size:9px;font-style:normal;font-weight:900;border:1px solid #dfe5ed}
.tn165-trust-points span{display:grid;gap:2px}.tn165-trust-points strong{color:#303b4d;font-size:10.5px}.tn165-trust-points small{color:#818c9c;font-size:9px;line-height:1.35}
.tn165-login-shell .tn165-auth-panel{padding:34px 52px!important}
.tn165-login-card{width:100%;max-width:445px!important;margin:0 auto!important}
.tn165-login-card .tn162-label-row a{font-size:10px!important}
.tn165-login-card .tn162-password-toggle,.tn165-register-card .tn162-password-toggle{right:5px!important;height:32px!important;min-height:32px!important;font-size:10px!important}
.tn165-remember{margin-top:-1px!important;font-size:10.5px!important;font-weight:650!important;color:#6e798a!important}
.tn165-remember input{width:15px!important;height:15px!important;accent-color:var(--tn165-blue)!important}
.tn165-divider{margin:14px 0!important}.tn165-divider span{font-size:9px!important;color:#9ba4b0!important}
.tn165-passkey{min-height:44px!important;height:44px!important;border-radius:11px!important;border:1px solid var(--tn165-line-strong)!important;background:#fff!important;color:#3e4a5e!important;font-size:11px!important;font-weight:750!important}

/* Register architecture: compact onboarding rail + wider wizard */
.tn165-register-shell{grid-template-columns:minmax(270px,300px) minmax(600px,1fr)!important;max-width:1100px!important;min-height:570px!important;align-items:stretch!important}
.tn165-register-story{min-height:570px!important;padding:34px 30px!important;background:#f1f4f8!important;border-right:1px solid var(--tn165-line)!important;color:var(--tn165-ink)!important;justify-content:flex-start!important}
.tn165-register-story:after{display:none!important}
.tn165-register-story-inner{display:flex;flex-direction:column;max-width:250px;height:100%}
.tn165-register-story .tn165-story-kicker{margin-top:48px}
.tn165-register-story h1{margin:9px 0 10px!important;color:#1b2535!important;font-size:28px!important;line-height:1.06!important;letter-spacing:-.04em!important;font-weight:760!important}
.tn165-register-story p{margin:0!important;color:#707b8d!important;font-size:11px!important;line-height:1.5!important}
.tn165-side-note{display:grid;grid-template-columns:24px 1fr;gap:8px;margin-top:auto;padding-top:22px;border-top:1px solid #dfe4eb}
.tn165-side-note>i{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#fff;border:1px solid #dce2ea;color:var(--tn165-blue);font-size:9px;font-style:normal;font-weight:900}.tn165-side-note span{display:grid;gap:2px}.tn165-side-note strong{color:#364154;font-size:10px}.tn165-side-note small{color:#8892a1;font-size:8.8px;line-height:1.35}
.tn165-register-panel{padding:24px 32px!important;align-items:center!important}
.tn165-register-card{width:100%;max-width:680px!important;margin:0 auto!important}
.tn165-register-card .tn165-card-head{margin-bottom:12px!important}.tn165-register-card .tn165-card-head h2{font-size:27px!important}.tn165-register-card .tn165-card-head p{font-size:10.5px!important}

/* Compact progress; no bulky progress container */
.tn165-steps{display:grid!important;grid-template-columns:auto 1fr auto 1fr auto!important;gap:8px!important;align-items:center!important;margin:0 0 14px!important;padding:0 0 12px!important;border:0!important;border-bottom:1px solid #e8ebf0!important;border-radius:0!important;background:transparent!important}
.tn165-steps>span{display:flex!important;align-items:center!important;gap:6px!important;color:#939cab!important;font-size:9.5px!important;font-weight:800!important;white-space:nowrap!important}
.tn165-steps>span b{display:grid!important;place-items:center!important;width:21px!important;height:21px!important;border:1px solid #dfe4eb!important;border-radius:50%!important;background:#fff!important;color:#8d97a6!important;font-size:8.5px!important}
.tn165-steps>span.active{color:#3d485a!important}.tn165-steps>span.active b{border-color:#adc0ff!important;background:#f2f5ff!important;color:var(--tn165-blue)!important}
.tn165-steps>span[aria-current="step"] b{border-color:var(--tn165-blue)!important;background:var(--tn165-blue)!important;color:#fff!important;box-shadow:none!important}
.tn165-steps>i{height:1px!important;background:#e5e9ef!important}
.tn165-register-form{gap:0!important}.tn165-register-step{display:grid;gap:11px!important}.tn165-register-step[hidden]{display:none!important}
.tn165-step-title{font-size:13px!important;color:#293449!important}.tn165-step-copy{font-size:9.5px!important;color:#828d9d!important;margin:-4px 0 3px!important}

/* Role cards */
.tn165-role-grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
.tn165-role-card{grid-template-columns:34px 1fr 18px!important;align-items:start!important;min-height:148px!important;padding:13px!important;border:1px solid #e1e6ed!important;border-radius:13px!important;background:#fff!important;box-shadow:none!important;gap:10px!important}
.tn165-role-card:hover{border-color:#bcc9f6!important;background:#fcfdff!important}.tn165-role-card:has(input:checked){border-color:#89a0ef!important;background:#f7f9ff!important;box-shadow:0 0 0 2px rgba(49,87,232,.055)!important}
.tn165-role-card .tn162-role-icon{width:32px!important;height:32px!important;border-radius:9px!important;background:#eef3ff!important;color:var(--tn165-blue)!important}
.tn165-role-copy{display:grid;gap:3px;min-width:0}.tn165-role-copy strong{font-size:11.5px!important;color:#293449}.tn165-role-copy>small{font-size:9.5px!important;line-height:1.35!important;color:#7c8798!important}.tn165-role-copy ul{display:grid;gap:4px;margin:6px 0 0;padding:0;list-style:none}.tn165-role-copy li{position:relative;padding-left:12px;color:#626f82;font-size:8.8px;line-height:1.3}.tn165-role-copy li:before{content:"✓";position:absolute;left:0;color:#6680e9;font-size:8px;font-weight:900}

/* Step 2 compact grouped form */
.tn165-step-heading{padding-bottom:8px!important;border-bottom:1px solid #edf0f4!important}.tn165-step-heading strong{font-size:11.5px!important}.tn165-step-heading span{font-size:9px!important}.tn165-step-heading>small{font-size:8px!important}
.tn165-form-group{display:grid;gap:8px;padding:10px 11px;border:1px solid #e6eaf0;border-radius:12px;background:#fff}.tn165-group-head{display:flex;align-items:center;justify-content:space-between}.tn165-group-head strong{font-size:10.5px;color:#334055}
.tn165-field-grid,.tn165-profile-grid,.tn165-password-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.tn165-profile-grid .tn165-full{grid-column:1/-1!important}
.tn165-register-form input:not([type=checkbox]):not([type=radio]){min-height:42px!important;height:42px!important;border-radius:10px!important;font-size:11.5px!important}
.tn165-password-rules{gap:4px!important;margin-top:1px!important}.tn165-password-rules span{padding:3px 6px!important;border-radius:999px!important;font-size:7.8px!important}.tn165-register-card .tn113-password-meter{display:none!important}.tn165-register-card .tn113-match-note{min-height:10px!important;font-size:8px!important}
.tn165-role-details{gap:8px!important;padding:10px 11px!important;border-radius:12px!important;background:#fbfcfe!important}.tn165-role-details-head{padding-bottom:7px!important}.tn165-role-details-head small{font-size:8.5px!important}.tn165-role-details .tn164-role-badge{min-height:22px!important;padding:3px 7px!important;font-size:8px!important;background:#eef3ff!important;color:#355eb4!important}
.tn165-chip-field{position:relative;display:grid;gap:6px}.tn165-field-label{color:#374256;font-size:10.5px;font-weight:800}.tn165-chip-group{display:flex;flex-wrap:wrap;gap:6px;padding:1px}.tn165-chip-group button{min-height:30px;padding:5px 9px;border:1px solid #dfe4eb;border-radius:999px;background:#fff;color:#657185;font:inherit;font-size:9px;font-weight:750;cursor:pointer;transition:border-color .12s ease,background .12s ease,color .12s ease}.tn165-chip-group button:hover{border-color:#bfcaf2;background:#fafbff}.tn165-chip-group button.active,.tn165-chip-group button[aria-pressed="true"]{border-color:#9aaff4;background:#eef3ff;color:#3157e8}.tn165-chip-group[aria-invalid="true"]{padding:5px;border:1px solid #e9a4a0;border-radius:10px;background:#fff9f8}.tn165-chip-field:has(.tn165-chip-group[aria-invalid="true"]):after{content:"Select at least one option.";color:#b5473f;font-size:8.5px;font-weight:650}
.tn165-register-actions{grid-template-columns:108px 1fr!important;gap:8px!important;margin-top:1px!important}

/* Review as two compact information blocks */
.tn165-review{display:grid;grid-template-columns:1fr 1fr;gap:9px}.tn165-review-block{min-width:0;padding:10px 11px;border:1px solid #e5e9ef;border-radius:11px;background:#fbfcfe}.tn165-review-block[hidden]{display:none!important}.tn165-review-block header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:7px;margin-bottom:4px;border-bottom:1px solid #eaedf2}.tn165-review-block header strong{color:#344054;font-size:10px}.tn165-review-block header button{border:0;background:transparent;color:var(--tn165-blue);font-size:8.5px;font-weight:800;cursor:pointer;padding:2px}.tn165-review-block>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:8px;padding:4px 0}.tn165-review-block span{color:#8a94a4;font-size:8.5px}.tn165-review-block b{min-width:0;color:#465267;font-size:9px;line-height:1.35;font-weight:750;overflow-wrap:anywhere}.tn165-terms{padding:8px 10px!important;border-radius:10px!important}.tn165-terms input{width:15px!important;height:15px!important}.tn165-terms span{font-size:9px!important;line-height:1.4!important}.tn165-form-note{font-size:8px!important}

/* Compact error states */
body.tn113-auth-page .tn113-flash{top:70px!important;width:min(430px,calc(100% - 28px))!important;padding:9px 11px!important;border-radius:10px!important;font-size:10px!important;box-shadow:0 12px 28px rgba(16,24,40,.07)!important}
.tn165-form input:user-invalid,.tn165-register-form input:user-invalid{border-color:#d78782!important}.tn165-form input:user-invalid:focus,.tn165-register-form input:user-invalid:focus{box-shadow:0 0 0 3px rgba(181,71,63,.08)!important}
body.tn113-auth-page .tn80-required,body.tn113-auth-page .tn80-char-count,body.tn113-auth-page .required-marker,body.tn113-auth-page [data-required-marker]{display:none!important}
body.tn113-auth-page .tn141-auth-footer{min-height:48px!important;background:var(--tn165-canvas)!important;border-top:1px solid var(--tn165-line)!important}.tn113-auth-footer{font-size:9.5px!important}

@media(max-width:920px){
 .tn165-auth-shell,.tn165-register-shell{grid-template-columns:1fr!important;width:min(700px,calc(100% - 30px))!important;margin:18px auto!important;min-height:0!important}
 .tn165-login-story,.tn165-register-story{display:none!important}
 .tn165-login-shell .tn165-auth-panel,.tn165-register-panel{padding:30px!important}
 .tn165-login-card,.tn165-register-card{max-width:none!important}
}
@media(max-width:620px){
 body.tn113-auth-page{background:#fff!important}.tn141-auth-main{display:block!important;min-height:calc(100vh - 108px)!important}
 .tn165-auth-shell,.tn165-register-shell{width:100%!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important}
 .tn165-login-shell .tn165-auth-panel,.tn165-register-panel{padding:24px 16px 30px!important;align-items:flex-start!important}
 .tn165-card-head h2,.tn165-register-card .tn165-card-head h2{font-size:26px!important}
 .tn165-role-grid,.tn165-field-grid,.tn165-profile-grid,.tn165-password-grid,.tn165-review{grid-template-columns:1fr!important}
 .tn165-role-card{min-height:130px!important}.tn165-profile-grid .tn165-full{grid-column:auto!important}
 .tn165-steps{padding-bottom:10px!important;margin-bottom:12px!important}.tn165-steps>span em{font-size:8.5px!important}
 .tn165-review-block>div{grid-template-columns:82px minmax(0,1fr)}
 .tn165-register-actions{grid-template-columns:92px 1fr!important}
 body.tn113-auth-page .tn141-auth-top{height:60px!important;padding:0 15px!important;background:#fff!important}
 body.tn113-auth-page .tn141-auth-footer{background:#fff!important}.tn113-auth-footer{padding:12px 16px!important}
}
@media(max-width:390px){.tn165-steps>span em{display:none!important}.tn165-login-shell .tn165-auth-panel,.tn165-register-panel{padding-inline:14px!important}.tn165-register-actions{grid-template-columns:84px 1fr!important}.tn165-chip-group{gap:5px}.tn165-chip-group button{padding-inline:8px}.tn165-review-block>div{grid-template-columns:76px minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.tn165-chip-group button{transition:none!important}}
