* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f4f5f7; color: #333; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 200px; background: #2b2f3a; color: #fff; }
.sidebar .brand { padding: 20px; display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: bold; border-bottom: 1px solid #3a3f4c; }
.sidebar .brand-logo { flex: 0 0 auto; font-size: 28px; line-height: 1; }
.sidebar .brand-text { min-width: 0; }
.sidebar .brand-text span { display: block; font-size: 12px; font-weight: normal; color: #ff8ba0; margin-top: 2px; }
.sidebar nav a { display: block; position: relative; padding: 13px 20px; color: #c8ccd6; text-decoration: none; font-size: 14px; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,0.07); }
.sidebar nav a.on { color: #fff; background: transparent; }
.sidebar nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ff5a7a; }
.main { margin-left: 200px; padding: 24px; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card h2 { font-size: 16px; margin-bottom: 14px; color: #333; }
.stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 160px; background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat .num { font-size: 26px; font-weight: bold; color: #ff5a7a; }
.stat .label { font-size: 13px; color: #888; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid #eee; text-align: left; }
th { background: #fafafa; color: #666; white-space: nowrap; }
tr:hover td { background: #fafcff; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge.vip { background: #fff0d6; color: #c77d00; }
.badge.normal { background: #eee; color: #666; }
.badge.pending { background: #fff4e0; color: #d98a00; }
.badge.success { background: #e4f7ec; color: #1d9e5c; }
.badge.fail { background: #fdeaea; color: #d9534f; }
.badge.gray { background: #eee; color: #777; }
.btn { display: inline-block; padding: 6px 14px; border: none; border-radius: 4px; background: #ff5a7a; color: #fff; font-size: 13px; cursor: pointer; text-decoration: none; }
.btn:hover { opacity: .88; }
.btn.ghost { background: #eee; color: #555; }
.btn.small { padding: 3px 10px; font-size: 12px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], textarea, select { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
textarea { min-height: 80px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar input { width: 260px; }
.toolbar a.btn { margin-right: 0; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: 340px; background: #fff; border-radius: 10px; padding: 34px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.login-box h1 { font-size: 20px; text-align: center; color: #ff5a7a; margin-bottom: 4px; }
.login-box p { font-size: 13px; color: #999; text-align: center; margin-bottom: 22px; }
.login-box .login-logo { display: block; font-size: 54px; line-height: 1; text-align: center; margin: 0 auto 12px; }
.error { background: #fdeaea; color: #d9534f; padding: 8px 12px; border-radius: 4px; font-size: 13px; margin-bottom: 14px; }
.photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; margin-right: 6px; }
.muted { color: #999; font-size: 12px; }

.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.alert.ok { background: #e4f7ec; color: #1d9e5c; }
.alert.err { background: #fdeaea; color: #d9534f; }
.cand-list { max-height: 320px; overflow-y: auto; border: 1px solid #eee; border-radius: 6px; padding: 6px 10px; margin-bottom: 12px; }
.cand { display: flex; align-items: center; gap: 10px; padding: 7px 2px; font-size: 13px; border-bottom: 1px dashed #f0f0f0; cursor: pointer; }
.cand:last-child { border-bottom: none; }
.cand input { width: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; background: #fafafa; border: 1px solid #eee; border-radius: 8px; padding: 12px; }
.filters .f-item { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #666; }
.filters .f-item select, .filters .f-item input[type=text], .filters .f-item input[type=number] { width: auto; min-width: 90px; padding: 6px 8px; font-size: 13px; }
.filters .f-wide input[type=text] { min-width: 200px; }
.filters .f-age { display: flex; align-items: center; gap: 4px; }
.filters .f-age input[type=number] { width: 64px; }
.result-box { background: #f6f8fa; border: 1px solid #e1e4e8; border-radius: 6px; padding: 10px 12px; font-family: Consolas, Menlo, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.deploy-form .form-row label { margin-bottom: 4px; }
/* 上传与富文本编辑器 */
.upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upload-row input[type=text] { width: 340px; }
.cover-preview { width: 180px; height: 110px; object-fit: cover; border: 1px solid #eee; border-radius: 6px; margin-top: 10px; background: #f7f7f9; }
.cover-preview.empty { display: none; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; background: #fafafa; border: 1px solid #ddd; border-bottom: none; border-radius: 6px 6px 0 0; }
.editor-toolbar button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid #e2e2e2; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; line-height: 28px; color: #333; font-family: inherit; }
.editor-toolbar button:hover { background: #fff0f3; border-color: #ff8ba0; }
.editor-toolbar button.on { background: #ff5a7a; color: #fff; }
.editor-toolbar select { height: 30px; padding: 0 4px; border: 1px solid #e2e2e2; border-radius: 4px; font-size: 13px; background: #fff; color: #333; width: auto; }
.editor-area { min-height: 240px; border: 1px solid #ddd; border-radius: 0 0 6px 6px; padding: 12px 14px; font-size: 14px; line-height: 1.7; background: #fff; outline: none; overflow-y: auto; }
.editor-area:focus { border-color: #ff8ba0; }
.editor-area img { max-width: 100%; display: block; margin: 10px auto; border-radius: 8px; }
.editor-area p { margin: 0 0 8px; }
/* 首页Banner管理 */
.table-thumb { width: 120px; height: 68px; object-fit: cover; border-radius: 4px; border: 1px solid #eee; background: #f7f7f9; }
.table-thumb.broken { visibility: hidden; }
