* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Segoe UI", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1f2937; color: #fff; display: flex; flex-direction: column; position: fixed; top:0; bottom:0; }
.brand { padding: 20px; font-size: 18px; font-weight: 700; border-bottom: 1px solid #374151; }
.sidebar nav { flex: 1; padding: 12px 0; }
.sidebar nav a { display: block; padding: 11px 22px; color: #d1d5db; text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: #374151; color: #fff; }
.sidebar nav a.active { background: #374151; color: #fff; border-left-color: #3b82f6; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid #374151; font-size: 13px; color: #9ca3af; display:flex; justify-content: space-between; }
.sidebar-footer a { color: #f87171; text-decoration: none; }
.main { flex: 1; margin-left: 220px; padding: 24px; }
.card { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
h1 { font-size: 22px; margin-bottom: 16px; }
h2 { font-size: 16px; margin-bottom: 12px; color: #374151; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat .num { font-size: 26px; font-weight: 700; color: #1d4ed8; }
.stat .lbl { color: #6b7280; font-size: 13px; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; color: #374151; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f9fafb; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: #f3f4f6; color: #4b5563; }
.btn { display:inline-block; padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; text-decoration: none; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #374151; margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], select, textarea { width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #2563eb; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }
.muted { color: #6b7280; font-size: 13px; }
.toolbar { display:flex; gap:10px; margin-bottom:16px; align-items:center; flex-wrap:wrap; }
.toolbar .btn { }
.pager { display:flex; gap: 8px; margin-top: 16px; align-items:center; }
.pager a { padding: 6px 12px; border:1px solid #d1d5db; border-radius:6px; text-decoration:none; color:#374151; font-size:13px; }
.pager a:hover { background:#f3f4f6; }
.pager .current { background:#2563eb; color:#fff; border-color:#2563eb; }
.login-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; background:#f0f2f5; }
.login-card { width: 380px; background:#fff; border-radius:12px; padding:32px; box-shadow:0 4px 12px rgba(0,0,0,.08); }
.login-card h1 { text-align:center; font-size:20px; margin-bottom:24px; }
pre.dump { background:#111827; color:#e5e7eb; padding:14px; border-radius:8px; font-size:12px; overflow:auto; max-height:400px; white-space:pre-wrap; word-break:break-all; }
