/* BlackGPT mobile auth layout from the supplied reference, adapted to Kapponi 19X9. */
#authContainer.auth-page {
  --auth-red: #f20d25;
  --auth-red-soft: #ff6877;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 26px clamp(20px,5vw,72px) 18px;
  color: #f2f1f3;
  background: radial-gradient(ellipse at 26% 50%,rgba(242,13,37,.045),transparent 38%),radial-gradient(ellipse at 80% 20%,rgba(242,13,37,.08),transparent 45%),#09090b !important;
  font-family: Inter,"DM Sans",sans-serif;
}
#authContainer .auth-topline { position: relative; z-index: 2; width: min(100%,1010px); height: 42px; flex: 0 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 auto; }
#authContainer .auth-top-brand { display: inline-flex; align-items: center; gap: 10px; color: #f4f3f5; font-size: 15px; font-weight: 750; letter-spacing: -.45px; text-decoration: none; }
#authContainer .auth-top-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; }
#authContainer .auth-top-brand b { color: #ef6673; }
#authContainer .auth-topline-actions { display: flex; align-items: center; gap: 24px; }
#authContainer .auth-language-control { display: flex; align-items: center; gap: 7px; color: #aaa8af; }
#authContainer .auth-language-control > i:first-child { font-size: 15px; }
#authContainer .auth-language-control > i:last-child { color: #8a878f; font-size: 10px; }
#authContainer .auth-language-control select { appearance: none; padding: 5px 1px; border: 0; outline: 0; color: #e6e4e8; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
#authContainer .auth-language-control option { color: #222; }
#authContainer .auth-plans-link { color: #aaa7af; font-size: 11px; text-decoration: none; }
#authContainer .auth-plans-link:hover { color: white; }
#authContainer .auth-grid-glow { position: absolute; inset: 0; z-index: 0; opacity: .1; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(90deg,#000,transparent 78%); }
#authContainer .auth-shell { position: relative; z-index: 1; width: min(100%,1010px); flex: 1; display: grid; grid-template-columns: minmax(0,1fr) 415px; align-items: center; gap: clamp(44px,7vw,90px); margin: 16px auto 10px; }
#authContainer .auth-intro { max-width: 470px; }
#authContainer .auth-eyebrow { display: flex; align-items: center; gap: 9px; color: #b7a5a9; font-size: 10px; letter-spacing: .16em; font-weight: 700; }
#authContainer .auth-eyebrow i { width: 30px; height: 1px; background: #f20d25; }
#authContainer .auth-brand-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 27px 0 20px; overflow: hidden; background: linear-gradient(145deg,#202022,#111113); border: 1px solid #39363b; border-radius: 15px; box-shadow: 0 10px 28px rgba(0,0,0,.27),inset 0 1px rgba(255,255,255,.07); }
#authContainer .auth-brand-icon img { width: 37px; height: 37px; object-fit: contain; }
#authContainer .auth-intro h1 { margin: 0; color: #f2f1f3; font: 600 clamp(37px,5vw,59px)/1.09 Inter,sans-serif; letter-spacing: -2.8px; }
#authContainer .auth-intro h1 span { color: #a7a2a8; font-weight: 500; }
#authContainer .auth-intro > p { max-width: 490px; margin: 16px 0 0; color: #99959d; font-size: 14px; line-height: 1.75; }
#authContainer .auth-card { width: 100%; padding: 25px 25px 21px; color: #efedeb; background: linear-gradient(140deg,rgba(24,24,27,.98),rgba(16,16,18,.98)); border: 1px solid #343438; border-radius: 20px; box-shadow: 0 28px 80px rgba(0,0,0,.4),inset 0 1px rgba(255,255,255,.035); }
#authContainer .auth-card-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 19px; }
#authContainer .auth-card-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; color: #ff7380; background: rgba(242,13,37,.12); border: 1px solid rgba(242,13,37,.22); border-radius: 10px; }
#authContainer .auth-card-heading > span:last-child { display: flex; flex-direction: column; gap: 4px; }
#authContainer .auth-card-heading strong { color: #efefef; font-size: 14px; font-weight: 700; }
#authContainer .auth-card-heading small { color: #858389; font-size: 9px; }
#authContainer .auth-tabs { height: 38px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 20px; padding: 3px; background: #101012; border: 1px solid #303034; border-radius: 10px; }
#authContainer .auth-tabs button { min-width: 0; padding: 0 7px; color: #8b888e; background: transparent; border: 0; border-radius: 8px; font-size: 10px; font-weight: 600; transition: .18s ease; cursor: pointer; }
#authContainer .auth-tabs button:hover { color: #dedde0; }
#authContainer .auth-tabs button.auth-tab-active { color: #f3f1f2; background: #29272a; box-shadow: inset 0 1px rgba(255,255,255,.05); }
#authContainer .auth-form { display: none; flex-direction: column; }
#authContainer .auth-form.active { display: flex; }
#authContainer .auth-form > label,#authContainer .auth-field-label label { color: #c6c4c9; font-size: 10px; font-weight: 600; }
#authContainer .auth-field-label { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
#authContainer .auth-field-label > span { color: #747179; font-size: 8px; }
#authContainer .auth-input-wrap { height: 44px; display: flex; align-items: center; gap: 9px; margin-top: 7px; padding: 0 11px; color: #858188; background: #101012; border: 1px solid #37353a; border-radius: 999px; transition: border-color .18s ease,box-shadow .18s ease; }
#authContainer .auth-input-wrap:focus-within { border-color: rgba(242,13,37,.7); box-shadow: 0 0 0 3px rgba(242,13,37,.08); }
#authContainer .auth-input-icon { width: 15px; flex: 0 0 15px; color: #858188; text-align: center; }
#authContainer .auth-input-wrap:focus-within .auth-input-icon { color: #f16b78; }
#authContainer .auth-input-wrap input { width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; color: #f0edeb; background: transparent; border: 0; outline: none; font-size: 11px; }
#authContainer .auth-input-wrap input::placeholder { color: #69666e; }
#authContainer .auth-input-wrap input:focus-visible { outline: none; }
#authContainer .auth-reveal { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; padding: 0; color: #8a878e; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
#authContainer .auth-reveal:hover { color: white; background: #29272a; }
#authContainer .auth-forgot { margin: 6px 2px 0; text-align: right; }
#authContainer .auth-forgot a { color: #837f87; font-size: 8px; text-decoration: none; }
#authContainer .auth-forgot a:hover { color: #ff8792; }
#authContainer .auth-submit { min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0 0; padding: 0 16px; color: white; background: linear-gradient(105deg,#f20d25,#ff3042 52%,#e60020); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; box-shadow: 0 12px 26px rgba(242,13,37,.22),inset 0 1px rgba(255,255,255,.14); font-size: 11px; font-weight: 700; transition: .18s ease; cursor: pointer; }
#authContainer .auth-submit:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.09); box-shadow: 0 15px 30px rgba(242,13,37,.3); }
#authContainer .auth-submit:disabled { opacity: .7; cursor: wait; }
#authContainer .auth-submit i { font-size: 13px; }
#authContainer .auth-submit.is-loading i { animation: auth-spin 1s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
#authContainer .auth-terms { margin: 14px 7px 0; color: #77747c; font-size: 9px; line-height: 1.7; text-align: center; }
#authContainer .auth-security-note { display: flex; align-items: center; gap: 8px; margin: 17px 0 0; color: #878e8b; font-size: 8px; }
#authContainer .auth-security-note i { color: #8fb49a; font-size: 13px; }
#authContainer .auth-feedback { display: none; margin: 12px 0 0; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; font-size: 9px; line-height: 1.5; }
#authContainer .auth-feedback.is-visible { display: block; }
#authContainer .auth-feedback.error { border-color: rgba(255,88,105,.27); color: #ff9da7; background: rgba(242,13,37,.09); }
#authContainer .auth-feedback.success { border-color: rgba(111,210,153,.24); color: #9ce5b7; background: rgba(63,150,94,.09); }
#authContainer .auth-password-strength { display: flex; align-items: center; gap: 9px; margin: 8px 0 0; }
#authContainer .strength-track { width: 82px; flex: 0 0 82px; display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; }
#authContainer .strength-track span { height: 3px; border-radius: 4px; background: #38373d; }
#authContainer .auth-password-strength[data-level="1"] .strength-track span:nth-child(-n+1) { background: #f20d25; }
#authContainer .auth-password-strength[data-level="2"] .strength-track span:nth-child(-n+2) { background: #eb465a; }
#authContainer .auth-password-strength[data-level="3"] .strength-track span:nth-child(-n+3) { background: #ee7884; }
#authContainer .auth-password-strength[data-level="4"] .strength-track span { background: #8acb98; }
#authContainer .auth-password-strength small { color: #85828a; font-size: 8px; }
#authContainer .auth-register-terms { margin: 13px 0 0; }
#authContainer .auth-register-terms label { display: flex; align-items: flex-start; gap: 7px; color: #aaa7ae; font-size: 8px; line-height: 1.55; cursor: pointer; }
#authContainer .auth-register-terms input { margin: 2px 0 0; accent-color: #f20d25; }
#authContainer .auth-register-terms a { color: #ff8993; }
#authContainer .auth-phone-wrap { height: auto; min-height: 44px; display: flex; flex-direction: column; align-items: stretch; margin-top: 7px; padding: 0; border: 0; background: transparent; }
#authContainer .auth-phone-wrap:focus-within { border-color: transparent; box-shadow: none; }
#authContainer .auth-phone-wrap .country-picker { width: 100%; margin-bottom: 7px; }
#authContainer .auth-phone-wrap .country-trigger { width: 100%; min-height: 43px; padding: 0 11px; color: #d4d1d6; background: #101012; border: 1px solid #37353a; border-radius: 999px; }
#authContainer .auth-phone-wrap .country-trigger:focus,#authContainer .auth-phone-wrap .country-picker.open .country-trigger { border-color: rgba(242,13,37,.7); box-shadow: 0 0 0 3px rgba(242,13,37,.08); }
#authContainer .auth-phone-wrap > input.whatsapp-input { width: 100%; height: 44px; padding: 0 14px; color: #f0edeb; background: #101012; border: 1px solid #37353a; border-radius: 999px; font-size: 11px; }
#authContainer .auth-phone-wrap > input.whatsapp-input::placeholder { color: #69666e; }
#authContainer .auth-phone-wrap .country-dropdown { z-index: 20; border-color: #38363d; background: #171619; box-shadow: 0 18px 45px rgba(0,0,0,.5); }
#authContainer .auth-phone-wrap .country-search { background: #111012; }
#authContainer .auth-phone-wrap .country-search input { color: #eee; }
#authContainer .auth-phone-wrap .country-option { color: #ccc; }
#authContainer .auth-phone-wrap .country-option:hover,#authContainer .auth-phone-wrap .country-option.selected { background: rgba(242,13,37,.13); }
#authContainer .auth-footer { position: relative; z-index: 1; width: min(100%,1010px); display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px auto 0; color: #77747c; font-size: 9px; letter-spacing: .08em; }
#authContainer .auth-footer i { color: #f20d25; }
#authContainer .auth-footer > span:last-child { display: inline-flex; align-items: center; gap: 7px; letter-spacing: .02em; }
#authContainer .auth-footer > span:last-child i { color: #8fb49a; }
@media (max-width:760px) {
  #authContainer.auth-page { padding: 26px clamp(16px,5vw,30px) 18px; }
  #authContainer .auth-topline { height: 42px; flex-basis: 42px; }
  #authContainer .auth-topline-actions { gap: 18px; }
  #authContainer .auth-shell { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: stretch; gap: clamp(56px,12vw,94px); margin: 26px auto 12px; }
  #authContainer .auth-intro { max-width: none; }
  #authContainer .auth-brand-icon { width: 50px; height: 50px; margin: 27px 0 20px; }
  #authContainer .auth-intro h1 { font-size: clamp(38px,9vw,59px); letter-spacing: -2.5px; }
  #authContainer .auth-intro > p { font-size: 13px; line-height: 1.65; }
  #authContainer .auth-card { padding: 24px 22px 21px; border-radius: 19px; }
  #authContainer .auth-card-heading { margin-bottom: 17px; }
  #authContainer .auth-tabs { margin-bottom: 19px; }
  #authContainer .auth-input-wrap { height: 46px; }
  #authContainer .auth-input-wrap input { font-size: 12px; }
  #authContainer .auth-submit { min-height: 48px; margin-top: 18px; font-size: 12px; }
  #authContainer .auth-terms { margin-top: 16px; font-size: 9px; }
  #authContainer .auth-security-note { margin-top: 17px; font-size: 9px; }
  #authContainer .auth-footer { margin-top: 19px; font-size: 8px; }
}
@media (max-width:420px) {
  #authContainer.auth-page { padding-right: 16px; padding-left: 16px; }
  #authContainer .auth-card { padding: 22px 18px 19px; }
  #authContainer .auth-intro h1 { font-size: clamp(36px,9vw,45px); }
  #authContainer .auth-top-brand { font-size: 13px; }
  #authContainer .auth-top-brand img { width: 32px; height: 32px; }
  #authContainer .auth-topline-actions { gap: 13px; }
  #authContainer .auth-plans-link { font-size: 10px; }
  #authContainer .auth-footer { font-size: 7px; }
}
@media (prefers-reduced-motion:reduce) {
  #authContainer.auth-page *,#authContainer.auth-page *::before,#authContainer.auth-page *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* Override legacy auth layout rules from redesign-overrides.css only on this login. */
@media (max-width:1100px) {
  #authContainer.auth-page {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: max(22px,env(safe-area-inset-top)) clamp(16px,5vw,42px) max(20px,env(safe-area-inset-bottom)) !important;
  }
  #authContainer.auth-page .auth-topline {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 42px !important;
    margin: 0 auto !important;
  }
  #authContainer.auth-page .auth-shell {
    position: relative !important;
    inset: auto !important;
    width: min(100%,560px) !important;
    min-height: 0 !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: clamp(34px,7vw,62px) !important;
    margin: 24px auto 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  #authContainer.auth-page .auth-intro { max-width: none !important; }
  #authContainer.auth-page .auth-footer { margin: 24px auto 0 !important; }
}
@media (max-width:760px) {
  #authContainer.auth-page { padding-right: 16px !important; padding-left: 16px !important; }
  #authContainer.auth-page .auth-shell { gap: 48px !important; margin-top: 22px !important; }
}

/* Keep the login as the only visible, scrollable surface until Firebase opens the store. */
body:has(#authContainer:not([style*="display: none"])) {
  height: 100dvh !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
}
body:has(#authContainer:not([style*="display: none"])) #mainApp,
body:has(#authContainer:not([style*="display: none"])) .assistant-widget,
body:has(#authContainer:not([style*="display: none"])) #installBanner,
body:has(#authContainer:not([style*="display: none"])) #iosInstallOverlay { display: none !important; }
#authContainer.auth-page {
  height: 100dvh !important;
  min-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
/* Explicitly override the legacy nocturne burgundy accents. */
#authContainer .auth-tab.active,
#authContainer .auth-tab.auth-tab-active {
  color: #fff !important;
  background: linear-gradient(135deg,#f20d25,#ff3042) !important;
  border-color: #ff3042 !important;
  box-shadow: 0 8px 20px rgba(242,13,37,.24) !important;
}
#authContainer #loginButton,
#authContainer #registerButton {
  color: #fff !important;
  background: linear-gradient(105deg,#f20d25,#ff3042 52%,#e60020) !important;
  border-color: #ff3042 !important;
  box-shadow: 0 12px 28px rgba(242,13,37,.28) !important;
}
