:root {
  --mbip-green: #1f5ea8;
  --mbip-green-deep: #123b73;
  --mbip-green-soft: #2b74c7;
  --mbip-gold: #7fb6ff;
  --ink: #1c2b42;
  --ink-soft: #5e6f88;
  --muted: #7b8ca5;
  --line: #d2ddf0;
  --focus: rgba(31, 94, 168, 0.2);
  --shadow: 0 24px 56px rgba(6, 18, 40, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body.auth-body {
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(110% 120% at 0% 0%, rgba(129, 173, 242, 0.24) 0%, rgba(129, 173, 242, 0) 62%),
    radial-gradient(85% 100% at 100% 100%, rgba(155, 190, 247, 0.22) 0%, rgba(155, 190, 247, 0) 58%),
    linear-gradient(145deg, #fbfdff 0%, #f1f6ff 50%, #e8f0fb 100%);
  background-size: 110% 110%, 110% 110%, 100% 100%;
  animation: bgDrift 20s ease-in-out infinite alternate;
  position: relative;
  overflow: hidden;
}

body.auth-body::before,
body.auth-body::after {
  content: "";
  position: fixed;
  inset: -18%;
  pointer-events: none;
  z-index: 0;
}

body.auth-body::before {
  background:
    radial-gradient(34% 34% at 18% 28%, rgba(127, 182, 255, 0.16) 0%, rgba(127, 182, 255, 0) 100%),
    radial-gradient(38% 40% at 80% 20%, rgba(85, 146, 239, 0.13) 0%, rgba(85, 146, 239, 0) 100%),
    radial-gradient(30% 34% at 70% 78%, rgba(26, 96, 188, 0.14) 0%, rgba(26, 96, 188, 0) 100%);
  filter: blur(10px);
  animation: ambientFloat 24s ease-in-out infinite;
}

body.auth-body::after {
  inset: 0;
  opacity: 0.42;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0) 44%),
    repeating-linear-gradient(
      -35deg,
      rgba(157, 188, 236, 0.08) 0 2px,
      rgba(255, 255, 255, 0) 2px 14px
    );
  mix-blend-mode: soft-light;
  animation: meshSweep 24s linear infinite;
}

@keyframes bgDrift {
  0% { background-position: 0% 0%, 100% 100%, 50% 50%; }
  100% { background-position: 8% 4%, 94% 92%, 50% 50%; }
}

@keyframes ambientFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2.2%, -2%, 0) scale(1.02); }
}

@keyframes meshSweep {
  0% { transform: translate3d(-1.2%, 0, 0); }
  50% { transform: translate3d(1.2%, -1%, 0); }
  100% { transform: translate3d(-1.2%, 0, 0); }
}

.auth-layout {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.auth-layout::before,
.auth-layout::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

.auth-layout::before {
  inset: 0;
  z-index: 1;
  opacity: 0.75;
  background:
    radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.42) 0 2px, rgba(255, 255, 255, 0) 3px),
    radial-gradient(circle at 72% 18%, rgba(127, 182, 255, 0.38) 0 2px, rgba(127, 182, 255, 0) 3px),
    radial-gradient(circle at 28% 78%, rgba(87, 202, 255, 0.42) 0 2px, rgba(87, 202, 255, 0) 3px);
  background-size: 220px 220px, 280px 280px, 260px 260px;
  animation: sparkleDrift 12s linear infinite;
}

.auth-layout::after {
  inset: -12%;
  z-index: 1;
  opacity: 0.34;
  filter: blur(38px);
  background:
    radial-gradient(40% 40% at 22% 28%, rgba(109, 160, 255, 0.65) 0%, rgba(109, 160, 255, 0) 76%),
    radial-gradient(44% 44% at 78% 72%, rgba(49, 118, 220, 0.64) 0%, rgba(49, 118, 220, 0) 78%);
  animation: auraSweep 9s ease-in-out infinite;
}

@keyframes sparkleDrift {
  0% { background-position: 0 0, 120px 60px, 220px 180px; }
  50% { background-position: 180px -120px, -80px 180px, 360px 40px; }
  100% { background-position: 0 0, 120px 60px, 220px 180px; }
}

@keyframes auraSweep {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50% { transform: translate3d(-4%, 3%, 0) scale(1.12) rotate(10deg); }
}

.auth-shell {
  width: min(1040px, 100%);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.95fr 1.15fr;
  overflow: hidden;
  animation: cardIn 0.8s cubic-bezier(.18,.82,.24,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-panel {
  order: 2;
  padding: 48px 52px 42px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-showcase {
  order: 1;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 42px 36px;
  color: #eef4ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(168deg, #0f2f5e 0%, var(--mbip-green-deep) 52%, var(--mbip-green) 100%);
}

.auth-showcase > * {
  position: relative;
  z-index: 1;
}

.auth-showcase::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  top: -90px;
  left: -92px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 0;
}

.auth-showcase::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, rgba(127, 182, 255, 0) 0%, rgba(127, 182, 255, 0.96) 35%, rgba(127, 182, 255, 0) 100%);
  pointer-events: none;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #eef4ff;
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 14px;
  animation: fadeUp 0.65s ease both;
  animation-delay: .16s;
}

.showcase-title {
  margin: 0;
  font-family: 'IBM Plex Serif', serif;
  font-size: clamp(1.6rem, 2.8vw, 2.05rem);
  line-height: 1.25;
  font-weight: 600;
  animation: fadeUp 0.65s ease both;
  animation-delay: .22s;
}

.showcase-text {
  margin-top: 10px;
  margin-bottom: 16px;
  font-size: 0.89rem;
  line-height: 1.64;
  color: rgba(232, 241, 255, 0.9);
  max-width: 36ch;
  animation: fadeUp 0.65s ease both;
  animation-delay: .28s;
}

.showcase-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  animation: fadeUp 0.65s ease both;
  animation-delay: .34s;
}

.showcase-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(230, 241, 255, 0.92);
}

.showcase-list i {
  color: #b3d5ff;
  margin-top: 2px;
}

.showcase-links {
  margin-top: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(226, 238, 255, 0.74);
  font-weight: 600;
  animation: fadeUp 0.65s ease both;
  animation-delay: .4s;
}

.showcase-links a {
  color: inherit;
  text-decoration: none;
  margin-right: 8px;
}

.showcase-links a:hover {
  color: #f4f8ff;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  animation: fadeUp 0.65s ease both;
  animation-delay: .08s;
}

.auth-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(145deg, var(--mbip-green), var(--mbip-green-soft));
  box-shadow: 0 10px 22px rgba(31, 94, 168, 0.34);
}

.auth-brand-name {
  margin: 0;
  font-family: 'IBM Plex Serif', serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-brand-sub {
  font-size: 0.78rem;
  color: #72839f;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 11px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #cfdbf3;
  color: var(--mbip-green);
  font-weight: 600;
  font-size: 0.72rem;
  margin-bottom: 12px;
  animation: fadeUp 0.65s ease both;
  animation-delay: .16s;
}

.auth-title {
  margin: 0;
  font-family: 'IBM Plex Serif', serif;
  font-size: 2rem;
  font-weight: 600;
  color: #1d2e4a;
  animation: fadeUp 0.65s ease both;
  animation-delay: .22s;
}

.auth-subtitle {
  margin-top: 8px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  animation: fadeUp 0.65s ease both;
  animation-delay: .28s;
}

.auth-alert {
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.auth-form {
  width: 100%;
  max-width: 410px;
  animation: fadeUp 0.65s ease both;
  animation-delay: .34s;
}

.auth-form .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4e6180;
}

.auth-form .form-control {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--ink);
  background: #f3f6fc;
}

.auth-form .form-control::placeholder {
  color: #8897af;
}

.auth-form .form-control:focus {
  border-color: var(--mbip-green);
  box-shadow: 0 0 0 0.2rem var(--focus);
  background: #fff;
}

.auth-form .input-group-text {
  border-radius: 999px 0 0 999px;
  border: 1px solid var(--line);
  border-right: 0;
  background: #f3f6fc;
  color: #697488;
}

.auth-form .with-icon .form-control {
  border-radius: 0 999px 999px 0;
}

.field-wrap {
  position: relative;
}

.field-wrap .form-control {
  padding-right: 42px;
}

.btn-toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #7485a3;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.btn-toggle-pass:hover {
  color: var(--mbip-green);
}

.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 14px;
  font-size: 0.84rem;
}

.auth-meta .form-check-label {
  color: #4e6180;
}

.auth-meta a,
.auth-links a,
.auth-help a,
.auth-empty-state a {
  color: var(--mbip-green);
  font-weight: 600;
  text-decoration: none;
}

.auth-meta a:hover,
.auth-links a:hover,
.auth-help a:hover,
.auth-empty-state a:hover {
  text-decoration: underline;
}

.btn-auth {
  width: 100%;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--mbip-green), var(--mbip-green-soft));
  box-shadow: 0 10px 24px rgba(31, 94, 168, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(18, 59, 115, 0.34);
}

.btn-auth.btn-auth-warm {
  background: linear-gradient(135deg, var(--mbip-green), var(--mbip-green-soft));
  box-shadow: 0 10px 24px rgba(31, 94, 168, 0.28);
}

.auth-links {
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--ink-soft);
  text-align: center;
}

.auth-help {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #626d81;
}

.auth-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 0.74rem;
  color: #7f90a8;
}

.auth-empty-state {
  border: 1px dashed #cedcf1;
  border-radius: 12px;
  background: #f4f8ff;
  color: #5d6679;
  font-size: 0.88rem;
  line-height: 1.58;
  padding: 12px;
}

.form-check-input:checked {
  background-color: var(--mbip-green);
  border-color: var(--mbip-green);
}

.form-check-label {
  color: #61718a;
}

@media (max-width: 992px) {
  body.auth-body {
    overflow: auto;
  }

  .auth-layout {
    padding: 20px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .auth-panel,
  .auth-showcase {
    padding: 28px;
  }

  .auth-showcase {
    min-height: 250px;
  }

  .auth-showcase::after {
    display: none;
  }

  .auth-form {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .auth-layout {
    padding: 12px;
  }

  .auth-showcase {
    display: none;
  }

  .auth-panel {
    padding: 22px;
  }

  .auth-title {
    font-size: 1.6rem;
  }

  .auth-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.auth-body,
  body.auth-body::before,
  body.auth-body::after,
  .auth-layout::before,
  .auth-layout::after,
  .auth-shell {
    animation: none !important;
  }
}

