* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; margin: 0; padding: 0; background: #f4f6f8; color: #1a1a1a; }
.wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }
.hdr { background: linear-gradient(135deg, #1e3a8a, #3b82f6); color: white; padding: 24px; border-radius: 12px 12px 0 0; margin: -20px -20px 20px -20px; }
.hdr h1 { margin: 0 0 6px 0; font-size: 28px; }
.hdr .sub { opacity: 0.9; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
.card { background: white; padding: 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card .label { color: #6b7280; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.card .value { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.card .small { font-size: 12px; color: #6b7280; margin-top: 4px; }
.card.success { background: #f0fdf4; border-left: 4px solid #16a34a; }
.card.alert { background: #fffbeb; border-left: 4px solid #f59e0b; }
.card.danger { background: #fef2f2; border-left: 4px solid #dc2626; }
.card.info { background: #eff6ff; border-left: 4px solid #3b82f6; }
.search-bar { background: white; padding: 12px; border-radius: 8px; margin: 12px 0; display: flex; gap: 10px; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); flex-wrap: wrap; }
.search-bar input, .search-bar select { padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 14px; }
.search-bar input[type=text] { flex: 1; min-width: 200px; }
table.recon { width: 100%; background: white; border-collapse: collapse; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
table.recon th, table.recon td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; text-align: left; }
table.recon th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 12px; text-transform: uppercase; cursor: pointer; user-select: none; position: sticky; top: 0; }
table.recon th:hover { background: #f1f5f9; }
table.recon td.num { text-align: right; font-family: 'JetBrains Mono', Consolas, monospace; }
table.recon td.num.pos { color: #16a34a; }
table.recon td.num.neg { color: #dc2626; }
table.recon tr:hover td { background: #fafbfc; }
table.recon a { color: #1d4ed8; text-decoration: none; font-weight: 600; }
table.recon a:hover { text-decoration: underline; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.badge.EXACT { background: #dcfce7; color: #15803d; }
.badge.CLOSE { background: #fef3c7; color: #92400e; }
.badge.MEDIUM { background: #fed7aa; color: #9a3412; }
.badge.LARGE { background: #fee2e2; color: #991b1b; }
.badge.EXCLUDED { background: #e2e8f0; color: #475569; }
.section { background: white; padding: 18px; border-radius: 8px; margin: 16px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.section h2 { margin: 0 0 14px 0; font-size: 18px; color: #1e3a8a; padding-bottom: 8px; border-bottom: 2px solid #e0e7ff; }
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .dual { grid-template-columns: 1fr; } }
.sub { background: #f8fafc; padding: 14px; border-radius: 6px; border: 1px solid #e2e8f0; }
.sub h3 { margin: 0 0 10px 0; font-size: 14px; color: #475569; display: flex; justify-content: space-between; align-items: center; }
.sub h3 .total { background: #1e3a8a; color: white; padding: 3px 10px; border-radius: 6px; font-size: 13px; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th, table.list td { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; }
table.list th { background: #fff; font-weight: 600; color: #6b7280; text-align: left; }
table.list td.num { text-align: right; font-family: monospace; }
.back-link { display: inline-block; margin-bottom: 12px; color: white; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.tabnav { display: flex; gap: 6px; margin: 0 0 0 0; }
.tabnav a { padding: 8px 14px; background: white; border-radius: 6px 6px 0 0; color: #475569; text-decoration: none; font-weight: 600; }
.tabnav a.active { background: #1e3a8a; color: white; }
.snap-info { background: #fefce8; padding: 8px 12px; border-radius: 6px; font-size: 12px; margin-bottom: 10px; color: #713f12; }
.empty { color: #9ca3af; padding: 12px; text-align: center; }

/* mismatch chips */
.mismatch-chips { display:flex; gap:8px; flex-wrap:wrap; margin:14px 0 6px; }
.mismatch-chips .chip { background:white; padding:8px 14px; border-radius:20px; font-size:13px; color:#475569; text-decoration:none; border:1px solid #e5e7eb; transition:all .15s; }
.mismatch-chips .chip:hover { background:#f8fafc; border-color:#cbd5e1; }
.mismatch-chips .chip.active { background:#1e3a8a; color:white; border-color:#1e3a8a; box-shadow:0 1px 4px rgba(30,58,138,.25); }
.mismatch-chips .chip.active strong { color:#fff; }
.mismatch-chips .chip strong { color:#1e3a8a; margin-left:4px; }
.mismatch-chips .chip.inv.active      { background:#7c3aed; border-color:#7c3aed; }
.mismatch-chips .chip.inv-high.active { background:#ea580c; border-color:#ea580c; }
.mismatch-chips .chip.inv-low.active  { background:#0d9488; border-color:#0d9488; }
.mismatch-chips .chip.pay.active { background:#0891b2; border-color:#0891b2; }
.mismatch-chips .chip.cn.active  { background:#db2777; border-color:#db2777; }
.mismatch-chips .chip.bal.active { background:#dc2626; border-color:#dc2626; }
.mismatch-chips .chip.midmonth.active { background:#d97706; border-color:#d97706; }
table.recon td.num.diff { background:#fef3c7; font-weight:600; }
