/* ============================================================================
   Shared login/register visual system — split screen, same brand panel on
   the left for both pages so they read as one continuous flow.
   ========================================================================= */

body.auth-body { min-height: 100vh; display: flex; background: var(--white); }

.auth-shell { display: flex; min-height: 100vh; width: 100%; }

.auth-brand {
  flex: 0 0 44%; max-width: 560px; position: relative; overflow: hidden;
  background: radial-gradient(900px 560px at 15% -10%, var(--navy-700) 0%, var(--navy) 55%), var(--navy);
  padding: 46px 52px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse 70% 60% at 30% 20%, black, transparent);
}
.auth-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .3; animation: float 9s ease-in-out infinite; }
.auth-blob.b1 { width: 320px; height: 320px; background: var(--blue); top: -90px; right: -60px; }
.auth-blob.b2 { width: 220px; height: 220px; background: var(--purple); bottom: -50px; left: -40px; animation-delay: -3s; }
.auth-brand .brand-logo img { height: 32px; filter: brightness(0) invert(1); position: relative; z-index: 2; }
.auth-brand-copy { position: relative; z-index: 2; }
.auth-brand-copy h2 { color: #fff; font-size: 1.9rem; line-height: 1.25; margin-bottom: 16px; }
.auth-brand-copy h2 span { color: var(--blue); }
.auth-brand-copy p { color: rgba(255,255,255,.68); font-size: .95rem; max-width: 380px; }
.auth-highlights { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 16px; margin-top: 34px; }
.auth-highlights li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.82); font-size: .89rem; }
.auth-highlights svg { color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.auth-quote { position: relative; z-index: 2; border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
.auth-quote p { color: rgba(255,255,255,.75); font-size: .87rem; font-style: italic; margin-bottom: 12px; }
.auth-quote .who { display: flex; align-items: center; gap: 10px; }
.auth-quote .who b { color: #fff; font-size: .82rem; display: block; }
.auth-quote .who span { color: rgba(255,255,255,.5); font-size: .74rem; }

.auth-form-side { flex: 1; display: flex; flex-direction: column; padding: 40px 8vw; overflow-y: auto; }
.auth-form-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: auto; }
.auth-form-top .brand-logo img { height: 30px; }
.auth-form-top .back-home { font-size: .85rem; font-weight: 600; color: var(--text-soft); display: flex; align-items: center; gap: 6px; }
.auth-form-top .back-home:hover { color: var(--blue); }
.mobile-only-logo { display: none; }
@media (max-width: 980px) { .mobile-only-logo { display: flex; } }

.auth-form-wrap { max-width: 440px; width: 100%; margin: 40px auto; animation: fadeInUp .5s var(--ease-out); }
.auth-form-wrap h1 { font-size: 1.7rem; margin-bottom: 8px; }
.auth-form-wrap .sub { color: var(--text-soft); font-size: .92rem; margin-bottom: 30px; }

.auth-alt { text-align: center; font-size: .89rem; color: var(--text-soft); margin-top: 26px; }
.auth-alt a { color: var(--blue); font-weight: 700; }
.auth-alt a:hover { text-decoration: underline; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); background: none; border: none; cursor: pointer; display: flex; }
.pw-toggle:hover { color: var(--navy); }

.divider-or { display: flex; align-items: center; gap: 14px; margin: 26px 0; color: var(--text-faint); font-size: .78rem; font-weight: 600; text-transform: uppercase; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }

/* ---- Role selector (register) ---- */
.role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 28px; }
.role-tabs.role-tabs-2 { grid-template-columns: repeat(2, 1fr); }
.role-tab {
  border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px 12px; text-align: center;
  cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease);
  background: var(--white);
}
.role-tab:hover { border-color: var(--blue); transform: translateY(-2px); }
.role-tab.active { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px var(--blue-50); }
.role-tab svg { color: var(--blue-700); margin: 0 auto 8px; }
.role-tab span { display: block; font-size: .8rem; font-weight: 700; color: var(--navy); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.otp-inputs { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 22px; }
.otp-inputs input {
  width: 100%; aspect-ratio: 1; text-align: center; font-size: 1.3rem; font-weight: 700; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--navy); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.otp-inputs input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }

.pw-strength { display: flex; gap: 5px; margin-top: 8px; }
.pw-strength span { height: 4px; flex: 1; border-radius: 2px; background: var(--border-soft); transition: background .25s var(--ease); }
.pw-strength.s1 span:nth-child(1) { background: var(--red); }
.pw-strength.s2 span:nth-child(-n+2) { background: var(--amber); }
.pw-strength.s3 span:nth-child(-n+3) { background: #4C9AFF; }
.pw-strength.s4 span { background: var(--green); }

.alert { padding: 13px 16px; border-radius: 10px; font-size: .86rem; margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-start; }
.alert-err { background: var(--red-50); color: var(--red); }
.alert-ok { background: var(--green-50); color: var(--green); }
.alert svg { flex-shrink: 0; margin-top: 1px; }

@media (max-width: 980px) {
  .auth-brand { display: none; }
  .auth-form-side { padding: 30px 6vw; }
}
@media (max-width: 560px) {
  .role-tabs { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .otp-inputs { gap: 6px !important; }
  .otp-digit { width: 38px !important; height: 46px !important; font-size: 1.1rem !important; }
}
