:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf4ff;
  background: #0a101c;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #edf4ff;
  --muted: #8ea1bb;
  --line: rgba(165, 190, 226, .13);
  --blue: #91b8fb;
  --mint: #65d5a3;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 50% 3%, rgba(47, 87, 149, .2), transparent 38%),
    linear-gradient(145deg, #0a101c 0%, #101b2b 54%, #0a111e 100%);
}

button, input { font: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; }
[hidden], .hidden { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(119, 164, 235, .075);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(119, 164, 235, .018), 0 0 0 96px rgba(119, 164, 235, .012);
  pointer-events: none;
}
.ambient-one { top: -280px; right: 4%; }
.ambient-two { bottom: -355px; left: -210px; width: 560px; height: 560px; opacity: .6; }

.shell {
  position: relative;
  width: min(1480px, var(--status-page-width, 80vw), calc(100% - 26px));
  margin: auto;
  padding-bottom: 36px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 73px;
  padding: 0 22px;
  margin: 0 -22px;
  border-bottom: 1px solid rgba(166, 190, 225, .13);
  background: rgba(9, 16, 27, .67);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  color: #edf4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 29px;
  height: 29px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(134, 174, 238, .2);
  border-radius: 9px;
  color: #b7d0fb;
  background: linear-gradient(145deg, rgba(94, 143, 222, .25), rgba(52, 83, 130, .14));
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { color: #9db8de; }
.brand-name b { color: #edf4ff; }
.brand-host {
  display: block;
  margin-top: 3px;
  color: #7489a5;
  font-size: 8px;
  letter-spacing: .16em;
}
.app-switcher {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transform: translateX(-50%);
}
.app-switcher a {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 0 7.5px;
  border: 1px solid rgba(167, 190, 225, .16);
  border-radius: 8px;
  color: #b8c8dd;
  background: rgba(18, 31, 49, .55);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.app-switcher a:hover, .app-switcher a:focus-visible {
  border-color: rgba(145, 184, 251, .4);
  color: #edf4ff;
  background: rgba(54, 86, 132, .55);
}
.app-switcher a[aria-current="page"] {
  border-color: rgba(145, 184, 251, .34);
  color: #edf4ff;
  background: rgba(77, 117, 180, .3);
}
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.page-width-control { position: relative; }
.page-width-trigger { min-width: 49px; min-height: 32px; padding: 0 9px; border: 1px solid rgba(145, 184, 251, .2); border-radius: 8px; color: #c7d9f5; background: rgba(51, 86, 141, .14); font-size: 10px; cursor: pointer; }
.page-width-trigger:hover, .page-width-trigger[aria-expanded="true"] { border-color: rgba(145, 184, 251, .4); background: rgba(67, 108, 173, .25); }
.page-width-options { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; display: grid; min-width: 92px; gap: 3px; padding: 5px; border: 1px solid rgba(167, 190, 225, .15); border-radius: 10px; background: rgba(13, 23, 37, .97); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); backdrop-filter: blur(16px); }
.page-width-options[hidden] { display: none; }
.page-width-options button { padding: 7px 9px; border: 0; border-radius: 6px; color: #a8bad2; background: transparent; font-size: 10px; text-align: left; cursor: pointer; }
.page-width-options button:hover, .page-width-options button.is-selected { color: #edf4ff; background: rgba(98, 137, 199, .2); }
.signed-in {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 9px;
  border-left: 1px solid rgba(165, 190, 226, .16);
  color: #91a5bf;
  font-size: 10px;
  text-transform: lowercase;
  white-space: nowrap;
}
.signed-in svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.logout-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #91a5bf;
  background: transparent;
  cursor: pointer;
}
.logout-button:hover { color: #f2f6ff; background: rgba(145, 184, 251, .08); }
.logout-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.eyebrow {
  margin: 0 0 7px;
  color: #82a7df;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .15em;
}
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 41px 0 22px;
}
.hero-title { min-width: 0; }
.status-meta { max-width: 42%; padding-bottom: 2px; text-align: right; }
.hero h1, .login h1 {
  margin: 0;
  color: #f0f5fc;
  font-size: clamp(27px, 3vw, 39px);
  letter-spacing: -.055em;
  line-height: 1.1;
}
.hero h1 em, .login h1 em { color: #9ebcf0; font-style: normal; }
.hero p:not(.eyebrow), .login-copy { margin: 9px 0 0; color: #8ea1bb; font-size: 12px; }
.refresh-button, .primary {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(142, 179, 241, .24);
  border-radius: 8px;
  color: #c7d9f5;
  background: rgba(51, 86, 141, .18);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease;
}
.refresh-button:hover { border-color: rgba(145, 184, 251, .4); background: rgba(67, 108, 173, .31); }
.refresh-button.is-loading .refresh-icon { display: inline-block; animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.primary { color: #fff; background: linear-gradient(110deg, #3973cc, #4b83d9); }
.primary:hover { background: linear-gradient(110deg, #4a82d7, #5b91e5); }
.refresh-button:disabled, .primary:disabled { opacity: .55; cursor: wait; }

.freshness { margin: 0 0 6px; color: #8ea1bb; font-size: 11px; }
.freshness.is-stale { color: #ffb06b; }
.source-location { margin: 0; color: #7086a2; font-size: 10px; overflow-wrap: anywhere; }
.servers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.server {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(163, 189, 229, .14);
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(24, 38, 59, .58), rgba(14, 25, 40, .48));
  box-shadow: 0 8px 26px rgba(0, 0, 0, .12), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.server-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 19px; border-bottom: 1px solid rgba(166, 190, 225, .1); background: rgba(6, 13, 22, .12); }
.server-name { font-size: 18px; font-weight: 720; letter-spacing: -.01em; overflow-wrap: anywhere; }
.server-meta { margin-top: 7px; color: #8ea1bb; font-size: 12px; }
.badge { flex: none; padding: 6px 9px; border: 1px solid rgba(85, 201, 149, .24); border-radius: 20px; color: #83dcb3; background: rgba(47, 157, 107, .08); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.badge.bad { border-color: rgba(246, 138, 119, .26); color: #ffad9b; background: rgba(166, 70, 58, .1); }
.container-summary { padding: 12px 19px 2px; color: #99abc4; font-size: 12px; }
.container-list { padding: 4px 19px 14px; }
.container-row { display: grid; grid-template-columns: minmax(125px, 1.05fr) minmax(130px, 1fr) 65px 112px; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid rgba(166, 190, 225, .08); font-size: 11px; }
.container-row:last-child { border: 0; }
.container-name { color: #dce7f7; font-size: 1.3em; font-weight: 650; overflow-wrap: anywhere; }
.image, .status { color: #788da8; overflow-wrap: anywhere; }
.state { color: var(--mint); }
.state.stopped { color: #e9b66d; }
.status { text-align: right; }

.login {
  width: min(100%, 390px);
  margin: 10vh auto 0;
  padding: 30px;
  border: 1px solid rgba(166, 190, 225, .17);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(25, 38, 58, .72), rgba(16, 26, 42, .62));
  box-shadow: 0 32px 90px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.login h1 { font-size: 26px; }
.login-copy { margin: 9px 0 20px; line-height: 1.55; }
.keycloak { display: block; width: fit-content; margin: 14px auto 20px; color: #9dbdf0; font-size: 11px; font-weight: 650; text-decoration: none; }
.keycloak:hover { color: #fff; text-decoration: underline; }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #71849d; font-size: 9px; }
.divider::before, .divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
form { display: grid; gap: 10px; }
label { display: grid; gap: 6px; color: #c8d4e5; font-size: 10px; }
input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid rgba(157, 180, 213, .2); border-radius: 8px; outline: 0; color: #f0f5fd; background: rgba(7, 13, 23, .48); font-size: 12px; }
input:focus { border-color: #6b9ce9; box-shadow: 0 0 0 3px rgba(75, 129, 212, .16); }
.error { min-height: 16px; margin: 0; color: #ffaaaa; font-size: 10px; }
.empty { padding: 16px 0; color: #8192a8; font-size: 13px; }
footer { margin-top: 24px; padding-top: 13px; border-top: 1px solid rgba(166, 190, 225, .09); color: #647993; font-size: 8px; }

@media (max-width: 1100px) {
  .topbar { flex-wrap: wrap; padding: 10px 8px; margin: 0 -8px; }
  .app-switcher { position: static; order: 3; flex: 1 0 100%; transform: none; flex-wrap: wrap; }
}
@media (max-width: 1000px) { .servers { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .hero { align-items: flex-start; flex-direction: column; padding: 29px 0 19px; }
  .status-meta { max-width: 100%; text-align: left; }
  .container-row { grid-template-columns: minmax(130px, 1fr) 70px; gap: 6px; }
  .container-row .image { grid-column: 1 / -1; grid-row: 2; }
  .container-row .status { text-align: left; }
  .server-head { padding: 15px; }
  .container-list { padding: 4px 15px 12px; }
}
@media (max-width: 480px) {
  .shell { width: min(var(--status-page-width, 80vw), calc(100% - 26px)); }
  .topbar { gap: 10px; }
  .app-switcher { gap: 5px; }
  .app-switcher a { min-height: 30px; padding-inline: 8px; font-size: 10px; }
  .signed-in { gap: 4px; padding-left: 6px; font-size: 9px; }
  .header-actions { gap: 5px; }
  .refresh-button { min-height: 32px; padding-inline: 8px; font-size: 9px; }
  .brand { font-size: 10px; }
  .brand-mark { width: 26px; height: 26px; }
  .login { padding: 24px; }
}
