:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #18202f;
  --text-soft: #5b6475;
  --line: #e5eaf3;
  --primary: #2254f4;
  --primary-soft: rgba(34, 84, 244, 0.12);
  --success: #17a572;
  --warning: #f59e0b;
  --danger: #e5484d;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 84, 244, 0.12);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

#app {
  min-height: 100vh;
}

.page-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── 侧边栏（轻奢深色风） ─── */
.sidebar {
  width: 270px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #0c1220 0%, #111827 50%, #0f172a 100%);
  color: rgba(230, 232, 240, 0.85);
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

/* 顶部微光泽 — 模拟上方光源 */
.sidebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 140px;
  background: radial-gradient(ellipse at 50% -30%, rgba(91,141,239,0.09) 0%, transparent 70%);
  pointer-events: none;
}

/* 自定义滚动条 */
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(91,141,239,0.3); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(91,141,239,0.5); }

/* ─── 品牌区 ─── */
.brand {
  padding: 20px 16px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border-left: 2px solid #5b8def;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-right: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.brand:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
}

.brand:focus-visible {
  outline: 1px solid rgba(91,141,239,0.45);
  outline-offset: -3px;
}

/* 版本号 — 绝对定位右上角 */
.brand-version {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  color: #7ba3f5;
  background: rgba(91,141,239,0.15);
  border-radius: 5px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(91,141,239,0.28);
  line-height: 1.5;
  z-index: 1;
}

.brand h1 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #e8ecf6;
  line-height: 1.3;
}

.brand .brand-sub {
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #c8d4f0;
}

/* 蓝色装饰短横线 — 紧跟标题下方 */
.brand h1::after {
  content: "";
  display: block;
  width: 26px; height: 2px;
  margin-top: 7px;
  background: linear-gradient(90deg, #5b8def, transparent);
  border-radius: 1px;
}

/* 副标题强化 */
.brand-subtitle {
  margin: 8px 0 0 !important;
  color: rgba(200,210,230,0.65) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
  padding-left: 1px;
}

/* ─── 导航列表容器 ─── */
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ─── 新建案件按钮（CTA 蓝边风格） ─── */
.sidebar-new-case-btn {
  width: 100%;
  margin-bottom: 4px;
  background: transparent !important;
  border: 1px solid #5b8def !important;
  color: #fbfcff !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
  position: relative;
  overflow: hidden;
}

.sidebar-new-case-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(91,141,239,0.12), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.sidebar-new-case-btn:hover::before { opacity: 1; }
.sidebar-new-case-btn:hover {
  background: rgba(91,141,239,0.12) !important;
  border-color: #7ba3f5 !important;
  box-shadow: 0 2px 14px rgba(91,141,239,0.2), inset 0 0 12px rgba(91,141,239,0.06);
  transform: translateY(-1px);
}

/* ─── 搜索区 ─── */
.sidebar-search {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

.sidebar-search-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-search-row {
  display: flex;
  gap: 8px;
}

.sidebar-search-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 14, 26, 0.8);
  color: rgba(230,232,240,0.9);
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-search-input:focus {
  outline: none;
  border-color: rgba(91,141,239,0.5);
  box-shadow: 0 0 0 2px rgba(91,141,239,0.1);
}

.sidebar-search-input::placeholder { color: rgba(160,168,185,0.4); }

.sidebar-search-submit,
.sidebar-search-more,
.sidebar-search-item { border: none; }

.sidebar-search-submit {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #5b8def !important;
  color: #a8c4fa;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.18s ease;
}

.sidebar-search-submit:hover {
  background: rgba(91,141,239,0.14) !important;
}

.sidebar-search-hint,
.sidebar-search-meta,
.sidebar-search-empty {
  font-size: 11px;
  line-height: 1.55;
  color: rgba(160,168,185,0.45);
}

.sidebar-search-results { display: grid; gap: 6px; }

.sidebar-search-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(230,232,240,0.85);
  text-align: left;
  transition: background 0.15s ease;
}

.sidebar-search-item:hover { background: rgba(255, 255, 255, 0.08); }
.sidebar-search-item span { font-size: 11.5px; color: rgba(180,188,200,0.55); }
.sidebar-search-item strong { color: #f0ece4; }

.sidebar-search-more {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(91,141,239,0.3) !important;
  color: rgba(123,163,245,0.75);
  text-align: center;
  font-size: 12.5px;
  transition: background 0.15s ease;
}
.sidebar-search-more:hover {
  background: rgba(91,141,239,0.08);
  filter: none;
}

.sidebar-search-item:hover { filter: none; }
.sidebar-search-submit:hover { filter: none; }

/* ─── 导航按钮（三态） ─── */
.nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  background: transparent;
  color: rgba(230,232,240,0.72);
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-left: 2px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.22s ease, transform 0.15s ease, padding-left 0.2s ease;
  position: relative;
}

/* 右箭头 */
.nav-button > span:last-child {
  color: rgba(255,255,255,0.15);
  font-size: 15px;
  transition: color 0.18s ease, transform 0.2s ease;
}

/* Hover 态 */
.nav-button:hover {
  background: rgba(255, 255, 255, 0.045);
  color: rgba(230,232,240,0.9);
  border-left-color: rgba(91,141,239,0.45);
  padding-left: 19px;
  transform: translateX(2px);
}
.nav-button:hover > span:last-child { color: rgba(91,141,239,0.55); }

/* Active 态（当前页面） */
.nav-button.active {
  background: rgba(91,141,239,0.09);
  color: #e8ecf6;
  font-weight: 600;
  border-left-color: #5b8def;
  border-radius: 0 10px 10px 0;
  padding-left: 18px;
  box-shadow: inset 4px 0 8px -4px rgba(91,141,239,0.15);
}
.nav-button.active > span:last-child { color: #7ba3f5; }

/* ─── 底部说明文字（弱化） ─── */
.sidebar-note {
  margin: 0;
  color: rgba(160,168,185,0.35);
  line-height: 1.5;
  font-size: 10.5px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.sidebar-copyright {
  text-align: center;
  letter-spacing: 0.02em;
  color: rgba(160,168,185,0.38);
  font-size: 10px;
  line-height: 1.7;
  user-select: none;
}

.main {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
}

.page-title-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.page-title-link:hover {
  color: var(--primary);
}

.topbar p {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.notification-wrap {
  position: relative;
}

.notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.notification-button.has-update {
  border-color: rgba(34, 84, 244, 0.22);
  background: #f4f8ff;
  color: var(--primary);
}

.notification-button.is-open {
  border-color: rgba(34, 84, 244, 0.3);
  background: #eef4ff;
  color: var(--primary);
}

.notification-icon {
  font-size: 18px;
  line-height: 1;
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 64px));
  padding: 14px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 30;
}

.notification-wrap.is-open .notification-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.notification-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.notification-mark-read {
  flex-shrink: 0;
}

.notification-mark-read:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notification-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}


.notification-item {
  width: 100%;
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
}

.notification-item.is-unread {
  border-color: #cdddff;
  background: #f5f9ff;
}

.notification-item:hover {
  border-color: #cdddff;
  background: #f5f9ff;
}

.notification-item-head {
  align-items: flex-start;
  gap: 10px;
}

.notification-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.notification-status.unread {
  background: rgba(34, 84, 244, 0.12);
  color: var(--primary);
}

.notification-status.read {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.notification-tip,
.notification-empty {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  line-height: 1.6;
}

.notification-tip {
  border: 1px dashed var(--line);
}

.notification-empty {
  border: 1px dashed var(--line);
}


.content-grid {
  display: grid;
  gap: 20px;
  align-items: stretch;
}


.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card.soft {
  background: linear-gradient(135deg, #fafbff 0%, #f7f9fc 100%);
  box-shadow: none;
  border: 1px solid #e8ecf4;
}

/* 新建/编辑页：案件进展卡片内的 .card.soft 增强视觉 */
.card:has(.timeline) .card.soft {
  background: linear-gradient(135deg, #f5f8ff 0%, #fbfcfe 100%);
  border-color: #dce4f3;
  padding-bottom: 6px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-header h3,
.card-header h4 {
  margin: 0;
}

.muted {
  color: var(--text-soft);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef3ff;
  color: var(--primary);
}

.badge.success {
  background: rgba(23, 165, 114, 0.12);
  color: var(--success);
}

.badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.badge.danger {
  background: rgba(229, 72, 77, 0.12);
  color: var(--danger);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3656d4;
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.stat-card-button {
  width: 100%;
  display: block;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.stat-card-button:hover {
  transform: translateY(-2px);
  border-color: #cdddff;
  box-shadow: 0 14px 28px rgba(34, 84, 244, 0.1);
}

.stat-card-button.active {
  border-color: rgba(34, 84, 244, 0.32);
  background: linear-gradient(180deg, #f5f9ff 0%, #eaf1ff 100%);
  box-shadow: 0 14px 30px rgba(34, 84, 244, 0.14);
}

.stat-card strong {
  display: block;
  font-size: 28px;
  margin-top: 10px;
}

.stat-card-tip {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-soft);
}

.dashboard-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-case-card,
.dashboard-case-item {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-case-item:hover {
  transform: translateY(-1px);
  border-color: #cdddff;
}

.dashboard-case-item.active {
  border-color: rgba(34, 84, 244, 0.28);
  background: #f7faff;
  box-shadow: 0 10px 22px rgba(34, 84, 244, 0.08);
}

/* ─── 案件进展：案件信息头（详情页/表单页共用） ─── */
.dashboard-progress-head {
  margin-bottom: 22px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #eef3ff 0%, #f8fafc 45%, #fefbf5 100%);
  position: relative;
  overflow: hidden;
}

.dashboard-progress-head::after {
  content: "";
  position: absolute;
  top: -20px; right: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle at center, rgba(34,84,244,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-progress-head strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
  color: #1a202c;
  letter-spacing: 0.01em;
}

.dashboard-progress-head .small-text {
  line-height: 1.55;
  font-size: 13px;
}

.btn {

  padding: 10px 14px;
  border-radius: 12px;
  background: #eef3ff;
  color: #2846c9;
  font-weight: 600;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.success {
  background: var(--success);
  color: #fff;
}

.btn.warning {
  background: var(--warning);
  color: #fff;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

/* 危险操作——描边按钮（用于删除成员等不可逆操作） */
.btn.danger-outline {
  background: transparent !important;
  border: 1.5px solid var(--danger) !important;
  color: var(--danger) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease !important;
}
.btn.danger-outline:hover {
  background: rgba(220, 53, 69, 0.08) !important;
  box-shadow: 0 2px 10px rgba(220, 53, 69, 0.15);
  transform: translateY(-1px);
}
.btn.danger-outline:active {
  transform: translateY(0);
  box-shadow: none;
}

/* 删除按钮区域（账户卡片底部） */
.account-delete-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(220, 53, 69, 0.2);
}
.account-delete-zone .delete-hint {
  font-size: 11px;
  color: var(--text-secondary);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn.small {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

/* ===== 登录页（参考图风格：深色背景 + 居中大标题 + 横向输入+按钮） ===== */

.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  /* 纯黑底色，让彩虹弧线高对比度显示 */
  background: #000000;
}

/* Canvas 容器 — 预留给 JS 动画 */
.login-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* 半透明叠加层，确保文字可读 */
.login-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
}

.login-content {
  text-align: center;
  max-width: 760px;
  width: 100%;
}

/* 英文标题 — 轻奢极简 */
.login-title-en {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 200;
  letter-spacing: 14px;
  line-height: 1.08;
  color: #ffffff;
  text-transform: uppercase;
  text-indent: 14px;
}

/* 中文副标题 — 克制优雅 */
.login-title-zh {
  margin: 0 0 52px;
  font-size: clamp(14px, 2.2vw, 20px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 8px;
}

/* 输入框 + 登录按钮 一行排列（玻璃拟态风格） */
.login-form-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  max-width: 540px;
  margin: 0 auto;
}

.login-form-row input {
  flex: 1;
  min-width: 0;
  padding: 14px 22px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 15px;
  color: #f0f0f5;
  outline: none;
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

.login-form-row input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.login-form-row input:focus {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(120, 100, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(120, 100, 255, 0.15),
    0 4px 24px rgba(100, 80, 220, 0.18),
    inset 0 1px 2px rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-login-go {
  flex-shrink: 0;
  padding: 14px 32px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 2px !important;
  /* 玻璃拟态底色，比输入框更明显 */
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.20) !important;
  color: #fff !important;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-login-go:hover {
  background: rgba(255, 255, 255, 0.20) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  transform: translateY(-1px);
  box-shadow:
    0 4px 20px rgba(120, 100, 220, 0.18),
    inset 0 1px 2px rgba(255, 255, 255, 0.10);
}

.btn-login-go:active {
  transform: translateY(0) scale(0.97);
  background: rgba(255, 255, 255, 0.16) !important;
}

/* 响应式：小屏下输入框和按钮堆叠 */
@media (max-width: 520px) {
  .login-form-row {
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
  }

  .btn-login-go {
    width: 100%;
    text-align: center;
  }
}

.account-list,
.case-list,
.role-list,
.audit-list {
  display: grid;
  gap: 14px;
}

.recent-cases-scroll {
  overflow-y: auto;
  padding: 6px 4px 6px 4px;
  scrollbar-width: thin;
  scrollbar-color: #c8d0e0 transparent;
  flex: 1 1 0;
  min-height: 420px;
}

.recent-cases-scroll::-webkit-scrollbar {
  width: 5px;
}

.recent-cases-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.recent-cases-scroll::-webkit-scrollbar-thumb {
  background: #c8d0e0;
  border-radius: 3px;
}

.recent-cases-scroll::-webkit-scrollbar-thumb:hover {
  background: #a0aabf;
}

.account-card,
.case-card,
.role-card,
.audit-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.case-card-header,
.flex-between,
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-deadline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.dashboard-deadline-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.35;
  background: #f0f4ff;
  border: 1px solid #dce3f7;
}

.dashboard-deadline-chip .chip-label {
  color: #6b7a99;
  white-space: nowrap;
}

.dashboard-deadline-chip .chip-value {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-deadline-chip.chip-danger {
  background: #fef2f2;
  border-color: #fecaca;
}
.dashboard-deadline-chip.chip-danger .chip-value { color: #dc2626; }
.dashboard-deadline-chip.chip-danger .chip-label { color: #991b1b; }

.dashboard-deadline-chip.chip-warning {
  background: #fffbeb;
  border-color: #fde68a;
}
.dashboard-deadline-chip.chip-warning .chip-value { color: #d97706; }
.dashboard-deadline-chip.chip-warning .chip-label { color: #92400e; }

.dashboard-deadline-chip.chip-overdue {
  background: #f5f5f5;
  border-color: #e5e5e5;
}
.dashboard-deadline-chip.chip-overdue .chip-value { color: #999; }
.dashboard-deadline-chip.chip-overdue .chip-label { color: #aaa; }

/* ===== 案件看板 — 总案件列表卡片优化 ===== */
.dashboard-case-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.dashboard-case-kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dashboard-case-label {
  font-size: 11.5px;
  color: #8896ab;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.dashboard-case-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-case-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f9ff, #fff);
  border-left: 3px solid #a5bdf0;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .dashboard-case-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .dashboard-case-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* 案件列表页 — 关键时间节点行（多标签） */
.dashboard-deadline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.dashboard-deadline-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  background: #f0f2f7;
  color: #6b7a8f;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.4;
}

.dashboard-deadline-chip.deadline-danger {
  background: #fef2f2;
  color: #dc2626;
}

.dashboard-deadline-chip.deadline-warning {
  background: #fffbeb;
  color: #d97706;
}

.dashboard-deadline-chip.deadline-overdue {
  background: #3f4652;
  color: #fff;
  text-decoration: line-through;
  opacity: 0.9;
}

.dashboard-deadline-chip.deadline-ok {
  background: #f0fdf4;
  color: #16a34a;
}

.pin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  color: #c8cdd8;
  border-radius: 6px;
  transition: color 0.15s, transform 0.15s, background 0.15s;
  flex-shrink: 0;
}

.pin-btn:hover {
  background: #f0f2f7;
  color: #f59e0b;
}

.pin-btn.pinned {
  color: #f59e0b;
}

.pin-btn.pinned:hover {
  color: #d97706;
}

/* 详情页悬浮栏中的置顶按钮 */
.detail-pin-btn {
  width: 28px;
  height: 28px;
  font-size: 18px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
}

.detail-pin-btn:hover {
  background: rgba(245,158,11,0.1);
}

.case-card.is-pinned {
  border-color: #fde68a;
  box-shadow: 0 0 0 1px rgba(245,158,11,0.12);
}

/* 展开列表中置顶卡片 — 左侧金色竖条标识 */
.dashboard-case-card.is-pinned {
  position: relative;
  border-left: 3px solid #f59e0b;
}

.dashboard-case-card.is-pinned .case-card-header > div strong::after {
  content: "已置顶";
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: #f59e0b;
  background: #fef3c7;
  padding: 1px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

.deadline-alert-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.08);
  animation: deadlineAlertSlideIn 0.35s ease-out;
}

@keyframes deadlineAlertSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.deadline-alert-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.deadline-alert-text {
  flex: 1 1 0;
  font-size: 14px;
  color: #991b1b;
  line-height: 1.45;
}

.deadline-alert-text strong {
  color: #dc2626;
}

.deadline-alert-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.deadline-alert-close:hover {
  background: rgba(220, 38, 38, 0.15);
  color: #b91c1c;
}

.deadline-alert-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
  line-height: 1.3;
}

.deadline-alert-btn:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  overflow: visible;
}

.field span,
.field label {
  font-size: 13px;
  color: var(--text-soft);
}

.case-name-hero {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(34, 84, 244, 0.18);
  background: linear-gradient(135deg, rgba(34, 84, 244, 0.1), rgba(34, 84, 244, 0.03));
}

.case-name-hero label {
  color: #2846c9;
  font-size: 14px;
  font-weight: 700;
}

.form-hero-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #2846c9;
  margin-bottom: 4px;
}

.case-name-input {
  font-size: 20px;
  font-weight: 700;
  border-color: rgba(34, 84, 244, 0.24);
  background: rgba(255, 255, 255, 0.96);
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  position: relative;
  width: 100%;
  padding: 8px 14px;

  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  color: var(--text);
  min-height: 42px;
  box-sizing: border-box;
}

.multi-select-trigger::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  transition: transform 0.2s ease;
}

.multi-select-trigger:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 84, 244, 0.12);
}

.multi-select.is-open .multi-select-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 84, 244, 0.12);
}

.multi-select.is-open .multi-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.multi-select-trigger-text {
  width: 100%;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 20px;
}

.multi-select-panel {
  position: fixed;
  z-index: 99999;
  display: none;
  padding: 6px 0;
  border-radius: 10px;
  border: 1px solid #d5dde8;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
}

.multi-select.is-open .multi-select-panel {
  display: block;
}

.multi-select-option {
  display: block;
  width: 100%;
  padding: 11px 20px;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  border: none;
  box-sizing: border-box;
  line-height: 1.3;
}

.multi-select-option:hover {
  background: #f4f6fb;
}

.multi-select-option.is-selected {
  color: var(--primary);
  font-weight: 700;
}

.contact-custom-field.is-hidden {
  display: none;
}

.date-trigger-wrap {
  display: grid;
  gap: 10px;
}

.date-trigger-input {
  cursor: pointer;
  background: #fff;
}

.date-trigger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── 版本更新弹窗 ─── */
.changelog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.35);
}

.changelog-overlay[hidden] {
  display: none !important;
}

.changelog-dialog {
  width: min(460px, calc(100vw - 40px));
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.2),
    0 0 1px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: changelogIn 0.25s ease-out;
}

@keyframes changelogIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.changelog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #eff1f6;
}

.changelog-header-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.changelog-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a202c;
}

.changelog-header .changelog-ver-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3361eb, #2558db);
  padding: 2px 9px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.changelog-header .changelog-date {
  font-size: 12px;
  color: #9aa4b2;
}

.changelog-close-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: none;
  background: #f0f2f5;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.17s ease;
  font-size: 16px;
  line-height: 1;
  color: #718096;
}

.changelog-close-btn:hover {
  background: #e1e4ea;
  color: #374151;
}

.changelog-body {
  padding: 16px 22px 20px;
}

.changelog-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.changelog-body li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #374151;
}

.changelog-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3361eb, #5a85f7);
  box-shadow: 0 0 6px rgba(51, 97, 235, 0.3);
}

.changelog-footer {
  padding: 14px 22px 18px;
  text-align: right;
  border-top: 1px solid #f5f6fa;
}

.changelog-footer .btn-primary {
  padding: 8px 28px;
  font-size: 13px;
}

/* ─── 日期时间选择器（按钮式） ─── */
.floating-date-picker {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.25);
}

.floating-date-picker[hidden] {
  display: none !important;
}

.floating-date-picker-card {
  width: min(440px, calc(100vw - 40px));
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.18),
    0 0 1px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

/* 标题栏 */
.picker-header {
  padding: 18px 22px 14px;
}

.picker-header h4 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #1a202c;
  letter-spacing: -0.01em;
}

/* 主体：日期+时间 */
.picker-body {
  padding: 0 22px 12px;
}

.picker-datetime-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.picker-field-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picker-field-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #8b95a8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 2px;
}

.picker-field-display {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fafbfc;
}

.picker-field-display:focus-within {
  border-color: #3361eb;
  box-shadow: 0 0 0 3px rgba(51, 97, 235, 0.12);
  background: #fff;
}

.picker-display-value {
  flex: 1;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: #1a202c;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  min-width: 90px;
}

.picker-hidden-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.picker-field-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #3361eb;
  background: linear-gradient(135deg, #eef2ff, #e8edff);
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  border-left: 1px solid #dce3f5;
}

.picker-field-btn:hover {
  background: linear-gradient(135deg, #dde7ff, #d6e2ff);
  color: #254ee6;
}

.picker-field-btn:active {
  transform: scale(0.97);
  background: #cdd8fa;
}

/* 分隔线 */
.picker-field-sep {
  width: 1px;
  background: linear-gradient(180deg, transparent, #dce3f5, transparent);
  align-self: stretch;
  margin: 22px 0;
  flex-shrink: 0;
}

/* 底部操作区 */
.picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 18px;
  border-top: 1px solid #eff1f6;
  gap: 12px;
}

.picker-footer-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.picker-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-text {
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: #5a6680;
  background: none;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.17s ease;
  line-height: 1.4;
}

.btn-text:hover {
  color: #3361eb;
  background: #f0f3ff;
  border-color: #dce3f5;
}

.btn-text--danger:hover {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

.btn-ghost {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #5a6680;
  background: #f5f6f8;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.17s ease;
}

.btn-ghost:hover {
  background: #eceef3;
  color: #374151;
  border-color: #d1d6df;
}

.btn-primary {
  padding: 7px 22px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #3361eb, #2558db);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.17s ease;
  box-shadow: 0 2px 8px rgba(51, 97, 235, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(51, 97, 235, 0.38);
  background: linear-gradient(135deg, #2754da, #1e4bc7);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(51, 97, 235, 0.3);
}

.form-grid {

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow: visible;
}

.form-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* 看板页：新增进展内联表单 */
.dashboard-inline-form {
  margin: 16px 0 20px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid #dce4f3;
  background: linear-gradient(135deg, #f5f8ff 0%, #fafcff 100%);
  box-shadow: 0 2px 8px rgba(34,84,244,0.04);
  position: relative;
}

.dashboard-inline-form::before {
  content: "";
  position: absolute;
  top: -1px; left: 18px; right: 18px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #7c9cf7, #a5bdf0);
  border-radius: 3px 3px 0 0;
}

.dashboard-inline-form label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  font-size: 13.5px;
}

.dashboard-inline-form textarea {
  min-height: 72px;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-size: 13.5px;
  line-height: 1.65;
}

.dashboard-inline-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34,84,244,0.1);
  outline: none;
}

.dashboard-inline-form .inline-actions {
  margin-top: 10px;
}

.checkbox-grid {

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.checkbox-item input {
  width: auto;
  margin-top: 3px;
}

.table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table th {
  background: #f8fafc;
  color: var(--text-soft);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: none;
}

.content-grid.grid-2 > section.card {
  display: flex;
  flex-direction: column;
}

.dashboard-timeline-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  display: block !important;
  position: relative !important;
  flex: 1 1 0;
  min-height: 0;
}

.dashboard-timeline-scroll::-webkit-scrollbar {
  width: 5px;
}

.dashboard-timeline-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-timeline-scroll::-webkit-scrollbar-thumb {
  background: #c8d0e0;
  border-radius: 3px;
}

.dashboard-timeline-scroll::-webkit-scrollbar-thumb:hover {
  background: #a0aabf;
}

/* ─── 案件进展：时间线（详情页/表单页/看板页共用） ─── */
.timeline {
  display: block !important;
  /* 为左侧竖线和圆点留足空间，防止溢出裁切 */
  padding-left: 10px;
  margin-left: 0;
}

/* 每条时间线：竖线列表样式 */
.timeline-item {
  position: relative;
  padding: 14px 0 20px 26px;
  margin-bottom: 2px;
  border-left: 2px solid #c8d2f0;
  transition: background-color 0.15s ease, border-left-color 0.18s ease;
  /* 防止亚像素抖动导致竖线粗细不均 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.timeline-item::before {
  /* 圆点 */
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary), 0 2px 6px rgba(34,84,244,0.22);
  position: absolute;
  /* 用整数值避免亚像素偏移导致的像素丢失 */
  left: -8px; top: 17px;
  z-index: 1;
  -webkit-font-smoothing: antialiased;
}

.timeline-item:last-child {
  /* 最后一条多留空间，让竖线收尾干净 */
  padding-bottom: 16px;
  margin-bottom: 0;
}

/* 时间线头部：日期（主视觉） */
.timeline-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #1a202c;
  letter-spacing: 0.01em;
  margin-bottom: 5px;
  line-height: 1.45;
}

/* 操作人标签：胶囊样式，与日期明显区分 */
.timeline-item strong .tag-operator {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #2254f4 0%, #4a70e8 100%);
  vertical-align: middle;
  line-height: 1.7;
}

/* 时间线内容文本 */
.timeline-item .muted {
  display: block;
  color: #5a6577;
  font-size: 13.5px;
  line-height: 1.72;
  word-break: break-word;
  white-space: pre-wrap;
  padding-left: 2px;
}

/* 悬停反馈 */
.timeline-item:hover {
  background: rgba(34,84,244,0.025);
  border-left-color: var(--primary);
}

.timeline-item:hover::before {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--primary), 0 3px 10px rgba(34,84,244,0.32);
}

/* 看板页时间线：旧条目淡化效果 */
.timeline-item.is-faded {
  opacity: 0.42;
}

.timeline-item.is-faded strong {
  opacity: 0.65;
}

/* ─── 案件进展：新增进展表单区（详情页） ─── */
#section-progress form[data-form="follow-form"] {
  margin-bottom: 24px !important;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f5f8ff 0%, #fafbff 50%, #fefefe 100%);
  border: 1px solid #dce4f3;
  box-shadow: 0 2px 10px rgba(34,84,244,0.05);
  position: relative;
}

#section-progress form[data-form="follow-form"]::before {
  content: "";
  position: absolute;
  top: -1px; left: 20px; right: 20px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #7c9cf7, #a5bdf0);
  border-radius: 3px 3px 0 0;
}

#section-progress form[data-form="follow-form"] label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
  display: block;
  font-size: 14px;
  letter-spacing: 0.01em;
}

#section-progress form[data-form="follow-form"] textarea {
  border-radius: var(--radius-sm);
  min-height: 80px;
  resize: vertical;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-size: 13.5px;
  line-height: 1.65;
  padding: 12px 14px;
  background: #fff;
}

#section-progress form[data-form="follow-form"] textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34,84,244,0.12), 0 2px 8px rgba(34,84,244,0.06);
  outline: none;
}

.preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.preview-dialog {
  width: min(1000px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
  padding: 24px;
}

.preview-box {
  min-height: 420px;
  border-radius: 18px;
  border: 1px dashed #d6deef;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-box img,
.preview-box iframe {
  width: 100%;
  min-height: 420px;
  border: none;
}

.empty-state,
.status-screen {
  background: var(--panel);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 40px 28px;
  text-align: center;
}

.empty-state strong,
.status-screen h2 {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
}

.status-screen {
  max-width: 700px;
  margin: 80px auto;
}

.status-screen p {
  color: var(--text-soft);
  line-height: 1.8;
}

/* 新建案件页：进展区紧凑空状态提示（不喧宾夺主） */
.progress-empty-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f0f4ff, #fafbff);
  border: 1px dashed #c5d1ea;
  margin-bottom: 16px;
}

.progress-empty-hint .hint-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.progress-empty-hint .hint-text {
  font-size: 12.5px;
  color: #7a869a;
  line-height: 1.5;
}

.kv-list {
  display: grid;
  gap: 10px;
}

.kv-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
}

.kv-item span:first-child {
  color: var(--text-soft);
}

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dbe7ff;
  background: #f4f8ff;
  color: #2846c9;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
}

.form-section-title {
  margin: 0;
  font-size: 18px;
}

.case-subsection {
  margin: 0;
}

/* 分组标题 — 用于详情页/表单内的逻辑分组 */
.kv-group-title,
.form-subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: #3b5998;
  margin: 18px 0 10px;
  padding-left: 12px;
  border-left: 3px solid #3b5998;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

.form-subsection-title:first-of-type,
.kv-group-title:first-of-type {
  margin-top: 6px;
}

/* ===== 表单页 KV 表格（复用详情页 kv-table 结构）===== */
.form-kv-row {
  align-items: center;
}
.kv-form-value {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  position: relative;
  overflow: visible;
}
.kv-form-value input,
.kv-form-value select,
.kv-form-value textarea {
  width: 100%;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}
.kv-form-value textarea {
  resize: vertical;
  min-height: 60px;
}
.kv-form-value .date-trigger-input {
  cursor: pointer;
  background: #fafbfe;
}

/* ===== 详情页紧凑 KV 表格（替代原来的 auto-fill 流式布局）===== */
.kv-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d5dde8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.kv-row {
  display: flex;
  align-items: stretch;
  background: #fff;
  transition: background 0.15s;
}

.kv-row:hover {
  background: #fafbff;
}

.kv-row + .kv-row {
  border-top: 1px solid #eef1f6;
}

.kv-label {
  width: auto;
  min-width: 100px;
  max-width: 190px;
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5d7a;
  background: linear-gradient(135deg, #f1f5f9, #f8fafc);
  border-right: 1px solid #eef2f7;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.2px;
}

.kv-value {
  flex: 1 1 0;
  min-width: 80px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 承办信息 — 固定 3 列卡片布局 */
.agency-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agency-kv-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
}

.agency-kv-item > span {
  color: var(--text-soft);
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.agency-kv-item > strong {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
  word-break: break-all;
}

@media (max-width: 700px) {
  .kv-table {
    grid-template-columns: 1fr;
  }
  .kv-row {
    flex-direction: column;
  }
  .kv-label {
    width: auto;
    border-right: none;
    border-bottom: 1px solid #f0f2f5;
  }

  .agency-contact-grid {
    grid-template-columns: 1fr;
  }

  .form-agency-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 编辑表单 — 承办信息 3 列横排 ===== */
.form-agency-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 4px;
}
.form-agency-contact-grid .field {
  margin-bottom: 0;
}
.form-agency-contact-grid .field label {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 4px;
}
.form-agency-contact-grid .field input,
.form-agency-contact-grid .field select,
.form-agency-contact-grid .field textarea {
  font-size: 13px;
  padding: 8px 10px;
}

@media (max-width: 700px) {
  .form-agency-contact-grid {
    grid-template-columns: 1fr;
  }
}

.kv-item-block {
  align-items: flex-start;
  gap: 12px;
}

.kv-item-block strong {
  flex: 1;
  text-align: right;
  font-weight: 600;
}

.multiline-text {
  white-space: normal;
  line-height: 1.7;
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

/* ===== 详情页悬浮顶部栏 ===== */
.detail-page {
  position: relative;
}

.detail-sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.95);
  /* 移除 backdrop-filter: blur() — 滚动时持续触发像素级模糊重算，性能开销大
     改用半透明纯色背景，视觉效果接近但零额外开销 */
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: -1px;
}

.detail-sticky-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.detail-sticky-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.detail-sticky-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .detail-sticky-header {
    padding: 8px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .detail-sticky-title {
    font-size: 13px;
    max-width: 180px;
  }
  .detail-sticky-right {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ===== 详情页顶部概要卡片 ===== */
.detail-hero {
  background: linear-gradient(135deg, #f0f4ff 0%, #fff 60%);
  border-color: rgba(34, 84, 244, 0.12);
}
.detail-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.detail-hero-head h3 {
  font-size: 22px;
  margin-bottom: 4px;
}
.detail-hero-remark {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.detail-hero-remark strong {
  font-size: 13px;
  color: var(--text-soft);
}
.detail-hero-remark p {
  margin-top: 6px;
  line-height: 1.7;
}

.deadline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.deadline-card {
  display: grid;
  gap: 6px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

/* 卡片左侧色条 */
.deadline-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 3px 0 0 3px;
}

.deadline-card > strong {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.deadline-card > .small-text {
  font-size: 12px;
}

.deadline-card.success {
  border-color: rgba(22, 163, 74, 0.15);
  background: linear-gradient(135deg, #f0fdf4, #fff);
}
.deadline-card.success::before { background: linear-gradient(to bottom, #22c55e, #16a34a); }

.deadline-card.warning {
  border-color: rgba(245, 158, 11, 0.2);
  background: linear-gradient(135deg, #fffbeb, #fff);
}
.deadline-card.warning::before { background: linear-gradient(to bottom, #f59e0b, #d97706); }

.deadline-card.danger {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(135deg, #fef2f2, #fff);
  /* 移除 infinite 动画，改为静态样式（infinite box-shadow 持续消耗 GPU 合成层） */
}
.deadline-card.danger::before { background: linear-gradient(to bottom, #ef4444, #dc2626); }

@keyframes deadlinePulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(239,68,68,0.06); }
  50% { box-shadow: 0 4px 20px rgba(239,68,68,0.15), 0 0 0 1px rgba(239,68,68,0.12); }
}

.deadline-countdown {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.deadline-card.danger .deadline-countdown {
  color: #dc2626;
}

.deadline-card.warning .deadline-countdown {
  color: #d97706;
}

.deadline-card.success .deadline-countdown {
  color: #16a34a;
}

.deadline-countdown.text-muted {
  color: #94a3b8 !important;
  font-weight: 600;
  font-size: 15px;
}

.deadline-card.muted {
  border-color: #e5eaf3;
  background: linear-gradient(135deg, #f8fafc, #fff);
}
.deadline-card.muted::before { background: #cbd5e1; }

.deadline-card.overdue {
  border-color: rgba(100, 116, 139, 0.3);
  background: linear-gradient(135deg, #f1f5f9, #fff);
}
.deadline-card.overdue::before { background: linear-gradient(to bottom, #64748b, #475569); }

.deadline-card.overdue .deadline-countdown {
  color: #475569;
  font-weight: 700;
  text-decoration: line-through;
}

.section-stack {
  display: grid;
  gap: 20px;
}

.small-text {
  font-size: 13px;
}

/* ===== 个人中心页面 ===== */
.profile-page {
  max-width: 960px;
}

/* 顶部身份概要卡片 */
.profile-hero-card {
  background: linear-gradient(135deg, #f0f4ff 0%, #fff 60%);
  border-color: rgba(34, 84, 244, 0.12);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #587eff);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(34, 84, 244, 0.2);
}

.profile-hero-stats {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.profile-stat-item {
  text-align: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  border: 1px solid rgba(34, 84, 244, 0.08);
  min-width: 90px;
}

.profile-stat-item strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.profile-stat-item span {
  display: block;
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

.profile-hero-kv {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.35);
}

.profile-hero-kv .kv-row {
  background: #fff;
}
.profile-hero-kv .kv-label {
  min-width: 100px;
  max-width: 130px;
}

@media (max-width: 700px) {
  .profile-hero-head {
    flex-direction: column;
  }
  .profile-hero-stats {
    width: 100%;
    justify-content: center;
  }
  .profile-hero-kv {
    grid-template-columns: 1fr;
  }
}

/* 权限网格 */
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.permission-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f8ff, #fff);
  border: 1px solid #dce6f7;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.permission-chip:hover {
  transform: translateY(-1px);
  border-color: #c0d3f7;
  box-shadow: 0 4px 12px rgba(34, 84, 244, 0.08);
}

.perm-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(34, 84, 244, 0.08);
  color: var(--primary);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.perm-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.perm-group {
  font-size: 11px;
  color: var(--text-soft);
  background: #eef2f8;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== 权限分组显示 ===== */

/* 1) Checkbox 分组 (账户编辑 / 身份模板表单) */
.perm-grouped-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.perm-group-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px 16px;
  background: #fafbff;
}

.perm-group-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 2px solid #e8edf5;
  width: 100%;
}

.perm-group-icon {
  font-size: 15px;
}

.perm-group-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-soft);
  background: #eef2f8;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.perm-checkbox-inner {
  gap: 8px;
}

.perm-checkbox-inner .checkbox-item {
  background: #fff;
}

/* 2) 标签分组 (身份模板卡片) */
.perm-tag-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perm-tag-group {
  background: #f7f9fc;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid #eaeef5;
}

.perm-tag-group-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.perm-tag-group .tag-list {
  gap: 6px;
}

.perm-tag-group .tag {
  font-size: 11.5px;
  padding: 5px 9px;
}

/* 3) 个人中心分组权限 */
.perm-profile-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}

.perm-profile-group {
  flex: 1 1 calc(33.333% - 11px);
  min-width: 220px;
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid #e3eaf4;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.perm-profile-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 15px;
  background: linear-gradient(135deg, #eef3fa, #f5f8ff);
  border-bottom: 1px solid #e0e8f2;
  flex-shrink: 0;
}

.perm-profile-group-icon {
  font-size: 16px;
  line-height: 1;
}

.perm-profile-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #334a70;
  letter-spacing: 0.3px;
}

.perm-profile-group-count {
  font-size: 11px;
  font-weight: 600;
  color: #8898b0;
  background: rgba(255,255,255,0.85);
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: auto;
  border: 1px solid #e2eaF5;
}

.perm-grid-compact {
  gap: 7px !important;
  padding: 12px 14px;
  /* 组内权限项：默认单列，>=4 项才双列 */
  display: flex;
  flex-direction: column;
}

/* 权限项较多时自动双列，但保持文字不截断 */
.perm-group-items-4plus .perm-grid-compact,
.perm-group-items-5plus .perm-grid-compact,
.perm-group-items-6plus .perm-grid-compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.perm-grid-compact .permission-chip {
  padding: 8px 11px;
  gap: 7px;
  border-radius: 10px;
  background: #fff;
  border-color: #e2eafc;
  min-height: 36px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.perm-grid-compact .permission-chip:hover {
  transform: translateY(-1px);
  border-color: #b8cbe8;
  box-shadow: 0 3px 10px rgba(34, 84, 244, 0.09);
  background: #faffff;
}

.perm-grid-compact .perm-group {
  display: none; /* 分组内不再显示 group 标签 */
}


/* ===== 账户管理页面 ===== */

/* 统计条 */
.account-stats-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f8fafc, #fff);
  border: 1px solid var(--line);
}

.account-stat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.account-stat-chip strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.account-stat-chip span {
  font-size: 12px;
  color: var(--text-soft);
}

.account-stat-chip.active strong { color: var(--success); }
.account-stat-chip.disabled strong { color: var(--danger); }

/* 账户卡片 — 紧凑折叠版 */
.account-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-card:hover {
  border-color: #cdddff;
  box-shadow: 0 4px 14px rgba(34, 84, 244, 0.06);
}

.account-card-disabled {
  opacity: 0.72;
}
.account-card-disabled:hover { opacity: 1; }

/* 紧凑头部 — 一行搞定 */
.account-card-head-compact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  position: relative;
}

.account-card-head-compact:hover {
  background: #fafbff;
}

.account-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #587eff);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(34, 84, 244, 0.16);
}

.avatar-disabled {
  background: linear-gradient(135deg, #94a3b8, #64748b) !important;
  box-shadow: none !important;
}

.account-compact-info {
  flex: 1;
  min-width: 0;
}

.account-compact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-card-name {
  font-size: 15.5px;
  letter-spacing: 0.2px;
}

.self-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 3px;
}

.account-compact-sub {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px !important;
  display: flex;
  align-items: center;
  gap: 5px;
}

.compact-sep { opacity: 0.35; }

/* 右侧展开按钮 */
.account-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 10px;
  background: #f5f7fb;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.account-toggle-btn:hover {
  background: #eef2f8;
  border-color: #c0d3f7;
  color: var(--primary);
}

.toggle-arrow {
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s ease;
  display: inline-block;
}

/* 折叠编辑区 — 默认折叠 */
.account-edit-zone {
  border-top: 1px solid var(--line);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 20px;
  background: linear-gradient(180deg, #fcfdff, #f8fafc);
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
}

/* JS 移除 is-collapsed 后展开 */
.account-edit-zone:not(.is-collapsed) {
  max-height: 1200px; /* 足够大以容纳表单 */
  opacity: 1;
  padding: 18px 20px;
}

/* 快捷信息条 */
.account-quick-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #8896ab;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-form-inner .account-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.account-form-inner .account-form-row .field {
  margin-bottom: 0;
}

.account-form-inner .account-form-row .field label {
  font-size: 12.5px;
  color: var(--text-soft);
}

.account-form-inner .account-form-row .field input,
.account-form-inner .account-form-row .field select {
  font-size: 13px;
  padding: 8px 12px;
}

/* 响应式 */
@media (max-width: 720px) {
  .account-card-head-compact {
    flex-wrap: wrap;
    gap: 10px;
  }
  .account-toggle-btn {
    position: absolute;
    top: 14px;
    right: 14px;
  }
  .account-form-inner .account-form-row {
    grid-template-columns: 1fr;
  }
  .account-stats-bar {
    flex-direction: column;
  }
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .perm-profile-groups {
    flex-direction: column;
    gap: 14px;
  }
  .perm-profile-group {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .perm-group-items-4plus .perm-grid-compact,
  .perm-group-items-5plus .perm-grid-compact,
  .perm-group-items-6plus .perm-grid-compact {
    grid-template-columns: 1fr 1fr;
  }
  .perm-checkbox-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .grid-2,
  .grid-3,
  .stats-grid,
  .form-grid,
  .checkbox-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    overflow-y: visible;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .topbar,
  .card {
    padding: 18px;
  }

  .topbar,
  .case-card-header,
  .row-between,
  .flex-between,
  .kv-item,
  .date-trigger-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .floating-date-picker {
    padding: 16px;
  }

  .picker-datetime-row {
    flex-direction: column;
    gap: 14px;
  }

  .picker-field-sep {
    display: none;
  }

  .case-name-input {
    font-size: 18px;
  }

  .kv-item-block strong {
    text-align: left;
  }
}

