/* Google Account inspired auth page.
   Only targets #auth-wrapper; form IDs and JS hooks are unchanged. */

:root {
  --auth-blue: #1a73e8;
  --auth-blue-hover: #1765cc;
  --auth-ink: #202124;
  --auth-muted: #5f6368;
  --auth-line: #dadce0;
  --auth-soft: #f8fafd;
  --auth-red: #ea4335;
  --auth-yellow: #fbbc04;
  --auth-green: #34a853;
}

#auth-wrapper[hidden] {
  display: none !important;
}

#auth-wrapper.google-auth-screen:not([hidden]) {
  width: 100vw !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 32px !important;
  overflow: hidden !important;
  background:
    radial-gradient(720px 360px at 52% -120px, rgba(232, 240, 254, .95), transparent 72%),
    var(--auth-soft);
  color: var(--auth-ink);
  font-family: "Google Sans", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

#auth-wrapper .google-auth-card {
  width: min(980px, calc(100vw - 64px)) !important;
  height: min(620px, calc(100vh - 64px)) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 420px minmax(0, 1fr) !important;
  background: #fff !important;
  border: 1px solid var(--auth-line) !important;
  border-radius: 32px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

#auth-wrapper .auth-hero {
  position: relative;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 48px !important;
  background: #fff !important;
  border: 0 !important;
  border-right: 1px solid #edf0f5 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

#auth-wrapper .auth-product-mark {
  display: flex;
  gap: 6px;
  align-items: center;
}

#auth-wrapper .auth-product-mark span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

#auth-wrapper .auth-product-mark span:nth-child(1) { background: var(--auth-blue); }
#auth-wrapper .auth-product-mark span:nth-child(2) { background: var(--auth-red); }
#auth-wrapper .auth-product-mark span:nth-child(3) { background: var(--auth-yellow); }
#auth-wrapper .auth-product-mark span:nth-child(4) { background: var(--auth-green); }

#auth-wrapper .auth-hero::after {
  content: "";
  position: absolute;
  right: -94px;
  bottom: -94px;
  width: 286px;
  height: 286px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 46%, transparent 47%),
    conic-gradient(var(--auth-blue) 0 28%, var(--auth-red) 28% 52%, var(--auth-yellow) 52% 74%, var(--auth-green) 74% 100%);
  opacity: .16;
}

#auth-wrapper .auth-hero h2 {
  max-width: 440px;
  margin: 72px 0 0;
  color: var(--auth-ink);
  font-size: clamp(42px, 5.2vw, 60px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -.045em;
}

#auth-wrapper .auth-hero p {
  max-width: 430px;
  margin: 22px 0 0;
  color: var(--auth-muted);
  font-size: 18px;
  line-height: 1.7;
}

#auth-wrapper .auth-hero ul {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

#auth-wrapper .auth-hero li {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--auth-muted);
  font-size: 15px;
}

#auth-wrapper .auth-hero li::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--auth-blue);
}

#auth-wrapper .auth-panel {
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: auto !important;
}

#auth-wrapper .brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 42px;
}

#auth-wrapper .brand-mark,
#auth-wrapper .brand-mark.brand-mark-logo {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

#auth-wrapper .brand-mark img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: block;
}

#auth-wrapper .brand-lockup b {
  display: block;
  color: #5f6368;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -.02em;
}

#auth-wrapper .brand-lockup small {
  display: block;
  margin-top: 2px;
  color: var(--auth-muted);
  font-size: 13px;
}

#auth-wrapper .auth-form {
  width: min(100%, 420px) !important;
  display: flex !important;
  flex-direction: column;
  gap: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#auth-wrapper .auth-form[hidden] {
  display: none !important;
}

#auth-wrapper .auth-form h1 {
  margin: 0;
  color: var(--auth-ink);
  font-size: 36px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -.03em;
}

#auth-wrapper .auth-form > p {
  margin: -8px 0 8px;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.7;
}

#auth-wrapper .auth-form label {
  display: grid;
  gap: 8px;
  color: var(--auth-ink);
}

#auth-wrapper .auth-form label > span {
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 500;
}

#auth-wrapper .auth-form input {
  height: 56px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid var(--auth-line);
  border-radius: 4px;
  background: #fff;
  color: var(--auth-ink);
  outline: none;
  box-shadow: none;
  color-scheme: light;
}

#auth-wrapper .auth-form input:focus {
  border-color: var(--auth-blue);
  box-shadow: inset 0 0 0 1px var(--auth-blue);
}

#auth-wrapper .auth-form input::placeholder {
  color: #9aa0a6;
}

#auth-wrapper .inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

#auth-wrapper .auth-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

#auth-wrapper .form-switch {
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
}

#auth-wrapper .form-switch a {
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

#auth-wrapper .auth-product-link {
  margin-top: 4px;
}

#auth-wrapper .primary-action,
#auth-wrapper .secondary-action {
  height: 40px;
  border-radius: 20px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
}

#auth-wrapper .primary-action {
  min-width: 92px;
  padding: 0 24px;
  border: 1px solid var(--auth-blue);
  background: var(--auth-blue);
  color: #fff;
}

#auth-wrapper .primary-action:hover {
  background: var(--auth-blue-hover);
  border-color: var(--auth-blue-hover);
}

#auth-wrapper .secondary-action {
  min-width: 112px;
  padding: 0 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--auth-blue);
}

#auth-wrapper .secondary-action:hover {
  background: #f8fafd;
}

@media (max-width: 860px) {
  #auth-wrapper.google-auth-screen:not([hidden]) {
    padding: 16px !important;
    overflow: auto !important;
  }

  #auth-wrapper .google-auth-card {
    width: min(100%, 520px) !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    border-radius: 28px !important;
  }

  #auth-wrapper .auth-hero {
    height: auto !important;
    padding: 28px 28px 18px !important;
    border-right: 0 !important;
    border-bottom: 1px solid #edf0f5 !important;
  }

  #auth-wrapper .auth-hero h2 {
    margin-top: 48px;
    font-size: 40px;
  }

  #auth-wrapper .auth-hero p {
    font-size: 16px;
  }

  #auth-wrapper .auth-hero ul,
  #auth-wrapper .auth-hero::after {
    display: none;
  }

  #auth-wrapper .auth-panel {
    height: auto !important;
    padding: 28px !important;
    overflow: visible !important;
  }

  #auth-wrapper .auth-form {
    width: 100%;
  }

  #auth-wrapper .inline-control,
  #auth-wrapper .auth-actions-row {
    grid-template-columns: 1fr;
  }

  #auth-wrapper .auth-actions-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
