:root {
  --vg5-bg: #070c14;
  --vg5-card: #0e1522;
  --vg5-card-2: #121b2d;
  --vg5-line: rgba(255,255,255,.09);
  --vg5-line-2: rgba(255,255,255,.16);
  --vg5-text: #f4f7fb;
  --vg5-muted: #98a6bb;
  --vg5-primary: #ff3f32;
  --vg5-primary-2: #ff7a1c;
  --vg5-accent: #25d9e8;
  --vg5-green: #20d596;
  --vg5-radius: 24px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.vg5-auth-body {
  margin: 0;
  color: var(--vg5-text);
  background:
    radial-gradient(900px 440px at 12% 0%, rgba(255,63,50,.11), transparent 70%),
    radial-gradient(900px 520px at 100% 18%, rgba(37,217,232,.10), transparent 72%),
    linear-gradient(180deg, #050911, var(--vg5-bg) 44%, #060a12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 390;
  overflow-x: hidden;
}
body.vg5-auth-body:before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.95), rgba(0,0,0,.18));
}
a { color: inherit; text-decoration: none; }
.vg5-auth-shell { width: min(1180px, calc(100% - 30px)); margin: 0 auto; position: relative; z-index: 1; }
.vg5-auth-top {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.vg5-auth-brand { display: inline-flex; align-items: center; gap: 12px; }
.vg5-auth-logo {
  width: 48px; height: 48px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,63,50,.16), rgba(37,217,232,.10));
  border: 1px solid var(--vg5-line);
  box-shadow: 0 20px 48px rgba(0,0,0,.28);
}
.vg5-auth-logo svg { width: 26px; height: 26px; }
.vg5-auth-brand strong { display: block; font-size: 18px; font-weight: 560; letter-spacing: -.03em; }
.vg5-auth-brand span { display: block; color: var(--vg5-muted); font-size: 12px; margin-top: 2px; }
.vg5-auth-home {
  min-height: 42px; padding: 0 14px; border-radius: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--vg5-line); background: rgba(255,255,255,.035); color: var(--vg5-muted);
  transition: border-color .22s ease, background .22s ease, color .22s ease;
}
.vg5-auth-home:hover { color: var(--vg5-text); border-color: rgba(255,63,50,.35); background: rgba(255,63,50,.08); }
.vg5-auth-layout { min-height: calc(100vh - 106px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(430px, .72fr); gap: 22px; align-items: center; padding: 18px 0 46px; }
.vg5-auth-side, .vg5-auth-card {
  border: 1px solid var(--vg5-line);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow: 0 26px 80px rgba(0,0,0,.36);
  overflow: hidden;
  position: relative;
}
.vg5-auth-side { min-height: 610px; padding: 34px; display: flex; flex-direction: column; justify-content: space-between; }
.vg5-auth-side:before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(520px 260px at 15% 18%, rgba(255,63,50,.18), transparent 64%),
    radial-gradient(520px 260px at 90% 90%, rgba(37,217,232,.13), transparent 66%);
  pointer-events: none;
}
.vg5-auth-side > * { position: relative; z-index: 1; }
.vg5-auth-pill { display: inline-flex; width: max-content; align-items: center; gap: 8px; color: var(--vg5-accent); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.vg5-auth-hero h1 { max-width: 660px; margin: 18px 0 14px; font-size: clamp(38px, 5vw, 72px); line-height: .97; letter-spacing: -.06em; font-weight: 560; }
.vg5-auth-hero p { max-width: 560px; color: var(--vg5-muted); line-height: 1.75; margin: 0; font-size: 15px; }
.vg5-auth-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.vg5-auth-feature { padding: 16px; border: 1px solid var(--vg5-line); border-radius: 18px; background: rgba(3,8,18,.36); }
.vg5-auth-feature i { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--vg5-primary), var(--vg5-primary-2)); font-style: normal; margin-bottom: 12px; }
.vg5-auth-feature strong { display: block; font-weight: 540; letter-spacing: -.02em; }
.vg5-auth-feature span { display: block; color: var(--vg5-muted); font-size: 12px; line-height: 1.55; margin-top: 6px; }
.vg5-auth-orbit { display: flex; gap: 10px; flex-wrap: wrap; color: var(--vg5-muted); }
.vg5-auth-orbit span { min-height: 36px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; border: 1px solid var(--vg5-line); background: rgba(255,255,255,.035); font-size: 12px; }
.vg5-auth-card { padding: 26px; }
.vg5-auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); padding: 5px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid var(--vg5-line); margin-bottom: 22px; }
.vg5-auth-tabs a { min-height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--vg5-muted); font-weight: 510; transition: background .22s ease, color .22s ease; }
.vg5-auth-tabs a.is-active { color: #fff; background: linear-gradient(135deg, var(--vg5-primary), var(--vg5-primary-2)); box-shadow: 0 16px 30px rgba(255,63,50,.18); }
.vg5-auth-title { margin: 0 0 8px; font-size: clamp(26px, 3vw, 38px); line-height: 1.08; font-weight: 560; letter-spacing: -.045em; }
.vg5-auth-lead { margin: 0 0 22px; color: var(--vg5-muted); line-height: 1.65; font-size: 14px; }
.vg5-alert { border: 1px solid var(--vg5-line); border-radius: 16px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; line-height: 1.5; }
.vg5-alert ul { padding-left: 18px; margin: 0; }
.vg5-alert.error { color: #ffb4b4; background: rgba(255,63,50,.08); border-color: rgba(255,63,50,.2); }
.vg5-alert.success { color: #bfffe5; background: rgba(32,213,150,.08); border-color: rgba(32,213,150,.22); }
.vg5-auth-form { display: grid; gap: 15px; }
.vg5-form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.vg5-field { display: grid; gap: 8px; }
.vg5-auth-label { color: var(--vg5-text); font-size: 13px; font-weight: 520; }
.vg5-input-box { height: 52px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--vg5-line); border-radius: 16px; background: rgba(5,10,20,.55); padding: 0 14px; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.vg5-input-box:focus-within { border-color: rgba(37,217,232,.45); background: rgba(9,16,31,.78); box-shadow: 0 0 0 4px rgba(37,217,232,.07); }
.vg5-input-box svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--vg5-muted); }
.vg5-input-box input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: var(--vg5-text); font: inherit; font-weight: 390; }
.vg5-input-box input::placeholder { color: color-mix(in srgb, var(--vg5-muted) 72%, transparent); }
.vg5-auth-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 2px 0; }
.vg5-check { display: inline-flex; align-items: center; gap: 9px; color: var(--vg5-muted); font-size: 13px; cursor: pointer; }
.vg5-check input { accent-color: var(--vg5-primary); }
.vg5-auth-link { color: var(--vg5-accent); font-size: 13px; }
.vg5-auth-submit { height: 52px; border: 0; border-radius: 17px; background: linear-gradient(135deg, var(--vg5-primary), var(--vg5-primary-2)); color: #fff; font-weight: 540; font-size: 15px; cursor: pointer; box-shadow: 0 16px 38px rgba(255,63,50,.20); transition: transform .2s ease, box-shadow .2s ease; }
.vg5-auth-submit:hover { transform: translateY(-1px); box-shadow: 0 22px 48px rgba(255,63,50,.26); }
.vg5-terms { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--vg5-line); border-radius: 16px; background: rgba(255,255,255,.025); }
.vg5-terms a { color: var(--vg5-accent); }
.vg5-auth-divider { display: flex; align-items: center; gap: 12px; color: var(--vg5-muted); font-size: 12px; margin: 20px 0; }
.vg5-auth-divider:before, .vg5-auth-divider:after { content: ''; height: 1px; flex: 1; background: var(--vg5-line); }
.vg5-social-grid { display: grid; gap: 10px; }
.vg5-social-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.vg5-social-btn { min-height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--vg5-line); background: rgba(255,255,255,.035); color: var(--vg5-text); font-weight: 500; font-size: 13px; }
.vg5-social-btn:hover { border-color: var(--vg5-line-2); background: rgba(255,255,255,.06); }
.vg5-password-meter { display: flex; gap: 5px; margin-top: 8px; }
.vg5-password-meter span { height: 4px; flex: 1; border-radius: 999px; background: rgba(255,255,255,.11); }
.vg5-password-meter[data-score="1"] span:nth-child(1),
.vg5-password-meter[data-score="2"] span:nth-child(-n+2),
.vg5-password-meter[data-score="3"] span:nth-child(-n+3) { background: linear-gradient(90deg, var(--vg5-primary), var(--vg5-green)); }
.vg5-auth-note { color: var(--vg5-muted); font-size: 13px; line-height: 1.6; text-align: center; }
.vg5-auth-note a { color: var(--vg5-accent); }
@media (max-width: 980px) {
  .vg5-auth-layout { grid-template-columns: 1fr; }
  .vg5-auth-side { min-height: auto; }
}
@media (max-width: 620px) {
  .vg5-auth-shell { width: min(100% - 22px, 1180px); }
  .vg5-auth-top { min-height: 72px; }
  .vg5-auth-layout { padding-top: 4px; }
  .vg5-auth-side { display: none; }
  .vg5-auth-card { padding: 18px; border-radius: 24px; }
  .vg5-form-row, .vg5-social-row { grid-template-columns: 1fr; }
  .vg5-auth-tools { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* v5.7 auth refinement: real logo alignment and captcha containers */
.vg5-auth-logo {
  width: 54px;
  height: 54px;
  padding: 8px;
}
.vg5-auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vg5-auth-brand {
  min-width: 0;
}
.vg5-auth-brand > span:last-child {
  min-width: 0;
}
.vg5-auth-brand strong {
  color: var(--vg5-text);
  max-width: min(620px, 62vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vg5-auth-brand span span {
  max-width: min(520px, 60vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cf-turnstile,
.g-recaptcha {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--vg5-line);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  overflow: hidden;
}
.vg5-auth-side::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  right: 42px;
  bottom: 42px;
  border-radius: 34px;
  border: 1px solid var(--vg5-line);
  background: linear-gradient(135deg, rgba(255,63,50,.16), rgba(37,217,232,.10));
  opacity: .45;
  animation: vg5AuthFloat 8s ease-in-out infinite;
}
@keyframes vg5AuthFloat {
  0%,100% { transform: translate3d(0,0,0) rotate(-5deg); }
  50% { transform: translate3d(0,-14px,0) rotate(5deg); }
}
@media (max-width: 620px) {
  .vg5-auth-brand strong,
  .vg5-auth-brand span span { max-width: 250px; }
  .vg5-auth-logo { width: 46px; height: 46px; }
}

/* v8 auth polish: brand icon alignment + captcha spacing */
.vg5-auth-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.vg5-auth-logo { width: 52px; height: 52px; border-radius: 18px; display: inline-grid; place-items: center; flex: 0 0 52px; overflow: hidden; border: 1px solid var(--vg5-border); background: color-mix(in srgb, var(--vg5-primary) 10%, transparent); }
.vg5-auth-logo img { max-width: 82%; max-height: 82%; object-fit: contain; display: block; }
.vg5-auth-brand > span:last-child { min-width: 0; display: grid; gap: 3px; }
.vg5-auth-brand strong { font-weight: 560; letter-spacing: -.025em; line-height: 1.2; }
.vg5-auth-brand span span { color: var(--vg5-muted); font-size: 13px; line-height: 1.35; }
.cf-turnstile, .g-recaptcha { margin: 12px 0 2px; }
.vg5-auth-feature { transition: border-color .22s ease, background .22s ease; }
.vg5-auth-feature:hover { border-color: color-mix(in srgb, var(--vg5-primary) 34%, var(--vg5-border)); background: color-mix(in srgb, var(--vg5-primary) 6%, transparent); }
@media (max-width: 560px) { .vg5-auth-logo { width: 46px; height: 46px; flex-basis: 46px; } .vg5-auth-brand strong { font-size: 15px; } }

/* v9: auth pages use same real site header/footer */
.vg5-auth-body { padding-bottom: 92px; }
.vg5-auth-shell { padding-top: 34px; }
.vg5-auth-shell > .vg5-auth-top { display: none !important; }
.vg5-auth-brand { align-items: center; }
.vg5-auth-brand .vg5-auth-logo { display:inline-flex; align-items:center; justify-content:center; }
.vg5-auth-brand .vg5-auth-logo img { max-height: 42px; object-fit: contain; }
.vg5-auth-card { box-shadow: 0 24px 70px rgba(0,0,0,.26); }
.vg5-auth-side { position: relative; overflow: hidden; }
.vg5-auth-side::before { content:""; position:absolute; inset:auto -10% -25% 20%; height:260px; background: radial-gradient(circle, rgba(20,214,229,.16), transparent 70%); pointer-events:none; }
.vg5-auth-feature { transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.vg5-auth-feature:hover { transform: translateY(-2px); border-color: rgba(20,214,229,.35); box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.vg5-auth-submit { position: relative; overflow: hidden; }
.vg5-auth-submit::after { content:""; position:absolute; inset:0; background:linear-gradient(120deg, transparent, rgba(255,255,255,.22), transparent); transform:translateX(-120%); transition:transform .7s ease; }
.vg5-auth-submit:hover::after { transform:translateX(120%); }
@media (max-width: 760px) { .vg5-auth-shell { padding: 18px 12px 80px; } }
