/* ==========================================================================
   SIA 2027 后台样式
   ========================================================================== */
:root {
    --ink: #0c1424;
    --ink2: #16223a;
    --steel: #eef2f8;
    --line: #e3e9f2;
    --text: #26303f;
    --text2: #6b7889;
    --red: #e2001a;
    --blue: #1f6fe5;
    --green: #16924a;
    --metal: linear-gradient(180deg, #ffffff 0%, #eef3fa 45%, #dbe4f0 58%, #f8fafc 100%);
    --shadow: 0 2px 6px rgba(16,30,54,.06), 0 14px 30px -18px rgba(16,30,54,.4);
}
* { box-sizing: border-box; }
body {
    margin: 0; background: #f2f5fa; color: var(--text); font-size: 14px; line-height: 1.7;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}
a { color: var(--blue); text-decoration: none; }
a:hover { opacity: .82; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 10px; line-height: 1.4; }

/* 登录页 */
.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background: radial-gradient(70% 60% at 80% 0%, #1b3358, #070b14 70%), #070b14;
}
.login-card {
    width: 100%; max-width: 400px; padding: 30px 28px 24px; border-radius: 18px;
    background: #fff; box-shadow: 0 40px 80px -40px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.06);
    position: relative; overflow: hidden;
}
.login-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    background: linear-gradient(90deg, var(--red), #d8b46a, transparent);
}
.lg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.lg-mark {
    width: 46px; height: 46px; border-radius: 12px; background: var(--metal); display: grid; place-items: center;
    box-shadow: inset 0 1px 0 #fff, inset 0 -2px 4px rgba(120,140,170,.4), 0 8px 16px -10px rgba(16,30,54,.7);
}
.lg-mark img { width: 34px; height: 34px; object-fit: contain; }
.lg-head b { display: block; font-size: 16.5px; color: var(--ink); }
.lg-head small { font-size: 10px; letter-spacing: 1.4px; color: #9aa7ba; }
.fld { display: block; margin-bottom: 16px; }
.fld > span { display: block; font-size: 13px; color: var(--text2); margin-bottom: 7px; font-weight: 600; }
.inp, .sel, .ta {
    width: 100%; height: 44px; padding: 0 13px; border: 1px solid #d8e1ee; border-radius: 10px;
    background: #fbfcfe; font-size: 14px; color: var(--text); outline: 0; font-family: inherit; transition: .18s;
}
.ta { height: auto; min-height: 110px; padding: 10px 13px; line-height: 1.75; resize: vertical; }
.inp:focus, .sel:focus, .ta:focus { border-color: rgba(226,0,26,.5); background: #fff; box-shadow: 0 0 0 3px rgba(226,0,26,.08); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px;
    border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 13.5px;
    font-weight: 600; cursor: pointer; transition: .18s; font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: #c6d3e6; background: #fafcff; }
.btn-primary {
    color: #fff; border-color: transparent;
    background: linear-gradient(180deg, #ff4c3f, #d0121f 52%, #a30c17);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 22px -12px rgba(226,0,26,.9);
}
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(180deg, #ff4c3f, #d0121f 52%, #a30c17); }
.btn-dark { color: #fff; border-color: transparent; background: linear-gradient(180deg, #26334f, #101a2c); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-danger { color: #c00f1a; border-color: #f2c9c9; background: #fff5f5; }
.btn-block { width: 100%; height: 46px; font-size: 15px; letter-spacing: 4px; }
.lg-foot { font-size: 11.5px; color: #9aa7ba; margin-top: 16px; line-height: 1.7; text-align: center; }
.lg-back { display: block; text-align: center; margin-top: 10px; font-size: 12.5px; color: #7c8a9d; }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; }
.alert.err { background: #fff2f2; color: #a3121f; border: 1px solid #f6c9c9; }
.alert.ok { background: #effaf3; color: #14713a; border: 1px solid #c3e8d1; }
.alert.warn { background: #fffaf0; color: #8a5a08; border: 1px solid #f0dcb0; }

/* 框架 */
.app { display: flex; min-height: 100vh; }
.side {
    width: 226px; flex: 0 0 226px; color: #a7b5ca; position: relative;
    background: linear-gradient(180deg, #101a2c, #070c16 60%, #0d1626);
    display: flex; flex-direction: column;
    box-shadow: 1px 0 0 rgba(255,255,255,.05);
}
.side-brand {
    display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-brand .mk {
    width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center;
    background: var(--metal); box-shadow: inset 0 1px 0 #fff, 0 6px 14px -8px #000;
}
.side-brand .mk img { width: 26px; height: 26px; object-fit: contain; }
.side-brand b { font-size: 14.5px; display: block; letter-spacing: .5px; }
.side-brand small { font-size: 9.5px; letter-spacing: 1.2px; color: #6d7c93; }
.side-nav { padding: 12px 10px 24px; flex: 1; overflow-y: auto; }
.side-nav .grp { font-size: 11px; letter-spacing: 1.5px; color: #5b6b82; padding: 14px 10px 6px; }
.side-nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
    color: #a7b5ca; font-size: 13.5px; margin-bottom: 2px;
}
.side-nav a i { font-style: normal; width: 18px; text-align: center; opacity: .8; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; opacity: 1; }
.side-nav a.on {
    color: #fff; background: linear-gradient(180deg, #2b3a58, #16223a);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 18px -12px #000;
}
.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #6d7c93; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 58px; background: #fff; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between; padding: 0 22px; gap: 14px;
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 16.5px; margin: 0; color: var(--ink); }
.topbar .tb-a { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text2); }
.topbar .who {
    display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px;
    background: #f4f7fc; border: 1px solid var(--line);
}
.topbar .who b {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px;
    background: linear-gradient(180deg, #2b3a58, #101a2c);
}
.content { padding: 22px; }

/* 卡片 / 表格 */
.card { background: #fff; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.card-hd {
    padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: linear-gradient(180deg, #fff, #f8fafd);
}
.card-hd h2 { margin: 0; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.card-hd h2::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: linear-gradient(180deg, var(--red), #d8b46a); }
.card-bd { padding: 18px; }
.card-bd.p0 { padding: 0; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.tbl th { background: #f7f9fd; color: #5b6879; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.tbl tr:hover td { background: #fafcff; }
.tbl td.act { white-space: nowrap; }
.tbl .muted { color: #96a3b6; font-size: 12.5px; }
.tbl-scroll { overflow-x: auto; }

.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.tag.on { background: #e8f7ee; color: #12783e; }
.tag.off { background: #f3f5f9; color: #8494a8; }
.tag.red { background: #fff0f0; color: #bb1220; }
.tag.blue { background: #eef4ff; color: #1a5cc0; }
.tag.gold { background: #fdf6e7; color: #8a6410; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
    background: #fff; border-radius: 14px; padding: 18px; border: 1px solid var(--line); box-shadow: var(--shadow);
    position: relative; overflow: hidden;
}
.stat-card::after {
    content: ""; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px; border-radius: 50%;
    background: radial-gradient(circle, rgba(31,111,229,.14), transparent 70%);
}
.stat-card b { display: block; font-size: 26px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-card span { font-size: 12.5px; color: var(--text2); }

/* 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: #38465a; margin-bottom: 7px; }
.lbl .req { color: var(--red); }
.hint { font-size: 12px; color: #96a3b6; margin-top: 6px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.preview { margin-top: 9px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); max-width: 300px; }
.preview img { width: 100%; }
.check-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--red); width: 15px; height: 15px; }

.pager { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--text);
}
.pager .cur { color: #fff; border-color: transparent; background: linear-gradient(180deg, #ff4c3f, #c00f1a); }
.pager .dis { color: #b8c2d2; background: #f7f9fc; }

.empty { text-align: center; padding: 50px 20px; color: #96a3b6; }

/* 移动端 */
@media (max-width: 900px) {
    .app { flex-direction: column; }
    .side {
        width: 100%; flex: none; position: sticky; top: 0; z-index: 30;
        flex-direction: row; align-items: center; overflow-x: auto; padding: 0;
    }
    .side-brand { border: 0; padding: 10px 12px; flex: 0 0 auto; }
    .side-brand small { display: none; }
    .side-nav { display: flex; padding: 6px 8px; gap: 4px; }
    .side-nav .grp { display: none; }
    .side-nav a { white-space: nowrap; margin: 0; padding: 8px 11px; font-size: 13px; }
    .side-nav a i { display: none; }
    .side-foot { display: none; }
    .topbar { padding: 0 14px; height: 52px; }
    .topbar .tb-a { gap: 8px; }
    .content { padding: 14px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .form-grid { grid-template-columns: 1fr; }
    .tbl th, .tbl td { padding: 9px 10px; }
}
