* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; margin: 0; background: #f4f5f7; color: #222; font-size: 14px; }

.topbar { display: flex; justify-content: space-between; align-items: center; background: #2c3e50; color: #fff; padding: 10px 20px; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 500; }
.topbar a { color: #cfd8dc; text-decoration: none; margin-left: 12px; }
.topbar a:hover { color: #fff; }
.topbar .user { margin-right: 10px; color: #a8b7c5; }

.tabs { background: #fff; border-bottom: 1px solid #ddd; padding: 0 20px; }
.tabs a { display: inline-block; padding: 10px 18px; text-decoration: none; color: #555; border-bottom: 3px solid transparent; }
.tabs a.active { color: #2c3e50; border-bottom-color: #2c3e50; font-weight: 600; }
.tabs a:hover { background: #f7f7f7; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 14px 20px; background: #fff; border-bottom: 1px solid #eee; align-items: end; }
.filters label { display: flex; flex-direction: column; font-size: 12px; color: #666; gap: 2px; }
.filters input, .filters select { padding: 5px 7px; font-size: 13px; border: 1px solid #ccc; border-radius: 3px; background: #fff; }
.filters button { padding: 6px 14px; background: #2c3e50; color: #fff; border: 0; border-radius: 3px; cursor: pointer; }
.filters button:hover { background: #34495e; }
.filters .btn-clear { padding: 6px 10px; color: #777; text-decoration: none; align-self: center; }

.summary { padding: 8px 20px; color: #666; margin: 0; }

.tablewrap { overflow-x: auto; padding: 0 20px; }
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
table.data th, table.data td { padding: 6px 8px; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
table.data th { background: #fafafa; font-weight: 600; color: #555; }
table.data tr.err td { background: #fff5f5; }
table.data tr.warn td { background: #fffceb; }
table.data tr.ok td { background: #fff; }
table.data .muted { color: #999; }
table.data tr:hover td { background: #f0f4f8 !important; }
table.data .nowrap { white-space: nowrap; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .center { text-align: center; font-variant-numeric: tabular-nums; }
table.data .err-text { color: #c0392b; max-width: 240px; }
table.data .empty { text-align: center; color: #999; padding: 24px; }

.pager { padding: 14px 20px; display: flex; gap: 4px; flex-wrap: wrap; }
.pager a { display: inline-block; padding: 5px 10px; background: #fff; border: 1px solid #ddd; text-decoration: none; color: #444; border-radius: 3px; }
.pager a.active { background: #2c3e50; color: #fff; border-color: #2c3e50; }
.pager a:hover { background: #ecf0f1; }
.pager a.active:hover { background: #2c3e50; color: #fff; }

table.kv { margin: 20px; background: #fff; border-collapse: collapse; }
table.kv th { background: #fafafa; text-align: left; padding: 6px 12px; border: 1px solid #eee; font-weight: 600; color: #555; width: 160px; }
table.kv td { padding: 6px 12px; border: 1px solid #eee; }

h2 { margin: 24px 20px 8px; font-size: 15px; color: #2c3e50; }
pre.json { margin: 0 20px 20px; padding: 12px; background: #1e1e1e; color: #d4d4d4; border-radius: 4px; overflow-x: auto; font-size: 12px; line-height: 1.5; }
pre.log { margin: 0 20px 20px; padding: 12px; background: #1e1e1e; color: #d4d4d4; border-radius: 4px; overflow-x: auto; font-size: 12px; line-height: 1.5; max-height: 70vh; overflow-y: auto; }
.logerr { color: #c0392b; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 28px 32px; border-radius: 6px; box-shadow: 0 2px 16px rgba(0,0,0,.08); width: 320px; }
.login-box h1 { margin: 0 0 18px; font-size: 18px; color: #2c3e50; text-align: center; }
.login-box label { display: block; margin-bottom: 12px; font-size: 13px; color: #555; }
.login-box input { width: 100%; padding: 8px; font-size: 14px; border: 1px solid #ccc; border-radius: 3px; margin-top: 4px; }
.login-box button { width: 100%; padding: 9px; background: #2c3e50; color: #fff; border: 0; border-radius: 3px; font-size: 14px; cursor: pointer; }
.login-box button:hover { background: #34495e; }
.login-box .err { background: #fee; color: #c0392b; padding: 8px 10px; border-radius: 3px; margin-bottom: 12px; font-size: 13px; }
