.mct-auth-page {
  margin: 0 !important;
  min-height: 100vh;
  color: #f4f7ff;
  background-color: #03070f !important;
  background-image:
    linear-gradient(rgba(70, 130, 255, .20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 130, 255, .20) 1px, transparent 1px) !important;
  background-size: 45px 45px !important;
  background-position: center !important;
}

.mct-auth-page::before { display: none !important; }

.auth-main {
  display: grid;
  min-height: calc(100vh - 145px);
  place-items: center;
  padding: 62px 24px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  align-items: center;
  gap: clamp(38px, 8vw, 110px);
  width: min(1050px, 100%);
}

.auth-intro { max-width: 520px; }
.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 20px;
  color: #a9bddf;
  font: 700 10px/1.4 "DM Mono", monospace;
  letter-spacing: .2em;
}
.auth-eyebrow > span {
  width: 20px;
  height: 1px;
  background: #ff7955;
}
.auth-intro h1 {
  margin: 0;
  color: #fff;
  font: 800 clamp(42px, 6vw, 72px)/.99 Manrope, "DM Sans", sans-serif;
  letter-spacing: -.065em;
}
.auth-intro h1 em {
  color: #93b2ff;
  font-family: Georgia, serif;
  font-weight: 700;
  letter-spacing: -.055em;
}
.auth-intro > p:not(.auth-eyebrow) {
  max-width: 455px;
  margin: 23px 0 0;
  color: #a8bbdc;
  font: 400 15px/1.85 Manrope, "DM Sans", sans-serif;
}
.auth-promise {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 27px;
  color: #d7e4ff;
  font-size: 12px;
}
.auth-promise span { color: #ff7955; }

.auth-card {
  padding: 30px;
  border: 1px solid rgba(161, 190, 245, .2);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(15, 39, 83, .95), rgba(7, 22, 51, .96));
  box-shadow: 0 28px 90px rgba(0, 5, 22, .38), inset 0 1px rgba(255, 255, 255, .04);
}
.auth-loading { padding: 34px 0; color: #a8bbdc; text-align: center; font-size: 13px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border: 1px solid rgba(161, 190, 245, .14); border-radius: 11px; background: rgba(1, 10, 27, .42); }
.auth-tab { min-height: 40px; border: 0; border-radius: 8px; color: #9eb2d8; background: transparent; font: 700 12px Manrope, sans-serif; cursor: pointer; }
.auth-tab.is-active { color: #fff; background: rgba(96, 139, 222, .24); box-shadow: inset 0 0 0 1px rgba(143, 178, 244, .18); }
.google-button,
.auth-submit,
.sign-out-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 47px;
  border-radius: 9px;
  font: 800 12px Manrope, "DM Sans", sans-serif;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.google-button { margin-top: 18px; border: 1px solid rgba(172, 197, 242, .25); color: #eff4ff; background: rgba(255, 255, 255, .045); }
.google-button:hover,.auth-submit:hover,.sign-out-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.google-g { color: #8db3ff; font: 800 18px Arial, sans-serif; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 19px 0; color: #8198c0; font: 500 9px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.auth-divider::before,.auth-divider::after { height: 1px; flex: 1; background: rgba(161, 190, 245, .15); content: ""; }
.auth-form { display: grid; gap: 14px; }
.auth-form[hidden],.account-panel[hidden],#authForms[hidden] { display: none !important; }
.auth-form label { display: grid; gap: 7px; color: #b7c8e5; font: 700 11px Manrope, sans-serif; }
.auth-form input { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid rgba(149, 177, 226, .2); border-radius: 8px; outline: 0; color: #f4f7ff; background: rgba(2, 12, 31, .65); font: 500 12px Manrope, sans-serif; }
.auth-form input:focus { border-color: #83a9ff; box-shadow: 0 0 0 3px rgba(92, 139, 231, .14); }
.auth-form input::placeholder { color: #738bb5; }
.forgot-button { justify-self: end; padding: 2px 0; border: 0; color: #9cbaff; background: none; font: 700 10px Manrope, sans-serif; cursor: pointer; }
.forgot-button:hover { color: #fff; }
.forgot-button:disabled { opacity: .55; cursor: wait; }
.auth-submit { margin-top: 4px; border: 0; color: white; background: linear-gradient(105deg, #386ed4, #5f8ff0); box-shadow: 0 10px 22px rgba(44, 93, 189, .2); text-decoration: none; }
.auth-message { min-height: 18px; margin: 13px 0 0; color: #ffbd9f; font: 600 11px/1.6 Manrope, sans-serif; }
.auth-message.is-success { color: #9ce3bf; }
.auth-message.is-error { color: #ffb0a1; }
.auth-footnote { margin: 12px 0 0; color: #7389af; font: 400 9px/1.6 Manrope, sans-serif; text-align: center; }
.account-panel { text-align: center; }
.account-avatar { display: grid; width: 58px; height: 58px; margin: 0 auto 19px; place-items: center; border: 1px solid rgba(155, 188, 255, .35); border-radius: 18px; color: #fff; background: linear-gradient(145deg, #315da8, #172d5e); font: 800 23px Manrope, sans-serif; }
.account-eyebrow { justify-content: center; margin-bottom: 9px; }
.account-panel h2 { margin: 0; font: 800 23px Manrope, sans-serif; letter-spacing: -.04em; }
.account-email { margin: 8px 0 17px; color: #a8bbdc; font-size: 12px; overflow-wrap: anywhere; }
.sign-out-button { margin-top: 11px; border: 1px solid rgba(160, 187, 235, .25); color: #d8e4fb; background: rgba(255, 255, 255, .035); }
.auth-footer { display: flex; justify-content: space-between; gap: 15px; width: min(1050px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 27px; color: #7f95ba; font: 500 10px Manrope, sans-serif; }
.auth-footer a { color: #a8bbdc; text-decoration: none; }
.auth-footer a:hover { color: white; }
.mct-auth-page button:focus-visible,.mct-auth-page a:focus-visible { outline: 2px solid #9cbaff; outline-offset: 3px; }

@media (max-width: 780px) {
  .auth-main { min-height: auto; padding: 44px 18px 48px; }
  .auth-layout { grid-template-columns: 1fr; gap: 29px; width: min(470px, 100%); }
  .auth-intro { text-align: center; }
  .auth-eyebrow { justify-content: center; }
  .auth-intro h1 { font-size: clamp(39px, 11vw, 57px); }
  .auth-intro > p:not(.auth-eyebrow) { margin: 15px auto 0; font-size: 13px; }
  .auth-promise { margin-top: 17px; }
  .auth-card { padding: 22px; }
}

@media (max-width: 430px) {
  .auth-main { padding: 34px 14px 40px; }
  .auth-card { padding: 18px; border-radius: 16px; }
  .auth-footer { width: calc(100% - 28px); flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .google-button,.auth-submit,.sign-out-button { transition: none; }
}


/* Sign-in enhancements: password visibility, remember choice and busy states */
.password-field { position: relative; display: flex; align-items: center; min-width: 0; }
.auth-form .password-field input { padding-right: 68px; }
.password-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  min-height: 30px; padding: 0 8px; border: 1px solid rgba(149,177,226,.18);
  border-radius: 6px; color: #a9c4ff; background: rgba(96,139,222,.12);
  font: 700 10px Manrope,sans-serif; cursor: pointer;
}
.password-toggle:hover { color: #fff; background: rgba(96,139,222,.22); }
.remember-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; color: #a8bbdc !important; font-size: 11px !important; cursor: pointer; }
.auth-form .remember-row input { width: 15px; min-height: 15px; height: 15px; margin: 0; padding: 0; accent-color: #6f9cff; }
.mct-auth-page button:disabled { opacity: .58; cursor: wait; transform: none; filter: none; }
@media (max-width: 430px) {
  .password-toggle { right: 6px; }
  .auth-form .password-field input { padding-right: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  .password-toggle { transition: none; }
}


/* Center the sign-in card when the introductory copy is removed. */
.auth-layout.auth-layout-single {
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
}


/* MCT sign-in refresh — premium layout and accessible interaction states */
.auth-main {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 145px);
  padding-top: clamp(38px, 6vh, 70px);
  padding-bottom: clamp(38px, 6vh, 70px);
}
.auth-main::before,
.auth-main::after {
  position: absolute;
  z-index: -1;
  width: min(34vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  filter: blur(2px);
}
.auth-main::before {
  top: 7%;
  left: 8%;
  background: radial-gradient(circle, rgba(40, 104, 231, .17), transparent 68%);
}
.auth-main::after {
  right: 7%;
  bottom: 3%;
  background: radial-gradient(circle, rgba(34, 91, 203, .14), transparent 68%);
}
.auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(24px, 4vw, 38px);
  border-color: rgba(145, 178, 242, .24);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(56, 108, 204, .16), transparent 54%),
    linear-gradient(145deg, rgba(12, 31, 68, .97), rgba(5, 17, 41, .98));
  box-shadow: 0 30px 100px rgba(0, 5, 22, .48), inset 0 1px rgba(255,255,255,.07);
  backdrop-filter: blur(18px);
}
.auth-card::before {
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 181, 255, .7), transparent);
  content: "";
}
.auth-heading { margin: 0 0 25px; text-align: center; }
.auth-brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 15px;
  place-items: center;
  border: 1px solid rgba(153, 188, 255, .38);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, #3974dc, #142d62);
  box-shadow: 0 10px 28px rgba(37, 91, 190, .28), inset 0 1px rgba(255,255,255,.2);
  font: 800 22px Manrope, sans-serif;
}
.auth-kicker {
  margin: 0 0 9px;
  color: #91b3f4;
  font: 700 9px/1.5 "DM Mono", monospace;
  letter-spacing: .19em;
}
.auth-heading h1,
.account-panel h1 {
  margin: 0;
  color: #f8faff;
  font: 800 clamp(25px, 5vw, 32px)/1.2 Manrope, sans-serif;
  letter-spacing: -.055em;
}
.auth-heading h1 span { color: #91b4ff; }
.auth-subtitle {
  margin: 9px 0 0;
  color: #9fb2d3;
  font: 500 12px/1.6 Manrope, sans-serif;
}
.auth-loading {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #b7c9e9;
  font: 600 12px Manrope, sans-serif;
}
.auth-spinner {
  width: 27px;
  height: 27px;
  border: 2px solid rgba(143, 178, 244, .2);
  border-top-color: #8fb4ff;
  border-radius: 50%;
  animation: mct-auth-spin .8s linear infinite;
}
@keyframes mct-auth-spin { to { transform: rotate(360deg); } }
.auth-tabs { padding: 4px; border-radius: 12px; }
.auth-tab { min-height: 43px; font-size: 12px; }
.auth-tab:focus-visible,
.password-toggle:focus-visible,
.forgot-button:focus-visible {
  outline: 2px solid #a9c5ff;
  outline-offset: 3px;
}
.google-button {
  min-height: 49px;
  margin-top: 17px;
  border-radius: 10px;
  font-size: 12px;
}
.google-g {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.auth-divider { margin: 21px 0; font-size: 9px; }
.auth-form { gap: 16px; }
.auth-form label { gap: 8px; font-size: 11px; }
.auth-form input {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-form input:hover { border-color: rgba(149, 177, 226, .38); }
.auth-form input:focus { background: rgba(4, 16, 39, .9); }
.auth-form .password-field input { padding-right: 72px; }
.password-toggle {
  right: 9px;
  min-width: 43px;
  min-height: 31px;
  border-radius: 7px;
  font-size: 10px;
}
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -1px;
}
.remember-row { min-width: 0; }
.forgot-button { font-size: 10px; }
.auth-submit {
  min-height: 50px;
  border-radius: 10px;
  font-size: 12px;
  letter-spacing: .015em;
  background: linear-gradient(105deg, #3269ce, #6595f5);
  box-shadow: 0 12px 26px rgba(44, 93, 189, .26), inset 0 1px rgba(255,255,255,.16);
}
.auth-submit:hover { box-shadow: 0 15px 30px rgba(44, 93, 189, .34); }
.google-button:disabled,
.auth-submit:disabled,
.sign-out-button:disabled { opacity: .65; cursor: wait; }
[data-auth-action].is-loading { position: relative; color: transparent !important; pointer-events: none; }
[data-auth-action].is-loading::after {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: mct-auth-spin .7s linear infinite;
}
.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 0 0;
  color: #7f98bf;
  font: 500 9px/1.5 Manrope, sans-serif;
  text-align: center;
}
.auth-security-note span { color: #8fb4ff; font-size: 8px; }
.auth-message {
  min-height: 0;
  margin: 14px 0 0;
  padding: 0;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.auth-message:not(:empty) {
  padding: 10px 12px;
  border: 1px solid rgba(255, 176, 161, .2);
  border-radius: 9px;
  background: rgba(117, 42, 43, .12);
}
.auth-message.is-success:not(:empty) {
  border-color: rgba(117, 216, 164, .2);
  background: rgba(38, 112, 81, .12);
}
.auth-footnote { margin-top: 17px; font-size: 9px; }
.account-panel { padding: 8px 0 3px; }
.account-avatar {
  width: 66px;
  height: 66px;
  margin-bottom: 19px;
  border-radius: 20px;
  font-size: 25px;
}
.account-email { margin: 11px 0 17px; font-size: 12px; }
.account-success {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 17px;
  color: #9ce3bf;
  font: 600 11px Manrope, sans-serif;
}
.account-success span { font-size: 15px; }
.account-app-link { box-sizing: border-box; }
.sign-out-button { min-height: 46px; border-radius: 10px; }
.auth-footer { padding-bottom: 24px; font-size: 10px; }
.auth-footer a { transition: color .18s ease; }
.auth-footer a:hover { color: #fff; }
@media (max-width: 600px) {
  .auth-main { min-height: auto; padding: 32px 15px 38px; }
  .auth-layout.auth-layout-single { width: min(460px, 100%); }
  .auth-card { padding: 23px 19px; border-radius: 19px; }
  .auth-heading { margin-bottom: 21px; }
  .auth-brand-mark { width: 44px; height: 44px; border-radius: 14px; }
  .auth-form { gap: 14px; }
  .auth-form input { min-height: 47px; font-size: 13px; }
  .auth-options { align-items: flex-start; }
  .auth-footer { width: calc(100% - 30px); }
}
@media (max-width: 360px) {
  .auth-card { padding: 20px 15px; }
  .auth-options { flex-wrap: wrap; }
  .auth-heading h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-spinner,
  [data-auth-action].is-loading::after { animation: none; }
  .auth-form input,
  .auth-footer a { transition: none; }
}


/* Ensure the initial account-loading screen respects the HTML hidden state. */
.auth-loading[hidden] {
  display: none !important;
}


/* Display the repository's root-level MCT logo instead of the old M placeholder. */
.auth-heading > img.auth-brand-mark {
  display: block !important;
  width: auto !important;
  height: 62px !important;
  max-width: min(190px, 72%) !important;
  margin: 0 auto 15px !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}


/* Replace the signed-in account M tile with the repository MCT logo. */
.account-panel img.account-avatar {
  display: block !important;
  width: 66px !important;
  height: 66px !important;
  margin: 0 auto 19px !important;
  padding: 0 !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Round the corners of the existing MCT logo images. */
.auth-heading > img.auth-brand-mark,
.account-panel img.account-avatar {
  border-radius: 14px !important;
}


/* MCT account email verification */
.account-verification-actions{display:grid;gap:10px;margin:0 0 17px}
.account-verification-actions[hidden]{display:none!important}
.account-verification-help{margin:0;color:#a8bbdc;font:500 11px/1.65 Manrope,sans-serif}
.account-success.is-unverified{color:#ffd08a}
.account-verify-button{width:100%;box-sizing:border-box;cursor:pointer}
.account-refresh-verify{min-height:42px;padding:10px 14px;border:1px solid rgba(160,187,235,.28);border-radius:10px;color:#d8e4fb;background:rgba(255,255,255,.045);font:600 11px Manrope,sans-serif;cursor:pointer;transition:background .2s,border-color .2s}
.account-refresh-verify:hover{background:rgba(75,112,190,.18);border-color:rgba(160,187,235,.55)}
.account-refresh-verify:disabled,.account-verify-button:disabled{opacity:.6;cursor:wait}
