/* Login page styles */
body {
  /* Pure CSS gradient — renders instantly, no image request */
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(245, 130, 31, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 85%, rgba(0, 120, 212, 0.20) 0%, transparent 55%),
    linear-gradient(145deg, #0a1628 0%, #0d2244 40%, #112d5c 70%, #0c1f42 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.global-loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(245, 130, 31, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(7, 18, 36, 0.94), rgba(31, 50, 86, 0.9));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 2000;
}

.global-loading-screen.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.global-loading-panel {
  min-width: min(360px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(9, 15, 28, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.global-loading-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #f5821f;
  animation: epir-loader-spin .75s linear infinite;
}

.global-loading-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.global-loading-copy strong {
  font-size: 1rem;
  letter-spacing: .05em;
  color: #ffffff;
  text-transform: uppercase;
}

.global-loading-copy span {
  font-size: .85rem;
  color: rgba(255, 255, 255, 0.78);
}

body.loading-active {
  overflow: hidden;
}

@keyframes epir-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-box {
  background: rgba(255, 255, 255, 0.97);
  padding: 2.75rem 2.25rem 2.25rem;
  border-radius: 20px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.32),
    0 4px 12px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 420px;
  text-align: center;
  backdrop-filter: blur(8px);
  animation: card-rise 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  /* Orange border on all 4 sides via outline trick */
  outline: 2.5px solid transparent;
  outline-offset: 0;
  /* Use a wrapper pseudo-element approach via box-shadow layering */
  border: 2.5px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.login-box::before {
  content: "";
  position: absolute;
  inset: -2.5px;
  border-radius: 22px; /* slightly larger than card's 20px */
  padding: 2.5px;
  background: linear-gradient(135deg, #d13f1d 0%, #f5821f 40%, #ffaa00 70%, #f5821f 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo-optum {
  width: 86px;
  margin-bottom: 0.4rem;
  opacity: 0.92;
}

.logo-app {
  width: 190px;
  margin-bottom: 0.25rem;
}

.divider {
  border: none;
  border-top: 1px solid #eaedf1;
  margin: 1.25rem 0 1rem;
}

.login-subtitle {
  font-size: 0.84rem;
  color: #6c757d;
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}

.local-login-form {
  display: grid;
  gap: 0.42rem;
  margin-bottom: 0.9rem;
  text-align: left;
}

.local-login-note {
  display: grid;
  gap: 0.14rem;
  padding: 0.55rem 0.68rem;
  border: 1px solid rgba(245, 130, 31, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 248, 240, 0.98) 0%, rgba(255, 243, 227, 0.98) 100%);
}

.local-login-note strong {
  font-size: 0.72rem;
  color: #9a3412;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.local-login-note span {
  font-size: 0.74rem;
  line-height: 1.3;
  color: #7c2d12;
}

.local-login-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #21446f;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.local-login-input {
  width: 100%;
  min-height: 38px;
  padding: 0.48rem 0.68rem;
  border: 1px solid #d4dbe5;
  border-radius: 10px;
  background: #fff;
  color: #12263f;
  font-size: 0.84rem;
  line-height: 1.2;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.local-login-input:focus {
  outline: none;
  border-color: #0a78d1;
  box-shadow: 0 0 0 3px rgba(10, 120, 209, 0.14);
}

.local-login-btn {
  min-height: 0;
  border: 1px solid rgba(18, 38, 63, 0.12);
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc 0%, #edf4fb 100%);
  color: #16385c;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.6rem;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.local-login-btn:hover {
  border-color: rgba(10, 120, 209, 0.32);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.local-login-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.login-alt-divider {
  position: relative;
  margin: 0 0 1rem;
  text-align: center;
}

.login-alt-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid #e5eaf1;
}

.login-alt-divider span {
  position: relative;
  display: inline-block;
  padding: 0 0.6rem;
  background: rgba(255, 255, 255, 0.97);
  color: #7a8798;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sso-btn {
  background: linear-gradient(135deg, #0078d4 0%, #0a5fad 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  padding: 0.55rem 1.6rem;
  border-radius: 10px;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  box-shadow: 0 3px 10px rgba(0, 120, 212, 0.30);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.sso-btn:hover {
  background: linear-gradient(135deg, #1484d6 0%, #0e6ec7 100%);
  box-shadow: 0 6px 18px rgba(0, 120, 212, 0.40);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.sso-btn:active {
  background: linear-gradient(135deg, #005a9e 0%, #004880 100%);
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 120, 212, 0.25);
}

.ms-logo {
  flex-shrink: 0;
}

.alert.fade {
  transition: opacity 1.5s ease;
}

footer {
  margin-top: 1.75rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .login-box {
    margin: 1rem;
    padding: 2.25rem 1.2rem 1.6rem;
  }

  .sso-btn,
  .local-login-btn {
    width: 100%;
  }
}
