:root {
  --auth-primary: var(--main-title-color, #173058);
  --auth-secondary: var(--main-tab-color, #6f8d2e);
  --auth-ink: #172033;
  --auth-muted: #647187;
  --auth-border: #dce3ec;
  --auth-surface: #ffffff;
  --auth-background: #f2f5f9;
}

html,
body.admin-auth-page {
  min-height: 100%;
}

body.admin-auth-page {
  margin: 0;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 10% 15%, rgba(75, 112, 164, .13), transparent 30%),
    radial-gradient(circle at 90% 85%, rgba(80, 143, 124, .12), transparent 28%),
    var(--auth-background);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.admin-auth-page *,
.admin-auth-page *::before,
.admin-auth-page *::after {
  box-sizing: border-box;
}

.admin-auth-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.admin-auth-shell {
  display: grid;
  grid-template-columns: minmax(360px, .88fr) minmax(440px, 1.12fr);
  width: 100%;
  max-width: 1040px;
  min-height: 670px;
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(25, 45, 75, .09);
  border-radius: 24px;
  background: var(--auth-surface);
  box-shadow: 0 26px 70px rgba(26, 44, 71, .14);
}

.admin-auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 46px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(8, 24, 45, .25), rgba(8, 24, 45, .08)),
    linear-gradient(145deg, var(--auth-primary), var(--auth-secondary));
  isolation: isolate;
}

.admin-auth-story::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.auth-story-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  filter: blur(1px);
}

.auth-story-orb-one { width: 300px; height: 300px; top: -160px; right: -105px; }
.auth-story-orb-two { width: 210px; height: 210px; bottom: -100px; left: -90px; }

.auth-brand,
.auth-mobile-brand {
  min-height: 60px;
}

.auth-brand a,
.auth-mobile-brand a {
  display: inline-flex;
  max-width: 100%;
  color: inherit;
  font-size: 25px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}

.auth-brand a {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 13px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 22px rgba(6,18,35,.12);
  color: var(--auth-primary);
}

.auth-brand img {
  display: block;
  width: auto;
  max-width: 230px;
  height: auto;
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.12));
}

.auth-story-content {
  margin: auto 0;
  padding: 68px 0 55px;
}

.auth-eyebrow {
  display: inline-block;
  margin-bottom: 13px;
  color: var(--auth-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.auth-eyebrow-light { color: rgba(255,255,255,.72); }

.auth-story-content h1 {
  max-width: 390px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(34px, 4vw, 49px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.06;
}

.auth-story-content > p {
  max-width: 390px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 16px;
  line-height: 1.65;
}

.auth-feature-list {
  display: grid;
  gap: 19px;
  margin-top: 42px;
}

.auth-feature {
  display: flex;
  gap: 13px;
  align-items: center;
}

.auth-feature-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 12px;
  background: rgba(255,255,255,.1);
}

.auth-feature-icon svg,
.auth-input-icon svg,
.auth-password-toggle svg,
.auth-submit svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.auth-feature-icon svg { width: 21px; height: 21px; }
.auth-feature > span:last-child { display: flex; flex-direction: column; }
.auth-feature strong { color: #fff; font-size: 14px; font-weight: 700; }
.auth-feature small { margin-top: 2px; color: rgba(255,255,255,.67); font-size: 12px; }

.auth-story-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 600;
}

.auth-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ee7ad;
  box-shadow: 0 0 0 4px rgba(110,231,173,.14);
}

.admin-auth-panel {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 56px 64px;
  background: #fff;
}

.auth-panel-inner { width: 100%; max-width: 430px; margin: auto; }
.auth-mobile-brand { display: none; }
.auth-page-action:empty,
.auth-notices:empty { display: none; }

.auth-page-action,
.auth-notices {
  margin-bottom: 18px;
}

.auth-notices table { width: 100%; }

.auth-form-heading { margin-bottom: 31px; }
.auth-form-heading h2 {
  margin: 0 0 9px;
  color: var(--auth-ink);
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.18;
}
.auth-form-heading p { margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.55; }

.auth-form { margin: 0; }
.auth-field { margin-bottom: 19px; }
.auth-field label { margin: 0 0 8px; color: #283448; font-size: 13px; font-weight: 700; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-label-row a { margin-bottom: 8px; color: var(--auth-primary); font-size: 12px; font-weight: 700; text-decoration: none; }
.auth-label-row a:hover { text-decoration: underline; }

.auth-input-wrap { position: relative; }
.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 1;
  display: flex;
  color: #8895a7;
  pointer-events: none;
  transform: translateY(-50%);
}
.auth-input-icon svg { width: 20px; height: 20px; }

.admin-auth-page .auth-input-wrap input[type="text"],
.admin-auth-page .auth-input-wrap input[type="password"] {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 46px;
  border: 1px solid var(--auth-border);
  border-radius: 11px;
  outline: 0;
  background: #fbfcfe;
  box-shadow: none;
  color: var(--auth-ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.admin-auth-page .auth-input-wrap input::placeholder { color: #9ba6b5; }
.admin-auth-page .auth-input-wrap input:hover { border-color: #bcc7d5; }
.admin-auth-page .auth-input-wrap input:focus {
  border-color: var(--auth-primary);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--auth-primary) 13%, transparent);
}
.admin-auth-page .auth-input-wrap input.is-invalid { border-color: #cf3e45; background: #fffafa; }

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: transparent;
  color: #7b8798;
  cursor: pointer;
  transform: translateY(-50%);
}
.auth-password-toggle:hover { background: #eef2f7; color: var(--auth-ink); }
.auth-password-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(42,136,197,.18); }
.auth-password-toggle svg { width: 20px; height: 20px; }
.auth-password-toggle .eye-closed { display: none; }
.auth-password-toggle[aria-pressed="true"] .eye-open { display: none; }
.auth-password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.auth-validation {
  margin-bottom: 17px;
  padding: 11px 13px;
  border: 1px solid #f0c9cc;
  border-radius: 9px;
  background: #fff3f3;
  color: #9d2730;
  font-size: 13px;
  font-weight: 600;
}

.auth-submit,
.auth-microsoft-button {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, filter .18s, border-color .18s, background .18s;
}

.auth-submit {
  margin-top: 27px;
  border: 0;
  background: linear-gradient(120deg, var(--auth-primary), var(--auth-secondary));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--auth-primary) 24%, transparent);
  color: #fff;
  cursor: pointer;
}
.auth-submit svg { width: 19px; height: 19px; transition: transform .18s; }
.auth-submit:hover { color: #fff; filter: brightness(.96); transform: translateY(-1px); }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--auth-primary) 24%, transparent); outline-offset: 3px; }
.auth-form.is-submitting .auth-submit { opacity: .75; pointer-events: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 25px 0 19px;
  color: #929dad;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; flex: 1; background: #e4e9f0; }

.auth-microsoft-button {
  border: 1px solid var(--auth-border);
  background: #fff;
  color: #344054;
}
.auth-microsoft-button svg { width: 21px; height: 21px; }
.auth-microsoft-button:hover { border-color: #b8c3d1; background: #f8fafc; color: #172033; text-decoration: none; transform: translateY(-1px); }
.auth-microsoft-button:focus-visible { outline: 3px solid rgba(42,136,197,.18); outline-offset: 2px; }

.auth-help { margin: 22px 0 0; color: #8792a2; font-size: 11px; line-height: 1.55; text-align: center; }
.admin-auth-footer { padding: 20px 10px 0; color: #7a8798; font-size: 11px; text-align: center; }
.admin-auth-footer strong { color: #536174; font-weight: 700; }

@supports not (color: color-mix(in srgb, #000 10%, transparent)) {
  .admin-auth-page .auth-input-wrap input:focus { box-shadow: 0 0 0 4px rgba(42,136,197,.13); }
  .auth-submit { box-shadow: 0 10px 24px rgba(30,72,115,.22); }
}

@media (max-width: 900px) {
  .admin-auth-main { padding: 24px; }
  .admin-auth-shell { grid-template-columns: minmax(300px, .8fr) minmax(400px, 1.2fr); }
  .admin-auth-story { padding: 36px; }
  .admin-auth-panel { padding: 48px 40px; }
  .auth-story-content h1 { font-size: 37px; }
}

@media (max-width: 720px) {
  .admin-auth-main { justify-content: flex-start; padding: 0; background: #fff; }
  .admin-auth-shell { display: block; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .admin-auth-story { display: none; }
  .admin-auth-panel { display: block; min-height: calc(100vh - 45px); padding: 34px 24px 42px; }
  .auth-mobile-brand { display: block; margin-bottom: 45px; text-align: center; }
  .auth-mobile-brand a { justify-content: center; color: var(--auth-primary); }
  .auth-mobile-brand img { width: auto; max-width: 210px; height: auto; max-height: 58px; object-fit: contain; }
  .auth-form-heading h2 { font-size: 27px; }
  .admin-auth-footer { padding: 14px 20px 18px; background: #fff; }
}

@media (max-width: 380px) {
  .admin-auth-panel { padding-right: 18px; padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-auth-page *,
  .admin-auth-page *::before,
  .admin-auth-page *::after { scroll-behavior: auto !important; transition: none !important; }
}
