/* 律师工作台视觉主题：克制的深绿、暖白与铜金点缀；不依赖外部字体或组件库。 */
:root {
  --primary: #276b59;
  --primary-hover: #1f5a4a;
  --primary-active: #174739;
  --primary-bg: #e8f2ee;
  --success: #43836b;
  --success-bg: #eaf3ee;
  --warning: #a87935;
  --danger: #bd5c52;
  --danger-bg: #faeeeb;
  --purple: #75638d;
  --purple-bg: #f1edf5;
  --bg: #f3f5f2;
  --card: #fff;
  --border: #e7ebe6;
  --border-strong: #d5ddd6;
  --text: #26342e;
  --text-2: #64736b;
  --text-3: #87938c;
  --text-disable: #b3bdb6;
  --sider-bg: #172b25;
  --sider-text: #aebbb4;
  --sider-text-active: #fff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 10px rgba(25, 48, 38, .035), 0 12px 28px rgba(25, 48, 38, .025);
  --shadow-modal: 0 24px 80px rgba(18, 36, 28, .22);
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .01em;
}

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

.sidebar {
  background: linear-gradient(180deg, #1c342c 0%, #152820 100%);
  box-shadow: 8px 0 30px rgba(27, 48, 39, .05);
}
.sidebar .brand {
  height: 76px;
  padding-inline: 22px;
  border-bottom-color: rgba(255,255,255,.08);
}
.sidebar .brand .logo-badge,
.login-logo .logo-badge {
  background: linear-gradient(145deg, #719580, #315b49);
  box-shadow: 0 8px 20px rgba(16, 39, 29, .24);
}
.sidebar .brand .brand-title { font-size: 14px; letter-spacing: .04em; }
.sidebar .brand .brand-sub { color: #91a69a; letter-spacing: .08em; }
.sidebar .nav { padding: 24px 12px; }
.nav-item {
  position: relative;
  min-height: 44px;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 9px;
  color: #b4c0b9;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(113,149,128,.26), rgba(113,149,128,.12));
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #c8ad7f;
}
.nav-item .nav-ico { opacity: .9; }
.sidebar .sidebar-foot { padding: 18px 20px 20px; }
.user-avatar {
  background: #c2a678;
  color: #1e3028;
  box-shadow: 0 4px 12px rgba(0,0,0,.14);
}

.main { background: var(--bg); }
.topbar {
  height: 68px;
  padding: 0 clamp(18px, 2.4vw, 36px);
  background: rgba(255,255,255,.94);
  border-bottom-color: #e8ece8;
  box-shadow: 0 2px 12px rgba(25,48,38,.025);
  backdrop-filter: blur(14px);
}
.topbar h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: .015em;
}
.content {
  width: 100%;
  max-width: 1760px;
  margin-inline: auto;
  padding: clamp(18px, 2vw, 30px) clamp(18px, 2.4vw, 36px);
}

.card, .cd-block, .stat-card {
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card { padding: clamp(18px, 1.8vw, 26px); }
.grid { gap: 18px; }
.section-title {
  margin-bottom: 17px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .015em;
}
.section-title .sub { color: var(--text-3); }

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(25,48,38,.08);
}
.stat-label { color: var(--text-2); font-size: 12.5px; }
.stat-value { margin-top: 7px; font-size: clamp(26px, 2.2vw, 34px); font-weight: 650; letter-spacing: -.025em; }
.stat-delta { margin-top: 6px; }

.btn {
  min-height: 36px;
  padding: 7px 15px;
  border-radius: 8px;
  font-weight: 550;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #347a65, #276350);
  box-shadow: 0 4px 10px rgba(39,107,89,.14);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2d705c, #205744);
  box-shadow: 0 6px 14px rgba(39,107,89,.2);
  transform: translateY(-1px);
}
.btn-default, .btn-ghost {
  border-color: #dce3dd;
  background: #fff;
}
.btn-default:hover:not(:disabled), .btn-ghost:hover:not(:disabled) {
  color: var(--primary);
  border-color: #9dbcae;
  background: #f8fbf9;
}
.btn-danger { border-color: #ead9d6; }

.field label { color: #47574e; font-weight: 550; }
.field input, .field textarea, .field select,
.cd-field .cd-in, .cd-party-meta select, .cd-party-card .cd-in,
.search-input {
  border-color: #dce3dd;
  border-radius: 8px;
  background-color: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input, .field select { min-height: 40px; }
.field textarea { min-height: 96px; }
.field input:focus, .field textarea:focus, .field select:focus,
.cd-field .cd-in:focus, .cd-party-meta select:focus, .cd-party-card .cd-in:focus,
.search-input:focus {
  border-color: #6e9a85;
  box-shadow: 0 0 0 3px rgba(61,126,99,.12);
}
.hint, .cd-hint { color: var(--text-3); line-height: 1.65; }

.tabs { background: #edf1ed; border-radius: 9px; }
.tabs button { padding: 7px 15px; border-radius: 7px; }
.tabs button.active {
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(25,48,38,.09);
}
.case-tabs { border-bottom-color: #e4eae5; gap: 6px; }
.case-tabs button { padding: 10px 14px; }
.case-tabs button.active { color: var(--primary); border-bottom-color: #4b806b; }

.table-wrap {
  border-color: var(--border);
  border-radius: 11px;
  box-shadow: 0 2px 10px rgba(25,48,38,.025);
}
table.data { font-size: 13px; }
table.data th, table.data td { padding: 13px 15px; border-bottom-color: #edf0ed; }
table.data th {
  background: #f7f9f7;
  color: #56645c;
  font-size: 12px;
  font-weight: 650;
}
table.data tbody tr { transition: background .14s ease; }
table.data tbody tr:hover td { background: #f7faf8; }
.tag { border-radius: 999px; padding: 2px 9px; font-weight: 550; }
.tag-blue, .cd-pill-run { border-color: #d0e4da; }
.tag-green { border-color: #d2e6d8; }
.tag-orange { color: #8b642e; background: #f7f0e4; border-color: #e9dcc2; }
.tag-red { border-color: #efd5d1; }
.tag-purple { border-color: #e1d8e9; }

.modal-mask { background: rgba(17, 34, 26, .48); backdrop-filter: blur(4px); }
.modal { border: 1px solid rgba(255,255,255,.7); border-radius: 16px; }
.modal-head, .modal-foot { background: rgba(255,255,255,.97); }
.toast { border-radius: 10px; box-shadow: 0 12px 36px rgba(19,39,29,.16); }

.login-page {
  background:
    radial-gradient(ellipse at 18% 14%, rgba(111,149,128,.24), transparent 46%),
    radial-gradient(ellipse at 85% 82%, rgba(190,166,122,.12), transparent 42%),
    linear-gradient(135deg, #13271f 0%, #1c382d 58%, #14281f 100%) !important;
}
.login-card {
  padding: 42px 42px 34px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}
.login-logo h1 { font-size: 21px; letter-spacing: .03em; }
.login-logo p { color: #79867e; }
.login-form .field input { height: 46px; border-radius: 9px; }
.login-form .btn { height: 46px; border-radius: 9px; }

.cd-block { padding: clamp(18px, 1.8vw, 26px); margin-bottom: 16px; }
.cd-block h3 { font-size: 14px; letter-spacing: .015em; }
.cd-block h3::before { width: 3px; height: 16px; background: #8daa98; }
.cd-party-meta { background: #f5f8f5; border-color: #d9e5dc; }
.cd-party-card { border-color: #e5ebe6; border-radius: 10px; }
.cd-stat { border-radius: 11px; }
.todo-item, .cc, .tc {
  border-color: #e6ebe7;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(25,48,38,.025);
}
.todo-item { padding: 14px 16px; }
.todo-item.is-done { background: #f7f9f7; }
.todo-meta { border-top-style: solid; border-top-color: #edf0ed; }
.todo-status.done { color: #43836b; }

.calendar .cal-day.today { box-shadow: inset 0 0 0 2px #4f806b; }
.calendar .cal-day.selected { background: #e8f2ee; color: #245c4b; }
.calendar .cal-dot { opacity: .88; }
.empty, .loading { color: var(--text-3); }
:focus-visible { outline-color: #56836f; }

@media (max-width: 860px) {
  .sidebar {
    position: static;
    z-index: auto;
    box-shadow: 0 6px 18px rgba(19,39,29,.12);
  }
  .sidebar .brand { height: 56px; }
  .sidebar .nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    padding: 6px 10px 9px;
    scrollbar-width: none;
  }
  .sidebar .nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 1 0 68px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 54px;
    padding: 6px 4px;
    margin: 0;
    border-radius: 8px;
  }
  .nav-item .nav-text { display: block; font-size: 10.5px; line-height: 1.25; }
  .nav-item .nav-ico { width: 18px; height: 18px; }
  .nav-item.active::before { top: auto; left: 22%; right: 22%; bottom: 0; width: auto; height: 2px; }
  .topbar { position: sticky; top: 0; }
  .content { padding: 16px 14px 28px; }
  .card { padding: 17px; }
  .sidebar .sidebar-foot { display: none; }
}
@media (max-width: 560px) {
  .topbar { height: 58px; padding-inline: 14px; }
  .topbar h2 { font-size: 15px; }
  .content { padding: 13px 11px 24px; }
  .grid { gap: 12px; }
  .card { padding: 15px; border-radius: 10px; }
  .stat-card { padding: 15px; }
  .stat-value { font-size: 25px; }
  .section-title { font-size: 14px; }
  .toolbar { gap: 8px; }
  .toolbar .btn { flex: 0 0 auto; }
  .pager { justify-content: center; flex-wrap: wrap; }
  .login-card { padding: 32px 24px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 统一界面图标：细线、统一尺寸与基线，取代混杂的文字符号。 */
.ui-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  vertical-align: -0.18em;
}
.btn .ui-icon { width: 15px; height: 15px; }
.btn-sm .ui-icon { width: 14px; height: 14px; }
.ui-icon-sm { width: 13px; height: 13px; }
.trend-icon { width: 13px; height: 13px; vertical-align: -0.14em; }
.check-icon { width: 10px; height: 10px; }
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

/* 绩效口径默认收起，查看时以清晰分组呈现。 */
.perf-help {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-2);
}
.perf-help summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 42px;
  cursor: pointer;
  list-style: none;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
}
.perf-help summary::-webkit-details-marker { display: none; }
.perf-help summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.perf-help[open] summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.perf-help summary:focus-visible { outline: 2px solid #56836f; outline-offset: 3px; border-radius: 3px; }
.perf-help-hint { color: var(--text-3); font-weight: 450; }
.perf-help-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 0 4px;
  animation: perf-help-in .16s ease-out;
}
.perf-help-body > div {
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8faf8;
  font-size: 12px;
  line-height: 1.55;
}
.perf-help-body b { color: var(--text-1); font-weight: 600; }
.perf-help-body span, .perf-help-body p { color: var(--text-2); }
.perf-help-body p { grid-column: 1 / -1; margin: 0; font-size: 11.5px; }
@keyframes perf-help-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) {
  .perf-help-body { grid-template-columns: 1fr; }
  .perf-help-body p { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .perf-help-body { animation: none; }
}
