:root {
  --ok: #2e9e5b;
  --warn: #d49a00;
  --bad: #d0453a;
}

.auth-card {
  max-width: 28rem;
  margin: 4rem auto;
}

.brand { text-decoration: none; }

form.inline { margin: 0; }

button.small {
  padding: 0.35rem 0.8rem;
  font-size: 0.875rem;
  margin: 0;
}

.error {
  color: var(--bad);
  font-weight: 600;
}

.notice { color: var(--warn); }

.muted { color: var(--pico-muted-color); }

.code-input {
  font-family: var(--pico-font-family-monospace);
  letter-spacing: 0.2em;
  font-size: 1.25rem;
  text-align: center;
}

.qr {
  text-align: center;
  margin-bottom: 1.5rem;
}

.qr img {
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.secret {
  word-break: break-all;
  user-select: all;
}

.recovery-codes {
  columns: 2;
  font-family: var(--pico-font-family-monospace);
}

.recovery-codes code { user-select: all; }

.status-card header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--pico-muted-color);
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

.row-bad td { color: var(--bad); }

.nowrap { white-space: nowrap; }

.flash {
  padding: 0.6rem 1rem;
  border-radius: var(--pico-border-radius);
  border-left: 4px solid;
}
.flash-success { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.flash-error { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }

.container-group h3 small { font-weight: normal; font-size: 0.8rem; margin-left: 0.5rem; }

.containers-table td { vertical-align: top; }
.containers-table .image { font-size: 0.8rem; word-break: break-all; }
.port { font-size: 0.75rem; margin: 0 0.15rem 0.15rem 0; display: inline-block; }

.actions { display: inline-flex; gap: 0.4rem; width: auto; margin: 0; }
.actions button { margin: 0; }

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.detail-head h1 { display: flex; align-items: center; gap: 0.6rem; }
.detail-head .dot { width: 1rem; height: 1rem; }

.stats-grid article { margin-bottom: 1rem; }
.stats-grid header { font-size: 0.85rem; color: var(--pico-muted-color); }
.stats-grid strong { font-size: 1.4rem; display: block; }
.stats-grid progress { margin: 0.4rem 0 0; }

.info-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.3rem 1.5rem;
}
.info-grid dt { font-weight: 600; }
.info-grid dd { margin: 0; }
ul.plain { padding: 0; margin: 0; }
ul.plain li { list-style: none; }

.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.log-toolbar h2 { margin: 0 auto 0 0; }
.log-toolbar select,
.log-toolbar input[type="search"] { width: auto; margin: 0; padding: 0.3rem 0.6rem; height: auto; font-size: 0.875rem; }
.log-toolbar label { margin: 0; font-size: 0.875rem; }

.log-output {
  height: 60vh;
  overflow: auto;
  padding: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}
.log-line.stderr { color: var(--bad); }
.log-ts { color: var(--pico-muted-color); margin-right: 0.75rem; user-select: none; }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.05rem 0.45rem;
  border-radius: 1rem;
  border: 1px solid var(--pico-muted-border-color);
  color: var(--pico-muted-color);
  vertical-align: middle;
}

.sites-table td { vertical-align: top; }
.sites-table td:first-child { width: 1.5rem; padding-right: 0; }
.sites-table small.error { font-weight: normal; }

.caddyfile,
.caddy-json {
  padding: 1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  overflow: auto;
}
.caddy-json { max-height: 60vh; }
.c-site { color: var(--pico-primary); font-weight: 700; }
.c-dir { color: #b5651d; font-weight: 600; }
.c-ph { color: #8e44ad; }
.c-matcher { color: #16a085; }
.c-comment { color: var(--pico-muted-color); font-style: italic; }
