
/* V1 — restrained legal workspace */
:root {
  --bg: #f5f4f2;
  --primary: #962d29;
  --primary-light: #f8eeeb;
  --border: #e6e2dd;
  --text: #292724;
  --text-secondary: #625f59;
  --shadow: 0 1px 2px rgba(40,32,25,.035);
  --shadow-hover: 0 4px 14px rgba(40,32,25,.065);
}
body { background: var(--bg); }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px;
}
button { touch-action: manipulation; }
.header { background: #fff; box-shadow: none; }
.header-stat-num, .case-row-latest-date, .timeline-date, .todo-due { font-variant-numeric: tabular-nums; }
.header-stat-num { color: var(--text); }
.header-stats { gap: 20px; }
.user-chip { border: 1px solid var(--border); background: #faf9f7; }
.nav-tab { font-size: 14px; padding: 16px 18px; }
.nav-tab.active { font-weight: 650; }
.toolbar { gap: 12px; }
.form-submit { box-shadow: none; }
.form-input, .form-textarea, .search-input { background: #fff; }
.form-label { font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.form-textarea { line-height: 1.7; }
.case-row { border-radius: 10px; padding: 18px 20px; gap: 14px; }
.case-row:hover { transform: none; }
.case-row-number { color: #8a857e; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 22px; }
.case-row-name { font-size: 15px; font-weight: 650; }
.case-row-latest-label { color: var(--text-secondary); background: #f4f2ef; font-weight: 500; }
.case-row-latest-date { font-weight: 600; }
.case-row-btn.btn-del { color: var(--text-secondary); }
.case-row-btn.btn-del:hover { color: var(--status-danger); }
.case-status-badge { font-weight: 500; }
.modal-header { background: #faf9f7; }
#caseModal .modal-header { padding: 22px 24px; }
#caseModal .modal-body { padding: 24px; scroll-behavior: smooth; }
#caseModal .settings-tabs { padding: 12px 24px; gap: 8px; }
#caseModal .settings-tab { padding: 7px 14px; font-size: 13px; }
.timeline-item { padding-bottom: 24px; }
.timeline-date { font-size: 13px; font-weight: 600; color: var(--primary); }
.timeline-desc { font-size: 14px; line-height: 1.8; }
.timeline-actions { margin-top: 8px; }
.mini-btn { border-radius: 6px; font-weight: 500; }
.todo-item { border-radius: 10px; box-shadow: var(--shadow); }
.todo-stat { box-shadow: none; border-radius: 8px; }
.todo-head-icon, .timer-head-icon { border-radius: 10px; box-shadow: none; }
#toast { pointer-events: none; }
#toast.saved { border: 1px solid #b9ddcc; background: #edf8f1; color: #216044; box-shadow: 0 8px 28px rgba(24,78,52,.12); }
#toast.saved::before { content: '✓'; margin-right: 8px; }
@media screen and (min-width: 1100px) {
  body:has(#caseModal.show) .case-row { gap: 10px; padding: 16px; }
  body:has(#caseModal.show) .case-row-name { flex: 1; max-width: none; }
  body:has(#caseModal.show) .case-row-updated { margin-left: 32px; }
  body:has(#caseModal.show) .case-row-progress { margin-left: 32px; }
  body:has(#caseModal.show) .case-row-actions { margin-left: auto; }
  body:has(#caseModal.show) .header-right { gap: 6px; }
  body:has(#caseModal.show) .user-role-tag { display: none; }
  body:has(#caseModal.show) .nav-subtabs-inner { width: 50%; margin-left: 0; }
}
@media (max-width: 760px) {
  .header, .nav-tabs, .nav-subtabs { padding-inline: 14px; }
  .main { padding: 18px 14px; }
  .case-row { flex-wrap: wrap; gap: 10px; padding: 16px; }
  .case-row-name { min-width: 0; max-width: none; flex: 1; }
  .case-row-progress { flex-basis: 100%; order: 1; }
  .case-row-updated { display: none; }
  .filter-group { flex-wrap: wrap; }
  .search-box { max-width: none; flex-basis: 100%; }
  #caseModal .modal-header, #caseModal .modal-body { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

