:root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --text: #222;
    --muted: #777;
    --primary: #2f6fed;
    --border: #e2e5ea;
}
* { box-sizing: border-box; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font: 15px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.main { padding: 24px 16px; min-height: calc(100vh - 110px); }

.topbar { background: #1f2533; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { color: #fff; font-size: 18px; font-weight: 700; }
.nav-links a { color: #cfd4e0; margin-left: 16px; font-size: 14px; }
.nav-links a:hover { color: #fff; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }

.card {
    background: var(--card); border: 1px solid var(--border); border-radius: 8px;
    padding: 20px 24px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 18px; }

.post-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: none; }
.post-item .title { font-weight: 600; }
.post-item .meta { color: var(--muted); font-size: 13px; }
.lock-badge { font-size: 12px; color: #b45309; background: #fef3c7; border-radius: 4px; padding: 2px 8px; }

label { display: block; margin: 12px 0 4px; font-size: 14px; color: #444; }
input[type=text], input[type=password], input[type=datetime-local], input[type=number], textarea, select {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
    font: inherit; background: #fff;
}
textarea { min-height: 220px; resize: vertical; }
.btn {
    display: inline-block; margin-top: 14px; padding: 8px 18px; border: none; border-radius: 6px;
    background: var(--primary); color: #fff; font: inherit; cursor: pointer;
}
.btn:hover { opacity: .9; text-decoration: none; }
.btn-sm { margin: 0; padding: 4px 10px; font-size: 13px; }
.btn-danger { background: #d9534f; }
.btn-ghost { background: #6c757d; }

.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 14px; }
.alert-success { background: #e7f7ec; color: #1a7f37; border: 1px solid #b7ebc6; }
.alert-error   { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c2; }
.alert-info    { background: #eaf2fd; color: #2f6fed; border: 1px solid #c7dbf9; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tbl th { background: #f0f2f5; font-weight: 600; }
.tbl code { background: #eef1f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

.content-body { white-space: pre-wrap; word-break: break-word; }
.muted { color: var(--muted); font-size: 13px; }
.inline-form { display: inline; }
.actions form { display: inline; margin-left: 4px; }
