* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1e293b;
}
.topbar {
    background: #0f172a;
    color: white;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.topbar a {
    color: white;
    text-decoration: none;
    margin-left: 14px;
    font-size: 14px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}
h1 { margin-top: 0; }
.card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}
.narrow { max-width: 430px; margin: 30px auto; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.metric {
    background: white;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}
.metric span {
    display: block;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}
.metric strong {
    font-size: 26px;
}
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th, td {
    padding: 11px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}
th { color: #475569; }
label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 600;
}
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
}
button, .button {
    display: inline-block;
    border: 0;
    background: #1d4ed8;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    margin-top: 14px;
    font-size: 14px;
}
.button.secondary {
    background: #64748b;
}
.button.small {
    padding: 6px 10px;
    margin-top: 0;
}
.badge {
    display: inline-block;
    background: #e0f2fe;
    color: #075985;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    text-transform: capitalize;
}
.flash {
    padding: 12px 14px;
    border-radius: 12px;
    background: #dcfce7;
    color: #166534;
    margin-bottom: 18px;
}
.flash.error {
    background: #fee2e2;
    color: #991b1b;
}
.filters {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}
.filters input, .filters select {
    max-width: 240px;
}
.inline-form {
    margin-top: 10px;
}
.footer {
    text-align: center;
    padding: 30px;
    color: #64748b;
}
@media (max-width: 800px) {
    .topbar { display: block; }
    .topbar nav { margin-top: 12px; }
    .topbar a { display: inline-block; margin: 6px 10px 0 0; }
    .two-col { grid-template-columns: 1fr; }
    .container { padding: 14px; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}
