/* Full-page status screen shown while the backend is unavailable. */
.backend-outage {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
  overflow: auto;
  padding: max(20px, env(safe-area-inset-top)) 28px max(20px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 77% 27%, rgb(123 158 78 / 10%), transparent 33%), var(--bg);
}

.backend-outage::before {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgb(135 159 140 / 2.5%) 1px, transparent 1px), linear-gradient(90deg, rgb(135 159 140 / 2.5%) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  pointer-events: none;
}

.backend-outage-shell { position: relative; display: flex; width: min(100%, 1120px); flex-direction: column; }
.backend-outage-header { display: flex; min-height: 74px; align-items: center; justify-content: space-between; border-bottom: 1px solid #293638; }
.backend-outage-header .brand { gap: 11px; }
.backend-outage-header .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
.backend-outage-header .brand-mark svg { width: 30px; height: 30px; }
.backend-outage-header .brand-copy { display: grid; gap: 2px; }
.backend-outage-header .brand-copy strong { font-size: 16px; }
.backend-outage-header .brand-copy small { color: #9ba89f; font-size: 9px; }
.backend-outage-header-label { display: inline-flex; align-items: center; gap: 9px; color: #aab7ae; font-size: 11px; font-weight: 740; letter-spacing: .11em; }
.backend-outage-header-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px rgb(233 198 111 / 35%); }

.backend-outage-card {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr);
  align-items: center;
  gap: clamp(34px, 7vw, 92px);
  margin: auto 0;
  padding: clamp(32px, 7vw, 76px) clamp(26px, 7vw, 80px);
  border: 1px solid #303d3f;
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(17 25 28 / 98%), rgb(14 21 24 / 98%));
  box-shadow: 0 30px 90px rgb(0 0 0 / 33%), inset 0 1px rgb(255 255 255 / 2%);
}

.backend-outage-copy { max-width: 540px; }
.backend-outage-state { display: inline-flex; min-height: 29px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #5a4d31; border-radius: 6px; background: rgb(233 198 111 / 8%); color: #f0d89c; font-size: 10px; font-weight: 780; letter-spacing: .11em; }
.backend-outage-state::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.backend-outage-copy h1 { margin: 20px 0 13px; color: #edf3ed; font-size: clamp(32px, 4.3vw, 48px); font-weight: 650; letter-spacing: -.055em; line-height: 1.08; }
.backend-outage-copy > p { max-width: 510px; margin: 0; color: #b2beb5; font-size: 16px; line-height: 1.7; }
.backend-outage-next-step { margin-top: 27px; padding: 15px 17px; border-left: 2px solid #b7d78a; background: #141d1b; }
.backend-outage-next-step > span { color: #b7c3b9; font-size: 10px; font-weight: 760; letter-spacing: .11em; }
.backend-outage-next-step p { margin: 7px 0 0; color: #bdc8bf; font-size: 14px; line-height: 1.55; }
.backend-outage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 26px; }
.backend-outage-actions .button { min-height: 48px; padding: 0 17px; font-size: 14px; }
.backend-home-link { display: inline-flex; min-height: 44px; align-items: center; color: #b8c4bb; font-size: 14px; font-weight: 580; }
.backend-home-link:hover { color: #f0f4ef; }

.backend-outage-wait {
  display: block;
  min-width: 0;
  padding: 26px;
  border: 1px solid #46503b;
  border-radius: 13px;
  background: radial-gradient(ellipse at 90% 0, rgb(173 221 106 / 9%), transparent 55%), #111918;
}
.cooldown-panel-heading { display: flex; align-items: center; gap: 11px; color: #bdc8be; font-size: 11px; font-weight: 760; letter-spacing: .11em; }
.cooldown-symbol { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #3c4b3b; border-radius: 9px; background: #19241b; color: #c5e49d; }
.cooldown-symbol svg { width: 21px; height: 21px; }
.backend-outage-countdown { display: block; margin: 31px 0 24px; color: #e8f0e7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: clamp(38px, 4.5vw, 54px); font-weight: 540; letter-spacing: -.065em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cooldown-progress { height: 5px; overflow: hidden; border-radius: 99px; background: #273431; }
.cooldown-progress > span { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #98c96b, #c5e48d); transition: width 800ms linear; }
.backend-outage-deadline { display: grid; gap: 5px; margin-top: 21px; }
.backend-outage-deadline > span { color: #a6b2a9; font-size: 12px; }
.backend-outage-deadline strong { color: #e0eadc; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.backend-outage-wait-caption { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid #2c3935; color: #aab6ac; font-size: 13px; line-height: 1.55; }

.backend-outage-footer { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #293638; color: #a2afa6; font-size: 11px; }
.backend-outage-footer > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: #c3d0c5; }
.backend-outage-footer i { width: 7px; height: 7px; border-radius: 50%; background: #7dcc91; }

@media (max-width: 800px) {
  .backend-outage { padding-right: 22px; padding-left: 22px; }
  .backend-outage-card { grid-template-columns: 1fr; gap: 28px; padding: 38px; }
  .backend-outage-copy { max-width: 650px; }
  .backend-outage-wait { max-width: none; }
  .backend-outage-countdown { margin: 23px 0 18px; }
}

@media (max-width: 520px) {
  .backend-outage { padding-right: 16px; padding-left: 16px; }
  .backend-outage-header { min-height: 66px; }
  .backend-outage-header .brand-mark { width: 34px; height: 34px; }
  .backend-outage-header .brand-copy strong { font-size: 15px; }
  .backend-outage-header .brand-copy small { font-size: 8px; }
  .backend-outage-header-label { gap: 7px; font-size: 9px; }
  .backend-outage-card { gap: 24px; margin: 22px 0; padding: 24px 20px; border-radius: 13px; }
  .backend-outage-copy h1 { margin-top: 17px; font-size: clamp(30px, 9vw, 38px); }
  .backend-outage-copy > p { font-size: 15px; }
  .backend-outage-next-step { margin-top: 21px; padding: 13px 14px; }
  .backend-outage-next-step p { font-size: 14px; }
  .backend-outage-actions { align-items: stretch; flex-direction: column; gap: 8px; margin-top: 21px; }
  .backend-outage-actions .button { width: 100%; justify-content: center; }
  .backend-home-link { justify-content: center; }
  .backend-outage-wait { padding: 20px; }
  .backend-outage-countdown { margin: 23px 0 18px; font-size: clamp(36px, 11vw, 45px); }
  .backend-outage-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; padding: 14px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cooldown-progress > span { transition: none; }
}
