:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #111714;
  color: #edf4ee;
  --surface: #19221d;
  --border: #35443a;
  --muted: #a7b7ab;
  --accent: #bbec83;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { border-bottom: 1px solid var(--border); background: #141d17; }
.header, main { max-width: 1060px; padding-inline: 24px; margin-inline: auto; }
.header { display: flex; justify-content: space-between; align-items: center; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; }
.brand-mark { color: #132215; background: var(--accent); border-radius: 7px; padding: 2px 9px 4px; font-size: 22px; }
main { padding-block: 42px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -.045em; }
h2 { font-size: 20px; letter-spacing: -.015em; }
p, #username { color: var(--muted); }
.overview, .section-heading, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.overview, .section-heading { justify-content: space-between; gap: 18px; }
.status { font-size: 14px; margin-bottom: 6px; }
.status::before { content: ''; display: inline-block; width: 8px; height: 8px; background: #8b9b90; border-radius: 50%; margin-right: 8px; }
.status[data-state='active']::before { background: var(--accent); }
.status[data-state='failed']::before, .status[data-state='inactive']::before { background: #ff9e8e; }
.status[data-state='activating']::before, .status[data-state='deactivating']::before { background: #efce7f; }
nav { display: flex; gap: 22px; margin-block: 24px 16px; border-bottom: 1px solid var(--border); }
nav button { border: 0; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
nav button[aria-current] { border-color: var(--accent); color: var(--accent); }
button, input, textarea { font: inherit; }
button {
  min-height: 37px; cursor: pointer; border: 1px solid var(--border); border-radius: 7px;
  background: #253229; color: #eef5ef; padding: 7px 12px; font-weight: 620; font-size: 14px;
}
button:hover { filter: brightness(1.18); }
button:disabled { opacity: .5; cursor: default; filter: none; }
button.primary { background: var(--accent); border-color: var(--accent); color: #142116; }
button.quiet { background: transparent; }
button.danger { background: #74382f; border-color: #aa5345; color: #fff1ee; }
.card, dialog { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.section-heading { padding: 20px; }
.section-heading p, .breadcrumb { margin-top: 5px; font-size: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); overflow-wrap: anywhere; }
.breadcrumb button, .entry { padding: 2px 3px; min-height: auto; color: var(--accent); background: transparent; border: 0; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
td, th { padding: 12px 20px; border-top: 1px solid var(--border); }
th { color: var(--muted); font-size: 13px; font-weight: 600; background: #202a23; }
td:first-child { overflow-wrap: anywhere; }
td:nth-child(2) { white-space: nowrap; }
td:last-child, th:last-child { text-align: right; }
td .actions { justify-content: flex-end; gap: 6px; }
td a { color: var(--accent); margin-right: 4px; font-size: 14px; }
.empty, .transfer { padding: 15px 20px; }
.transfer { color: var(--accent); padding-top: 0; }
#message { padding: 12px 15px; margin-bottom: 18px; border-radius: 8px; background: #263529; color: #ddf0df; }
#message[data-error='true'] { background: #512c25; color: #ffe0d8; }
.login { max-width: 420px; margin: 36px auto; padding: 24px; }
.login p { margin-top: 7px; }
.login form, dialog form { display: grid; gap: 16px; }
.login form { margin-top: 20px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, textarea { background: #111a14; color: inherit; border: 1px solid var(--border); border-radius: 7px; padding: 10px; width: 100%; }
#properties-form { padding: 0 20px 20px; }
textarea { display: block; min-height: 340px; resize: vertical; font: 14px/1.55 ui-monospace, Consolas, monospace; white-space: pre; }
dialog { padding: 20px; color: inherit; width: min(430px, calc(100% - 32px)); }
dialog::backdrop { background: #080d0ac2; }
dialog .actions { justify-content: flex-end; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 600px) {
  .header, main { padding-inline: 14px; }
  main { padding-block: 24px; }
  td, th { padding-inline: 10px; }
  td .actions { min-width: 116px; }
  #username { display: none; }
}
