* { box-sizing: border-box; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background: #f5f6f8;
    color: #1f2430;
}
main { padding: 24px 32px 48px; max-width: 1400px; margin: 0 auto; }
h1 { font-size: 22px; margin-bottom: 4px; }
h2 { font-size: 17px; margin-top: 32px; }
.meta { color: #667; font-size: 13px; margin: 4px 0 16px; }
.note { color: #778; font-size: 13px; background: #eef1f6; padding: 8px 12px; border-radius: 6px; max-width: 900px; }

.topnav {
    display: flex; justify-content: space-between; align-items: center;
    background: #1f2430; color: #fff; padding: 10px 24px;
}
.topnav a { color: #cdd3e0; text-decoration: none; margin-right: 20px; font-size: 14px; padding: 6px 0; }
.topnav a.active, .topnav a:hover { color: #fff; border-bottom: 2px solid #4c72b0; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.user-badge { font-size: 13px; color: #9aa2b8; }
.btn-refresh {
    background: #4c72b0; color: #fff; border: none; border-radius: 6px;
    padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.btn-refresh:hover { background: #3d5d92; }
.btn-logout { font-size: 13px; }

.month-picker { margin-bottom: 16px; }
.month-picker select { font-size: 14px; padding: 5px 8px; border-radius: 5px; border: 1px solid #ccc; }

.filters { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.filters label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.filters select { font-size: 13px; padding: 5px 8px; border-radius: 5px; border: 1px solid #ccc; }
.filters .clear-filters { font-size: 13px; color: #4c72b0; text-decoration: none; }
.filters .clear-filters:hover { text-decoration: underline; }

.data-table { border-collapse: collapse; width: 100%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.data-table th, .data-table td { border: 1px solid #e2e5eb; padding: 7px 10px; text-align: right; font-size: 13px; white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th:nth-child(2), .data-table td:nth-child(2) { text-align: left; }
.data-table th { background: #eef1f6; font-weight: 600; }
.data-table.small th, .data-table.small td { font-size: 12px; padding: 5px 8px; }
.data-table tbody tr:hover { background: #f7f9fc; }

.metric-filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.metric-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; user-select: none; }
.metric-toggle .swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.audit-table { table-layout: fixed; }
.audit-table th, .audit-table td { font-size: 11px; padding: 4px 5px; white-space: nowrap; }
.audit-table td.truncate, .audit-table th { overflow: hidden; text-overflow: ellipsis; }
.totals-row { font-weight: 700; background: #eef1f6; }
.neg { color: #c44e52; }
.flag { background: #fff3cd; }

.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #1f2430; }
.login-box {
    background: #fff; padding: 32px 36px; border-radius: 10px; width: 300px;
    display: flex; flex-direction: column; gap: 12px;
}
.login-box h1 { font-size: 18px; text-align: center; margin-bottom: 8px; }
.login-box label { display: flex; flex-direction: column; font-size: 13px; gap: 4px; }
.login-box input { padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; }
.login-box button {
    background: #4c72b0; color: #fff; border: none; border-radius: 6px;
    padding: 10px; font-size: 14px; cursor: pointer; margin-top: 8px;
}
.login-box .error { color: #c44e52; font-size: 13px; }

.log-box { background: #1f2430; color: #cdd3e0; padding: 16px; border-radius: 8px; font-size: 12px; overflow-x: auto; }
