* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; color: #1f2937; background: #f5f7fb; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #111827; color: #fff; padding: 20px 16px; }
.brand { font-size: 20px; font-weight: 700; margin-bottom: 28px; }
.sidebar a { display: block; color: #e5e7eb; padding: 10px 12px; border-radius: 8px; margin-bottom: 6px; }
.sidebar a:hover { background: #1f2937; text-decoration: none; }
.main { flex: 1; }
.topbar { height: 60px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.content { padding: 24px; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; }
.stat strong { display: block; font-size: 28px; margin-top: 8px; }
.form-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: start; margin-bottom: 14px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
.btn, button { display: inline-block; border: 0; border-radius: 8px; padding: 9px 14px; background: #2563eb; color: #fff; cursor: pointer; font: inherit; }
.btn.secondary { background: #6b7280; }
.btn.danger { background: #dc2626; }
.btn.light { background: #e5e7eb; color: #111827; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 11px 10px; text-align: left; vertical-align: top; }
th { color: #6b7280; font-weight: 600; background: #f9fafb; }
.search { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 12px; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: 380px; }
pre { white-space: pre-wrap; word-break: break-word; background: #f9fafb; padding: 12px; border-radius: 8px; }
@media (max-width: 900px) { .app { flex-direction: column; } .sidebar { width: 100%; } .grid, .search { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }
