* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;
    background: #f4f5f7;
    color: #222;
}
.topbar {
    background: #1f2937;
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar a { color: #fff; text-decoration: none; margin-left: 16px; opacity: .85; }
.topbar a:hover { opacity: 1; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }

.stat { text-align: center; }
.stat .num { font-size: 28px; font-weight: 700; color: #1f2937; }
.stat .label { font-size: 13px; color: #666; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee; font-size: 14px; }
th { color: #555; font-weight: 600; background: #fafafa; }

input, select, textarea, button {
    font-family: inherit;
    font-size: 14px;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
}
input, select, textarea { width: 100%; margin-bottom: 12px; }
label { font-size: 13px; color: #555; display: block; margin-bottom: 4px; }
button {
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
button:hover { background: #1d4ed8; }
button.secondary { background: #6b7280; }
button.danger { background: #dc2626; }
button.success { background: #16a34a; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.gray { background: #f3f4f6; color: #374151; }

.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

h1 { font-size: 22px; margin: 0 0 20px; }
h2 { font-size: 17px; margin: 0 0 14px; }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box { width: 340px; }
