/* Customer authentication — Dub component owner.
   The direct document owns its frame; embedded documents use the parent
   dialog's frame and measured height. No route creates another outer frame. */
html[data-public-base-theme="light"],html:not([data-public-base-theme]){
  --gva-auth-bg:#fff;--gva-auth-page:#fff;--gva-auth-surface:#fff;
  --gva-auth-subtle:#f5f5f5;--gva-auth-soft:#f5f5f5;--gva-auth-field:#fff;
  --gva-auth-text:#171717;--gva-auth-muted:#737373;
  --gva-auth-line:#e5e5e5;--gva-auth-line-strong:#d4d4d4;
  --gva-auth-primary:#000;--gva-auth-primary-hover:#171717;--gva-auth-primary-text:#fff;
  --gva-auth-accent:#2563eb;--gva-auth-focus:rgba(37,99,235,.18);
  --gv-password-eye-color:#737373;--gv-password-eye-hover:#171717;
  color-scheme:light;
}
html[data-public-base-theme="dark"]{
  --gva-auth-bg:#0a0a0a;--gva-auth-page:#0a0a0a;--gva-auth-surface:#111;
  --gva-auth-subtle:#171717;--gva-auth-soft:#171717;--gva-auth-field:#111;
  --gva-auth-text:#fafafa;--gva-auth-muted:#a3a3a3;
  --gva-auth-line:#262626;--gva-auth-line-strong:#404040;
  --gva-auth-primary:#ededed;--gva-auth-primary-hover:#fff;--gva-auth-primary-text:#0a0a0a;
  --gva-auth-accent:#60a5fa;--gva-auth-focus:rgba(96,165,250,.24);
  --gv-password-eye-color:#a3a3a3;--gv-password-eye-hover:#fafafa;
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;width:100%;min-width:0;min-height:100%;background:var(--gva-auth-bg);color:var(--gva-auth-text)}
body.auth-page-customer{font:400 14px/1.5 var(--gv-font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a,button,input,select,textarea{font:inherit}
button,input,select,textarea{color:inherit}
.auth-site-backdrop{position:fixed;inset:0;z-index:-2;overflow:hidden;background:var(--gva-auth-page)}
.auth-site-backdrop-frame{display:none}
.auth-site-backdrop-scrim{position:absolute;inset:0;background:var(--gva-auth-page)}

.auth-suite-layout{width:100%;min-width:0;min-height:100dvh;display:grid;place-items:center;padding:32px;background:var(--gva-auth-page)}
.auth-suite-shell{
  position:relative;width:min(980px,100%);min-width:0;min-height:0;
  display:grid;grid-template-columns:minmax(0,1.24fr) minmax(260px,.76fr);
  grid-template-areas:"panel visual";align-items:stretch;direction:ltr;
  overflow:hidden;border:1px solid var(--gva-auth-line);border-radius:var(--gv-radius-large-card);
  background:var(--gva-auth-surface);box-shadow:none;
}
.auth-suite-panel{grid-area:panel;min-width:0;min-height:0;display:flex;align-items:center;padding:32px 40px;background:var(--gva-auth-surface);direction:ltr}
html[dir="rtl"] .auth-suite-panel{direction:rtl;text-align:right}
.auth-suite-panel-inner{width:min(100%,400px);max-width:400px;min-width:0;margin:auto}
.auth-suite-panel-inner.is-wide{width:100%;max-width:660px}
body.auth-page-register .auth-suite-shell{width:min(1080px,100%)}
.auth-suite-visual{grid-area:visual;min-width:0;display:grid;place-items:center;padding:32px;border-inline-start:1px solid var(--gva-auth-line);background:var(--gva-auth-subtle)}
/* One protected person/device illustration is shared by every auth route. */
.auth-suite-visual-inner{width:100%;height:100%;min-height:0;display:grid;place-items:center}
.auth-suite-artwork{
  width:min(86%,270px);max-width:270px;max-height:100%;min-height:0;
  aspect-ratio:1098/1194;background-size:contain;background-position:center;background-repeat:no-repeat;
  mix-blend-mode:normal;filter:none;opacity:.96;
}
html[data-public-base-theme="dark"] .auth-suite-artwork{filter:grayscale(1) invert(.92) contrast(1.08);opacity:.86}
.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)}
.auth-login-brand{width:max-content;max-width:100%;margin:0 0 16px;display:inline-flex;align-items:center;gap:8px;color:var(--gva-auth-text);text-decoration:none;font-size:14px;font-weight:500;overflow-wrap:anywhere}
.auth-login-brand-mark{display:none}
.auth-suite-heading{margin:0 0 20px}
.auth-suite-heading .auth-kicker{margin:0 0 8px;color:var(--gva-auth-muted);font-size:11px;font-weight:500;letter-spacing:.06em;text-transform:uppercase}
.auth-suite-heading h1{margin:0;color:var(--gva-auth-text);font-size:24px;font-weight:500;line-height:1.33;letter-spacing:-.02em}
.auth-suite-heading p{margin:8px 0 0;color:var(--gva-auth-muted);font-size:14px;line-height:1.5}

.auth-form{display:grid;gap:16px}
.auth-register-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.auth-register-form .auth-submit{grid-column:1/-1}
.auth-field{display:grid;gap:8px;min-width:0;margin:0;color:var(--gva-auth-text);font-size:14px;font-weight:500}
.auth-field>span,.auth-label-row>span{color:inherit;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)}
.auth-field :is(input,select,textarea),.auth-suite-input,.auth-password-wrap>input,.gv-password-field>input{
  width:100%;min-width:0;min-height:40px;height:40px;padding:0 12px;
  border:1px solid var(--gv-input-border);border-radius:var(--gv-radius-input);
  background:var(--gva-auth-field);color:var(--gva-auth-text);caret-color:var(--gva-auth-text);
  box-shadow:none;font-size:14px;font-weight:400;transition:border-color 150ms ease,box-shadow 150ms ease;
}
.auth-field textarea{height:auto;min-height:96px;padding-block:8px;resize:vertical}
.auth-field input::placeholder,.auth-password-wrap input::placeholder,.gv-password-field input::placeholder{color:var(--gva-auth-muted);opacity:1}
.auth-field :is(input,select,textarea):focus-visible,.auth-password-wrap input:focus-visible,.gv-password-field input:focus-visible{border-color:var(--gva-auth-accent);outline:2px solid var(--gva-auth-accent);outline-offset:2px}
.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:48px}
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)}
.auth-suite-submit,.button.primary.auth-suite-submit{
  width:100%;min-height:40px;height:40px;margin:0;padding:0 16px;display:flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid var(--gva-auth-primary);border-radius:var(--gv-radius-button);
  background:var(--gva-auth-primary);color:var(--gva-auth-primary-text);box-shadow:none;
  font-size:14px;font-weight:500;cursor:pointer;text-decoration:none;
  transition:background-color 150ms ease,border-color 150ms ease;
}
.auth-suite-submit:hover{background:var(--gva-auth-primary-hover);border-color:var(--gva-auth-primary-hover)}
.auth-suite-submit:disabled{opacity:.6;cursor:wait}
:is(.auth-suite-submit,.auth-sso-button,.auth-suite-secondary):focus-visible{outline:2px solid var(--gva-auth-accent);outline-offset:2px}
.auth-suite-divider{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin:16px 0;color:var(--gva-auth-muted);font-size:12px}
.auth-suite-divider::before,.auth-suite-divider::after{content:"";height:1px;background:var(--gva-auth-line)}
.auth-suite-divider>span{margin:0;padding:0 4px;background:var(--gva-auth-surface)}
.auth-sso-stack{display:grid;gap:8px}
:is(.auth-sso-button,.auth-suite-secondary,.auth-nav-button,.auth-website-link){
  width:100%;min-height:40px;display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 12px;
  border:1px solid var(--gva-auth-line);border-radius:var(--gv-radius-button);
  background:var(--gva-auth-surface);color:var(--gva-auth-text);box-shadow:none;text-decoration:none;
  font-size:14px;font-weight:500;cursor:pointer;transition:background-color 150ms ease,border-color 150ms ease;
}
:is(.auth-sso-button,.auth-suite-secondary,.auth-nav-button,.auth-website-link):hover{border-color:var(--gva-auth-line-strong);background:var(--gva-auth-subtle)}
.auth-sso-button img,.auth-sso-button svg{width:20px;height:20px;object-fit:contain;flex:none}
.auth-sso-telegram svg{color:#229ed9}
.auth-sso-telegram svg,.auth-telegram-context svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.auth-suite-footer-cta{margin-top:16px;padding-top:16px;border-top:1px solid var(--gva-auth-line)}
.auth-suite-navigation{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:0 0 16px;padding:0}
.auth-website-link-solo,.auth-secondary-action-spaced{margin-top:16px}
.auth-suite-secondary-full{width:100%}
.auth-alert,.auth-suite-status-card{margin:0 0 16px;padding:12px 16px;border:1px solid var(--gva-auth-line);border-radius:12px;background:var(--gva-auth-subtle);color:var(--gva-auth-text);font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.auth-alert-error{border-color:color-mix(in srgb,#dc2626 40%,var(--gva-auth-line));background:color-mix(in srgb,#dc2626 6%,var(--gva-auth-surface))}
.auth-suite-code{font-family:var(--gv-font-mono);font-size:18px;letter-spacing:.08em;text-align:center}
.auth-suite-close,.auth-suite-mobile-close{position:absolute;top:16px;inset-inline-end:16px;z-index:5;color:var(--gva-auth-muted)}
.auth-suite-mobile-close{display:none}
.brand-mark-logo-image{width:100%;height:100%;object-fit:contain;display:block;border-radius:8px}
.auth-telegram-context{display:flex;align-items:center;gap:12px;min-width:0;margin:0 0 16px;padding:12px;border:1px solid var(--gva-auth-line);border-radius:12px;background:var(--gva-auth-subtle)}
.auth-telegram-context>span:last-child{min-width:0;display:grid;gap:4px}
.auth-telegram-context b{font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auth-telegram-context small{color:var(--gva-auth-muted);font-size:12px}
.auth-telegram-avatar{width:36px;height:36px;flex:none;display:grid;place-items:center;overflow:hidden;border:1px solid var(--gva-auth-line);border-radius:50%;background:var(--gva-auth-surface)}
.auth-telegram-avatar img{width:100%;height:100%;object-fit:cover}
.auth-telegram-avatar svg{width:18px;height:18px}
.auth-registration-disabled-inner{width:100%;max-width:none;margin:0;text-align:start}
.auth-registration-disabled-icon{width:40px;height:40px;margin:0 0 16px;display:grid;place-items:center;border:1px solid var(--gva-auth-line);border-radius:12px;background:var(--gva-auth-subtle)}
.auth-registration-disabled-icon svg{width:20px;height:20px}
.auth-registration-disabled-heading{margin-bottom:16px;text-align:start}
.auth-registration-disabled-alert{display:grid;gap:4px;text-align:start}
.auth-registration-disabled-alert b{font-weight:500}
.auth-registration-disabled-alert span{font-size:12px;color:var(--gva-auth-muted)}

/* The parent auth dialog measures panel-inner, never a recursive viewport. */
html.auth-embedded-document,html.auth-embedded-document body{height:100%;min-height:0;overflow:hidden}
body.is-embedded{height:100%;min-height:0;overflow:hidden}
body.is-embedded .auth-suite-layout{display:block;width:100%;height:100%;min-height:0;padding:0;background:var(--gva-auth-surface)}
body.is-embedded .auth-suite-shell{width:100%;height:100%;min-height:0;max-height:none;margin:0;border:0;border-radius:0;overflow:hidden}
body.is-embedded .auth-suite-panel{height:100%;min-height:0;max-height:none;padding:24px 32px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none}
body.is-embedded .auth-suite-panel::-webkit-scrollbar{display:none}
body.is-embedded .auth-suite-visual{height:100%;min-height:0}
body.is-embedded :is(.auth-suite-close,.auth-suite-mobile-close,.auth-login-brand,.auth-website-link-solo){display:none}
body.is-embedded.auth-page-register .auth-suite-panel-inner.is-wide{max-width:640px}
body.is-embedded:is(.auth-page-verify,.auth-page-identity) .auth-suite-panel-inner{width:min(100%,360px);max-width:360px}
@media(max-width:1024px) and (min-width:761px){.auth-suite-layout{padding:24px}.auth-suite-panel{padding:32px}.auth-suite-visual{padding:24px}}
@media(max-width:760px){
  .auth-suite-layout{padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));min-height:100dvh}
  .auth-suite-shell{width:100%;grid-template-columns:minmax(0,1fr);grid-template-areas:"panel"}
  .auth-suite-visual{display:none}
  .auth-suite-panel{width:100%;padding:48px 16px 24px;align-items:flex-start}
  .auth-suite-panel-inner{width:min(100%,420px);max-width:420px;margin:0 auto}
  .auth-register-form{grid-template-columns:minmax(0,1fr)}
  .auth-suite-close{display:none}
  .auth-page-login .auth-website-link-solo,body:is(.auth-page-register,.auth-page-forgot,.auth-page-reset) .auth-suite-navigation [data-auth-website-return]{display:none}
  .auth-suite-mobile-close{display:grid}
  .auth-field :is(input,select,textarea),.auth-suite-input,.auth-password-wrap>input,.gv-password-field>input{font-size:16px}
  body.is-embedded .auth-suite-panel{padding:48px 16px 24px;align-items:flex-start}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto;transition:none;animation:none}}
/* Canonical close control. The glyph is an SVG mask instead of a text ×,
   so its optical center and stroke stay consistent across fonts, RTL/LTR and zoom. */
.gv-close-control{
  flex:none;
  display:grid;
  place-items:center;
  font-size:0!important;
  line-height:0!important;
  letter-spacing:0!important;
  text-indent:0!important;
}
.gv-close-control>svg{display:none!important}
.gv-close-control::before{
  content:"";
  width:16px;
  height:16px;
  display:block;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7 7 17' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7 7 17' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  pointer-events:none;
}
.gv-close-control::after{content:none!important}
.gv-close-control--sm::before{width:14px;height:14px}
.gv-close-control--md::before{width:16px;height:16px}
.gv-close-control--lg::before{width:18px;height:18px}

/* Page return navigation: one compact control across application areas. */
body :is(a, button).app-page-back {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  border-radius: var(--gv-radius-button);
  background: transparent;
  box-shadow: none;
  color: var(--gva-auth-muted, var(--admin-muted, var(--gv-text-muted, #737373)));
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}
body :is(a, button).app-page-back:hover { color: var(--gva-auth-text, var(--admin-text, var(--gv-text, #171717))); }
body :is(a, button).app-page-back:focus-visible { outline: 2px solid var(--gv-brand-600, #2563eb); outline-offset: 4px; }
body :is(a, button).app-page-back svg { display: block; width: 14px; height: 14px; flex: 0 0 14px; }
html[dir="rtl"] body :is(a, button).app-page-back svg { transform: scaleX(-1); }

