/* MuzzPanel - no external fonts or CDNs */
[hidden] { display: none !important; }
:root {
  /* MuzzHost brand: near-black (#111111, muzzhost.uk theme colour) + orange. Change --accent to retint. */
  --bg: #111111; --surface: #1a1a1a; --ink: #f2f2f2; --muted: #9a9a9a; --line: #2a2a2a;
  --side: #0a0a0a; --side-ink: #b5b5b5; --side-on: #ffffff;
  --accent: #ff7a1a; --accent-ink: #111111; --accent-soft: rgba(255, 122, 26, .12);
  --good: #3ccf7a; --warn: #f5b83d; --bad: #ff5a5a;
  --radius: 10px; --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  display: grid; grid-template-columns: 232px 1fr; min-height: 100vh;
}
body.bare { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono, pre { font-family: var(--mono); font-size: 13px; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
code.big { font-size: 16px; padding: 6px 10px; letter-spacing: .5px; }
code.wrap { word-break: break-all; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.2px; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 15px; margin: 0 0 4px; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }

/* sidebar */
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; gap: 10px; align-items: center; color: var(--side-on); font-weight: 650; padding: 4px 8px 18px; }
.logo:hover { text-decoration: none; }
.logo small { display: block; font-weight: 400; color: var(--side-ink); opacity: .7; font-size: 11.5px; }
.mark { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: var(--side-ink); padding: 8px 10px; border-radius: 7px; }
.side nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.side nav a.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.who { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.who .link { color: var(--side-ink); padding: 0; }

/* layout */
.main { padding: 28px 32px 48px; max-width: 1180px; width: 100%; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head.sm { margin-bottom: 10px; }
.head p { margin: 4px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow-x: auto; }
.card.wide { max-width: 860px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.grow { flex: 1; min-width: 200px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + * { margin-top: 16px; }
.empty { color: var(--muted); text-align: center; padding: 28px !important; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.tile b { font-size: 20px; font-weight: 650; text-transform: capitalize; }
.tile span { color: var(--muted); font-size: 12.5px; }
.bar { display: block; height: 5px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); max-width: 100%; }
.bar.hot > i { background: var(--bad); }

/* tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.mono td { font-family: var(--mono); font-size: 12.5px; padding: 7px 16px; }
.table .num { text-align: right; white-space: nowrap; }
.rowlink { cursor: pointer; }
.rowlink:hover td { background: var(--accent-soft); }
tr.hl td { background: rgba(194, 53, 43, .06); }
.actions form { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.code.c2 { color: var(--good); } .code.c3 { color: var(--muted); } .code.c4 { color: var(--warn); } .code.c5 { color: var(--bad); font-weight: 700; }

/* pills */
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--line); color: var(--muted); text-transform: lowercase; letter-spacing: .2px; }
.pill.running { background: rgba(60,207,122,.12); color: var(--good); }
.pill.deploying { background: var(--accent-soft); color: var(--accent); animation: pulse 1.4s infinite; }
.pill.error { background: rgba(255,90,90,.12); color: var(--bad); }
.pill.stopped, .pill.new { background: rgba(245,184,61,.12); color: var(--warn); }
@keyframes pulse { 50% { opacity: .55; } }
.role { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.1); }
.main .role { background: var(--line); }
.main .role.staff { background: var(--accent-soft); color: var(--accent); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* forms */
label { display: flex; flex-direction: column; gap: 5px; font-weight: 550; font-size: 13px; }
label small { font-weight: 400; color: var(--muted); }
label.check, label.chip { flex-direction: row; align-items: center; gap: 8px; font-weight: 450; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #141414; border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 10px; width: 100%;
}
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.row label { min-width: 110px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-weight: 550; font-size: 13px; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.types legend { grid-column: 1 / -1; }
.type { flex-direction: row; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; cursor: pointer; font-weight: 450; }
.type:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.type span { display: flex; flex-direction: column; }
.type small { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* buttons */
.btn { font: inherit; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ff9142; border-color: #ff9142; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.link.bad { color: var(--bad); }

/* misc */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: rgba(60,207,122,.08); border-color: rgba(60,207,122,.35); color: var(--good); }
.flash.err { background: rgba(255,90,90,.08); border-color: rgba(255,90,90,.35); color: #ff8a8a; white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
pre.log { background: #0a0a0a; border: 1px solid var(--line); color: #d6d6d6; padding: 14px 16px; border-radius: 8px; max-height: 560px; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }
pre.log.sm { max-height: 200px; font-size: 12px; }
details summary { cursor: pointer; color: var(--accent); }
details[open] summary { margin-bottom: 8px; }
.danger-zone { border-color: rgba(255,90,90,.4); }
.auth { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.auth .logo { color: var(--ink); justify-content: center; padding-bottom: 22px; }
.auth .logo small { color: var(--muted); }

@media (max-width: 820px) {
  body { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .logo { padding-bottom: 4px; }
  .who { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; gap: 10px; }
  .main { padding: 18px 14px 40px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}

/* ---- MuzzHost additions ---- */
.word { font-size: 19px; font-weight: 400; letter-spacing: -.3px; color: var(--side-on); }
.word b { color: var(--accent); font-weight: 800; }
.side nav a { display: flex; align-items: center; gap: 10px; }
.side nav a svg { width: 16px; height: 16px; flex: none; opacity: .75; }
.side nav a.on svg { opacity: 1; }
.side nav .sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #666; padding: 14px 10px 4px; }
.card, .tile { box-shadow: 0 1px 0 rgba(255,255,255,.02) inset; }
.tile b { letter-spacing: -.3px; }
.bar.warm > i { background: var(--warn); }
.role.staff, .main .role.staff { background: var(--accent); color: var(--accent-ink); }
.auth .word { color: var(--ink); font-size: 30px; }
body.bare { background: radial-gradient(700px 320px at 50% 0%, rgba(255,122,26,.13), transparent 70%), var(--bg); min-height: 100vh; }
code { color: #ffb37a; }
.rowlink:hover td { background: rgba(255,122,26,.05); }
