:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-soft: #f7f8fa;
  --text: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --navy: #080a0d;
  --navy-2: #111820;
  --navy-3: #151d27;
  --gold: #b99a5f;
  --gold-strong: #8e713e;
  --accent: #806633;
  --accent-strong: #654f27;
  --warn: #b86811;
  --danger: #a43b3b;
  --blue: #667180;
  --shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(185, 154, 95, 0.14), transparent 42%), #080a0d;
}

.auth-card {
  width: min(100%, 420px);
  padding: 32px;
  border: 1px solid rgba(185, 154, 95, 0.3);
  border-radius: 20px;
  background: #111820;
  color: #f4f4f2;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.auth-card .auth-logo {
  margin-bottom: 24px;
}

.auth-card h1 {
  margin: 4px 0 8px;
}

.auth-card > p:not(.eyebrow) {
  margin: 0 0 22px;
  color: #9ca3af;
}

.auth-card .login-box {
  display: grid;
}

.mini {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.calendar-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(13, 95, 99, 0.22);
  border-radius: 6px;
  background: #e4f2ef;
  color: #09484b;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, #111820 0%, var(--navy) 58%, #050608 100%);
  color: #f8fbfd;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(185, 154, 95, 0.25);
  box-shadow: 8px 0 28px rgba(8, 10, 13, 0.24);
}

.brand {
  display: grid;
  gap: 6px;
  padding: 0 6px 12px;
}

.brand-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  min-height: auto;
}

.brand-button:hover {
  opacity: 1;
}

.ult-logo {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 10px;
}

.ult-logo strong {
  color: #c7ccd4;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 1px 0 #fff, 0 6px 20px rgba(199, 204, 212, 0.12);
}

.ult-logo i {
  width: 1px;
  height: 27px;
  background: #b99a5f;
}

.ult-logo span {
  color: #c7ccd4;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.28em;
}

.brand > small {
  color: #9ca3af;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-logo strong {
  font-size: 32px;
}

.auth-logo i {
  height: 34px;
}

.auth-logo span {
  font-size: 13px;
}

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

.nav button,
.quick button,
.icon-btn,
.primary,
.ghost,
.danger {
  border: 0;
  border-radius: 8px;
  min-height: 38px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  color: #e6edf5;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: rgba(185, 154, 95, 0.16);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-icon {
  width: 24px;
  text-align: center;
}

.quick {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 164, 92, 0.18);
  border-radius: 8px;
}

.sidebar-today {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(174, 189, 204, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-today-head span {
  color: #f8fbfd;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-today-head strong {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(216, 188, 122, 0.16);
  color: #f7e8bf;
  font-size: 12px;
}

.today-block {
  display: grid;
  gap: 7px;
}

.today-block label {
  color: #8fa3b7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.today-link,
.today-tasks button {
  width: 100%;
  border: 1px solid rgba(174, 189, 204, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #e6edf5;
  text-align: left;
}

.today-link {
  display: grid;
  gap: 4px;
  padding: 9px;
}

.today-link strong {
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
}

.today-link span {
  color: #aebdcc;
  font-size: 11px;
}

.today-tasks {
  display: grid;
  gap: 6px;
}

.today-tasks button {
  display: grid;
  gap: 3px;
  min-height: auto;
  padding: 8px 9px;
}

.today-tasks span {
  overflow: hidden;
  color: #f8fbfd;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-tasks em {
  color: #aebdcc;
  font-size: 10.5px;
  font-style: normal;
}

.today-link:hover,
.today-tasks button:hover {
  border-color: rgba(216, 188, 122, 0.38);
  background: rgba(255, 255, 255, 0.075);
}

.today-empty {
  border: 1px dashed rgba(174, 189, 204, 0.22);
  border-radius: 8px;
  padding: 9px;
  color: #8fa3b7;
  font-size: 12px;
}

.quick small {
  color: #d8c9aa;
  line-height: 1.45;
}

.login-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(201, 164, 92, 0.22);
  border-radius: 8px;
}

.login-box label {
  color: #dfd2b9;
}

.login-box input {
  min-height: 36px;
  border-color: rgba(201, 164, 92, 0.28);
  background: rgba(255, 255, 255, 0.09);
  color: white;
}

.login-box input::placeholder {
  color: #9fb0c3;
}

.login-box button {
  border: 0;
  border-radius: 8px;
  min-height: 36px;
  background: linear-gradient(135deg, var(--gold), #ead08e);
  color: #071a33;
  font-weight: 700;
}

.login-box button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.login-box .secondary-login {
  border: 1px solid rgba(201, 164, 92, 0.34);
  background: transparent;
  color: #f8ead0;
}

.login-box strong {
  color: #fff;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.login-box small {
  color: #d8c9aa;
  line-height: 1.35;
}

.quick button,
.primary {
  background: linear-gradient(135deg, var(--navy-3), var(--navy-2));
  color: #fffdf8;
  padding: 0 14px;
  border: 1px solid rgba(201, 164, 92, 0.45);
  box-shadow: 0 10px 22px rgba(7, 26, 51, 0.14);
}

.quick button:hover,
.primary:hover {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: var(--navy);
}

.title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-pill,
.top-login {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--navy);
  padding: 0 12px;
  box-shadow: 0 8px 22px rgba(7, 26, 51, 0.06);
}

.profile-pill span:last-child {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.status-dot.green {
  background: #17b26a;
}

.status-dot.red {
  background: #d92d20;
}

.top-login {
  border-radius: 8px;
  padding: 4px 6px;
}

.top-login input {
  width: 132px;
  min-height: 30px;
  border: 0;
  background: transparent;
  padding: 4px 6px;
}

.top-login button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: var(--navy-2);
  color: #fff;
  padding: 0 10px;
}

.search {
  width: min(360px, 100%);
  position: relative;
}

.search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px 0 36px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 8px 22px rgba(7, 26, 51, 0.05);
}

.search span {
  position: absolute;
  left: 12px;
  top: 9px;
  color: var(--muted);
}

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

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

.metric,
.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.metric {
  padding: 16px;
  min-height: 112px;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-3), rgba(18, 54, 94, 0));
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: var(--navy);
}

.metric em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  margin-top: 16px;
}

.profile-content {
  grid-template-columns: minmax(0, 1fr) 420px;
  margin-top: 0;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-head {
  min-height: 52px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #182230;
}

.panel-body {
  padding: 14px;
}

.notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(201, 164, 92, 0.42);
  border-radius: 8px;
  background: #fbf5e8;
  color: #73531b;
  font-size: 13px;
}

.drive-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  border-color: #a7d0c7;
  background: #e4f2ef;
  color: #0d5f63;
}

.drive-notice strong {
  color: #09484b;
}

.drive-notice span {
  color: #345f60;
}

.hint-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--muted);
  line-height: 1.45;
}

.table-wrap {
  overflow-x: hidden;
}

.list-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
}

.list-tools label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.list-tools select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  font-size: 12px;
  table-layout: fixed;
}

th,
td {
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.25;
  overflow: hidden;
}

th {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #f8fafc;
}

.sort-th {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  min-height: auto;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  text-align: left;
}

.sort-th:hover {
  color: #175cd3;
  text-decoration: underline;
}

th:nth-child(1),
td:nth-child(1) {
  width: 17%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 8%;
}

th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4) {
  width: 14%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 14%;
}

th:nth-child(6),
td:nth-child(6) {
  width: 7%;
}

th:nth-child(7),
td:nth-child(7) {
  width: 11%;
}

th:nth-child(8),
td:nth-child(8) {
  width: 8%;
}

th:nth-child(9),
td:nth-child(9) {
  width: 34px;
}

tr:hover td {
  background: #f9fafb;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row .name {
  color: #182230;
}

.clickable-row.active-row td,
.clickable-row:focus-within td {
  background: #eef4ff;
}

.name {
  font-weight: 650;
  font-size: 12px;
}

.cell-text {
  font-size: 12px;
}

.sub {
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 2px;
}

td,
.name,
.sub {
  overflow-wrap: anywhere;
}

.clickable-row .name,
.clickable-row .sub,
.clickable-row .cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #f9fafb;
  color: #344054;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.badge.green {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.badge.orange {
  background: #fffaeb;
  border-color: #fedf89;
  color: #b54708;
}

.badge.red {
  background: #ffe9e9;
  border-color: #efb7b7;
  color: #923030;
}

.badge.blue {
  background: #eff8ff;
  border-color: #b2ddff;
  color: #175cd3;
}

.list {
  display: grid;
  gap: 8px;
}

.sort-stack {
  display: grid;
  gap: 3px;
}

.sort-stack .sort-th:last-child {
  color: #b54708;
  font-size: 9px;
}

.case-name-row,
.case-detail-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.case-name-row .badge,
.case-detail-title .badge {
  flex: 0 0 auto;
}

.moratorium-card {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #e7c9a9;
  border-left: 4px solid #d97706;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf3, #fff);
}

.moratorium-card.active {
  border-left-color: #26845b;
  background: linear-gradient(135deg, #f2fbf6, #fff);
}

.moratorium-card.expired {
  border-left-color: #c2413b;
  background: linear-gradient(135deg, #fff5f4, #fff);
}

.moratorium-head,
.moratorium-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.moratorium-head h3 {
  margin: 2px 0 0;
}

.moratorium-grid {
  margin: 16px 0;
  align-items: stretch;
}

.moratorium-grid > div {
  flex: 1;
  padding: 11px 13px;
  border-radius: 10px;
  background: #ffffffb8;
  border: 1px solid #e7ebee;
}

.moratorium-grid span,
.moratorium-grid strong {
  display: block;
}

.moratorium-grid span {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

.form-section-title {
  margin-top: 8px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.event-subject,
.court-document-subject {
  margin-top: 8px;
  color: #8b451f;
  font-weight: 650;
}

.coordinator-scope-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 15px;
  border: 1px solid #cde7d9;
  border-radius: 12px;
  background: #f2fbf6;
}

.coordinator-scope-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.coordinator-events-panel {
  border-top: 3px solid #26845b;
}

.court-subject-group {
  border: 1px solid #dfe5e9;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.court-subject-group + .court-subject-group {
  margin-top: 12px;
}

.court-subject-group > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 17px 19px;
  cursor: pointer;
  background: linear-gradient(135deg, #fbfaf8, #fff);
  list-style: none;
}

.court-subject-group > summary::-webkit-details-marker {
  display: none;
}

.court-subject-group > summary strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
}

.court-subject-panel {
  padding: 11px 19px;
  border-top: 1px solid #e9edef;
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
}

.court-subject-documents {
  padding: 0 14px 14px;
}

.court-subject-documents .court-record {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .moratorium-head,
  .moratorium-grid,
  .court-subject-group > summary {
    align-items: stretch;
    flex-direction: column;
  }
}

.panel-caption {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.court-document-card {
  gap: 10px;
  border-left: 3px solid #2e90fa;
}

.court-document-card.inactive {
  border-left-color: #d92d20;
  background: #fff7f6;
  opacity: 0.82;
}

.court-document-meta {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.court-document-open {
  justify-self: start;
  min-height: 30px;
}

.court-show-all {
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border: 1px dashed rgba(185, 154, 95, 0.5);
  border-radius: 8px;
  background: rgba(185, 154, 95, 0.07);
  color: var(--gold-strong);
  font-weight: 700;
}

.case-subnav {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.05);
}

.case-subnav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}

.case-subnav button.active {
  background: var(--navy-2);
  color: #f4f4f2;
}

.case-subnav button span {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(185, 154, 95, 0.18);
  color: var(--gold);
  font-size: 10px;
  text-align: center;
}

.court-library {
  overflow: hidden;
}

.court-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #111820 0%, #151d27 100%);
  color: #f4f4f2;
}

.court-library-head h2 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.court-library-head p:not(.eyebrow) {
  margin: 0;
  color: #9ca3af;
  font-size: 12px;
}

.court-library-head .eyebrow {
  color: var(--gold);
}

.court-library-head .ghost {
  border-color: rgba(199, 204, 212, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f4f2;
}

.court-library-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  border-bottom: 1px solid var(--line);
}

.court-library-stats div {
  display: grid;
  gap: 2px;
  padding: 16px 22px;
  border-right: 1px solid var(--line);
}

.court-library-stats div:last-child {
  border-right: 0;
}

.court-library-stats strong {
  color: var(--navy-2);
  font-size: 22px;
}

.court-library-stats span {
  color: var(--muted);
  font-size: 11px;
}

.court-library-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.court-search {
  display: flex;
  flex: 1;
  gap: 8px;
  max-width: 620px;
}

.court-search input {
  flex: 1;
  min-width: 180px;
}

.court-records {
  display: grid;
}

.court-record {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.court-record:last-child {
  border-bottom: 0;
}

.court-record:hover {
  background: #fbfaf7;
}

.court-record.inactive {
  background: #fff7f6;
  opacity: 0.8;
}

.court-record-date {
  display: grid;
  gap: 4px;
}

.court-record-date strong {
  color: var(--navy-2);
  font-size: 15px;
}

.court-record-date span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.court-record-main {
  min-width: 0;
}

.court-record-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.court-record-title strong {
  display: block;
  color: var(--navy-2);
  font-size: 14px;
}

.court-record-title code {
  display: block;
  margin-top: 5px;
  color: #7b6742;
  font-family: inherit;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.court-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10.5px;
}

.court-record-meta span:not(:first-child)::before {
  content: "·";
  margin-right: 14px;
  color: #c4c9d1;
}

.court-record-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
}

.court-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.court-pagination span {
  color: var(--muted);
  font-size: 11px;
}

.asana-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-column {
  min-width: 240px;
  min-height: 420px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fa;
}

.kanban-column.drag-over {
  border-color: rgba(13, 95, 99, 0.48);
  background: #e4f2ef;
  box-shadow: inset 0 0 0 1px rgba(13, 95, 99, 0.16);
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--line);
}

.kanban-head strong {
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.kanban-head span {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #edf1f5;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.kanban-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.kanban-empty {
  min-height: 86px;
  display: grid;
  place-items: center;
  border: 1px dashed #c6d0dc;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  background: rgba(255, 255, 255, 0.56);
}

.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.clickable-card {
  cursor: pointer;
}

.clickable-card:hover {
  border-color: #b9c5d4;
  background: #f9fafb;
}

.task-card {
  min-height: 122px;
  display: grid;
  align-content: space-between;
  cursor: grab;
}

.task-card:active {
  cursor: grabbing;
}

.task-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  font-size: 12px;
  font-weight: 700;
}

.task-label.urgent {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.task-label.court {
  background: #eff8ff;
  border-color: #b2ddff;
  color: #175cd3;
}

.task-label.client {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.task-label.finance {
  background: #fffaeb;
  border-color: #fedf89;
  color: #b54708;
}

.task-label.internal {
  background: #f4f3ff;
  border-color: #d9d6fe;
  color: #5925dc;
}

.task-label.neutral {
  background: #f9fafb;
  color: #475467;
}

.item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item strong {
  color: #101828;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.file-card .item-top {
  align-items: center;
}

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

.detail a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.link-button,
.table-link {
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
  min-height: auto;
}

.link-button:hover,
.table-link:hover {
  text-decoration: underline;
}

.detail a:hover {
  text-decoration: underline;
}

.file-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.file-link:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

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

.case-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}

.task-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
}

.task-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.task-parent-link {
  border: 0;
  background: transparent;
  color: var(--teal);
  padding: 0;
  margin-bottom: 14px;
  font-weight: 750;
  text-align: left;
}

.subtask-section {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.subtask-head,
.task-progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subtask-head h3 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 16px;
}

.subtask-progress,
.task-progress-summary > span {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ee;
}

.subtask-progress {
  margin: 12px 0;
}

.subtask-progress span,
.task-progress-summary i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.subtask-list {
  display: grid;
  gap: 6px;
}

.subtask-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto 34px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.subtask-item.done .subtask-title {
  color: var(--muted);
  text-decoration: line-through;
}

.subtask-check {
  width: 24px;
  height: 24px;
  border: 1px solid #9eacba;
  border-radius: 6px;
  background: #fff;
  color: #fff;
  padding: 0;
}

.subtask-item.done .subtask-check {
  border-color: var(--teal);
  background: var(--teal);
}

.subtask-title {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-weight: 700;
  text-align: left;
}

.subtask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 120px auto;
  gap: 8px;
  margin-top: 10px;
}

.subtask-empty {
  padding: 10px 2px;
  color: var(--muted);
}

.task-progress-summary {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.task-progress-summary > span {
  flex: 1;
}

.task-progress-summary em {
  font-style: normal;
  font-weight: 750;
}

.update-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf6ec;
}

.update-form button {
  justify-self: start;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
}

.timeline-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 164, 92, 0.16);
}

.timeline-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-item p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.case-side {
  display: grid;
  align-content: start;
  gap: 16px;
}

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

.detail {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail strong {
  display: block;
  line-height: 1.35;
  color: #182230;
}

.note-block {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.note-block p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.integration-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(184, 104, 17, 0.3);
  border-radius: 8px;
  background: #fff4df;
}

.integration-status.connected {
  border-color: rgba(13, 95, 99, 0.28);
  background: #e4f2ef;
}

.integration-status strong {
  color: var(--navy);
}

.integration-status p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

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

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

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(23, 92, 211, 0.14);
  border-color: #84caff;
}

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

.ghost {
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #344054;
  padding: 0 11px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.danger {
  background: #fff0f0;
  color: var(--danger);
  padding: 0 12px;
  border: 1px solid #f0bcbc;
}

.icon-btn {
  width: 34px;
  min-height: 34px;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #344054;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.icon-btn:hover,
.ghost:hover {
  background: #f9fafb;
  border-color: #98a2b3;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tabs {
  display: inline-flex;
  background: #e6edf3;
  border-radius: 8px;
  padding: 3px;
}

.tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  min-height: 32px;
  padding: 0 10px;
  color: #495766;
}

.tabs button.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 26, 51, 0.58);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 10;
}

.modal {
  width: min(760px, 100%);
  max-height: min(840px, 92vh);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  box-shadow: 0 28px 80px rgba(7, 26, 51, 0.32);
}

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

.modal-head {
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
}

.modal-actions {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 22px;
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kanban-board {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }

  .content,
  .case-layout,
  .task-detail-layout {
    grid-template-columns: 1fr;
  }

  .court-record {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .court-record-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

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

@media (max-width: 760px) {
  .subtask-form {
    grid-template-columns: 1fr;
  }

  .subtask-item {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
  }

  .subtask-item > span,
  .subtask-item > .badge {
    grid-column: 2;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 12px;
  }

  .quick {
    display: none;
  }

  .brand {
    display: flex;
    padding: 0;
  }

  .brand > small,
  .login-box {
    display: none;
  }

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

  .nav button {
    justify-content: center;
    padding: 9px 6px;
  }

  .nav-label {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .case-subnav,
  .court-library-tools,
  .court-library-head,
  .court-record-title,
  .court-record-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .case-subnav {
    width: 100%;
  }

  .case-subnav button {
    justify-content: center;
  }

  .court-library-stats div,
  .court-library-tools,
  .court-library-head,
  .court-record {
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .court-record {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .court-record-actions {
    grid-column: 1;
  }

  .court-search {
    max-width: none;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    justify-content: stretch;
  }

  .profile-menu,
  .profile-pill,
  .top-login {
    width: 100%;
  }

  .top-login {
    flex-wrap: wrap;
  }

  .search {
    width: 100%;
  }

  .primary,
  .ghost,
  .danger {
    flex: 1;
  }

  .metrics,
  .form-grid,
  .detail-grid,
  .split {
    grid-template-columns: 1fr;
  }
}
