.brand-logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(195deg, #42424a 0%, #191919 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.navbar-vertical .navbar-nav>.nav-item .nav-link.active .material-symbols-rounded,
.navbar-vertical .navbar-nav>.nav-item .nav-link.active .nav-link-text {
  color: #fff !important;
}

.erp-table-card .table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7b809a;
}

.erp-table-card .table tbody td,
.table tbody td {
  vertical-align: middle;
}

.erp-metric-icon {
  width: 48px;
  height: 48px;
  border-radius: .75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.erp-page-actions .btn,
.erp-card-actions .btn {
  margin-bottom: .35rem;
}

.dt-container .dt-search input,
.dt-container .dt-length select {
  border: 1px solid #d2d6da;
  border-radius: .5rem;
  padding: .45rem .75rem;
  background: #fff;
}

.dt-container .dt-search input:focus,
.dt-container .dt-length select:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #e91e63;
  box-shadow: 0 0 0 .15rem rgba(233, 30, 99, .12);
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  padding-top: 1rem;
}

.badge-soft-dark {
  background: rgba(52, 71, 103, .1);
  color: #344767;
}

.badge-soft-success {
  background: rgba(76, 175, 80, .12);
  color: #2e7d32;
}

.badge-soft-warning {
  background: rgba(251, 140, 0, .12);
  color: #ef6c00;
}

.badge-soft-danger {
  background: rgba(244, 67, 54, .12);
  color: #d32f2f;
}

.table td .btn,
.table td form {
  display: inline-block;
}

.page-header-card {
  background: linear-gradient(195deg, #42424a 0%, #191919 100%);
}

.auth-cover {
  background-image: linear-gradient(rgba(26, 32, 53, 0.72), rgba(26, 32, 53, 0.72)), url('../material-dashboard/assets/img/office-dark.jpg');
  background-size: cover;
  background-position: center;
}

.auth-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
}

.input-group.input-group-outline.is-filled .form-label,
.input-group.input-group-outline.focused .form-label {
  top: -.8rem;
  font-size: .6875rem !important;
}

.input-group.input-group-outline.is-filled .form-control {
  border-color: #d2d6da;
  border-top-color: transparent;
  box-shadow: inset 1px 0 #d2d6da, inset -1px 0 #d2d6da, inset 0 -1px #d2d6da;
}

.erp-kv {
  padding: .85rem 1rem;
  border-radius: .9rem;
  background: rgba(52, 71, 103, .04);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.erp-kv span {
  color: #7b809a;
  font-size: .85rem;
}

.erp-kv strong {
  color: #344767;
  text-align: right;
  font-size: 0.8rem;
}

.erp-list-row {
  padding: .9rem 0;
  border-bottom: 1px solid rgba(52, 71, 103, .08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.erp-list-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.erp-list-row:first-child {
  padding-top: 0;
}

.erp-note-card {
  border: 1px solid rgba(52, 71, 103, .08);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: .9rem;
  background: #fff;
}

.alert-warning.text-white {
  color: #fff !important;
}

.card .form-label {
  color: #344767;
  font-weight: 600;
  margin-bottom: .35rem;
}

.card .form-control,
.card .form-select {
  border: 1px solid #d2d6da;
  padding: .4rem .8rem;
}

.table thead th {
  font-size: .72rem !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7b809a;
}

@media (max-width: 1199.98px) {
  .sidenav.fixed-start {
    transform: translateX(-17.125rem);
  }

  .g-sidenav-pinned .sidenav.fixed-start {
    transform: translateX(0);
  }
}

.badge-soft-info {
  background: rgba(33, 150, 243, .12);
  color: #1565c0;
}

.erp-chart-wrap {
  position: relative;
  min-height: 320px;
}

.erp-chart-wrap-sm {
  min-height: 280px;
}

.erp-guidance-card {
  background: linear-gradient(135deg, rgba(52, 71, 103, .06), rgba(233, 30, 99, .04));
}

.erp-step-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: rgba(52, 71, 103, .08);
  color: #344767;
  font-size: .85rem;
  font-weight: 600;
}

.erp-step-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #fff;
  color: #344767;
  font-size: .75rem;
  font-weight: 700;
}

.erp-tip-box {
  border: 1px solid rgba(52, 71, 103, .08);
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, .75);
}

.erp-workspace-nav {
  border-top: 1px solid rgba(52, 71, 103, .08);
  padding-top: .85rem;
}

.erp-workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  background: rgba(52, 71, 103, .08);
  color: #344767;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
}

.erp-workspace-chip:hover {
  background: rgba(52, 71, 103, .12);
  color: #191919;
}

.erp-workspace-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #fff;
  font-size: .72rem;
}

.erp-workspace-stat {
  border: 1px solid rgba(52, 71, 103, .08);
  box-shadow: none;
}

.erp-workspace-stat h4 {
  color: #344767;
}

.erp-sidenav .navbar-collapse {
  max-height: calc(100vh - 84px);
}

#sidenav-scrollbar.erp-sidenav-scroll {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 .5rem .85rem;
  flex-wrap: nowrap;
}

.erp-sidebar-section {
  min-width: 0;
}

.erp-sidebar-group {
  display: block;
  margin-bottom: .35rem;
}

.erp-sidebar-group>summary {
  list-style: none;
}

.erp-sidebar-group>summary::-webkit-details-marker,
.erp-sidebar-group>summary::marker {
  display: none;
}

.erp-sidebar-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

.erp-sidebar-group-toggle:hover,
.erp-sidebar-group[open]>.erp-sidebar-group-toggle {
  background: rgba(52, 71, 103, .06);
  color: #344767;
}

.erp-sidebar-group-label {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.erp-sidebar-group-toggle .nav-link-text,
.erp-sidebar-subnav .nav-link .nav-link-text {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

.erp-sidebar-group-toggle i,
.erp-sidebar-subnav .nav-link i,
.erp-chevron {
  flex: 0 0 auto;
}

.erp-chevron {
  font-size: 1.1rem;
  opacity: .7;
  transition: transform .2s ease;
}

.erp-sidebar-group[open] .erp-chevron {
  transform: rotate(180deg);
}

.erp-sidebar-subnav {
  list-style: none;
  margin: .2rem 0 .6rem;
  padding: 0 0 0 .7rem;
  border-left: 1px solid rgba(52, 71, 103, .08);
}

.erp-sidebar-subnav .nav-item {
  min-width: 0;
}

.erp-sidebar-subnav .nav-link {
  margin-left: .35rem;
  padding-top: .58rem;
  padding-bottom: .58rem;
}

.erp-sidenav {
  top: 0 !important;
  bottom: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-radius: 0 !important;
}

.erp-sidenav .sidenav-header {
  padding-top: .25rem;
}

.erp-sidenav .navbar-brand {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.erp-sidenav .nav-link,
.erp-sidebar-group-toggle {
  padding-left: .9rem !important;
  padding-right: .75rem !important;
}

.erp-sidebar-subnav {
  padding-left: .45rem;
}

.erp-sidebar-subnav .nav-link {
  margin-left: .1rem;
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.erp-sidenav .material-symbols-rounded {
  margin-right: .2rem;
}

#sidenav-scrollbar.erp-sidenav-scroll {
  max-height: calc(100vh - 78px) !important;
  padding: 0 .35rem 1rem !important;
}


/* Global table action alignment cleanup */
.table td .badge,
.table td .btn,
.table td .form-select,
.table td .form-control,
.table td form {
  vertical-align: middle;
}

.table td form {
  margin-bottom: 0;
}

.table td .d-inline-flex,
.table td form.d-inline-flex,
.table td .inline-actions,
.table td .btn-group {
  align-items: center;
  gap: .45rem;
}

.table td .btn,
.table td .btn-sm {
  line-height: 1.2;
}

.table td .form-select,
.table td .form-select-sm,
.table td .form-control,
.table td .form-control-sm {
  margin-bottom: 0;
}

.table td:last-child .form-select-sm,
.table td:last-child .form-control-sm {
  min-height: 2rem;
  padding-top: .28rem;
  padding-bottom: .28rem;
}

.table td:last-child .btn-sm {
  min-height: 1.5rem;
  font-size: 0.7rem;
}


/* Dashboard compact styling moved out of the view */
.dashboard-compact .row {
  --bs-gutter-x: 1.15rem;
}

.dashboard-compact .dashboard-metric-col {
  margin-bottom: 1.4rem;
}

.dashboard-compact .dashboard-section-col {
  margin-bottom: 1rem;
}

.dashboard-compact .dashboard-metric-card {
  min-width: 0;
}

.dashboard-compact .dashboard-metric-card .card-header {
  padding: .8rem .95rem .25rem !important;
}

.dashboard-compact .dashboard-metric-card .card-footer {
  padding: .8rem .95rem !important;
}

.dashboard-compact .dashboard-metric-icon {
  width: 3.6rem;
  height: 3.6rem;
  margin-top: -1.9rem !important;
}

.dashboard-compact .dashboard-metric-label {
  font-size: .76rem;
  line-height: 1.2;
}

.dashboard-compact .dashboard-metric-value {
  font-size: 1.32rem;
  line-height: 1.05;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-compact .dashboard-metric-sub {
  font-size: .78rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.dashboard-compact .dashboard-watchlist-item {
  padding: .8rem .9rem !important;
}

.dashboard-compact .dashboard-watchlist-item p {
  font-size: .78rem !important;
  line-height: 1.2;
}

.dashboard-compact .dashboard-watchlist-item h5 {
  font-size: 1.05rem;
}

.dashboard-compact .card-header h6,
.dashboard-compact .card-header .h6 {
  font-size: .88rem;
  margin-bottom: .15rem;
}

.dashboard-compact .card-header p.text-sm,
.dashboard-compact .card-body p.text-sm,
.dashboard-compact .table .text-sm {
  font-size: .76rem !important;
  line-height: 1.32;
}

.dashboard-compact .text-xs {
  font-size: .77rem !important;
  line-height: 1.22;
}

.dashboard-compact .erp-table-card .card-header {
  padding: .85rem 1rem .2rem;
}

.dashboard-compact .erp-table-card .table th,
.dashboard-compact .erp-table-card .table td {
  padding-top: .55rem;
  padding-bottom: .55rem;
  vertical-align: top;
  font-size: .78rem;
}

.dashboard-compact .erp-table-card .fw-semibold {
  font-size: .82rem;
  line-height: 1.25;
}

.dashboard-compact .erp-table-card .table td,
.dashboard-compact .erp-table-card .table th,
.dashboard-compact .erp-table-card .table a,
.dashboard-compact .erp-table-card .fw-semibold,
.dashboard-compact .erp-table-card .badge,
.dashboard-compact .erp-table-card .btn {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-compact .table-responsive {
  overflow-x: auto;
}

.dashboard-compact .btn.btn-sm {
  padding: .28rem .46rem;
  font-size: .78rem;
}

@media (max-width: 991.98px) {
  .dashboard-compact .dashboard-metric-value {
    font-size: 1.22rem;
  }
}

/* Listing pages */
.erp-listing-card .table-responsive {
  overflow-x: hidden;
}

.erp-compact-listing-table {
  table-layout: fixed;
  width: 100%;
}

.erp-compact-listing-table th,
.erp-compact-listing-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.erp-compact-listing-table thead th {
  font-size: .72rem;
}

.erp-compact-listing-table tbody td {
  font-size: .84rem;
}

.erp-compact-listing-table .text-sm {
  font-size: .83rem !important;
  line-height: 1.3;
}

.erp-compact-listing-table .text-xs {
  font-size: .72rem !important;
  line-height: 1.25;
}

.erp-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.erp-listing-actions .btn {
  margin-bottom: 0 !important;
  padding: .28rem .56rem;
  font-size: .72rem;
}

.matters-index-page,
.matters-register-page,
.erp-matter-page {
  font-size: .9rem;
}

.matters-index-page h3,
.matters-register-page h3,
.erp-matter-page h3 {
  font-size: 1.35rem;
}

.matters-index-page .text-muted,
.matters-index-page .form-label,
.matters-index-page .form-control,
.matters-index-page .form-select,
.matters-index-page .btn,
.matters-index-page .table,
.matters-index-page .dataTables_wrapper,
.matters-index-page .dataTables_wrapper .dataTables_filter input,
.matters-index-page .dataTables_wrapper .dataTables_length select,
.matters-register-page .text-muted,
.matters-register-page .form-label,
.matters-register-page .form-control,
.matters-register-page .form-select,
.matters-register-page .btn,
.matters-register-page .table,
.matters-register-page .dataTables_wrapper,
.matters-register-page .dataTables_wrapper .dataTables_filter input,
.matters-register-page .dataTables_wrapper .dataTables_length select,
.erp-matter-page .text-muted,
.erp-matter-page .form-label,
.erp-matter-page .form-control,
.erp-matter-page .form-select,
.erp-matter-page .btn,
.erp-matter-page .table {
  font-size: .88rem;
}

.matters-index-page .card-body,
.matters-register-page .card-body {
  padding: .85rem .95rem;
}

.matters-index-page .btn,
.matters-register-page .btn,
.erp-matter-page .btn {
  padding-top: .4rem;
  padding-bottom: .4rem;
}

.matters-index-page .btn-sm,
.matters-register-page .btn-sm,
.erp-matter-page .btn-sm {
  font-size: .76rem;
}

.matters-index-page .table th,
.matters-register-page .table th,
.erp-matter-page .table th {
  font-size: .72rem;
}

.matters-index-page .table td,
.matters-register-page .table td,
.erp-matter-page .table td {
  font-size: .8rem;
}

.matters-index-table thead th {
  font-size: .71rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #6c757d;
  background: #f8f9fa;
  border-bottom-width: 1px;
}

.matters-index-table tbody tr:hover {
  background: #fbfcff;
}

.matters-index-table .matter-cell {
  display: flex;
  flex-direction: column;
  gap: .28rem;
}

.matters-index-table .matter-ref {
  font-size: .83rem;
  font-weight: 700;
  line-height: 1.2;
}

.matters-index-table .matter-title {
  font-size: .8rem;
  color: #344767;
  line-height: 1.32;
}

.matters-index-table .matter-meta-line {
  display: flex;
  gap: .35rem;
  align-items: flex-start;
  font-size: .72rem;
  color: #67748e;
  line-height: 1.3;
}

.matters-index-table .matter-meta-line-wrap {
  display: block;
}

.matters-index-table .matter-meta-label {
  min-width: 3.9rem;
  font-weight: 600;
  color: #495057;
}

.matters-index-table .matter-inline-link {
  color: #0d6efd;
  text-decoration: none;
}

.matters-index-table .matter-inline-link:hover,
.matters-index-table .matter-ref a:hover {
  text-decoration: underline;
}

.matters-index-table .matter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.matters-index-table .matter-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7dee8;
  border-radius: 999px;
  padding: .18rem .52rem;
  font-size: .68rem;
  font-weight: 600;
  color: #344767;
  background: #fff;
}

.matters-index-table .matter-badge-status {
  background: #f2f6ff;
  border-color: #c9dbff;
  color: #0b5ed7;
}

.matters-index-table .matter-owner-name,
.matters-index-table .matter-detail-primary {
  font-size: .79rem;
  font-weight: 600;
  color: #344767;
  line-height: 1.28;
}

.matters-table-actions {
  gap: .35rem;
}

.matters-table-actions .btn {
  min-width: 3.7rem;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .matters-index-table {
    min-width: 980px;
  }
}

.erp-matter-page {
  color: #344767;
}

.erp-matter-page .card {
  border: 1px solid #e8edf3;
  box-shadow: none;
}

.erp-matter-page .card-header {
  background: #fff;
  border-bottom: 1px solid #eef2f6;
  padding: 1rem 1.1rem;
}

.erp-matter-page .card-body {
  padding: 1rem 1.1rem;
}

.erp-matter-page .btn {
  font-weight: 600;
  border-radius: .65rem;
  box-shadow: none !important;
}

.erp-matter-page .btn.btn-sm {
  padding: .44rem .8rem;
  line-height: 1.2;
}

.erp-matter-page .form-label {
  font-size: .78rem;
  font-weight: 700;
  color: #495057;
  margin-bottom: .45rem;
}

.erp-matter-page .form-control,
.erp-matter-page .form-select {
  min-height: calc(1.5em + .95rem + 2px);
  border-color: #dbe3ee;
}

.erp-matter-page .form-control:focus,
.erp-matter-page .form-select:focus {
  border-color: #a6bce4;
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .08);
}

.erp-matter-page .text-sm {
  font-size: .82rem !important;
}

.erp-matter-page .text-xs {
  font-size: .72rem !important;
}

.erp-matter-page .table-responsive {
  overflow-y: hidden;
}

.erp-matter-page .page-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.erp-matter-page .page-toolbar-copy {
  min-width: 0;
  flex: 1 1 18rem;
}

.erp-matter-page .page-toolbar-copy p:last-child,
.erp-matter-page .page-toolbar-copy small:last-child {
  margin-bottom: 0;
}

.erp-matter-page .page-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .65rem;
}

.erp-matter-page .page-toolbar-actions .btn,
.erp-matter-page .page-toolbar-actions .dropdown {
  margin-bottom: 0;
}

.erp-matter-page .page-toolbar-card .card-body {
  padding: 1.15rem 1.2rem;
}

.erp-matter-page .matter-form-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
}

.erp-matter-page .matter-form-section-copy {
  display: grid;
  gap: .2rem;
}

.erp-matter-page .matter-form-section-copy strong {
  font-size: .94rem;
  color: #344767;
}

.erp-matter-page .matter-form-section-copy small {
  font-size: .74rem;
  color: #6c757d;
  line-height: 1.4;
}

.erp-matter-page .matter-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
  padding-top: .5rem;
}

.erp-matter-page .matter-form-actions .btn {
  margin-bottom: 0;
}

.erp-matter-page .matter-form-footer-note {
  font-size: .74rem;
  color: #6c757d;
  line-height: 1.4;
  max-width: 38rem;
}

.erp-matter-page .matter-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.erp-matter-page .matter-choice-card {
  border: 1px solid #e8edf3;
  box-shadow: none;
}

.erp-matter-page .matter-choice-card .card-body {
  padding: 1.35rem;
}

.erp-matter-page .matter-documents-table .document-title {
  font-size: .85rem;
  font-weight: 700;
  color: #344767;
}

.erp-matter-page .matter-documents-table .document-meta {
  font-size: .72rem;
  color: #67748e;
  line-height: 1.35;
  margin-top: .18rem;
}

.erp-matter-page .matter-documents-table .document-status {
  font-size: .78rem;
  font-weight: 700;
  color: #344767;
}

@media (max-width: 767.98px) {
  .erp-matter-page .page-toolbar-actions,
  .erp-matter-page .matter-form-actions {
    justify-content: flex-start;
  }
}

.erp-task-page .task-summary-card {
  border: 1px solid #e8edf3;
  box-shadow: none;
  transition: border-color .18s ease, transform .18s ease;
}

.erp-task-page .task-summary-card:hover {
  border-color: #cfd8e3;
  transform: translateY(-1px);
}

.erp-task-page .task-summary-card .card-body {
  padding: .95rem 1rem;
}

.erp-task-page .task-filter-form .form-control[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.tasks-register-table thead th {
  font-size: .71rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #6c757d;
  background: #f8f9fa;
  border-bottom-width: 1px;
}

.tasks-register-table tbody tr:hover {
  background: #fbfcff;
}

.tasks-register-table .task-primary-cell,
.tasks-register-table .task-matter-cell {
  display: flex;
  flex-direction: column;
  gap: .22rem;
}

.tasks-register-table .task-title-link,
.tasks-register-table .task-title-text,
.tasks-register-table .task-matter-ref,
.tasks-register-table .task-owner-name,
.tasks-register-table .task-due-date {
  font-size: .82rem;
  font-weight: 700;
  color: #344767;
  line-height: 1.28;
}

.tasks-register-table .task-title-link,
.tasks-register-table .task-matter-ref {
  text-decoration: none;
}

.tasks-register-table .task-title-link:hover,
.tasks-register-table .task-matter-ref:hover {
  text-decoration: underline;
}

.tasks-register-table .task-primary-subtitle,
.tasks-register-table .task-matter-title,
.tasks-register-table .task-owner-meta,
.tasks-register-table .task-due-hint {
  font-size: .72rem;
  color: #67748e;
  line-height: 1.35;
}

.tasks-register-table .task-primary-note,
.tasks-register-table .task-matter-meta {
  font-size: .74rem;
  color: #4f5b6d;
  line-height: 1.4;
}

.tasks-register-table .task-status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tasks-register-table .task-due-state-overdue {
  color: #dc3545;
  font-weight: 700;
}

.tasks-register-table .task-due-state-today {
  color: #d97706;
  font-weight: 700;
}

.tasks-register-table .task-due-state-soon {
  color: #0d6efd;
  font-weight: 700;
}

.tasks-register-table .task-actions-cell {
  min-width: 8.6rem;
}

@media (max-width: 991.98px) {
  .tasks-register-table {
    min-width: 900px;
  }
}

.erp-collections-page .card-body .text-sm {
  font-size: .8rem !important;
}

.erp-collections-page .card-body .text-xs {
  font-size: .72rem !important;
}

.erp-collections-page h4 {
  font-size: 1.2rem;
}

.erp-collections-page h6 {
  font-size: 1rem;
}

/* CRM (Clients / Organizations / Contacts) compact styling */
.erp-crm-compact {
  font-size: .86rem;
}

.erp-crm-compact .page-header-card .card-body {
  padding: 1.05rem 1.1rem !important;
}

.erp-crm-compact .page-header-card h3 {
  font-size: 1.22rem;
}

.erp-crm-compact .page-header-card h5 {
  font-size: 1.05rem;
}

.erp-crm-compact .page-header-card p,
.erp-crm-compact .page-header-card .text-sm {
  font-size: .78rem !important;
  line-height: 1.35;
}

.erp-crm-compact .btn {
  font-size: .74rem;
  padding: .38rem .72rem;
}

.erp-crm-compact .btn.btn-sm {
  font-size: .72rem;
  padding: .34rem .66rem;
}

.erp-crm-compact .badge,
.erp-crm-compact .badge.badge-sm {
  font-size: .70rem;
}

.erp-crm-compact .card-header h6 {
  font-size: .9rem;
}

.erp-crm-compact .card-body {
  font-size: .84rem;
}

.erp-crm-compact h4 {
  font-size: 1.12rem;
}

.erp-crm-compact h5 {
  font-size: 1rem;
}

.erp-crm-compact .text-sm {
  font-size: .78rem !important;
}

.erp-crm-compact .text-xs {
  font-size: .72rem !important;
}

.erp-crm-compact .erp-kv {
  padding: .7rem .85rem;
}

.erp-crm-compact .erp-kv span {
  font-size: .75rem;
}

.erp-crm-compact .erp-kv strong {
  font-size: .84rem;
}

.erp-crm-compact .erp-list-row {
  padding: .75rem 0;
}

.erp-crm-compact .erp-list-row .fw-semibold,
.erp-crm-compact .erp-list-row a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.erp-crm-compact .erp-table-card .table thead th {
  font-size: .7rem;
}

.erp-crm-compact .erp-table-card .table tbody td {
  font-size: .78rem;
}

.erp-crm-compact .dt-container .dt-search input,
.erp-crm-compact .dt-container .dt-length select,
.erp-crm-compact .dataTables_wrapper .dataTables_filter input,
.erp-crm-compact .dataTables_wrapper .dataTables_length select {
  font-size: .78rem;
  padding: .38rem .6rem;
}


.billing-toolbar-search {
  align-items: center;
}

.billing-toolbar-search-input {
  height: 38px;
  min-height: 38px;
  padding: .35rem .75rem;
  font-size: .875rem;
  line-height: 1.4;
}


:root {
  --erp-sidebar-width: 250px;
}

.erp-sidenav,
.main-content,
.erp-sidebar-edge-toggle {
  transition: transform .2s ease, margin-left .2s ease, left .2s ease, box-shadow .2s ease;
}

.erp-sidebar-edge-toggle {
  border: 1px solid rgba(52, 71, 103, .12);
}

@media (min-width: 1200px) {
  .erp-sidebar-edge-toggle {
    position: fixed;
    top: .25rem;
    left: calc(var(--erp-sidebar-width) - .55rem);
    transform: none;
    width: 2.15rem;
    height: 3rem;
    padding: 0;
    border-radius: 0 999px 999px 0;
    z-index: 1040;
  }

  .erp-sidebar-edge-toggle .material-symbols-rounded {
    line-height: 1;
  }

  body.erp-sidebar-hidden .erp-sidenav {
    transform: translateX(calc(-100% - 1rem));
  }

  body.erp-sidebar-hidden .main-content {
    margin-left: 0 !important;
  }

  body.erp-sidebar-hidden .erp-sidebar-edge-toggle {
    left: .35rem;
    box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .12) !important;
  }
}

.erp-actions-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: .22rem .38rem;
  line-height: 1;
}

.erp-actions-dropdown-toggle.has-label {
  gap: .35rem;
  min-width: 0;
  padding: .35rem .72rem;
}

.erp-actions-dropdown-toggle .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
}

.erp-actions-dropdown-text {
  font-size: .76rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.erp-actions-dropdown-menu {
  min-width: 11rem;
}

.erp-actions-dropdown-menu .dropdown-item {
  font-size: .82rem;
}

.erp-actions-dropdown-menu form {
  margin: 0;
}

/* Shared utilities moved out of views */
.dashboard-click-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.dashboard-click-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .08);
}

.erp-icon-18 {
  font-size: 18px !important;
}

.erp-clickable-card,
.erp-clickable-row,
.js-report-row-link {
  cursor: pointer;
}

.erp-sidebar-brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, .08);
}

.system-logo-preview {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  border: 1px solid #e9ecef;
}

.system-favicon-preview {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.auth-brand-mark-padded {
  padding: 12px;
}

.auth-brand-logo {
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
}

.auth-card {
  max-width: 480px;
}

.install-card {
  max-width: 760px;
}

.install-complete-card {
  max-width: 640px;
  width: 100%;
}

.matter-tag-select {
  min-width: 220px;
}

.matter-tag-badge {
  font-size: .78rem;
  max-width: 100%;
}

.matter-intake-update-col {
  width: 260px;
}

.billing-particular-name-col {
  min-width: 200px;
}

.billing-particular-description-col {
  min-width: 260px;
}

.budget-item-type-col {
  width: 170px;
}

.budget-item-amount-col {
  width: 180px;
}

.detail-span-full {
  grid-column: 1 / -1;
}

.matter-updates-panel {
  max-height: 360px;
  overflow: auto;
}

/* Dashboard */
.dashboard-clickable-row {
  cursor: pointer;
}

.dashboard-clickable-row:hover td {
  background-color: rgba(0, 0, 0, .02);
}

.dashboard-clickable-row:focus {
  outline: 2px solid rgba(26, 115, 232, .35);
  outline-offset: -2px;
}

.dashboard-inline-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.dashboard-client-link {
  color: var(--bs-info, #17c1e8);
  font-weight: 600;
  text-decoration: none;
}

.dashboard-client-link:hover {
  text-decoration: underline;
}

/* Billing reports */
.billing-report-clickable-row {
  cursor: pointer;
}

.billing-report-clickable-row:hover > td,
.billing-report-clickable-tile:hover {
  background-color: rgba(0, 0, 0, .02);
}

.billing-report-clickable-row:focus,
.billing-report-clickable-tile:focus {
  outline: 2px solid rgba(26, 115, 232, .35);
  outline-offset: -2px;
}

.billing-report-clickable-tile {
  display: block;
  border-radius: .75rem;
  color: inherit;
  text-decoration: none;
}

/* Matter register */
.matters-register-page .page-header-card .btn {
  font-size: .78rem;
  padding: .55rem .8rem;
}

.matters-register-page .summary-card-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7b809a;
}

.matters-register-page .summary-card-value {
  font-size: 1rem;
  font-weight: 700;
  color: #344767;
}

.matters-register-page .matter-type-pill {
  display: inline-flex;
  align-items: center;
  padding: .22rem .55rem;
  border-radius: 999px;
  border: 1px solid #e7ebf0;
  background: #f8f9fa;
  color: #344767;
  font-size: .7rem;
  font-weight: 700;
  margin-left: .45rem;
  vertical-align: middle;
}

.matters-register-page .table th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.matters-register-page .table td {
  font-size: .84rem;
  vertical-align: middle;
}

/* Task detail */
.task-page-header .btn {
  --bs-btn-padding-y: .45rem;
  --bs-btn-padding-x: .85rem;
}

.task-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.task-subtitle {
  font-size: .78rem;
  color: #6c757d;
}

.task-detail-label {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8392ab;
  margin-bottom: .2rem;
  font-weight: 700;
}

.task-detail-value {
  font-size: .88rem;
  color: #344767;
}

.task-detail-value.text-strong {
  font-weight: 600;
}

.task-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid #e9ecef;
  border-radius: .75rem;
  padding: .35rem .8rem;
  background: #fff;
  min-width: 0;
}

.task-meta-chip .label {
  font-size: .68rem;
  text-transform: uppercase;
  color: #8392ab;
  font-weight: 700;
}

.task-meta-chip .value {
  font-size: .82rem;
  color: #344767;
  font-weight: 600;
}

.task-note-item + .task-note-item {
  border-top: 1px solid #f0f2f5;
}

.task-note-body {
  font-size: .88rem;
  color: #344767;
}

.task-note-meta {
  font-size: .72rem;
  color: #8392ab;
}

.task-action-stack .btn {
  justify-content: center;
}

.task-inline-actions .btn {
  min-width: 0;
  flex: 1 1 10rem;
}

/* Matter workspace shell */
.workspace-shell {
  font-size: .88rem !important;
}

.workspace-shell h3 {
  font-size: 1.45rem !important;
  line-height: 1.25 !important;
}

.workspace-shell h4 {
  font-size: 1.15rem !important;
}

.workspace-shell h5 {
  font-size: 1rem !important;
}

.workspace-shell h6 {
  font-size: .9rem !important;
}

.workspace-shell .card-body,
.workspace-shell .card-header,
.workspace-shell .workspace-record,
.workspace-shell .workspace-soft-panel,
.workspace-shell .workspace-file-note,
.workspace-shell .table,
.workspace-shell .list-group-item,
.workspace-shell .form-control,
.workspace-shell .form-select,
.workspace-shell .form-label,
.workspace-shell .form-check-label,
.workspace-shell .btn,
.workspace-shell p,
.workspace-shell li,
.workspace-shell td,
.workspace-shell th {
  font-size: .84rem !important;
}

.workspace-shell .page-header-card p,
.workspace-shell .workspace-section-title p,
.workspace-shell .text-sm {
  font-size: .78rem !important;
}

.workspace-shell .text-xs {
  font-size: .72rem !important;
}

.workspace-shell .workspace-muted {
  color: #6c757d;
  font-size: .76rem !important;
}

.workspace-shell .workspace-kpi {
  font-size: 1rem !important;
  font-weight: 700;
  color: #344767;
}

.workspace-shell .workspace-mini-kpi {
  font-size: .95rem !important;
  font-weight: 700;
  color: #344767;
}

.workspace-shell .badge {
  font-size: .68rem !important;
}

.workspace-shell .btn-sm {
  padding: .4rem .72rem !important;
  font-size: .72rem !important;
  line-height: 1.2;
}

.workspace-shell .workspace-file-grid .fw-semibold,
.workspace-shell .workspace-record .fw-semibold,
.workspace-shell .card-body .fw-semibold {
  font-size: .86rem !important;
}

.workspace-shell .page-header-card .card-body {
  min-height: 0;
}

.workspace-shell .workspace-section {
  margin-top: 1.5rem;
}

.workspace-shell .workspace-section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.workspace-shell .workspace-section-title h5 {
  margin-bottom: .25rem;
}

.workspace-shell .workspace-section-title p {
  margin-bottom: 0;
  color: #6c757d;
  font-size: .875rem;
}

.workspace-shell .workspace-nav {
  position: sticky;
  top: .75rem;
  z-index: 20;
}

.workspace-shell .workspace-nav .card {
  backdrop-filter: blur(8px);
}

.workspace-shell .workspace-nav .nav {
  align-items: center;
}

.workspace-shell .workspace-nav .nav-link {
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: #344767;
  background: #f8f9fa;
  border: 1px solid rgba(52, 71, 103, .08);
}

.workspace-shell .workspace-nav .nav-link:hover {
  background: #fff;
  border-color: rgba(52, 71, 103, .18);
}

.workspace-shell .workspace-nav .nav-link.active,
.workspace-shell .workspace-nav .nav-link.is-active {
  background: #344767;
  color: #fff;
  border-color: #344767;
}

.workspace-shell .workspace-nav-heading .fw-semibold {
  font-size: .84rem;
  color: #344767;
}

.workspace-shell .workspace-summary-card,
.workspace-shell .workspace-stat-card {
  border: 1px solid rgba(52, 71, 103, .08);
  box-shadow: none;
}

.workspace-shell .workspace-summary-card .card-body,
.workspace-shell .workspace-stat-card .card-body {
  padding: 1rem 1.1rem;
}

.workspace-shell .workspace-disclosure {
  border: 1px solid rgba(52, 71, 103, .1);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.workspace-shell .workspace-disclosure + .workspace-disclosure {
  margin-top: 1rem;
}

.workspace-shell .workspace-disclosure summary {
  list-style: none;
  cursor: pointer;
  padding: .95rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: #344767;
  background: #f8f9fa;
}

.workspace-shell .workspace-disclosure summary::-webkit-details-marker {
  display: none;
}

.workspace-shell .workspace-disclosure summary::after {
  content: '+';
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(52, 71, 103, .12);
  font-weight: 700;
}

.workspace-shell .workspace-disclosure[open] summary::after {
  content: '-';
}

.workspace-shell .workspace-disclosure-body {
  padding: 1.1rem;
}

.workspace-shell .workspace-soft-panel {
  border: 1px dashed rgba(52, 71, 103, .12);
  border-radius: 1rem;
  background: #fcfcfd;
  padding: 1rem;
}

.workspace-shell .workspace-list > * + * {
  margin-top: .85rem;
}

.workspace-shell .workspace-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  font-size: .8rem;
  color: #6c757d;
}

.workspace-shell .workspace-subtle-divider {
  border-top: 1px dashed rgba(52, 71, 103, .12);
  margin: 1rem 0;
}

.workspace-shell .workspace-table-card .table > :not(caption) > * > * {
  padding-top: .7rem;
  padding-bottom: .7rem;
}

.workspace-shell .workspace-record {
  border: 1px solid rgba(52, 71, 103, .08);
  border-radius: .9rem;
  padding: .95rem 1rem;
  background: #fff;
}

.workspace-shell .workspace-record + .workspace-record {
  margin-top: .8rem;
}

.workspace-shell .workspace-two-column {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.5rem;
}

.workspace-shell .card.h-100,
.workspace-shell .workspace-table-card.h-100,
.workspace-shell .workspace-summary-card.h-100,
.workspace-shell .workspace-stat-card.h-100,
.workspace-shell .workspace-soft-panel.h-100,
.workspace-shell .border.rounded.p-3.h-100 {
  height: auto !important;
}

.workspace-shell .workspace-file-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem 1rem;
}

.workspace-shell .workspace-file-grid .workspace-soft-panel {
  height: auto !important;
}

.workspace-shell .workspace-file-grid .workspace-muted {
  font-size: .78rem;
  margin-bottom: .2rem;
}

.workspace-shell .workspace-file-note {
  border: 1px solid rgba(52, 71, 103, .08);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 1.1rem;
}

.workspace-shell .workspace-half-row {
  align-items: flex-start;
}

.workspace-shell .workspace-half-row > [class*="col-"] > .card,
.workspace-shell .workspace-half-row > [class*="col-"] > .workspace-file-note,
.workspace-shell .workspace-half-row > [class*="col-"] > .workspace-summary-card,
.workspace-shell .workspace-half-row > [class*="col-"] > .workspace-table-card {
  width: 100%;
}

.workspace-shell .workspace-form-card .card-body,
.workspace-shell .workspace-table-card .card-body {
  padding-top: 1rem;
}

.workspace-shell .workspace-file-note + .workspace-file-note {
  margin-top: 1rem;
}

.workspace-shell .workspace-actions,
.workspace-shell .workspace-form-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.workspace-shell .workspace-actions {
  justify-content: flex-end;
}

.workspace-shell .workspace-form-actions {
  justify-content: flex-end;
  margin-top: .25rem;
}

.workspace-shell .btn {
  border-radius: .65rem;
  font-weight: 600;
  box-shadow: none !important;
}

.workspace-shell .page-header-card .btn {
  border-radius: .7rem;
}

.workspace-shell .page-header-card .workspace-actions {
  row-gap: .5rem;
}

.workspace-shell .btn-outline-light {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .45);
}

.workspace-shell .btn-outline-light:hover {
  background: #fff;
  color: #344767 !important;
  border-color: #fff;
}

.workspace-shell .card-header .btn,
.workspace-shell .card-body .btn {
  white-space: nowrap;
}

.workspace-shell .workspace-record .btn {
  align-self: flex-start;
}

.workspace-shell.workspace-tabs-enabled .workspace-panel {
  display: none;
}

.workspace-shell.workspace-tabs-enabled .workspace-panel.is-active {
  display: block;
}

.workspace-shell.workspace-tabs-enabled .workspace-panel[hidden] {
  display: none !important;
}

@media (max-width: 991.98px) {
  .workspace-shell .workspace-two-column,
  .workspace-shell .workspace-file-grid {
    grid-template-columns: 1fr;
  }

  .workspace-shell .workspace-nav {
    position: static;
  }

  .workspace-shell .workspace-nav .nav {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding-bottom: .25rem;
    scrollbar-width: thin;
  }

  .workspace-shell .workspace-nav .nav-link {
    white-space: nowrap;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .workspace-shell .workspace-file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Matter workspace detail page */
.matter-workspace-page .card {
  border: 1px solid #eceff3;
  box-shadow: none;
}

.matter-workspace-page .card-header {
  background: #fff;
  border-bottom: 1px solid #eef1f4;
  padding: .8rem 1rem;
}

.matter-workspace-page .card-body {
  padding: 1rem;
}

.matter-workspace-page .workspace-title {
  font-size: 1.25rem;
  margin-bottom: .25rem;
}

.matter-workspace-page .workspace-subtitle {
  font-size: .9rem;
}

.matter-workspace-page .workspace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.matter-workspace-page .workspace-toolbar-copy {
  flex: 1 1 20rem;
  min-width: 0;
}

.matter-workspace-page .workspace-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .55rem;
}

.matter-workspace-page .workspace-header-actions .dropdown {
  margin-bottom: 0;
}

.matter-workspace-page .workspace-header-actions .erp-actions-dropdown-toggle.has-label {
  background: #fff;
  border: 1px solid #dbe3ee;
  color: #344767;
}

.matter-workspace-page .btn {
  font-size: .8rem;
}

.matter-workspace-page .btn-sm {
  font-size: .76rem;
}

.matter-workspace-page .section-title {
  font-size: .95rem;
  font-weight: 700;
}

.matter-workspace-page .stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.matter-workspace-page .stat-box {
  border: 1px solid #eceff3;
  border-radius: .75rem;
  background: #fff;
  padding: .85rem .95rem;
  min-width: 0;
}

.matter-workspace-page .stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7b809a;
  margin-bottom: .25rem;
}

.matter-workspace-page .stat-value {
  font-size: .92rem;
  font-weight: 600;
  color: #344767;
  word-break: break-word;
}

.matter-workspace-page .detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem 1rem;
}

.matter-workspace-page .detail-item {
  min-width: 0;
}

.matter-workspace-page .detail-label {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7b809a;
  margin-bottom: .2rem;
}

.matter-workspace-page .detail-value {
  font-size: .88rem;
  color: #344767;
  word-break: break-word;
  line-height: 1.45;
}

.matter-workspace-page .badge-soft {
  background: #f5f7fa;
  color: #344767;
  border: 1px solid #e8ecf1;
  font-weight: 600;
  font-size: .74rem;
  padding: .42rem .58rem;
}

.matter-workspace-page .updates-list {
  display: grid;
  gap: .85rem;
}

.matter-workspace-page .update-item {
  border-left: 3px solid #dbe3ee;
  padding-left: .8rem;
}

.matter-workspace-page .update-type {
  font-size: .8rem;
  font-weight: 700;
  color: #344767;
}

.matter-workspace-page .update-text {
  font-size: .85rem;
  color: #4b5563;
}

.matter-workspace-page .update-time {
  font-size: .74rem;
  color: #7b809a;
}

.matter-workspace-page .table {
  margin-bottom: 0;
}

.matter-workspace-page .table th {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #7b809a;
  font-weight: 700;
  white-space: nowrap;
}

.matter-workspace-page .table td {
  font-size: .84rem;
  color: #344767;
}

.matter-workspace-page .task-table td:not(:first-child),
.matter-workspace-page .task-table th:not(:first-child) {
  vertical-align: middle;
}

.matter-workspace-page .table td,
.matter-workspace-page .table th {
  padding: .7rem .8rem;
}

.matter-workspace-page .task-table {
  table-layout: fixed;
}

.matter-workspace-page .task-table .col-title {
  width: 40%;
}

.matter-workspace-page .task-table .col-due {
  width: 12%;
}

.matter-workspace-page .task-table .col-assigned {
  width: 15%;
}

.matter-workspace-page .task-table .col-status {
  width: 11%;
}

.matter-workspace-page .task-table .col-actions {
  width: 22%;
}

.matter-workspace-page .task-title {
  font-weight: 600;
  color: #344767;
  margin-bottom: .18rem;
}

.matter-workspace-page .task-desc {
  font-size: .8rem;
  color: #7b809a;
  line-height: 1.35;
  margin-bottom: .35rem;
}

.matter-workspace-page .task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.matter-workspace-page .task-meta-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e7ebf0;
  border-radius: 999px;
  padding: .18rem .45rem;
  font-size: .72rem;
  color: #5b6476;
  background: #fafbfd;
}

.matter-workspace-page .task-actions-cell {
  min-width: 0;
}

.matter-workspace-page .task-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  flex-wrap: wrap;
  white-space: normal;
  max-width: 100%;
  min-height: 2rem;
}

.matter-workspace-page .task-link-actions {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  flex-shrink: 0;
  min-height: 2rem;
}

.matter-workspace-page .task-link-actions .divider {
  color: #c1c7d0;
  font-size: .75rem;
}

.matter-workspace-page .task-link {
  display: inline-flex;
  align-items: center;
  font-size: .76rem;
  font-weight: 600;
  color: #344767;
  text-decoration: none;
  line-height: 1.2;
  min-height: 2rem;
}

.matter-workspace-page .task-link:hover {
  color: #1a73e8;
  text-decoration: underline;
}

.matter-workspace-page .task-status-inline {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.matter-workspace-page .task-status-inline .form-select {
  min-width: 120px;
  width: auto;
  font-size: .74rem;
  border-radius: .45rem;
  padding: .25rem 1.7rem .25rem .55rem;
  height: 2rem;
  flex: 1 1 8.5rem;
}

.matter-workspace-page .task-status-inline .btn {
  font-size: .74rem;
  padding: .34rem .55rem;
  line-height: 1;
  white-space: nowrap;
  border-radius: .45rem;
}

.matter-workspace-page .table .form-select-sm {
  font-size: .76rem;
}

.matter-workspace-page .form-label {
  font-size: .78rem;
  font-weight: 600;
  color: #344767;
  margin-bottom: .32rem;
}

.matter-workspace-page .form-control,
.matter-workspace-page .form-select {
  font-size: .84rem;
}

.matter-workspace-page .compact-note {
  font-size: .8rem;
  color: #7b809a;
}

.matter-workspace-page .value-link {
  color: #17c1e8;
  text-decoration: none;
  font-weight: 600;
}

.matter-workspace-page .value-link:hover {
  color: #0ea5c6;
  text-decoration: underline;
}

.matter-workspace-page .metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .75rem;
}

.matter-workspace-page .metric-card {
  border: 1px solid #eceff3;
  border-radius: .75rem;
  background: #fff;
  padding: .8rem .9rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

.matter-workspace-page .metric-card:hover {
  border-color: #d0d7e2;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}

.matter-workspace-page .metric-number {
  font-size: 1.05rem;
  font-weight: 700;
  color: #344767;
  margin-bottom: .18rem;
}

.matter-workspace-page .metric-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7b809a;
}

.matter-workspace-page .metric-subtext {
  font-size: .76rem;
  color: #7b809a;
  margin-top: .22rem;
}

.matter-workspace-page .list-stack {
  display: grid;
  gap: .75rem;
}

.matter-workspace-page .list-row {
  border: 1px solid #eef1f4;
  border-radius: .75rem;
  padding: .75rem .85rem;
  background: #fff;
}

.matter-workspace-page .list-row-title {
  font-size: .86rem;
  font-weight: 700;
  color: #344767;
}

.matter-workspace-page .list-row-meta {
  font-size: .76rem;
  color: #7b809a;
  margin-top: .2rem;
}

.matter-workspace-page .list-row-text {
  font-size: .82rem;
  color: #4b5563;
  margin-top: .28rem;
}

.matter-workspace-page .section-anchor {
  scroll-margin-top: 84px;
}

@media (max-width: 1199px) {
  .matter-workspace-page .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matter-workspace-page .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .matter-workspace-page .task-table {
    table-layout: auto;
  }

  .matter-workspace-page .task-table .col-title,
  .matter-workspace-page .task-table .col-due,
  .matter-workspace-page .task-table .col-assigned,
  .matter-workspace-page .task-table .col-status,
  .matter-workspace-page .task-table .col-actions {
    width: auto;
  }

  .matter-workspace-page .task-actions-row {
    justify-content: flex-start;
  }

  .matter-workspace-page .task-actions-cell {
    min-width: 220px;
  }
}

@media (max-width: 767px) {
  .matter-workspace-page .stat-strip,
  .matter-workspace-page .detail-grid {
    grid-template-columns: 1fr;
  }
}
