/* page-login
 * Auth screen shared by #page-login and #page-register (register.css only adds its field grid + checkbox).
 * Values measured from ceoacc ceo-glass-auth.css (R28 + R39 compact rules) and the page's inline auth styles.
 */

/* The auth screen covers the app shell like ceoacc's standalone login page; keep the document itself still.
 * ceoacc's body.bg-image drops its photo and keeps a flat #eef3ff (#10172b dark) behind the auth section. */
body:has(#page-login.active, #page-register.active, #page-forgot-password.active) { overflow: hidden; background: #eef3ff; }
html.cg-dark body:has(#page-login.active, #page-register.active, #page-forgot-password.active) { background: #10172b; }

:is(#page-login, #page-register, #page-forgot-password) .auth-page {
  --auth-surface: #ffffff;
  --auth-soft: #f3f6fd;
  --auth-text: #17233d;
  --auth-muted: #68768f;
  --auth-line: #dce4f1;
  --auth-blue: #356ef4;
  --auth-primary: #2465bd;
  --auth-primary-hover: #1d579f;
  --auth-check-line: #adb5bd;
  --auth-check-bg: #f9fbfe;
  --auth-shadow: 0 24px 72px -32px rgba(49, 64, 121, .32);
  --auth-background: radial-gradient(ellipse at 8% 8%, rgba(126, 111, 252, .2), transparent 55%), radial-gradient(ellipse at 95% 80%, rgba(59, 193, 226, .2), transparent 54%), linear-gradient(140deg, #eef3ff, #f3f0ff 48%, #e9f9fd);
  --auth-pill-bg: #ffffff;
  --auth-pill-text: #1e293b;
  --auth-pill-line: #94a3b8;
  position: fixed;
  inset: 0;
  z-index: 1000; /* covers the floating chat/back-to-top buttons (999); modals share 1000 but come later in the DOM, so they still paint on top */
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(16px, env(safe-area-inset-top, 0px)) 0 max(16px, env(safe-area-inset-bottom, 0px));
  color: var(--auth-text);
  background: var(--auth-background);
  background-attachment: local;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
}
html.cg-dark :is(#page-login, #page-register, #page-forgot-password) .auth-page {
  --auth-surface: #111c30;
  --auth-soft: #19263c;
  --auth-text: #eef3ff;
  --auth-muted: #a5b4cd;
  --auth-line: #30405b;
  --auth-blue: #83aaff;
  --auth-check-line: #52627d;
  --auth-check-bg: #19263c;
  --auth-shadow: 0 28px 80px -28px rgba(0, 0, 0, .62);
  --auth-background: radial-gradient(ellipse at 8% 8%, rgba(100, 74, 210, .28), transparent 55%), radial-gradient(ellipse at 95% 80%, rgba(19, 134, 163, .2), transparent 54%), linear-gradient(140deg, #10172b, #17152d 48%, #0b202b);
  --auth-pill-bg: #1f2937;
  --auth-pill-text: #e5e7eb;
  --auth-pill-line: #475569;
  color-scheme: dark;
}

/* Bootstrap .container (max 1160, 24px gutters) > centred column capped at 940px. */
:is(#page-login, #page-register, #page-forgot-password) .auth-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-wrap { width: 100%; max-width: 940px; margin: 0 auto; }

/* Language pill (gtranslate switcher look: 88x38, 2px slate border, flag + code + chevron). */
:is(#page-login, #page-register, #page-forgot-password) .auth-toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 38px; margin-right: 8px; }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  min-width: 88px;
  padding: 7px 9px;
  color: var(--auth-pill-text);
  background: var(--auth-pill-bg);
  border: 2px solid var(--auth-pill-line);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .14);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  cursor: pointer;
  white-space: nowrap;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-flag { flex: 0 0 auto; width: 21px; height: 14px; margin-right: 5px; border-radius: 1.5px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12); }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-code { font-size: 12px; text-transform: uppercase; }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-arrow { flex: 0 0 auto; width: 15px; height: 15px; color: #666666; }
html.cg-dark :is(#page-login, #page-register, #page-forgot-password) .auth-lang-arrow { color: #9ca3af; }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang.open .auth-lang-arrow { transform: rotate(180deg); }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: none;
  width: 210px;
  max-width: min(210px, calc(100vw - 24px));
  max-height: 320px;
  overflow-y: auto;
  padding: 0;
  background: var(--auth-pill-bg);
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}
html.cg-dark :is(#page-login, #page-register, #page-forgot-password) .auth-lang-menu { border-color: var(--auth-pill-line); }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang.open .auth-lang-menu { display: block; }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-menu a { display: flex; align-items: center; padding: 8px 11px; color: var(--auth-pill-text); font-size: 13px; cursor: pointer; }
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-menu a:hover,
:is(#page-login, #page-register, #page-forgot-password) .auth-lang-menu a.active { background: rgba(53, 110, 244, .1); }

/* Card: intro column .86fr + form column 1fr. */
:is(#page-login, #page-register, #page-forgot-password) .auth-panel {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1fr);
  overflow: hidden;
  overflow-wrap: break-word; /* Bootstrap .card word-wrap */
  color: var(--auth-text);
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: 24px;
  box-shadow: var(--auth-shadow);
}

:is(#page-login, #page-register, #page-forgot-password) .auth-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 32px 28px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 90% 8%, rgba(255, 255, 255, .2), transparent 48%), linear-gradient(145deg, #2864e7, #7657db 57%, #20a8c6);
}
:is(#page-login, #page-register, #page-forgot-password) .auth-intro::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border: 44px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-intro > * { position: relative; z-index: 1; }
:is(#page-login, #page-register, #page-forgot-password) .auth-eyebrow {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 7px 12px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 20px;
  background: rgba(255, 255, 255, .12);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-eyebrow i { width: 15px; font-size: 12px; text-align: center; }
:is(#page-login, #page-register, #page-forgot-password) .auth-intro h1 {
  margin: 0 0 16px;
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.32;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-intro p { margin: 0 0 24px; color: rgba(255, 255, 255, .9); font-size: 15px; line-height: 1.8; }
:is(#page-login, #page-register, #page-forgot-password) .auth-benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: rgba(255, 255, 255, .94);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-benefit i { width: 24px; color: #baf6ff; text-align: center; }

/* Form column. */
:is(#page-login, #page-register, #page-forgot-password) .auth-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 22px 26px;
  color: var(--auth-text);
  background: var(--auth-surface);
}
:is(#page-login, #page-register, #page-forgot-password) .auth-logo { display: flex; justify-content: center; margin-bottom: 8px; }
:is(#page-login, #page-register, #page-forgot-password) .auth-logo img { display: block; width: auto; max-width: 176px; height: 44px; max-height: 44px; object-fit: contain; border-radius: 5px; }
:is(#page-login, #page-register, #page-forgot-password) .auth-form h3 {
  margin: 0 0 6px;
  color: var(--auth-text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.25;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-subtitle { margin: 0 0 12px; color: var(--auth-muted); font-size: 14px; line-height: 1.5; }
/* ceoacc wraps each field in a flex-item column, so field margins add up instead of collapsing:
 * a flex column form reproduces that (10px below a field + 10px above the next = 20px). */
:is(#page-login, #page-register, #page-forgot-password) .auth-form form { display: flex; flex-direction: column; margin: 0; }
:is(#page-login, #page-register, #page-forgot-password) .auth-group { margin-bottom: 10px; }
/* ceoacc .mt-2 is .625rem: 10px, 9.69px on phones where the root font is 15.5px (base.css). */
:is(#page-login, #page-register, #page-forgot-password) .auth-group.auth-mt { margin-top: .625rem; }
/* ceoacc's Cloudflare Turnstile row is not built; its empty row (.mt-2 + 10px) still leaves space, so the
 * password field ends 38px (37.69 on phones) above the submit button: this margin + the button's 8px. */
#page-login .auth-group.auth-mt { margin-bottom: calc(20px + .625rem); }
:is(#page-login, #page-register, #page-forgot-password) .auth-label {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--auth-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-label-row { display: flex; justify-content: space-between; align-items: center; }
:is(#page-login, #page-register, #page-forgot-password) .auth-form a { color: var(--auth-blue); cursor: pointer; }
:is(#page-login, #page-register, #page-forgot-password) .auth-form a:hover { text-decoration: underline; }
:is(#page-login, #page-register, #page-forgot-password) .auth-input {
  display: block;
  width: 100%;
  min-height: 44px;
  height: auto;
  margin: 0;
  padding: 9px 12px;
  color: var(--auth-text);
  background: var(--auth-soft);
  border: 1px solid var(--auth-line);
  border-radius: 20px;
  box-shadow: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-input::placeholder { color: var(--auth-muted); opacity: .85; }
:is(#page-login, #page-register, #page-forgot-password) .auth-input:focus {
  border-color: var(--auth-blue);
  background: var(--auth-surface);
  box-shadow: 0 0 0 2px rgba(36, 101, 189, .12);
  outline: 0;
}
:is(#page-login, #page-register, #page-forgot-password) :is(.auth-btn-primary, .auth-btn-secondary) {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 9px 16px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-btn-primary {
  color: #ffffff;
  background: var(--auth-primary);
  border: 1px solid var(--auth-primary);
  box-shadow: 0 7px 18px -12px rgba(53, 110, 244, .65);
}
:is(#page-login, #page-register, #page-forgot-password) .auth-btn-primary:hover { background: var(--auth-primary-hover); border-color: var(--auth-primary-hover); }
:is(#page-login, #page-register, #page-forgot-password) .auth-btn-primary:focus { box-shadow: none; }
:is(#page-login, #page-register, #page-forgot-password) :is(.auth-btn-primary, .auth-btn-secondary):disabled { opacity: .58; cursor: not-allowed; }
:is(#page-login, #page-register, #page-forgot-password) .auth-btn-secondary {
  color: var(--auth-text);
  background: var(--auth-soft);
  border: 1px solid var(--auth-line);
  box-shadow: none;
}
:is(#page-login, #page-register, #page-forgot-password) :is(.auth-btn-primary, .auth-btn-secondary, .auth-form a, .auth-lang-btn):focus-visible {
  outline: 3px solid var(--auth-blue);
  outline-offset: 3px;
}
:is(#page-login, #page-register, #page-forgot-password) .auth-foot { margin-top: 12px; padding: 0 15px; }
:is(#page-login, #page-register, #page-forgot-password) .auth-foot p { margin: 0; text-align: center; }

/* Tablet/phone: single column, intro collapses to eyebrow + title. */
@media (max-width: 991.98px) {
  :is(#page-login, #page-register, #page-forgot-password) .auth-wrap { max-width: 580px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-panel { grid-template-columns: minmax(0, 1fr); }
  :is(#page-login, #page-register, #page-forgot-password) .auth-intro { min-height: auto; padding: 16px 22px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-intro h1 { margin: 0; font-size: 22px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-eyebrow { margin-bottom: 8px; padding: 5px 10px; }
  :is(#page-login, #page-register, #page-forgot-password) :is(.auth-intro p, .auth-benefits) { display: none; }
}
@media (max-width: 575.98px) {
  :is(#page-login, #page-register, #page-forgot-password) .auth-page { padding-top: max(12px, env(safe-area-inset-top, 0px)); padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
  :is(#page-login, #page-register, #page-forgot-password) .auth-container { padding: 0 12px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-intro { padding: 14px 18px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-intro h1 { font-size: 21px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-form { padding: 18px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-logo img { max-width: 160px; max-height: 40px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-input { font-size: 16px; }
  /* Phone pill: flag + chevron only, 48px wide, flush with the card's right edge. */
  :is(#page-login, #page-register, #page-forgot-password) .auth-toolbar { margin-bottom: 10px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-lang { margin-right: 0; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-lang-btn { height: 36px; min-width: 48px; padding: 7px 6px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-lang-flag { width: 19px; margin-right: 2px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-lang-code { display: none; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-lang-arrow { width: 11px; }
}
@media (max-width: 359.98px) {
  :is(#page-login, #page-register, #page-forgot-password) .auth-container { padding: 0 8px; }
  :is(#page-login, #page-register, #page-forgot-password) .auth-form { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(#page-login, #page-register, #page-forgot-password) :is(.auth-input, .auth-btn-primary, .auth-btn-secondary) { transition: none; }
}
