* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #18202f; background: #f5f7fb; }
a { color: inherit; text-decoration: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 220px; padding: 20px 14px; background: #18202f; color: white; }
.brand { font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.sidebar a { display: block; padding: 10px 12px; border-radius: 6px; margin-bottom: 6px; color: #dbe4f0; }
.sidebar a.active, .sidebar a:hover { background: #2d3a52; color: white; }
.content { margin-left: 220px; padding: 24px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
h1 { margin: 0 0 4px; font-size: 28px; }
h2 { margin: 0 0 12px; font-size: 18px; }
p { margin: 0; color: #667085; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
button { border: 0; background: #18202f; color: white; border-radius: 6px; padding: 9px 12px; cursor: pointer; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.metrics div, .charts div, section { background: white; border: 1px solid #e1e6ef; border-radius: 8px; padding: 16px; }
.metrics span { display: block; color: #667085; margin-bottom: 8px; }
.metrics strong { font-size: 24px; }
.note { margin: 0 0 14px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
canvas { max-height: 260px; }
.table-search { width: 100%; border: 1px solid #ccd4e0; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border-bottom: 1px solid #edf0f5; padding: 10px 8px; text-align: left; vertical-align: top; }
th { color: #667085; font-weight: 600; }
.amount { text-align: right; white-space: nowrap; }
.muted { color: #667085; text-align: center; }
.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-panel { width: min(380px, calc(100vw - 32px)); background: white; border: 1px solid #e1e6ef; border-radius: 8px; padding: 24px; }
.login-panel h1 { margin-bottom: 18px; }
label { display: block; color: #344054; margin-bottom: 12px; }
label input { width: 100%; border: 1px solid #ccd4e0; border-radius: 6px; padding: 10px 12px; margin-top: 6px; }
.error { background: #fff1f0; color: #b42318; border: 1px solid #ffd0cc; border-radius: 6px; padding: 10px; margin-bottom: 12px; }
@media (max-width: 880px) {
  .sidebar { position: static; width: auto; }
  .content { margin-left: 0; padding: 16px; }
  .topbar { display: block; }
  .filters { margin-top: 12px; }
  .metrics, .charts { grid-template-columns: 1fr; }
}
