* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; color: #1c2430; background: #f5f6f8; }
header#top { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: #16202e; color: #fff; }
.brand { font-size: 18px; font-weight: 600; }
.tag { font-size: 12px; font-weight: 400; background: #36465c; padding: 2px 8px; border-radius: 10px; margin-left: 8px; }
.top-right { display: flex; gap: 12px; align-items: center; }
.who { font-size: 13px; }
#layout { display: flex; min-height: calc(100vh - 52px); }
nav#nav { width: 190px; flex: none; background: #fff; border-right: 1px solid #d9dde3; padding: 10px 0; }
nav#nav a { display: block; padding: 8px 18px; color: #1c2430; text-decoration: none; }
nav#nav a:hover { background: #eef1f5; }
nav#nav a.on { background: #e3ebf7; font-weight: 600; border-left: 4px solid #2460c4; padding-left: 14px; }
main { flex: 1; padding: 18px 24px 60px; min-width: 0; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 22px 0 8px; }
p.lead { color: #50607a; margin: 0 0 14px; max-width: 900px; }
table { border-collapse: collapse; width: 100%; background: #fff; border: 1px solid #d9dde3; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #e6e9ee; vertical-align: top; }
th { background: #eef1f5; font-size: 13px; }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: none; }
.empty { padding: 18px; background: #fff; border: 1px dashed #c3c9d3; color: #50607a; }
button, .button { font: inherit; padding: 6px 12px; border: 1px solid #9aa5b5; background: #fff; border-radius: 5px; cursor: pointer; color: #1c2430; text-decoration: none; display: inline-block; }
button:hover { background: #eef1f5; }
button.primary { background: #2460c4; border-color: #2460c4; color: #fff; }
button.primary:hover { background: #1c4fa5; }
button.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
button.small { padding: 2px 8px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 10px 0; }
.row label, .field label { font-size: 13px; color: #36465c; display: block; }
input, select, textarea { font: inherit; padding: 5px 7px; border: 1px solid #9aa5b5; border-radius: 4px; background: #fff; max-width: 100%; }
textarea { width: 100%; font-family: Menlo, Consolas, monospace; font-size: 13px; }
input[type=checkbox] { width: auto; }
.field { margin: 0 0 12px; }
.field .help { font-size: 12px; color: #6a7890; margin-top: 2px; }
.field input[type=text], .field input[type=number], .field select { width: 100%; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #e6e9ee; white-space: nowrap; }
.badge.good { background: #d7f0dc; color: #14532d; }
.badge.bad { background: #f9d9d6; color: #8a1c15; }
.badge.warn { background: #fdecc8; color: #7a4b00; }
.tiles { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.tile { background: #fff; border: 1px solid #d9dde3; border-radius: 6px; padding: 10px 16px; min-width: 150px; }
.tile .n { font-size: 26px; font-weight: 600; }
.tile .l { font-size: 13px; color: #50607a; }
.banner { padding: 10px 14px; border-radius: 6px; margin: 0 0 12px; }
.banner.bad { background: #f9d9d6; border: 1px solid #b3261e; }
.banner.warn { background: #fdecc8; border: 1px solid #c98a00; }
.banner.info { background: #e3ebf7; border: 1px solid #2460c4; }
dialog { border: 1px solid #9aa5b5; border-radius: 8px; padding: 0; width: min(760px, 94vw); max-height: 92vh; }
dialog::backdrop { background: rgba(10, 20, 35, .45); }
dialog .head { padding: 12px 18px; border-bottom: 1px solid #e6e9ee; font-weight: 600; font-size: 17px; }
dialog .body { padding: 14px 18px; overflow: auto; max-height: 68vh; }
dialog .foot { padding: 12px 18px; border-top: 1px solid #e6e9ee; display: flex; gap: 8px; justify-content: flex-end; }
.what { background: #fdf6e3; border-left: 4px solid #c98a00; padding: 8px 12px; margin: 8px 0; }
pre { background: #101826; color: #e6edf7; padding: 10px; border-radius: 5px; overflow: auto; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; margin: 6px 0; }
ul.tree { list-style: none; margin: 0; padding-left: 0; }
ul.tree ul.tree { padding-left: 26px; border-left: 2px solid #d9dde3; margin-left: 10px; }
.node { background: #fff; border: 1px solid #d9dde3; border-radius: 6px; padding: 8px 10px; margin: 6px 0; }
.node .line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.node .conds { font-size: 13px; color: #36465c; margin-top: 4px; }
.node.off { opacity: .55; }
.mini td, .mini th { padding: 3px 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pager { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #16202e; color: #fff; padding: 9px 16px; border-radius: 6px; display: none; max-width: 80vw; z-index: 99; }
#toast.bad { background: #b3261e; }
.kv td:first-child { width: 220px; color: #50607a; }
a { color: #2460c4; }
.note { font-size: 12px; color: #50607a; max-width: 460px; white-space: normal; margin-top: 2px; }
details.start { background: #fff; border: 1px solid #2460c4; border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; }
details.start summary { font-weight: 600; cursor: pointer; }
details.start p.lead { margin: 8px 0; }
ol.steps { margin: 0; padding-left: 22px; }
ol.steps li { margin: 6px 0; }
ol.steps li.done a { color: #50607a; }
ol.steps .help { font-size: 13px; color: #50607a; }
.help { font-size: 12px; color: #6a7890; }
.badge.wrap { white-space: normal; border-radius: 6px; }
