:root {
  --orange: #f47a00;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; }

.login-screen,
.login-page {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background-color: #03101f;
  color: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page { background: #03101f url("/static/media/login-poster.jpg") center / cover no-repeat fixed; }

.login-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(0.82) contrast(1.05) brightness(0.78);
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 151, 198, 0.12), transparent 35%),
    linear-gradient(105deg, rgba(2, 11, 24, 0.73), rgba(5, 24, 42, 0.28) 47%, rgba(2, 12, 25, 0.7)),
    linear-gradient(180deg, rgba(1, 8, 18, 0.16), rgba(2, 12, 26, 0.77));
}

.login-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 190px rgba(0, 0, 0, 0.72);
}

.login-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vh, 44px) 18px;
}

.login-monument {
  width: min(620px, 94vw);
  display: grid;
  justify-items: center;
  filter: drop-shadow(0 28px 58px rgba(0, 0, 0, 0.38));
}

.access-card {
  position: relative;
  z-index: 4;
  width: min(520px, 90vw);
  min-height: 316px;
  padding: 34px 42px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(204, 233, 244, 0.45);
  border-radius: 24px;
  background:
    linear-gradient(139deg, rgba(12, 43, 69, 0.95), rgba(3, 20, 38, 0.84) 68%),
    rgba(4, 23, 42, 0.82);
  box-shadow:
    0 30px 78px rgba(0, 0, 0, 0.47),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(44, 178, 224, 0.1);
  backdrop-filter: blur(24px) saturate(125%);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
}

.access-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 50%;
  width: 46%;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #f47a00 18%, #ffc079 50%, #f47a00 82%, transparent);
  box-shadow: 0 0 20px rgba(244, 122, 0, 0.72);
}

.access-card::after {
  content: "";
  position: absolute;
  inset: auto 12% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61, 193, 233, 0.5), transparent);
}

.card-sheen {
  position: absolute;
  z-index: 0;
  inset: -60% -12% 22% 48%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055), transparent);
  pointer-events: none;
}

.card-aura {
  position: absolute;
  z-index: 0;
  width: 390px;
  height: 180px;
  top: -82px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 184, 228, 0.17), rgba(47, 184, 228, 0) 68%);
  pointer-events: none;
}

.login-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: min(370px, 72vw);
  height: auto;
  filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.22));
}

.brand-divider {
  position: relative;
  z-index: 1;
  width: min(330px, 64vw);
  height: 1px;
  margin: 8px 0 12px;
  background: linear-gradient(90deg, transparent, rgba(244, 122, 0, 0.95) 26%, #ffc27d 50%, rgba(244, 122, 0, 0.95) 74%, transparent);
  box-shadow: 0 0 10px rgba(244, 122, 0, 0.38);
}

.brand-tagline {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #c5eaf5;
  font-size: clamp(0.58rem, 0.9vw, 0.72rem);
  font-weight: 680;
  letter-spacing: clamp(0.13em, 0.33vw, 0.22em);
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
}

.login-session-message {
  position: relative;
  z-index: 1;
  margin: 16px auto 0;
  border: 1px solid rgba(255, 181, 96, 0.32);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(244, 122, 0, 0.12);
  color: #ffe3c5;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.45;
}

.microsoft-button {
  position: relative;
  z-index: 1;
  min-width: min(286px, 72vw);
  min-height: 52px;
  margin-top: 26px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.98);
  color: #102438;
  box-shadow: 0 15px 34px rgba(0, 0, 0, 0.32), inset 0 1px 0 #ffffff;
  font-size: 0.93rem;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.microsoft-button:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.38), 0 0 0 5px rgba(43, 184, 223, 0.1);
}

.microsoft-button:focus-visible,
.account-link:focus-visible {
  outline: 3px solid #6ed9f5;
  outline-offset: 4px;
}

.microsoft-mark {
  width: 19px;
  height: 19px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
}

.microsoft-mark span:nth-child(1) { background: #f25022; }
.microsoft-mark span:nth-child(2) { background: #7fba00; }
.microsoft-mark span:nth-child(3) { background: #00a4ef; }
.microsoft-mark span:nth-child(4) { background: #ffb900; }

.signed-in-user {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 700;
}

.login-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.account-link {
  margin-top: 12px;
  color: #b0eaf8;
  font-size: 0.8rem;
  font-weight: 700;
}

.support-deck {
  position: relative;
  z-index: 3;
  width: min(550px, 86vw);
  height: 19px;
  margin-top: -3px;
  border: 1px solid rgba(189, 230, 244, 0.18);
  border-radius: 3px 3px 8px 8px;
  background: linear-gradient(180deg, #235f7b, #0e3855 58%, #061e35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.support-deck::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 50%;
  width: 36%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #f47a00, transparent);
  box-shadow: 0 0 10px rgba(244, 122, 0, 0.42);
}

.support-deck span {
  position: absolute;
  inset: 50% 8% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 218, 250, 0.54), transparent);
}

.pillar-array {
  width: min(520px, 84vw);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: clamp(34px, 6vw, 70px);
}

.compact-pillar {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
}

.pillar-head {
  width: 100%;
  height: 24px;
  display: grid;
  justify-items: center;
  align-content: start;
}

.pillar-head span {
  display: block;
  border: 1px solid rgba(211, 239, 249, 0.16);
  background: linear-gradient(180deg, #2e6f8c, #143e59);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pillar-head span:first-child {
  width: 86%;
  height: 9px;
  border-radius: 3px 3px 1px 1px;
}

.pillar-head span:last-child {
  width: 60%;
  height: 9px;
  border-radius: 0 0 6px 6px;
}

.pillar-core {
  position: relative;
  width: 45%;
  height: 94px;
  margin-top: -7px;
  display: flex;
  justify-content: space-evenly;
  padding: 8px 5px;
  border: 1px solid rgba(190, 228, 242, 0.14);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(90deg, #092c46, #1d5673 22%, #103a56 50%, #1f5c77 78%, #092c46);
  box-shadow: inset 0 0 15px rgba(1, 13, 25, 0.45), 0 11px 19px rgba(0, 0, 0, 0.2);
}

.pillar-core::after {
  content: "";
  position: absolute;
  inset: auto 8% 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 122, 0, 0.78), transparent);
  box-shadow: 0 0 8px rgba(244, 122, 0, 0.4);
}

.pillar-core i {
  width: 7%;
  border-radius: 99px;
  background: rgba(0, 15, 29, 0.31);
  box-shadow: 1px 0 rgba(255, 255, 255, 0.05);
}

.pillar-foot {
  width: 82%;
  height: 21px;
  display: grid;
  justify-items: center;
}

.pillar-foot span {
  display: block;
  border: 1px solid rgba(199, 232, 244, 0.13);
  background: linear-gradient(180deg, #1b5571, #082b46);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pillar-foot span:first-child {
  width: 62%;
  height: 8px;
}

.pillar-foot span:last-child {
  width: 100%;
  height: 10px;
  border-radius: 2px 2px 5px 5px;
}

.pillar-label {
  position: relative;
  width: 148%;
  min-height: 48px;
  margin-top: 8px;
  padding-bottom: 10px;
  display: grid;
  place-items: start center;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.54rem, 0.82vw, 0.65rem);
  font-weight: 700;
  letter-spacing: 0.105em;
  line-height: 1.36;
  text-align: center;
  text-transform: uppercase;
}

.pillar-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 40px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #f47a00, transparent);
  box-shadow: 0 0 8px rgba(244, 122, 0, 0.35);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .login-shell { padding: 24px 14px; }
  .login-monument { width: min(520px, 96vw); }
  .access-card { width: min(460px, 92vw); min-height: 286px; padding: 28px 24px; border-radius: 22px; }
  .login-logo { width: min(330px, 78vw); }
  .support-deck { width: min(465px, 88vw); }
  .pillar-array { width: min(445px, 88vw); gap: 20px; }
  .pillar-core { height: 82px; }
  .pillar-label { width: 128%; font-size: 0.5rem; letter-spacing: 0.07em; }
}

@media (max-width: 480px) {
  .login-shell { align-items: start; padding-top: 8vh; overflow-y: auto; }
  .access-card { min-height: 250px; padding: 24px 18px 22px; }
  .brand-divider { margin: 5px 0 9px; }
  .microsoft-button { min-width: min(270px, 78vw); min-height: 50px; margin-top: 20px; }
  .support-deck { width: 88vw; height: 15px; }
  .pillar-array { width: 86vw; gap: 12px; }
  .pillar-head { height: 20px; }
  .pillar-head span:first-child { height: 7px; }
  .pillar-head span:last-child { height: 7px; }
  .pillar-core { width: 48%; height: 62px; }
  .pillar-foot { height: 17px; }
  .pillar-foot span:first-child { height: 6px; }
  .pillar-foot span:last-child { height: 8px; }
  .pillar-label { width: 150%; min-height: 44px; margin-top: 6px; font-size: 0.43rem; line-height: 1.28; }
}

@media (prefers-reduced-motion: reduce) {
  .login-video { display: none; }
  .microsoft-button { transition: none; }
}


.login-shell { padding-bottom: clamp(82px, 10vh, 108px); }

.access-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --card-lift: 0px;
  transform: perspective(1100px) translate3d(0, var(--card-lift), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 360ms cubic-bezier(.2,.8,.2,1), box-shadow 360ms ease, border-color 360ms ease;
}

.access-card:hover,
.access-card:focus-within {
  --card-lift: -7px;
  border-color: rgba(219, 244, 252, 0.72);
  box-shadow: 0 42px 98px rgba(0, 0, 0, 0.54), 0 0 0 1px rgba(44, 178, 224, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(244, 122, 0, 0.13);
}

.access-card:hover .card-sheen,
.access-card:focus-within .card-sheen { animation: cardSheen 1100ms ease both; }

@keyframes cardSheen {
  0% { transform: translateX(-28%) rotate(18deg); opacity: 0.3; }
  55% { opacity: 1; }
  100% { transform: translateX(28%) rotate(18deg); opacity: 0.35; }
}

.support-deck {
  height: 15px;
  margin-top: 11px;
}

.pillar-array { margin-top: 15px; }

.compact-pillar {
  position: relative;
  transform-origin: center top;
  cursor: default;
  outline: none;
  transition: filter 260ms ease;
}

.compact-pillar:hover,
.compact-pillar:focus-visible {
  z-index: 5;
  animation: pillarBounce 720ms cubic-bezier(.2,.9,.25,1.15) both;
  filter: drop-shadow(0 18px 25px rgba(0, 0, 0, 0.34));
}

.compact-pillar:hover .pillar-core,
.compact-pillar:focus-visible .pillar-core {
  border-color: rgba(127, 224, 250, 0.34);
  box-shadow: inset 0 0 20px rgba(2, 14, 26, 0.5), 0 16px 28px rgba(0, 0, 0, 0.25), 0 0 18px rgba(39, 177, 219, 0.19);
}

.compact-pillar:hover .pillar-head span,
.compact-pillar:hover .pillar-foot span,
.compact-pillar:focus-visible .pillar-head span,
.compact-pillar:focus-visible .pillar-foot span {
  border-color: rgba(232, 248, 253, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 14px rgba(244, 122, 0, 0.11);
}

.compact-pillar:hover .pillar-label,
.compact-pillar:focus-visible .pillar-label { color: #ffffff; }

@keyframes pillarBounce {
  0% { transform: translateY(0) scale(1); }
  42% { transform: translateY(-13px) scale(1.04); }
  68% { transform: translateY(-6px) scale(1.018); }
  100% { transform: translateY(-9px) scale(1.028); }
}

.pillar-label {
  margin-top: 12px;
  line-height: 1.52;
}

.login-footer {
  position: fixed;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 16px;
  padding: 0 18px;
  color: rgba(220, 237, 245, 0.68);
  font-size: 0.69rem;
  font-weight: 570;
  letter-spacing: 0.07em;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.login-version {
  position: fixed;
  z-index: 3;
  left: 18px;
  bottom: 16px;
  color: rgba(220, 237, 245, 0.68);
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

@media (max-width: 480px) {
  .login-version { left: 12px; bottom: 10px; font-size: 0.61rem; }
}

@media (prefers-reduced-motion: reduce) {
  .access-card { transform: none !important; transition: none; }
  .access-card:hover .card-sheen,
  .access-card:focus-within .card-sheen,
  .compact-pillar:hover,
  .compact-pillar:focus-visible { animation: none; transform: none; }
}
