:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #10141c;
  --panel-soft: #151b25;
  --line: #273244;
  --text: #f4f6fa;
  --muted: #909bac;
  --cyan: #4de3ff;
  --violet: #a58cff;
  --warn: #ffba62;
  --danger: #ff6b7a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(77, 227, 255, 0.09), transparent 34rem),
    radial-gradient(circle at 90% 100%, rgba(165, 140, 255, 0.09), transparent 34rem),
    var(--bg);
  color: var(--text);
}

button, input { font: inherit; }

.shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 40px 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
}

.topbar, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font: 700 0.7rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 2vw, 2.1rem); letter-spacing: -0.04em; }
h2 { margin-bottom: 10px; font-size: clamp(1.45rem, 3vw, 2.4rem); }

.connection {
  min-width: 126px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font: 700 0.75rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.connection[data-state="ok"] { color: var(--cyan); border-color: rgba(77, 227, 255, 0.35); }
.connection[data-state="error"] { color: var(--danger); border-color: rgba(255, 107, 122, 0.35); }

.unlock {
  align-self: center;
  width: min(700px, 100%);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(21, 27, 37, 0.96), rgba(11, 14, 20, 0.96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}

.unlock > div > p:last-child { color: var(--muted); line-height: 1.6; }
label { display: block; margin-bottom: 9px; color: var(--muted); font: 700 0.72rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.key-row { display: flex; gap: 10px; }
input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  background: #090c11;
  color: var(--text);
  outline: none;
}
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(77, 227, 255, 0.12); }
button {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: var(--cyan);
  color: #041014;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.04em;
}
button:disabled { opacity: 0.55; cursor: wait; }
.form-error { min-height: 1.25em; margin: 10px 0 0; color: var(--danger); font-size: 0.85rem; }

.providers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.provider-card {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(18, 23, 32, 0.97), rgba(10, 13, 18, 0.97));
}

.provider-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.provider-heading h2 { margin: 0; letter-spacing: -0.035em; }
.source { margin: 7px 0 0; color: var(--muted); font: 0.72rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.badge { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--cyan); font-size: 0.7rem; font-weight: 800; }
.badge.stale { color: var(--warn); }
.badge.missing { color: var(--danger); }
.windows { margin-top: 30px; display: grid; gap: 24px; }
.empty { min-height: 220px; display: grid; place-items: center; color: var(--muted); text-align: center; }
.window-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.window-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 0.85rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.percentage { font-size: 1.25rem; font-weight: 850; }
.bar { height: 10px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #07090d; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.window-meta { margin: 8px 0 0; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.75rem; }

.footer {
  min-height: 38px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--muted);
  font: 0.72rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.text-button { margin-left: auto; padding: 7px 10px; background: transparent; color: var(--muted); border: 1px solid var(--line); font-size: 0.7rem; }

@media (max-width: 780px) {
  .shell { padding: 22px 18px 18px; }
  .providers { grid-template-columns: 1fr; }
  .key-row, .footer { align-items: stretch; flex-direction: column; }
  .footer .text-button { margin-left: 0; }
}
