/* ==========================================================
   评分系统 · 政务蓝主题（评委端 + 公共组件）
   ========================================================== */
:root {
    --blue-900: #062c6e;
    --blue-800: #0a3a8c;
    --blue-700: #0d4bb0;
    --blue-600: #1560d4;
    --blue-500: #2b74e4;
    --blue-100: #e8f0fc;
    --blue-50: #f3f7fd;
    --gold: #d9a441;
    --gold-light: #f3d79a;
    --red: #d4380d;
    --green: #2f9e44;
    --text: #1f2a3d;
    --text-2: #56627a;
    --muted: #8a94a8;
    --line: #e3e8f1;
    --bg: #f2f5fa;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(10, 45, 110, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; line-height: 1.6; color: var(--text); background: var(--bg);
    min-width: 1200px; display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }
img { max-width: 100%; }
code { background: var(--blue-50); padding: 1px 6px; border-radius: 4px; color: var(--blue-800); font-size: 13px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.wrap { width: 1200px; margin: 0 auto; }
.main { flex: 1; padding: 24px 0 40px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.blue { color: var(--blue-600); }
.red { color: var(--red); }
.hide { display: none !important; }

/* ---------- 头部 ---------- */
.gov-header {
    position: relative; color: #fff;
    background: linear-gradient(100deg, var(--blue-900) 0%, var(--blue-700) 55%, var(--blue-600) 100%);
    background-size: cover; background-position: center;
    overflow: hidden;
}
.gov-header::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 85% -40%, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 45%),
        repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 22px);
}
.gov-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-light) 50%, var(--gold) 80%, transparent);
}
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; height: 108px; }
.gov-header.slim .wrap { position: relative; display: flex; align-items: center; height: 88px; }
.gov-title { display: flex; align-items: center; gap: 16px; }
.gov-title h1 { font-size: 28px; letter-spacing: 2px; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.gov-title p { margin: 4px 0 0; font-size: 14px; opacity: .85; letter-spacing: 1px; }
.gov-title .sep { margin: 0 10px; opacity: .5; }
.emblem {
    width: 58px; height: 58px; border-radius: 50%; flex: none; position: relative;
    background: radial-gradient(circle at 35% 30%, #fff 0, #ffe9b8 30%, var(--gold) 75%);
    box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 4px 12px rgba(0,0,0,.25);
}
.emblem::before {
    content: "★"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #b8272c; font-size: 28px; text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.emblem.sm { width: 38px; height: 38px; }
.emblem.sm::before { font-size: 18px; }
.user-box { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12); padding: 8px 10px 8px 8px; border-radius: 40px; border: 1px solid rgba(255,255,255,.2); }
.user-box .avatar { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--blue-700); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.user-box b { display: block; font-size: 15px; line-height: 1.2; }
.user-box small { opacity: .75; font-size: 12px; }
.user-box .logout { color: #fff; margin-left: 8px; padding: 3px 12px; border-radius: 20px; background: rgba(255,255,255,.15); font-size: 13px; }
.user-box .logout:hover { background: rgba(255,255,255,.3); }

/* 步骤条 */
.steps-bar { position: relative; background: rgba(0, 20, 60, .28); border-top: 1px solid rgba(255,255,255,.1); }
.steps { display: flex; align-items: center; justify-content: center; height: 56px; }
.step { display: flex; align-items: center; gap: 8px; opacity: .6; font-size: 15px; }
.step i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.step.active, .step.done { opacity: 1; }
.step.active i { background: var(--gold); border-color: var(--gold); color: var(--blue-900); box-shadow: 0 0 0 4px rgba(217,164,65,.3); }
.step.active span { font-weight: 600; }
.step.done i { background: #fff; border-color: #fff; color: var(--blue-700); }
.step-line { width: 120px; height: 2px; background: rgba(255,255,255,.25); margin: 0 18px; }
.step-line.done { background: rgba(255,255,255,.8); }

/* ---------- 页脚 ---------- */
.gov-footer { background: #fff; border-top: 1px solid var(--line); padding: 18px 0 14px; text-align: center; color: var(--muted); font-size: 13px; }
.gov-footer p { margin: 0 0 4px; }
.powered { text-align: center; font-size: 12px; padding: 6px 0 10px; }
.powered a { color: var(--muted); }
.powered a:hover { color: var(--blue-600); }

/* ---------- 卡片 / 通用 ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; margin-bottom: 20px; border: 1px solid #edf1f7; }
.card-title { font-size: 18px; color: var(--blue-900); margin-bottom: 16px; padding-left: 12px; border-left: 4px solid var(--blue-600); line-height: 1.2; }
.card-title small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 10px; }
.tip { color: var(--text-2); background: var(--blue-50); border: 1px solid var(--blue-100); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.tip-red { color: var(--red); background: #fff4f0; border-color: #ffd8cc; }
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; font-size: 14px; border: 1px solid; }
.alert-success { background: #effaf2; border-color: #b7e4c2; color: #1f7a35; }
.alert-error { background: #fff3f0; border-color: #ffccc0; color: #c0300a; }
.alert-warn { background: #fffaeb; border-color: #f5dc9b; color: #94650a; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; background: #f0f2f5; color: var(--text-2); border: 1px solid #e1e5eb; }
.tag-green { background: #edf9f0; color: var(--green); border-color: #bfe6c8; }
.tag-blue { background: var(--blue-100); color: var(--blue-700); border-color: #c4d8f7; }
.tag-red { background: #fff1ed; color: var(--red); border-color: #ffccbc; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 18px; border-radius: 4px; border: 1px solid transparent;
    font-size: 14px; cursor: pointer; transition: all .15s; white-space: nowrap; font-family: inherit;
}
.btn-primary { background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); color: #fff; box-shadow: 0 2px 6px rgba(21, 96, 212, .3); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-line { background: #fff; color: var(--blue-700); border-color: #b9cdee; }
.btn-line:hover { border-color: var(--blue-600); background: var(--blue-50); }
.btn-gold { background: linear-gradient(180deg, #f0c060, var(--gold)); color: var(--blue-900); font-weight: 600; box-shadow: 0 2px 8px rgba(217,164,65,.4); }
.btn-gold:hover { color: var(--blue-900); filter: brightness(1.05); }
.btn-danger { background: linear-gradient(180deg, #ef5b3a, var(--red)); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.08); }
.btn-disabled { background: #eef1f5; color: var(--muted); cursor: not-allowed; border-color: #e1e5eb; }
.btn-lg { height: 44px; padding: 0 28px; font-size: 15px; }
.btn-sm { height: 28px; padding: 0 12px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
input[type=text], input[type=password], input[type=number], input[type=datetime-local], input:not([type]), select, textarea {
    width: 100%; height: 38px; padding: 0 12px; border: 1px solid #d3dbe8; border-radius: 4px;
    font-size: 14px; color: var(--text); background: #fff; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 8px 12px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(43,116,228,.15); }
input[type=file] { font-size: 13px; margin-top: 4px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin-bottom: 8px; }
.form-grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.form-grid > label, .form-grid > .label { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13px; }
.form-grid .span2 { grid-column: span 2; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }
.check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; cursor: pointer; color: var(--text); }
.check input { width: 16px; height: 16px; margin: 0; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { background: #f5f8fc; color: var(--text-2); font-weight: 600; font-size: 13px; white-space: nowrap; }
.table th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.table tbody tr:hover td { background: #fafcff; }
.table .center { text-align: center; }
.table .empty { text-align: center; color: var(--muted); padding: 40px; }
.table-scroll { overflow-x: auto; }
.row-warn td { background: #fffaf0 !important; }

/* ---------- 登录页 ---------- */
.login-layout { display: grid; grid-template-columns: 1fr 400px; gap: 36px; align-items: center; padding: 30px 0 10px; }
.login-intro { padding: 10px 10px 10px 0; }
.intro-badge { display: inline-block; padding: 4px 14px; border-radius: 20px; background: var(--blue-100); color: var(--blue-700); font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.login-intro h2 { font-size: 32px; color: var(--blue-900); margin: 18px 0 6px; letter-spacing: 1px; line-height: 1.35; }
.intro-sub { font-size: 18px; color: var(--text-2); margin: 0 0 28px; }
.intro-info { list-style: none; margin: 0 0 30px; padding: 0; border-left: 3px solid var(--gold); }
.intro-info li { display: flex; padding: 8px 0 8px 16px; font-size: 15px; }
.intro-info span { width: 90px; color: var(--muted); flex: none; }
.intro-info b { font-weight: 500; }
.flow { display: flex; align-items: center; gap: 12px; }
.flow div { display: flex; align-items: center; gap: 8px; background: #fff; padding: 10px 16px; border-radius: 6px; box-shadow: var(--shadow); font-weight: 500; }
.flow i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-600); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.flow em { width: 30px; height: 2px; background: #c7d5ec; }
.login-card { padding: 34px 34px 28px; border-top: 4px solid var(--blue-600); }
.login-card h3 { font-size: 22px; color: var(--blue-900); }
.login-card .muted { margin: 4px 0 22px; }
.login-card input { height: 44px; }

/* ---------- 承诺书 ---------- */
.doc-paper { padding: 44px 70px 36px; position: relative; background: #fff linear-gradient(180deg, #fff 0, #fbfcff 100%); }
.doc-paper::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--blue-700), var(--blue-500)); border-radius: var(--radius) var(--radius) 0 0; }
.doc-title { text-align: center; font-size: 26px; color: #111; letter-spacing: 6px; margin-bottom: 28px; font-family: "SimSun", "Songti SC", serif; }
.doc-body p { font-size: 16px; line-height: 2.1; margin: 0; text-indent: 2em; font-family: "FangSong", "STFangsong", "SimSun", "Songti SC", serif; color: #222; }
.doc-sign-info { text-align: right; margin-top: 30px; font-size: 16px; font-family: "FangSong", "STFangsong", "Songti SC", serif; }
.doc-sign-info p { margin: 6px 0; }
.sign-card .muted { margin: -6px 0 14px; }
.sign-pad-wrap { position: relative; border: 2px dashed #b9cdee; border-radius: 8px; background: #fbfdff; height: 220px; }
.sign-pad { width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.sign-placeholder { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #c4cfe0; font-size: 26px; letter-spacing: 8px; pointer-events: none; }
.sign-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.sign-actions > div { display: flex; gap: 10px; }
.confirm-text { background: var(--blue-50); border-left: 4px solid var(--gold); padding: 12px 16px; margin: 0 0 16px; font-size: 15px; }

/* ---------- 评分页 ---------- */
.countdown-card { text-align: center; padding: 60px 20px; }
.countdown-icon { font-size: 52px; }
.countdown-card h2 { font-size: 26px; color: var(--blue-900); margin: 10px 0; }
.countdown { margin-top: 26px; font-size: 18px; color: var(--text-2); }
.countdown span { display: inline-block; min-width: 64px; padding: 10px 8px; margin: 0 8px; background: linear-gradient(180deg, var(--blue-700), var(--blue-900)); color: #fff; font-size: 32px; font-weight: 700; border-radius: 8px; font-variant-numeric: tabular-nums; }
.score-top { display: flex; align-items: center; gap: 24px; padding: 16px 24px; }
.progress-info { display: flex; align-items: center; gap: 8px; flex: none; }
.progress-info > span { color: var(--muted); }
.progress-info b { font-size: 24px; color: var(--blue-600); }
.progress { width: 160px; height: 8px; background: #e7edf6; border-radius: 4px; overflow: hidden; margin-left: 8px; display: inline-block; vertical-align: middle; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--blue-700)); border-radius: 4px; }
.progress.sm { width: 140px; height: 6px; margin: 0 8px 0 0; }
.notice-text { flex: 1; margin: 0; color: var(--text-2); font-size: 13px; }
.group-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.group-tabs a { flex: 1; text-align: center; padding: 12px; background: #fff; border-radius: 6px; color: var(--text); font-weight: 500; border: 1px solid var(--line); font-size: 15px; }
.group-tabs a small { color: var(--muted); margin-left: 6px; }
.group-tabs a.active { background: var(--blue-700); color: #fff; border-color: var(--blue-700); box-shadow: 0 4px 10px rgba(13,75,176,.25); }
.group-tabs a.active small { color: rgba(255,255,255,.8); }
.score-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.player-list { padding: 0; overflow: hidden; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.list-head { padding: 14px 18px; background: linear-gradient(90deg, var(--blue-800), var(--blue-600)); color: #fff; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.list-head small { background: rgba(255,255,255,.2); padding: 0 8px; border-radius: 10px; font-weight: 400; }
.player-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); border-left: 3px solid transparent; }
.player-item:hover { background: var(--blue-50); color: var(--text); }
.player-item.active { background: var(--blue-100); border-left-color: var(--blue-600); }
.player-item .code { flex: none; width: 40px; height: 24px; line-height: 24px; text-align: center; background: #eef2f8; border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.player-item.scored .code { background: var(--blue-600); color: #fff; }
.player-item .pname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.player-item .pscore { flex: none; font-size: 12px; color: var(--muted); }
.player-item.scored .pscore { color: var(--blue-600); font-weight: 700; font-size: 14px; }
.player-head { display: flex; gap: 22px; align-items: flex-start; position: relative; overflow: hidden; }
.player-photo { width: 150px; height: 110px; object-fit: cover; border-radius: 6px; flex: none; border: 1px solid var(--line); }
.player-photo.ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--blue-600), var(--blue-900)); color: #fff; font-size: 30px; font-weight: 700; letter-spacing: 2px; }
.player-meta { flex: 1; min-width: 0; }
.code-badge { display: inline-block; font-size: 12px; color: var(--blue-700); background: var(--blue-100); padding: 1px 10px; border-radius: 3px; margin-bottom: 6px; }
.player-meta h2 { font-size: 22px; color: var(--blue-900); margin-bottom: 8px; }
.player-meta p { margin: 0; color: var(--text-2); }
.player-meta p span { margin-right: 28px; }
.player-meta .intro { margin-top: 10px; color: var(--text-2); font-size: 13px; background: #f8fafd; padding: 10px 12px; border-radius: 4px; max-height: 120px; overflow: auto; }
.scored-stamp { position: absolute; right: 20px; top: 18px; transform: rotate(-14deg); border: 3px double var(--red); color: var(--red); padding: 4px 14px; font-weight: 700; font-size: 18px; letter-spacing: 4px; border-radius: 6px; opacity: .75; }
.score-table td { padding: 10px 12px; }
.score-table .cat-cell { background: #f8fafd; text-align: center; color: var(--blue-900); border-right: 1px solid var(--line); }
.score-table .cat-cell small { display: block; color: var(--muted); font-weight: 400; }
.score-table .desc { color: var(--text-2); font-size: 13px; }
.score-table tfoot td { background: #f5f8fc; font-weight: 600; font-size: 15px; }
.total-score { font-size: 28px; color: var(--red); font-weight: 700; }
.score-input { display: flex; align-items: center; }
.score-input input { width: 70px; height: 36px; text-align: center; font-size: 18px; font-weight: 700; color: var(--blue-700); border-radius: 0; padding: 0 4px; -moz-appearance: textfield; }
.score-input input::-webkit-outer-spin-button, .score-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-input input.invalid { border-color: var(--red); background: #fff3f0; color: var(--red); }
.score-input button { width: 32px; height: 36px; border: 1px solid #d3dbe8; background: #f5f8fc; cursor: pointer; font-size: 18px; color: var(--text-2); }
.score-input button:hover { background: var(--blue-100); color: var(--blue-700); }
.score-input .minus { border-radius: 4px 0 0 4px; border-right: 0; }
.score-input .plus { border-radius: 0 4px 4px 0; border-left: 0; }

/* ---------- 汇总 / 完成 ---------- */
.sum-group { font-size: 16px; color: var(--blue-800); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.sum-group::before { content: ""; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }
.table-sum th, .table-sum td { padding: 9px 8px; font-size: 13px; }
.done-card { text-align: center; padding: 50px 20px 36px; }
.done-card h2 { font-size: 26px; color: var(--blue-900); margin: 14px 0 8px; }
.ok-icon { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: linear-gradient(135deg, #3fbf62, var(--green)); color: #fff; font-size: 40px; line-height: 72px; box-shadow: 0 6px 18px rgba(47,158,68,.35); }
.sign-show { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 15px; }
.sign-show img { height: 70px; border-bottom: 1px solid #999; }
.sign-show .date { margin-left: 40px; }
.sign-row { display: flex; gap: 60px; }

/* ---------- 安装页 ---------- */
.page-plain .main, .install-box { padding: 30px 0; width: 860px; flex: 1; }
.install-box code { font-size: 13px; }

/* ---------- 打印 ---------- */
@media print {
    body { background: #fff; min-width: 0; }
    .gov-header, .gov-footer, .done-card, .no-print, .side, .topbar, .powered, .alert { display: none !important; }
    .card, .panel { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
    .wrap { width: auto; }
    .admin-main { margin: 0 !important; }
    .table th, .table td { border: 1px solid #333 !important; padding: 6px !important; }
    .print-title { display: block !important; text-align: center; font-size: 20px !important; border: 0 !important; padding: 0 !important; margin-bottom: 10px; }
    .cut-max, .cut-min { text-decoration: line-through; }
}
