.auth-page {
  --auth-green: #18291f;
  --auth-green-soft: #294433;
  --auth-cream: #f4f1e8;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f7f7f3;
}

.auth-shell {
  grid-template-columns: minmax(520px, 1.18fr) minmax(460px, 0.82fr);
  min-height: 100svh;
}

.auth-art {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(30px, 4vw, 58px);
  background:
    radial-gradient(circle at 20% 20%, rgba(135, 173, 126, 0.17), transparent 34%),
    linear-gradient(145deg, #20382a 0%, #17271e 52%, #101c16 100%);
}

.auth-art::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  opacity: 0.22;
  background-image: url(../icons/auth-texture.svg);
  background-size: 720px;
  mix-blend-mode: soft-light;
}

.auth-art::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}

.auth-art-header,
.auth-art-footer,
.dashboard-header {
  position: relative;
  z-index: 5;
}

.auth-art-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-art .brand {
  font-size: 18px;
  color: #fff;
}

.auth-art .brand-mark {
  width: 40px;
  height: 40px;
  color: #1b3023;
  background: var(--auth-cream);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.auth-art .brand-mark svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.secure-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(238, 245, 239, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.secure-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fd6a5;
  box-shadow: 0 0 0 4px rgba(143, 214, 165, 0.1), 0 0 15px #77c995;
}

.auth-showcase {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(300px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 70px);
  width: 100%;
  margin-block: auto;
  padding: clamp(40px, 6vh, 76px) 0;
}

.showcase-copy {
  max-width: 570px;
}

.showcase-copy .eyebrow {
  color: #a7c6af;
}

.showcase-copy h1 {
  margin: 16px 0 24px;
  color: #fffdf7;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-size: clamp(48px, 5.5vw, 88px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.showcase-copy h1 em {
  color: #c8d9a9;
  font-weight: 400;
}

.showcase-copy > p:last-child {
  max-width: 430px;
  margin: 0;
  color: rgba(235, 241, 236, 0.7);
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.65;
}

.asset-composition {
  position: relative;
  width: min(34vw, 430px);
  min-width: 310px;
  height: min(48vw, 510px);
  min-height: 410px;
  margin-left: auto;
  perspective: 1000px;
}

.visual-card {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.visual-card-primary {
  z-index: 3;
  right: 11%;
  bottom: 8%;
  width: 72%;
  transform: rotate(2deg);
}

.visual-card-secondary {
  z-index: 2;
  top: 2%;
  left: 0;
  width: 48%;
  transform: rotate(-7deg);
}

.visual-card-tertiary {
  z-index: 1;
  top: 13%;
  right: 0;
  width: 43%;
  transform: rotate(8deg);
}

.abstract-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.visual-card-primary .abstract-image {
  aspect-ratio: 4 / 3;
}

.abstract-forest {
  background: linear-gradient(155deg, #e4c994, #779278 48%, #1f4b3a);
}

.abstract-forest::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.25), transparent 34%);
}

.sun {
  position: absolute;
  top: 16%;
  right: 18%;
  width: 21%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f8e4af;
  box-shadow: 0 0 34px rgba(250, 225, 161, 0.72);
}

.ridge {
  position: absolute;
  right: -15%;
  bottom: -28%;
  width: 105%;
  height: 75%;
  border-radius: 50% 50% 0 0;
  transform: rotate(-12deg);
}

.ridge-back {
  right: 30%;
  bottom: -34%;
  background: #557a66;
}

.ridge-front {
  background: #173f32;
}

.abstract-product {
  background: linear-gradient(145deg, #d4b6a0, #865f59 54%, #442f34);
}

.product-orbit {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 120%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 235, 216, 0.42);
  border-radius: 50%;
}

.product-shape {
  position: absolute;
  bottom: 17%;
  left: 27%;
  width: 48%;
  height: 55%;
  border-radius: 48% 48% 18% 18%;
  background: linear-gradient(130deg, #f4d9bd, #ac786c);
  box-shadow: 20px 25px 40px rgba(38, 16, 17, 0.3);
  transform: rotate(11deg);
}

.abstract-editorial {
  display: flex;
  align-items: flex-end;
  gap: 8%;
  padding: 18%;
  background: linear-gradient(150deg, #dedbc9, #8d9b8b);
}

.abstract-editorial span {
  display: block;
  width: 28%;
  border-radius: 30px 30px 4px 4px;
  background: #29493b;
}

.abstract-editorial span:nth-child(1) {
  height: 46%;
}

.abstract-editorial span:nth-child(2) {
  height: 78%;
  background: #e8c484;
}

.abstract-editorial span:nth-child(3) {
  height: 60%;
  background: #6a463e;
}

.visual-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #f8faf7;
  background: rgba(19, 35, 26, 0.86);
  font-size: 11px;
}

.visual-card-meta small {
  color: rgba(255, 255, 255, 0.55);
}

.floating-chip {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #f2f6f2;
  background: rgba(20, 37, 28, 0.78);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  font-size: 11px;
  font-weight: 700;
}

.floating-chip span {
  color: #d9c98c;
}

.floating-chip-top {
  top: 16%;
  right: 25%;
  animation: float-chip 5.5s ease-in-out infinite;
}

.floating-chip-bottom {
  right: 1%;
  bottom: 20%;
  animation: float-chip 6.5s 0.7s ease-in-out infinite reverse;
}

.auth-glow {
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
}

.auth-glow-one {
  top: 7%;
  right: 5%;
  background: #c8d99e;
}

.auth-glow-two {
  bottom: -10%;
  left: 16%;
  background: #af825f;
}

.spark-field i {
  position: absolute;
  z-index: 4;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f5e9b7;
  box-shadow: 0 0 12px 2px rgba(245, 233, 183, 0.55);
  animation: sparkle 3.8s ease-in-out infinite;
}

.spark-field i:nth-child(1) { top: 18%; left: 42%; }
.spark-field i:nth-child(2) { top: 34%; left: 63%; animation-delay: 0.6s; }
.spark-field i:nth-child(3) { top: 61%; left: 49%; animation-delay: 1.4s; }
.spark-field i:nth-child(4) { top: 76%; left: 72%; animation-delay: 2.1s; }
.spark-field i:nth-child(5) { top: 25%; left: 88%; animation-delay: 2.8s; }
.spark-field i:nth-child(6) { top: 51%; left: 94%; animation-delay: 0.9s; }
.spark-field i:nth-child(7) { top: 84%; left: 32%; animation-delay: 1.8s; }
.spark-field i:nth-child(8) { top: 12%; left: 23%; animation-delay: 3.1s; }

.auth-art-footer {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #dbe5dc;
}

.avatar-stack {
  display: flex;
}

.avatar-stack span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border: 2px solid #1b2e23;
  border-radius: 50%;
  color: #21372a;
  background: #c9d7c7;
  font-size: 8px;
  font-weight: 800;
}

.avatar-stack span:first-child {
  margin-left: 0;
  background: #e2c7a7;
}

.avatar-stack span:last-child {
  background: #c2b6d5;
}

.auth-art-footer p {
  margin: 0;
}

.auth-art-footer strong,
.auth-art-footer p span {
  display: block;
}

.auth-art-footer strong {
  font-size: 12px;
}

.auth-art-footer p span,
.auth-caption {
  margin-top: 3px;
  color: rgba(222, 232, 224, 0.54);
  font-size: 10px;
}

.trust-divider {
  width: 1px;
  height: 31px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.13);
}

.auth-form {
  position: relative;
  min-height: 100svh;
  padding: clamp(28px, 5vw, 76px);
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 224, 207, 0.42), transparent 30%),
    #f8f8f4;
}

.auth-form::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  content: "";
  background: linear-gradient(transparent, rgba(48, 73, 58, 0.2), transparent);
}

.login-panel {
  width: min(440px, 100%);
  animation: panel-in 0.55s ease-out both;
}

.login-heading {
  position: relative;
  margin-bottom: 34px;
}

.welcome-mark {
  position: absolute;
  top: -38px;
  right: 0;
  color: #b6a05f;
  font-size: 24px;
  filter: drop-shadow(0 0 10px rgba(182, 160, 95, 0.4));
  animation: welcome-glint 4s ease-in-out infinite;
}

.login-heading .eyebrow {
  color: #567261;
}

.login-heading h2 {
  margin: 0;
  color: #18231c;
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.login-heading .muted {
  margin: 13px 0 0;
  font-size: 14px;
  line-height: 1.55;
}

.login-form {
  width: 100%;
}

.auth-field {
  display: grid;
  gap: 9px;
  margin: 0 0 18px;
  color: #2d3831;
  font-size: 12px;
  letter-spacing: 0.015em;
}

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

.field-control > svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 16px;
  width: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #849087;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
  pointer-events: none;
}

.field-control input {
  height: 54px;
  padding: 0 48px;
  border: 1px solid #d7dbd3;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field-control input::placeholder {
  color: #9ba39c;
}

.field-control:focus-within input {
  border-color: #51705d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(52, 91, 69, 0.1), 0 10px 25px rgba(32, 53, 40, 0.05);
}

.field-control:focus-within > svg {
  stroke: #345b45;
}

.password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 7px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  transform: translateY(-50%);
  color: #7e8981;
  background: transparent;
}

.password-toggle:hover {
  color: #314f3d;
  background: #eef1eb;
}

.password-toggle svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.password-toggle[aria-pressed="true"] svg {
  color: #345b45;
}

.form-assurance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 3px 1px 24px;
  color: #7a857d;
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-assurance span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.form-assurance svg {
  width: 16px;
  fill: none;
  stroke: #50765e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.auth-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(120deg, #294a36, #193324);
  box-shadow: 0 16px 32px rgba(33, 62, 44, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.auth-submit::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.2), transparent 80%);
  transform: translateX(-100%);
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(33, 62, 44, 0.28);
}

.auth-submit:hover::before {
  opacity: 1;
  transform: translateX(100%);
  transition: transform 650ms ease;
}

.auth-submit svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 180ms ease;
}

.auth-submit:hover svg {
  transform: translateX(3px);
}

.notice.error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  border: 1px solid #edcbc6;
  color: #7c332d;
  background: #fff4f2;
  font-size: 12px;
}

/* Only show the notice when there is a message. */
.notice.error[hidden],
.notice.error:has(> span:empty) {
  display: none;
}

.notice.error svg {
  flex: 0 0 auto;
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.login-help {
  margin: 27px 0 0;
  color: #899089;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.mobile-brand {
  display: none;
}

.auth-form-footer {
  position: absolute;
  right: clamp(28px, 5vw, 76px);
  bottom: 28px;
  left: clamp(28px, 5vw, 76px);
  display: flex;
  justify-content: space-between;
  color: #9a9f9a;
  font-size: 10px;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(0.65) rotate(0); }
  50% { opacity: 1; transform: scale(1.6) rotate(90deg); }
}

@keyframes float-chip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-glint {
  0%, 75%, 100% { opacity: 0.45; transform: rotate(0) scale(0.85); }
  84% { opacity: 1; transform: rotate(32deg) scale(1.18); }
}

@media (max-width: 1180px) {
  .auth-shell {
    grid-template-columns: minmax(460px, 1fr) minmax(420px, 0.85fr);
  }

  .auth-showcase {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .asset-composition {
    position: absolute;
    right: 4%;
    bottom: 12%;
    width: 260px;
    min-width: 260px;
    height: 300px;
    min-height: 300px;
    opacity: 0.82;
  }

  .showcase-copy {
    position: relative;
    z-index: 6;
  }
}

@media (max-width: 880px) {
  .auth-shell {
    display: block;
    background: var(--auth-green);
  }

  .auth-art {
    display: flex;
    min-height: 340px;
    padding: 27px 26px 58px;
  }

  .auth-art-header .secure-status,
  .auth-art-footer,
  .asset-composition {
    display: none;
  }

  .auth-showcase {
    display: block;
    padding: 70px 0 24px;
  }

  .showcase-copy h1 {
    max-width: 600px;
    font-size: clamp(44px, 11vw, 70px);
  }

  .showcase-copy > p:last-child {
    max-width: 540px;
  }

  .auth-form {
    min-height: auto;
    margin-top: -28px;
    padding: 50px 24px 88px;
    border-radius: 28px 28px 0 0;
  }

  .auth-form::before {
    display: none;
  }

  .login-panel {
    margin: auto;
  }

  .auth-form-footer {
    right: 24px;
    bottom: 24px;
    left: 24px;
  }
}

@media (max-width: 560px) {
  .auth-art {
    min-height: 276px;
  }

  .auth-art-header {
    display: none;
  }

  .auth-showcase {
    padding-top: 26px;
  }

  .showcase-copy h1 {
    margin-top: 10px;
    font-size: 46px;
  }

  .showcase-copy > p:last-child {
    font-size: 14px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(440px, 100%);
    margin: 0 auto 54px;
  }

  .mobile-brand .secure-status {
    color: #708078;
  }

  .login-heading h2 {
    font-size: 36px;
  }

  .welcome-mark {
    top: -23px;
  }

  .form-assurance {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-form-footer span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spark-field i,
  .floating-chip,
  .welcome-mark,
  .login-panel {
    animation: none;
  }
}
