/* minihost panel - deliberately small, no framework, no build step. */
:root {
  --bg: #f6f7f9; --card: #fff; --ink: #14161a; --muted: #6b7280;
  --line: #e3e6ea; --accent: #2b6cb0; --ok: #0f7b4f; --okbg: #e6f5ee;
  --err: #b02a2a; --errbg: #fdeaea; --warn: #8a6100; --warnbg: #fdf3e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a; --card: #1c1f25; --ink: #e8eaed; --muted: #9aa3ad;
    --line: #2c3038; --accent: #7fb2e5; --ok: #6ee7b7; --okbg: #12291f;
    --err: #fca5a5; --errbg: #2c1616; --warn: #fcd34d; --warnbg: #2b2312;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { max-width: 62rem; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
a { color: var(--accent); }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }

.topbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 650; text-decoration: none; color: var(--ink); letter-spacing: -.01em; }
.right, .tabs .right { margin-left: auto; }
.badge {
  font-size: 12px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: .1rem .55rem;
}

.pagehead, .sitehead { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pagehead .button, .pagehead a { margin-left: auto; }
.sitehead .muted { margin-left: auto; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.15rem; margin-bottom: 1.25rem;
}
.card.empty { text-align: center; padding: 2.5rem 1.5rem; }
.card.empty p { max-width: 34rem; margin: .5rem auto 1.25rem; }
.danger-zone { border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }

table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
table.compact td, table.compact th { padding: .35rem .5rem; font-size: 14px; }
td.actions { white-space: nowrap; text-align: right; }

.muted { color: var(--muted); }
.pill {
  display: inline-block; font-size: 12px; padding: .1rem .5rem; border-radius: 999px;
  background: var(--line); color: var(--ink);
}
.pill.ok { background: var(--okbg); color: var(--ok); }
.pill.err { background: var(--errbg); color: var(--err); }
.pill.warn { background: var(--warnbg); color: var(--warn); }

.flash { padding: .6rem .8rem; border-radius: 8px; margin-bottom: 1rem; font-size: 14px; }
.flash.ok { background: var(--okbg); color: var(--ok); }
.flash.err { background: var(--errbg); color: var(--err); white-space: pre-wrap; }

input, select, textarea, button {
  font: inherit; color: inherit; border-radius: 7px; border: 1px solid var(--line);
  background: var(--card); padding: .4rem .55rem;
}
textarea { width: 100%; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
button { cursor: pointer; background: var(--bg); }
button:hover { border-color: var(--muted); }
button.primary, .button.primary {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 550;
}
button.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
.button {
  display: inline-block; text-decoration: none; padding: .4rem .7rem;
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg); font-size: 14px;
}

form.form label, fieldset label { display: block; margin-bottom: .9rem; font-weight: 550; font-size: 14px; }
form.form input:not([type=checkbox]), form.form select { display: block; width: 100%; margin-top: .25rem; font-weight: 400; }
form.form small { display: block; margin-top: .3rem; font-weight: 400; color: var(--muted); }
form.inline { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: 0; }
form.inline + form.inline { margin-left: .35rem; }
.addrow { margin-top: .5rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; }
.row label { flex: 1 1 10rem; }
.check { display: inline-flex; gap: .35rem; align-items: center; font-weight: 400; font-size: 14px; margin: 0; }
.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .9rem; margin: 0 0 1rem; }
legend { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 .35rem; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.tabs a {
  padding: .45rem .75rem; text-decoration: none; color: var(--muted);
  border-bottom: 2px solid transparent; font-size: 14px;
}
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 550; }
.tabs.sub { margin: -.25rem 0 .75rem; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0 0 1rem; }
dl.kv dt { color: var(--muted); font-size: 14px; }
dl.kv dd { margin: 0; }
.secret { user-select: all; }
.small { font-size: 12px; }
.crumbs { margin-bottom: .85rem; font-size: 14px; }
.crumbs a { text-decoration: none; }
.crumbs .sep { color: var(--muted); margin: 0 .35rem; }
input[type=file] { border: 0; padding: 0; max-width: 18rem; }

pre.log {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: .8rem; overflow-x: auto; max-height: 30rem; font-size: 12.5px; line-height: 1.5; margin: 0;
}
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: .75rem 0; }
.progress div { height: 100%; background: var(--accent); transition: width .3s ease; }

.centered { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(22rem, 92vw); }
.login h1 { margin-bottom: .25rem; }
.login button { width: 100%; margin-top: .5rem; }
