/* Focused, high-contrast email sign-in surface. */
.auth-modal[hidden] { display: none !important; }
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  isolation: isolate;
}
.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 12, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: authFade .18s ease both;
}
.auth-card {
  --auth-card: #121b20;
  --auth-line: #35444a;
  --auth-muted: #a4b1b5;
  position: relative;
  width: min(100%, 448px);
  padding: 32px;
  overflow: hidden;
  border: 1px solid #35444a;
  border-radius: 16px;
  background: var(--auth-card);
  color: #f2f6f6;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .46), 0 1px 0 rgba(255, 255, 255, .04) inset;
  animation: authRise .22s cubic-bezier(.2, .8, .2, 1) both;
}
.auth-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: transparent;
  color: #b6c2c6;
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  transition: background .16s, color .16s, border-color .16s;
}
.auth-close:hover { border-color: #61737a; background: rgba(255, 255, 255, .07); color: #fff; }
.auth-brand { display: flex; align-items: center; gap: 10px; color: #c6d1d4; font-size: 12px; font-weight: 650; }
.auth-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #31695f;
  border-radius: 9px;
  background: #16332f;
  color: #75dbc2;
}
.auth-mark svg { width: 18px; height: 18px; }
.auth-eyebrow { margin: 26px 0 7px; color: #72d6bd; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.auth-card h2 { margin: 0; color: #f5f8f8; font-size: 26px; font-weight: 680; line-height: 1.25; }
.auth-sub { margin: 8px 0 22px; color: var(--auth-muted); font-size: 13px; line-height: 1.55; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 11px;
  color: #8d9da2;
  font-size: 10px;
  font-weight: 600;
}
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; flex: 1; background: #2d3b41; }
.auth-providers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.auth-provider {
  display: flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid #39494f;
  border-radius: 8px;
  background: #0d1519;
  color: #e5eded;
  font-family: inherit;
  font-size: 11px;
  font-weight: 620;
  line-height: 1;
  transition: border-color .16s, background .16s, color .16s, transform .12s;
}
.auth-provider svg { width: 17px; height: 17px; flex: none; }
.auth-provider:hover:not(:disabled) { border-color: #64757a; background: #172227; color: #fff; }
.auth-provider:active:not(:disabled) { transform: translateY(1px); }
.auth-provider:disabled { color: #78868a; cursor: not-allowed; opacity: .62; }
.auth-provider.is-unavailable { text-decoration: line-through; text-decoration-thickness: 1px; }
.auth-provider-state { min-height: 16px; margin: 5px 0 0; color: #b9c4c7; font-size: 10px; line-height: 1.5; text-align: center; }
.auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 16px 0 23px;
  padding: 4px;
  border: 1px solid #2c3a40;
  border-radius: 9px;
  background: #0d1519;
}
.auth-mode-btn {
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #a6b3b7;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  transition: background .16s, color .16s, border-color .16s;
}
.auth-mode-btn:hover:not(.is-active) { color: #eef4f4; background: rgba(255, 255, 255, .045); }
.auth-mode-btn.is-active { border-color: #46565d; background: #28363c; color: #fff; }
.auth-card #authRegisterFields { position: relative; margin: -5px 0 18px; }
.auth-card #authRegisterFields label,
.auth-form label { display: block; margin: 0 0 8px; color: #d2dcdf; font-size: 12px; font-weight: 620; }
.auth-field {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 1px solid #3b4b52;
  border-radius: 8px;
  background: #0d1519;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.auth-field:focus-within { border-color: #54bea5; background: #101b1f; box-shadow: 0 0 0 3px rgba(54, 179, 150, .14); }
.auth-field:has(input:disabled) { border-color: #303c41; background: #141e22; }
.auth-field svg { width: 17px; height: 17px; flex: none; color: #9aabb0; }
.auth-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #f4f7f7; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; }
.auth-field input::placeholder { color: #87979c; opacity: 1; }
.auth-field input:disabled { color: #b0babc; cursor: not-allowed; }
.auth-invite-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.auth-invite-row .auth-field { height: 44px; }
.auth-invite-row input { text-transform: uppercase; }
.auth-invite-check {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #4d6769;
  border-radius: 8px;
  background: #213b3b;
  color: #d4f3ea;
  font-family: inherit;
  font-size: 11px;
  font-weight: 620;
  line-height: 1.2;
  white-space: nowrap;
}
.auth-invite-check:hover:not(:disabled) { border-color: #6aa99d; background: #2a4b49; }
.auth-invite-check:disabled { color: #a5b2b4; background: #253135; cursor: wait; }
.auth-invite-state { min-height: 15px; margin: 6px 0 0; color: var(--auth-muted); font-size: 11px; }
.auth-invite-state.is-valid { color: #72d6bd; }
.auth-invite-state.is-error { color: #ff9b9b; }
.auth-credit-note { margin-top: 4px; color: var(--auth-muted); font-size: 11px; }
.auth-code-label { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0 7px; }
.auth-code-label label { margin: 0 !important; }
.auth-send {
  display: inline-flex;
  min-width: 112px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #397b70;
  border-radius: 7px;
  background: #1a423c;
  color: #b9f3e4;
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.auth-send:hover:not(:disabled) { border-color: #64bda9; background: #23574e; color: #fff; }
.auth-send:active:not(:disabled) { transform: translateY(1px); }
.auth-send:focus-visible { outline: 2px solid #78dec7; outline-offset: 2px; }
.auth-send:disabled {
  border-color: #53666c;
  background: #304047;
  color: #d1dcdf;
  opacity: 1;
  cursor: not-allowed;
}
.auth-message { min-height: 18px; margin: 9px 0 8px; color: var(--auth-muted); font-size: 11px; line-height: 1.5; }
.auth-message.is-error { color: #ff9b9b; }
.auth-message.is-success { color: #72d6bd; }
.auth-submit {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #256b84;
  border-radius: 8px;
  background: #14627c;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 670;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.auth-submit:hover:not(:disabled) { border-color: #368da4; background: #19758e; }
.auth-submit:active:not(:disabled) { transform: translateY(1px); }
.auth-submit:disabled { border-color: #45545a; background: #344248; color: #d2dcdf; opacity: 1; cursor: not-allowed; }
.auth-submit.is-loading { cursor: progress; }
.auth-submit svg { width: 17px; height: 17px; transition: transform .15s; }
.auth-submit:hover:not(:disabled) svg { transform: translateX(3px); }
.auth-switch-method {
  display: block;
  margin: 9px auto 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #7fd4c0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 580;
  cursor: pointer;
}
.auth-switch-method:hover { color: #b4f0e2; text-decoration: underline; }
.auth-switch-method[hidden] { display: none !important; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; color: #a5b1b5; font-size: 10px; }
.auth-foot-lock { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #53636a; border-radius: 5px; color: #9ee1d1; font-size: 11px; }
.auth-continue { margin: 8px 0 0; color: #93a1a6; font-size: 10px; line-height: 1.45; text-align: center; }
.auth-open { overflow: hidden; }
@keyframes authFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes authRise { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-color-scheme: light) {
  .auth-backdrop { background: rgba(20, 31, 35, .48); }
  .auth-card { --auth-card: #fff; --auth-line: #d8e0e2; --auth-muted: #5f7076; border-color: #d5dfe1; color: #172328; box-shadow: 0 24px 70px rgba(17, 36, 42, .24), 0 1px 0 #fff inset; }
  .auth-close { border-color: #dce4e5; color: #526167; }
  .auth-close:hover { border-color: #bdcdcf; background: #f0f5f5; color: #172328; }
  .auth-brand { color: #44575d; }
  .auth-mark { border-color: #b6dcd2; background: #e5f5ef; color: #087c68; }
  .auth-eyebrow { color: #087c68; }
  .auth-card h2 { color: #172328; }
  .auth-divider { color: #617278; }
  .auth-divider::before,
  .auth-divider::after { background: #dde5e6; }
  .auth-provider { border-color: #d3dddf; background: #f8fafa; color: #25383e; }
  .auth-provider:hover:not(:disabled) { border-color: #9fb2b6; background: #edf3f3; color: #111f24; }
  .auth-provider:disabled { color: #76868b; }
  .auth-provider-state { color: #596c72; }
  .auth-mode { border-color: #dce4e5; background: #f2f5f5; }
  .auth-mode-btn { color: #53636a; }
  .auth-mode-btn:hover:not(.is-active) { color: #172328; background: #e8eeee; }
  .auth-mode-btn.is-active { border-color: #cbd7d9; background: #fff; color: #172328; box-shadow: 0 1px 2px rgba(14, 35, 40, .1); }
  .auth-card #authRegisterFields label, .auth-form label { color: #34474d; }
  .auth-field { border-color: #cbd7d9; background: #f8fafa; }
  .auth-field:focus-within { border-color: #118d79; background: #fff; box-shadow: 0 0 0 3px rgba(17, 141, 121, .12); }
  .auth-field:has(input:disabled) { border-color: #dce3e4; background: #f0f3f3; }
  .auth-field svg { color: #687b81; }
  .auth-field input { color: #172328; }
  .auth-field input::placeholder { color: #708086; }
  .auth-invite-check { border-color: #a9c8c1; background: #e7f3ef; color: #145d50; }
  .auth-invite-check:hover:not(:disabled) { border-color: #75a99d; background: #d9eee7; }
  .auth-invite-check:disabled { border-color: #d4dfe0; background: #edf1f1; color: #66777c; }
  .auth-invite-state.is-valid, .auth-message.is-success { color: #087c68; }
  .auth-invite-state.is-error, .auth-message.is-error { color: #b4232d; }
  .auth-send { border-color: #0b7868; background: #0d7668; color: #fff; }
  .auth-send:hover:not(:disabled) { border-color: #075c52; background: #096457; color: #fff; }
  .auth-send:disabled { border-color: #91a6a7; background: #dce6e6; color: #344b50; }
  .auth-submit { border-color: #155d75; background: #176f89; }
  .auth-submit:hover:not(:disabled) { border-color: #0e526a; background: #125d75; }
  .auth-submit:disabled { border-color: #a9b9bc; background: #dce5e6; color: #34474d; }
  .auth-switch-method { color: #087c68; }
  .auth-switch-method:hover { color: #04594b; }
  .auth-foot { color: #5d7076; }
  .auth-foot-lock { border-color: #c9d6d8; color: #087c68; }
  .auth-continue { color: #677a80; }
}
@media (max-width: 520px) {
  .auth-modal { align-items: end; padding: 12px; }
  .auth-card { width: 100%; padding: 26px 22px 21px; border-radius: 14px; }
  .auth-eyebrow { margin-top: 22px; }
  .auth-card h2 { font-size: 23px; }
  .auth-sub { margin-bottom: 18px; }
  .auth-close { top: 17px; right: 17px; }
}
@media (max-height: 620px) {
  .auth-modal { align-items: center; overflow-y: auto; }
  .auth-card { margin: auto 0; padding-top: 22px; padding-bottom: 20px; }
  .auth-eyebrow { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-backdrop, .auth-card { animation: none; }
  .auth-close, .auth-mode-btn, .auth-send, .auth-submit, .auth-submit svg { transition: none; }
  .auth-provider { transition: none; }
}
