/* Canonical customer authentication foundation.
   This file owns the complete customer-auth surface and does not inherit
   workspace/public presentation CSS. */

html[data-public-base-theme="light"],
html:not([data-public-base-theme]){
  --gva-auth-bg:#fafafa;
  --gva-auth-page:#fafafa;
  --gva-auth-surface:#ffffff;
  --gva-auth-visual-text:#f8fafc;
  --gva-auth-accent:#f59e0b;
  --gva-auth-field:#ffffff;
  --gva-auth-text:#171717;
  --gva-auth-muted:#666666;
  --gva-auth-line:#e5e5e5;
  --gva-auth-line-strong:#d4d4d4;
  --gva-auth-primary:#171717;
  --gva-auth-primary-hover:#333333;
  --gva-auth-primary-text:#ffffff;
  --gva-auth-focus:rgba(23,23,23,.18);
  --gva-auth-backdrop:rgba(7,17,31,.64);
  --gva-auth-visual:#171717;
  --gv-password-eye-color:#666666;
  --gv-password-eye-hover:#171717;
  color-scheme:light;
  background:#fafafa;
}
html[data-public-base-theme="dark"]{
  --gva-auth-bg:#0a0a0a;
  --gva-auth-page:#0a0a0a;
  --gva-auth-surface:#171717;
  --gva-auth-visual-text:#f8fafc;
  --gva-auth-accent:#fbbf24;
  --gva-auth-field:#171717;
  --gva-auth-text:#f8fafc;
  --gva-auth-muted:#a1a1a1;
  --gva-auth-line:#333333;
  --gva-auth-line-strong:#525252;
  --gva-auth-primary:#ededed;
  --gva-auth-primary-hover:#ffffff;
  --gva-auth-primary-text:#0a0a0a;
  --gva-auth-focus:rgba(237,237,237,.24);
  --gva-auth-backdrop:rgba(2,8,18,.76);
  --gva-auth-visual:#0a0a0a;
  --gv-password-eye-color:#a1a1a1;
  --gv-password-eye-hover:#f8fafc;
  color-scheme:dark;
  background:#0a0a0a;
}

html,body{margin:0;width:100%;min-width:0;min-height:100%;background:var(--gva-auth-bg);color:var(--gva-auth-text)}
html.auth-embedded-document,html.auth-embedded-document body{height:100%;min-height:0;overflow:hidden}
*,*::before,*::after{box-sizing:border-box}
body.auth-page-customer{
  font-family:var(--gv-font-sans);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a,button,input,select{font:inherit}
button,input,select{color:inherit}

/* Direct auth backdrop. Embedded auth never creates this layer. */
.auth-site-backdrop{position:fixed;inset:0;z-index:-2;overflow:hidden;background:var(--gva-auth-bg)}
.auth-site-backdrop-frame{position:absolute;inset:-12px;width:calc(100% + 24px);height:calc(100% + 24px);border:0;filter:blur(6px);transform:scale(1.02);opacity:.82}
.auth-site-backdrop-scrim{position:absolute;inset:0;background:var(--gva-auth-backdrop);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}

.auth-suite-layout{
  width:100%;min-width:0;min-height:100dvh;
  display:grid;place-items:center;
  padding:28px;
  background:transparent;
}
body.is-embedded .auth-suite-layout{display:block;width:100%;padding:0;}

.auth-suite-shell{
  width:min(980px,calc(100vw - 56px));
  min-width:0;min-height:min(550px,calc(100dvh - 56px));
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(320px,.82fr);
  grid-template-areas:"panel visual";
  align-items:stretch;
  overflow:hidden;
  border:1px solid var(--gva-auth-line);
  background:var(--gva-auth-surface);
}
body.is-embedded .auth-suite-shell{
  width:100%;margin:0;
  border:0;border-radius:0;box-shadow:none;
}

.auth-suite-panel,
.auth-suite-visual{
  min-width:0;
  background:var(--gva-auth-surface);
  color:var(--gva-auth-text);
}
.auth-suite-panel{
  grid-area:panel;
  min-height:0;
  display:flex;align-items:center;
  padding:30px 38px;
  border:0;
  overflow:visible;
}
body.is-embedded .auth-suite-panel{overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;}
body.is-embedded .auth-suite-panel::-webkit-scrollbar{width:0;height:0;display:none;}
.auth-suite-panel-inner,
.auth-suite-panel-inner.is-wide{
  width:min(100%,400px);
  max-width:400px;
  margin:auto;
  padding:0;
  background:transparent;
  color:inherit;
}
.auth-suite-panel-inner.is-wide{max-width:660px}

.auth-login-brand{
  width:max-content;max-width:100%;margin:0 0 10px;display:inline-flex;align-items:center;gap:8px;color:var(--gva-auth-text);text-decoration:none;
  font-size:14px;font-weight:600;line-height:1.2;letter-spacing:-.02em
}
.auth-login-brand:hover{text-decoration:none;color:var(--gva-auth-text)}
.auth-login-brand-mark{display:none}

.auth-suite-visual{
  grid-area:visual;
  min-height:100%;
  display:grid;place-items:center;
  padding:30px;
  border:0;
  border-inline-start:1px solid var(--gva-auth-line);
  overflow:hidden;
  background:var(--gva-auth-surface);
}
body.is-embedded .auth-suite-visual{height:auto;min-height:100%}
.auth-suite-visual::before,
.auth-suite-visual::after{display:none;content:none}
.auth-suite-visual-inner{width:100%;height:100%;display:grid;place-items:center;background:transparent}
.auth-suite-artwork{
  width:min(84%,320px);max-width:320px;height:auto;min-height:0;
  aspect-ratio:1098/1194;
  background-size:contain;background-position:center;background-repeat:no-repeat;
  opacity:1;mix-blend-mode:normal;
}


.auth-suite-artwork-fallback{width:180px;aspect-ratio:1;display:grid;place-items:center;border:1px solid var(--gva-auth-line);border-radius:50%;color:var(--gva-auth-muted)}

@media(min-width:1025px){
  body.auth-page-register .auth-suite-shell{
    width:min(1080px,calc(100vw - 56px));
    grid-template-columns:minmax(0,1.48fr) minmax(310px,.72fr);
  }
}
body.auth-page-register .auth-suite-panel-inner.is-wide{width:100%;max-width:660px}

.auth-suite-heading{margin:0 0 21px}
.auth-suite-heading .auth-kicker{margin:0 0 7px;color:var(--gva-auth-muted);font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase}
.auth-suite-heading h1{margin:0;color:var(--gva-auth-text);font-size:28px;line-height:1.12;font-weight:620;letter-spacing:-.035em}
.auth-suite-heading p{margin:7px 0 0;color:var(--gva-auth-muted);font-size:13.5px;line-height:1.5}

.auth-form{display:grid;gap:13px}
.auth-register-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 14px}
.auth-register-form .auth-submit{grid-column:1/-1}
.auth-field{display:grid;gap:7px;margin:0;color:var(--gva-auth-text);font-size:12.5px;font-weight:520}
.auth-field>span,.auth-label-row>span{color:var(--gva-auth-text);opacity:1;visibility:visible}
.auth-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.auth-label-row a{color:var(--gva-auth-muted);text-decoration:none;font-size:12px;font-weight:500}
.auth-label-row a:hover{color:var(--gva-auth-text)}

:is(.auth-field>input,.auth-field>select,.auth-password-wrap>input,.gv-password-field>input){
  width:100%;height:40px;min-width:0;
  padding:0 12px;
  border:1px solid var(--gva-auth-line-strong);border-radius:7px;outline:0;
  background:var(--gva-auth-field);color:var(--gva-auth-text);caret-color:var(--gva-auth-text);
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  font-size:14px;font-weight:450;
  transition:border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
:is(.auth-field>input,.auth-password-wrap>input,.gv-password-field>input)::placeholder{color:var(--gva-auth-muted);opacity:.72}
:is(.auth-field>input,.auth-password-wrap>input,.gv-password-field>input):hover{border-color:color-mix(in srgb,var(--gva-auth-text) 35%,var(--gva-auth-line-strong))}
:is(.auth-field>input,.auth-password-wrap>input,.gv-password-field>input):focus{border-color:var(--gva-auth-primary);box-shadow:0 0 0 3px var(--gva-auth-focus)}
.auth-password-wrap,.gv-password-field{position:relative;display:flex;align-items:center;width:100%;min-width:0}
:is(.auth-password-wrap,.gv-password-field)>input{padding-inline-end:44px}
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--gva-auth-text);
  -webkit-box-shadow:0 0 0 1000px var(--gva-auth-field) inset;
  box-shadow:0 0 0 1000px var(--gva-auth-field) inset;
  caret-color:var(--gva-auth-text);
  transition:background-color 9999s ease-out 0s;
}

.auth-suite-submit,.button.primary.auth-suite-submit{
  width:100%;height:40px;min-height:40px;margin:0;padding:0 15px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--gva-auth-primary);border-radius:7px;
  background:var(--gva-auth-primary);color:var(--gva-auth-primary-text);
  box-shadow:0 1px 2px rgba(0,0,0,.10);
  font-size:14px;font-weight:600;letter-spacing:-.01em;cursor:pointer;
  text-decoration:none;
}
.auth-suite-submit:hover{background:var(--gva-auth-primary-hover);border-color:var(--gva-auth-primary-hover)}
.auth-suite-submit:disabled{opacity:.62;cursor:wait}
.auth-suite-submit:focus-visible,:is(.auth-sso-button,.auth-suite-secondary):focus-visible{outline:2px solid var(--gva-auth-primary);outline-offset:2px}

.auth-suite-divider,.auth-suite-divider{
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;
  margin:14px 0;color:var(--gva-auth-muted);font-size:11.5px;line-height:1;
}
:is(.auth-suite-divider,.auth-suite-divider)::before,
:is(.auth-suite-divider,.auth-suite-divider)::after{content:"";display:block;height:1px;background:var(--gva-auth-line)}
:is(.auth-suite-divider,.auth-suite-divider)>span{display:block;margin:0;padding:0 4px;border:0;background:var(--gva-auth-bg);color:var(--gva-auth-muted);box-shadow:none;line-height:1}
.auth-sso-stack{display:grid;gap:10px}
:is(.auth-sso-button,.auth-suite-secondary,.auth-nav-button,.auth-website-link,.auth-secondary-action){
  width:100%;min-height:40px;display:flex;align-items:center;justify-content:center;gap:10px;
  padding:0 13px;border:1px solid var(--gva-auth-line-strong);border-radius:7px;
  background:var(--gva-auth-bg);color:var(--gva-auth-text);box-shadow:none;text-decoration:none;
  font-size:13.5px;font-weight:560;cursor:pointer;
}
:is(.auth-sso-button,.auth-suite-secondary,.auth-nav-button,.auth-website-link,.auth-secondary-action):hover{border-color:color-mix(in srgb,var(--gva-auth-text) 35%,var(--gva-auth-line-strong));background:color-mix(in srgb,var(--gva-auth-text) 4%,var(--gva-auth-bg))}
.auth-sso-button img,.auth-sso-button svg{width:20px;height:20px;object-fit:contain}
.auth-suite-footer-cta{margin-top:13px;padding-top:13px;border-top:1px solid var(--gva-auth-line)}
.auth-suite-navigation{display:grid;gap:10px;margin-top:16px}
.auth-website-link-solo{margin-top:12px}

.auth-alert,.auth-suite-status-card,.auth-demo{
  margin:0 0 16px;padding:12px 13px;border:1px solid var(--gva-auth-line);border-radius:7px;
  background:color-mix(in srgb,var(--gva-auth-text) 4%,var(--gva-auth-bg));color:var(--gva-auth-text);
  font-size:12.5px;line-height:1.45;
}
.auth-alert-error{border-color:color-mix(in srgb,#ef4444 45%,var(--gva-auth-line));background:color-mix(in srgb,#ef4444 8%,var(--gva-auth-bg))}
.auth-demo{display:grid;gap:3px;margin-top:14px}
.auth-suite-code{font-size:18px;letter-spacing:.08em;text-align:center}

.auth-suite-close,.auth-suite-mobile-close{
  position:absolute;top:14px;inset-inline-end:14px;width:32px;height:32px;display:grid;place-items:center;
  border:0;border-radius:6px;background:transparent;color:var(--gva-auth-muted);text-decoration:none;
}
.auth-suite-close svg,.auth-suite-mobile-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.auth-suite-close:hover,.auth-suite-mobile-close:hover{background:color-mix(in srgb,var(--gva-auth-text) 8%,transparent);color:var(--gva-auth-text)}
.auth-suite-mobile-close{display:none}

body.is-embedded{height:100%;min-height:0;max-height:none;overflow:hidden}
body.is-embedded :is(.auth-suite-close,.auth-suite-mobile-close,.auth-login-brand,.auth-website-link-solo){display:none}

/* Keep the browser's viewport itself on the same surface. This prevents any
   white iframe canvas from appearing around the dark form panel. */
html.auth-embedded-document,html.auth-embedded-document body,body.is-embedded,.auth-suite-layout,.auth-suite-shell{background-color:var(--gva-auth-surface)}
html.auth-embedded-document{height:100%}
html.auth-embedded-document body.is-embedded{height:100%;min-height:0}
body.is-embedded .auth-suite-layout,body.is-embedded .auth-suite-shell{height:100%;min-height:0}

@media(max-width:1024px){
  .auth-suite-layout{padding:0;min-height:100dvh;place-items:start center;overflow-x:hidden}
  .auth-suite-shell{width:100%;min-height:100dvh;border:0;border-radius:0;grid-template-columns:1fr;grid-template-areas:"panel";box-shadow:none;overflow:visible}
  .auth-suite-visual{display:none}
  .auth-suite-panel{width:100%;min-height:100dvh;padding:max(48px,env(safe-area-inset-top)) 22px 32px;align-items:flex-start;overflow:visible}
  .auth-suite-panel-inner{width:min(100%,420px);max-width:420px;margin:0 auto}
  .auth-register-form{grid-template-columns:1fr}
  .auth-suite-mobile-close{display:grid;position:fixed;top:max(12px,env(safe-area-inset-top));inset-inline-end:14px;z-index:5}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto;transition:none;animation:none}}

/* Embedded auth uses the iframe height chosen by the parent. A fixed shell
   prevents the previous Register/Forgot transition race where min-height:100%
   recursively changed the measured frame and clipped the last action. The
   parent still measures .auth-suite-panel-inner and can grow when content truly
   needs more room. */
body.is-embedded .auth-suite-layout,
body.is-embedded .auth-suite-shell{
  height:100%;min-height:0;max-height:none;
}
body.is-embedded .auth-suite-panel,
body.is-embedded .auth-suite-visual{
  height:100%;min-height:0;max-height:none;
}
body.is-embedded .auth-suite-layout,
body.is-embedded .auth-suite-shell{overflow:hidden}
body.is-embedded .auth-suite-panel{overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none}

body.is-embedded.auth-page-login .auth-suite-panel{align-items:center;padding:24px 32px}
body.is-embedded.auth-page-register .auth-suite-panel{align-items:center;padding:22px 30px}
body.is-embedded.auth-page-register .auth-suite-panel-inner.is-wide{width:100%;max-width:640px;margin:auto}
body.is-embedded.auth-page-login .auth-suite-panel-inner{width:min(100%,400px);max-width:400px;margin:auto}
body.is-embedded:is(.auth-page-forgot,.auth-page-reset) .auth-suite-panel{align-items:center;padding:26px 32px}
body.is-embedded:is(.auth-page-forgot,.auth-page-reset) .auth-suite-panel-inner{width:min(100%,390px);max-width:390px;margin:auto}
body.is-embedded:is(.auth-page-verify,.auth-page-identity,.auth-page-2fa-setup) .auth-suite-panel{align-items:center;padding-block:34px}
body.is-embedded:is(.auth-page-verify,.auth-page-identity) .auth-suite-panel-inner{width:min(100%,440px);max-width:440px}

@media(min-width:761px){
  body.is-embedded.auth-page-login .auth-suite-shell{
    grid-template-columns:minmax(0,1.22fr) minmax(330px,.78fr);grid-template-areas:"panel visual";
  }
  body.is-embedded.auth-page-register .auth-suite-shell{
    width:100%;grid-template-columns:minmax(0,1.55fr) minmax(330px,.75fr);grid-template-areas:"panel visual";
  }
  body.is-embedded:is(.auth-page-forgot,.auth-page-reset) .auth-suite-shell{
    width:100%;grid-template-columns:minmax(0,1.16fr) minmax(310px,.84fr);grid-template-areas:"panel visual";
  }
  body.is-embedded:is(.auth-page-login,.auth-page-register,.auth-page-forgot,.auth-page-reset) .auth-suite-visual{
    display:grid;height:100%;min-height:0;
  }
  
  
  body.is-embedded:is(.auth-page-forgot,.auth-page-reset) .auth-suite-visual{
    padding:20px 24px;
  }
  body.is-embedded:is(.auth-page-login,.auth-page-register,.auth-page-forgot,.auth-page-reset) .auth-suite-artwork{
    width:min(88%,320px);max-width:320px;
  }
  body.is-embedded:is(.auth-page-verify,.auth-page-identity) .auth-suite-shell{
    grid-template-columns:1fr;grid-template-areas:"panel";
  }
  body.is-embedded:is(.auth-page-verify,.auth-page-identity) .auth-suite-visual{
    display:none;
  }
}

@media(max-height:720px) and (min-width:761px){
  .auth-suite-panel{padding-block:24px}
  .auth-suite-heading{margin-bottom:20px}
  .auth-suite-heading h1{font-size:27px}
  .auth-form{gap:12px}
  .auth-register-form{gap:10px 14px}
  .auth-suite-divider,.auth-suite-divider{margin:12px 0}
  .auth-sso-stack{gap:8px}
  .auth-suite-footer-cta{margin-top:12px;padding-top:12px}
  .auth-suite-navigation{gap:8px;margin-top:12px}
}
.auth-secondary-action-spaced{margin-top:10px}
.auth-suite-secondary-full{width:100%}
.license-status-panel{width:min(610px,100%);text-align:center}
.license-status-mark{margin:0 auto 18px}
.license-status-copy{color:var(--muted);line-height:1.7}
.license-status-retry{margin-top:20px}

.brand-mark-logo-image{width:100%;height:100%;object-fit:contain;display:block;border-radius:9px}

/* Authentication shares neutral surfaces with the customer workspace. */
body.auth-page-customer:not(.is-embedded) .auth-suite-layout { background:var(--gva-auth-page); }
.auth-suite-shell { border-color:var(--gva-auth-line); border-radius:10px; box-shadow:0 16px 48px #0001; }
.auth-suite-artwork { filter:none; opacity:.96; }
html[data-public-base-theme="dark"] .auth-suite-artwork {
  filter:grayscale(1) invert(.92) contrast(1.08);
  opacity:.86;
}
html[data-public-base-theme="dark"] .auth-suite-visual {
  background:color-mix(in srgb,var(--gva-auth-surface) 94%,#ffffff 6%);
}

/* Provider buttons keep the shared geometry while using restrained official
   provider colour cues. */
.auth-sso-google{
  border-color:color-mix(in srgb,#ea4335 42%,var(--gva-auth-line-strong));
  background:color-mix(in srgb,#ea4335 7%,var(--gva-auth-bg));
  color:color-mix(in srgb,#b3261e 88%,var(--gva-auth-text));
}
.auth-sso-google:hover{
  border-color:color-mix(in srgb,#ea4335 68%,var(--gva-auth-line-strong));
  background:color-mix(in srgb,#ea4335 11%,var(--gva-auth-bg));
}
.auth-sso-telegram{
  border-color:#229ed9;
  background:#229ed9;
  color:#ffffff;
}
.auth-sso-telegram:hover{
  border-color:#168ac1;
  background:#168ac1;
  color:#ffffff;
}
.auth-sso-telegram:focus-visible{outline-color:#229ed9}

/* Telegram OIDC uses the official blue action while the identity context stays
   neutral so it follows light/dark customer themes. */
.auth-sso-telegram svg,
.auth-telegram-context svg{
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.auth-telegram-context{
  min-width:0;
  margin:0 0 16px;
  padding:11px 12px;
  display:flex;
  align-items:center;
  gap:11px;
  border:1px solid var(--gva-auth-line);
  border-radius:7px;
  background:color-mix(in srgb,var(--gva-auth-text) 2.5%,var(--gva-auth-bg));
  color:var(--gva-auth-text);
}
.auth-telegram-context>span:last-child{min-width:0;display:grid;gap:2px}
.auth-telegram-context b{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auth-telegram-context small{color:var(--gva-auth-muted);font-size:11.5px;line-height:1.4}
.auth-telegram-avatar{
  width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;overflow:hidden;
  border:1px solid var(--gva-auth-line);border-radius:50%;background:var(--gva-auth-bg);
}
.auth-telegram-avatar img{width:100%;height:100%;object-fit:cover}
.auth-telegram-avatar svg{width:18px;height:18px}


/* Desktop embedded authentication uses one deterministic geometry per route.
   The parent dialog owns the outer size; these rules only arrange content inside
   that fixed viewport, so navigating Login -> Register/Forgot -> Login cannot
   inherit a previous iframe measurement. */
@media(min-width:761px){
  body.is-embedded .auth-suite-heading{margin-bottom:16px}
  body.is-embedded .auth-suite-heading h1{font-size:27px}
  body.is-embedded .auth-suite-heading p{margin-top:6px;font-size:13px}
  body.is-embedded .auth-form{gap:11px}
  body.is-embedded .auth-register-form{gap:9px 13px}
  body.is-embedded .auth-field{gap:6px}
  body.is-embedded .auth-suite-divider{margin:11px 0}
  body.is-embedded .auth-sso-stack{gap:8px}
  body.is-embedded .auth-suite-footer-cta{margin-top:11px;padding-top:11px}
  body.is-embedded .auth-suite-navigation{gap:8px;margin-top:12px}
  body.is-embedded.auth-page-register .auth-suite-navigation{margin-top:10px}
  body.is-embedded:is(.auth-page-forgot,.auth-page-reset) .auth-suite-navigation{margin-top:12px}
}
