/* ============================================================
   舆情监测与应急处置平台 - 设计系统
   ============================================================ */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-light: #eff6ff;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1f2937;
  --text-sub: #4b5563;
  --muted: #8a94a6;
  --border: #e6e9f0;
  --border-strong: #d5dae5;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warn: #d97706;
  --warn-light: #fffbeb;
  --success: #059669;
  --success-light: #ecfdf5;
  --info: #0891b2;
  --info-light: #ecfeff;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .14);
  --sidebar-w: 216px;
  --topbar-h: 58px;
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; vertical-align: middle; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }

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

.sidebar {
  width: var(--sidebar-w);
  background: #101a2e;
  color: #cbd5e1;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: width .2s;
}

.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex-shrink: 0;
}
.sidebar-brand .logo {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700;
}
.sidebar-brand span { color: #fff; font-size: 14.5px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }

.sidebar-menu { flex: 1; overflow-y: auto; padding: 10px 10px 24px; }
.sidebar-menu::-webkit-scrollbar { width: 5px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 3px; }

.menu-group > .menu-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 8px; color: #c3cddf;
  font-size: 13.5px; cursor: pointer; user-select: none;
  transition: background .15s, color .15s;
}
.menu-group > .menu-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu-group > .menu-item .ico { width: 16px; text-align: center; opacity: .8; font-size: 13px; }
.menu-group > .menu-item .arrow { margin-left: auto; font-size: 10px; opacity: .5; transition: transform .2s; }
.menu-group.open > .menu-item .arrow { transform: rotate(90deg); }
.menu-group.open > .menu-item { color: #fff; }

.menu-sub { display: none; padding: 2px 0 6px 0; }
.menu-group.open .menu-sub { display: block; }
.menu-sub a {
  display: block; padding: 7px 11px 7px 36px; border-radius: 7px;
  color: #97a3b8; font-size: 13px; position: relative;
}
.menu-sub a:hover { color: #fff; background: rgba(255,255,255,.05); }
.menu-sub a.active { color: #fff; background: var(--brand); font-weight: 500; }
.menu-group > .menu-item.active { background: var(--brand); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .page-title { font-size: 15px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .tb-link { color: var(--text-sub); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.topbar .tb-link:hover { color: var(--brand); }
.topbar .badge-dot {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}

.user-menu { position: relative; }
.user-menu > .user-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 5px 9px; border-radius: 8px;
}
.user-menu > .user-btn:hover { background: var(--bg); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand-light);
  color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 600;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown {
  display: none; position: absolute; right: 0; top: 44px; min-width: 148px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 5px; z-index: 40;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown a { display: block; padding: 8px 11px; border-radius: 6px; color: var(--text-sub); font-size: 13px; }
.user-dropdown a:hover { background: var(--bg); color: var(--text); }
.user-dropdown .divider { height: 1px; background: var(--border); margin: 4px 0; }

.content { padding: 18px 22px 40px; flex: 1; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { opacity: .5; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 14.5px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .stat-label { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.stat .stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; }
.stat .stat-extra { font-size: 12px; color: var(--muted); margin-top: 5px; }
.stat.blue .stat-value { color: var(--brand); }
.stat.red .stat-value { color: var(--danger); }
.stat.green .stat-value { color: var(--success); }
.stat.orange .stat-value { color: var(--warn); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-sub);
  font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.btn:hover { border-color: #b9c1d1; color: var(--text); background: #fafbfc; }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-danger { background: #fff; border-color: #f3b8b8; color: var(--danger); }
.btn-danger:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { height: 27px; padding: 0 9px; font-size: 12.5px; border-radius: 6px; }
.btn-lg { height: 40px; padding: 0 22px; font-size: 14.5px; }
.btn-block { width: 100%; }

.link-btn { color: var(--brand); font-size: 12.5px; cursor: pointer; background: none; border: 0; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.link-btn.muted { color: var(--muted); }
.ops { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-item > label { font-size: 13px; color: var(--text-sub); font-weight: 500; }
.form-item > label .req { color: var(--danger); margin-left: 2px; }
.form-tip { font-size: 12px; color: var(--muted); }

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 9px 11px; resize: vertical; line-height: 1.65; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.input::placeholder, .textarea::placeholder { color: #b3bccb; }
.input:disabled, .select:disabled { background: #f7f8fa; color: var(--muted); }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%238a94a6' d='M0 0h10L5 6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 28px; }

.form-actions { display: flex; gap: 10px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--border); }

.search-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.search-bar .input, .search-bar .select { width: 168px; height: 34px; }
.search-bar .input.wide { width: 240px; }
.search-bar .spacer { flex: 1; }

.checkbox, .radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; color: var(--text-sub); }
.checkbox input, .radio input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.check-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 600; color: var(--text-sub); font-size: 12.5px;
  background: #fafbfd; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #f1f3f7; color: var(--text); vertical-align: middle; }
.table tbody tr:hover { background: #fbfcfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .col-op { white-space: nowrap; width: 1%; }
.table .nowrap { white-space: nowrap; }
.table .ellipsis { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .num { font-variant-numeric: tabular-nums; }
.table-empty td { text-align: center; color: var(--muted); padding: 44px 0; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 5px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: #f1f3f7; color: var(--text-sub);
}
.tag-blue { background: var(--brand-light); color: var(--brand); }
.tag-green { background: var(--success-light); color: var(--success); }
.tag-red { background: var(--danger-light); color: var(--danger); }
.tag-orange { background: var(--warn-light); color: var(--warn); }
.tag-cyan { background: var(--info-light); color: var(--info); }
.tag-gray { background: #f1f3f7; color: var(--muted); }

/* ---------------- 分页 ---------------- */
.pager { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager-info { font-size: 12.5px; color: var(--muted); }
.pager-btns { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.pager-btn {
  min-width: 30px; height: 30px; padding: 0 9px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-sub); border: 1px solid var(--border); background: #fff;
}
.pager-btn:hover { border-color: var(--brand); color: var(--brand); }
.pager-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-btn.disabled { color: #c4cbd8; cursor: not-allowed; }
.pager-btn.disabled:hover { border-color: var(--border); color: #c4cbd8; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: none; align-items: flex-start; justify-content: center; z-index: 100;
  padding: 60px 16px; overflow-y: auto;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
  width: 640px; max-width: 100%; animation: modalIn .18s ease-out;
}
.modal.wide { width: 900px; }
.modal.narrow { width: 440px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15px; }
.modal-head .close { margin-left: auto; background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-head .close:hover { color: var(--text); }
.modal-body { padding: 20px; max-height: calc(100vh - 220px); overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 10px 18px; border-radius: 8px; background: #fff; box-shadow: var(--shadow-lg);
  font-size: 13.5px; color: var(--text); border: 1px solid var(--border);
  animation: toastIn .2s ease-out; display: flex; align-items: center; gap: 8px;
}
.toast.ok { border-color: #b7ebd3; background: #f3fdf9; color: #067a55; }
.toast.err { border-color: #f7c5c5; background: #fef5f5; color: #b91c1c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------------- 详情 ---------------- */
.detail-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.detail-table th {
  width: 130px; text-align: left; font-weight: 500; color: var(--muted);
  background: #fafbfd; padding: 11px 14px; border: 1px solid var(--border); vertical-align: top;
}
.detail-table td { padding: 11px 14px; border: 1px solid var(--border); word-break: break-word; }
.doc-title { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 2px; color: #b91c1c; margin: 10px 0 22px; }
.doc-body { font-size: 14.5px; line-height: 2; }
.doc-body p { margin-bottom: 8px; text-indent: 2em; }

/* ---------------- 其余 ---------------- */
.empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 13.5px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; }
.tabs a { padding: 11px 14px; font-size: 13.5px; color: var(--text-sub); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.alert-info { background: var(--brand-light); color: #1e40af; }
.alert-warn { background: var(--warn-light); color: #92400e; }
.alert-danger { background: var(--danger-light); color: #991b1b; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; } .gap8 { gap: 8px; } .gap12 { gap: 12px; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.text-danger { color: var(--danger); }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* ---------------- 登录页 ---------------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-left {
  background: linear-gradient(150deg, #0f1c34 0%, #17305c 55%, #1e4b8f 100%);
  color: #fff; padding: 54px 58px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login-left::after {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, .22), transparent 65%);
  right: -160px; bottom: -180px;
}
.login-left .brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.login-left .brand .logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #06b6d4); display: grid; place-items: center; font-size: 15px; }
.login-hero { margin: auto 0; position: relative; z-index: 2; }
.login-hero h1 { font-size: 33px; line-height: 1.35; letter-spacing: 1px; margin-bottom: 16px; }
.login-hero p { color: rgba(226, 232, 240, .78); font-size: 14.5px; line-height: 1.9; max-width: 460px; }
.login-features { display: flex; gap: 26px; margin-top: 34px; }
.login-features div { font-size: 13px; color: rgba(226, 232, 240, .72); }
.login-features strong { display: block; font-size: 22px; color: #fff; font-weight: 700; margin-bottom: 2px; }
.login-foot { font-size: 12.5px; color: rgba(226, 232, 240, .5); position: relative; z-index: 2; }

.login-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-box { width: 348px; }
.login-box h2 { font-size: 22px; margin-bottom: 6px; }
.login-box .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 7px; }
.login-field .input { height: 42px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row .input { flex: 1; }
.captcha-img { width: 120px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); cursor: pointer; object-fit: cover; }
.login-err { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.login-submit { height: 44px; font-size: 15px; margin-top: 6px; }

@media (max-width: 1080px) {
  .login-page { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { width: 62px; }
  .sidebar-brand span, .menu-item .txt, .menu-item .arrow { display: none; }
  .menu-sub { display: none !important; }
  .main { margin-left: 62px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
}

/* ===== 统计条 / 规则面板 / 级联选择（媒体源 · 地区管理） ===== */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-row .stat { background: var(--bg-soft, #f8fafc); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.inline-row { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-row .select { flex: 1; min-width: 130px; }
.inline-label { font-size: 13px; color: var(--text-sub); }
.static { font-size: 14px; color: var(--text); line-height: 1.7; word-break: break-all; }
.table-plain { border-collapse: collapse; width: 100%; }
.table-plain th, .table-plain td { padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: left; }
.table-plain th { color: var(--muted); font-weight: 500; background: transparent; }
.table-plain tr:last-child td { border-bottom: none; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.rule-title { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; letter-spacing: .2px; }
.run-log { margin-top: 14px; max-height: 220px; overflow: auto; background: #0f172a; color: #cbd5e1;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7;
  padding: 12px 14px; border-radius: var(--radius-sm); }
.run-log > div { white-space: pre-wrap; }

/* ===== 面包屑 / 等宽数字 ===== */
.crumb-bar { display: flex; align-items: center; gap: 6px; padding: 9px 0 12px;
  font-size: 13px; color: var(--text-sub); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.crumb-bar a { color: var(--brand); }
.crumb-bar a:hover { text-decoration: underline; }
.crumb-bar .sep { color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: -.2px; }

/* ===== 表单勾选 / 权限树 / 上传行 / 表格补充 ===== */
.check-line { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text);
  font-weight: 400; cursor: pointer; margin: 0 0 6px 0; }
.check-line input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.check-row .check-line { margin-bottom: 0; }
.upload-row { display: flex; gap: 10px; align-items: center; }
.upload-row .input { flex: 1; }
.divider { border: none; border-top: 1px solid var(--border); margin: 22px 0 18px; }
.plain-list { margin: 0; padding-left: 18px; line-height: 1.9; font-size: 13.5px; color: var(--text); }
.plain-list li { margin-bottom: 2px; }
.table-foot { padding: 10px 2px 0; }
.tree-pad { display: inline-block; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border);
  padding: 12px 16px; display: flex; gap: 10px; border-radius: 0 0 var(--radius) var(--radius); }

/* 权限勾选树 */
.rule-picker { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px;
  max-height: 520px; overflow: auto; background: var(--bg-soft, #fafbfd); }
.rule-group { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.rule-group:last-child { border-bottom: none; }
.rule-group > .rule-parent { font-weight: 600; }
.rule-children { padding-left: 24px; display: flex; flex-direction: column; gap: 2px; }
.rule-children .rule-children { padding-left: 22px; border-left: 1px solid var(--border); margin-left: 4px; }
.rule-children .check-line { margin-bottom: 2px; font-size: 13px; color: var(--text-sub); }

/* ---------------- 通用工具 ---------------- */
.unit { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.ml6 { margin-left: 6px; }
.text-warn { color: var(--warn); }
.row-warn { background: #fffbea; }
.table .text-right { text-align: right; }
.roll-log {
  max-height: 260px; overflow-y: auto; background: #0f1c34; color: #cfe0f7;
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 12.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace; line-height: 1.75;
}
.roll-log .ok { color: #4ade80; }
.roll-log .err { color: #f87171; }

/* ---------------- 流转轨迹 ---------------- */
.flow-list { display: flex; flex-direction: column; gap: 0; }
.flow-item { display: flex; gap: 12px; position: relative; padding: 0 0 18px 0; }
.flow-item:not(:last-child)::before {
  content: ""; position: absolute; left: 6px; top: 16px; bottom: 0;
  width: 2px; background: var(--border, #e5e7eb);
}
.flow-dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 3px;
  background: var(--primary, #2563eb); z-index: 1;
}
.flow-dot.ok { background: #059669; }
.flow-dot.warn { background: var(--warn, #d97706); }
.flow-body { flex: 1; min-width: 0; line-height: 1.7; }

/* ===== 层级 Tab（好声音分级列表） ===== */
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--border, #e8ecf2); margin: 12px 0 4px; flex-wrap: wrap; }
.tab-item { padding: 9px 18px; font-size: 13.5px; color: var(--muted, #6b7686); border-radius: 8px 8px 0 0; text-decoration: none; }
.tab-item:hover { color: var(--primary, #2f6bff); background: #f4f7ff; }
.tab-item.active { color: var(--primary, #2f6bff); font-weight: 600; background: #f4f7ff; border-bottom: 2px solid var(--primary, #2f6bff); margin-bottom: -2px; }

/* ===== 舆情流转增强：提示条 / 处置意见 / 附件 ===== */
.hint-bar { padding: 11px 14px; border-radius: var(--radius-sm); background: var(--brand-light); color: var(--text-sub); font-size: 13px; line-height: 1.7; margin-bottom: 14px; border-left: 3px solid var(--brand); }
.hint-bar.danger { background: var(--danger-light); color: var(--danger); border-left-color: var(--danger); }
.hint-bar .muted { color: var(--muted); }
.flow-dot.bad { background: var(--danger, #dc2626); }
.block-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 7px; }
.sub-block { padding-top: 16px; margin-top: 16px; border-top: 1px dashed var(--border); }
.file-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--border); }
.file-item:last-child { border-bottom: none; }
.file-item a { color: var(--brand); text-decoration: none; }
.file-item a:hover { text-decoration: underline; }
.file-item .link-btn { margin-left: auto; }
