/* ============================================================
   Erudite IMS — Login / Auth Premium Styles
   Brand palette: navy #071633 | gold #C7A23A | green #0B5A2A
   ============================================================ */

/* === Shell (full-page wrapper) ============================= */
.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top left,  rgba(199, 162, 58, 0.10) 0%, transparent 30rem),
    radial-gradient(ellipse at bottom right, rgba(7, 22, 51, 0.08)  0%, transparent 28rem),
    linear-gradient(180deg, #F4F2EC 0%, #EAE8E0 100%);
}

/* === Hero panel (left, desktop) ============================ */
.login-hero {
  padding: 3.5rem 4rem;
  color: #fff;
  /* Exact brand navy with a subtle depth gradient */
  background:
    linear-gradient(160deg, #071633 0%, #0a1f47 55%, #0d2a5e 100%);
  /* diagonal gold slash — pure CSS brand signature */
  overflow: hidden;
}

/* Gold slash decoration */
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      125deg,
      transparent 0%,
      transparent 48%,
      rgba(199, 162, 58, 0.06) 48%,
      rgba(199, 162, 58, 0.06) 52%,
      transparent 52%,
      transparent 100%
    );
  pointer-events: none;
  z-index: 1;
}

.login-hero__content {
  max-width: 44rem;
  padding-right: 2rem;
  z-index: 2;
  position: relative;
}

/* Gold accent rule under logo */
.login-hero__brand {
  padding-bottom: 1.25rem;
  border-bottom: 2px solid rgba(199, 162, 58, 0.35);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.login-hero__logo {
  width: min(18rem, 100%);
  display: block;
  /* Slight brightness lift so the logo pops on dark navy */
  filter: brightness(1.08) drop-shadow(0 2px 12px rgba(199, 162, 58, 0.18));
}

/* Gold ambient orb (top-right) */
.login-hero__orb--gold {
  width: 28rem;
  height: 28rem;
  top: -10rem;
  right: -8rem;
  background: radial-gradient(circle, rgba(199, 162, 58, 0.28) 0%, rgba(199, 162, 58, 0) 68%);
  filter: blur(12px);
  opacity: 0.85;
}

/* Green ambient orb (bottom-left — secondary brand) */
.login-hero__orb--blue {
  width: 20rem;
  height: 20rem;
  bottom: -5rem;
  left: -5rem;
  background: radial-gradient(circle, rgba(11, 90, 42, 0.26) 0%, rgba(11, 90, 42, 0) 68%);
  filter: blur(12px);
  opacity: 0.80;
}

.login-hero__orb {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

/* Subtle grid */
.login-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  mask-image: radial-gradient(ellipse at 40% 50%, rgba(0,0,0,0.7), transparent 85%);
  opacity: 0.55;
  z-index: 1;
}

/* Chip / pill badge on hero */
.login-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(199, 162, 58, 0.42);
  border-radius: 999px;
  background: rgba(199, 162, 58, 0.10);
  color: #e8d48a;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Hero headline */
.login-hero__title {
  max-width: 38rem;
  color: #fff;
  font-size: clamp(2.2rem, 3.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.login-hero__lead {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  line-height: 1.72;
}

/* Feature proof cards */
.login-proof-card {
  height: 100%;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.login-proof-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(199, 162, 58, 0.22);
}

.login-proof-card h6 { color: #fff; }

.login-proof-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 0.95rem;
  font-size: 1.2rem;
}

/* Override bg-label-* inside dark hero to use brand tints */
.login-hero .bg-label-primary  { background: rgba(199, 162, 58, 0.18) !important; color: #e8d48a !important; }
.login-hero .bg-label-success  { background: rgba(11, 90, 42,  0.22) !important; color: #64d48e !important; }
.login-hero .bg-label-warning  { background: rgba(199, 162, 58, 0.22) !important; color: #f5d97a !important; }

/* Metrics strip */
.login-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(199, 162, 58, 0.20);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.login-metric__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-metric__label {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

/* === Form panel (right) ==================================== */
.login-panel-wrap {
  background: #F4F2EC;
  background:
    radial-gradient(ellipse at top right, rgba(199, 162, 58, 0.07), transparent 22rem),
    linear-gradient(180deg, #F7F5EE 0%, #F0EDE4 100%);
}

.login-panel {
  max-width: 28rem;
  padding: 2.5rem;
  border-radius: 1.75rem;
  background: #FFFFFF;
  border: 1px solid rgba(7, 22, 51, 0.10);
  box-shadow:
    0 4px 6px rgba(7, 22, 51, 0.04),
    0 20px 60px rgba(7, 22, 51, 0.10),
    0 0 0 1px rgba(199, 162, 58, 0.06);
}

/* Gold accent line at top of panel */
.login-panel::before {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #C7A23A, rgba(199, 162, 58, 0.4));
  margin-bottom: 1.5rem;
}

.login-panel__logo {
  width: min(13rem, 100%);
  display: block;
}

/* Panel logo accent rule */
.login-panel__brand {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(7, 22, 51, 0.08);
  margin-bottom: 1.25rem;
}

/* "Secure Sign In" badge */
.login-panel .badge.bg-label-primary {
  background: rgba(7, 22, 51, 0.08) !important;
  color: #071633 !important;
  border: 1px solid rgba(7, 22, 51, 0.12);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
}

/* Panel heading */
.login-panel__intro h3 {
  color: #071633;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.login-panel__intro .text-body-secondary {
  color: #8A8D95 !important;
  font-size: 0.91rem;
}

/* Mobile banner */
.login-mobile-banner {
  padding: 1.05rem 1.1rem;
  border-radius: 1.15rem;
  background: linear-gradient(145deg, rgba(7, 22, 51, 0.05), rgba(199, 162, 58, 0.06));
  border: 1px solid rgba(7, 22, 51, 0.09);
}

/* === Form inputs ============================================ */
.login-field .form-control,
.login-field .input-group-text {
  border-color: #D9D6CC;
  background: #FAFAF8;
  color: #2B2D34;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-field .form-control {
  min-height: 3.2rem;
  border-radius: 0.9rem;
  box-shadow: none;
  font-size: 0.95rem;
}

.login-field .form-control::placeholder { color: #8A8D95; }

.login-field .form-control:focus {
  border-color: #071633;
  box-shadow: 0 0 0 3px rgba(7, 22, 51, 0.12);
  background: #fff;
}

.login-field .input-group:focus-within .input-group-text {
  border-color: #071633;
}

.login-field .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.login-field .input-group-text {
  border-left: 0;
  border-top-right-radius: 0.9rem;
  border-bottom-right-radius: 0.9rem;
  background: #FAFAF8;
  color: #8A8D95;
}

/* Forgot password link */
.login-field a.small {
  color: #0B5A2A;
  font-weight: 600;
}
.login-field a.small:hover { color: #071633; }

/* Security note */
.login-security-note {
  color: #8A8D95;
  font-size: 0.84rem;
  font-weight: 600;
}

/* === Submit button ========================================== */
.login-submit {
  min-height: 3.4rem;
  border-radius: 0.95rem;
  background: #071633;
  border-color: #071633;
  color: #fff;
  font-weight: 700;
  font-size: 0.97rem;
  letter-spacing: 0.01em;
  box-shadow:
    0 1px 2px rgba(7, 22, 51, 0.10),
    0 8px 24px rgba(7, 22, 51, 0.20);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.login-submit:hover {
  background: #0d2150;
  border-color: #0d2150;
  box-shadow:
    0 1px 2px rgba(7, 22, 51, 0.12),
    0 12px 32px rgba(7, 22, 51, 0.26);
  transform: translateY(-1px);
}

.login-submit:active {
  background: #050B18;
  border-color: #050B18;
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(7, 22, 51, 0.16);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(199, 162, 58, 0.65);
  outline-offset: 3px;
}

/* === Inline link (forgot pw, privacy etc.) ================= */
.auth-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #0B5A2A;
  font-weight: 600;
  text-decoration: none;
}
.auth-inline-link:hover { color: #071633; }

/* === Dark mode ============================================== */
[data-bs-theme="dark"] .login-shell {
  background:
    radial-gradient(ellipse at top left,  rgba(199, 162, 58, 0.09), transparent 30rem),
    radial-gradient(ellipse at bottom right, rgba(7, 22, 51, 0.6),  transparent 28rem),
    linear-gradient(180deg, #050B18 0%, #03070E 100%);
}

[data-bs-theme="dark"] .login-hero {
  background: linear-gradient(160deg, #050B18 0%, #081428 55%, #0a1c3a 100%);
}

[data-bs-theme="dark"] .login-panel-wrap {
  background:
    radial-gradient(ellipse at top right, rgba(199, 162, 58, 0.06), transparent 20rem),
    linear-gradient(180deg, #080F1E 0%, #060B18 100%);
}

[data-bs-theme="dark"] .login-panel {
  background: #0B1730;
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .login-panel::before {
  background: linear-gradient(90deg, #C7A23A, rgba(199, 162, 58, 0.3));
}

[data-bs-theme="dark"] .login-panel__brand {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .login-panel .badge.bg-label-primary {
  background: rgba(199, 162, 58, 0.14) !important;
  color: #e8d48a !important;
  border-color: rgba(199, 162, 58, 0.24);
}

[data-bs-theme="dark"] .login-panel__intro h3 { color: #fff; }
[data-bs-theme="dark"] .login-panel__intro .text-body-secondary { color: #B7BAC4 !important; }

[data-bs-theme="dark"] .login-mobile-banner {
  background: linear-gradient(145deg, rgba(199, 162, 58, 0.08), rgba(7, 22, 51, 0.30));
  border-color: rgba(255, 255, 255, 0.07);
}

[data-bs-theme="dark"] .login-field .form-control,
[data-bs-theme="dark"] .login-field .input-group-text {
  background: #0a1428;
  border-color: #243047;
  color: #fff;
}

[data-bs-theme="dark"] .login-field .form-control::placeholder { color: #B7BAC4; }

[data-bs-theme="dark"] .login-field .form-control:focus {
  border-color: #C7A23A;
  box-shadow: 0 0 0 3px rgba(199, 162, 58, 0.18);
  background: #0c1830;
}

[data-bs-theme="dark"] .login-field .input-group:focus-within .input-group-text {
  border-color: #C7A23A;
}

[data-bs-theme="dark"] .login-field .input-group-text { background: #0a1428; }

[data-bs-theme="dark"] .login-field a.small { color: #2FA866; }
[data-bs-theme="dark"] .login-field a.small:hover { color: #C7A23A; }

[data-bs-theme="dark"] .login-security-note { color: #B7BAC4; }

[data-bs-theme="dark"] .login-submit {
  background: #C7A23A;
  border-color: #C7A23A;
  color: #071633;
  box-shadow: 0 8px 24px rgba(199, 162, 58, 0.22);
}

[data-bs-theme="dark"] .login-submit:hover {
  background: #d4af45;
  border-color: #d4af45;
  color: #071633;
}

[data-bs-theme="dark"] .login-submit:focus-visible {
  outline-color: rgba(199, 162, 58, 0.70);
}

[data-bs-theme="dark"] .auth-inline-link { color: #2FA866; }
[data-bs-theme="dark"] .auth-inline-link:hover { color: #C7A23A; }

/* === Responsive ============================================= */
@media (max-width: 1199.98px) {
  .login-hero { padding: 3rem; }
  .login-hero__content { padding-right: 0; }
}

@media (max-width: 991.98px) {
  .login-shell {
    background:
      radial-gradient(ellipse at top right, rgba(199, 162, 58, 0.10), transparent 18rem),
      linear-gradient(180deg, #F4F2EC 0%, #EAE8E0 100%);
  }

  .login-panel-wrap { background: transparent; }

  .login-panel {
    padding: 1.85rem;
    box-shadow:
      0 4px 6px rgba(7, 22, 51, 0.04),
      0 16px 48px rgba(7, 22, 51, 0.09);
  }

  [data-bs-theme="dark"] .login-shell {
    background:
      radial-gradient(ellipse at top right, rgba(199, 162, 58, 0.09), transparent 18rem),
      linear-gradient(180deg, #050B18 0%, #03070E 100%);
  }

  [data-bs-theme="dark"] .login-panel-wrap { background: transparent; }
}

@media (max-width: 575.98px) {
  .login-panel {
    padding: 1.5rem;
    border-radius: 1.35rem;
  }

  .login-submit { min-height: 3.1rem; }
}
