:root {
  --navy: #101a2f;
  --navy2: #1b2948;
--gold: #8b651f;
  --gold2: #d8bc7a;
  --bg: #f3f5f8;
  --paper: #fff;
  --text: #172033;
  --muted: #667085;
  --line: #e1e5ec;
  --ok: #087443;
  --bad: #b42318;
  --warn: #b54708;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-width: 320px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.topbar {
  height: var(--officejur-header-height, 68px);
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 28px #101a2f24;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font:
    700 18px Georgia,
    serif;
}
.brand small {
  font-size: 11px;
  color: #c9d0dc;
  margin-top: 2px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-actions > span {
  font-size: 12px;
  color: #d5dae4;
  margin-right: 8px;
}
.shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: calc(100vh - var(--officejur-header-height, 68px));
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: var(--officejur-header-height, 68px);
  height: calc(100vh - var(--officejur-header-height, 68px));
}
nav {
  display: grid;
  gap: 5px;
}
nav button {
  border: 0;
  background: transparent;
  color: #48536a;
  text-align: left;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
}
nav button i {
  width: 24px;
}
nav button.active {
  background: #f3ead8;
  color: #765817;
}
.sidebar-foot {
  display: grid;
  gap: 9px;
}
.sidebar-foot small,
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 850;
  color: var(--gold);
  margin: 0;
}
.sidebar-foot input {
  width: 100%;
}
main {
  padding: 30px;
  min-width: 0;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.page-head h1 {
  font:
    700 31px Georgia,
    serif;
  color: var(--navy);
  margin: 5px 0;
}
.page-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.btn,
.icon-btn {
  border: 1px solid transparent;
  border-radius: 7px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 780;
}
.btn.primary {
  background: var(--gold);
  color: #fff;
}
.btn.secondary {
  background: var(--navy);
  color: #fff;
}
.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--navy);
}
.btn.light,
.icon-btn {
  background: transparent;
  border-color: #ffffff38;
  color: #fff;
}
.icon-btn {
  width: 40px;
  padding: 0;
}
.icon-btn.dark {
  color: var(--navy);
  border-color: var(--line);
}
.wide {
  width: 100%;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.metric,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 2px 7px #101a2f08;
}
.metric {
  padding: 17px;
}
.metric .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f4ecd9;
  color: var(--gold);
  margin-bottom: 14px;
}
.metric small {
  color: var(--muted);
  font-weight: 650;
}
.metric strong {
  display: block;
  font:
    700 24px Georgia,
    serif;
  margin: 6px 0;
  color: var(--navy);
}
.metric em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.metric.bad strong {
  color: var(--bad);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 18px;
}
.grid-2.lower {
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}
.panel {
  padding: 18px;
}
.panel header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.panel h2 {
  font:
    700 19px Georgia,
    serif;
  color: var(--navy);
  margin: 0 0 4px;
}
.panel header p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.link-btn {
  border: 0;
  background: none;
  color: var(--gold);
  font-weight: 800;
}
.chart {
  height: 250px;
  display: flex;
  align-items: end;
  gap: 13px;
  padding-top: 25px;
}
.bar-group {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 6px;
}
.bars {
  height: calc(100% - 28px);
  display: flex;
  align-items: end;
  gap: 4px;
}
.bar {
  width: 12px;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--gold);
}
.bar.expense {
  background: #c9d0dc;
}
.bar-group small {
  font-size: 10px;
  color: var(--muted);
}
.stack {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}
.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row-item:last-child {
  border: 0;
}
.row-item strong,
.row-item small {
  display: block;
}
.row-item small {
  color: var(--muted);
  margin-top: 3px;
}
.amount {
  font-weight: 800;
  white-space: nowrap;
}
.amount.income {
  color: var(--ok);
}
.amount.expense {
  color: var(--bad);
}
.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 10px;
  border-radius: 99px;
  padding: 4px 8px;
  font-weight: 800;
  background: #eef1f5;
  color: #59647a;
}
.badge.paid {
  background: #e4f4ea;
  color: var(--ok);
}
.badge.overdue {
  background: #fee9e7;
  color: var(--bad);
}
.badge.pending {
  background: #fff3df;
  color: var(--warn);
}
.badge.partial {
  background: #e8efff;
  color: #3157a4;
}
.break-row {
  display: grid;
  grid-template-columns: 125px 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  font-size: 12px;
}
.progress {
  height: 8px;
  background: #edf0f4;
  border-radius: 99px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 99px;
}
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.filters input {
  flex: 1;
}
.filters select {
  min-width: 170px;
}
input,
select,
textarea {
  border: 1px solid #cfd5df;
  border-radius: 7px;
  min-height: 40px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #b387311c;
}
.table-wrap {
  overflow: auto;
  padding: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.entries-table {
  table-layout: fixed;
}
.entries-table th:nth-child(1) { width: 11%; }
.entries-table th:nth-child(2) { width: 28%; }
.entries-table th:nth-child(3) { width: 21%; }
.entries-table th:nth-child(4) { width: 9%; }
.entries-table th:nth-child(5) { width: 10%; }
.entries-table th:nth-child(6) { width: 11%; }
.entries-table th:nth-child(7) { width: 10%; }
.entries-table td {
  min-width: 0;
  overflow-wrap: anywhere;
}
.entries-table th,
.entries-table td {
  padding-inline: 12px;
}
#transactions-view .table-wrap {
  overflow-x: hidden;
}
th {
  color: #667085;
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #fafbfc;
}
th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.status-column {
  white-space: nowrap;
}
td.money,
th.money {
  text-align: right;
}
.table-actions {
  white-space: nowrap;
}
.entries-table td.table-actions {
  padding-inline: 4px;
  text-align: center;
}
.entries-table .table-actions button {
  display: inline-grid;
  width: 26px;
  height: 30px;
  padding: 0;
  place-items: center;
}
.table-actions button {
  border: 0;
  background: none;
  color: #667085;
  padding: 6px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.client-card {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.client-card header {
  display: flex;
  justify-content: space-between;
}
.file-folder-btn {
  position: relative;
  color: #856620;
}
.file-folder-btn b {
  display: grid;
  place-items: center;
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 99px;
  padding: 0 3px;
  color: #fff;
  background: var(--gold);
  font-size: 8px;
  line-height: 1;
}
.avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font: 700 16px Georgia;
}
.client-card h3 {
  font: 700 17px Georgia;
  margin: 14px 0 4px;
  color: var(--navy);
}
.client-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.case-line {
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.case-line strong {
  display: block;
  font-size: 12px;
}
.case-line small {
  color: var(--muted);
}
.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}
dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  width: min(720px, calc(100% - 28px));
  box-shadow: 0 30px 80px #101a2f55;
}
dialog::backdrop {
  background: #101a2faa;
  backdrop-filter: blur(2px);
}
dialog form {
  padding: 22px;
}
.wide-dialog {
  width: min(980px, calc(100% - 28px));
}
.files-modal {
  padding: 22px;
}
.files-modal-head {
  margin-bottom: 16px;
}
.file-upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f9fb;
}
.file-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px dashed #cfb777;
  border-radius: 8px;
  padding: 10px 13px;
  color: #765817;
  background: #fff;
  cursor: pointer;
}
.file-picker > i {
  font-size: 23px;
}
.file-picker span,
.file-picker strong,
.file-picker small {
  display: block;
}
.file-picker strong {
  font-size: 12px;
}
.file-picker small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.file-case-field {
  margin: 0;
}
.file-storage-summary {
  margin: 12px 2px !important;
  color: var(--muted);
  font-size: 11px;
}
.file-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 2px 12px !important;
  border-radius: 7px;
  padding: 9px 10px !important;
  color: #8b4513 !important;
  background: #fff7ed;
  font-size: 10px !important;
  line-height: 1.45;
}
.file-security-note i {
  margin-top: 2px;
}
.client-files-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}
.client-file-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: #fff;
}
.file-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #b42318;
  background: #fef3f2;
  font-size: 19px;
}
.file-content {
  min-width: 0;
}
.file-content > strong,
.file-content > small {
  display: block;
}
.file-content > strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-content > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.file-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.file-tags > span,
.file-tags > em,
.file-tags > label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 5px;
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 9px;
  font-style: normal;
}
.file-tags > span {
  color: #694f18;
  background: #fff5d9;
}
.file-tags > em {
  color: var(--muted);
  background: #f2f4f7;
}
.file-tags > label {
  border: 1px dashed #cfb777;
  color: #765817;
  background: #fff;
}
.file-tags button {
  display: grid;
  width: 16px;
  height: 16px;
  border: 0;
  place-items: center;
  padding: 0;
  color: inherit;
  background: transparent;
}
.file-tags select {
  width: auto;
  min-height: 16px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
}
.file-actions {
  display: flex;
  gap: 3px;
}
.file-actions button {
  display: grid;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 7px;
  place-items: center;
  color: #59647a;
  background: #fff;
}
.file-actions button:last-child {
  color: var(--bad);
}
.file-empty {
  display: grid;
  justify-items: center;
  padding: 34px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}
.file-empty > i {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 28px;
}
.file-empty strong {
  color: var(--navy);
  font-size: 13px;
}
.file-empty p {
  margin: 5px 0 0;
  font-size: 11px;
}
.file-preview-dialog {
  width: min(1080px, calc(100% - 28px));
  background: var(--navy);
}
.file-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.file-preview > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: #fff;
  background: var(--navy);
}
.file-preview strong,
.file-preview small {
  display: block;
}
.file-preview strong {
  max-width: 760px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview small {
  margin-top: 2px;
  color: #cbd3df;
  font-size: 9px;
}
.file-preview-close {
  flex: 0 0 auto;
  border-color: #ffffff4d;
  color: #fff;
  background: #ffffff1f;
}
.file-preview-close:hover,
.file-preview-close:focus-visible {
  border-color: #fff;
  background: #ffffff36;
}
.file-preview iframe {
  display: block;
  width: 100%;
  height: min(64vh, 680px);
  border: 0;
  background: #e7eaf0;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 18px;
}
.modal-head h2 {
  font:
    700 24px Georgia,
    serif;
  margin: 4px 0;
}
.modal-head p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-grid label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  font-weight: 750;
  color: #475467;
}
.span-2 {
  grid-column: 1/-1;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}
.modal-actions.split {
  justify-content: space-between;
}
.check {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
}
.check input {
  min-height: auto;
  width: auto;
}
.notice {
  font-size: 12px;
  color: var(--muted);
}
#toast {
  position: fixed;
  inset: auto 22px 22px auto;
  margin: 0;
  border: 0;
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 10px 30px #101a2f44;
  transform: translateY(80px);
  opacity: 0;
  transition: 0.2s;
  z-index: 50;
}
#toast::backdrop {
  background: transparent;
  backdrop-filter: none;
}
#toast.show {
  transform: none;
  opacity: 1;
}
@media (max-width: 1000px) {
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .top-actions > span,
  .top-actions .btn span {
    display: none;
  }
  .shell {
    display: block;
  }
  .sidebar {
    position: sticky;
    top: var(--officejur-header-height, 68px);
    height: auto;
    z-index: 10;
    padding: 8px;
    display: block;
    overflow: auto;
  }
  .sidebar nav {
    display: flex;
  }
  .sidebar nav button {
    white-space: nowrap;
  }
  .sidebar-foot {
    display: none;
  }
  main {
    padding: 20px 12px;
  }
  .metrics,
  .cards,
  .grid-2.lower {
    grid-template-columns: 1fr;
  }
  .page-head {
    align-items: end;
  }
  .filters {
    display: grid;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .modal-actions.split {
    flex-wrap: wrap;
  }
  .brand small {
    display: none;
  }
}
.head-actions {
  display: flex;
  gap: 9px;
}
.page-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: #765817;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.page-help-link:hover {
  text-decoration: underline;
}
.security-note,
.integration-alert {
  display: flex;
  gap: 12px;
  padding: 13px;
  margin-top: 16px;
  border: 1px solid #d8c18e;
  border-radius: 8px;
  background: #fff8e8;
  color: #694f18;
}
.security-note > i,
.integration-alert > i {
  font-size: 20px;
  color: var(--gold);
}
.security-note p,
.integration-alert p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}
.integration-alert {
  margin: 0 0 16px;
}
.integration-alert.success {
  border-color: #a9d8ba;
  background: #ecf8f0;
  color: var(--ok);
}
.anchor-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.charge-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  white-space: nowrap;
}
.charge-actions a,
.charge-actions button {
  border: 0;
  background: none;
  color: #667085;
  padding: 7px;
}
.charge-actions a:hover,
.charge-actions button:hover {
  color: var(--gold);
}
.field-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f7f3e9;
  color: #6d5726;
  font-size: 11px;
  line-height: 1.4;
}
.package-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f3e9;
  color: #6d5726;
}
.package-line > i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff;
}
.package-line strong,
.package-line small {
  display: block;
}
.package-line strong {
  font-size: 12px;
}
.package-line small {
  font-size: 10px;
  margin-top: 2px;
}
.case-list {
  display: grid;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.case-item + .case-item {
  border-top: 1px solid var(--line);
}
.case-item button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  padding: 10px;
  background: #fff;
  text-align: left;
  color: var(--text);
}
.case-item button:hover {
  background: #faf7f0;
}
.case-item strong,
.case-item small {
  display: block;
}
.case-item strong {
  font-size: 11px;
  color: var(--navy);
}
.case-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.case-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.case-meta em {
  font-style: normal;
  font-size: 9px;
  color: var(--gold);
  font-weight: 800;
}
.case-meta i {
  font-size: 9px;
  color: #98a2b3;
}
.case-empty {
  padding: 13px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.add-case-btn {
  width: 100%;
  margin-top: 8px;
  border: 1px dashed #cfb777;
  border-radius: 7px;
  padding: 8px;
  background: #fff;
  color: #856620;
  font-size: 11px;
  font-weight: 800;
}
.client-card {
  display: flex;
  flex-direction: column;
}
.client-card .case-line:last-child {
  margin-top: auto;
  padding-top: 13px;
}
.btn.danger {
  border-color: #efc4c0;
  background: #fff;
  color: var(--bad);
}
.modal-actions > span {
  display: flex;
  gap: 9px;
}
.case-with-team {
  display: grid;
  grid-template-columns: 1fr auto;
}
.case-with-team > .case-team-btn {
  width: 105px;
  border-left: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  text-align: center;
  color: var(--gold);
}
.case-team-btn span {
  font-size: 9px;
  font-weight: 800;
}
.case-team-btn small {
  font-size: 8px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-grid {
  grid-template-columns: repeat(3, 1fr);
}
.team-card .avatar {
  font-size: 14px;
}
.team-stats {
  display: grid;
  grid-template-columns: 0.7fr 0.8fr 1.5fr;
  gap: 6px;
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.team-stats span {
  text-align: center;
}
.team-stats strong,
.team-stats small {
  display: block;
}
.team-stats strong {
  font-size: 12px;
  color: var(--navy);
}
.team-stats small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}
.mini-cases {
  display: grid;
  gap: 6px;
}
.mini-cases > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 6px;
  background: #f8f9fb;
  font-size: 10px;
}
.mini-cases span,
.mini-cases small {
  display: block;
}
.mini-cases small {
  color: var(--muted);
  margin-top: 2px;
}
.assignment-rows {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.assignment-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.6fr 0.55fr auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}
.assignment-row label {
  display: grid;
  gap: 4px;
  font-size: 10px;
  font-weight: 750;
  color: #475467;
}
.assignment-row .lead-check {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
}
.assignment-row .lead-check input {
  width: auto;
  min-height: auto;
}
.assignment-notes {
  grid-column: 1/5;
}
.remove-assignment {
  grid-column: 5;
  grid-row: 1/3;
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--bad);
  padding: 10px;
}
.allocation-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f1f4f8;
  color: var(--navy);
}
.allocation-summary span {
  font-size: 12px;
  font-weight: 800;
}
.allocation-summary strong {
  font:
    700 20px Georgia,
    serif;
}
.allocation-summary small {
  grid-column: 1/-1;
  color: var(--muted);
}
.allocation-summary.complete {
  background: #eaf7ef;
  color: var(--ok);
}
.allocation-summary.invalid {
  background: #fff0ee;
  color: var(--bad);
}
@media (max-width: 720px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .assignment-row {
    grid-template-columns: 1fr 1fr;
  }
  .assignment-notes {
    grid-column: 1/-1;
  }
  .remove-assignment {
    grid-column: 2;
    grid-row: auto;
  }
  .case-with-team {
    grid-template-columns: 1fr;
  }
  .case-with-team > .case-team-btn {
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
.contact-card header > span:last-child {
  display: flex;
  align-items: center;
  gap: 2px;
}
.contact-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  text-decoration: none;
}
.contact-icon.whatsapp {
  background: #e7f8ed;
  color: #168c49;
  font-size: 18px;
}
.contact-lines {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 8px;
  background: #f8f9fb;
  color: #475467;
  font-size: 11px;
}
.contact-lines span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-lines i {
  width: 14px;
  color: var(--gold);
}
.whatsapp-check {
  align-self: end;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f9fb;
}
.cases-grid {
  grid-template-columns: repeat(3, 1fr);
}
.case-card .case-type {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.case-client-link {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px;
  border-radius: 7px;
  background: #f1f4f8;
  color: var(--navy);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}
.case-team-summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.case-team-summary span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.case-team-summary strong {
  color: var(--navy);
}
@media (max-width: 720px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}
.phone-fields {
  display: grid;
  grid-template-columns: minmax(210px, 0.85fr) minmax(260px, 1.15fr);
  align-items: start;
  gap: 13px;
}
.phone-fields label {
  min-width: 0;
  align-self: start;
  align-content: start;
  grid-auto-rows: max-content;
}
.phone-number-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid #cfd5df;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.phone-number-field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #b387311c;
}
.phone-number-field > span {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 54px;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  background: #f8f9fb;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}
.phone-number-field input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
}
.phone-fields small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}
.phone-country-flag {
  font-size: 15px;
}
@media (max-width: 720px) {
  .phone-fields {
    grid-template-columns: 1fr;
  }
}
.detail-card {
  padding: 22px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.detail-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}
.detail-field > i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #f3ead8;
  color: var(--gold);
}
.detail-field span {
  min-width: 0;
}
.detail-field small,
.detail-field strong {
  display: block;
}
.detail-field small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.detail-field strong {
  margin-top: 4px;
  color: var(--navy);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.detail-note {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: #faf7f0;
}
.detail-note strong {
  font-size: 11px;
  color: var(--navy);
}
.detail-note p {
  margin: 5px 0 0;
  color: #475467;
  font-size: 12px;
  white-space: pre-wrap;
}
.detail-section {
  margin-top: 16px;
}
.detail-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--navy);
}
.detail-section > header span {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  border-radius: 99px;
  background: #f3ead8;
  color: #795c1c;
  font-size: 10px;
  font-weight: 800;
}
.detail-list-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 10px 3px;
  background: #fff;
  text-align: left;
  color: var(--navy);
}
.detail-list-row:hover {
  background: #fafbfc;
}
.detail-list-row span,
.detail-list-row small,
.detail-list-row strong {
  display: block;
}
.detail-list-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.detail-list-row b {
  color: var(--gold);
}
.detail-empty {
  color: var(--muted);
  font-size: 11px;
}
.detail-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
}
.detail-totals span {
  padding: 10px;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
}
.detail-totals small,
.detail-totals strong {
  display: block;
}
.detail-totals small {
  color: #c9d0dc;
  font-size: 9px;
}
.detail-totals strong {
  margin-top: 4px;
  font:
    700 14px Georgia,
    serif;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #168c49;
  color: #fff;
  text-decoration: none;
}
@media (max-width: 720px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-totals {
    grid-template-columns: 1fr;
  }
  .detail-card {
    padding: 18px;
  }
}
.allocation-preview {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  color: #475467;
  font-size: 11px;
}
.allocation-preview:empty {
  display: none;
}
.allocation-preview header,
.allocation-preview div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.allocation-preview header {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}
.allocation-preview header span {
  color: var(--muted);
  font-size: 10px;
}
.allocation-preview .warn {
  color: var(--warn);
}
.office-margin {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 3px;
  border-top: 2px solid var(--gold);
  color: var(--navy);
  font-size: 11px;
}
.office-margin strong {
  color: var(--gold);
}
.case-card header {
  align-items: center;
  min-height: 28px;
}
.case-card header > span:last-child {
  display: flex;
  align-items: center;
  gap: 2px;
}
.case-card h3 {
  min-height: 3.45em;
  line-height: 1.15;
}
.case-card > .case-client-link {
  min-height: 38px;
}
.case-card > .package-line {
  min-height: 58px;
}
.case-card > .package-line > span {
  min-width: 0;
}
.case-card > .case-team-summary {
  align-items: flex-start;
  margin-top: auto;
}
.case-card > .case-team-summary span {
  min-width: 0;
}
.case-card > .case-team-summary strong {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .case-card h3 {
    min-height: 0;
  }
  .case-card > .case-client-link,
  .case-card > .package-line {
    min-height: 0;
  }
}
.team-card header {
  align-items: center;
  min-height: 39px;
}
.team-card header > span:last-child {
  display: flex;
  align-items: center;
  gap: 2px;
}
.team-card h3 {
  min-height: 2.3em;
  line-height: 1.15;
}
.team-card > p {
  min-height: 1.4em;
}
.team-card .team-stats {
  min-height: 70px;
}
.team-cases-btn {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 55px;
  margin-top: auto;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  padding: 9px;
  background: #f8f9fb;
  color: var(--navy);
  text-align: left;
}
.team-cases-btn > i:first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #f3ead8;
  color: var(--gold);
}
.team-cases-btn span,
.team-cases-btn strong,
.team-cases-btn small {
  display: block;
  min-width: 0;
}
.team-cases-btn strong {
  font-size: 11px;
}
.team-cases-btn small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}
.team-cases-btn > i:last-child {
  color: var(--gold);
  font-size: 10px;
}
.team-cases-btn:not(:disabled):hover {
  border-color: #cfb777;
  background: #faf7f0;
}
.team-cases-btn:disabled {
  cursor: default;
  color: var(--muted);
  opacity: 0.78;
}
.case-filter-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid #d8c18e;
  border-radius: 9px;
  background: #fff8e8;
  color: #694f18;
  font-size: 12px;
}
.case-filter-context[hidden] {
  display: none;
}
.case-filter-context span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.case-filter-context button {
  border: 0;
  background: transparent;
  color: #765817;
  font-size: 11px;
  font-weight: 800;
}
.package-line.complete {
  border: 1px solid #a9d8ba;
  background: #ecf8f0;
  color: var(--ok);
}
.package-line.complete > i {
  color: var(--ok);
}
.case-card > .case-team-summary {
  margin-top: 14px;
}
.detail-note p,
.security-note p,
.integration-alert p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .team-card h3,
  .team-card > p {
    min-height: 0;
  }
  .case-filter-context {
    align-items: flex-start;
    flex-direction: column;
  }
  .detail-note p,
  .security-note p,
  .integration-alert p {
    text-align: left;
  }
}
html,
body {
  overflow-x: clip;
}
dialog {
  width: min(880px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}
#assignments-dialog {
  width: min(980px, calc(100vw - 32px));
}
dialog > form,
.detail-card {
  width: 100%;
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.form-grid {
  align-items: start;
}
.form-grid > * {
  min-width: 0;
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
}
select {
  width: 100%;
}
textarea {
  resize: vertical;
}
.assignment-row {
  grid-template-columns:
    minmax(0, 2fr) minmax(0, 1.15fr) minmax(110px, 0.7fr)
    minmax(105px, 0.65fr) 38px;
  gap: 10px;
  padding: 12px;
}
.assignment-row > * {
  min-width: 0;
}
.assignment-row input,
.assignment-row select {
  width: 100%;
}
.assignment-row .lead-check {
  white-space: nowrap;
  justify-content: flex-start;
}
.assignment-notes {
  grid-column: 1/5;
}
.remove-assignment {
  grid-column: 5;
  grid-row: 1/3;
  width: 38px;
  padding: 6px;
}
.modal-head {
  min-width: 0;
}
.modal-head > div {
  min-width: 0;
}
.modal-head h2,
.modal-head p {
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  #assignments-dialog {
    width: min(720px, calc(100vw - 24px));
  }
  .assignment-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .assignment-notes {
    grid-column: 1/-1;
  }
  .remove-assignment {
    grid-column: 2;
    grid-row: auto;
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .assignment-row .lead-check {
    grid-column: 1;
  }
}
@media (max-width: 560px) {
  dialog,
  #assignments-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  dialog > form,
  .detail-card {
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }
  .assignment-row {
    grid-template-columns: 1fr;
  }
  .assignment-notes,
  .assignment-row .lead-check,
  .remove-assignment {
    grid-column: 1;
  }
  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .modal-actions > span {
    display: grid;
  }
  .modal-actions .btn,
  .modal-actions > span .btn {
    width: 100%;
  }
}
@media (min-width: 721px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--officejur-header-height, 68px);
    bottom: 0;
    width: 230px;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 15;
  }
  .shell main {
    grid-column: 2;
  }
}
.filters input {
  flex: 1 1 320px;
  width: auto;
  min-width: 220px;
}
.filters select {
  flex: 0 1 260px;
  width: 260px;
  min-width: 170px;
}
.sidebar-foot {
  margin: 18px -4px -8px;
  padding: 16px 4px 8px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #faf7f0);
}
.month-control {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 44px;
  border: 1px solid #cfd5df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px #101a2f0a;
  overflow: hidden;
}
.month-control:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #b387311c;
}
.month-control > i {
  color: var(--gold);
  text-align: center;
}
.month-control input {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  box-shadow: none;
  background: transparent;
  font-weight: 750;
  color: var(--navy);
}
.month-control input:focus {
  border: 0;
  box-shadow: none;
}
.month-control button {
  align-self: stretch;
  border: 0;
  border-left: 1px solid var(--line);
  background: #faf7f0;
  color: var(--gold);
}
.detail-section > header span {
  display: inline-flex;
  width: auto;
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  white-space: nowrap;
  line-height: 1;
}
.detail-list-row b {
  flex: 0 0 auto;
  white-space: nowrap;
}
.detail-card .modal-actions {
  align-items: center;
}
.detail-card #detail-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.detail-card #detail-links .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  text-decoration: none;
}
.detail-card #detail-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
@media (max-width: 720px) {
  .filters input,
  .filters select {
    width: 100%;
    min-width: 0;
  }
  .sidebar-foot {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
  }
}
.month-control {
  position: relative;
  grid-template-columns: 32px minmax(0, 1fr);
}
.month-control > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  align-self: stretch;
  border: 0;
  border-left: 0;
  padding: 0 11px 0 4px;
  background: transparent;
  color: var(--navy);
  font-weight: 750;
  text-align: left;
}
.month-control > button i {
  color: var(--gold);
  font-size: 10px;
}
.month-control > input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.month-control:has(button:focus-visible) {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #b387311c;
}
.mobile-menu-btn,
.nav-backdrop {
  display: none;
}
.month-control {
  grid-template-columns: 32px minmax(0, 1fr) 24px;
  cursor: pointer;
}
.month-control > span {
  min-width: 0;
  color: var(--navy);
  font-weight: 750;
}
.month-control > i:last-of-type {
  font-size: 10px;
}
.month-control > input {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0.001;
  pointer-events: auto;
  cursor: pointer;
  -webkit-appearance: none;
}
.month-control:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px #b387311c;
}
@media (max-width: 720px) {
  .topbar {
    gap: 8px;
  }
  .brand {
    min-width: 0;
    gap: 8px;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .brand strong {
    font-size: 16px;
    white-space: nowrap;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions .icon-btn {
    width: 38px;
    min-height: 38px;
  }
  .top-actions #sync-now {
    display: inline-flex;
    width: 38px;
    min-width: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
  }
  .mobile-menu-btn {
    display: inline-block;
  }
  .sidebar {
    display: flex;
    position: fixed;
    top: var(--officejur-header-height, 68px);
    left: 0;
    bottom: 0;
    width: min(290px, 86vw);
    height: auto;
    padding: 14px;
    z-index: 25;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 40px #101a2f33;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar nav {
    display: grid;
    gap: 5px;
  }
  .sidebar nav button {
    width: 100%;
    white-space: normal;
  }
  .sidebar-foot {
    display: grid;
    margin-top: auto !important;
    padding-top: 18px !important;
    border-top: 1px solid var(--line) !important;
    background: #fff !important;
  }
  .nav-backdrop {
    position: fixed;
    inset: var(--mobile-topbar-height) 0 0;
    z-index: 24;
    width: 100%;
    height: auto;
    border: 0;
    background: #101a2f73;
  }
  .menu-open .nav-backdrop {
    display: block;
  }
  .menu-open {
    overflow: hidden;
  }
  main {
    padding-top: 20px;
  }
  .page-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .page-head > .btn,
  .page-head > .head-actions {
    align-self: flex-start;
  }
}
@media (max-width: 380px) {
  .brand img {
    display: none;
  }
  .brand strong {
    font-size: 15px;
  }
  .topbar {
    padding-left: 12px;
    padding-right: 10px;
  }
}
.month-control {
  grid-template-columns: 32px minmax(0, 1fr);
}
.month-control > input {
  display: none !important;
}
#month-dialog {
  width: min(390px, calc(100vw - 28px));
}
.month-picker-card {
  padding: 22px;
}
.month-year-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  margin-bottom: 16px;
}
.month-year-nav strong {
  text-align: center;
  font:
    700 21px Georgia,
    serif;
  color: var(--navy);
}
.month-year-nav button,
.month-picker-grid button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--navy);
  font-weight: 750;
}
.month-year-nav button {
  height: 40px;
}
.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.month-picker-grid button {
  min-height: 46px;
}
.month-picker-grid button:hover,
.month-picker-grid button:focus-visible {
  border-color: var(--gold);
  background: #faf7f0;
}
.month-picker-grid button.selected {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}
@media (max-width: 560px) {
  .month-picker-card {
    padding: 18px;
  }
}
#confirm-dialog {
  width: min(500px, calc(100vw - 28px));
}
.confirm-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 24px;
}
.confirm-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fee9e7;
  color: var(--bad);
  font-size: 20px;
}
.confirm-card h2 {
  margin: 5px 0 8px;
  font:
    700 24px Georgia,
    serif;
  color: var(--navy);
}
.confirm-card p:not(.eyebrow) {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}
.confirm-impact {
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--bad);
  border-radius: 0 7px 7px 0;
  background: #fff4f2;
  color: #7a271a;
  font-size: 11px;
  line-height: 1.45;
}
.confirm-impact[hidden] {
  display: none;
}
.confirm-card .modal-actions {
  grid-column: 1/-1;
  margin-top: 4px;
}
.btn.danger {
  background: var(--bad);
  color: #fff;
}
.btn.danger:hover {
  background: #912018;
}
@media (max-width: 560px) {
  .confirm-card {
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 18px;
  }
  .confirm-icon {
    width: 40px;
    height: 40px;
  }
  .confirm-card .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: row;
  }
  .confirm-card .modal-actions .btn {
    width: 100%;
  }
}
.head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .head-actions {
    justify-content: flex-start;
  }
  .head-actions .btn {
    flex: 1 1 auto;
  }
  .page-help-link {
    margin-top: 8px;
  }
}
.contact-card header {
  min-height: 39px;
  align-items: center;
}
.contact-card h3 {
  min-height: 2.3em;
  line-height: 1.15;
}
.contact-card > p {
  min-height: 1.4em;
}
.contact-card > .contact-lines {
  min-height: 78px;
}
.contact-card > .case-line {
  min-height: 58px;
  margin-top: auto;
  align-items: flex-start;
}
.contact-card > .case-line .amount {
  display: flex;
  align-items: baseline;
}
.contact-card > .case-line .amount small {
  margin-left: 2px;
}
@media (max-width: 720px) {
  .contact-card h3,
  .contact-card > p,
  .contact-card > .contact-lines,
  .contact-card > .case-line {
    min-height: 0;
  }
}
.document-menu {
  position: relative;
  margin-top: 10px;
}
.document-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  border: 1px solid #d8c18e;
  border-radius: 7px;
  padding: 0 11px;
  background: #faf7f0;
  color: #765817;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.document-menu summary::-webkit-details-marker {
  display: none;
}
.document-menu summary span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.document-menu summary > i {
  font-size: 9px;
  transition: transform 0.16s ease;
}
.document-menu[open] summary {
  border-color: var(--gold);
  background: #f3ead8;
}
.document-menu[open] summary > i {
  transform: rotate(180deg);
}
.document-options {
  position: absolute;
  inset: calc(100% + 6px) 0 auto;
  z-index: 8;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 16px 36px #101a2f24;
}
.document-options button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 9px;
  background: #fff;
  color: var(--navy);
  text-align: left;
}
.document-options button:hover,
.document-options button:focus-visible {
  background: #faf7f0;
}
.document-options button > i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #f3ead8;
  color: var(--gold);
}
.document-options strong,
.document-options small {
  display: block;
}
.document-options strong {
  font-size: 11px;
}
.document-options small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}
.document-menu + .add-case-btn {
  margin-top: 8px;
}

.package-section {
  margin-bottom: 16px;
}
.package-list-card {
  width: 100%;
  max-height: calc(100dvh - 32px);
  margin: 0;
  overflow-y: auto;
  padding: 22px;
  background: #fff;
}
.package-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.package-section > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.package-section h2,
.package-section p {
  margin: 0;
}
.package-section p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.section-count {
  border-radius: 999px;
  padding: 5px 9px;
  color: #765817;
  background: #f3ead8;
  font-size: 11px;
  font-weight: 800;
}
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.package-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fbfcfe;
}
.package-card > header,
.package-card .package-values {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.package-card h3,
.package-card p {
  margin: 0;
}
.package-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}
.package-card p,
.package-card small {
  color: var(--muted);
  font-size: 10px;
}
.package-card .package-values span {
  display: grid;
  gap: 2px;
}
.package-card .package-values strong {
  font-size: 13px;
}
.package-card .package-values .balance strong {
  color: #765817;
}
.package-card .package-cases {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}

.agreement-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d8c18e;
  border-radius: 10px;
  padding: 14px;
  background: #fcfaf6;
}
.agreement-editor[hidden] {
  display: none;
}
.agreement-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.agreement-heading strong,
.agreement-heading small {
  display: block;
}
.agreement-heading strong {
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}
.agreement-heading small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.agreement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.agreement-block {
  display: contents;
}
.agreement-block[hidden] {
  display: none;
}
.agreement-summary {
  align-self: start;
  border-radius: 8px;
  padding: 10px 12px;
  color: #475467;
  background: #fff;
  font-size: 11px;
}
.agreement-summary strong {
  color: var(--navy);
}
.agreement-summary.warn {
  color: #912018;
  background: #fff1f0;
}
.stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.btn.compact {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 10px;
}
.stage-list {
  display: grid;
  gap: 8px;
}
.stage-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(110px, 0.45fr) minmax(
      140px,
      0.55fr
    ) 36px;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.stage-row [data-remove-stage] {
  display: grid;
  place-items: center;
  width: 36px;
  height: 40px;
  border: 1px solid #efc6c2;
  border-radius: 7px;
  color: var(--bad);
  background: #fff;
}
@media (max-width: 720px) {
  .package-grid,
  .agreement-grid,
  .stage-row {
    grid-template-columns: 1fr;
  }
  .stage-row [data-remove-stage] {
    width: 100%;
  }
  .agreement-heading,
  .stage-heading {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 640px) {
  .files-modal {
    padding: 16px;
  }
  .file-upload-panel,
  .client-file-card {
    grid-template-columns: 1fr;
  }
  .file-icon {
    display: none;
  }
  .file-actions {
    justify-content: flex-end;
  }
  .file-actions button {
    width: 38px;
    height: 36px;
  }
  .file-preview iframe {
    height: 58vh;
  }
}
