    :root {
      color-scheme: dark;
      --bg: #111114;
      --panel: #1b1b20;
      --panel-2: #a33442;
      --panel-3: #26262d;
      --line: #7b3640;
      --soft-line: rgba(226, 141, 154, 0.18);
      --text: #f5edef;
      --muted: #d2b8bd;
      --faint: #9e858b;
      --cyan: #d14c5d;
      --green: #752932;
      --yellow: #f8d05a;
      --orange: #ff8a57;
      --red: #eb96a2;
      --blue: #b84757;
      --shadow: 0 22px 46px rgba(0, 0, 0, 0.42);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background: var(--bg);
      color: var(--text);
      font-family: "Segoe UI Variable Display", "Trebuchet MS", "Segoe UI", sans-serif;
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    a {
      color: inherit;
    }

    .hidden {
      display: none !important;
    }

    .app {
      display: grid;
      grid-template-columns: 280px minmax(0, 1fr);
      gap: 20px;
      min-height: 100vh;
      padding: 20px;
    }

    .sidebar {
      position: sticky;
      top: 20px;
      height: calc(100vh - 40px);
      display: flex;
      flex-direction: column;
      gap: 18px;
      padding: 18px;
      border: 1px solid var(--soft-line);
      border-radius: 10px;
      background: rgba(8, 3, 4, 0.92);
      box-shadow: var(--shadow);
      backdrop-filter: blur(10px);
    }

    .brand {
      display: grid;
      grid-template-columns: 52px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      text-decoration: none;
    }

    .brand-mark {
      display: grid;
      place-items: center;
      width: 52px;
      height: 52px;
      border-radius: 12px;
      background: var(--red);
      color: #281013;
      font-size: 18px;
      font-weight: 900;
      letter-spacing: 0.04em;
    }

    .brand strong,
    .brand small {
      display: block;
    }

    .brand small,
    .muted,
    .access-card span,
    table small,
    .helper {
      color: var(--muted);
    }

    .nav {
      display: grid;
      gap: 6px;
    }

    .nav a {
      padding: 11px 12px;
      border: 1px solid transparent;
      border-radius: 10px;
      color: var(--muted);
      text-decoration: none;
      transition: 0.18s ease;
    }

    .nav a:hover,
    .nav a.active {
      border-color: var(--line);
      background: var(--panel-3);
      color: var(--text);
    }

    .access-card {
      margin-top: auto;
      display: grid;
      gap: 8px;
      padding: 14px;
      border: 1px solid rgba(255, 91, 110, 0.32);
      border-radius: 10px;
      background: rgba(163, 18, 38, 0.12);
    }

    .access-card p,
    .kicker {
      margin: 0;
      color: var(--cyan);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .main {
      min-width: 0;
      display: grid;
      align-content: start;
      gap: 16px;
    }

    .header,
    .toolbar,
    .card,
    .panel,
    .case-header,
    .summary-box,
    .modal {
      border: 1px solid var(--soft-line);
      border-radius: 10px;
      background: var(--panel);
      box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(10px);
    }

    .header,
    .case-header,
    .panel,
    .toolbar {
      padding: 18px;
    }

    .header {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 16px;
      align-items: end;
    }

    h1,
    h2,
    h3,
    p {
      overflow-wrap: anywhere;
    }

    h1,
    h2,
    h3 {
      margin: 0;
    }

    h1 {
      font-size: clamp(28px, 4vw, 42px);
    }

    p {
      line-height: 1.5;
    }

    .header p:not(.kicker),
    .card p,
    .section-head p,
    .modal-head p {
      margin: 8px 0 0;
      color: var(--muted);
    }

    .actions,
    .row-actions,
    .tabs,
    .form-actions,
    .stat-stack,
    .inline-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
    }

    .btn,
    .btn-secondary,
    .btn-danger,
    .btn-ghost {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 9px 12px;
      background: var(--panel-2);
      color: var(--text);
      text-decoration: none;
      font-weight: 800;
    }

    .btn {
      border-color: #c15a68;
      background: #c14d5d;
      color: #fff4f6;
    }

    .btn-danger {
      border-color: rgba(255, 123, 145, 0.5);
      background: rgba(255, 123, 145, 0.12);
      color: #ffd4dc;
    }

    .btn-ghost {
      background: transparent;
    }

    .stats,
    .mini-stats {
      display: grid;
      gap: 12px;
    }

    .stats {
      grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .mini-stats {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .card {
      padding: 16px;
    }

    .stat strong {
      display: block;
      margin-top: 10px;
      font-size: 30px;
    }

    .stat small {
      display: block;
      margin-top: 6px;
      color: var(--faint);
    }

    .badge,
    .pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 5px 9px;
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .status-new,
    .status-claimed,
    .reviewed-unreviewed {
      border-color: rgba(255, 91, 110, 0.42);
      background: rgba(255, 91, 110, 0.14);
    }

    .status-in-review,
    .status-ready-for-verdict,
    .status-ready-for-review,
    .status-approved {
      border-color: rgba(217, 74, 95, 0.42);
      background: rgba(217, 74, 95, 0.14);
    }

    .status-waiting-for-victim,
    .status-waiting-for-suspect,
    .status-rejected {
      border-color: rgba(248, 208, 90, 0.42);
      background: rgba(248, 208, 90, 0.14);
    }

    .status-closed,
    .reviewed-reviewed {
      border-color: rgba(163, 18, 38, 0.5);
      background: rgba(163, 18, 38, 0.18);
    }

    .priority-low {
      border-color: rgba(148, 163, 184, 0.42);
      background: rgba(148, 163, 184, 0.12);
    }

    .priority-medium {
      border-color: rgba(255, 91, 110, 0.42);
      background: rgba(255, 91, 110, 0.12);
    }

    .priority-high {
      border-color: rgba(255, 156, 87, 0.55);
      background: rgba(255, 156, 87, 0.14);
    }

    .priority-urgent,
    .risk-critical,
    .risk-high {
      border-color: rgba(255, 123, 145, 0.6);
      background: rgba(255, 123, 145, 0.14);
    }

    .risk-medium {
      border-color: rgba(248, 208, 90, 0.42);
      background: rgba(248, 208, 90, 0.12);
    }

    .risk-low,
    .risk-none {
      border-color: rgba(148, 163, 184, 0.42);
      background: rgba(148, 163, 184, 0.12);
    }

    .table-wrap {
      width: 100%;
      overflow-x: auto;
      border: 1px solid var(--soft-line);
      border-radius: 10px;
    }

    table {
      width: 100%;
      min-width: 980px;
      border-collapse: collapse;
    }

    th,
    td {
      padding: 12px;
      border-bottom: 1px solid var(--soft-line);
      text-align: left;
      vertical-align: top;
    }

    .case-cell {
      min-width: 240px;
      max-width: 360px;
    }

    .case-title {
      display: block;
      margin-bottom: 0;
    }

    th {
      color: var(--faint);
      font-size: 12px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    tbody tr:nth-child(even) {
      background: rgba(16, 25, 39, 0.22);
    }

    tbody tr:hover {
      background: rgba(255, 91, 110, 0.08);
    }

    tr:last-child td {
      border-bottom: 0;
    }

    .toolbar {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 10px;
    }

    .field,
    .check-row {
      display: grid;
      gap: 6px;
    }

    .field.span-2 {
      grid-column: span 2;
    }

    .field label,
    .check-row span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    input,
    select,
    textarea {
      width: 100%;
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 9px 10px;
      background: #120709;
      color: var(--text);
    }

    textarea {
      min-height: 110px;
      resize: vertical;
    }

    .rich-doc-field {
      gap: 10px;
    }

    .rich-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--soft-line);
      border-radius: 10px;
      background: rgba(30, 9, 13, 0.72);
    }

    .rich-toolbar .btn-ghost {
      min-height: 34px;
      padding: 7px 10px;
      border-color: rgba(214, 129, 145, 0.22);
      background: rgba(255, 255, 255, 0.02);
      font-size: 12px;
    }

    .rich-editor {
      min-height: 180px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #120709;
      color: var(--text);
      line-height: 1.65;
      outline: none;
    }

    .rich-editor:focus {
      border-color: var(--cyan);
      box-shadow: 0 0 0 1px rgba(255, 91, 110, 0.24);
    }

    .rich-editor h1,
    .rich-editor h2,
    .rich-editor h3,
    .rich-editor p,
    .rich-editor ul,
    .rich-editor ol,
    .rich-editor blockquote {
      margin: 0 0 12px;
    }

    .rich-editor h1 {
      font-size: 28px;
    }

    .rich-editor h2 {
      font-size: 22px;
    }

    .rich-editor h3 {
      font-size: 18px;
    }

    .rich-editor ul,
    .rich-editor ol {
      padding-left: 22px;
    }

    .rich-editor blockquote {
      padding-left: 14px;
      border-left: 3px solid rgba(255, 91, 110, 0.4);
      color: #e7c7cd;
    }

    .note-body {
      line-height: 1.65;
    }

    .note-body h1,
    .note-body h2,
    .note-body h3,
    .note-body p,
    .note-body ul,
    .note-body ol,
    .note-body blockquote {
      margin: 0 0 12px;
    }

    .note-body ul,
    .note-body ol {
      padding-left: 22px;
    }

    input[type="checkbox"] {
      width: 18px;
      min-height: 18px;
      margin: 0;
      accent-color: var(--green);
    }

    .case-header {
      display: grid;
      grid-template-columns: minmax(0, 1fr) repeat(2, minmax(160px, 220px)) auto auto;
      gap: 12px;
      align-items: end;
    }

    .tabs {
      position: sticky;
      top: 0;
      z-index: 3;
      padding: 10px;
      border: 1px solid var(--soft-line);
      border-radius: 10px;
      background: rgba(8, 3, 4, 0.94);
      backdrop-filter: blur(10px);
    }

    .tabs button {
      border: 1px solid transparent;
      border-radius: 10px;
      padding: 9px 11px;
      background: transparent;
      color: var(--muted);
      font-weight: 800;
    }

    .tabs button.active {
      border-color: var(--line);
      background: var(--panel-3);
      color: var(--text);
    }

    .panel {
      display: grid;
      gap: 16px;
    }

    .grid-2,
    .grid-3,
    .details,
    .checklist,
    .dashboard-grid {
      display: grid;
      gap: 12px;
    }

    .grid-2,
    .dashboard-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .details,
    .checklist {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail,
    .check-row,
    .item,
    .info-strip {
      padding: 12px;
      border: 1px solid var(--soft-line);
      border-radius: 10px;
      background: rgba(20, 7, 9, 0.5);
    }

    .detail span {
      display: block;
      margin-bottom: 5px;
      color: var(--faint);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .check-row {
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
    }

    .section-head,
    .item-head,
    .modal-head {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
    }

    .section-head {
      align-items: flex-start;
    }

    .item-stack,
    .modal-stack {
      display: grid;
      gap: 10px;
    }

    .evidence {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      align-items: start;
    }

    .item-head p {
      color: var(--muted);
      margin-top: 6px;
      max-width: 78ch;
    }

    .detail {
      word-break: break-word;
    }

    .detail-actions {
      margin-top: 10px;
    }

    .btn-inline {
      min-height: 0;
      padding: 7px 10px;
    }

    .sr-copy-buffer {
      position: fixed;
      left: -9999px;
      top: 0;
      opacity: 0;
      pointer-events: none;
    }

    .summary-box {
      padding: 16px;
      background: #120709;
    }

    .summary-box pre {
      margin: 0;
      white-space: pre-wrap;
      line-height: 1.5;
    }

    .empty {
      display: grid;
      gap: 8px;
      justify-items: center;
      padding: 34px;
      border: 1px dashed var(--line);
      border-radius: 10px;
      color: var(--muted);
      text-align: center;
    }

    .progress,
    .progress-track {
      width: 100%;
    }

    .progress-track {
      height: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(112, 132, 155, 0.22);
    }

    .progress-fill {
      height: 100%;
      border-radius: inherit;
      background: #c14d5d;
    }

    .progress-meta {
      display: flex;
      gap: 10px;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
    }

    .progress-meta strong {
      font-size: 16px;
    }

    .progress-note {
      color: var(--faint);
      font-size: 12px;
    }

    .metric-callout {
      display: grid;
      gap: 14px;
      padding: 18px;
      border: 1px solid rgba(255, 91, 110, 0.22);
      border-radius: 14px;
      background: #22171b;
    }

    .metric-callout strong {
      font-size: 32px;
    }

    .metric-callout p {
      margin: 0;
    }

    .info-strip {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
    }

    .audit-list {
      display: grid;
      gap: 10px;
    }

    .audit-item {
      display: grid;
      gap: 4px;
      padding: 12px;
      border: 1px solid var(--soft-line);
      border-radius: 10px;
      background: rgba(15, 5, 7, 0.42);
    }

    .danger-zone {
      border: 1px solid rgba(255, 123, 145, 0.32);
      background: rgba(255, 123, 145, 0.08);
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 40;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(4, 8, 14, 0.74);
      backdrop-filter: blur(8px);
    }

    .modal {
      width: min(760px, 100%);
      max-height: calc(100vh - 36px);
      overflow: auto;
      padding: 18px;
    }

    .modal-close {
      display: inline-grid;
      place-items: center;
      width: 38px;
      height: 38px;
      border-radius: 10px;
      border: 1px solid var(--line);
      background: transparent;
      color: var(--text);
      font-size: 18px;
    }

    .modal .form-grid {
      display: grid;
      gap: 12px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal .full {
      grid-column: 1 / -1;
    }

    .file-input {
      padding: 10px;
      border: 1px dashed var(--line);
      border-radius: 10px;
      background: rgba(15, 5, 7, 0.36);
    }

    .toast {
      position: fixed;
      right: 18px;
      bottom: 18px;
      z-index: 60;
      max-width: 360px;
      border: 1px solid rgba(255, 91, 110, 0.42);
      border-radius: 10px;
      padding: 12px 14px;
      background: #3a0d15;
      color: #ffe3e8;
      box-shadow: var(--shadow);
    }

    @media (max-width: 1120px) {
      .app {
        grid-template-columns: 1fr;
      }

      .sidebar {
        position: static;
        height: auto;
      }

      .nav {
        display: flex;
        overflow-x: auto;
      }

      .nav a {
        flex: 0 0 auto;
      }

      .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .case-header {
        grid-template-columns: 1fr 1fr;
      }
    }

    @media (max-width: 760px) {
      .app {
        padding: 12px;
      }

      .header,
      .case-header,
      .grid-2,
      .grid-3,
      .details,
      .checklist,
      .evidence,
      .dashboard-grid,
      .modal .form-grid,
      .mini-stats {
        grid-template-columns: 1fr;
      }

      .field.span-2 {
        grid-column: auto;
      }

      .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .section-head,
      .item-head,
      .modal-head {
        align-items: flex-start;
        flex-direction: column;
      }

      .modal-close {
        align-self: flex-end;
      }
    }
  

