/* IIARAS Luxury Dark Celestial Login Form (on Warm Cream Body) */
.auth-page {
  --ink: #1c1240;
  --gold: #b8741a;
  --gold-l: #e2b857;
  --gold-light: #fbe7a6;
  --cream: #fbf6ea;

  min-height: calc(100vh - var(--header-height, 104px));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem;
  position: relative;
  overflow: hidden;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 18% 18%, rgba(226, 184, 87, 0.24) 0%, transparent 40%),
    radial-gradient(circle at 82% 82%, rgba(184, 116, 26, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 50% 0%, rgba(251, 231, 166, 0.32) 0%, transparent 55%),
    linear-gradient(180deg, #fbf6ea 0%, #f6edd7 50%, #f2e5c8 100%);
  color: #ffffff;
}

/* Ambient Constellation Sparks on the Cream Background */
.auth-page .auth-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(184, 116, 26, 0.45), transparent),
    radial-gradient(2px 2px at 35% 65%, rgba(226, 184, 87, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 75% 25%, rgba(184, 116, 26, 0.4), transparent),
    radial-gradient(2px 2px at 85% 80%, rgba(212, 130, 42, 0.5), transparent),
    radial-gradient(2.5px 2.5px at 52% 38%, rgba(226, 184, 87, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 92% 15%, rgba(184, 116, 26, 0.38), transparent),
    radial-gradient(2px 2px at 8% 85%, rgba(226, 184, 87, 0.5), transparent);
  background-size: 520px 520px;
  opacity: 0.85;
}

/* Auth Card - Signature Deep Royal Midnight (#1c1240 from Image 2) */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 470px;
  background-color: #1c1240;
  background: linear-gradient(175deg, #241652 0%, #1c1240 55%, #160d34 100%);
  border: 1.5px solid rgba(226, 184, 87, 0.45);
  border-radius: 26px;
  padding: clamp(2rem, 4vw, 2.85rem) clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow:
    0 26px 65px rgba(28, 18, 64, 0.32),
    0 8px 25px rgba(184, 116, 26, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  z-index: 2;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Header & Crest */
.auth-header {
  text-align: center;
  margin-bottom: 1.85rem;
}

.auth-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2d1864 0%, #1c1240 100%);
  border: 2px solid #e2b857;
  box-shadow:
    0 0 24px rgba(226, 184, 87, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.25);
  margin-bottom: 1.15rem;
  transition: transform .3s ease;
}

.auth-card:hover .auth-crest {
  transform: rotate(15deg) scale(1.03);
}

.auth-crest svg {
  width: 34px;
  height: 34px;
}

.auth-header h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 3.2vw, 2.45rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 .45rem;
  letter-spacing: -0.01em;
}

.auth-header h1 .gold-text {
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
  background: linear-gradient(110deg, #fff3c4 0%, #e2b857 35%, #f59e0b 65%, #fff3c4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.auth-header p {
  font-size: .92rem;
  color: #c9bfe8;
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
}

/* Flash Messages */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  font-size: .86rem;
  margin-bottom: 1.3rem;
  line-height: 1.45;
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.auth-alert.success {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #86efac;
}

.auth-alert.info {
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}

.auth-alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-group {
  display: flex;
  flex-direction: column;
  gap: .42rem;
}

.auth-label {
  font-size: .86rem;
  font-weight: 700;
  color: #f1ebfc;
  letter-spacing: .01em;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrap .field-icon {
  position: absolute;
  left: 1.05rem;
  width: 18px;
  height: 18px;
  color: #e2b857;
  pointer-events: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .2s ease;
}

.auth-input {
  width: 100%;
  padding: .88rem 1rem .88rem 2.85rem;
  background: rgba(16, 10, 38, 0.75);
  border: 1.5px solid rgba(226, 184, 87, 0.35);
  border-radius: 13px;
  font-family: inherit;
  font-size: .95rem;
  color: #ffffff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.auth-input::placeholder {
  color: #8c80aa;
  opacity: 1;
}

.auth-input:focus {
  background: #140c32;
  border-color: #e2b857;
  box-shadow: 0 0 0 3.5px rgba(226, 184, 87, 0.28);
}

.auth-input-wrap:focus-within .field-icon {
  color: #fbe7a6;
}

/* Password Toggle */
.btn-toggle-pwd {
  position: absolute;
  right: .85rem;
  background: none;
  border: 0;
  color: #a497cb;
  cursor: pointer;
  padding: .4rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  transition: color .2s ease, background-color .2s ease;
}

.btn-toggle-pwd:hover {
  color: #fbe7a6;
  background-color: rgba(226, 184, 87, 0.12);
}

.btn-toggle-pwd svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Extras Row: Remember & Forgot */
.auth-extras {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .86rem;
  padding-top: .1rem;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #d8cff2;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #d4822a;
  cursor: pointer;
}

.auth-forgot {
  color: #e2b857;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease;
}

.auth-forgot:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Submit Button - Signature 24K Royal Gold */
.btn-auth-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  padding: .95rem 1.8rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.2;
  border: 0;
  color: #241400;
  background: linear-gradient(135deg, #fbe7a6 0%, #e8b040 50%, #d38d1e 100%);
  box-shadow:
    0 10px 30px rgba(212, 130, 42, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s ease, box-shadow .25s ease;
  margin-top: .4rem;
}

.btn-auth-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: skewX(-20deg);
  transition: left .7s ease;
  z-index: -1;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 34px rgba(212, 130, 42, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #241400;
}

.btn-auth-submit:hover::after {
  left: 130%;
}

.btn-auth-submit .arr {
  transition: transform .2s ease;
}

.btn-auth-submit:hover .arr {
  transform: translateX(4px);
}

.btn-auth-submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(212, 130, 42, 0.35);
}

/* Security Trust Footer */
.auth-trust-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(248, 226, 160, 0.18);
  font-size: .78rem;
  color: #a497cb;
}

.auth-trust-footer span {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}

.auth-trust-footer svg {
  width: 14px;
  height: 14px;
  stroke: #e2b857;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 575px) {
  .auth-card {
    padding: 1.85rem 1.25rem;
    border-radius: 20px;
  }
  .auth-extras {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }
  .auth-trust-footer {
    flex-direction: column;
    gap: .4rem;
  }
}
