* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f4f6fa;
    color: #1f2937;
}
.topbar {
    display: flex; align-items: center; gap: 24px;
    background: #0f172a; color: #fff; padding: 12px 24px;
    flex-wrap: wrap;
}
.topbar .brand { font-size: 18px; letter-spacing: .5px; }
.topbar .brand strong { color: #38bdf8; }
.topbar .tag { font-size: 12px; color: #94a3b8; margin-left: 8px; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
    color: #cbd5e1; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: 14px;
}
.topbar nav a:hover { background: #1e293b; }
.topbar nav a.active { background: #2563eb; color: #fff; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.userbox em { color: #38bdf8; font-style: normal; }
.logout { color: #f87171; text-decoration: none; }

.container { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.footer { text-align: center; color: #94a3b8; font-size: 12px; padding: 24px; }

h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card .num { font-size: 28px; font-weight: 700; }
.card .lbl { color: #64748b; font-size: 13px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
th, td { text-align: left; padding: 10px 12px; font-size: 14px; border-bottom: 1px solid #eef2f7; }
th { background: #f8fafc; color: #475569; font-weight: 600; }
tr:hover td { background: #f8fafc; }

.btn { display: inline-block; background: #2563eb; color: #fff; border: 0; padding: 8px 14px; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: 14px; }
.btn:hover { background: #1d4ed8; }
.btn.ghost { background: #eef2f7; color: #334155; }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #b91c1c; }

.form { background: #fff; padding: 20px; border-radius: 10px; max-width: 480px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.form label { display: block; font-size: 13px; color: #475569; margin: 12px 0 4px; }
.form input, .form select, .form textarea { width: 100%; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; }
.form .actions { margin-top: 16px; }

.badge { padding: 3px 8px; border-radius: 20px; font-size: 12px; }
.badge.green { background: #dcfce7; color: #15803d; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.gray { background: #f1f5f9; color: #475569; }

.alert { padding: 12px 16px; border-radius: 8px; margin: 12px 0; font-size: 14px; }
.alert.success { background: #dcfce7; color: #15803d; }
.alert.error { background: #fee2e2; color: #b91c1c; }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.muted { color: #64748b; font-size: 13px; }
.filters { margin: 12px 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters input, .filters select { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; }
