/* 北京市城建技术培训中心 —— 全站样式（移动端优先，适配微信内置浏览器）
   配色来自设计稿：主色深蓝 #0B3D91、强调红 #D7263D、底色 #EFF2F7。改风格只需改这里的变量。 */
:root {
  --brand: #0B3D91;
  --brand-dark: #082d6b;
  --accent: #D7263D;
  --bg: #EFF2F7;
  --card: #FFFFFF;
  --text: #1C2433;
  --muted: #6A7385;
  --line: #E1E6EF;
  --soft: #F5F7FB;
  --ok: #16794a;
  --warn: #b45309;
  --radius: 6px;
  --maxw: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.35; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* 顶栏 */
.topbar { background: var(--brand); color: #fff; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 12px; }
.topbar .logo { color: #fff; font-weight: 700; font-size: 16px; white-space: nowrap; }
.topbar .tel { color: #fff; font-size: 14px; white-space: nowrap; }
.nav { background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav .wrap { display: flex; gap: 20px; height: 44px; align-items: center; font-size: 15px; white-space: nowrap; }
.nav a { color: var(--text); padding: 10px 0; border-bottom: 2px solid transparent; }
.nav a.on { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.nav a:hover { text-decoration: none; color: var(--accent); }

/* 区块 */
.hero { background: var(--brand); color: #fff; padding: 28px 0 26px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.hero p { margin: 0; color: #C9D6EE; }
.tag { display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; }
.sec { background: var(--card); margin-top: 10px; padding: 20px 0; }
.h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; color: var(--brand); display: flex; align-items: center; gap: 8px; }
.h2::before { content: ""; width: 4px; height: 18px; background: var(--accent); flex: none; }
.notice { background: #FFF7E6; border-left: 4px solid var(--warn); padding: 10px 14px; margin-top: 10px; }

/* 办事导航 */
.tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.task { display: block; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--text); }
.task:hover { border-color: var(--brand); text-decoration: none; }
.task b { display: block; color: var(--brand); font-size: 16px; }
.task span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.task.hot { background: var(--brand); border-color: var(--brand); }
.task.hot b, .task.hot span { color: #fff; }

/* 课程卡片 */
.cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); }
a.card:hover { border-color: var(--brand); text-decoration: none; }
.card h3 { margin: 0; font-size: 16px; color: var(--brand); }
.card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.price { color: var(--accent); font-weight: 700; }
.price small { color: var(--muted); font-weight: 400; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--brand); }

/* 表单 */
.form { max-width: 420px; }
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=tel], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #c7cfdc; border-radius: var(--radius); background: #fff;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.row { display: flex; gap: 8px; align-items: stretch; }
.row > input { flex: 1; }
.btn {
  display: inline-block; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: var(--radius);
  border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-align: center; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.red { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.small { padding: 4px 10px; font-size: 13px; font-weight: 600; }
.btn.block { display: block; width: 100%; margin-top: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.msg { margin: 10px 0; padding: 10px 12px; border-radius: var(--radius); font-size: 14px; }
.msg.err { background: #FDECEE; color: #9b1c2c; }
.msg.ok { background: #E8F5EE; color: var(--ok); }
.hint { color: var(--muted); font-size: 13px; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--soft); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
.pill { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: #E8F5EE; color: var(--ok); border-color: #bfe3cf; }
.pill.warn { background: #FFF4E5; color: var(--warn); border-color: #f5d3a6; }
.pill.red { background: #FDECEE; color: #9b1c2c; border-color: #f3c0c7; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--soft); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 22px; font-weight: 800; color: var(--brand); }
.stat .l { font-size: 13px; color: var(--muted); }

/* 步骤 */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; text-align: center; line-height: 28px; font-weight: 700; }

/* 页脚与底部操作栏 */
.footer { background: var(--brand); color: #C9D6EE; margin-top: 10px; padding: 22px 0 90px; font-size: 13px; text-align: center; }
.footer .big { color: #fff; font-size: 22px; font-weight: 800; letter-spacing: 1px; }
.footer a { color: #fff; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; height: 58px; background: #fff; border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
.actionbar a { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--brand); }
.actionbar a.b { background: var(--brand); color: #fff; }
.actionbar a.r { background: var(--accent); color: #fff; }
.actionbar a:hover { text-decoration: none; }

.prose { max-width: 760px; white-space: pre-line; }
.muted { color: var(--muted); }
.mt { margin-top: 14px; }
.right { text-align: right; }
.flex { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }

/* 后台 */
.admin .topbar { background: #1f2a3d; }
.admin .nav a.on { color: var(--brand); border-bottom-color: var(--brand); }
.admin .footer { display: none; }
.admin main { padding-bottom: 40px; }

@media (min-width: 720px) {
  .tasks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero { padding: 44px 0 40px; }
  .hero h1 { font-size: 32px; }
  .actionbar { display: none; }
  .footer { padding-bottom: 26px; }
}
