/* 后台管理样式 —— 深色清晰风格 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Microsoft YaHei", -apple-system, "PingFang SC", "Segoe UI", sans-serif;
    background: #0d1020;
    color: #e6eaf6;
    font-size: 14px;
    line-height: 1.6;
}
a { color: #6aa8ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 210px; flex-shrink: 0; background: #11152a; border-right: 1px solid #222945;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 20px 20px 14px; font-size: 16px; font-weight: 700; border-bottom: 1px solid #222945; }
.sidebar .brand .em { background: linear-gradient(90deg,#38bdf8,#e05cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sidebar nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #b7c0dc; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: #171c34; text-decoration: none; }
.sidebar nav a.active { background: #1a2140; color: #fff; border-left-color: #4c8dff; }
.sidebar nav a .ic { width: 18px; text-align: center; }
.sidebar .side-foot { padding: 14px 20px; border-top: 1px solid #222945; font-size: 12px; color: #6b7495; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; border-bottom: 1px solid #222945; background: #10142699; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); }
.topbar .page-title { font-size: 16px; font-weight: 600; }
.topbar .user { color: #9aa3c0; font-size: 13px; }
.content { padding: 22px 24px 60px; max-width: 1200px; width: 100%; }

/* 卡片 */
.card { background: #141834; border: 1px solid #242b4c; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.card h3 { margin: 0 0 14px; font-size: 15px; color: #cdd5f0; display: flex; align-items: center; gap: 8px; }
.card h3 .tag { font-size: 12px; color: #8b93b4; font-weight: 400; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
@media (max-width: 900px){ .grid2,.grid3 { grid-template-columns: 1fr; } }

/* 表单 */
label.f { display: block; font-size: 13px; color: #aab4d4; margin: 12px 0 5px; }
input[type=text], input[type=password], input[type=number], select, textarea {
    width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid #2c3357;
    background: #0e1226; color: #eef1fb; font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #4c8dff; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hint { color: #7b849f; font-size: 12px; margin-top: 4px; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border: 1px solid #2c3357; border-radius: 8px; cursor: pointer;
    background: #1b2242; color: #e6eaf6; font-size: 14px; font-family: inherit; transition: .12s; }
.btn:hover { border-color: #4c8dff; text-decoration: none; }
.btn.primary { background: linear-gradient(90deg,#2f7bff,#7b3fff); border: 0; color: #fff; font-weight: 600; }
.btn.green { background: linear-gradient(90deg,#10b981,#22c55e); border: 0; color: #fff; font-weight: 600; }
.btn.amber { background: linear-gradient(90deg,#f59e0b,#f97316); border: 0; color: #fff; font-weight: 600; }
.btn.red { background: linear-gradient(90deg,#ef4444,#e11d48); border: 0; color: #fff; font-weight: 600; }
.btn.blue { background: linear-gradient(90deg,#3b82f6,#06b6d4); border: 0; color: #fff; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 13px 22px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* 表格 */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 10px; border-bottom: 1px solid #232a49; text-align: left; }
table.tbl th { color: #9aa3c0; font-weight: 600; font-size: 13px; background: #121631; }
table.tbl tr:hover td { background: #161b38; }
.avatar-sm { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #1a1f3d; vertical-align: middle; }

/* 状态徽标 */
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill.gray { background: #2a3150; color: #aab4d4; }
.pill.blue { background: rgba(59,130,246,.2); color: #7db4ff; }
.pill.green { background: rgba(34,197,94,.2); color: #6ee7a8; }
.pill.amber { background: rgba(245,158,11,.2); color: #fbbf5b; }
.pill.red { background: rgba(239,68,68,.2); color: #ff9aa8; }

/* 提示条 */
.flash { padding: 11px 16px; border-radius: 9px; margin-bottom: 16px; font-size: 14px; }
.flash.ok { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); color: #a7f3d0; }
.flash.err { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #ffb9c4; }
.flash.info { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.4); color: #bcd6ff; }

/* 控制台 */
.stage-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.stage-tabs .stab { padding: 9px 16px; border-radius: 9px; border: 1px solid #2c3357; background: #141a35; cursor: pointer; font-size: 14px; color: #c7d0ee; }
.stage-tabs .stab.on { background: linear-gradient(90deg,#2f7bff,#7b3fff); color: #fff; border: 0; font-weight: 600; }
.live-box { text-align: center; padding: 8px 0 4px; }
.live-count { font-size: 64px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.live-count.voting { color: #ffd15c; text-shadow: 0 0 20px rgba(255,209,92,.4); }
.live-status { font-size: 14px; margin-top: 6px; }
.vs-wrap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 6px; }
.vs-side { text-align: center; padding: 14px; border-radius: 12px; border: 1px solid #2a325a; }
.vs-side.a { box-shadow: inset 0 0 0 1px rgba(59,130,246,.3); }
.vs-side.b { box-shadow: inset 0 0 0 1px rgba(236,72,153,.3); }
.vs-side .nm { font-size: 16px; font-weight: 700; margin-top: 8px; }
.vs-side .vt { font-size: 40px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.vs-side.a .vt { color: #6db4ff; }
.vs-side.b .vt { color: #ff7ac6; }
.vs-mid { font-size: 22px; font-weight: 800; color: #b9a2ff; }
.mini-ava { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #1a1f3d; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { display: none; }
.switch .sl { position: absolute; cursor: pointer; inset: 0; background: #333b5e; border-radius: 26px; transition: .2s; }
.switch .sl:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .sl { background: #22c55e; }
.switch input:checked + .sl:before { transform: translateX(20px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #202744; }
.toggle-row:last-child { border-bottom: 0; }

/* 登录 */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 380px; }

.muted { color: #7b849f; }
.right { text-align: right; }
.mt0{margin-top:0}.mb0{margin-bottom:0}
