:root{
  --auth-bg:#f4f6fb;
  --auth-panel:#ffffff;
  --auth-panel-soft:#f8fafc;
  --auth-line:#dfe4ee;
  --auth-line-strong:#cdd5e1;
  --auth-text:#0f172a;
  --auth-muted:#5f6b7a;
  --auth-accent:#d62828;
  --auth-accent-dark:#b91c1c;
  --auth-accent-soft:#fff1f1;
  --auth-success-bg:#ecfdf3;
  --auth-success-line:#b7e4c7;
  --auth-success-text:#166534;
  --auth-shadow:0 30px 80px rgba(15, 23, 42, 0.12);
}

*{
  box-sizing:border-box;
}

html,
body{
  min-height:100%;
}

body.ms-auth-system-body{
  margin:0;
  background:
    radial-gradient(circle at top left, rgba(214, 40, 40, 0.08), transparent 22%),
    linear-gradient(180deg, #f7f8fc 0%, #eef2f9 100%);
  color:var(--auth-text);
  font-family:"Manrope", sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.ms-auth-system{
  min-height:100vh;
  display:grid;
  gap:28px;
  padding:clamp(20px, 3vw, 32px);
}

.ms-auth-frame{
  width:min(1320px, 100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0, 1.04fr) minmax(400px, 0.96fr);
  background:rgba(255, 255, 255, 0.75);
  border:1px solid rgba(255, 255, 255, 0.78);
  border-radius:36px;
  box-shadow:var(--auth-shadow);
  overflow:hidden;
  backdrop-filter:blur(16px);
}

.ms-auth-brand-panel{
  position:relative;
  padding:clamp(36px, 5vw, 64px);
  overflow:hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(214, 40, 40, 0.24), transparent 26%),
    linear-gradient(155deg, #09101f 0%, #101828 56%, #16233d 100%);
  color:#fff;
}

.ms-auth-brand-panel::before{
  content:"";
  position:absolute;
  inset:auto -80px -120px auto;
  width:320px;
  height:320px;
  border-radius:50%;
  background:rgba(214, 40, 40, 0.18);
  filter:blur(6px);
}

.ms-auth-brand-panel::after{
  content:"";
  position:absolute;
  top:-120px;
  right:-140px;
  width:360px;
  height:360px;
  border-radius:50%;
  border:1px solid rgba(255, 255, 255, 0.08);
}

.ms-auth-brand-inner{
  position:relative;
  z-index:1;
  min-height:100%;
  display:grid;
  align-content:space-between;
  gap:36px;
}

.ms-auth-brand-logo-link{
  display:inline-flex;
  align-items:center;
}

.ms-auth-brand-logo{
  width:min(100%, 280px);
  height:auto;
  display:block;
}

.ms-auth-brand-copy{
  display:grid;
  gap:18px;
  max-width:560px;
}

.ms-auth-brand-kicker,
.ms-auth-brand-card__label,
.ms-auth-card-kicker{
  margin:0;
  font-size:12px;
  font-weight:800;
  letter-spacing:0.14em;
  text-transform:uppercase;
}

.ms-auth-brand-kicker{
  color:rgba(255, 255, 255, 0.68);
}

.ms-auth-brand-title,
.ms-auth-card-title{
  margin:0;
  font-family:"Space Grotesk", sans-serif;
  letter-spacing:-0.05em;
}

.ms-auth-brand-title{
  max-width:10ch;
  font-size:clamp(2.8rem, 5vw, 4.8rem);
  line-height:0.98;
  color:#fff;
}

.ms-auth-brand-subtitle{
  margin:0;
  max-width:520px;
  font-size:clamp(1rem, 1.5vw, 1.14rem);
  line-height:1.78;
  color:rgba(255, 255, 255, 0.76);
}

.ms-auth-brand-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:18px;
  align-items:stretch;
}

.ms-auth-brand-card{
  display:grid;
  gap:16px;
  padding:22px;
  border:1px solid rgba(255, 255, 255, 0.12);
  border-radius:24px;
  background:rgba(255, 255, 255, 0.08);
  box-shadow:0 18px 34px rgba(0, 0, 0, 0.14);
  backdrop-filter:blur(14px);
}

.ms-auth-brand-card--primary{
  grid-column:1 / -1;
  min-height:140px;
  align-content:center;
  gap:10px;
  padding:18px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(214, 40, 40, 0.38) 0%, rgba(17, 24, 39, 0) 58%);
}

.ms-auth-brand-card h2{
  margin:0;
  max-width:14ch;
  font-family:"Space Grotesk", sans-serif;
  font-size:clamp(1.8rem, 2.6vw, 2.6rem);
  line-height:1.02;
  letter-spacing:-0.04em;
}

.ms-auth-brand-card--primary h2{
  max-width:38ch;
  font-size:clamp(1.1rem, 1.25vw, 1.45rem);
  line-height:1.22;
  letter-spacing:0;
}

.ms-auth-brand-card p{
  margin:0;
  max-width:24ch;
  font-size:15px;
  line-height:1.7;
  color:rgba(255, 255, 255, 0.76);
}

.ms-auth-brand-card__label{
  color:rgba(255, 255, 255, 0.62);
}

.ms-auth-brand-stats{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

.ms-auth-brand-stats div{
  display:grid;
  gap:4px;
}

.ms-auth-brand-stats strong{
  font-family:"Space Grotesk", sans-serif;
  font-size:34px;
  line-height:1;
  letter-spacing:-0.05em;
}

.ms-auth-brand-stats span{
  font-size:12px;
  color:rgba(255, 255, 255, 0.68);
  text-transform:uppercase;
  letter-spacing:0.1em;
}

.ms-auth-panel{
  display:grid;
  place-items:center;
  padding:clamp(24px, 4vw, 48px);
  background:linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.94));
}

.ms-auth-card{
  width:min(100%, 470px);
  display:grid;
  gap:22px;
  padding:32px;
  border:1px solid rgba(215, 221, 232, 0.88);
  border-radius:30px;
  background:rgba(255, 255, 255, 0.96);
  box-shadow:0 18px 40px rgba(15, 23, 42, 0.08);
}

.ms-auth-card-head{
  display:grid;
  gap:10px;
}

.ms-auth-card-kicker{
  color:var(--auth-accent);
}

.ms-auth-card-title{
  font-size:clamp(2rem, 3.2vw, 2.8rem);
  line-height:0.98;
  color:var(--auth-text);
}

.ms-auth-card-copy{
  margin:0;
  font-size:15px;
  line-height:1.7;
  color:var(--auth-muted);
}

.ms-auth-alert-stack{
  display:grid;
  gap:10px;
}

.ms-auth-alert{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid transparent;
  font-size:14px;
  line-height:1.6;
}

.ms-auth-alert--error{
  background:var(--auth-accent-soft);
  border-color:#f0b5b5;
  color:#991b1b;
}

.ms-auth-alert--success{
  background:var(--auth-success-bg);
  border-color:var(--auth-success-line);
  color:var(--auth-success-text);
}

.ms-auth-form{
  display:grid;
  gap:18px;
}

.ms-auth-field-grid{
  display:grid;
  gap:16px;
}

.ms-auth-field-grid--double{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.ms-auth-field-grid--triple{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.ms-auth-field--compact{
  gap:6px;
}

.ms-signup-username-url{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  width:max-content;
  max-width:100%;
  margin-top:2px;
  padding:0 12px;
  border-radius:999px;
  background:#f6f8fc;
  color:#d62828;
  font-size:13px;
  font-weight:800;
  overflow-wrap:anywhere;
}

[data-username-status]{
  min-height:18px;
}

[data-username-status].is-available{
  color:#15803d;
  font-weight:800;
}

[data-username-status].is-unavailable{
  color:#d62828;
  font-weight:800;
}

.ms-auth-field{
  display:grid;
  gap:8px;
}

.ms-auth-label{
  font-size:13px;
  font-weight:800;
  letter-spacing:0.02em;
  color:#1f2937;
}

.ms-auth-input,
.ms-auth-select{
  width:100%;
  min-height:56px;
  border:1px solid var(--auth-line);
  border-radius:18px;
  background:#fff;
  padding:0 16px;
  font:inherit;
  font-size:16px;
  color:var(--auth-text);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ms-auth-select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 2px),
    calc(100% - 16px) calc(50% - 2px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
  padding-right:40px;
}

.ms-auth-input::placeholder{
  color:#98a2b3;
}

.ms-auth-input:focus,
.ms-auth-select:focus{
  border-color:#9fb0cb;
  box-shadow:0 0 0 4px rgba(59, 130, 246, 0.08);
}

.ms-auth-password-wrap{
  position:relative;
}

.ms-auth-password-wrap .ms-auth-input{
  padding-right:72px;
}

.ms-auth-password-toggle{
  position:absolute;
  top:50%;
  right:14px;
  transform:translateY(-50%);
  border:0;
  background:transparent;
  padding:0;
  color:#475467;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.ms-auth-field-note,
.ms-auth-field-error{
  font-size:13px;
  line-height:1.55;
}

.ms-auth-field-note{
  color:var(--auth-muted);
}

.ms-auth-field-error{
  color:#b42318;
}

.ms-auth-inline-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.ms-auth-check{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:#344054;
}

.ms-auth-check input{
  width:18px;
  height:18px;
  accent-color:var(--auth-accent);
}

.ms-auth-inline-link,
.ms-auth-panel-footer a{
  color:var(--auth-accent);
  text-decoration:none;
  font-weight:800;
}

.ms-auth-submit{
  width:100%;
  min-height:56px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg, var(--auth-accent) 0%, #ef2d2d 100%);
  color:#fff;
  font-family:"Space Grotesk", sans-serif;
  font-size:18px;
  font-weight:700;
  letter-spacing:-0.02em;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, opacity .18s ease;
  box-shadow:0 18px 32px rgba(214, 40, 40, 0.22);
}

.ms-auth-submit:hover{
  transform:translateY(-1px);
  box-shadow:0 24px 38px rgba(214, 40, 40, 0.28);
}

.ms-auth-submit:disabled{
  cursor:wait;
  opacity:.78;
  transform:none;
  box-shadow:none;
}

.ms-auth-panel-footer{
  font-size:15px;
  line-height:1.65;
  color:var(--auth-muted);
}

.ms-auth-footer{
  width:min(1320px, 100%);
  margin:0 auto;
  padding:0 8px 8px;
}

.ms-auth-footer-links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px 24px;
}

.ms-auth-footer-links a{
  color:#667085;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}

body.ms-auth-system-body.ms-auth-reset-body{
  background:#ffffff;
}

body.ms-auth-system-body.ms-auth-signup-only-body{
  background:#ffffff;
}

.ms-auth-system--signup-only{
  min-height:100vh;
  place-items:center;
  padding:clamp(20px, 3vw, 36px);
}

.ms-auth-frame--signup-only{
  width:min(600px, calc(100vw - 32px));
  display:block;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
  backdrop-filter:none;
}

.ms-auth-frame--signup-only .ms-auth-panel{
  display:block;
  padding:0;
  background:transparent;
}

.ms-auth-frame--signup-only .ms-auth-card{
  width:100%;
  max-width:none;
  gap:20px;
  border:1px solid var(--auth-line-strong);
  border-radius:30px;
  background:#ffffff;
  padding:clamp(26px, 3vw, 36px);
  box-shadow:0 22px 52px rgba(15, 23, 42, 0.1);
}

.ms-auth-frame--signup-only .ms-auth-card-kicker:empty{
  display:none;
}

.ms-auth-frame--signup-only .ms-auth-card-title{
  font-size:clamp(2rem, 2.6vw, 2.45rem);
  line-height:1.08;
  letter-spacing:-0.03em;
}

.ms-auth-frame--signup-only .ms-auth-card-copy{
  max-width:520px;
  font-size:15px;
  line-height:1.65;
}

.ms-auth-frame--signup-only .ms-auth-form{
  gap:16px;
}

.ms-auth-account-type-note,
.ms-auth-continue-note{
  margin:0;
  border-radius:16px;
  background:#f8fafc;
  color:var(--auth-muted);
  font-size:13px;
  line-height:1.55;
}

.ms-auth-account-type-note{
  padding:10px 12px;
}

.ms-auth-continue-note{
  padding:12px 14px;
}

.ms-auth-system--reset{
  min-height:100vh;
  place-items:center;
  padding:clamp(22px, 3vw, 42px);
}

.ms-auth-frame--reset{
  width:min(640px, calc(100vw - 32px));
  display:block;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
  backdrop-filter:none;
}

.ms-auth-frame--reset .ms-auth-panel{
  display:block;
  padding:0;
  background:transparent;
}

.ms-auth-frame--reset .ms-auth-card{
  width:100%;
  max-width:none;
  gap:22px;
  border:1px solid var(--auth-line-strong);
  border-radius:30px;
  background:#ffffff;
  padding:clamp(30px, 3.4vw, 42px);
  box-shadow:0 22px 52px rgba(15, 23, 42, 0.1);
}

.ms-auth-frame--reset .ms-auth-card-head{
  gap:12px;
}

.ms-auth-frame--reset .ms-auth-card-kicker{
  color:var(--auth-accent);
  font-size:13px;
  letter-spacing:0.18em;
}

.ms-auth-frame--reset .ms-auth-card-title{
  font-size:clamp(2rem, 2.6vw, 2.45rem);
  line-height:1.08;
  letter-spacing:-0.03em;
}

.ms-auth-frame--reset .ms-auth-card-copy{
  max-width:520px;
  font-size:clamp(1rem, 1.35vw, 1.2rem);
  line-height:1.6;
  color:#667085;
}

.ms-auth-frame--reset .ms-auth-form{
  gap:20px;
}

.ms-auth-frame--reset .ms-auth-field{
  gap:10px;
}

.ms-auth-frame--reset .ms-auth-label{
  font-size:15px;
}

.ms-auth-frame--reset .ms-auth-input{
  min-height:58px;
  border-radius:18px;
  padding:0 18px;
  font-size:1.05rem;
}

.ms-auth-frame--reset .ms-auth-submit{
  min-height:64px;
  font-size:1.2rem;
  box-shadow:0 20px 34px rgba(214, 40, 40, 0.18);
}

.ms-auth-frame--reset .ms-auth-panel-footer{
  font-size:1.05rem;
}

@media (max-width: 1120px){
  .ms-auth-frame{
    grid-template-columns:1fr;
  }

  .ms-auth-brand-grid{
    grid-template-columns:1fr 1fr;
  }

  .ms-auth-brand-title{
    max-width:12ch;
  }
}

@media (max-width: 720px){
  .ms-auth-system{
    padding:14px;
  }

  .ms-auth-brand-panel,
  .ms-auth-panel{
    padding:24px 20px;
  }

  .ms-auth-card{
    width:100%;
    padding:24px 20px;
    border-radius:24px;
  }

  .ms-auth-field-grid--double,
  .ms-auth-field-grid--triple,
  .ms-auth-brand-grid{
    grid-template-columns:1fr;
  }

  .ms-auth-inline-row{
    align-items:flex-start;
    flex-direction:column;
  }

  .ms-auth-submit{
    min-height:54px;
  }

  .ms-auth-frame--reset{
    width:100%;
  }

  .ms-auth-frame--signup-only{
    width:100%;
  }

  .ms-auth-frame--signup-only .ms-auth-card{
    border-radius:28px;
    padding:24px 20px;
  }

  .ms-auth-frame--reset .ms-auth-card{
    border-radius:30px;
    padding:28px 20px;
  }

  .ms-auth-frame--reset .ms-auth-card-kicker{
    font-size:13px;
  }

  .ms-auth-frame--reset .ms-auth-card-title{
    font-size:2.6rem;
  }

  .ms-auth-frame--reset .ms-auth-card-copy{
    font-size:1.1rem;
  }

  .ms-auth-frame--reset .ms-auth-input,
  .ms-auth-frame--reset .ms-auth-submit{
    min-height:64px;
    border-radius:22px;
    font-size:1.1rem;
  }

  .ms-auth-frame--reset .ms-auth-submit{
    border-radius:999px;
  }
}
