.office-main:has(#office-workspace:not([hidden])) > .office-auth { display: none; }

body:has(#office-workspace[hidden]) {
  background: radial-gradient(ellipse at 12% 13%, #d3e2ef, transparent 55%),
    radial-gradient(ellipse at 90% 95%, #e4ddcf, transparent 59%), #eef1f5;
  color: #202554;
}

body:has(#office-workspace[hidden]) > :is(.office-header, .footer),
.office-main:has(#office-workspace[hidden]) > .office-shell-title { display: none; }

body:has(#office-workspace[hidden]) .office-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  min-height: 100svh;
  max-width: 86rem;
  padding: clamp(1rem, 3.6vw, 3.5rem);
}

.office-auth {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: 'gallery panel';
  min-height: min(46rem, 87svh);
  overflow: clip;
  border: 1px solid #e0e3e8;
  border-radius: 1rem;
  background: #fff;
}

.office-auth-panel {
  grid-area: panel;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  min-width: 0;
  padding: clamp(1.75rem, 4vw, 3.75rem);
  background: linear-gradient(150deg, #f1f7fb 0, #fff 36%, #fff 72%, #f8f4ec 100%);
}

.office-auth-brand { display: flex; align-items: center; gap: 1rem; font-size: .84rem; font-weight: 620; }
.office-auth-brand img { display: block; width: 2.8rem; height: auto; }
.office-auth-content { width: min(100%, 24rem); margin-inline: auto; padding-block: clamp(1.75rem, 6vh, 4rem); }
.office-auth-credit { font-size: .77rem; color: #56617a; }
.office-auth .office-signin { grid-template-columns: minmax(0, 1fr); max-width: none; gap: 1.6rem; }
.office-auth .office-credential-form { border: 0; padding: 0; background: transparent; border-radius: 0; min-width: 0; }
.office-auth .office-credential-form h2 { font-size: clamp(1.75rem, 3vw, 2.55rem); line-height: 1.09; letter-spacing: -.036em; text-wrap: balance; }
.office-auth .office-annotation { color: #59647a; font-size: .88rem; line-height: 1.55; }
.office-auth .office-field { min-width: 0; gap: .4rem; }
.office-auth .office-field input { min-height: 3.15rem; min-width: 0; width: 100%; border-radius: .55rem; font-size: 1rem; }
.office-auth .office-credential-form > button { width: 100%; min-height: 3.15rem; margin-top: .2rem; border-radius: .55rem; }
.office-auth #ops-entry { border-top: 1px solid #dce0e8; padding-top: 1.35rem; }
.office-auth #ops-entry h2 { font-size: 1.05rem; letter-spacing: 0; }
#office-auth-notice > p:empty { display: none; }
.office-auth #office-auth-notice > p:not(:empty) { font-size: .88rem; line-height: 1.5; margin: 0 0 1rem; padding: .75rem .85rem; border-radius: .55rem; }
.office-auth #office-auth-notice > .error:not(:empty) { background: #fff3f0; color: #8b2637; }
.office-auth #office-mfa-seed { overflow-wrap: anywhere; }

.office-auth-gallery { grid-area: gallery; position: relative; isolation: isolate; min-height: 19rem; background: #142541; }
.office-auth-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 440ms cubic-bezier(.22,.72,.24,1); }
.office-auth-slide[data-current] { opacity: 1; z-index: 1; }
.office-auth-slide img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; }
.office-auth-slide:first-child img { object-position: 68% 50%; }
.office-auth-slide::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #101a32e8); }
.office-auth-slide figcaption { position: absolute; z-index: 1; inset: auto clamp(1.5rem,4vw,3.5rem) 5rem; color: #fff; font-size: clamp(1.45rem, 3vw, 2.4rem); font-weight: 620; letter-spacing: -.04em; }
.office-auth-controls { position: absolute; z-index: 2; inset: auto clamp(1.5rem,4vw,3.5rem) 1.55rem; display: flex; align-items: center; gap: .25rem; }
.office-auth-controls button { display: grid; place-items: center; min-width: 36px; min-height: 44px; padding: 0 .4rem; border: 0; background: transparent; color: #fff; }
.office-auth-controls button:not(.office-auth-pause)::before { content: ''; width: 7px; height: 7px; border-radius: 8px; background: #fffc; transition: transform 180ms ease-out; }
.office-auth-controls button[aria-pressed=true]:not(.office-auth-pause)::before { transform: scaleX(3.15); background: #fff; }
.office-auth-controls button:focus-visible { outline: 2px solid white; outline-offset: 0; border-radius: .35rem; }
.office-auth-pause[aria-pressed=false] .play-symbol, .office-auth-pause[aria-pressed=true] .pause-symbol { display: none; }

@media (max-width: 740px) {
  body:has(#office-workspace[hidden]) .office-layout { align-content: start; padding: 0; }
  .office-auth { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'panel' 'gallery'; border: 0; border-radius: 0; }
  .office-auth-panel { padding: 1.5rem clamp(1.25rem, 5vw, 2.5rem); }
  .office-auth-content { margin-inline: 0; padding-block: 2.25rem; }
  .office-auth-gallery { min-height: clamp(15rem, 58vw, 21rem); }
  .office-auth-slide figcaption { bottom: 3.8rem; }
  .office-auth-controls { bottom: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .office-auth-slide, .office-auth-controls button::before { transition: none; }
}
