.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--app-font);
  background: #eef3f9;
  color: var(--text);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, #0a3f84 0%, #0f67a5 100%);
}

.hero-panel {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: hero-fade 18s infinite;
  transition: opacity 0.6s ease-in-out;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide.s1 { animation-delay: 0s; }
.hero-slide.s2 { animation-delay: 6s; }
.hero-slide.s3 { animation-delay: 12s; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 24, 56, 0.18), rgba(7, 43, 84, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 28px 30px;
  overflow: visible;
}

.hero-logo {
  width: auto;
  height: auto;
  max-width: 124px;
  max-height: 124px;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  flex-shrink: 0;
  padding: 10px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

.hero-text h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 2.6vw, 2.7rem);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.hero-text p {
  margin: 0;
  max-width: 620px;
  font-size: 1.15rem;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.24);
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(11, 61, 145, 0.08), transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(215, 155, 55, 0.14), transparent 40%),
    #eef3f9;
}

.auth-main-inner {
  width: min(640px, 100%);
}

.auth-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 30px 28px;
}

.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  padding: 0 4px;
}

.auth-card-brand > div {
  min-width: 0;
}

.auth-card-brand img {
  width: auto;
  height: auto;
  max-width: 100px;
  max-height: 100px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 22px rgba(2, 25, 55, 0.18);
}

.auth-card-brand h1 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.2;
  color: #123f75;
}

.auth-card-brand p {
  margin: 4px 0 0;
  color: #4a6380;
  font-size: 1.02rem;
  line-height: 1.5;
}

.auth-card h2 {
  margin: 0 0 8px;
  color: #123f75;
  font-size: 1.85rem;
  line-height: 1.2;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: #47637e;
  font-size: 1rem;
}

.auth-form .field {
  margin-bottom: 14px;
}

.auth-form .field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.97rem;
  font-weight: 700;
  color: #1f3f63;
}

.auth-form .help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.auth-form .req {
  color: #d92d20;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.auth-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.auth-links {
  margin-top: 12px;
  text-align: center;
  font-size: 0.95rem;
  color: #4b6077;
}

.auth-links p {
  margin: 8px 0 0;
}

.auth-links a {
  color: #0c5f9f;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-card .msg {
  margin: 0 0 10px;
  max-width: none;
}

.auth-form .msg.error {
  margin-top: 6px;
  margin-bottom: 0;
}

.otp-field {
  margin-bottom: 18px;
}

.otp-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.otp-digit {
  width: 40px;
  height: 40px;
  border: 1px solid #d9dee5;
  background: #f2f4f7;
  border-radius: 6px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #223243;
  line-height: 40px;
  padding: 0;
}

.otp-digit:focus {
  outline: none;
  border-color: #0f67a5;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(15, 103, 165, 0.15);
}

.otp-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #67b746;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0.35;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.otp-complete.is-on {
  opacity: 1;
  transform: scale(1);
}

.otp-inline-error {
  margin-top: 8px;
  color: #b42318;
  font-size: 0.88rem;
  font-weight: 600;
}

.hero-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(7, 36, 74, 0.68);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.hero-nav-btn:hover {
  background: rgba(7, 36, 74, 0.85);
}

.hero-counter {
  min-width: 62px;
  text-align: center;
  color: #fff;
  background: rgba(6, 25, 52, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

.hero-hit-prev {
  left: 0;
}

.hero-hit-next {
  right: 0;
}

.hero-hit:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -2px;
}

.hero-panel.is-manual .hero-slide {
  animation: none;
  opacity: 0;
}

.hero-panel.is-manual .hero-slide.is-active {
  opacity: 1;
}

.auth-shelf-mode .auth-hero {
  display: grid;
  place-items: center;
  padding: 30px;
}

.auth-shelf-mode .hero-panel {
  position: relative;
  inset: auto;
  width: min(740px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 28px rgba(1, 19, 45, 0.24);
}

.auth-shelf-mode .hero-overlay {
  background: linear-gradient(180deg, rgba(5, 24, 56, 0.06), rgba(7, 43, 84, 0.14));
}

.auth-shelf-mode .hero-content {
  display: none;
}

@keyframes hero-fade {
  0% { opacity: 0; }
  6% { opacity: 1; }
  27% { opacity: 1; }
  33% { opacity: 0; }
  100% { opacity: 0; }
}

@media (max-width: 1060px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .auth-main {
    order: 1;
  }
  .auth-hero {
    order: 2;
    min-height: 320px;
  }
  .auth-shelf-mode .auth-hero {
    min-height: 360px;
    padding: 16px;
  }
  .auth-shelf-mode .hero-panel {
    width: min(840px, 100%);
    aspect-ratio: 16 / 8;
  }
  .hero-content {
    padding: 20px;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    min-height: 100dvh;
  }
  .auth-hero,
  .auth-shelf-mode .auth-hero {
    display: none;
  }
  .auth-main {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 4vw, 24px);
  }
  .auth-main-inner {
    width: min(440px, 100%);
    margin: 0 auto;
  }
  .auth-card {
    border-radius: 12px;
    padding: 20px 14px;
    margin: 0 auto;
  }
  .auth-card-brand {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-direction: column;
  }
  .auth-card-brand img {
    max-width: 68px;
    max-height: 68px;
  }
  .auth-card-brand > div {
    text-align: center;
  }
  .auth-card-brand h1 {
    font-size: 1.05rem;
    line-height: 1.25;
  }
  .auth-card-brand p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  .auth-card h2 {
    font-size: 1.5rem;
  }
  .auth-subtitle {
    margin-bottom: 16px;
    font-size: 0.95rem;
  }
  .auth-form .field label {
    font-size: 0.93rem;
  }
  .auth-form input,
  .auth-form select,
  .auth-form textarea {
    font-size: 16px;
  }
  .auth-shelf-mode .auth-hero {
    min-height: 220px;
    padding: 10px 10px 2px;
  }
  .auth-shelf-mode .hero-panel {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
  }
  .hero-logo {
    width: 96px;
    height: auto;
    max-height: 96px;
  }
  .hero-text h1 {
    font-size: 1.45rem;
  }
  .hero-text p {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .hero-controls {
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }
  .hero-hit {
    width: 34%;
  }
  .hero-nav-btn {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
  .hero-counter {
    min-width: 54px;
    font-size: 0.8rem;
    padding: 7px 8px;
  }
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .otp-digit {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .auth-main {
    min-height: 100dvh;
    padding: 10px;
  }
  .auth-card {
    padding: 16px 12px;
  }
  .auth-card-brand img {
    max-width: 58px;
    max-height: 58px;
  }
  .auth-card-brand h1 {
    font-size: 0.98rem;
  }
  .auth-actions {
    gap: 8px;
  }
  .auth-actions .btn {
    width: 100%;
  }
  .auth-actions a {
    width: 100%;
    text-align: center;
  }
  .otp-entry {
    gap: 6px;
  }
  .otp-digit {
    width: 34px;
    height: 34px;
    line-height: 34px;
  }
}
