* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 "Segoe UI", system-ui, Arial, sans-serif; color: #222; background: #f4f1ea; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
header { background: #2f4858; color: #fff; }
.bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; min-height: 56px; }
.brand { color: #fff; font-size: 20px; font-weight: 600; text-decoration: none; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
nav a, .linkbtn { color: #e8eef2; text-decoration: none; }
nav a:hover, .linkbtn:hover { text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
td .linkbtn { color: #2f6690; margin-left: 10px; }
td .linkbtn.bad { color: #b3261e; }
form.inline { display: inline; }
main { padding: 20px 16px 40px; min-height: 70vh; background: #fff; box-shadow: 0 0 8px rgba(0,0,0,.08); }
footer { text-align: center; color: #777; padding: 14px; font-size: 13px; }
h1 { margin: 6px 0 14px; font-size: 24px; }
h2 { margin: 24px 0 8px; font-size: 18px; }
a { color: #2f6690; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e5e0d5; vertical-align: top; }
th { background: #f4f1ea; font-weight: 600; }
table.kv { width: auto; min-width: 320px; }
table.kv th { width: 130px; }
.ok { color: #1b7a3a; font-weight: 600; }
.bad { color: #b3261e; font-weight: 600; }
.muted { color: #888; }
.search { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.search input { flex: 1; min-width: 200px; }
input, select, textarea { padding: 8px; border: 1px solid #bbb; border-radius: 4px; font: inherit; width: 100%; }
.search select { width: auto; }
button, .btn { background: #2f6690; color: #fff; border: 0; border-radius: 4px; padding: 8px 16px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { background: #24506f; }
button.linkbtn { background: none; padding: 0; }
.card { max-width: 380px; background: #faf8f3; border: 1px solid #e5e0d5; border-radius: 6px; padding: 16px; margin-bottom: 16px; }
.card.wide { max-width: 640px; }
.card label { display: block; margin-bottom: 12px; font-weight: 600; }
.card label input, .card label select, .card label textarea { margin-top: 4px; font-weight: 400; }
.flash { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; word-break: break-word; }
.flash.ok { background: #e2f3e7; color: #17602f; }
.flash.err { background: #fbe4e2; color: #8e1d16; }
.subnav { margin-bottom: 14px; border-bottom: 2px solid #e5e0d5; }
.subnav a { display: inline-block; padding: 8px 14px; text-decoration: none; color: #444; }
.subnav a.on { border-bottom: 3px solid #2f6690; font-weight: 600; margin-bottom: -2px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stats div { flex: 1; min-width: 130px; background: #f4f1ea; border-radius: 6px; padding: 12px; text-align: center; color: #555; }
.stats b { display: block; font-size: 28px; color: #2f4858; }
.pre { white-space: pre-line; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 12px 0; }
@media (max-width: 600px) { th, td { padding: 6px; font-size: 14px; } }
input.small { width: 190px; padding: 4px 6px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 13px; background: #e5e0d5; }
.badge.ok { background: #e2f3e7; }
.badge.bad { background: #fbe4e2; }
