/* ============ 基础 ============ */
* { margin:0; padding:0; box-sizing:border-box; }

:root{
  --navy:#0B1F3A;          /* 深蓝 */
  --blue:#2563EB;          /* 主色 */
  --blue-light:#3B82F6;
  --teal:#0EA5A7;          /* 强调青 */
  --bg:#F4F6FB;            /* 页面底色 */
  --card:#FFFFFF;
  --text:#1F2937;
  --text-sub:#6B7280;
  --line:#E5E7EB;
  --danger:#DC2626;
  --ok:#16A34A;
  --radius:14px;
}

html,body{ height:100%; }
body{
  font-family:"PingFang SC","Microsoft YaHei","Hiragino Sans GB",system-ui,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
  font-size:15px;
}

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

/* ============ 顶部导航 ============ */
.site-header{
  background:var(--navy);
  color:#fff;
  padding:0 24px;
  position:sticky; top:0; z-index:50;
  box-shadow:0 2px 10px rgba(11,31,58,.18);
}
.header-inner{
  max-width:1080px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  height:60px;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand-logo{
  width:34px;height:34px;border-radius:9px;
  background:linear-gradient(135deg,var(--blue),var(--teal));
  display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:16px;color:#fff;
}
.brand-name{ font-size:16px; font-weight:700; letter-spacing:.5px; }
.brand-sub{ font-size:11px; color:#9DB2CF; margin-top:-2px; }
.header-actions a{
  color:#C7D6EE; font-size:13px; margin-left:18px;
}
.header-actions a:hover{ color:#fff; text-decoration:none; }

/* ============ 布局容器 ============ */
.page{ max-width:1080px; margin:0 auto; padding:32px 20px 60px; }
.narrow{ max-width:860px; }

/* ============ 卡片 ============ */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 4px 16px rgba(17,24,39,.05);
  padding:28px 30px;
  margin-bottom:20px;
}
.card h2{ font-size:19px; margin-bottom:6px; }
.card .card-desc{ color:var(--text-sub); font-size:13px; margin-bottom:18px; }

/* ============ 首页 Hero ============ */
.hero{
  background:linear-gradient(135deg,#0B1F3A 0%,#123A6B 55%,#0E7C86 100%);
  border-radius:var(--radius);
  color:#fff;
  padding:52px 44px;
  margin-bottom:24px;
}
.hero .tag{
  display:inline-block;background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.28);
  padding:4px 12px;border-radius:999px;
  font-size:12px;letter-spacing:1px;margin-bottom:18px;
}
.hero h1{ font-size:30px; line-height:1.35; margin-bottom:14px; }
.hero p{ color:#CFE0F5; max-width:640px; font-size:15px; margin-bottom:22px; }
.btn-primary{
  display:inline-block;background:#fff;color:var(--navy);
  font-weight:700;font-size:16px;padding:13px 34px;border-radius:10px;
  transition:transform .15s ease, box-shadow .15s ease;
  box-shadow:0 6px 20px rgba(0,0,0,.22);
}
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 10px 26px rgba(0,0,0,.3); text-decoration:none; }

/* ============ 三个步骤说明 ============ */
.steps{ display:grid; grid-template-columns:repeat(2, 1fr); gap:16px; }
@media (max-width:480px){
  .steps{ grid-template-columns:1fr; }
}
.step-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:22px; box-shadow:0 3px 12px rgba(17,24,39,.04);
}
.step-num{
  width:34px;height:34px;border-radius:9px;
  background:linear-gradient(135deg,var(--blue),var(--teal));
  color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;
  margin-bottom:12px;font-size:16px;
}
.step-card h3{ font-size:16px; margin-bottom:6px; }
.step-card p{ font-size:13px; color:var(--text-sub); }

/* ============ 表单基础 ============ */
.form-item{ margin-bottom:20px; }
.form-item .label{ font-weight:600; font-size:14px; margin-bottom:6px; display:block; }
.form-item .label .req{ color:var(--danger); margin-left:3px; }
.form-item .hint{ font-size:12px; color:var(--text-sub); margin-top:4px; }

input[type=text], input[type=number], input[type=password], input[type=email],
textarea, select{
  width:100%; padding:10px 12px;
  border:1px solid var(--line); border-radius:8px;
  font-size:14px; font-family:inherit; color:var(--text);
  background:#fff; transition:border-color .15s;
}
input:focus, textarea:focus, select:focus{
  outline:none; border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
textarea{ min-height:72px; resize:vertical; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.row3{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
@media (max-width:640px){ .row2,.row3{ grid-template-columns:1fr; } }

/* 单选/多选组 */
.opts{ display:flex; flex-wrap:wrap; gap:10px; }
.opt{
  border:1px solid var(--line); border-radius:10px;
  padding:9px 16px; cursor:pointer; font-size:14px;
  user-select:none; transition:all .15s; background:#fff;
}
.opt input{ display:none; }
.opt:hover{ border-color:var(--blue-light); }
.opt.on{
  border-color:var(--blue); background:#EFF4FF; color:var(--blue);
  font-weight:600;
}
.opt.on.opt-teal{ border-color:var(--teal); background:#E6F7F7; color:#0E7C86; }

/* 区块标题 */
.section-title{
  font-size:16px; font-weight:700; color:var(--navy);
  padding:10px 0 4px; border-bottom:2px solid var(--blue);
  margin:26px 0 18px;
}
.section-title:first-child{ margin-top:0; }

/* ============ 数据表格 ============ */
.table-scroll{ overflow-x:auto; margin-bottom:4px; }
.table-scroll table.data{ min-width:760px; }
table.data{
  width:100%; border-collapse:collapse; font-size:14px;
}
table.data th{
  background:var(--navy); color:#fff; text-align:left;
  padding:10px 12px; font-weight:600; white-space:nowrap;
}
table.data td{
  border:1px solid var(--line); padding:8px 12px; vertical-align:middle;
}
table.data tr:nth-child(even) td{ background:#FAFBFF; }
table.data input, table.data textarea{
  border:none; background:transparent; padding:4px 2px; font-size:14px;
}
table.data textarea{ min-height:40px; }
table.data input:focus, table.data textarea:focus{
  box-shadow:none; border:none; background:#F0F5FF; border-radius:4px;
}

/* ============ 进度条 ============ */
.progress-wrap{ margin-bottom:24px; }
.progress-steps{ display:flex; gap:0; }
.progress-item{
  flex:1; text-align:center; position:relative; padding-bottom:8px;
}
.progress-item .dot{
  width:26px;height:26px;border-radius:50%;
  background:#E5E7EB; color:#9CA3AF;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700; position:relative; z-index:2;
  transition:all .2s;
}
.progress-item .pname{ font-size:12px; color:var(--text-sub); margin-top:6px; }
.progress-item.active .dot{ background:var(--blue); color:#fff; }
.progress-item.active .pname{ color:var(--blue); font-weight:600; }
.progress-item.done .dot{ background:var(--teal); color:#fff; }
.progress-item:not(:last-child)::after{
  content:""; position:absolute; top:13px; left:calc(50% + 14px);
  width:calc(100% - 28px); height:3px; background:#E5E7EB;
}
.progress-item.done:not(:last-child)::after{ background:var(--teal); }

/* ============ 问卷步骤切换 ============ */
.step-panel{ display:none; }
.step-panel.active{ display:block; }
.step-actions{
  display:flex; justify-content:space-between; margin-top:28px;
  padding-top:20px; border-top:1px solid var(--line);
}
.btn{
  padding:11px 30px; border-radius:10px; border:none; cursor:pointer;
  font-size:15px; font-weight:600; font-family:inherit;
  transition:all .15s;
}
.btn-next{ background:var(--blue); color:#fff; }
.btn-next:hover{ background:var(--blue-light); }
.btn-prev{ background:#F3F4F6; color:var(--text); }
.btn-prev:hover{ background:#E5E7EB; }
.btn-submit{ background:linear-gradient(135deg,var(--blue),var(--teal)); color:#fff; }
.btn-submit:hover{ filter:brightness(1.08); }
.btn:disabled{ opacity:.5; cursor:not-allowed; }
.btn-del{ padding:4px 10px; font-size:12px; border-radius:6px; background:#FEE2E2; color:var(--danger); }
.btn-del:hover{ background:var(--danger); color:#fff; }

/* ============ 提示条 ============ */
.notice{
  background:#FFF7ED; border:1px solid #FDBA74; color:#9A3412;
  border-radius:10px; padding:12px 16px; font-size:13px; margin-bottom:20px;
}

/* ============ 摘要确认弹窗 ============ */
.modal-mask{
  display:none; position:fixed; inset:0; z-index:100;
  background:rgba(11,31,58,.55);
  align-items:flex-start; justify-content:center;
  padding:48px 16px; overflow:auto;
}
.modal-mask.show{ display:flex; }
.modal{
  background:#fff; border-radius:14px; width:100%; max-width:640px;
  padding:28px 30px; box-shadow:0 24px 64px rgba(0,0,0,.32);
  animation:modalIn .18s ease;
}
@keyframes modalIn{ from{ transform:translateY(14px); opacity:0; } to{ transform:none; opacity:1; } }
.modal h3{ font-size:18px; margin-bottom:6px; }
.modal .modal-sub{ font-size:13px; color:var(--text-sub); margin-bottom:16px; }
.summary-list{ font-size:14px; max-height:52vh; overflow-y:auto; }
.summary-list .row{
  display:flex; gap:12px; padding:8px 0;
  border-bottom:1px dashed var(--line);
}
.summary-list .k{ flex:0 0 116px; color:var(--text-sub); font-size:13px; padding-top:2px; }
.summary-list .v{ flex:1; word-break:break-word; font-weight:500; }
.modal-actions{
  display:flex; justify-content:flex-end; gap:12px; margin-top:22px;
}
.modal-actions .btn{ min-width:110px; }

/* ============ 完成页 ============ */
.done-icon{
  width:86px;height:86px;border-radius:50%;
  background:linear-gradient(135deg,#16A34A,#0EA5A7);
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 20px; font-size:42px; color:#fff;
}
.center-text{ text-align:center; }

/* ============ 后台 ============ */
.login-box{
  max-width:400px; margin:80px auto;
  background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:34px;
  box-shadow:0 10px 30px rgba(17,24,39,.08);
}
.login-box h1{ font-size:20px; text-align:center; margin-bottom:22px; }
.filter-bar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:18px; }
.filter-tab{
  padding:7px 16px; border-radius:999px; border:1px solid var(--line);
  background:#fff; font-size:13px; cursor:pointer; transition:all .15s;
}
.filter-tab.on{ background:var(--navy); color:#fff; border-color:var(--navy); }
.search-box{ flex:1; min-width:180px; }
.stat-cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:20px; }
.stat-card{ background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px 18px; }
.stat-card .num{ font-size:26px; font-weight:800; color:var(--navy); }
.stat-card .t{ font-size:12px; color:var(--text-sub); margin-top:2px; }
.badge{
  display:inline-block; padding:2px 10px; border-radius:999px;
  font-size:12px; font-weight:600;
}
.badge-new{ background:#EFF4FF; color:var(--blue); }
.badge-replied{ background:#E6F7F7; color:#0E7C86; }
.badge-archived{ background:#F3F4F6; color:var(--text-sub); }

/* ============ 页脚 ============ */
.site-footer{
  border-top:1px solid var(--line);
  padding:22px 20px; text-align:center;
  font-size:12px; color:var(--text-sub);
}

/* ============ 后台详情：摘要条 + 分组网格 ============ */
.summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:12px;
}
.sum-item{
  background:#F8FAFF; border:1px solid var(--line);
  border-radius:10px; padding:12px 16px;
}
.sum-item .sum-k{
  font-size:12px; color:var(--text-sub); margin-bottom:4px;
}
.sum-item .sum-v{
  font-size:15px; font-weight:700; color:var(--navy);
  word-break:break-word;
}
.detail-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:0 24px;
}
@media (max-width:640px){
  .detail-grid{ grid-template-columns:1fr; }
}
.field-item{
  border-bottom:1px solid var(--line);
  padding:12px 2px;
}
.field-item .field-label{
  font-size:12px; color:var(--text-sub); margin-bottom:4px;
}
.field-item .field-value{
  font-size:14px; color:var(--text); font-weight:500;
  word-break:break-word; white-space:pre-wrap; line-height:1.7;
}

/* ============ 通用工具 ============ */
.mt-16{ margin-top:16px; } .mt-24{ margin-top:24px; }
.text-sub{ color:var(--text-sub); font-size:13px; }
.text-danger{ color:var(--danger); }
strong{ font-weight:700; }
