* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f1f5f9; color: #0f172a; font-size: 15px; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.top { background: #0f172a; color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 56px; }
.logo { color: #fff; font-weight: 800; font-size: 18px; margin-right: auto; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; }
.top nav a { color: #cbd5e1; padding: 8px 12px; border-radius: 8px; }
.top nav a.on, .top nav a:hover { background: #1e293b; color: #fff; text-decoration: none; }
main { padding-top: 20px; padding-bottom: 60px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
.head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.grid { display: grid; gap: 12px; margin-bottom: 12px; }
.grid > * { min-width: 0; }
.cards { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.two { grid-template-columns: 1fr 1fr; }
.side { grid-template-columns: 380px 1fr; }
@media (max-width: 900px) { .two, .side { grid-template-columns: 1fr; } }
.card { background: #fff; border-radius: 12px; padding: 16px; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.stat .l { color: #64748b; font-size: 13px; }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.stat .s { color: #64748b; font-size: 12px; margin-top: 4px; }
.pos { color: #16a34a; font-weight: 600; }
.neg { color: #dc2626; font-weight: 600; }
.muted { color: #64748b; }
.small { font-size: 13px; }
.tbl { overflow-x: auto; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff; }
.card .tbl { border: 0; border-radius: 0; margin: 0 -16px -16px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .02em; color: #64748b; background: #f8fafc; white-space: nowrap; }
th a { color: inherit; }
td.n, th.n { text-align: right; white-space: nowrap; }
tbody tr:hover td { background: #f8fafc; }
tfoot td { font-weight: 700; background: #f8fafc; }
tr.link { cursor: pointer; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; }
label { display: block; font-size: 13px; color: #475569; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; background: #fff; color: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid #93c5fd; border-color: #3b82f6; }
textarea { min-height: 72px; resize: vertical; }
.row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 10px; }
.btn { display: inline-block; background: #2563eb; color: #fff; border: 0; padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.g { background: #16a34a; }
.btn.r { background: #dc2626; }
.btn.o { background: #fff; color: #0f172a; border: 1px solid #cbd5e1; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.x { background: transparent; color: #dc2626; padding: 2px 6px; font-size: 18px; line-height: 1; }
.msg { background: #dcfce7; color: #166534; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.msg.err { background: #fee2e2; color: #991b1b; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select { width: auto; flex: 1 1 170px; }
.filters input[name=q] { flex: 3 1 260px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0; font-size: 13px; color: #0f172a; }
.chip.on { background: #0f172a; color: #fff; border-color: #0f172a; }
.chip b { margin-left: 4px; }
.bar { height: 12px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; background: #16a34a; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 0; }
.kv dt { color: #64748b; }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.kv .sep { grid-column: 1 / -1; border-top: 1px solid #e2e8f0; }
.big { font-size: 28px; font-weight: 800; }
.result { padding: 14px; border-radius: 10px; background: #f8fafc; text-align: center; margin-top: 12px; }
.sikayet { background: #f8fafc; border-radius: 8px; padding: 10px; font-size: 13px; color: #334155; }
.login { max-width: 360px; margin: 90px auto; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
