* { box-sizing: border-box; }

body.auth-page {
  margin: 0; min-height: 100vh; padding: 24px 24px 54px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(160deg, #f7faff 0%, #eaf1fc 100%);
  font-family: 'Roboto', Arial, sans-serif; color: #202124; font-size: 14px;
}

.auth-card {
  width: 100%; max-width: 400px; background: #fff; border-radius: 16px;
  padding: 36px 32px 30px;
  box-shadow: 0 1px 3px rgba(60,64,67,.12), 0 10px 30px rgba(60,64,67,.08);
}

.auth-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.auth-brand svg { width: 30px; height: 30px; }
.auth-brand span { font-size: 21px; font-weight: 500; color: #5f6368; letter-spacing: -.2px; }

.auth-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 500; }
.auth-sub { margin: 0 0 22px; color: #5f6368; line-height: 1.5; }
.auth-card h1 + form, .auth-card h1 + .alert { margin-top: 20px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #3c4043; }
.field input {
  width: 100%; height: 44px; padding: 0 14px; font: inherit; font-size: 15px; color: #202124;
  border: 1px solid #dadce0; border-radius: 8px; background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: #0b57d0; box-shadow: 0 0 0 3px rgba(11,87,208,.14); }
.field-hint { margin: 6px 0 0; font-size: 12.5px; color: #5f6368; line-height: 1.45; }

/* username + @domain */
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-radius: 8px 0 0 8px; border-right: none; min-width: 0; }
.input-suffix .suffix {
  display: flex; align-items: center; padding: 0 12px; font-size: 14px; color: #5f6368;
  background: #f5f7fa; border: 1px solid #dadce0; border-radius: 0 8px 8px 0; white-space: nowrap;
}
.input-suffix:focus-within .suffix { border-color: #0b57d0; }

/* password strength bar */
.pw-meter { margin-top: 10px; }
.pw-meter[hidden] { display: none; }
.pw-meter-track { height: 6px; border-radius: 3px; background: #e8eaed; overflow: hidden; }
.pw-meter-fill { height: 100%; width: 0; border-radius: 3px; background: #d93025; transition: width .25s ease, background-color .25s ease; }
.pw-meter-text { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; font-size: 12.5px; line-height: 1.4; }
.pw-meter-label { font-weight: 500; white-space: nowrap; }
.pw-meter-tip { color: #5f6368; }

/* password + eye */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: none; border-radius: 6px;
  background: transparent; color: #80868b; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pw-toggle:hover { background: #f1f3f4; color: #3c4043; }
.pw-toggle.on { color: #0b57d0; }
.pw-toggle svg { width: 20px; height: 20px; }

.btn-primary {
  width: 100%; height: 44px; margin-top: 6px; border: none; border-radius: 22px;
  background: #0b57d0; color: #fff; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn-primary:hover { background: #0a4cb8; box-shadow: 0 1px 3px rgba(11,87,208,.4); }

.auth-row { display: flex; justify-content: flex-end; margin: -6px 0 14px; }
.auth-link { color: #0b57d0; text-decoration: none; font-weight: 500; font-size: 13.5px; }
.auth-link:hover { text-decoration: underline; }

.auth-switch { margin: 22px 0 0; text-align: center; color: #5f6368; }

.alert { padding: 12px 14px; border-radius: 8px; font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; }
.alert-error { background: #fce8e6; color: #a50e0e; }
.alert-success { background: #e6f4ea; color: #137333; }

.auth-footer {  /* same bar as the footer inside the app */
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0; height: 30px; line-height: 30px; text-align: center;
  font-size: 12px; color: #5f6368; background: #fff; border-top: 1px solid #e8eaed; z-index: 10;
}

@media (max-width: 440px) {
  body.auth-page { padding: 0 0 30px; background: #fff; justify-content: flex-start; }
  .auth-card { box-shadow: none; border-radius: 0; padding: 32px 22px; max-width: none; }
}

/* Password eye: closed (slashed) while hidden, open while shown */
.pw-toggle .eye-open { display: none; }
.pw-toggle .eye-closed { display: block; }
.pw-toggle.on .eye-open { display: block; }
.pw-toggle.on .eye-closed { display: none; }

/* Close button on notices */
.alert.has-x, .settings-alert.has-x, .import-result.has-x { position: relative; padding-right: 40px; }
.alert-x { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: .6; padding: 0; }
.alert-x:hover { opacity: 1; background: rgba(0,0,0,.08); }

.auth-footer a { color: #5f6368; text-decoration: none; font-weight: 500; }
.auth-footer a:hover { color: #1a73e8; text-decoration: underline; }

/* signed-out footer: copyright | Privacy & Security, centred */
.auth-footer { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 0 12px; box-sizing: border-box; white-space: nowrap; }
.auth-footer-sep { color: #bdc1c6; }
@media (max-width: 440px) { .auth-footer { font-size: 11px; gap: 6px; } }

/* "or" divider and the secondary way to sign in (security questions) */
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: #80868b; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: #dadce0; }
.btn-secondary { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1.5px solid #0b57d0; border-radius: 12px; background: #f4f8ff; color: #0b57d0; font: inherit; text-align: left; cursor: pointer; }
.btn-secondary:hover { background: #e8f0fe; }
.btn-secondary .btn-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid #c7d7f5; color: #202124; display: flex; align-items: center; justify-content: center; }
.btn-secondary span:last-child { display: flex; flex-direction: column; font-size: 14.5px; font-weight: 600; }
.btn-secondary small { font-size: 12.5px; font-weight: 400; color: #5f6368; margin-top: 2px; }

.otp-label-row { margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.otp-label-row label { margin: 0; }
.otp-resend { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 500; }
.auth-row.otp-links { justify-content: space-between; margin: 18px 0 0; }

/* slide between the code screen and the security questions */
.auth-slide { will-change: transform, opacity; }
