:root {
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
  --ink: #102033;
  --ink-soft: #42556b;
  --accent: #156f22;
  --accent-deep: #0f5b1b;
  --accent-blue: #2f678f;
  --gold: #d2a54b;
  --rose: #d06674;
  --line: rgba(20, 42, 61, 0.12);
  --card: rgba(255, 255, 255, 0.88);
  --control-radius: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 20%, rgba(135, 181, 228, 0.30), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(49, 125, 80, 0.22), transparent 24%),
    radial-gradient(circle at 68% 78%, rgba(210, 165, 75, 0.12), transparent 24%),
    linear-gradient(135deg, #edf4fb 0%, #f7fbff 34%, #f9fbf8 62%, #f5f7fb 100%);
  display: block;
  overflow: auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(48px);
  pointer-events: none;
  opacity: 0.55;
}

body::before {
  top: 92px;
  left: -110px;
  background: radial-gradient(circle, rgba(120, 171, 226, 0.28) 0%, transparent 72%);
}

body::after {
  right: -120px;
  bottom: 60px;
  background: radial-gradient(circle, rgba(39, 123, 78, 0.18) 0%, transparent 72%);
}

.login-page {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px 16px;
}

.login-shell {
  width: min(1120px, 100%);
  height: min(760px, calc(100vh - 76px - 30px));
  display: grid;
  grid-template-columns: minmax(340px, 1.02fr) minmax(350px, 0.9fr);
  gap: 16px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(252,253,255,0.72) 100%);
  border: 1px solid rgba(255,255,255,0.62);
  box-shadow:
    0 34px 80px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
}

.brand-panel,
.form-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.brand-panel {
  padding: 20px 20px 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(210, 165, 75, 0.22), transparent 24%),
    radial-gradient(circle at bottom left, rgba(55, 125, 88, 0.20), transparent 30%),
    linear-gradient(155deg, rgba(10, 55, 39, 0.92) 0%, rgba(18, 86, 51, 0.92) 42%, rgba(30, 93, 135, 0.92) 100%);
  color: #eff8f1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.brand-panel__glow {
  position: absolute;
  inset: auto;
  top: -50px;
  right: -30px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 223, 145, 0.40) 0%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

.brand-panel__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  align-content: start;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.4rem 0.72rem;
  border-radius: var(--control-radius, 8px);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-family: Georgia, "Aptos Display", "Times New Roman", serif;
  font-size: clamp(1.6rem, 2.55vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 12ch;
}

.hero-copy {
  margin: 0;
  max-width: 48ch;
  color: rgba(239, 248, 241, 0.88);
  font-size: 0.94rem;
  line-height: 1.55;
}

.hero-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.08) 100%);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-brand {
  justify-content: center;
}

.login-logo {
  display: block;
  width: min(100%, 330px);
  height: auto;
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  padding: 8px;
  box-shadow:
    0 18px 34px rgba(7, 28, 20, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.92);
}

.panel-note {
  margin: 0;
  color: rgba(239, 248, 241, 0.82);
  font-size: 0.88rem;
  line-height: 1.5;
}

.hero-metrics {
  display: grid;
  gap: 8px;
}

.hero-metric {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
}

.hero-metric__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,223,145,0.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.hero-metric strong,
.access-note strong {
  display: block;
  font-size: 0.9rem;
}

.hero-metric span {
  display: block;
  margin-top: 0.12rem;
  color: rgba(239, 248, 241, 0.78);
  font-size: 0.82rem;
  line-height: 1.38;
}

.form-panel {
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(65, 128, 197, 0.10), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(249,251,250,0.94) 100%);
  border: 1px solid rgba(18, 42, 61, 0.08);
  box-shadow:
    0 24px 58px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.94);
  align-content: start;
}

.form-panel::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -54px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21, 111, 34, 0.10), transparent 70%);
  pointer-events: none;
}

.form-panel > * {
  position: relative;
  z-index: 1;
}

.form-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.form-panel__head h2 {
  margin: 0.18rem 0 0;
  font-family: Georgia, "Aptos Display", "Times New Roman", serif;
  font-size: clamp(1.35rem, 1.8vw, 1.8rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.form-panel__head p {
  margin: 0.42rem 0 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.46;
}

.form-kicker {
  color: var(--accent-blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(21, 111, 34, 0.14), rgba(47, 103, 143, 0.14));
  border: 1px solid rgba(18, 42, 61, 0.08);
  color: var(--accent);
  font-weight: 900;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(234, 240, 248, 0.8), rgba(244, 247, 251, 0.72));
  border: 1px solid rgba(18, 42, 61, 0.08);
}

.tab {
  flex: 1;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #39516c;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tab:hover {
  transform: translateY(-1px);
}

.tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  border-color: rgba(10, 63, 18, 0.14);
  box-shadow:
    0 12px 24px rgba(15, 91, 27, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.form {
  display: none;
  gap: 10px;
}

.form.active {
  display: grid;
}

.hidden {
  display: none !important;
}

label {
  display: grid;
  gap: 0.32rem;
  font-weight: 700;
  color: #17263a;
  font-size: 0.8rem;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfd8e4;
  font-size: 0.9rem;
  color: #142235;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 74px;
}

.login-body .password-toggle {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  width: auto !important;
  min-width: 54px;
  min-height: 30px;
  padding: 0 10px !important;
  border-radius: var(--control-radius, 8px);
  border: 1px solid rgba(21, 111, 34, 0.18);
  background: rgba(255,255,255,0.88) !important;
  color: var(--accent) !important;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%) !important;
  box-shadow: none !important;
  overflow: visible !important;
  z-index: 2;
}

.login-body .password-toggle:hover {
  transform: translateY(-50%) !important;
  background: rgba(239, 248, 241, 0.96);
}

.login-body .password-toggle:active {
  transform: translateY(-50%) !important;
}

.login-body .password-toggle::before,
.login-body .password-toggle::after {
  content: none !important;
}

input:focus {
  outline: none;
  border-color: rgba(21, 111, 34, 0.34);
  box-shadow:
    0 0 0 4px rgba(21, 111, 34, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

input::placeholder {
  color: #7c8a9a;
}

button[type="submit"],
.mfa-actions button {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  font-weight: 900;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button[type="submit"] {
  margin-top: 2px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  box-shadow:
    0 14px 28px rgba(15, 91, 27, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.78;
}

button[aria-busy="true"]::after {
  content: "";
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  margin-left: 0.55em;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  vertical-align: -0.12em;
  animation: loginSpin 700ms linear infinite;
}

@keyframes loginSpin {
  to {
    transform: rotate(360deg);
  }
}

button[type="submit"]:hover,
.mfa-actions button:hover {
  transform: translateY(-1px);
}

.mfa-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(18, 42, 61, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(247,250,252,0.96) 0%, rgba(243,248,247,0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.mfa-title {
  font-size: 0.98rem;
  font-weight: 900;
}

.mfa-hint {
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.mfa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mfa-actions .ghost {
  background: linear-gradient(180deg, rgba(236,241,246,0.96) 0%, rgba(227,234,242,0.94) 100%);
  color: var(--ink);
}

#mfaVerify {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
}

.status {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(21, 111, 34, 0.22);
  background: linear-gradient(180deg, rgba(246, 250, 247, 0.98), rgba(239, 247, 241, 0.96));
  font-size: 0.88rem;
  color: #425268;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.status.error {
  color: #b11d32;
  font-weight: 700;
  border-color: rgba(177, 29, 50, 0.22);
  background: linear-gradient(180deg, rgba(255, 246, 246, 0.98), rgba(255, 237, 239, 0.96));
}

.status.success {
  color: #1c8054;
  font-weight: 700;
  border-color: rgba(28, 128, 84, 0.24);
  background: linear-gradient(180deg, rgba(245, 255, 249, 0.98), rgba(235, 250, 241, 0.96));
}

.access-notes {
  display: grid;
  gap: 8px;
}

.access-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(252,253,255,0.98) 0%, rgba(245,248,252,0.96) 100%);
  border: 1px solid rgba(18, 42, 61, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.94);
}

.access-note span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(21,111,34,0.12), rgba(47,103,143,0.12));
  color: var(--accent);
  font-weight: 900;
}

.access-note p {
  margin: 0.18rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.4;
}

@media (max-height: 900px) and (min-width: 1101px) {
  .login-page {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .login-shell {
    height: calc(100vh - 76px - 20px);
  }

  .hero-title {
    font-size: clamp(1.48rem, 2.2vw, 2.3rem);
    max-width: 11ch;
  }

  .hero-copy {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .hero-card {
    padding: 10px 12px;
  }

  .login-logo {
    width: min(100%, 280px);
  }

  .hero-metrics {
    gap: 6px;
  }

  .hero-metric:last-child {
    display: none;
  }

  .access-notes {
    gap: 6px;
  }
}

@media (max-height: 860px) and (min-width: 1101px) {
  .login-shell {
    height: calc(100vh - 76px - 16px);
    gap: 12px;
    padding: 12px;
  }

  .brand-panel,
  .form-panel {
    border-radius: 18px;
  }

  .brand-panel {
    padding: 16px 16px 14px;
  }

  .form-panel {
    gap: 10px;
    padding: 14px 14px 12px;
  }

  .hero-kicker {
    padding: 0.34rem 0.62rem;
    font-size: 0.68rem;
  }

  .hero-title {
    font-size: clamp(1.28rem, 1.9vw, 1.95rem);
    line-height: 1.02;
    max-width: 10ch;
  }

  .hero-copy {
    font-size: 0.82rem;
    line-height: 1.36;
    max-width: 40ch;
  }

  .hero-card {
    padding: 8px 10px;
    gap: 6px;
  }

  .login-logo {
    width: min(100%, 235px);
    padding: 6px;
  }

  .panel-note {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .hero-metrics,
  .access-notes {
    display: none;
  }

  .form-panel__head h2 {
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
  }

  .form-panel__head p {
    font-size: 0.8rem;
    line-height: 1.34;
  }

  .form-badge {
    width: 42px;
    height: 42px;
    font-size: 0.84rem;
  }

  .tabs {
    padding: 4px;
    gap: 6px;
  }

  .tab {
    min-height: 38px;
    font-size: 0.86rem;
  }

  .form {
    gap: 8px;
  }

  label {
    gap: 0.24rem;
    font-size: 0.76rem;
  }

  input,
  button[type="submit"] {
    min-height: 40px;
    font-size: 0.86rem;
  }

  .status {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 1400px) and (max-height: 820px) and (min-width: 1101px) {
  .login-header {
    padding: 10px 14px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .title {
    font-size: 0.98rem;
  }

  .login-page {
    height: calc(100vh - 66px);
    padding: 10px 16px 12px;
  }

  .login-shell {
    width: min(1040px, 100%);
    height: min(700px, calc(100vh - 66px - 22px));
    grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 0.9fr);
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
  }

  .brand-panel,
  .form-panel {
    border-radius: 18px;
  }

  .brand-panel {
    padding: 14px 14px 12px;
  }

  .form-panel {
    gap: 9px;
    padding: 14px 14px 12px;
  }

  .hero-title {
    font-size: clamp(1.18rem, 1.7vw, 1.7rem);
    max-width: 9ch;
  }

  .hero-copy {
    font-size: 0.79rem;
    line-height: 1.32;
    max-width: 36ch;
  }

  .hero-card {
    padding: 8px 10px;
  }

  .login-logo {
    width: min(100%, 220px);
  }

  .panel-note {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .hero-metrics,
  .access-notes {
    display: none;
  }

  .form-panel__head h2 {
    font-size: clamp(1.12rem, 1.35vw, 1.4rem);
  }

  .form-panel__head p {
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .tabs {
    padding: 4px;
  }

  .tab {
    min-height: 36px;
    font-size: 0.84rem;
  }

  input,
  button[type="submit"],
  .mfa-actions button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .mfa-panel,
  .status {
    padding: 9px 10px;
  }
}

@media (min-width: 1450px) and (max-width: 1799px) and (min-height: 860px) {
  .login-shell {
    width: min(1180px, 100%);
    height: min(790px, calc(100vh - 76px - 34px));
    gap: 18px;
    padding: 18px;
  }

  .hero-title {
    max-width: 12ch;
  }

  .hero-copy {
    max-width: 50ch;
  }
}

@media (min-width: 1800px) and (min-height: 980px) {
  .login-page {
    padding: 20px 28px 24px;
  }

  .login-shell {
    width: min(1320px, 100%);
    height: min(860px, calc(100vh - 76px - 44px));
    gap: 22px;
    padding: 22px;
    border-radius: 30px;
  }

  .brand-panel,
  .form-panel {
    border-radius: 26px;
  }

  .brand-panel {
    padding: 26px 26px 22px;
  }

  .form-panel {
    padding: 24px 24px 20px;
  }

  .hero-title {
    font-size: clamp(2.15rem, 2.8vw, 3.2rem);
    max-width: 13ch;
  }

  .hero-copy {
    font-size: 1rem;
    max-width: 54ch;
  }

  .login-logo {
    width: min(100%, 380px);
  }
}

@media (min-width: 1500px) and (min-height: 900px) {
  .login-page {
    padding-top: 18px;
    padding-bottom: 20px;
  }

  .login-shell {
    width: min(1260px, 100%);
    height: min(820px, calc(100vh - 76px - 38px));
    gap: 20px;
    padding: 20px;
    border-radius: 28px;
  }

  .brand-panel,
  .form-panel {
    border-radius: 24px;
  }

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

  .form-panel {
    padding: 22px 22px 18px;
  }

  .hero-title {
    font-size: clamp(2rem, 2.6vw, 3rem);
    max-width: 13ch;
  }

  .hero-copy {
    max-width: 52ch;
    font-size: 0.98rem;
  }

  .login-logo {
    width: min(100%, 360px);
  }

  .hero-metrics,
  .access-notes {
    gap: 10px;
  }

  .form-panel__head h2 {
    font-size: clamp(1.5rem, 1.9vw, 2rem);
  }
}

@media (max-width: 1100px) {
  body {
    overflow: auto;
  }

  .login-shell {
    width: min(960px, 100%);
    height: auto;
    grid-template-columns: 1fr;
  }

  .hero-title,
  .form-panel__head h2 {
    max-width: 18ch;
  }
}

@media (max-width: 760px) {
  .login-page {
    height: auto;
    min-height: calc(100vh - 76px);
    padding: 18px 14px 28px;
    align-items: stretch;
  }

  .login-shell {
    padding: 14px;
    gap: 14px;
    border-radius: 24px;
  }

  .brand-panel,
  .form-panel {
    padding: 18px 16px;
    border-radius: 20px;
  }

  .form-panel__head {
    flex-direction: column;
  }

  .form-badge {
    width: 52px;
    height: 52px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.45rem);
  }

  .tabs {
    gap: 6px;
    padding: 5px;
  }

  .tab {
    min-height: 44px;
    font-size: 0.9rem;
  }

  .access-note,
  .hero-metric {
    grid-template-columns: 40px minmax(0, 1fr);
  }
}
