.auth-page {
  margin: 0; min-height: 100vh; min-height: 100svh; padding: 48px 24px;
  display: flex; align-items: center; justify-content: center;
  background: #f5f7f7; color: #193c51; font-family: 'Plus Jakarta Sans', sans-serif;
}
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-story, .auth-form-panel, .auth-brand > div { min-width: 0; }
.auth-brand-name, .auth-intro, .auth-access-note { overflow-wrap: break-word; }
.auth-page #auth-placeholder { width: 100%; max-width: 1028px; }
.auth-card { display: grid; grid-template-columns: 51% 49%; min-height: 680px; overflow: hidden;
  background: #fff; border: 1px solid #dde7eb; border-radius: 24px; box-shadow: 0 14px 36px #18394d0a; }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 48px 52px 40px; background: linear-gradient(145deg, #f6f9f9, #edf4f5); border-right: 1px solid #e2ecef; }
.auth-story::before, .auth-story::after { content: ''; position: absolute; width: 510px; height: 510px;
  border: 1px solid #dce9ed; border-radius: 50%; left: 66%; top: 112px; pointer-events: none; }
.auth-story::after { width: 370px; height: 370px; left: 80%; top: 182px; }
.auth-brand, .auth-story-copy, .auth-story-footer { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-logo { width: 48px; height: 48px; flex: none; border-radius: 13px; }
.auth-brand-name { display: block; font-size: 23px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.3; text-transform: uppercase; }
.auth-brand-caption { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: #658398; margin-top: 3px; }
.auth-story-copy { margin: auto 0; padding: 74px 0 68px; }
.auth-eyebrow { margin: 0; color: #287b9c; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; line-height: 1.6; }
.auth-story h2 { margin: 21px 0; font-family: 'DM Serif Display', Georgia, serif; font-size: 42px; font-weight: 400; line-height: 1.14; letter-spacing: -1.6px; }
.auth-rule { display: block; width: 42px; height: 2px; margin: 23px 0; background: #719cac; }
.auth-story-description { max-width: 355px; margin: 0; color: #6e8797; font-size: 15px; line-height: 1.9; }
.auth-story-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 24px; border-top: 1px solid #d6e4e9; color: #7f96a6; font-size: 11px; }
.auth-install { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0;
  color: #1d678a; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.auth-install svg { width: 15px; height: 15px; }
.auth-form-panel { padding: 70px 54px 42px; display: flex; flex-direction: column; justify-content: center; }
.auth-form-panel h1 { margin: 14px 0 10px; font-size: 30px; font-weight: 700; letter-spacing: -1.4px; line-height: 1.3; color: #183b50; }
.auth-intro { margin: 0 0 35px; font-size: 14px; line-height: 1.8; color: #7a8e9e; }
.auth-field { margin-bottom: 23px; }
.auth-field label { display: block; margin-bottom: 9px; color: #344f60; font-size: 12px; font-weight: 700; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > svg { position: absolute; top: 18px; left: 16px; width: 18px; height: 18px; color: #94a7b4; pointer-events: none; }
.auth-input-wrap input { width: 100%; height: 55px; padding: 0 46px; border: 1px solid #d6e1e8;
  border-radius: 10px; background: #fff; color: #193c51; font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; box-shadow: 0 2px 4px #193c5103; }
.auth-input-wrap input::placeholder { color: #a1afbc; opacity: 1; }
.auth-input-wrap input:focus { border-color: #45809b; box-shadow: 0 0 0 2px #fff, 0 0 0 5px #a5c6d3; }
.auth-input-wrap:focus-within > svg { color: #216584; }
.auth-password-toggle { position: absolute; right: 0; top: 0; height: 55px; width: 46px; display: flex;
  align-items: center; justify-content: center; color: #94a7b4; background: none; border: 0; cursor: pointer; }
.auth-password-toggle svg { width: 19px; height: 19px; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 24px; font-size: 12px; }
.auth-remember { display: flex; align-items: center; gap: 9px; color: #6d8598; cursor: pointer; }
.auth-page .auth-remember input { width: 16px; height: 16px; min-width: 16px; min-height: 16px; accent-color: #245b73; }
.auth-forgot { padding: 0; border: 0; color: #12618a; background: none; font: inherit; font-weight: 700; cursor: pointer; }
.auth-verification { margin: 0 0 22px; min-height: 65px; }
.auth-verification-status { margin: 8px 0 0; color: #7e919e; font-size: 10px; line-height: 1.6; }
.auth-verification-invisible { min-height: 0; }
.auth-verification-invisible .auth-verification-status { margin-top: 0; }
.auth-verification-compact { display: flex; justify-content: center; }
.auth-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 55px;
  padding: 15px 20px; border: 0; border-radius: 10px; color: white; background: #1a3e53;
  font: inherit; font-size: 13px; font-weight: 700; box-shadow: 0 8px 18px #173b5110; cursor: pointer; transition: background .15s; }
.auth-submit:hover { background: #24556e; }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }
.auth-submit svg { width: 17px; height: 17px; }
.auth-access-note { margin: 28px 0 0; padding-top: 23px; border-top: 1px solid #e4ebef; color: #899ba8; font-size: 11px; line-height: 1.8; }
.auth-page button:focus-visible, .auth-page a:focus-visible { outline: 3px solid #8bb8ca; outline-offset: 4px; }
.auth-page .hidden { display: none !important; }
@media (max-width: 900px) {
  .auth-story { padding: 40px 30px 32px; }
  .auth-form-panel { padding: 48px 32px 38px; }
  .auth-story h2 { font-size: 36px; }
}
@media (max-width: 800px), (max-width: 1000px) and (max-height: 500px) {
  .auth-page { flex-direction: column; justify-content: flex-start; padding: 16px 12px; }
  .auth-page { padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .auth-page #auth-placeholder { max-width: 480px; }
  .auth-card { grid-template-columns: 1fr; min-height: 0; border-radius: 18px; }
  .auth-story { flex-direction: row; align-items: center; justify-content: space-between; padding: 18px 22px; border-right: 0; border-bottom: 1px solid #e2ecef; }
  .auth-story::before, .auth-story::after { display: none; }
  .auth-brand { gap: 10px; }
  .auth-logo { width: 40px; height: 40px; border-radius: 11px; }
  .auth-brand-name { font-size: 19px; letter-spacing: 1px; }
  .auth-brand-caption { font-size: 8px; letter-spacing: 1px; }
  .auth-story-copy, .auth-story-footer .auth-copyright { display: none; }
  .auth-story-footer { flex: none; border: 0; padding: 0; margin-left: 8px; }
  .auth-install { min-height: 44px; }
  .auth-install svg { width: 17px; height: 17px; }
  .auth-form-panel { padding: 22px; }
  .auth-form-panel > .auth-eyebrow { display: none; }
  .auth-form-panel h1 { margin: 0 0 10px; font-size: 28px; letter-spacing: -1px; }
  .auth-intro { font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
  .auth-field { margin-bottom: 16px; }
  .auth-field label { margin-bottom: 8px; }
  .auth-page .auth-input-wrap input { height: 52px; font-size: 16px; }
  .auth-input-wrap > svg { top: 17px; }
  .auth-password-toggle { height: 52px; }
  .auth-options { flex-wrap: wrap; font-size: 11px; gap: 0 10px; margin: 0 0 12px; }
  .auth-remember, .auth-forgot { min-height: 44px; }
  .auth-verification { margin-bottom: 16px; }
  .auth-submit { min-height: 52px; font-size: 13px; }
  .auth-access-note { margin-top: 20px; padding-top: 16px; }
  .auth-page #ai-bot-placeholder { width: 100%; max-width: 480px; margin-top: 14px; }
  .auth-page #aiBotContainer { position: static; align-items: center; }
  .auth-page #aiChatBox { width: 100%; max-width: 420px; height: 440px; max-height: 70vh; max-height: 70svh; }
  .auth-page #aiGirlPopupWrap { right: 12px; max-width: calc(100vw - 24px); }
}
@media (max-width: 360px) {
  .auth-story { padding: 14px 18px; }
  .auth-form-panel { padding: 20px 18px; }
  .auth-install-label { display: none; }
  .auth-install { justify-content: center; width: 44px; }
  .auth-brand-name { font-size: 18px; }
}
@media (max-width: 340px) {
  .auth-page { padding-left: 8px; padding-right: 8px; }
  .auth-story { padding-left: 14px; padding-right: 14px; }
  .auth-form-panel { padding-left: 14px; padding-right: 14px; }
  .auth-options { font-size: 10px; }
  .auth-input-wrap input { padding-left: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page input, .auth-page button { transition: none; }
}

/* Keep existing hosted login templates compatible with the compiled styles. */
.auth-page .auth-legacy-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); width: 100%; max-width: 1028px; margin: auto; min-height: 620px; border: 1px solid #e1e8ee; border-radius: 24px; overflow: hidden; background: white; box-shadow: 0 24px 70px #152c4520; }
.auth-page .auth-legacy-card > .auth-legacy-form { width: 100%; min-width: 0; padding: 48px; display: flex; flex-direction: column; justify-content: center; background: white !important; background-image: none !important; color: #233c50; }
.auth-legacy-form > div:first-child > div:first-child { margin-bottom: 28px; }
.auth-legacy-form h1 { font-size: 30px; line-height: 1.2; letter-spacing: -1px; color: #1c3449; text-transform: none; }
.auth-legacy-form p { font-family: inherit; font-size: 13px; line-height: 1.8; }
.auth-legacy-card .font-mono { font-family: inherit; }
.auth-legacy-form #cfCheckIcon { background: #159263; color: white; }
.auth-legacy-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #344f60; }
.auth-legacy-form #loginForm { display: flex; flex-direction: column; gap: 18px; }
.auth-legacy-form #loginForm > * { margin-top: 0; }
.auth-legacy-form #email, .auth-legacy-form #password { width: 100%; height: 52px; border: 1px solid #d8e2e9; border-radius: 11px; padding: 0 14px; color: #1c3449; background: #fff; font: inherit; font-size: 14px; outline: none; }
.auth-legacy-form #password { padding-right: 48px; }
.auth-legacy-form #email:focus, .auth-legacy-form #password:focus { border-color: #527d9c; box-shadow: 0 0 0 3px #527d9c20; }
.auth-legacy-form #togglePasswordBtn { top: 24px; height: 52px; }
.auth-legacy-form #loginForm button[type="submit"] { display: block; width: 100%; min-height: 52px; padding: 14px 18px; border: 0; border-radius: 11px; background: #24465d; color: white; font: inherit; font-size: 14px; font-weight: 700; box-shadow: 0 8px 18px #173b511a; cursor: pointer; }
.auth-legacy-form #loginForm button[type="submit"]:hover { background: #18374d; }
.auth-legacy-form #cfTurnstileContainer { margin: 0; min-height: 64px; padding: 12px 14px; border: 1px solid #e2e8ee; border-radius: 11px; background: #f8fafc; }
.auth-legacy-form > div:last-child { margin-top: 24px; font-family: inherit; font-size: 10px; line-height: 1.8; color: #7b8e9c; }
.auth-page .auth-legacy-card > .auth-legacy-art { display: flex !important; position: relative; align-items: center; justify-content: center; width: 100%; min-width: 0; padding: 42px; overflow: hidden; background: linear-gradient(145deg,#e7edff 0%,#e4f0f5 55%,#f6ece5 100%); }
.auth-legacy-art > div.absolute { display: none; }
.auth-legacy-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.auth-legacy-art > div:last-child { position: relative; max-width: 280px; padding: 32px 24px; border-radius: 22px; background: #ffffffc9; border: 1px solid #ffffffc9; box-shadow: 0 20px 50px #3f568b15; text-align: center; }
.auth-legacy-art > div:last-child > div { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 15px; background: #dce5fb; color: #425f96; }
.auth-legacy-art h3 { margin: 0 0 10px; font-size: 21px; font-weight: 700; color: #263f55; }
.auth-legacy-art p { font: inherit; font-size: 13px; line-height: 1.8; color: #667c91; }
.auth-assistant-launch { position: fixed; right: 22px; bottom: 22px; z-index: 50; min-height: 44px; border: 1px solid #d6e1e8; border-radius: 24px; padding: 10px 18px; background: white; color: #24465d; font: inherit; font-size: 12px; font-weight: 700; box-shadow: 0 6px 22px #1c34491a; cursor: pointer; }
.auth-load-error { max-width: 480px; margin: auto; padding: 32px; border-radius: 20px; background: white; }
@media (max-width: 800px) {
  .auth-page .auth-legacy-card { grid-template-columns: minmax(0,1fr); min-height: 0; }
  .auth-page .auth-legacy-card > .auth-legacy-form { padding: 30px 24px; }
  .auth-page .auth-legacy-card > .auth-legacy-art { display: none !important; }
  .auth-legacy-form #email, .auth-legacy-form #password { font-size: 16px; }
}
