:root {
  color-scheme: dark;
  --bg: #0b1017;
  --panel: #121a24;
  --panel2: #182230;
  --line: #263342;
  --text: #edf3f9;
  --muted: #9bacc0;
  --accent: #65dec1;
  --danger: #ff9196;
  --amber: #e8c17b;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--panel2);
  color: var(--text);
  font-weight: 600;
  transition: background 0.15s;
}
button:hover {
  background: #243648;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: #072a23;
  border-color: var(--accent);
}
.primary:hover {
  background: #91edd6;
}
.danger {
  color: var(--danger);
}
.quiet {
  background: transparent;
}
.small {
  padding: 6px 10px;
  font-size: 0.85rem;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 2rem;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}
h2 {
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}
p {
  line-height: 1.65;
  color: var(--muted);
}
small,
.muted {
  color: var(--muted);
}
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
code {
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0b121b;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 8px;
  color: #cbd9e8;
  font-size: 0.85rem;
}
label {
  display: block;
  font-size: 0.88rem;
  font-weight: 550;
  margin-bottom: 7px;
}
input,
select,
textarea {
  width: 100%;
  background: #0b121b;
  border: 1px solid #344254;
  color: var(--text);
  border-radius: 7px;
  padding: 11px 12px;
  min-height: 43px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 2px solid #65dec125;
}
input::placeholder {
  color: #6b7f96;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}
.field {
  margin-bottom: 20px;
}
.hint {
  display: block;
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 7px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.callout {
  padding: 16px 18px;
  border: 1px solid #35515a;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: #12252b;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #c0d5df;
}
.callout.warn {
  background: #282318;
  border-color: #63502c;
  border-left-color: var(--amber);
  color: #e0ceaa;
}
.callout.error {
  background: #2b1c25;
  border-color: #713b47;
  border-left-color: var(--danger);
  color: #ffbec1;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 5px 10px;
  font-size: 0.77rem;
  color: var(--muted);
  white-space: nowrap;
}
.badge.good {
  color: var(--accent);
  border-color: #2e6257;
  background: #16352d;
}
.badge.bad {
  color: var(--danger);
  border-color: #623743;
}
.badge.warn {
  color: var(--amber);
  border-color: #66522d;
}
.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0e1620;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.12rem;
}
.mark {
  width: 31px;
  height: 31px;
  border: 1px solid #448f82;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 20px;
  background: #16332f;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: #7791aa;
  font-weight: 650;
  margin-bottom: 12px;
}
.sidebar .eyebrow {
  margin: 38px 10px 14px;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.step {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 10px;
  background: transparent;
  text-align: left;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--muted);
}
.step:hover {
  background: var(--panel2);
}
.step.active {
  background: #18322f;
  border-color: #2b534a;
  color: var(--text);
}
.step .number {
  border: 1px solid #405062;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.76rem;
}
.step.active .number {
  background: var(--accent);
  border-color: var(--accent);
  color: #12352c;
  font-weight: 700;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
}
.admin-name {
  font-size: 0.85rem;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.main {
  padding: 36px 44px 60px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 40px;
}
.breadcrumbs {
  color: var(--muted);
  font-size: 0.84rem;
}
.intro {
  max-width: 760px;
  margin-bottom: 28px;
}
.intro p {
  margin-bottom: 0;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.copybox {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #0b121b;
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 10px 0 20px;
}
.copybox code {
  flex: 1;
  font-size: 0.88rem;
  color: #bdd7e0;
}
.instructions {
  counter-reset: instruction;
  list-style: none;
  margin: 0;
  padding: 0;
}
.instructions li {
  position: relative;
  padding: 0 0 22px 36px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.9rem;
}
.instructions li::before {
  counter-increment: instruction;
  content: counter(instruction);
  position: absolute;
  left: 0;
  top: 1px;
  background: #243442;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  text-align: center;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 23px;
}
.instructions strong {
  color: var(--text);
  font-weight: 550;
}
.instructions li:last-child {
  padding-bottom: 0;
}
.upstream {
  position: relative;
}
.upstream-header {
  margin-bottom: 20px;
}
.result {
  margin-top: 14px;
}
.tool-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  max-height: 320px;
  overflow: auto;
}
.tool-list li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.tool-list code {
  font-size: 0.84rem;
  color: #b9e7dc;
}
.tool-list p {
  font-size: 0.82rem;
  margin: 5px 0 0;
}
.checkrow {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.checkrow p {
  font-size: 0.84rem;
  margin: 5px 0 0;
}
.checkrow:last-child {
  border-bottom: 0;
}
.checkbox-label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 400;
}
.checkbox-label input {
  margin-top: 4px;
  flex-shrink: 0;
}
.statgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat strong {
  font-size: 1.3rem;
  font-weight: 600;
}
.auth-wrap {
  max-width: 510px;
  margin: 7vh auto;
  padding: 20px;
}
.auth-wrap .brand {
  margin-bottom: 35px;
}
.auth-wrap .card {
  padding: 30px;
}
.auth-wrap h1 {
  font-size: 1.6rem;
}
.qr {
  background: white;
  padding: 14px;
  border-radius: 8px;
  width: 190px;
  height: 190px;
  margin: 0 auto 20px;
  display: block;
}
.secret {
  color: var(--accent);
  font-size: 1rem;
  text-align: center;
  display: block;
  margin: 20px 0;
  letter-spacing: 0.06em;
}
.recovery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.8rem;
  user-select: all;
  margin: 20px 0;
}
.recovery code {
  background: #0b121b;
  padding: 8px;
  border-radius: 5px;
}
.loading {
  text-align: center;
  color: var(--muted);
  padding: 25vh 20px;
}
#notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 550px;
  padding: 0;
  z-index: 50;
}
#notice:not(:empty) {
  padding: 14px 18px;
  background: #18332f;
  border: 1px solid #438779;
  border-radius: 9px;
  box-shadow: 0 8px 36px #0007;
  line-height: 1.5;
}
#notice.error {
  background: #321d28;
  border-color: #92505b;
}
details {
  margin-top: 18px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.86rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
td,
th {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 500;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.full {
  width: 100%;
}
.saved {
  color: var(--accent);
}
.dirty {
  color: var(--amber);
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 215px 1fr;
  }
  .sidebar {
    padding: 24px 12px;
  }
  .main {
    padding: 26px 24px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media (max-width: 640px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 18px;
  }
  .sidebar .eyebrow,
  .sidebar-bottom {
    display: none;
  }
  .steps {
    flex-direction: row;
    overflow: auto;
    margin-top: 20px;
  }
  .step {
    padding: 8px;
    white-space: nowrap;
  }
  .step .label {
    display: none;
  }
  .step.active .label {
    display: inline;
  }
  .main {
    padding: 24px 18px;
  }
  .topbar {
    margin-bottom: 28px;
  }
  .card {
    padding: 18px;
  }
  .statgrid {
    grid-template-columns: 1fr;
  }
  .auth-wrap {
    margin: 2vh auto;
  }
  .recovery {
    grid-template-columns: 1fr;
  }
  .copybox {
    flex-wrap: wrap;
  }
  h1 {
    font-size: 1.6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
