.wrap.narrow { max-width: 520px; }
.wrap.wide { max-width: 1100px; }
h1 { font-weight: 600; font-size: 24px; margin: 0 0 6px; color: var(--text-strong); }
h2.h { font-size: 18px; font-weight: 600; margin: 0 0 14px; color: var(--text-strong); }
h3.h { font-size: 15px; font-weight: 600; margin: 0 0 10px; color: var(--text-strong); }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }
.card.login { padding: 28px; margin-top: 20px; }
.card.block { padding: 22px 24px; margin-bottom: 18px; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
label small { display: block; margin-top: 4px; font-size: 12px; color: #55627f; }
input[type=text], input[type=password], input[type=number], input[type=url], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 9px 12px; font: inherit; font-size: 15px;
  background: #080b10; color: var(--text-strong); border: 1px solid #1c2230; border-radius: 9px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #2f7d52; }
textarea { min-height: 84px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8b97b0 50%), linear-gradient(135deg, #8b97b0 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin: 8px 0; }
.check input { width: 16px; height: 16px; accent-color: #4cd880; margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); background: #151a24; border: 1px solid #1f2634; border-radius: 9px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #1b2130; }
.btn.primary { background: var(--green); color: #04210f; border-color: var(--green); }
.btn.primary:hover { background: #62e594; }
.btn.danger { color: #ff8f8c; }
.btn.small { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.login .btn { width: 100%; margin-top: 6px; padding: 10px; }
.back { text-align: center; margin: 18px 0 0; font-size: 14px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { text-decoration: underline; }

.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; }
.flash.ok { background: #0f2a1b; color: #7be8a6; border: 1px solid #1c4630; }
.flash.error { background: #2b1212; color: #ff9d9a; border: 1px solid #532020; }
.flash.warn { background: #2a2310; color: #f5d97a; border: 1px solid #52431a; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar .actions { display: flex; gap: 8px; align-items: center; padding-top: 18px; }
.topbar form { margin: 0; }
.tabs { display: flex; gap: 4px; margin: 22px 0 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--muted); font-size: 15px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text-strong); border-bottom-color: var(--green); }
.tabs a:hover { color: var(--text-strong); }

.grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline label { margin: 0; flex: 1; min-width: 160px; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--none); }
.dot.up, .dot.green { background: var(--green); }
.dot.degraded, .dot.yellow { background: var(--yellow); }
.dot.down, .dot.red { background: var(--red); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

details.edit { margin-top: 10px; }
details.edit > summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
details.edit > summary::-webkit-details-marker { display: none; }
details.edit > summary:hover { color: var(--text-strong); }
details.edit[open] > summary { margin-bottom: 12px; }
details.panel { background: var(--card); border-radius: var(--radius); margin-bottom: 14px; }
details.panel > summary { padding: 14px 20px; cursor: pointer; font-weight: 600; color: var(--text-strong); }

.svc { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.svc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.svc-title { font-size: 15px; color: var(--text-strong); font-weight: 600; }
.svc-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.levels { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.levels label { margin: 0; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #1c2230; border-radius: 10px; cursor: pointer; color: var(--text); font-size: 14px; background: #080b10; }
.levels input { margin: 0; accent-color: #4cd880; }
.levels label:has(input:checked) { border-color: #3a4560; background: #121724; }

.seg { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.msg-item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.msg-item:last-child { border-bottom: 0; }
.msg-item .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.footnote { text-align: center; color: #44506a; font-size: 12px; margin-top: 30px; }
.secret-state { font-size: 12px; margin-top: 4px; }
.secret-state.ok { color: #7be8a6; }
.sub { display: none; }
.sub.show { display: block; }
.status-line { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { table.t.resp thead { display: none; } table.t.resp td { display: block; border: 0; padding: 3px 10px; } table.t.resp tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; } .row-actions { justify-content: flex-start; } }
