/* ============================================================
   杨光辉考试成绩发布超级无敌神秘网站
   政务服务蓝（1b）风格样式 · 含移动端适配
   ============================================================ */

:root {
  --blue: #015293;        /* 主导航/页眉带 */
  --blue-dark: #013A6B;
  --service: #0167CC;     /* 服务蓝 · 主按钮 */
  --link: #337ab7;
  --link-hover: #0056b3;
  --red: #920303;
  --text: #333333;
  --text-2: #666666;
  --text-3: #999999;
  --border: #E5E5E5;
  --border-2: #DDDDDD;
  --border-3: #CCCCCC;
  --bg: #FFFFFF;
  --bg-alt: #F5F5F5;
  --bg-hover: #F9F9F9;
  --ok-text: #3C763D;  --ok-bg: #DFF0D8;
  --info-text: #31708F; --info-bg: #D9EDF7;
  --warn-text: #8A6D3B; --warn-bg: #FAEBCC;
  --err-text: #A94442;  --err-bg: #F2DEDE;
  --green: #5FB878;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ---------------- Z1 顶部工具条 ---------------- */
.topbar { background: var(--bg-alt); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-3); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.topbar a { color: var(--text-2); margin-left: 4px; }
.topbar a:hover { color: var(--link-hover); }
.topbar .sep { margin: 0 6px; color: var(--border-3); }

/* ---------------- Z2 页眉（logo 留空） ---------------- */
.masthead { background: var(--bg); border-bottom: 1px solid var(--border); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.site-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-logo { display: block; height: 56px; width: auto; flex-shrink: 0; }
.site-text { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.site-name { font-size: 30px; font-weight: 700; letter-spacing: 1px; color: var(--text); }
.site-domain { font-size: 13px; color: var(--text-3); }
.masthead-right { text-align: right; font-size: 12px; color: var(--text-3); line-height: 1.9; }
.masthead-right .today { color: var(--text-2); }
.masthead-right .btn { margin-left: 8px; }

/* ---------------- Z3 主导航 ---------------- */
.mainnav { background: var(--blue); }
.mainnav ul { display: flex; flex-wrap: wrap; }
.mainnav a {
  display: block; padding: 13px 26px; color: #FFF; font-size: 16px; font-weight: 700;
  text-decoration: none;
}
.mainnav a:hover { background: var(--blue-dark); text-decoration: none; }
.mainnav a.current { background: var(--blue-dark); }

/* ---------------- V4 通知横幅 ---------------- */
.notice-strip { border: 1px solid #BD1A2D; background: #FFF7F7; color: var(--red); padding: 8px 14px; font-size: 13px; margin-top: 14px; }
.notice-strip a { color: var(--red); font-weight: 700; }

/* ---------------- 面包屑 ---------------- */
.breadcrumb { font-size: 12px; color: var(--text-3); padding: 12px 0; border-bottom: 1px dashed var(--border); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb .gt { margin: 0 6px; }

/* ---------------- V5 栏目标题 ---------------- */
.section-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--blue); margin-bottom: 12px; }
.section-head h2 { font-size: 18px; font-weight: 700; padding-left: 10px; border-left: 5px solid var(--blue); line-height: 1.3; }
.section-head .more { font-size: 12px; color: var(--text-3); }

/* ---------------- V6 信息列表 ---------------- */
.info-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--border); }
.info-list li:last-child { border-bottom: none; }
.info-list .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-list .t::before { content: "■"; color: var(--blue); font-size: 10px; margin-right: 8px; vertical-align: 1px; }
.info-list .t a { color: var(--link); }
.info-list .d { color: var(--text-3); font-size: 12px; flex-shrink: 0; font-family: Arial, sans-serif; }

/* ---------------- 卡片 ---------------- */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: 3px; padding: 18px; }
.card + .card { margin-top: 16px; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; padding-left: 9px; border-left: 4px solid var(--blue); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-block; padding: 7px 20px; font-size: 14px; line-height: 1.5;
  border: 1px solid var(--border-3); border-radius: 3px; background: var(--bg);
  color: var(--text); cursor: pointer; text-decoration: none; text-align: center;
  transition: background .15s;
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn-primary { background: var(--service); border-color: var(--service); color: #FFF; }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); color: #FFF; }
.btn-success { background: var(--green); border-color: var(--green); color: #FFF; }
.btn-success:hover { background: #4AA363; border-color: #4AA363; color: #FFF; }
.btn-danger { background: var(--bg); border-color: #D9534F; color: #D9534F; }
.btn-danger:hover { background: #F2DEDE; }
.btn-lg { padding: 10px 30px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------- 表单 ---------------- */
.form-group { margin-bottom: 16px; }
.form-group > label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-group .req { color: #C7000B; margin-right: 2px; }
.form-group .tip { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.form-control {
  width: 100%; height: 38px; padding: 6px 10px; border: 1px solid var(--border-3);
  border-radius: 3px; background: var(--bg); outline: none;
}
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--service); box-shadow: 0 0 0 2px rgba(1,103,204,.12); }
.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-inline .form-group { flex: 1; min-width: 180px; margin-bottom: 0; }
.form-error { color: var(--err-text); font-size: 12px; margin-top: 4px; display: none; }
.form-group.has-error .form-error { display: block; }
.form-group.has-error .form-control { border-color: #D9534F; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; min-width: 560px; }
.table th, .table td { border: 1px solid var(--border-2); padding: 9px 12px; text-align: left; font-size: 14px; vertical-align: middle; }
.table th { background: var(--bg-alt); font-weight: 700; white-space: nowrap; }
.table tbody tr:hover { background: var(--bg-hover); }
.table .num { font-family: Arial, sans-serif; text-align: right; }
.table .actions a { margin-right: 10px; white-space: nowrap; }
.table .actions a:last-child { margin-right: 0; }

/* ---------------- 徽标 / 状态 ---------------- */
.badge { display: inline-block; padding: 2px 10px; font-size: 12px; border-radius: 2px; border: 1px solid transparent; white-space: nowrap; }
.badge-published { color: var(--ok-text); background: var(--ok-bg); border-color: #C8E2C4; }
.badge-draft { color: var(--text-2); background: #EEEEEE; border-color: #DDDDDD; }

/* ---------------- 提示框 ---------------- */
.alert { padding: 12px 16px; border-radius: 3px; border: 1px solid transparent; margin-bottom: 16px; font-size: 14px; }
.alert-success { color: var(--ok-text); background: var(--ok-bg); border-color: #C8E2C4; }
.alert-info { color: var(--info-text); background: var(--info-bg); border-color: #AED6EE; }
.alert-warning { color: var(--warn-text); background: var(--warn-bg); border-color: #F0D9A6; }
.alert-danger { color: var(--err-text); background: var(--err-bg); border-color: #E4B4B2; }
.alert .sub { display: block; font-size: 12px; margin-top: 4px; }

/* ---------------- 步骤条（导入向导） ---------------- */
.steps { display: flex; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 6px; }
.steps .step { display: flex; align-items: center; font-size: 13px; color: var(--text-3); }
.steps .step .no {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border-3);
  text-align: center; line-height: 20px; font-size: 12px; margin-right: 6px; background: var(--bg);
}
.steps .step.active { color: var(--service); font-weight: 700; }
.steps .step.active .no { background: var(--service); border-color: var(--service); color: #FFF; }
.steps .step.done { color: var(--ok-text); }
.steps .step.done .no { background: var(--green); border-color: var(--green); color: #FFF; }
.steps .arrow { color: var(--border-3); margin: 0 10px; }

/* ---------------- 上传区 ---------------- */
.dropzone {
  border: 2px dashed var(--border-3); border-radius: 4px; background: #FAFBFC;
  padding: 34px 16px; text-align: center; color: var(--text-2); cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--service); background: #F0F7FF; }
.dropzone .icon { display: block; margin: 0 auto 8px; }
.dropzone strong { color: var(--service); }

/* ---------------- 成绩单（查询结果） ---------------- */
.score-card { border: 1px solid var(--border-2); border-radius: 3px; overflow: hidden; }
.score-card .sc-head { background: var(--blue); color: #FFF; padding: 14px 20px; }
.score-card .sc-head .name { font-size: 18px; font-weight: 700; }
.score-card .sc-head .meta { font-size: 12px; opacity: .85; margin-top: 2px; }
.score-card .sc-body { padding: 22px 20px; text-align: center; }
.score-card .score-big { font-size: 52px; font-weight: 700; color: var(--blue); font-family: Arial, sans-serif; line-height: 1.2; }
.score-card .score-unit { font-size: 14px; color: var(--text-3); }
.score-card .sc-meta { display: flex; justify-content: center; gap: 0; margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; flex-wrap: wrap; }
.score-card .sc-meta .cell { min-width: 110px; padding: 0 14px; border-right: 1px solid var(--border); }
.score-card .sc-meta .cell:last-child { border-right: none; }
.score-card .sc-meta .k { font-size: 12px; color: var(--text-3); }
.score-card .sc-meta .v { font-size: 20px; font-weight: 700; color: var(--text); font-family: Arial, sans-serif; }
.score-card .sc-note { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 10px 20px; font-size: 12px; color: var(--text-2); text-align: left; }

/* ---------------- 服务入口卡 ---------------- */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.service-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 3px; padding: 16px; color: var(--text); }
.service-item:hover { border-color: var(--service); background: #F0F7FF; text-decoration: none; }
.service-item .s-icon { width: 40px; height: 40px; flex-shrink: 0; }
.service-item .s-t { font-size: 16px; font-weight: 700; color: var(--blue); }
.service-item .s-d { font-size: 12px; color: var(--text-3); }

/* ---------------- 三栏布局 ---------------- */
.layout-3 { display: grid; grid-template-columns: 260px 1fr 260px; gap: 20px; align-items: start; margin: 20px 0 30px; }
.layout-2 { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; margin: 20px 0 30px; }
.layout-1 { margin: 20px 0 30px; }

/* ---------------- 统计小卡 ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { border: 1px solid var(--border); border-radius: 3px; padding: 12px 14px; background: var(--bg-alt); }
.stat .k { font-size: 12px; color: var(--text-3); }
.stat .v { font-size: 22px; font-weight: 700; color: var(--blue); font-family: Arial, sans-serif; }

/* ---------------- 导入预览高亮 ---------------- */
.hl-id { background: #FFF7E6 !important; }
.hl-score { background: #EAF4FF !important; }
.legend { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--border-3); vertical-align: -1px; margin-right: 4px; }

/* ---------------- 分页（经典公式） ---------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; font-size: 13px; }
.pagination .info { color: var(--text-3); margin-right: 10px; }
.pagination a, .pagination span.pg {
  display: inline-block; min-width: 28px; padding: 4px 9px; text-align: center;
  border: 1px solid var(--border-3); border-radius: 2px; background: var(--bg); color: var(--text-2);
}
.pagination a:hover { border-color: var(--service); color: var(--service); text-decoration: none; }
.pagination .current { background: var(--service); border-color: var(--service); color: #FFF; }
.pagination .disabled { color: var(--border-3); cursor: not-allowed; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border-2); margin-top: 30px; padding: 22px 0 26px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 2.1; }
.site-footer a { color: var(--text-2); }
.site-footer .domain { color: var(--text-2); }

/* ---------------- 长者模式 ---------------- */
body.elder-mode { font-size: 18px; }
body.elder-mode .info-list .t a,
body.elder-mode .mainnav a { font-size: 18px; }

/* ---------------- 工具类 ---------------- */
.text-muted { color: var(--text-3); }
.text-danger { color: #C7000B; }
.text-success { color: var(--ok-text); }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--text-3); padding: 30px 0; }
.radio-line { display: flex; gap: 22px; flex-wrap: wrap; }
.radio-line label { font-weight: 400; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

/* ============================================================
   移动端适配（≤768px）
   ============================================================ */
@media (max-width: 768px) {
  body { font-size: 14px; }

  .topbar .hide-m { display: none; }
  .topbar .wrap { height: 30px; }

  .masthead .wrap { padding-top: 12px; padding-bottom: 12px; }
  .site-logo { height: 42px; }
  .site-name { font-size: 19px; letter-spacing: 0; }
  .site-domain { font-size: 11px; width: 100%; order: 3; }
  .masthead-right { text-align: left; width: 100%; font-size: 11px; line-height: 1.6; }
  .masthead-right .today-br { display: none; }
  .masthead-right .btn { padding: 5px 12px; font-size: 12px; }

  .mainnav ul { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mainnav a { padding: 11px 16px; font-size: 15px; white-space: nowrap; }

  .layout-3, .layout-2 { grid-template-columns: 1fr; gap: 16px; margin: 14px 0 20px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr; }

  .section-head h2 { font-size: 16px; }

  .form-inline .form-group { min-width: 100%; }
  .form-control { height: 44px; font-size: 16px; /* 防 iOS 聚焦缩放 */ }
  .btn-lg { width: 100%; }
  .card { padding: 14px; }

  .score-card .score-big { font-size: 44px; }
  .score-card .sc-meta .cell { min-width: 88px; padding: 0 8px; }

  .steps { gap: 2px; }
  .steps .arrow { margin: 0 5px; }

  .table th, .table td { padding: 8px 9px; font-size: 13px; }

  .info-list .d { font-size: 11px; }
}
