* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; color: #1f2937; background: #f3f5f9; }
.top { display: flex; align-items: center; gap: 24px; padding: 12px 24px; color: white;
       background: linear-gradient(90deg, #1e3a8a, #2563eb); }
.brand { font-size: 17px; font-weight: bold; }
.top nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.top nav a { color: #dbeafe; text-decoration: none; padding: 6px 12px; border-radius: 8px; }
.top nav a.on, .top nav a:hover { background: rgba(255,255,255,.18); color: white; }
.logout button { color: white; border-color: rgba(255,255,255,.4); background: transparent; }
main { padding: 20px 24px; max-width: 1500px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.card { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; margin-bottom: 16px; overflow-x: auto; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.ok { background: #dcfce7; color: #166534; }
.flash.err { background: #fee2e2; color: #991b1b; }
input, select { font: inherit; padding: 6px 9px; border: 1px solid #d1d5db; border-radius: 7px; background: #f9fafb; }
input:focus, select:focus { outline: none; border-color: #2563eb; background: white; }
button { font: inherit; padding: 6px 14px; border-radius: 7px; border: 1px solid #2563eb; background: #2563eb; color: white; cursor: pointer; }
button.ghost { background: white; color: #374151; border-color: #d1d5db; }
button.warn { background: white; color: #b45309; border-color: #fcd34d; }
button.danger { background: white; color: #dc2626; border-color: #fca5a5; }
button.small { padding: 3px 9px; font-size: 12px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.muted { color: #6b7280; font-size: 12px; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; }
th { text-align: left; font-weight: 600; color: #6b7280; font-size: 12px; border-bottom: 1px solid #e5e7eb; padding: 8px; background: #f9fafb; }
td { border-bottom: 1px solid #f1f5f9; padding: 8px; vertical-align: middle; }
tr:hover td { background: #f8fafc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: #16a34a; font-weight: 600; }
.neg { color: #dc2626; font-weight: 600; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.bad { background: #fee2e2; color: #991b1b; }
.tag.sim { background: #dbeafe; color: #1e40af; }
.tag.real { background: #fef3c7; color: #92400e; }
.tag.on { background: #dcfce7; color: #166534; }
.tag.off { background: #f3f4f6; color: #6b7280; }
.ball { display: inline-block; min-width: 26px; padding: 1px 4px; margin-right: 3px; border-radius: 13px; color: white;
        font-weight: bold; font-size: 12px; text-align: center; }
.ball.red { background: #e53935; } .ball.blue { background: #1e6fd9; } .ball.green { background: #18a058; }
.plus { color: #9ca3af; margin-right: 3px; }
.summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stat { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 16px; min-width: 150px; }
.stat .k { color: #6b7280; font-size: 12px; }
.stat .v { font-size: 20px; font-weight: bold; }
details.actions summary { cursor: pointer; color: #2563eb; }
details.actions form { margin-top: 6px; }
.login { max-width: 360px; margin: 12vh auto; background: white; border-radius: 14px; padding: 28px; border: 1px solid #e5e7eb; }
.login h1 { font-size: 20px; margin: 0 0 18px; }
.login input { width: 100%; margin-bottom: 12px; }
.login button { width: 100%; padding: 9px; }
