/* ==========================================================================
   青田县「出海一件事」智能服务平台 · 原型样式
   ========================================================================== */

:root {
  --brand:      #1B4B7A;
  --brand-dk:   #143A5E;
  --brand-lt:   #EEF4FA;
  --brand-line: #D3E0EC;
  --ink:        #1A2530;
  --ink-2:      #3B4A58;
  --ink-3:      #66757F;
  --ink-4:      #8B98A3;
  --line:       #E2E8ED;
  --bg:         #F4F6F8;
  --white:      #FFFFFF;
  --red:        #B42318;
  --red-bg:     #FEF3F2;
  --amber:      #B54708;
  --amber-bg:   #FFFAEB;
  --green:      #067647;
  --green-bg:   #ECFDF3;
  --blue:       #175CD3;
  --blue-bg:    #EFF8FF;
  --purple:     #5925DC;
  --purple-bg:  #F4F3FF;
  --radius:     6px;
  --shadow:     0 1px 3px rgba(16, 32, 48, .08), 0 1px 2px rgba(16, 32, 48, .04);
  --shadow-lg:  0 8px 24px rgba(16, 32, 48, .10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------------- 顶部栏 ---------------- */
.topbar {
  height: 56px;
  background: linear-gradient(90deg, var(--brand-dk) 0%, var(--brand) 100%);
  display: flex; align-items: center;
  padding: 0 20px;
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  color: #fff;
}

.topbar .logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15.5px; font-weight: 600; letter-spacing: .3px;
  white-space: nowrap;
}

.topbar .logo .mark {
  width: 26px; height: 26px; border-radius: 5px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

.topbar .logo .sub {
  font-size: 12px; font-weight: 400; opacity: .72;
  padding-left: 10px; margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,.24);
}

.topbar .spacer { flex: 1; }

.roleswitch {
  display: flex; gap: 2px;
  background: rgba(255,255,255,.12);
  border-radius: 5px; padding: 2px;
}

.roleswitch button {
  border: 0; background: transparent; color: rgba(255,255,255,.78);
  font-size: 12.5px; padding: 5px 12px; border-radius: 4px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.roleswitch button:hover { color: #fff; background: rgba(255,255,255,.1); }
.roleswitch button.on { background: #fff; color: var(--brand); font-weight: 600; }

.topbar .user {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; opacity: .92; margin-left: 16px;
}
.topbar .user .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px;
}

.topbar .home-btn {
  margin-left: 14px; font-size: 12.5px; color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.26); padding: 4px 10px; border-radius: 4px;
}
.topbar .home-btn:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }

/* ---------------- 布局 ---------------- */
.layout { display: flex; padding-top: 56px; min-height: 100vh; }

.sidebar {
  width: 224px; flex: 0 0 224px;
  background: var(--white);
  border-right: 1px solid var(--line);
  position: fixed; top: 56px; bottom: 0; left: 0;
  overflow-y: auto;
  padding: 12px 0 40px;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #CBD5DD; border-radius: 3px; }

.nav-group { margin-bottom: 4px; }

.nav-group > .nav-title {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px 7px;
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  letter-spacing: .4px;
  margin-top: 6px;
}
.nav-group > .nav-title .ico {
  width: 15px; height: 15px; opacity: .5;
  flex: 0 0 15px;
}
.nav-group > .nav-title .cnt {
  margin-left: auto; font-size: 10.5px; font-weight: 400;
  color: var(--ink-4); background: var(--bg);
  padding: 0 5px; border-radius: 8px; line-height: 15px;
}

.nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px 7px 20px;
  font-size: 13px; color: var(--ink-2);
  cursor: pointer; border-left: 2px solid transparent;
  line-height: 1.45;
}
.nav-item:hover { background: var(--brand-lt); color: var(--brand); text-decoration: none; }
.nav-item.on {
  background: var(--brand-lt); color: var(--brand);
  border-left-color: var(--brand); font-weight: 600;
}
.nav-item .no {
  font-size: 10.5px; color: var(--ink-4); flex: 0 0 16px;
  font-variant-numeric: tabular-nums;
}
.nav-item.on .no { color: var(--brand); opacity: .7; }
.nav-item .tx { flex: 1; }

.main {
  flex: 1; margin-left: 224px;
  padding: 18px 22px 60px;
  min-width: 0;
}

/* ---------------- 面包屑与页头 ---------------- */
.crumb {
  font-size: 12.5px; color: var(--ink-4); margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.crumb a { color: var(--ink-3); }
.crumb .sep { opacity: .5; }

.pagehead {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 16px; box-shadow: var(--shadow);
}
.pagehead h1 {
  margin: 0 0 6px; font-size: 18px; font-weight: 600;
  color: var(--ink); letter-spacing: .2px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pagehead .desc { font-size: 13px; color: var(--ink-3); line-height: 1.7; }
.pagehead .metas { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 2px 8px; border-radius: 3px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-3);
  line-height: 1.6; white-space: nowrap;
}
.chip.lv-L1 { background: #F5F7F9; color: #5C6B78; border-color: #DDE4EA; }
.chip.lv-L2 { background: var(--blue-bg); color: var(--blue); border-color: #C6DEFB; }
.chip.lv-L3 { background: var(--red-bg); color: var(--red); border-color: #FBD5D1; }
.chip.dep { background: #FFF7ED; color: #9A3412; border-color: #FED7AA; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 16px; overflow: hidden;
}
.card > .hd {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.card > .hd h2 {
  margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.card > .hd h2::before {
  content: ''; width: 3px; height: 14px; border-radius: 2px;
  background: var(--brand);
}
.card > .hd .hd-extra { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card > .bd { padding: 18px; }
.card > .bd.tight { padding: 0; }
.card > .ft {
  padding: 12px 18px; border-top: 1px solid var(--line);
  background: #FAFBFC; display: flex; gap: 10px; align-items: center;
}
.card > .ft .spacer { flex: 1; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-family: inherit; font-size: 13px; line-height: 1;
  padding: 8px 16px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-2);
  transition: all .12s;
  white-space: nowrap;
}
.btn:hover { border-color: #C4CFD8; background: #F7F9FA; }
.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  font-weight: 500;
}
.btn.primary:hover { background: var(--brand-dk); border-color: var(--brand-dk); }
.btn.danger { background: var(--white); border-color: #F0B4AE; color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.sm { font-size: 12px; padding: 5px 11px; }
.btn.lg { font-size: 14px; padding: 10px 22px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-lt); }

.btn-link { font-size: 12.5px; color: var(--brand); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* ---------------- 表格 ---------------- */
table.tbl {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
table.tbl th {
  background: #F7F9FA; color: var(--ink-3);
  font-size: 12px; font-weight: 600; text-align: left;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 11px 14px; border-bottom: 1px solid #EDF1F4;
  color: var(--ink-2); vertical-align: top;
}
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #FAFCFD; }
table.tbl td.num { font-variant-numeric: tabular-nums; }
table.tbl .c { text-align: center; }
table.tbl .strong { font-weight: 600; color: var(--ink); }

/* ---------------- 状态标签 ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 1px 7px; border-radius: 3px;
  line-height: 1.65; white-space: nowrap; font-weight: 500;
}
.tag::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .85; flex: 0 0 5px;
}
.tag.no-dot::before { display: none; }
.tag.red     { background: var(--red-bg);    color: var(--red); }
.tag.amber   { background: var(--amber-bg);  color: var(--amber); }
.tag.green   { background: var(--green-bg);  color: var(--green); }
.tag.blue    { background: var(--blue-bg);   color: var(--blue); }
.tag.purple  { background: var(--purple-bg); color: var(--purple); }
.tag.gray    { background: #F2F4F7;          color: #5C6B78; }

/* ---------------- 表单 ---------------- */
.form-row {
  display: flex; gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.form-item { flex: 1 1 260px; min-width: 0; }
.form-item.full { flex: 1 1 100%; }

.form-item label.lb {
  display: block; font-size: 13px; color: var(--ink-2);
  margin-bottom: 6px; font-weight: 500;
}
.form-item label.lb .req { color: var(--red); margin-left: 2px; }
.form-item label.lb .hint {
  font-weight: 400; color: var(--ink-4); font-size: 12px; margin-left: 6px;
}

.inp, .sel, .ta {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--ink);
  border: 1px solid #D5DEE6; border-radius: 4px;
  padding: 8px 11px; background: var(--white);
  line-height: 1.5;
}
.inp:focus, .sel:focus, .ta:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 75, 122, .09);
}
.inp::placeholder, .ta::placeholder { color: #A7B2BC; }
.ta { resize: vertical; min-height: 78px; }
.sel { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2366757F' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.inp.err, .ta.err, .sel.err { border-color: #E8A79F; background: #FFFBFA; }
.err-msg { font-size: 12px; color: var(--red); margin-top: 5px; display: flex; gap: 4px; align-items: flex-start; }
.hint-msg { font-size: 12px; color: var(--ink-4); margin-top: 5px; }

.fieldset-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  margin: 0 0 14px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  display: flex; align-items: center; gap: 8px;
}
.fieldset-title .no {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center;
  flex: 0 0 18px; font-weight: 500;
}

.radio-row, .chk-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card {
  border: 1px solid #D5DEE6; border-radius: 5px; padding: 9px 14px;
  cursor: pointer; font-size: 13px; color: var(--ink-2); background: #fff;
  min-width: 92px; text-align: center;
}
.radio-card:hover { border-color: #B4C4D2; }
.radio-card.on {
  border-color: var(--brand); background: var(--brand-lt);
  color: var(--brand); font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--brand);
}
.radio-card .sub2 { display: block; font-size: 11px; font-weight: 400; color: var(--ink-4); margin-top: 2px; }
.radio-card.on .sub2 { color: var(--brand); opacity: .75; }

/* ---------------- 步骤条 ---------------- */
.steps { display: flex; align-items: flex-start; gap: 0; padding: 4px 0 2px; }
.step { flex: 1; display: flex; align-items: flex-start; gap: 10px; position: relative; }
.step:not(:last-child)::after {
  content: ''; position: absolute; left: 13px; top: 26px;
  width: calc(100% - 20px); height: 1px; background: var(--line);
}
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  background: #fff; border: 1.5px solid #D5DEE6; color: var(--ink-4);
  position: relative; z-index: 1;
}
.step .lbl { font-size: 12.5px; color: var(--ink-4); padding-top: 3px; line-height: 1.4; }
.step.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.step.done .lbl { color: var(--green); }
.step.done:not(:last-child)::after { background: #A6E0BF; }
.step.now .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 3px rgba(27,75,122,.12); }
.step.now .lbl { color: var(--brand); font-weight: 600; }

/* ---------------- 时间轴 ---------------- */
.timeline { padding: 4px 0 4px 4px; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: 8px; top: 20px; bottom: 0;
  width: 1px; background: var(--line);
}
.tl-item:last-child::before { display: none; }
.tl-item .tl-dot {
  width: 17px; height: 17px; border-radius: 50%; flex: 0 0 17px;
  background: #fff; border: 2px solid #D5DEE6; margin-top: 2px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.tl-item.done .tl-dot { border-color: var(--green); background: var(--green); }
.tl-item.done .tl-dot::after { content: ''; width: 6px; height: 3px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg); margin-top: -2px; }
.tl-item.doing .tl-dot { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,75,122,.13); }
.tl-item.todo .tl-dot { border-color: #D5DEE6; background: #fff; }
.tl-body { flex: 1; min-width: 0; }
.tl-body .tl-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tl-body .tl-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tl-item.todo .tl-body .tl-name { color: var(--ink-4); font-weight: 500; }
.tl-body .tl-org { font-size: 12px; color: var(--ink-4); }
.tl-body .tl-date { font-size: 12px; color: var(--ink-3); margin-left: auto; font-variant-numeric: tabular-nums; }
.tl-body .tl-note {
  font-size: 12.5px; color: var(--ink-3); margin-top: 4px;
  background: #F8FAFB; border-radius: 4px; padding: 6px 10px;
  border-left: 2px solid var(--line);
}

/* ---------------- KPI ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.kpi .n { font-size: 24px; font-weight: 600; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .n.sm2 { font-size: 20px; }
.kpi .t { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.kpi.red .n { color: var(--red); }
.kpi.amber .n { color: var(--amber); }
.kpi.green .n { color: var(--green); }
.kpi.blue .n { color: var(--brand); }

/* ---------------- 提示条 ---------------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 15px; border-radius: 5px; font-size: 13px;
  line-height: 1.7; margin-bottom: 16px;
  border: 1px solid;
}
.alert .ai { flex: 0 0 16px; font-weight: 700; font-size: 13px; line-height: 1.5; }
.alert.info   { background: var(--blue-bg);   border-color: #C6DEFB; color: #12407E; }
.alert.warn   { background: var(--amber-bg);  border-color: #FBDCA0; color: #7A3D06; }
.alert.danger { background: var(--red-bg);    border-color: #FBD5D1; color: #8E2018; }
.alert.ok     { background: var(--green-bg);  border-color: #A9E2C3; color: #04543A; }
.alert.plain  { background: #F7F9FA;          border-color: var(--line); color: var(--ink-2); }
.alert b { font-weight: 600; }

/* ---------------- 清单结果项 ---------------- */
.mat-group { margin-bottom: 18px; }
.mat-group:last-child { margin-bottom: 0; }
.mat-group > .mg-hd {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 8px 0 9px; border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.mat-group > .mg-hd .cnt { font-weight: 400; font-size: 12px; color: var(--ink-4); }
.mat-group > .mg-hd .src {
  margin-left: auto; font-size: 11.5px; font-weight: 400;
  color: var(--ink-4); background: var(--bg);
  padding: 1px 7px; border-radius: 3px;
}

.mat-item {
  display: flex; gap: 11px; padding: 10px 0;
  border-bottom: 1px dashed #EAEFF3; align-items: flex-start;
}
.mat-item:last-child { border-bottom: 0; }
.mat-item .mi-no {
  flex: 0 0 22px; font-size: 11.5px; color: var(--ink-4);
  font-variant-numeric: tabular-nums; padding-top: 1px;
}
.mat-item .mi-main { flex: 1; min-width: 0; }
.mat-item .mi-name { font-size: 13px; color: var(--ink); font-weight: 500; }
.mat-item .mi-name .opt {
  font-size: 11px; font-weight: 400; color: var(--ink-4);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 0 4px; margin-left: 6px; vertical-align: 1px;
}
.mat-item .mi-note { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.65; }
.mat-item .mi-flag { flex: 0 0 auto; }

/* ---------------- 折叠 ---------------- */
details.fold { border: 1px solid var(--line); border-radius: 5px; margin-bottom: 10px; background: #fff; }
details.fold > summary {
  padding: 10px 14px; cursor: pointer; font-size: 13px;
  font-weight: 500; color: var(--ink-2); list-style: none;
  display: flex; align-items: center; gap: 8px;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before {
  content: '▸'; font-size: 10px; color: var(--ink-4);
  transition: transform .15s; display: inline-block;
}
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary:hover { background: #FAFCFD; }
details.fold > .fold-bd { padding: 4px 14px 14px; border-top: 1px solid var(--line); }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs .tab {
  padding: 9px 16px; font-size: 13px; color: var(--ink-3);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs .tab:hover { color: var(--brand); }
.tabs .tab.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------------- 对比矩阵 ---------------- */
table.compare { width: 100%; border-collapse: collapse; font-size: 13px; }
table.compare th, table.compare td {
  border: 1px solid var(--line); padding: 10px 12px; text-align: center;
  vertical-align: middle;
}
table.compare thead th {
  background: #F7F9FA; font-size: 12.5px; color: var(--ink-2);
  font-weight: 600;
}
table.compare tbody th {
  text-align: left; background: #FCFDFE; font-weight: 500;
  color: var(--ink-2); font-size: 12.5px; white-space: nowrap;
}
table.compare td.best { background: #F0FAF4; }
table.compare td.best .v { color: var(--green); font-weight: 600; }
table.compare .unit { font-size: 11px; color: var(--ink-4); margin-left: 2px; }
table.compare td.worst .v { color: var(--red); }

/* ---------------- AI 对话 ---------------- */
.chat-wrap {
  display: flex; flex-direction: column; min-height: 300px;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #F7F9FB;
}
.chat-head {
  padding: 11px 16px; background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.chat-head .bot {
  width: 30px; height: 30px; border-radius: 6px;
  background: linear-gradient(135deg, var(--brand), #2E7BC4);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.chat-head .nm { font-size: 13.5px; font-weight: 600; }
.chat-head .st { font-size: 11.5px; color: var(--green); display: flex; align-items: center; gap: 4px; }
.chat-head .st::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

.chat-body { flex: 1; overflow: visible; padding: 18px 18px 8px; }
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: #CBD5DD; border-radius: 3px; }

.msg { display: flex; gap: 10px; margin-bottom: 18px; }
.msg .av {
  width: 30px; height: 30px; border-radius: 6px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600;
}
.msg.bot .av { background: linear-gradient(135deg, var(--brand), #2E7BC4); color: #fff; }
.msg.me { flex-direction: row-reverse; }
.msg.me .av { background: #E4EAF0; color: var(--ink-3); }

.bubble {
  max-width: 86%; background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 15px; font-size: 13.5px;
  line-height: 1.82; color: var(--ink-2); box-shadow: var(--shadow);
}
.msg.me .bubble { background: var(--brand); border-color: var(--brand); color: #fff; }
.bubble p { margin: 0 0 9px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ol, .bubble ul { margin: 0 0 9px; padding-left: 20px; }
.bubble li { margin-bottom: 3px; }

.refs {
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line);
}
.refs .refs-t {
  font-size: 11.5px; color: var(--ink-4); margin-bottom: 7px;
  display: flex; align-items: center; gap: 5px;
}
.ref {
  display: block; font-size: 12px; line-height: 1.6;
  background: #F7F9FB; border: 1px solid #E6ECF1; border-radius: 4px;
  padding: 7px 10px; margin-bottom: 6px; color: var(--ink-2);
  border-left: 2px solid var(--brand);
}
.ref:last-child { margin-bottom: 0; }
.ref .rn { font-weight: 600; color: var(--brand); margin-right: 5px; }
.ref .rm { color: var(--ink-4); font-size: 11.5px; margin-top: 2px; }

.chat-input { padding: 12px 16px 14px; background: var(--white); border-top: 1px solid var(--line); }
.chat-input .box {
  display: flex; gap: 9px; align-items: flex-end;
  border: 1px solid #D5DEE6; border-radius: 6px; padding: 7px 7px 7px 12px;
  background: #fff;
}
.chat-input .box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,75,122,.08); }
.chat-input .box textarea {
  flex: 1; border: 0; outline: none; resize: none; font-family: inherit;
  font-size: 13.5px; line-height: 1.6; padding: 5px 0; max-height: 90px; min-height: 24px;
  color: var(--ink);
}
.chat-tips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.chat-tip {
  font-size: 12px; color: var(--ink-3); background: #fff;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 11px; cursor: pointer;
}
.chat-tip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-lt); }

.ai-disclaim {
  font-size: 11.5px; color: var(--ink-4); text-align: center;
  margin-top: 9px; line-height: 1.6;
}

/* ---------------- 手机壳 ---------------- */
.phone-stage {
  display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap;
  justify-content: center; padding: 20px 0 8px;
}
.phone {
  width: 340px; height: 700px; flex: 0 0 340px;
  background: #fff; border-radius: 30px;
  border: 9px solid #1C2530;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.phone .notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 116px; height: 22px; background: #1C2530;
  border-radius: 0 0 14px 14px; z-index: 20;
}
.phone .p-status {
  height: 26px; display: flex; align-items: center; justify-content: space-between;
  padding: 3px 16px 0; font-size: 10.5px; color: var(--ink);
  font-weight: 600; flex: 0 0 26px; background: #fff;
}
.phone .p-head {
  padding: 8px 15px 11px; background: var(--brand); color: #fff;
  display: flex; align-items: center; gap: 9px; flex: 0 0 auto;
}
.phone .p-head .t { font-size: 14.5px; font-weight: 600; }
.phone .p-head .back { font-size: 16px; opacity: .8; width: 14px; }
.phone .p-body { flex: 1; overflow-y: auto; background: #F4F6F8; }
.phone .p-body::-webkit-scrollbar { width: 0; }
.phone .p-tabbar {
  flex: 0 0 52px; background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: center;
}
.phone .p-tabbar .pt {
  flex: 1; text-align: center; font-size: 10px; color: var(--ink-4);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.phone .p-tabbar .pt .pi { font-size: 15px; line-height: 1; opacity: .55; }
.phone .p-tabbar .pt.on { color: var(--brand); font-weight: 600; }
.phone .p-tabbar .pt.on .pi { opacity: 1; }

/* 手机内容元素 */
.m-card { background: #fff; border-radius: 8px; padding: 12px 13px; margin: 10px 11px; }
.m-card.np { padding: 0; overflow: hidden; }
.m-hd { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.m-hd .more { margin-left: auto; font-size: 11px; color: var(--ink-4); font-weight: 400; }
.m-list { }
.m-item {
  display: flex; gap: 9px; padding: 10px 13px; background: #fff;
  border-bottom: 1px solid #EEF2F5; align-items: flex-start;
}
.m-item:last-child { border-bottom: 0; }
.m-item .dotc { width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; flex: 0 0 6px; background: var(--brand); }
.m-item .mc { flex: 1; min-width: 0; }
.m-item .mt { font-size: 12.5px; color: var(--ink); font-weight: 500; line-height: 1.5; }
.m-item .ms { font-size: 11px; color: var(--ink-4); margin-top: 3px; }
.m-item .mr { flex: 0 0 auto; text-align: right; }

.m-banner {
  margin: 11px; padding: 16px 15px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, #2E7BC4 100%);
  color: #fff;
}
.m-banner .bt { font-size: 15px; font-weight: 600; }
.m-banner .bs { font-size: 11.5px; opacity: .86; margin-top: 4px; line-height: 1.6; }

.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 11px; }
.m-grid .gi {
  background: #fff; border-radius: 8px; padding: 12px 4px 10px;
  text-align: center; font-size: 10.5px; color: var(--ink-2);
}
.m-grid .gi .ic {
  width: 30px; height: 30px; border-radius: 8px; margin: 0 auto 6px;
  background: var(--brand-lt); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.m-chat-body { padding: 10px 0; }
.m-msg { display: flex; gap: 7px; padding: 0 11px; margin-bottom: 12px; }
.m-msg .mav { width: 24px; height: 24px; border-radius: 5px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 600; }
.m-msg.bot .mav { background: linear-gradient(135deg, var(--brand), #2E7BC4); color: #fff; }
.m-msg.me { flex-direction: row-reverse; }
.m-msg.me .mav { background: #E4EAF0; color: var(--ink-3); }
.m-bubble {
  max-width: 82%; background: #fff; border-radius: 8px;
  padding: 9px 11px; font-size: 12px; line-height: 1.72; color: var(--ink-2);
}
.m-msg.me .m-bubble { background: var(--brand); color: #fff; }
.m-bubble ol { padding-left: 16px; margin: 5px 0 0; }
.m-bubble li { margin-bottom: 2px; }

/* ---------------- 其他 ---------------- */
.empty {
  text-align: center; padding: 44px 20px; color: var(--ink-4);
}
.empty .e-ic {
  width: 46px; height: 46px; border-radius: 50%; background: #F2F5F7;
  margin: 0 auto 12px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #B6C1CA;
}
.empty .e-t { font-size: 13.5px; color: var(--ink-3); margin-bottom: 4px; }
.empty .e-s { font-size: 12.5px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1180px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.kv { display: flex; flex-direction: column; gap: 0; }
.kv .kv-r {
  display: flex; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed #EAEFF3; font-size: 13px;
}
.kv .kv-r:last-child { border-bottom: 0; }
.kv .kv-k { flex: 0 0 100px; color: var(--ink-4); font-size: 12.5px; }
.kv .kv-v { flex: 1; color: var(--ink-2); }

.diff-line {
  font-size: 12.5px; line-height: 1.75; padding: 8px 11px;
  border-radius: 4px; margin-bottom: 7px;
}
.diff-line.add { background: #F0FAF4; border-left: 2px solid #3F9C6D; color: #10543A; }
.diff-line.mod { background: #FFFAEB; border-left: 2px solid #D4A017; color: #6B4A06; }
.diff-line.del { background: var(--red-bg); border-left: 2px solid #D08078; color: #8E2018; text-decoration: line-through; text-decoration-color: rgba(142,32,24,.4); }
.diff-line .dt { font-weight: 600; margin-right: 5px; }

.proto-bar {
  background: #FFFDF5; border: 1px solid #F0E3B8;
  border-radius: 5px; padding: 9px 14px; font-size: 12.5px;
  color: #6B5A1E; margin-bottom: 14px;
  display: flex; gap: 8px; align-items: flex-start; line-height: 1.7;
}

.mini-note { font-size: 12px; color: var(--ink-4); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 首页 */
.hero {
  background: linear-gradient(120deg, var(--brand-dk) 0%, #1F5C94 55%, #2E7BC4 100%);
  color: #fff; padding: 40px 44px 36px;
  border-radius: 10px; margin-bottom: 22px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -70px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,.055);
}
.hero h1 { margin: 0 0 10px; font-size: 26px; font-weight: 600; letter-spacing: .5px; position: relative; }
.hero .sub { font-size: 14px; opacity: .88; line-height: 1.85; max-width: 760px; position: relative; }
.hero .stats { display: flex; gap: 34px; margin-top: 24px; position: relative; flex-wrap: wrap; }
.hero .stats .st .v { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero .stats .st .k { font-size: 12px; opacity: .8; margin-top: 2px; }

.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 13px; }
.map-card {
  background: #fff; border: 1px solid var(--line); border-radius: 7px;
  padding: 15px 16px; box-shadow: var(--shadow); cursor: pointer;
  transition: all .14s; display: flex; flex-direction: column; gap: 8px;
}
.map-card:hover {
  border-color: var(--brand); box-shadow: var(--shadow-lg);
  transform: translateY(-1px); text-decoration: none;
}
.map-card .mc-top { display: flex; align-items: flex-start; gap: 9px; }
.map-card .mc-no {
  flex: 0 0 26px; height: 26px; border-radius: 5px;
  background: var(--brand-lt); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.map-card .mc-nm { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; flex: 1; }
.map-card .mc-ds { font-size: 12.5px; color: var(--ink-3); line-height: 1.65; flex: 1; }
.map-card .mc-ft { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

.sec-title {
  font-size: 16px; font-weight: 600; color: var(--ink);
  margin: 26px 0 13px; display: flex; align-items: center; gap: 9px;
}
.sec-title .no {
  font-size: 12px; font-weight: 500; color: #fff; background: var(--brand);
  padding: 2px 9px; border-radius: 3px;
}
.sec-title .cnt { font-size: 12.5px; font-weight: 400; color: var(--ink-4); margin-left: auto; }

/* ==========================================================================
   注册地推荐（序号 07）· 权重滑块与得分明细
   落实默认方案 D8：维度权重可调、排名实时重排、得分可验证
   ========================================================================== */
.wgt-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed #EFF3F6; }
.wgt-row:last-child { border-bottom: 0; }
.wgt-n { flex: 0 0 196px; font-size: 12.5px; color: var(--ink); line-height: 1.4; }
.wgt-n span { display: block; font-size: 11px; color: var(--ink-4); margin-top: 2px; font-weight: 400; }
.wgt-row input[type=range] { flex: 1; min-width: 90px; accent-color: #1B4B7A; cursor: pointer; }
.wgt-v { flex: 0 0 78px; text-align: right; font-size: 13px; font-weight: 600; color: var(--brand);
  font-variant-numeric: tabular-nums; }

.rec-item { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px dashed #EAEFF3; align-items: flex-start; }
.rec-item:last-child { border-bottom: 0; padding-bottom: 4px; }
.rec-no { flex: 0 0 34px; height: 34px; border-radius: var(--radius); background: var(--brand-lt);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; }
.rec-no.top { background: var(--brand); color: #fff; }
.rec-score { font-size: 18px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1; }

.rec-dtl { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0 2px; }
.rec-dtl th { text-align: left; font-weight: 500; color: var(--ink-4); font-size: 11px;
  padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rec-dtl td { padding: 6px 8px; border-bottom: 1px solid #F4F7F9; color: var(--ink-2); vertical-align: middle; }
.rec-dtl tr.tot td { font-weight: 600; color: var(--ink); border-bottom: 0; }
.bar { height: 6px; background: #EEF2F5; border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
details.rec-more { margin-top: 7px; }
details.rec-more summary { cursor: pointer; font-size: 12px; color: var(--brand);
  list-style: none; display: inline-flex; align-items: center; gap: 4px; }
details.rec-more summary::-webkit-details-marker { display: none; }
details.rec-more summary::before { content: "▸"; font-size: 10px; }
details.rec-more[open] summary::before { content: "▾"; }
details.rec-more summary:hover { text-decoration: underline; }

/* ==========================================================================
   系统页 · 本模块涉及的澄清疑问条
   ========================================================================== */
.assume-strip { display: flex; align-items: center; gap: 10px; background: #FBFCFD;
  border: 1px solid var(--line); border-left: 3px solid #2F6E9E; border-radius: var(--radius);
  padding: 9px 13px; margin-bottom: 14px; flex-wrap: wrap; }
.assume-strip .as-ico { color: #2F6E9E; font-size: 12px; }
.assume-strip .as-tx { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.assume-strip .as-tx b { color: var(--ink-2); font-weight: 600; }
.assume-strip .as-ids { display: flex; gap: 5px; flex-wrap: wrap; }
.as-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  border: 1px solid var(--brand-line); background: var(--white); color: #2F6E9E;
  border-radius: 3px; padding: 1px 6px; }
.as-chip:hover { background: var(--brand-lt); text-decoration: none; }
.assume-strip .as-more { margin-left: auto; font-size: 12px; color: var(--brand); white-space: nowrap; }
