/* ============================================================
   粤和谐 · AI 矛盾调解工作台 —— 设计系统
   独立设计，未使用任何第三方 UI 框架与素材
   ============================================================ */

:root {
  --brand: #1f5bd6;
  --brand-600: #1a4fbd;
  --brand-700: #143f9a;
  --brand-50: #eff4ff;
  --brand-100: #dde8ff;
  --navy: #0d2148;
  --navy-2: #10294f;
  --navy-3: #16345f;

  --ink: #131c2e;
  --ink-2: #3a4761;
  --ink-3: #6b7891;
  --ink-4: #97a1b4;

  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e6eaf2;
  --line-2: #f0f3f8;

  --ok: #12855e;
  --ok-bg: #e8f6f0;
  --warn: #b4681a;
  --warn-bg: #fdf0e1;
  --danger: #c33f35;
  --danger-bg: #fcecea;
  --info-bg: #eaf1ff;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(19, 28, 46, 0.04), 0 4px 14px rgba(19, 28, 46, 0.045);
  --shadow-2: 0 10px 36px rgba(19, 28, 46, 0.12);
  --sidebar-w: 238px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC',
    'Hiragino Sans GB', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--brand);
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
}
::selection {
  background: var(--brand-100);
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #d3dae7;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b9c3d6;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------------- 登录 ---------------- */
.login {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}
.login-left {
  position: relative;
  background: linear-gradient(155deg, #0b1c3d 0%, #12305c 48%, #1a4a86 100%);
  color: #fff;
  padding: 64px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  right: -180px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 140, 255, 0.28), transparent 68%);
}
.login-left::after {
  content: '';
  position: absolute;
  left: -120px;
  bottom: -180px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 190, 170, 0.16), transparent 66%);
}
.login-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand .logo {
  width: 44px;
  height: 44px;
}
.login-brand b {
  font-size: 19px;
  letter-spacing: 1px;
  font-weight: 600;
}
.login-hero {
  position: relative;
  max-width: 470px;
}
.login-hero h1 {
  font-size: 40px;
  line-height: 1.28;
  letter-spacing: 1px;
  margin: 0 0 18px;
  font-weight: 600;
}
.login-hero h1 em {
  font-style: normal;
  color: #7fb0ff;
}
.login-hero p {
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  line-height: 1.9;
  margin: 0;
}
.login-feats {
  position: relative;
  display: flex;
  gap: 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 26px;
  margin-top: 40px;
}
.login-feats div b {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}
.login-feats div span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}
.login-foot {
  position: relative;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.9;
}
.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff;
}
.login-card {
  width: 100%;
  max-width: 372px;
}
.login-card h2 {
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: 0.5px;
}
.login-card .sub {
  color: var(--ink-3);
  margin: 0 0 30px;
  font-size: 13px;
}
.login-role {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  background: var(--line-2);
  padding: 4px;
  border-radius: 10px;
}
.login-role button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 0;
  border-radius: 8px;
  color: var(--ink-3);
  font-size: 13.5px;
  transition: 0.16s;
}
.login-role button.on {
  background: #fff;
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(19, 28, 46, 0.1);
}
.login-demo {
  margin-top: 24px;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.85;
}
.login-demo b {
  color: var(--brand-700);
}
.login-err {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  margin-top: 10px;
}

/* ---------------- 框架 ---------------- */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(185deg, var(--navy) 0%, #0a1a38 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand .logo {
  width: 34px;
  height: 34px;
  flex: none;
}
.brand-main b {
  display: block;
  font-size: 15px;
  letter-spacing: 1.2px;
  font-weight: 600;
  line-height: 1.35;
}
.brand-main span {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.6px;
}
.nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 10px;
}
.nav::-webkit-scrollbar {
  width: 0;
}
.nav-group {
  margin-bottom: 16px;
}
.nav-group-title {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.32);
  letter-spacing: 1.6px;
  padding: 0 12px 7px;
  font-weight: 500;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  cursor: pointer;
  position: relative;
  transition: background 0.14s, color 0.14s;
  margin-bottom: 1px;
}
.nav-item svg {
  flex: none;
  opacity: 0.72;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(58, 122, 235, 0.32), rgba(58, 122, 235, 0.12));
  color: #fff;
  font-weight: 500;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #5b93ff;
}
.nav-item.active svg {
  opacity: 1;
}
.nav-badge {
  margin-left: auto;
  background: #d94a3d;
  color: #fff;
  font-size: 10.5px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 14px 16px;
}
.sf-tenant {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 10px;
}
.sf-tenant .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #35c48a;
}
.sf-user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sf-user .avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.sf-user b {
  font-size: 12.5px;
  font-weight: 500;
  display: block;
  line-height: 1.3;
}
.sf-user span {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.42);
}
.sf-out {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px;
  border-radius: 6px;
  display: flex;
}
.sf-out:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 58px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.crumb {
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 7px;
}
.crumb b {
  color: var(--ink);
  font-weight: 500;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tenant-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  background: var(--line-2);
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: 0.14s;
}
.icon-btn:hover {
  background: var(--line-2);
  color: var(--ink);
}
.icon-btn .dot-alert {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d94a3d;
  box-shadow: 0 0 0 2px #fff;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.14s;
}
.user-chip:hover {
  background: var(--line-2);
}
.user-chip .avatar {
  width: 28px;
  height: 28px;
  font-size: 11.5px;
}
.user-chip b {
  font-size: 13px;
  font-weight: 500;
}
.user-chip span {
  font-size: 11px;
  color: var(--ink-4);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(140deg, #2f6be0, #1a4bb0);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}
.avatar.green {
  background: linear-gradient(140deg, #17a67c, #0d7a58);
}
.avatar.orange {
  background: linear-gradient(140deg, #e08d34, #b4671a);
}
.avatar.gray {
  background: linear-gradient(140deg, #8b98ad, #66738a);
}

.view {
  padding: 22px 24px 40px;
  flex: 1;
}
.page {
  animation: fadeUp 0.24s ease both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.page-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0 0 3px;
}
.page-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin: 0;
}
.page-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .bar {
  width: 3px;
  height: 13px;
  background: var(--brand);
  border-radius: 2px;
}
.card-extra {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-extra a {
  font-size: 12px;
}
.card-body {
  padding: 18px;
}
.card-body.tight {
  padding: 8px 0 0;
}

.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-2-1 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.grid-1-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
.mt16 {
  margin-top: 16px;
}
.mt12 {
  margin-top: 12px;
}
.mt8 {
  margin-top: 8px;
}
.mb12 {
  margin-bottom: 12px;
}

/* ---------------- KPI ---------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: 0.18s;
}
.kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(19, 28, 46, 0.08);
}
.kpi-label {
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-value {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.kpi-value small {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 4px;
  letter-spacing: 0;
}
.kpi-foot {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.kpi-ico {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kpi-ico.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.kpi-ico.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.kpi-ico.danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.up {
  color: var(--ok);
}
.down {
  color: var(--danger);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  transition: 0.14s;
  white-space: nowrap;
}
.btn:hover {
  border-color: #cfd8e6;
  background: #fbfcfe;
}
.btn:active {
  transform: translateY(0.5px);
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-3);
}
.btn-ghost:hover {
  background: var(--line-2);
  color: var(--ink);
}
.btn-danger {
  color: var(--danger);
  border-color: #f0cdca;
  background: #fff;
}
.btn-danger:hover {
  background: var(--danger-bg);
}
.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 7px;
}
.btn-lg {
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
  border-radius: 9px;
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------------- 表单 ---------------- */
.field {
  margin-bottom: 15px;
}
.label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.label .req {
  color: var(--danger);
  margin-left: 2px;
}
.input,
.select,
.textarea {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: 0.14s;
  font-size: 13.5px;
}
.textarea {
  height: auto;
  padding: 9px 11px;
  line-height: 1.7;
  resize: vertical;
  min-height: 84px;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: #7ea6f0;
  box-shadow: 0 0 0 3px rgba(31, 91, 214, 0.1);
}
.input::placeholder,
.textarea::placeholder {
  color: #aab4c6;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7891' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}
.hint {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 5px;
  line-height: 1.6;
}
.form-row {
  display: grid;
  gap: 14px;
}
.form-row.c2 {
  grid-template-columns: 1fr 1fr;
}
.form-row.c3 {
  grid-template-columns: repeat(3, 1fr);
}
.form-row > *,
.grid > * {
  min-width: 0;
}
.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.checkline input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}
.chip-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  cursor: pointer;
  transition: 0.14s;
  user-select: none;
}
.chip:hover {
  border-color: #c3d3ef;
  color: var(--brand);
}
.chip.on {
  background: var(--brand-50);
  border-color: #b7cdf7;
  color: var(--brand-700);
  font-weight: 500;
}

/* ---------------- 表格 ---------------- */
.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-3);
  font-size: 12px;
  background: #fafbfd;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.table tbody tr {
  transition: background 0.12s;
}
.table tbody tr:hover {
  background: #fafbfe;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.cell-main {
  font-weight: 500;
  color: var(--ink);
  display: block;
  line-height: 1.45;
}
.cell-sub {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 2px;
  display: block;
}
.mono {
  font-variant-numeric: tabular-nums;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 12.5px;
}
.row-actions {
  display: flex;
  gap: 2px;
  white-space: nowrap;
}
.row-actions button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12.5px;
  padding: 3px 7px;
  border-radius: 6px;
}
.row-actions button:hover {
  background: var(--brand-50);
}
.row-actions button.mute {
  color: var(--ink-3);
}
.row-actions button.mute:hover {
  background: var(--line-2);
}

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
  font-weight: 400;
}
.tag.blue {
  background: var(--info-bg);
  color: var(--brand-700);
}
.tag.green {
  background: var(--ok-bg);
  color: var(--ok);
}
.tag.orange {
  background: var(--warn-bg);
  color: var(--warn);
}
.tag.red {
  background: var(--danger-bg);
  color: var(--danger);
}
.tag.gray {
  background: #f1f3f7;
  color: var(--ink-3);
}
.tag.outline {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-3);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex: none;
}
.badge-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}
.badge-level.lv-低 {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-level.lv-中 {
  background: var(--warn-bg);
  color: var(--warn);
}
.badge-level.lv-高 {
  background: #fde9e4;
  color: #b4471f;
}
.badge-level.lv-危 {
  background: #f9dcd9;
  color: #a5281f;
}

/* ---------------- 工具栏 / 页签 ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.toolbar .grow {
  flex: 1;
}
.search {
  position: relative;
  width: 260px;
}
.search input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px 0 32px;
  outline: none;
  font-size: 13px;
}
.search input:focus {
  border-color: #7ea6f0;
  box-shadow: 0 0 0 3px rgba(31, 91, 214, 0.1);
}
.search svg {
  position: absolute;
  left: 10px;
  top: 9px;
  color: var(--ink-4);
}
.toolbar .select {
  width: auto;
  min-width: 118px;
  height: 34px;
  font-size: 13px;
}
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
  overflow-x: auto;
}
.tab {
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: 0.14s;
}
.tab:hover {
  color: var(--ink);
}
.tab.on {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 500;
}
.tab .n {
  font-size: 11px;
  background: var(--line-2);
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 4px;
}
.tab.on .n {
  background: var(--brand-50);
  color: var(--brand);
}

/* ---------------- 分页 / 空态 ---------------- */
.pager {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--line-2);
  font-size: 12.5px;
  color: var(--ink-3);
}
.pager .grow {
  flex: 1;
}
.pager button {
  min-width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.pager button.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.pager button:disabled {
  opacity: 0.4;
}
.empty {
  text-align: center;
  padding: 52px 20px;
  color: var(--ink-4);
}
.empty svg {
  opacity: 0.5;
  margin-bottom: 10px;
}
.empty p {
  margin: 0;
  font-size: 13px;
}

/* ---------------- 图表 ---------------- */
.chart {
  width: 100%;
  display: block;
  overflow: visible;
}
.chart .grid-line {
  stroke: var(--line-2);
  stroke-width: 1;
}
.chart .axis-text {
  font-size: 10.5px;
  fill: var(--ink-4);
}
.chart .series-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart .series-line.alt {
  stroke: #17a67c;
  stroke-dasharray: 4 3;
}
.chart .series-area {
  fill: url(#gBrand);
}
.chart .bar {
  fill: #dbe6fb;
  transition: fill 0.14s;
}
.chart .bar.on {
  fill: var(--brand);
}
.legend {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
}
.donut-legend {
  flex: 1;
  display: grid;
  gap: 9px;
}
.donut-legend .row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.donut-legend .row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.donut-legend .row span.n {
  color: var(--ink-4);
  font-size: 11.5px;
}
.hbar-row {
  margin-bottom: 13px;
}
.hbar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.hbar-label b {
  font-variant-numeric: tabular-nums;
}
.hbar-track {
  height: 7px;
  background: var(--line-2);
  border-radius: 5px;
  overflow: hidden;
}
.hbar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #4a80e8, #1f5bd6);
  transition: width 0.5s ease;
}

/* ---------------- 时间线 / 步骤 ---------------- */
.timeline {
  position: relative;
  padding-left: 18px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.tl-item {
  position: relative;
  padding-bottom: 16px;
}
.tl-item:last-child {
  padding-bottom: 0;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c7d3e6;
}
.tl-item.on::before {
  border-color: var(--brand);
  background: var(--brand);
}
.tl-item .t {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.55;
}
.tl-item .s {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 2px;
}

.steps {
  display: grid;
  gap: 8px;
}
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: 0.15s;
}
.step-item:hover {
  border-color: #c9d8f2;
  background: #fbfcff;
}
.step-item.on {
  border-color: #a9c3f3;
  background: var(--brand-50);
}
.step-item.locked {
  opacity: 0.62;
  cursor: not-allowed;
}
.step-no {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #eef1f7;
  color: var(--ink-3);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-weight: 600;
  margin-top: 1px;
}
.step-item.on .step-no {
  background: var(--brand);
  color: #fff;
}
.step-item.passed .step-no {
  background: var(--ok-bg);
  color: var(--ok);
}
.step-item.returned .step-no {
  background: var(--danger-bg);
  color: var(--danger);
}
.step-main {
  flex: 1;
  min-width: 0;
}
.step-title {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-desc {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 2px;
}
.progress {
  height: 6px;
  background: #eef1f7;
  border-radius: 4px;
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4a80e8, #1f5bd6);
  border-radius: 4px;
  transition: width 0.4s;
}

/* ---------------- 侧边抽屉 ---------------- */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(13, 25, 45, 0.34);
  backdrop-filter: blur(1.5px);
  z-index: 240;
  display: flex;
  justify-content: flex-end;
  animation: fade 0.16s;
}
.drawer {
  width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: -14px 0 40px rgba(19, 28, 46, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(18px);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.22s;
}
.drawer-mask.on .drawer {
  transform: none;
  opacity: 1;
}
.drawer-head {
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.drawer-head h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.dw-title {
  flex: 1;
  min-width: 0;
}
.dw-sub {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 22px;
}
.drawer-body::-webkit-scrollbar {
  width: 6px;
}
.drawer-body::-webkit-scrollbar-thumb {
  background: #d9e0ec;
  border-radius: 3px;
}

/* 案件速览卡底部的两个入口 */
.cs-links {
  display: flex;
  gap: 8px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}
.cs-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 29px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s;
}
.cs-link:hover {
  border-color: var(--brand-100);
  background: var(--brand-50);
  color: var(--brand-600);
}
.cs-link svg {
  flex: none;
}
.cs-link .dot-n {
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  font-weight: 600;
}

/* ---- 历史调解 ---- */
.hi-sum {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.hi-sum .cell {
  flex: 1;
  background: #f7f9fd;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 8px 10px;
}
.hi-sum .k {
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.3px;
}
.hi-sum .v {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.hi-sum .v small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 2px;
}
.hi-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.hi-ghead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: #f8fafd;
  border-bottom: 1px solid var(--line-2);
}
.hi-ava {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.hi-gname {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.hi-grole {
  font-size: 10.5px;
  color: var(--ink-4);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.hi-gcount {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-3);
}
.hi-row {
  padding: 9px 11px 10px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.hi-row:last-child {
  border-bottom: 0;
}
.hi-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
}
.hi-date {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  font-weight: 600;
}
.hi-type {
  color: var(--ink-3);
}
.hi-res {
  margin-left: auto;
  font-size: 10.5px;
  padding: 1.5px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.hi-res.green {
  background: var(--ok-bg);
  color: var(--ok);
}
.hi-res.orange {
  background: var(--warn-bg);
  color: var(--warn);
}
.hi-res.red {
  background: var(--danger-bg);
  color: var(--danger);
}
.hi-res.gray {
  background: #f1f3f7;
  color: var(--ink-3);
}
.hi-txt {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-top: 4px;
}
.hi-meta {
  font-size: 10.5px;
  color: var(--ink-4);
  margin-top: 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hi-meta .perf {
  color: var(--ok);
}
.hi-meta .perf.bad {
  color: var(--danger);
}
.hi-empty,
.hi-pending {
  padding: 14px 12px;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.7;
}
.hi-pending {
  background: #fffdf7;
  border-radius: 8px;
  margin: 8px;
  border: 1px dashed #f0dfc2;
}
.hi-note {
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.7;
  margin-top: 4px;
  padding: 8px 10px;
  background: #f8fafd;
  border-radius: 7px;
}

/* ---- 适用法律 ---- */
.spin {
  width: 13px;
  height: 13px;
  border: 2px solid var(--brand-100);
  border-top-color: var(--brand);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.law-type {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.law-type .tag {
  font-size: 11px;
}
.law-sec {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.6px;
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.law-sec:first-of-type {
  margin-top: 4px;
}
.law-sec::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.law-item {
  border-left: 2px solid var(--line);
  padding: 7px 0 7px 10px;
  margin-bottom: 6px;
}
.law-item.key {
  border-left-color: var(--brand);
}
.law-item .li-h {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.law-item .li-law {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.law-item .li-art {
  font-size: 11px;
  color: var(--brand-600);
  background: var(--brand-50);
  border-radius: 4px;
  padding: 0.5px 5px;
  font-variant-numeric: tabular-nums;
}
.law-item .li-text {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.72;
  margin-top: 3px;
}
.law-tip {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.72;
  padding: 7px 10px;
  background: #f7f9fd;
  border-radius: 8px;
  margin-bottom: 6px;
}
.law-tip .n {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ---------------- 弹窗 / 提示 ---------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(13, 25, 45, 0.42);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 0.16s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: pop 0.2s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(6px);
  }
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-head h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
}
.modal-head .x {
  margin-left: auto;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.toast-wrap {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  background: #16233c;
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9px;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.22s;
}
.toast.ok {
  background: #0f6b4d;
}
.toast.err {
  background: #a5281f;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
.notice {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.7;
  background: var(--brand-50);
  color: #2a4a86;
  border: 1px solid #dbe7fd;
}
.notice.warn {
  background: var(--warn-bg);
  color: #8a5314;
  border-color: #f3ddc2;
}
.notice.danger {
  background: var(--danger-bg);
  color: #97281f;
  border-color: #f3d2ce;
}
.notice.ok {
  background: var(--ok-bg);
  color: #0b6647;
  border-color: #c9ecdd;
}
.notice b {
  font-weight: 600;
}

/* ---------------- 全屏调解工作台 ---------------- */
.wb {
  position: fixed;
  inset: 0;
  background: #eef2f9;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.wb-top {
  height: 56px;
  background: #0d2148;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  flex: none;
}
.wb-top .back {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wb-top .back:hover {
  background: rgba(255, 255, 255, 0.16);
}
.wb-title {
  min-width: 0;
}
.wb-title b {
  display: block;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46vw;
}
.wb-title span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}
.wb-clock {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}
.rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(217, 74, 61, 0.16);
  color: #ff9c92;
  padding: 4px 9px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.rec i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5a4a;
  animation: blink 1.2s infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
.wb-body {
  flex: 1;
  display: grid;
  /* 三栏常规比例：左栏（案情/风险/提纲）随视口在 204–272px 间收放，
     中栏（实时转写）为主区取最宽，右栏（类型/要点/材料）为操作区，中:右 ≈ 1.4 : 1。
     窄屏与平板的改版式见文末响应式段。 */
  --wb-left: clamp(262px, 21vw, 300px);
  grid-template-columns: var(--wb-left) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  min-height: 0;
}
.wb-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
/* 左栏固定四张卡（案情+类型 / 案例风险 / 人员风险 / 提纲），内容超长时整栏滚动，
   而不是把某张卡压到只剩一条 */
.wb-col:first-child {
  overflow-y: auto;
  padding-right: 2px;
}
.wb-col:first-child .wb-panel-head h4 {
  white-space: nowrap;
  flex: none;
}
/* 左栏窄（≤1450）：人员研判卡抬头只留标题 + 一句话结论，计数让到正文里，
   否则「人员风险研判」会被右侧徽章挤掉 */
@media (max-width: 1450px) {
  .wb-col:first-child #prProgress {
    display: none;
  }
}
.wb-panel {
  background: #fff;
  border: 1px solid #e2e8f3;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: 0 1px 3px rgba(19, 28, 46, 0.04);
}
.wb-panel-head {
  padding: 9px 13px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.wb-panel-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.wb-panel-head .n {
  font-size: 11px;
  color: var(--ink-4);
  font-weight: 400;
}
.wb-panel-head .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wb-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  min-height: 0;
}
.wb-panel-foot {
  padding: 10px 12px;
  border-top: 1px solid var(--line-2);
  flex: none;
}

/* ---------------- 开场简报（顶栏下方，默认一行，可展开） ---------------- */
.wb-brief {
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 5px 14px;
  min-height: 34px;
  background: #fff;
  border-bottom: 1px solid #e2e8f3;
}
.bf-k {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #24467f;
  padding: 3px 8px;
  border-radius: 6px;
}
.bf-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.bf-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  font-size: 11.5px;
  color: var(--ink-3);
  background: #f4f7fc;
  border: 1px solid #e6ecf7;
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bf-chip b {
  font-weight: 600;
}
.bf-chip.warn {
  background: #fdf5f4;
  border-color: #f3d2cc;
  color: #b3382b;
}
.bf-tone-green {
  color: #12855e;
}
.bf-tone-orange {
  color: #a9660f;
}
.bf-tone-red {
  color: #b3382b;
}
.bf-tone-gray {
  color: var(--ink-3);
}
.bf-loading,
.bf-none {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-4);
}
.bf-more {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 4px;
  border: 0;
  background: none;
  font-size: 11.5px;
  color: var(--brand);
  cursor: pointer;
}
.bf-more:hover {
  text-decoration: underline;
}
.bf-detail {
  display: none;
  width: 100%;
}
.wb-brief.open .bf-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding-bottom: 6px;
}
.bf-card {
  min-width: 0;
  padding: 9px 11px;
  background: #fbfcff;
  border: 1px solid #e6ecf7;
  border-radius: 9px;
}
.bf-card-h {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.bf-card-b {
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--ink-3);
}
.bf-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bf-lab {
  flex: none;
  min-width: 24px;
  color: var(--ink-4);
}
.bf-sub {
  font-size: 10.5px;
  color: var(--ink-4);
}
.bf-sum {
  margin-top: 5px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--ink-2);
}
.bf-open {
  display: flex;
  gap: 6px;
  padding: 1px 0;
}
.bf-od {
  flex: none;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.bf-ot {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bf-ot b {
  color: #a9660f;
}
.bf-empty {
  color: var(--ink-4);
}

/* ---------------- 底部状态条：阶段 / 材料 / 留痕 / 脱敏 ---------------- */
.wb-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 28px;
  padding: 0 14px;
  background: #fff;
  border-top: 1px solid #e2e8f3;
  font-size: 11px;
  color: var(--ink-4);
  overflow: hidden;
}
.wf-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
.wf-cell i {
  font-style: normal;
  color: var(--ink-4);
}
.wf-cell b {
  font-weight: 500;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
}
.wf-cell b.warn {
  color: #b3382b;
}
.wf-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: var(--ink-4);
}

/* ---------------- 转写工具条：按发言人 / 风险词筛选 ---------------- */
.tr-tools {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line-2);
  background: #fbfcff;
  overflow-x: auto;
  scrollbar-width: none;
}
.tr-tools::-webkit-scrollbar {
  display: none;
}
.tr-tools .chip {
  flex: none;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  white-space: nowrap;
  background: #fff;
}
.tr-tools .chip b {
  margin-left: 2px;
  font-weight: 600;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.tr-tools .chip.on b {
  color: var(--brand-700);
}
.tr-tools-sp {
  flex: 1;
  min-width: 4px;
}
.tr-tools .btn {
  flex: none;
  gap: 4px;
}

/* ---------------- 专家求助抽屉 ---------------- */
.ex-new {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 11px 12px;
  background: #fbfcff;
  border: 1px solid #e6ecf7;
  border-radius: 10px;
}
.ex-new-h {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.ex-new .input,
.ex-new .textarea {
  width: 100%;
}
.ex-new .textarea {
  min-height: 64px;
  resize: vertical;
}
.ex-new .btn {
  align-self: flex-end;
}
.ex-sec {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 11.5px;
  color: var(--ink-4);
}
.ex-sec span {
  padding: 1px 6px;
  border-radius: 5px;
  background: #f1f4f9;
  color: var(--ink-3);
}
.ex-item {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
}
.ex-item.done {
  border-color: #d8ebe2;
  background: linear-gradient(180deg, #f8fdfa, #fff 60%);
}
.ex-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}
.ex-topic {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ex-q {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}
.ex-meta {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-4);
}
.ex-reply {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--brand-50);
}
.ex-rh {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-700);
}
.ex-rb {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

/* 案件速览 · 当事人行：角色不换行，名字在有空间时单行、窄栏内折行 */
.pt-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  padding: 3px 0;
  flex-wrap: wrap;
}
.pt-role {
  color: var(--ink-4);
  white-space: nowrap;
  flex: none;
}
.pt-name {
  color: var(--ink);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.pt-list {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.pt-unv {
  padding: 2px 5px;
  font-size: 10px;
  flex: none;
}
.case-meta {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 7px;
}

/* ---------- 人员风险研判 ---------- */
.pr {
  padding: 6px 8px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  margin-bottom: 6px;
  background: #fff;
}
.pr:last-child {
  margin-bottom: 0;
}
.pr.lv-high {
  border-color: #f0c3bb;
  background: linear-gradient(180deg, #fdf5f4, #fff 60%);
}
.pr.lv-mid {
  border-color: #f0dcbc;
  background: linear-gradient(180deg, #fdfaf3, #fff 60%);
}
.pr.pending {
  border-style: dashed;
  background: #fbfcff;
}
.pr-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.pr-name {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  line-height: 1.35;
  /* 名字单独占行：左栏加宽后「某物业服务有限公司」这类 11 字全称能一行放下，
     实在放不下再折两行，不截断（截断会丢掉"是哪一家"的关键信息） */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.pr-role {
  font-size: 10.5px;
  color: var(--ink-4);
  flex: none;
}
.pr-metrics .pr-role {
  color: var(--ink-3);
}
.pr-lv {
  margin-left: auto;
  flex: none;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  line-height: 1.5;
}
.pr-lv.low {
  color: #12855e;
  background: #eaf7f1;
}
.pr-lv.mid {
  color: #a9660f;
  background: #fdf2e2;
}
.pr-lv.high {
  color: #b3382b;
  background: #fdecea;
}
.pr-lv.gray {
  color: var(--ink-4);
  background: #f1f4f9;
  font-weight: 500;
}
.pr-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--ink-3);
}
.pr-metrics span {
  white-space: nowrap;
}
.pr-metrics .hot {
  color: #b3382b;
  font-weight: 600;
}
.pr-metrics .sep {
  color: #c3cbd9;
}
.pr-why {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pr-guide {
  margin-top: 5px;
  display: flex;
  gap: 5px;
  font-size: 10.5px;
  line-height: 1.55;
  color: #a3483c;
  background: #fdf3f1;
  border-left: 2px solid #d1553f;
  border-radius: 0 5px 5px 0;
  padding: 5px 7px;
}
.pr-guide span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pr-guide svg {
  flex: none;
  margin-top: 1px;
  color: #c14e2c;
}
.pr-note {
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.55;
}
.pr-btn {
  margin-top: 7px;
  height: 26px;
  font-size: 11.5px;
  padding: 0 10px;
}
.pr-src {
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--ink-4);
  padding: 5px 9px;
}
.risk-btn {
  height: 22px;
  padding: 0 7px;
  font-size: 10.5px;
}

.outline-item {
  display: flex;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: 0.16s;
}
.outline-item:hover {
  background: #fafbfe;
}
.outline-item.hit {
  background: #f3f8f5;
  border-color: #d9ece3;
}
.outline-item.now {
  background: var(--brand-50);
  border-color: #c9dbfa;
}
.oi-no {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #d3dae7;
  color: var(--ink-4);
  font-size: 10.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-top: 2px;
  font-weight: 600;
}
.outline-item.hit .oi-no {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.outline-item.now .oi-no {
  border-color: var(--brand);
  color: var(--brand);
}
.oi-title {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.outline-item.hit .oi-title {
  color: var(--ink-4);
  text-decoration: line-through;
  text-decoration-color: #b7d6c8;
}
.outline-item.now .oi-title {
  color: var(--brand-700);
  font-weight: 500;
}
.oi-hint {
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 2px;
  line-height: 1.55;
}
.oi-hit {
  font-size: 10.5px;
  color: var(--ok);
  margin-top: 3px;
}

/* ---------- 调解类型量表 ---------- */
.type-scale {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
  gap: 6px;
}
.type-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.type-cell:hover {
  border-color: var(--brand);
  background: var(--brand-50);
}
.type-cell .tc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cfd8ea;
  flex: none;
}
.type-cell.on {
  border-color: var(--brand);
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--brand);
}
.type-cell.on .tc-dot {
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 91, 214, 0.14);
}
.type-foot {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.6;
}
.type-foot svg {
  color: var(--ok);
  flex: none;
}

/* ---------- 调解类型：当前类型卡片（点击改判） ---------- */
.type-now {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--brand);
  background: var(--brand-50);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: box-shadow 0.15s, background 0.15s;
}
.type-now:hover {
  box-shadow: 0 2px 10px rgba(31, 91, 214, 0.14);
}
.type-now.pending {
  border-style: dashed;
  border-color: #cdd8ec;
  background: #fbfcff;
}
.type-now .tn-ic {
  width: 27px;
  height: 27px;
  flex: none;
  border-radius: 7px;
  background: #fff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(31, 91, 214, 0.16);
}
.type-now.pending .tn-ic {
  color: var(--ink-4);
  box-shadow: inset 0 0 0 1px var(--line);
}
.type-now .tn-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.type-now .tn-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-700);
  line-height: 1.35;
}
.type-now.pending .tn-label {
  font-size: 13px;
  color: var(--ink-2);
}
.type-now .tn-meta {
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.5;
}
.type-now .tn-edit {
  flex: none;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--brand);
  background: #fff;
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: inset 0 0 0 1px rgba(31, 91, 214, 0.2);
}
.type-now.pending .tn-edit {
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* 类型浮窗 */
.type-pick-tip {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 10px;
}
.type-pick-search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 11px;
  color: var(--ink-4);
}
.type-pick-search .input {
  border: 0;
  height: 36px;
  padding: 0;
  flex: 1;
  box-shadow: none;
}
.type-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  max-height: 46vh;
  overflow-y: auto;
  padding-right: 2px;
}
.type-pick-grid .type-cell {
  justify-content: flex-start;
  padding: 9px 10px;
}
.type-cell.uploading {
  opacity: 0.5;
  pointer-events: none;
}
.type-pick-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-4);
  font-size: 12px;
  padding: 26px 0;
}

/* ---------- 类型要点 / 材料清单 ---------- */
.point-item .oi-title {
  font-size: 12.5px;
}
.plan-empty {
  text-align: center;
  color: var(--ink-4);
  padding: 26px 10px;
}
.plan-empty svg {
  opacity: 0.55;
}
.mreq {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  margin-bottom: 6px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.mreq:hover {
  border-color: var(--line);
  background: #fcfdff;
}
.mreq.done {
  background: #f6fbf8;
  border-color: #dcece4;
}
.mreq.uploading {
  opacity: 0.6;
  pointer-events: none;
}
.mreq-ic {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 7px;
  background: var(--line-2);
  color: var(--ink-4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mreq-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.mreq-main {
  flex: 1;
  min-width: 0;
}
.mreq-title {
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.mreq-hint {
  font-size: 10.8px;
  color: var(--ink-4);
  line-height: 1.5;
  margin-top: 1px;
}
.mreq-act {
  display: flex;
  gap: 4px;
  flex: none;
}
.mreq-act .btn {
  height: 27px;
  padding: 0 8px;
  font-size: 11.5px;
}
.mreq-act .btn-ghost {
  padding: 0 6px;
}

.tr-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tr-row {
  display: flex;
  gap: 10px;
  animation: segIn 0.3s ease both;
}
@keyframes segIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}
.tr-ava {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-weight: 600;
  color: #fff;
  background: #8b98ad;
}
.tr-ava.med {
  background: linear-gradient(140deg, #2f6be0, #1a4bb0);
}
.tr-ava.a {
  background: linear-gradient(140deg, #e08d34, #b4671a);
}
.tr-ava.b {
  background: linear-gradient(140deg, #17a67c, #0d7a58);
}
.tr-main {
  min-width: 0;
  flex: 1;
}
.tr-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-4);
  margin-bottom: 3px;
}
.tr-meta b {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 12px;
}
.tr-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink);
}
.tr-text mark {
  background: #fff1c9;
  color: #8a5a00;
  padding: 0 2px;
  border-radius: 3px;
}
.tr-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--warn);
  background: var(--warn-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}
.tr-empty {
  text-align: center;
  color: var(--ink-4);
  font-size: 12.5px;
  padding: 40px 10px;
}
.wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.wave i {
  width: 2px;
  background: #ff8a7e;
  border-radius: 2px;
  animation: wv 1s infinite ease-in-out;
}
@keyframes wv {
  0%,
  100% {
    height: 4px;
  }
  50% {
    height: 14px;
  }
}

.alert-item {
  border: 1px solid #f0e2ce;
  background: #fffdf9;
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 8px;
}
.alert-item.crit {
  border-color: #f3d2ce;
  background: #fffbfa;
}
.alert-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.alert-word {
  font-size: 12.5px;
  font-weight: 600;
  color: #a13a2c;
}
.alert-cat {
  font-size: 11px;
  color: var(--ink-4);
  margin-left: auto;
}
.alert-advice {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.65;
}
/* 处置指引：研判之后告诉调解员「接下来怎么做」，蓝底与研判区分开 */
.alert-guide {
  margin-top: 6px;
  padding: 6px 8px;
  border-left: 2px solid #7aa2e8;
  background: #f4f8ff;
  border-radius: 0 6px 6px 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #2c4a7c;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.alert-guide b {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  color: #2f62b8;
  background: #e3edff;
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.02em;
}
.alert-guide span {
  min-width: 0;
}
/* 已处置后指引退成中性色，不再抢「待处置」项的注意力 */
.alert-guide.done {
  border-left-color: #c3d3c9;
  background: #f6f8f7;
  color: var(--ink-3);
}
.alert-guide.done b {
  color: var(--ink-4);
  background: #eaeeec;
}
/* 已处置：降饱和 + 左侧绿线，一眼区分「还没管的」和「已经管过的」 */
.alert-item.handled {
  background: #f8fbf9;
  border-color: #e0ece6;
}
.alert-item.handled .alert-word {
  color: var(--ink-2);
}
.alert-item.handled .alert-advice {
  color: var(--ink-3);
}
.alert-state {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 999px;
  flex: none;
  white-space: nowrap;
}
.alert-state.ok {
  color: #12724f;
  background: #e8f5ee;
}
.alert-state.wait {
  color: #a2580f;
  background: #fdf1e0;
}
.alert-basis {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e3ecE7;
  display: flex;
  gap: 5px;
  font-size: 11px;
  line-height: 1.6;
  color: #4c7a63;
}
.alert-basis svg {
  flex: none;
  margin-top: 2px;
  color: #5a9b7c;
}
.similar-item {
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.similar-item:last-child {
  border-bottom: 0;
}
.similar-item .t {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.similar-item .m {
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 3px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.risk-score {
  display: flex;
  align-items: center;
  gap: 14px;
}
.risk-ring {
  position: relative;
  width: 74px;
  height: 74px;
  flex: none;
}
.risk-ring .val {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.risk-ring .val b {
  font-size: 21px;
  line-height: 1;
  font-weight: 600;
}
.risk-ring .val span {
  font-size: 10px;
  color: var(--ink-4);
}
.risk-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.8;
}
.risk-meta b {
  color: var(--ink);
  font-weight: 500;
}

/* ---------------- 调解端（平板横屏专用） ----------------
   设计前提：调解端只在平板横屏使用，不做竖屏降级版式（竖屏给旋转提示）。
   基准尺寸 1024×768 / 1180×820 / 1366×1024：左侧 84px 竖排导航 + 右侧工作区。 */
.pad-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(165deg, #0b1c3d 0%, #12305c 45%, #1a4a86 100%);
  color: #fff;
}
.pad-login-box {
  width: 100%;
  max-width: 392px;
}
.pad {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  background: var(--bg);
  overflow: hidden;
}

/* 竖排导航（替代原手机式底部 tabbar） */
.pad-rail {
  background: linear-gradient(180deg, #0d2148 0%, #123258 58%, #16406f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 calc(12px + env(safe-area-inset-bottom));
  height: 100%;
  min-height: 0;
}
.rail-brand {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  /* 「粤」笔画密，比「和」收缩 1px 更透气 */
  font-size: 17px;
  font-weight: 600;
  flex: none;
  margin-bottom: 16px;
}
.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 8px;
}
.rail-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  padding: 10px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rail-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}
.rail-item.on {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 58px;
}
.rail-foot em {
  font-style: normal;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pad-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  min-height: 0;
}
/* 顶栏：标题 + KPI + 操作，横排一行（替代手机端的头像行 + 问候块） */
.pad-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 11px 22px;
  min-height: 70px;
  background: linear-gradient(150deg, #0d2148, #16406f);
  color: #fff;
}
.pad-title {
  min-width: 0;
  flex: 1 1 auto;
}
.pad-title h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pad-title p {
  margin: 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pad-top-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.pad-top-acts .shift {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-right: 4px;
  white-space: nowrap;
}
.pad-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.pad-ico:hover {
  background: rgba(255, 255, 255, 0.2);
}
/* 五格 KPI（调解端首页，横跨两列）：本月新增 / 本月归档 / 待调解 / 进行中 / 到期未办 */
.kpi-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi-k {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 8px 10px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(19, 28, 46, 0.03);
}
.kpi-k b {
  display: block;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-k span {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-3);
}

/* 内容区：按 tab 切换横屏版式 */
.pad-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 22px calc(18px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
/* 工作台：左侧待办 + 今日安排，右侧在办案件 */
.pad-body.b-home {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0 18px;
  align-content: start;
}
.b-home .home-col {
  min-width: 0;
}
/* 区块计数徽章：今日安排「N 场」、待办提醒「N 项」、在办案件「N 件」 */
.sec-badge {
  font-size: 11px;
  color: var(--ink-3);
  background: var(--line-2);
  border-radius: 999px;
  padding: 1px 8px;
  line-height: 1.7;
  flex: none;
}
/* 今日安排 */
.agenda-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-2);
}
.agenda-row:last-child {
  border-bottom: 0;
}
.ag-time {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  flex: none;
}
.ag-main {
  flex: 1;
  min-width: 0;
}
.ag-title {
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-sub {
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 22px 10px;
  color: var(--ink-4);
  font-size: 12.5px;
}
/* 在办案件：三档筛选 + 行式列表 */
.case-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
}
.case-filters .select {
  height: 32px;
  font-size: 12px;
  padding: 0 8px;
}
.case-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
}
.case-row:last-child {
  border-bottom: 0;
}
.cr-main {
  flex: 1;
  min-width: 0;
}
.cr-title {
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-sub {
  font-size: 11px;
  color: var(--ink-4);
  margin-top: 2px;
}
.cr-link,
.cr-go {
  border: 0;
  background: transparent;
  font-size: 12px;
  padding: 4px 2px;
  white-space: nowrap;
  cursor: pointer;
  flex: none;
}
.cr-link {
  color: var(--ink-3);
}
.cr-link:hover {
  color: var(--ink);
}
.cr-go {
  color: var(--brand);
  font-weight: 500;
}
.cr-go:hover {
  color: var(--brand-600);
}
.todo-row .cr-link {
  margin-left: -2px;
}
/* 待办行右侧的到期/日期标签等宽，让「去处理」竖排对齐 */
.todo-row .tag {
  min-width: 58px;
  justify-content: center;
}
/* 归档列表：按宽度自动多列 */
.pad-body.b-archive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0 14px;
  align-content: start;
}
.pad-body.b-archive > .pad-sec,
.pad-body.b-archive > .empty {
  grid-column: 1 / -1;
}
/* 登记：加宽并左右两栏排字段 */
.pad-body.b-register {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}
.b-register form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  align-items: start;
}
.b-register .reg-c,
.b-register .reg-wide {
  grid-column: 1 / -1;
}
/* 我的：限宽居中 */
.pad-body.b-me {
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
/* 归档详情：左 8 步 / 右核对清单 */
.pad-body.b-arch-detail {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 0 16px;
  align-content: start;
} 
.pad-body.b-arch-detail .ad-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg);
  padding: 6px 0;
}
.pad-body.b-arch-detail .ad-col,
.pad-body.b-arch-detail .ad-side {
  min-width: 0;
}
/* 详情页左侧 8 步收紧，768 高度下尽量一屏看全 */
.b-arch-detail .steps {
  gap: 6px;
}
.b-arch-detail .step-item {
  padding: 9px 13px;
  border-radius: 9px;
}
.b-arch-detail .step-no {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11.5px;
}
.b-arch-detail .step-title {
  font-size: 12.5px;
}
.b-arch-detail .step-desc {
  font-size: 10.5px;
}
.pad-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 2px 10px;
}
.pad-sec h3 {
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}
.pad-sec .more {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-3);
  background: transparent;
  border: 0;
}
.pad-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(19, 28, 46, 0.03);
}
.pad-card.flat {
  padding: 0;
  overflow: hidden;
}
.pc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pc-top .no {
  font-size: 10.5px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.pc-top .tag {
  margin-left: auto;
}
.pc-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 7px;
}
.pc-meta {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--ink-4);
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.pc-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pc-acts {
  display: flex;
  gap: 8px;
}
.pc-acts .btn {
  flex: 1;
}
/* 竖屏提示：调解端只提供横屏版式，竖屏不渲染任何页面内容 */
.rotate-tip {
  display: none;
}
@media (orientation: portrait) {
  body.pad-mode {
    overflow: hidden;
  }
  body.pad-mode #app {
    display: none;
  }
  body.pad-mode .rotate-tip {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: #fff;
    background: radial-gradient(circle at 50% 36%, #16406f 0%, #0b1c3d 72%);
  }
  .rotate-tip h3 {
    font-size: 17px;
    font-weight: 500;
    margin: 12px 0 0;
    letter-spacing: 0.01em;
  }
  .rotate-tip p {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.6);
    margin: 8px 0 0;
    max-width: 330px;
  }
  .rotate-tip .rt-icon svg {
    width: 96px;
    height: 96px;
  }
  .rotate-tip .rt-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.32);
    margin-top: 18px;
    letter-spacing: 0.02em;
  }
  .rotate-tip .rt-dev {
    transform-box: view-box;
    transform-origin: 38px 38px;
    animation: rt-turn 3s ease-in-out infinite;
  }
}
@keyframes rt-turn {
  0%,
  16% {
    transform: rotate(0deg);
  }
  52%,
  78% {
    transform: rotate(90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* 矮横屏（如手机横屏 / 小平板）：收起次要信息，优先保证内容高度 */
@media (orientation: landscape) and (max-height: 620px) {
  .pad {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .rail-brand {
    display: none;
  }
  .rail-nav {
    padding: 0 6px;
  }
  .rail-item {
    padding: 8px 0 6px;
    font-size: 10px;
  }
  .pad-top {
    min-height: 56px;
    padding: 8px 16px;
    gap: 12px;
  }
  .pad-title h2 {
    font-size: 16px;
  }
  .pad-kpis,
  .pad-top-acts .shift {
    display: none;
  }
  .pad-body {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
}
.todo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.todo-row:last-child {
  border-bottom: 0;
}
.todo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.todo-main {
  flex: 1;
  min-width: 0;
}
.todo-main b {
  font-size: 13px;
  font-weight: 500;
  display: block;
  line-height: 1.45;
}
.todo-main span {
  font-size: 11px;
  color: var(--ink-4);
}
.todo-time {
  font-size: 11px;
  color: var(--ink-4);
  white-space: nowrap;
}
.todo-time.over {
  color: var(--danger);
}

/* ---------------- 档案 / 详情 ---------------- */
.kv {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 9px 12px;
  font-size: 13px;
}
.kv dt {
  color: var(--ink-3);
  font-size: 12.5px;
}
.kv dd {
  margin: 0;
  color: var(--ink);
}
.party-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 13px;
  background: #fcfdff;
}
.party-role {
  font-size: 11px;
  color: var(--brand);
  background: var(--brand-50);
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 5px;
}
.party-name {
  font-size: 13.5px;
  font-weight: 500;
}
.mat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}
.mat-item:last-child {
  border-bottom: 0;
}
.mat-ico {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--brand-50);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.mat-main {
  flex: 1;
  min-width: 0;
}
.mat-main b {
  font-size: 12.5px;
  font-weight: 500;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mat-main span {
  font-size: 11px;
  color: var(--ink-4);
}
.check-list {
  display: grid;
  gap: 9px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fafbfd;
  border: 1px solid var(--line-2);
}
.check-row.no {
  background: #fffaf7;
  border-color: #f3e3d2;
}
.check-row .ic {
  flex: none;
  margin-top: 1px;
}
.check-row .note {
  color: var(--warn);
  font-size: 11.5px;
  display: block;
  margin-top: 2px;
}
.judge-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.judge-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  background: #fafbfd;
  cursor: pointer;
}
.judge-head .n {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.judge-head b {
  font-size: 12.5px;
  font-weight: 500;
}
.judge-body {
  padding: 11px 13px;
  display: grid;
  gap: 8px;
}
.judge-line {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.65;
}
.judge-line .k {
  color: var(--ink-4);
  width: 76px;
  flex: none;
}
.judge-line .v {
  color: var(--ink-2);
  flex: 1;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 980px) {
  .shell {
    grid-template-columns: 68px 1fr;
  }
  .brand {
    justify-content: center;
    padding: 16px 8px;
  }
  .brand-main,
  .nav-group-title,
  .nav-item span,
  .sf-user b,
  .sf-user span,
  .sf-tenant span {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 10px;
  }
  .nav-item.active::before {
    display: none;
  }
  .nav-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 9px;
    padding: 2px 4px;
  }
  .grid-2,
  .grid-3,
  .grid-2-1,
  .grid-1-2 {
    grid-template-columns: 1fr;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-left {
    display: none;
  }
}

/* 窄桌面 / 平板横屏（900–1099 宽）：仍是三栏，左栏 248–262（1024 取 258），
   中右按 1.3:1 分剩余宽度，保证 1024×768 这类矮屏也有三栏满高、各栏内部滚动
   覆盖 iPad 横屏 1024/1080、小尺寸笔记本等 */
@media (min-width: 900px) and (max-width: 1099px) {
  .wb-body {
    grid-template-columns: clamp(248px, 25.2vw, 262px) minmax(0, 1.3fr) minmax(0, 1fr);
  }
  /* 左栏加宽到 248–262 后，「人员风险研判」标题与右侧风险标签已能同行放下，
     不再隐藏 #prTag；仅保留标题不折行，避免 900 宽时被挤断 */
  .wb-col:first-child .wb-panel-head h4 {
    white-space: nowrap;
  }
  .wb-panel-head {
    padding: 10px 11px;
  }
  .wb-panel-body {
    padding: 10px 11px;
  }
  .wb-top {
    gap: 10px;
    padding: 0 12px;
  }
  .wb-title span {
    display: none;
  }
  .wb-title b {
    max-width: 34vw;
  }
  /* 1024 这类宽度：简报与底部状态条收紧，把高度让给转写区 */
  .wb-brief {
    padding: 5px 12px;
    gap: 6px;
  }
  .bf-chip {
    font-size: 11px;
    padding: 2px 7px;
  }
  .wb-foot {
    gap: 12px;
    padding: 0 12px;
  }
  .wf-right {
    display: none;
  }
  /* 1024 中栏只有 430 左右：工具条压紧，复制笔录退成图标（title 里有说明） */
  .tr-tools {
    padding: 6px 10px;
    gap: 4px;
  }
  .tr-tools .chip {
    padding: 3px 8px;
    font-size: 11px;
  }
  .tr-tools .ct-txt {
    display: none;
  }
}

/* 平板竖屏且纵向充裕（900–1099 宽，高 ≥1000）：两栏 —— 中栏转写 + 右栏操作，
   左栏（案情/风险/提纲）落到底部并横排三等分
   覆盖 Surface Pro 竖屏 912×1368 等尺寸 */
@media (min-width: 900px) and (max-width: 1099px) and (min-height: 1000px) {
  .wb-body {
    grid-template-columns: minmax(0, 1fr) clamp(300px, 38%, 380px);
    grid-template-rows: minmax(520px, 1fr) auto;
    overflow-y: auto;
  }
  /* 左栏四张卡：两列两行铺在底部，比横排四等分好读（人员风险要放下几条指标） */
  .wb-col:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    padding-right: 0;
  }
  .wb-col:nth-child(1) > .wb-panel {
    flex: none !important;
    min-width: 0;
    max-height: none !important;
  }
  .wb-col:nth-child(1) > .wb-panel > .wb-panel-body {
    max-height: 260px;
    overflow-y: auto;
  }
  .wb-col:nth-child(2) {
    grid-column: 1;
    grid-row: 1;
  }
  .wb-col:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }
}

/* 平板竖屏 / 手机（<900）：单栏纵向堆叠，转写优先；卡片按内容自然展开、整页滚动
   覆盖 iPad 竖屏 768/810/820/834 等尺寸 */
@media (max-width: 899px) {
  .wb-body {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    overflow-y: auto;
    align-content: start;
  }
  .wb-col:nth-child(2) {
    order: 1;
  }
  .wb-col:nth-child(3) {
    order: 2;
  }
  .wb-col:nth-child(1) {
    order: 3;
  }
  .wb-col {
    min-height: 0;
  }
  /* 卡片不再等分剩余高度，改为内容决定高度（内联 flex:1 / max-height 需覆盖） */
  .wb-col > .wb-panel {
    flex: none !important;
    max-height: none !important;
    min-height: 0;
  }
  .wb-col > .wb-panel > .wb-panel-body {
    overflow: visible;
  }
  /* 只有长列表（转写、敏感词）限高内部滚动，其余随内容撑开 */
  #trBody {
    max-height: min(56vh, 520px);
    overflow-y: auto;
  }
  #alertBody {
    max-height: min(44vh, 420px);
    overflow-y: auto;
  }
  .wb-col:nth-child(1) > .wb-panel:first-child .wb-panel-body,
  .wb-col:nth-child(1) > .wb-panel > div {
    overflow: visible;
  }
  .wb-top {
    gap: 8px;
    padding: 0 10px;
  }
  .wb-title b {
    max-width: 40vw;
    font-size: 13px;
  }
  .wb-title span,
  .wb-clock > .tag {
    display: none;
  }
  .wb-clock {
    gap: 8px;
  }
  /* 竖屏 / 手机：简报与状态条横向可滚，不换行堆高度 */
  .wb-brief {
    padding: 5px 10px;
  }
  .bf-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .bf-chips::-webkit-scrollbar {
    display: none;
  }
  .wb-foot {
    gap: 10px;
    padding: 0 10px;
    overflow-x: auto;
  }
  .wf-right {
    display: none;
  }
}
@media (max-width: 720px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .view {
    padding: 16px 14px 30px;
  }
  .page-actions .btn span {
    display: none;
  }
  .search {
    width: 100%;
  }
}
