:root {
  --kausia-border: #d6d9de;
  --kausia-text: #20242a;
  --kausia-muted: #69707a;
  --kausia-accent: #246b61;
}

body {
  margin: 0;
  color: var(--kausia-text);
  background: #f7f8fa;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.sidebar {
  display: none !important;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem;
  border-right: 1px solid var(--kausia-border);
  background: #fff;
}

.app-menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: .125rem;
}

.menu-heading {
  color: var(--kausia-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: .25rem;
  text-transform: uppercase;
}

.app-menu a {
  color: var(--kausia-text);
  border-radius: .375rem;
  padding: .5rem .5rem;
  text-decoration: none;
}

.app-menu a:hover,
.app-menu a:focus,
.app-menu a.active {
  background: #eef3f2;
  color: var(--kausia-accent);
}

.content {
  padding: 1rem;
  overflow: auto;
  min-width: 0;
  width: 100%;
}

.content--full-width {
  box-sizing: border-box;
  max-width: none;
}

.dashboard-home {
  display: grid;
  gap: 1rem;
}

.dashboard-hero,
.dashboard-card,
.dashboard-section {
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 .5rem 1.25rem rgba(32, 36, 42, .06);
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: stretch;
  padding: 1rem;
  border-left: .375rem solid var(--kausia-accent);
}

.dashboard-hero h1 {
  margin: .125rem 0 .35rem;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  letter-spacing: 0;
}

.dashboard-hero p,
.dashboard-card h2,
.dashboard-section h2 {
  margin: 0;
}

.dashboard-hero p {
  color: var(--kausia-muted);
}

.dashboard-hero__date,
.dashboard-card__eyebrow {
  color: var(--kausia-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-hero__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(6rem, 1fr));
  gap: .5rem;
  min-width: min(32rem, 100%);
}

.dashboard-hero__summary span {
  display: grid;
  gap: .125rem;
  align-content: center;
  min-height: 4.25rem;
  padding: .75rem;
  border-radius: .5rem;
  background: #f4f7f6;
  color: var(--kausia-muted);
  font-size: .8125rem;
}

.dashboard-hero__summary strong {
  color: var(--kausia-text);
  font-size: 1.6rem;
  line-height: 1;
}

.dashboard-kpis {
  align-items: stretch;
}

.dashboard-kpi {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 6.5rem;
  gap: .75rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
  color: var(--kausia-text);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 .35rem 1rem rgba(32, 36, 42, .05);
}

.dashboard-kpi:hover,
.dashboard-kpi:focus {
  color: var(--kausia-text);
  border-color: currentColor;
  transform: translateY(-1px);
}

.dashboard-kpi__icon,
.dashboard-quick-action span {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .5rem;
  color: #fff;
  font-weight: 800;
}

.dashboard-kpi--tasks .dashboard-kpi__icon,
.dashboard-quick-action--tasks span {
  background: #2f6fed;
}

.dashboard-kpi--agenda .dashboard-kpi__icon,
.dashboard-quick-action--agenda span {
  background: #6b4fd8;
}

.dashboard-kpi--events .dashboard-kpi__icon {
  background: #0f766e;
}

.dashboard-kpi--warning .dashboard-kpi__icon {
  background: #d97706;
}

.dashboard-kpi--alerts .dashboard-kpi__icon,
.dashboard-kpi--urgent .dashboard-kpi__icon,
.dashboard-quick-action--trash span {
  background: #c2410c;
}

.dashboard-quick-action--primary span {
  background: var(--kausia-accent);
}

.dashboard-quick-action--client span {
  background: #0f766e;
}

.dashboard-quick-action--archive span {
  background: #475569;
}

.dashboard-kpi strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1;
}

.dashboard-kpi small {
  color: var(--kausia-muted);
  font-weight: 700;
}

.dashboard-kpi-shell {
  position: relative;
  height: 100%;
}

.dashboard-kpi-panel {
  position: absolute;
  top: 100%;
  right: auto;
  left: 0;
  z-index: 40;
  width: max(100%, min(24rem, calc(100vw - 2rem)));
  min-width: 0;
  padding-top: .5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-.25rem);
  visibility: hidden;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.dashboard-kpis > div:nth-child(n + 3) .dashboard-kpi-panel {
  right: 0;
  left: auto;
}

.dashboard-kpi-shell:hover .dashboard-kpi-panel,
.dashboard-kpi-shell:focus-within .dashboard-kpi-panel,
.dashboard-kpi-shell.is-open .dashboard-kpi-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.dashboard-kpi-shell:hover .dashboard-kpi,
.dashboard-kpi-shell:focus-within .dashboard-kpi,
.dashboard-kpi-shell.is-open .dashboard-kpi {
  color: var(--kausia-text);
  border-color: currentColor;
  transform: translateY(-1px);
}

.dashboard-kpi-panel .dashboard-card {
  min-height: 0;
  max-height: min(30rem, calc(100vh - 13rem));
  overflow: auto;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
  min-height: 23rem;
  overflow: hidden;
}

.dashboard-card__header,
.dashboard-section__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid var(--kausia-border);
}

.dashboard-card__header h2,
.dashboard-section__header h2 {
  font-size: 1rem;
  font-weight: 800;
}

.dashboard-card__header a {
  color: var(--kausia-accent);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-list,
.dashboard-timeline,
.dashboard-alerts,
.dashboard-case-list {
  display: grid;
  gap: .625rem;
  padding: 1rem;
}

.dashboard-list-item,
.dashboard-case {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  padding: .75rem;
  border: 1px solid #edf0f2;
  border-radius: .5rem;
  background: #fbfcfd;
}

.dashboard-list-item--clickable {
  cursor: pointer;
}

.dashboard-list-item--clickable:hover,
.dashboard-list-item--clickable:focus {
  border-color: var(--kausia-accent);
  background: #f4f8f7;
  outline: 0;
}

.dashboard-list-item__main,
.dashboard-case > div:first-child {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.dashboard-list-item strong,
.dashboard-case strong {
  overflow-wrap: anywhere;
}

.dashboard-list-item__actions {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: .5rem;
}

.dashboard-task-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.dashboard-task-complete span {
  color: inherit;
  font-size: inherit;
}

.dashboard-task-complete:hover,
.dashboard-task-complete:focus {
  border-color: #22c55e;
  background: #dcfce7;
  color: #166534;
  outline: 0;
  transform: translateY(-1px);
}

.dashboard-task-complete:disabled,
.dashboard-list-item.is-completing .dashboard-task-complete {
  cursor: wait;
  opacity: .6;
  transform: none;
}

.dashboard-list-item.is-completing {
  opacity: .7;
}

.dashboard-list-item span,
.dashboard-case span,
.dashboard-case small {
  color: var(--kausia-muted);
  font-size: .8125rem;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.45rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-badge--danger,
.dashboard-badge--urgent {
  background: #fee2e2;
  color: #991b1b;
}

.dashboard-badge--high,
.dashboard-badge--warning {
  background: #ffedd5;
  color: #9a3412;
}

.dashboard-badge--medium,
.dashboard-badge--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.dashboard-badge--low,
.dashboard-badge--success {
  background: #dcfce7;
  color: #166534;
}

.dashboard-badge--neutral {
  background: #eef2f7;
  color: #334155;
}

.dashboard-empty {
  padding: .85rem;
  border: 1px dashed var(--kausia-border);
  border-radius: .5rem;
  background: #fafbfc;
  color: var(--kausia-muted);
}

.dashboard-empty--success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.dashboard-timeline-item {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: .75rem;
  padding: .75rem;
  border-left: .25rem solid #6b4fd8;
  border-radius: .5rem;
  background: #fbfcfd;
}

.dashboard-timeline-item--tarea {
  border-left-color: #2f6fed;
}

.dashboard-timeline-item time {
  color: var(--kausia-accent);
  font-weight: 800;
}

.dashboard-timeline-item div {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.dashboard-timeline-item span {
  color: var(--kausia-muted);
  font-size: .8125rem;
  overflow-wrap: anywhere;
}

.dashboard-alert {
  display: grid;
  gap: .2rem;
  padding: .85rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  text-align: left;
  text-decoration: none;
}

.dashboard-alert--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.dashboard-alert--warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.dashboard-alert span {
  font-size: .8125rem;
}

.dashboard-home .dashboard-hero {
  gap: .75rem;
  padding: .7rem .875rem;
}

.dashboard-home .dashboard-hero h1 {
  margin: .05rem 0 .2rem;
  font-size: clamp(1.3rem, 1.7vw, 1.7rem);
  line-height: 1.12;
}

.dashboard-home .dashboard-hero p {
  line-height: 1.25;
}

.dashboard-home .dashboard-hero__date {
  font-size: .7rem;
  line-height: 1.15;
}

.dashboard-home .dashboard-hero__summary {
  gap: .375rem;
}

.dashboard-home .dashboard-hero__summary span {
  min-height: 3rem;
  padding: .5rem .6rem;
  font-size: .75rem;
  line-height: 1.15;
}

.dashboard-home .dashboard-hero__summary strong {
  font-size: 1.3rem;
}

.dashboard-home .dashboard-kpis {
  --bs-gutter-x: .75rem;
  --bs-gutter-y: .75rem;
}

.dashboard-home .dashboard-kpi {
  min-height: 4.55rem;
  gap: .55rem;
  padding: .7rem .8rem;
}

.dashboard-home .dashboard-kpi__icon {
  width: 2rem;
  height: 2rem;
  border-radius: .4rem;
  font-size: .9rem;
}

.dashboard-home .dashboard-kpi strong {
  font-size: 1.45rem;
}

.dashboard-home .dashboard-kpi small {
  display: block;
  font-size: .75rem;
  line-height: 1.18;
}

.dashboard-home .dashboard-kpi-panel {
  padding-top: .375rem;
}

.dashboard-home .dashboard-kpi-panel .dashboard-card__header {
  padding: .7rem .75rem;
}

.dashboard-home .dashboard-kpi-panel .dashboard-card__header h2 {
  font-size: .95rem;
  line-height: 1.15;
}

.dashboard-home .dashboard-kpi-panel .dashboard-card__eyebrow {
  font-size: .68rem;
  line-height: 1.15;
}

.dashboard-home .dashboard-kpi-panel .dashboard-list,
.dashboard-home .dashboard-kpi-panel .dashboard-alerts {
  gap: .45rem;
  padding: .7rem .75rem;
}

.dashboard-home .dashboard-kpi-panel .dashboard-list-item,
.dashboard-home .dashboard-kpi-panel .dashboard-alert {
  padding: .55rem .6rem;
}

.dashboard-section {
  overflow: hidden;
}

.dashboard-table {
  margin: 0;
}

.dashboard-table th {
  color: var(--kausia-muted);
  font-size: .75rem;
  text-transform: uppercase;
}

table.dataTable thead > tr > th.dt-orderable-asc span.dt-column-order::before,
table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order::before,
table.dataTable thead > tr > td.dt-orderable-asc span.dt-column-order::before,
table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order::before {
  content: "\25B2" !important;
}

table.dataTable thead > tr > th.dt-orderable-desc span.dt-column-order::after,
table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order::after,
table.dataTable thead > tr > td.dt-orderable-desc span.dt-column-order::after,
table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order::after {
  content: "\25BC" !important;
}

.dashboard-expedientes-table tbody tr.expediente-row--materia > * {
  background-color: var(--materia-row-color);
}

.dashboard-expedientes-table tbody tr.expediente-row--materia:hover > * {
  background-color: rgba(255, 255, 255, .48);
}

.dashboard-materia-dot {
  display: inline-block;
  width: .7rem;
  height: .7rem;
  margin-right: .35rem;
  border-radius: 50%;
  background: var(--kausia-accent);
  vertical-align: middle;
}

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

.dashboard-case__badges {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.dashboard-case__badges span {
  color: inherit;
}

.dashboard-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  padding: 1rem;
}

.dashboard-quick-action {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  min-height: 4.25rem;
  padding: .75rem;
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
  color: var(--kausia-text);
  text-align: left;
  text-decoration: none;
}

.dashboard-quick-action:hover,
.dashboard-quick-action:focus {
  border-color: var(--kausia-accent);
  color: var(--kausia-accent);
}

.dashboard-quick-action strong {
  overflow-wrap: anywhere;
}

.navbar .navbar-nav.ms-auto {
  margin-left: auto;
}

.navbar .container-fluid {
  position: relative;
}

.kausia-header-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
}

.kausia-header-wordmark {
  width: auto;
  max-width: min(12rem, 48vw);
  height: 50px;
  object-fit: contain;
}

.kausia-brand-menu-trigger {
  cursor: pointer;
  border-radius: .375rem;
}

.kausia-brand-menu-trigger:focus-visible {
  outline: .15rem solid rgba(36, 107, 97, .35);
  outline-offset: .2rem;
}

.kausia-brand-dropdown {
  position: absolute;
  top: calc(100% + .55rem);
  left: 0;
  z-index: 1080;
  width: min(19rem, calc(100vw - 2rem));
  padding: .45rem;
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 .9rem 2.25rem rgba(32, 36, 42, .16);
  opacity: 0;
  transform: translateY(-.35rem);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.kausia-brand-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.kausia-brand-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: .125rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.kausia-brand-dropdown-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.45rem;
  padding: .55rem .65rem;
  border-radius: .375rem;
  color: var(--kausia-text);
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.kausia-brand-dropdown-link:hover,
.kausia-brand-dropdown-link:focus,
.kausia-brand-dropdown-link.is-active {
  background: #eef3f2;
  color: var(--kausia-accent);
}

.kausia-brand-dropdown-icon {
  display: inline-flex;
  flex: 0 0 1.25rem;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.kausia-brand-dropdown-icon svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

.kausia-brand-dropdown-text {
  min-width: 0;
}

.user-menu {
  position: relative;
  display: inline-block;
}

.quick-actions-menu {
  margin-right: .5rem;
}

.user-menu__name {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-height: 2.25rem;
  padding: .375rem .625rem;
  color: var(--kausia-text);
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
}

.quick-actions-menu__button {
  flex-direction: row;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.quick-actions-menu__dropdown {
  min-width: 190px;
}

.user-menu__despacho {
  color: var(--kausia-muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.1;
}

.user-menu__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 9999;
  min-width: 180px;
  margin: 0;
  padding: .5rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--kausia-border);
  border-radius: .375rem;
  box-shadow: 0 .75rem 1.75rem rgba(32, 36, 42, .12);
}

.user-menu:hover .user-menu__dropdown,
.user-menu:focus-within .user-menu__dropdown {
  display: block;
}

.user-menu__dropdown a,
.user-menu__dropdown button {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .5rem .875rem;
  border: 0;
  background: transparent;
  color: var(--kausia-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.user-menu__item-icon {
  display: inline-flex;
  flex: 0 0 1.05rem;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.user-menu__item-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.user-menu__dropdown a:hover,
.user-menu__dropdown a:focus,
.user-menu__dropdown button:hover,
.user-menu__dropdown button:focus {
  background: #eef3f2;
  color: var(--kausia-accent);
}

.user-menu__divider {
  height: 1px;
  margin: .35rem 0;
  overflow: hidden;
  background: var(--kausia-border);
}

.user-menu__logout-form {
  margin: 0;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.page-header h1 {
  margin: 0 0 .25rem;
  font-size: 1.75rem;
}

.page-header p {
  margin: 0;
  color: var(--kausia-muted);
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.btn-icon {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-right: .35rem;
  vertical-align: -0.15em;
}

.btn-editar-despacho {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
}

.admin-despachos-tabs {
  margin-top: .75rem;
}

.admin-despachos-tab-content {
  padding-top: 1rem;
}

.tenant-tab-inactive {
  background-color: #f1f3f5;
}

.tenant-card-inactive {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  padding: 1rem;
}

.table-panel {
  overflow-x: auto;
  border: 1px solid var(--kausia-border);
  background: #fff;
}

.papelera-page,
.papelera-page .tab-content,
.papelera-page .tab-pane,
.papelera-page table,
.papelera-page .dt-container,
.papelera-page .dataTables_wrapper {
  width: 100% !important;
  max-width: 100%;
}

.papelera-page table.dataTable {
  margin-left: 0;
  margin-right: 0;
}

.papelera-documents {
  display: grid;
  gap: .35rem;
  width: 100%;
}

.papelera-documents__header,
.papelera-document-node__row {
  display: grid;
  grid-template-columns: minmax(16rem, 2fr) minmax(8rem, 1fr) minmax(6.5rem, .7fr) minmax(8rem, .8fr) minmax(9rem, .9fr) minmax(8rem, .8fr) minmax(9rem, auto);
  gap: .75rem;
  align-items: center;
}

.papelera-documents__header {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--kausia-border);
  color: var(--kausia-muted);
  font-size: .8125rem;
  font-weight: 700;
}

.papelera-document-tree,
.papelera-document-tree__children {
  display: grid;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.papelera-document-tree {
  padding: .5rem;
}

.papelera-document-tree__children {
  margin-left: 1.35rem;
  padding-left: .75rem;
  border-left: 1px solid #edf0f2;
}

.papelera-document-node__row {
  min-height: 3rem;
  padding: .45rem .55rem;
  border: 1px solid #edf0f2;
  background: #fff;
}

.papelera-document-node--folder > .papelera-document-node__row {
  background: #fffdf6;
}

.papelera-document-node__row:hover {
  border-color: #d8e7e3;
  background: #fbfdfc;
}

.papelera-document-node__name {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}

.papelera-document-node__title {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.papelera-document-node__check-placeholder {
  flex: 0 0 1rem;
  width: 1rem;
}

.papelera-document-size {
  cursor: help;
  font-variant-numeric: tabular-nums;
}

.papelera-confirm-tree,
.papelera-confirm-tree ul {
  display: grid;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.papelera-confirm-tree ul {
  margin-left: 1.1rem;
  padding-left: .7rem;
  border-left: 1px solid #f0c4c4;
}

.papelera-confirm-tree__item {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
}

.papelera-confirm-tree__item span:last-child {
  overflow-wrap: anywhere;
}

.modal-eliminacion-papelera {
  max-width: 50vw;
}

.papelera-delete-progress__items {
  display: grid;
  gap: .5rem;
}

.papelera-delete-progress__item {
  border: 1px solid #e9ecef;
  border-radius: .375rem;
  padding: .45rem .6rem;
  background: #fff;
}

.papelera-delete-progress__item-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}

.papelera-delete-progress__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .modal-eliminacion-papelera {
    max-width: 95vw;
  }
}

.tarea-title-link {
  color: var(--kausia-text);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tarea-title-link:hover,
.tarea-title-link:focus {
  color: var(--kausia-accent);
  text-decoration: underline;
}

.tarea-row {
  cursor: pointer;
}

.tarea-row--vencida td {
  background: #fff7f7;
}

.tarea-row--realizada {
  color: var(--kausia-muted);
}

.tarea-row--realizada .tarea-title-link {
  color: var(--kausia-muted);
}

.tarea-check-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.crm-action-icon {
  width: 1rem;
  height: 1rem;
}

.tareas-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
}

.tareas-bulk-actions span {
  color: var(--kausia-muted);
  font-size: .875rem;
  font-weight: 700;
}

.tareas-select-column {
  width: 2.75rem;
}

.tareas-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
}

.dashboard-task-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--kausia-border);
  border-radius: 999px;
  background: #fff;
  color: var(--kausia-text);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.dashboard-task-action:hover,
.dashboard-task-action:focus {
  outline: 0;
  transform: translateY(-1px);
}

.dashboard-task-action--reopen {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.dashboard-task-action--reopen:hover,
.dashboard-task-action--reopen:focus {
  border-color: #60a5fa;
  background: #dbeafe;
}

.dashboard-task-action--trash {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.dashboard-task-action--trash:hover,
.dashboard-task-action--trash:focus {
  border-color: #f87171;
  background: #fee2e2;
}

.kausia-floating-alert {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  max-width: min(28rem, calc(100vw - 2rem));
  box-shadow: 0 .75rem 1.75rem rgba(15, 23, 42, .16);
}

.agenda-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: .75rem;
  padding: .75rem 1rem;
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
}

.agenda-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: center;
}

.agenda-toolbar__status {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.agenda-toolbar__status .form-label {
  margin: 0;
  color: var(--kausia-muted);
  font-size: .875rem;
  font-weight: 700;
}

.agenda-calendar {
  padding: 1rem;
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 .35rem 1rem rgba(32, 36, 42, .05);
}

.agenda-calendar--loading {
  opacity: .72;
}

.agenda-calendar .fc {
  color: var(--kausia-text);
}

.agenda-calendar .fc-toolbar {
  gap: .75rem;
  flex-wrap: wrap;
}

.agenda-calendar .fc-toolbar-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0;
}

.agenda-calendar .fc-button {
  border-radius: .375rem;
  border-color: var(--kausia-border);
  background: #fff;
  color: var(--kausia-text);
  box-shadow: none;
}

.agenda-calendar .fc-button:hover,
.agenda-calendar .fc-button:focus,
.agenda-calendar .fc-button-active {
  border-color: var(--kausia-accent);
  background: #eef3f2;
  color: var(--kausia-accent);
}

.agenda-calendar .fc-event {
  border-radius: .35rem;
  cursor: pointer;
  font-weight: 700;
}

.agenda-calendar .calendar-item-tarea {
  border-style: dashed;
}

.agenda-calendar .tarea-completada {
  opacity: .75;
  text-decoration: line-through;
}

.agenda-calendar .tarea-vencida {
  box-shadow: inset .25rem 0 0 #c2410c;
}

.agenda-calendar .evento-google-sync-error {
  box-shadow: inset .25rem 0 0 #b7791f;
}

.agenda-calendar .evento-google-sync-bloqueado {
  box-shadow: inset .25rem 0 0 #b42318;
}

.agenda-calendar .evento-google-sync-error .fc-event-title::after,
.agenda-calendar .evento-google-sync-bloqueado .fc-event-title::after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: .35rem;
  border-radius: 999px;
  background: #fff;
  color: #7a2e0e;
  content: "!";
  font-size: .7rem;
  font-weight: 800;
  line-height: 1;
}

.agenda-calendar .evento-google-sync-bloqueado .fc-event-title::after {
  color: #b42318;
}

.expedientes-tabs,
.expedientes-tabs .js-tab-panel,
.expedientes-tabs .table-panel,
.expedientes-tabs table,
.expedientes-tabs .dt-container,
.expedientes-tabs .dataTables_wrapper {
  width: 100%;
  max-width: 100%;
}

.expedientes-tabs .table-panel {
  min-width: 0;
}

.expedientes-tabs table.dataTable {
  margin: 0;
}

.empty-state {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--kausia-border);
  background: #fff;
  color: var(--kausia-muted);
}

.expediente-link,
.cliente-link,
[data-cliente-detalle] {
  font-weight: 600;
  text-decoration: none;
}

.expediente-link:hover,
.expediente-link:focus,
.cliente-link:hover,
.cliente-link:focus,
[data-cliente-detalle]:hover,
[data-cliente-detalle]:focus {
  text-decoration: underline;
}

.cliente-expedientes-list {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  min-width: 10rem;
}

.cliente-expediente-badge {
  color: var(--kausia-text);
  text-decoration: none;
}

.modal .modal-header {
  border-bottom-color: #1f2937;
  background: #111827;
  color: #fff;
}

.modal .modal-header .modal-title,
.modal .modal-header .text-muted,
.modal .modal-header small {
  color: #fff !important;
}

.modal .modal-header .btn-close {
  --bs-btn-close-color: #fff;
  --bs-btn-close-opacity: 1;
  --bs-btn-close-hover-opacity: 1;
  --bs-btn-close-focus-shadow: 0 0 0 .2rem rgba(255, 255, 255, .25);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293A1 1 0 0 1 .293 14.293L6.586 8 .293 1.707A1 1 0 0 1 .293.293z'/%3e%3c/svg%3e");
  filter: none;
  opacity: 1;
}

.modal .modal-header .btn-close:hover,
.modal .modal-header .btn-close:focus {
  opacity: 1;
}

.modal-cliente-detalle {
  max-width: 95vw;
  width: 95vw;
  height: 95vh;
  margin: auto;
}

.modal-cliente-detalle .modal-content {
  height: 95vh;
}

.modal-cliente-detalle .modal-body {
  overflow: hidden;
}

.tercero-detalle-modal .modal-body {
  overflow: auto;
}

.tercero-detalle-modal .tercero-detalle-content {
  min-height: 100%;
}

.cliente-detalle-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  height: 100%;
  color: var(--kausia-muted);
}

.cliente-detalle-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.cliente-detalle-tabs-content {
  flex: 1;
  overflow-y: auto;
  padding-top: 1rem;
}

.cliente-detalle-tabs-content .tab-pane {
  width: 100%;
}

.cliente-detalle-section h6 {
  margin: 0 0 .75rem;
  font-size: .875rem;
  font-weight: 700;
  color: var(--kausia-muted);
  text-transform: uppercase;
}

.cliente-detalle-fields {
  display: grid;
  grid-template-columns: minmax(9rem, 28%) 1fr;
  gap: .5rem .75rem;
  margin: 0;
}

.cliente-detalle-fields dt {
  color: var(--kausia-muted);
  font-weight: 600;
}

.cliente-detalle-fields dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.cliente-expedientes-modal-table {
  width: 100% !important;
  min-width: 42rem;
}

.js-cliente-expedientes-content,
.js-cliente-expedientes-content .table-responsive {
  width: 100%;
}

.cliente-comentarios {
  display: grid;
  gap: .75rem;
}

.cliente-comentarios__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cliente-comentarios__header h6 {
  margin: 0 0 .25rem;
  font-size: .875rem;
  font-weight: 700;
  color: var(--kausia-muted);
  text-transform: uppercase;
}

.cliente-comentario-form,
.cliente-comentario-card {
  border: 1px solid var(--kausia-border);
  border-radius: .375rem;
  background: #fff;
  padding: .75rem;
}

.cliente-comentarios__list {
  display: grid;
  gap: .625rem;
}

.cliente-comentario-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  color: var(--kausia-muted);
  font-size: .8125rem;
}

.cliente-comentario-card__meta strong {
  color: var(--kausia-text);
}

.cliente-comentario-card__text {
  margin-top: .5rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cliente-comentario-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: .5rem;
}

.modal-expediente-detalle {
  max-width: 95vw;
  width: 95vw;
  height: calc(100vh - 3rem);
  margin: 1.5rem auto;
  align-items: center;
}

.modal-expediente-detalle .modal-content {
  height: calc(100vh - 3rem);
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
}

.modal-expediente-detalle .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.min-width-0 {
  min-width: 0;
}

.expediente-modal-footer {
  justify-content: space-between;
  gap: .75rem;
}

.expediente-footer-left,
.expediente-footer-right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.expediente-footer-left {
  margin-right: auto;
}

.tarea-detalle-modal .modal-body {
  background: #fbfcfd;
}

.tarea-detalle-loading {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--kausia-muted);
}

.tarea-detalle-content {
  display: grid;
  gap: .85rem;
}

.tarea-detalle-section {
  padding: .85rem;
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  background: #fff;
}

.tarea-detalle-section h3 {
  margin: 0 0 .55rem;
  color: var(--kausia-muted);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quick-action-modal .modal-dialog {
  max-height: calc(100vh - 2rem);
}

.quick-action-modal .modal-content {
  max-height: calc(100vh - 2rem);
}

.quick-action-modal .modal-body {
  overflow-y: auto;
}

.modal-expediente-xl {
  width: min(75vw, 90rem);
  max-width: min(75vw, 90rem);
}

.modal-contrario-wide {
  width: min(92vw, 68.75rem);
  max-width: min(92vw, 68.75rem);
}

.modal-contrario-wide .modal-body {
  max-height: calc(100vh - 11.25rem);
  overflow-y: auto;
}

.contrario-modal-tabs {
  margin-bottom: 1rem;
}

.contrario-modal-tabs .nav-link {
  font-weight: 700;
}

.quick-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}

.quick-field-heading .form-label {
  margin-bottom: 0;
}

.quick-field-heading .btn {
  flex: 0 0 auto;
}

.quick-expediente-grid .form-label {
  font-weight: 600;
}

.quick-select-action {
  display: flex;
  align-items: stretch;
  gap: .5rem;
}

.quick-select-action .form-select,
.quick-select-action .crm-searchable-select-widget {
  flex: 1 1 auto;
  min-width: 0;
}

select.crm-searchable-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.crm-searchable-select-widget,
.crm-searchable-select-widget.search-select {
  width: 100%;
}

.crm-searchable-select-widget.search-select .crm-searchable-select__toggle,
.crm-searchable-select__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: calc(1.5em + .75rem + 2px);
  padding: .375rem .75rem;
  border-color: #ced4da;
  border-style: solid;
  border-width: 1px;
  background: #fff;
  color: #000;
  text-align: left;
  border-radius: .375rem;
}

.crm-searchable-select-widget.search-select button.crm-searchable-select__toggle,
.search-select button.crm-searchable-select__toggle {
  border: 1px solid #ced4da;
  background-color: #fff;
  color: #000;
}

.crm-searchable-select-widget.search-select .crm-searchable-select__toggle:hover,
.crm-searchable-select__toggle:hover {
  border-color: #adb5bd;
  background: #fff;
  color: #000;
}

.crm-searchable-select-widget.search-select .crm-searchable-select__toggle:focus,
.crm-searchable-select__toggle:focus {
  border-color: #adb5bd;
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 .25rem rgba(0, 0, 0, .08);
}

.crm-searchable-select__toggle:disabled {
  background-color: #e9ecef;
  color: #000;
  opacity: 1;
}

.crm-searchable-select__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-searchable-select-widget.search-select .crm-searchable-select__menu,
.crm-searchable-select__menu {
  width: 100%;
  max-width: min(34rem, calc(100vw - 2rem));
  max-height: min(22rem, calc(100vh - 8rem));
  padding: .5rem;
  overflow: hidden;
  z-index: 1085;
  border: 1px solid #ced4da;
  background: #fff;
  color: #000;
}

.crm-searchable-select-widget.search-select .dropdown-menu.crm-searchable-select__menu,
.search-select .dropdown-menu.crm-searchable-select__menu {
  border: 1px solid #ced4da;
  background-color: #fff;
  color: #000;
}

.crm-searchable-select__search {
  margin-bottom: .4rem;
}

.crm-searchable-select-widget.search-select .crm-searchable-select__search .form-control {
  width: 100%;
  padding: .25rem .5rem;
  border: 1px solid #ced4da;
  background: #fff;
  color: #000;
  border-radius: .25rem;
}

.crm-searchable-select-widget.search-select input[data-crm-searchable-filter],
.search-select input[data-crm-searchable-filter] {
  border: 1px solid #ced4da;
  background-color: #fff;
  color: #000;
}

.crm-searchable-select-widget.search-select .crm-searchable-select__search .form-control:focus {
  border-color: #adb5bd;
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 .2rem rgba(0, 0, 0, .08);
}

.crm-searchable-select__options {
  max-height: 15rem;
  overflow-y: auto;
}

.crm-searchable-select__option {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .45rem .55rem;
  border: 0;
  border-radius: .25rem;
  background: #fff;
  color: #000;
  text-align: left;
}

.crm-searchable-select-widget.search-select button.crm-searchable-select__option,
.search-select button.crm-searchable-select__option {
  border: 0;
  background-color: #fff;
  color: #000;
}

.crm-searchable-select__option:hover,
.crm-searchable-select__option:focus,
.crm-searchable-select__option.is-selected {
  background: #f5f5f5;
  color: #000;
}

.crm-searchable-select-widget.search-select button.crm-searchable-select__option:hover,
.crm-searchable-select-widget.search-select button.crm-searchable-select__option:focus,
.crm-searchable-select-widget.search-select button.crm-searchable-select__option.is-selected,
.search-select button.crm-searchable-select__option:hover,
.search-select button.crm-searchable-select__option:focus,
.search-select button.crm-searchable-select__option.is-selected {
  background-color: #f5f5f5;
  color: #000;
}

.crm-searchable-select__option.is-disabled {
  background: #fff;
  color: #6c757d;
  cursor: not-allowed;
  opacity: .65;
}

.crm-searchable-select__check {
  flex: 0 0 1rem;
  width: 1rem;
  font-weight: 700;
  text-align: center;
}

.crm-searchable-select__empty {
  padding: .45rem .55rem;
  background: #fff;
  color: #6c757d;
}

.crm-searchable-select-widget.search-select .dropdown-item,
.search-select .dropdown-item {
  background: #fff;
  color: #000;
}

.crm-searchable-select-widget.search-select .dropdown-item:hover,
.crm-searchable-select-widget.search-select .dropdown-item:focus,
.crm-searchable-select-widget.search-select .dropdown-item.active,
.crm-searchable-select-widget.search-select .dropdown-item:active,
.search-select .dropdown-item:hover,
.search-select .dropdown-item:focus,
.search-select .dropdown-item.active,
.search-select .dropdown-item:active {
  background: #f5f5f5;
  color: #000;
}

.quick-icon-button {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  padding-right: 0;
  padding-left: 0;
  font-weight: 700;
  line-height: 1;
}

.quick-expediente-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.375rem;
  padding: .375rem .75rem;
  border: 1px solid var(--kausia-border);
  border-radius: .375rem;
  background: #fff;
}

.quick-expediente-switch-label {
  min-width: 0;
  color: var(--kausia-muted);
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .modal-expediente-xl {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 575.98px) {
  .quick-select-action {
    gap: .375rem;
  }

  .quick-icon-button {
    flex-basis: 2.25rem;
    width: 2.25rem;
  }
}

.expediente-detalle-page {
  min-height: 38rem;
}

.expediente-detalle-page .expediente-detalle-layout {
  min-height: 38rem;
  max-height: calc(100vh - 13rem);
}

.expediente-detalle-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  height: 100%;
  color: var(--kausia-muted);
}

.expediente-detalle-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 28%) minmax(0, 72%);
  gap: 1rem;
  height: 100%;
  max-height: calc(100vh - 10rem);
  min-height: 0;
}

.expediente-detalle-left {
  min-width: 0;
  overflow-y: auto;
  border-right: 1px solid var(--kausia-border);
  padding-right: 1rem;
}

.expediente-detalle-right {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
}

.expediente-detalle-tabs-content {
  flex: 1;
  overflow-y: auto;
  padding-top: 1rem;
}

.expediente-permisos-admin {
  display: grid;
  gap: .75rem;
}

.expediente-permisos-admin__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.expediente-permisos-admin__header h6 {
  margin: 0 0 .25rem;
  font-size: .875rem;
  font-weight: 800;
  color: var(--kausia-muted);
  text-transform: uppercase;
}

.expediente-permisos-admin__header p {
  margin: 0;
  color: var(--kausia-muted);
}

.expediente-permisos-table-wrap {
  max-height: calc(100vh - 18rem);
  overflow-y: auto;
}

.expediente-permisos-table {
  min-width: 50rem;
}

.expediente-permisos-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.expediente-detalle-section + .expediente-detalle-section {
  margin-top: 1rem;
}

.expediente-partes {
  display: grid;
  gap: 1rem;
}

.expediente-partes-tabs {
  flex-wrap: wrap;
}

.expediente-partes-tabs .nav-link {
  font-weight: 700;
}

.expediente-partes-tabs-content {
  min-width: 0;
}

.expediente-parte-accordion {
  display: grid;
  gap: .625rem;
}

.expediente-partes-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
}

.expediente-parte-accordion + .expediente-parte-accordion {
  margin-top: .625rem;
}

.expediente-parte-accordion--nested {
  margin-top: 1rem;
}

.expediente-parte-accordion__item {
  border: 1px solid var(--kausia-border);
  border-radius: .375rem;
  overflow: hidden;
}

.expediente-parte-accordion__item--nested {
  background: #fafbfc;
}

.expediente-parte-accordion .accordion-button {
  min-height: 2.75rem;
  padding: .625rem .75rem;
  color: var(--kausia-text);
  font-weight: 700;
  background: #fff;
  box-shadow: none;
}

.expediente-parte-accordion .accordion-button:not(.collapsed) {
  color: var(--kausia-accent);
  background: #eef3f2;
}

.expediente-parte-accordion .accordion-body {
  padding: .875rem;
  background: #fff;
}

.expediente-detalle-summary h6,
.expediente-detalle-section h6 {
  margin: 0 0 .75rem;
  font-size: .875rem;
  font-weight: 700;
  color: var(--kausia-muted);
  text-transform: uppercase;
}

.expediente-detalle-fields {
  display: grid;
  grid-template-columns: minmax(8rem, 32%) 1fr;
  gap: .5rem .75rem;
  margin: 0;
}

.expediente-detalle-fields dt {
  color: var(--kausia-muted);
  font-weight: 600;
}

.expediente-detalle-fields dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.expediente-documents {
  display: grid;
  gap: .75rem;
  min-height: 24rem;
}

.expediente-documents__toolbar,
.expediente-documents__search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.expediente-documents__path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  color: var(--kausia-muted);
  font-size: .875rem;
}

.expediente-documents__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.document-toolbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
}

.expediente-documents__search {
  justify-content: flex-start;
}

.expediente-documents__search .form-control {
  width: min(26rem, 100%);
}

.expediente-documents__loading {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--kausia-muted);
}

.expediente-documents__body {
  display: grid;
  grid-template-columns: minmax(13rem, 28%) minmax(0, 72%);
  gap: .75rem;
  min-height: 22rem;
}

.expediente-documents__tree,
.expediente-documents__list {
  min-width: 0;
  border: 1px solid var(--kausia-border);
  background: #fff;
}

.expediente-documents__tree {
  position: relative;
  max-height: 35rem;
  overflow: auto;
  padding: .5rem;
}

.expediente-documents__tree.is-drop-enabled {
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.expediente-documents__tree.is-drag-over {
  border-color: var(--kausia-accent);
  background: #f4faf8;
  box-shadow: inset 0 0 0 2px rgba(22, 128, 108, .18);
}

.expediente-documents__tree.is-uploading {
  cursor: progress;
  opacity: .78;
}

.expediente-documents__drop-hint {
  display: none;
  position: sticky;
  bottom: .25rem;
  z-index: 2;
  margin-top: .5rem;
  padding: .55rem .65rem;
  border: 1px dashed var(--kausia-accent);
  background: #fff;
  color: var(--kausia-accent);
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
}

.expediente-documents__tree.is-drag-over .expediente-documents__drop-hint {
  display: block;
}

.expediente-documents__list {
  overflow: visible;
}

.expediente-documents__tree-list,
.expediente-documents__tree-list ul {
  display: grid;
  gap: .2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.expediente-documents__tree-list ul {
  margin-left: .9rem;
  padding-left: .55rem;
  border-left: 1px solid #edf0f2;
}

.expediente-documents__tree-row {
  display: flex;
  align-items: center;
  gap: .2rem;
  border-radius: .375rem;
}

.expediente-documents__tree-row:hover,
.expediente-documents__tree-row:focus-within,
.expediente-documents__tree-row.is-active,
.expediente-documents__tree-row.is-drag-target {
  background: #eef3f2;
  color: var(--kausia-accent);
  outline: 0;
}

.expediente-documents__folder-toggle {
  display: inline-flex;
  flex: 0 0 1.65rem;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--kausia-muted);
}

.expediente-documents__folder-toggle.is-empty {
  visibility: hidden;
}

.expediente-documents__tree-node {
  display: flex;
  align-items: center;
  gap: .45rem;
  width: 100%;
  min-height: 2rem;
  padding: .35rem .45rem;
  border: 0;
  border-radius: .375rem;
  background: transparent;
  color: var(--kausia-text);
  text-align: left;
}

[data-document-drag-node] {
  cursor: grab;
}

[data-document-drag-node]:active {
  cursor: grabbing;
}

.is-document-dragging {
  opacity: .55;
}

.expediente-documents__tree-node:hover,
.expediente-documents__tree-node:focus,
.expediente-documents__tree-node.is-active,
.expediente-documents__tree-node.is-drag-target {
  background: #eef3f2;
  color: var(--kausia-accent);
  outline: 0;
}

.expediente-documents__tree-node.is-drag-target,
tr.is-drag-target {
  box-shadow: inset 0 0 0 2px rgba(22, 128, 108, .28);
}

.expediente-documents__name {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  max-width: 100%;
}

.expediente-documents__name .btn-link {
  color: var(--kausia-text);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.expediente-documents__name .btn-link:hover,
.expediente-documents__name .btn-link:focus {
  color: var(--kausia-accent);
  text-decoration: underline;
}

.document-type-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: .25rem;
  background: #eef2f7;
  color: #334155;
}

.document-type-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.document-type-icon--folder {
  background: #fff7df;
  color: #9a6700;
}

.document-type-icon--folderOpen {
  background: #fff4cc;
  color: #8a5700;
}

.document-type-icon--pdf {
  background: #fff1f2;
  color: #b42318;
}

.document-type-icon--word {
  background: #eff6ff;
  color: #1d4ed8;
}

.document-type-icon--excel,
.document-type-icon--csv {
  background: #ecfdf3;
  color: #067647;
}

.document-type-icon--powerpoint {
  background: #fff4ed;
  color: #c2410c;
}

.document-type-icon--image {
  background: #f5f3ff;
  color: #6d28d9;
}

.document-type-icon--archive {
  background: #f8fafc;
  color: #475467;
}

.document-type-icon--email {
  background: #eef4ff;
  color: #3538cd;
}

.document-type-icon--html,
.document-type-icon--xml,
.document-type-icon--text {
  background: #f0f9ff;
  color: #026aa2;
}

.expediente-documents__list .table-responsive {
  overflow: visible;
}

.expediente-documents__table {
  min-width: 48rem;
  margin: 0;
}

.expediente-documents__table tr.is-active > td {
  background: #eef3f2;
}

.document-folder-target {
  border: 1px solid var(--kausia-border);
  border-radius: .375rem;
  background: #f8fafc;
  padding: .75rem;
}

.document-folder-target__label {
  color: var(--kausia-muted);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.document-folder-target__path {
  margin-top: .25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.expediente-documents__table th {
  color: var(--kausia-muted);
  font-size: .75rem;
  text-transform: uppercase;
}

.document-index-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: #dc3545;
  padding: .25rem;
  cursor: pointer;
}

.document-index-action:hover:not(:disabled) {
  background: rgba(33, 37, 41, .06);
}

.document-index-action:disabled,
.document-index-action.is-indexing {
  cursor: default;
  opacity: .65;
}

.document-index-action.is-indexed {
  color: #198754;
}

.document-index-action.is-not-indexed,
.document-index-action.is-failed {
  color: #dc3545;
}

.document-index-action.is-unknown {
  color: #dc3545;
}

.document-index-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 1.125rem;
}

.expediente-documents__preview {
  display: grid;
  justify-items: center;
  gap: .75rem;
  max-height: min(70vh, 48rem);
  overflow: auto;
  background: #f7f8fa;
  padding: .75rem;
}

.expediente-documents__preview-page {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--kausia-border);
  background: #fff;
  box-shadow: 0 .35rem 1rem rgba(32, 36, 42, .08);
  transition: width .16s ease, max-width .16s ease;
}

.expediente-documents__ocr-text {
  max-height: min(65vh, 680px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .875rem;
}

.document-modal-header {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.document-modal-header .modal-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.document-modal-header-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}

.document-preview-toolbar {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.document-preview-toolbar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.document-preview-modal .modal-dialog {
  width: fit-content;
  max-width: min(95vw, 1400px);
  height: 90vh;
  max-height: 90vh;
  margin: 5vh auto;
}

.document-preview-modal .modal-content {
  width: fit-content;
  max-width: min(95vw, 1400px);
  height: 90vh;
  max-height: 90vh;
}

.document-preview-modal .modal-body {
  width: fit-content;
  max-width: min(95vw, 1400px);
  min-height: 0;
  overflow: hidden;
  background: #f7f8fa;
}

.document-preview-modal .expediente-documents__preview {
  width: fit-content;
  max-width: calc(95vw - 2rem);
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 1rem;
  overflow: auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.document-preview-modal .expediente-documents__preview.is-dragging {
  cursor: grabbing;
}

.document-preview-modal .expediente-documents__preview-page {
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.document-preview-modal .expediente-documents__preview-frame {
  width: min(90vw, 1100px);
  height: 100%;
  min-height: 0;
  background: #fff;
}

.document-preview-modal .expediente-documents__preview-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 768px) {
  .document-preview-modal .modal-dialog {
    width: 95vw;
    max-width: 95vw;
    height: 90vh;
    max-height: 90vh;
    margin: 5vh auto;
  }

  .document-preview-modal .modal-content,
  .document-preview-modal .modal-body,
  .document-preview-modal .expediente-documents__preview,
  .document-preview-modal .expediente-documents__preview-frame {
    width: 100%;
    max-width: 100%;
  }
}

.documento-acciones-dropdown {
  display: inline-block;
  position: relative;
}

.documento-acciones-dropdown .dropdown-menu {
  z-index: 1085;
  min-width: 12rem;
}

.documento-acciones-dropdown__item {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.documento-acciones-dropdown__icon {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
}

.document-actions-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.document-actions-button::after {
  display: none;
}

.expediente-historico {
  display: grid;
  gap: 1rem;
}

.expediente-historico__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem;
  border: 1px solid var(--kausia-border);
  background: #fff;
}

.expediente-historico__header h6 {
  margin: 0 0 .25rem;
  color: var(--kausia-text);
  font-size: 1rem;
  font-weight: 800;
  text-transform: none;
}

.expediente-historico__header p {
  margin: 0;
  color: var(--kausia-muted);
  font-size: .875rem;
}

.expediente-historico__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(4.75rem, 1fr));
  gap: .5rem;
  min-width: min(20rem, 100%);
}

.expediente-historico__summary span {
  display: grid;
  gap: .125rem;
  min-height: 3.5rem;
  align-content: center;
  padding: .55rem .65rem;
  border: 1px solid #edf0f2;
  background: #fbfcfd;
  color: var(--kausia-muted);
  font-size: .75rem;
  font-weight: 700;
}

.expediente-historico__summary strong {
  color: var(--kausia-text);
  font-size: 1.35rem;
  line-height: 1;
}

.expediente-historico__filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.expediente-historico__filters .btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.historico-type-dot {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--kausia-accent);
}

.historico-type-dot--tarea,
.historico-calendar-item--tarea,
.historico-timeline-item--tarea {
  --historico-type-color: #d97706;
}

.historico-type-dot--evento,
.historico-calendar-item--evento,
.historico-timeline-item--evento {
  --historico-type-color: #2563eb;
}

.historico-type-dot--visita,
.historico-calendar-item--visita,
.historico-timeline-item--visita {
  --historico-type-color: #0f766e;
}

.historico-type-dot--pago,
.historico-calendar-item--pago,
.historico-timeline-item--pago {
  --historico-type-color: #15803d;
}

.historico-type-dot--notificacion,
.historico-calendar-item--notificacion,
.historico-timeline-item--notificacion {
  --historico-type-color: #7c3aed;
}

.historico-type-dot--vista-judicial,
.historico-calendar-item--vista-judicial,
.historico-timeline-item--vista-judicial {
  --historico-type-color: #be123c;
}

.historico-type-dot--seguimiento,
.historico-calendar-item--seguimiento,
.historico-timeline-item--seguimiento {
  --historico-type-color: #475569;
}

.historico-type-dot--recordatorio,
.historico-calendar-item--recordatorio,
.historico-timeline-item--recordatorio {
  --historico-type-color: #ca8a04;
}

.historico-type-dot--comunicacion,
.historico-calendar-item--comunicacion,
.historico-timeline-item--comunicacion {
  --historico-type-color: #0891b2;
}

.historico-type-dot--imputacion,
.historico-calendar-item--imputacion,
.historico-timeline-item--imputacion {
  --historico-type-color: #4f46e5;
}

.historico-type-dot {
  background: var(--historico-type-color, var(--kausia-accent));
}

.expediente-historico__loading {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--kausia-muted);
}

.expediente-historico__calendar {
  min-height: 34rem;
  padding: .85rem;
  border: 1px solid var(--kausia-border);
  background: #fff;
}

.expediente-historico__calendar .fc-toolbar {
  flex-wrap: wrap;
  gap: .5rem;
}

.expediente-historico__calendar .fc-toolbar-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.expediente-historico__calendar .fc-button {
  border-radius: .375rem;
  border-color: var(--kausia-border);
  background: #fff;
  color: var(--kausia-text);
  box-shadow: none;
}

.expediente-historico__calendar .fc-button:hover,
.expediente-historico__calendar .fc-button:focus,
.expediente-historico__calendar .fc-button-active {
  border-color: var(--kausia-accent);
  background: #eef3f2;
  color: var(--kausia-accent);
}

.expediente-historico__calendar .fc-event {
  border-color: var(--historico-type-color, var(--kausia-accent));
  background: var(--historico-type-color, var(--kausia-accent));
  cursor: pointer;
  font-weight: 700;
}

.historico-timeline-section {
  display: grid;
  gap: .5rem;
}

.historico-timeline-section + .historico-timeline-section {
  margin-top: 1rem;
}

.historico-timeline-section h6 {
  margin: 0;
  color: var(--kausia-muted);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.historico-timeline-item {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
  gap: .75rem;
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--kausia-border);
  border-left: .25rem solid var(--historico-type-color, var(--kausia-accent));
  background: #fff;
  color: var(--kausia-text);
  text-align: left;
}

.historico-timeline-item:hover,
.historico-timeline-item:focus {
  border-color: var(--historico-type-color, var(--kausia-accent));
  outline: 0;
}

.historico-timeline-item__date {
  color: var(--kausia-muted);
  font-size: .8rem;
  font-weight: 800;
}

.historico-timeline-item__content {
  display: grid;
  gap: .15rem;
  min-width: 0;
}

.historico-timeline-item__content strong,
.historico-timeline-item__content span {
  overflow-wrap: anywhere;
}

.historico-timeline-item__content small,
.historico-timeline-item__content span {
  color: var(--kausia-muted);
  font-size: .8125rem;
}

.expediente-actuaciones-table th:first-child,
.expediente-actuaciones-table__date {
  width: 7.5rem;
  max-width: 7.5rem;
  white-space: nowrap;
}

.expediente-actuaciones-table th:last-child,
.expediente-actuaciones-table__actions {
  width: 5rem;
  text-align: right;
  white-space: nowrap;
}

.expediente-actuaciones-table__date-button {
  color: var(--kausia-accent);
  font-weight: 700;
  text-decoration: none;
  white-space: normal;
}

.expediente-actuaciones-table__date-button:hover,
.expediente-actuaciones-table__date-button:focus {
  color: var(--kausia-accent);
  text-decoration: underline;
}

.expediente-actuaciones-table__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.expediente-actuaciones-table__icon + .expediente-actuaciones-table__icon {
  margin-left: .25rem;
}

.actuacion-reminder-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}

.actuacion-reminder-selected,
.actuacion-documentos-selected {
  min-height: 1.75rem;
}

.actuacion-documentos-selected .btn-close {
  font-size: .55rem;
  vertical-align: middle;
}

.actuacion-document-link {
  cursor: pointer;
  font: inherit;
}

.actuacion-document-link:hover,
.actuacion-document-link:focus {
  color: var(--kausia-accent);
  text-decoration: underline;
}

.actuacion-document-selector {
  max-height: min(60vh, 32rem);
  overflow: auto;
}

.actuacion-document-selector__tree {
  gap: .25rem;
}

.actuacion-document-selector__tree .expediente-documents__tree-list,
.actuacion-document-selector__tree ul {
  margin-top: .2rem;
}

.actuacion-document-selector__file {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  width: 100%;
  min-height: 2.25rem;
  padding: .35rem .45rem .35rem 2.1rem;
  border-radius: .375rem;
  cursor: pointer;
}

.actuacion-document-selector__file:hover,
.actuacion-document-selector__file:focus-within {
  background: #eef3f2;
}

.actuacion-document-selector__file-name {
  display: flex;
  min-width: 0;
  gap: .45rem;
}

.actuacion-document-selector__file-name > span:last-child {
  min-width: 0;
}

.actuacion-document-selector__file-name .fw-semibold,
.actuacion-document-selector__file-name .text-muted {
  overflow-wrap: anywhere;
}

.perfil-page {
  padding-bottom: 2rem;
}

.perfil-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.perfil-profile-card,
.perfil-main-panel {
  background: #fff;
  border: 1px solid var(--kausia-border);
}

.perfil-profile-card {
  display: grid;
  grid-template-columns: minmax(14rem, 1.2fr) minmax(0, 2fr);
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.perfil-profile-card__identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 1rem;
}

.perfil-profile-card__identity h2 {
  margin: 0 0 .25rem;
  font-size: 1.25rem;
}

.perfil-profile-card__identity p {
  margin: 0;
  color: var(--kausia-muted);
  overflow-wrap: anywhere;
}

.perfil-profile-card__avatar-img {
  width: 4rem;
  height: 4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--kausia-border);
}

.perfil-profile-card__facts {
  display: grid;
  grid-template-columns: minmax(8rem, 30%) 1fr;
  gap: .4rem .75rem;
  margin: 0;
  align-content: center;
}

.perfil-profile-card__facts dt {
  color: var(--kausia-muted);
  font-size: .8rem;
  font-weight: 700;
}

.perfil-profile-card__facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.perfil-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--kausia-accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.perfil-section h2 {
  margin: 0 0 .5rem;
  font-size: 1.1rem;
}

.perfil-main-panel {
  min-width: 0;
  padding: 1rem;
}

.perfil-main-panel .nav-tabs {
  flex-wrap: wrap;
}

.kausia-tab-panel,
.kausia-tabs .js-tab-panel {
  display: none;
}

.kausia-tab-panel.active,
.kausia-tabs .js-tab-panel.active {
  display: block;
}

.kausia-tabs-nav a.active {
  font-weight: 600;
}

.perfil-tab-content {
  padding-top: 1rem;
}

.perfil-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.perfil-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.perfil-label-help {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
}

.perfil-label-help .form-label {
  margin-bottom: 0;
}

.perfil-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border-radius: 50%;
  font-weight: 700;
  line-height: 1;
}

.perfil-preference-row {
  display: grid;
  grid-template-columns: minmax(11rem, 24%) minmax(14rem, 1fr) auto;
  gap: .75rem;
  align-items: center;
  margin-top: 1rem;
}

.perfil-preference-row .form-label {
  margin-bottom: 0;
  font-weight: 600;
}

.perfil-preference-help {
  margin-left: calc(24% + .75rem);
}

.despacho-organigrama {
  display: block;
}

.organigrama-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.organigrama-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.organigrama-filter-group legend {
  width: auto;
  margin: 0 .5rem 0 0;
  font-size: .9rem;
  font-weight: 600;
}

.organigrama-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.organigrama-chart-container {
  position: relative;
  width: 100%;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: .5rem;
  background: var(--bs-body-bg);
}

.organigrama-loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: var(--bs-secondary-color);
}

.organigrama-svg {
  display: block;
  width: 100%;
  height: 650px;
  cursor: grab;
}

.organigrama-link {
  fill: none;
  stroke: var(--bs-border-color);
  stroke-width: 1.5px;
}

.org-node {
  min-height: 96px;
  padding: .75rem;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-left: 4px solid var(--bs-primary);
  border-radius: .5rem;
  background: var(--bs-body-bg);
  box-shadow: 0 .25rem .8rem rgba(15, 23, 42, .08);
  font-size: .82rem;
}

.org-node.org-node-user,
.org-node-user .org-node {
  border-left-color: var(--bs-success);
}

.org-node.org-node-external_collaborator,
.org-node-external_collaborator .org-node {
  border-left-color: var(--bs-info);
}

.org-node-name {
  font-weight: 700;
  line-height: 1.2;
}

.org-node-meta {
  margin-top: .25rem;
  color: var(--bs-secondary-color);
  line-height: 1.25;
}

.org-node-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .4rem;
}

.org-node-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  padding: .1rem .45rem;
  background: var(--bs-light);
  color: var(--bs-body-color);
  font-size: .72rem;
}

.org-node-badge-responsible {
  border-color: rgba(var(--bs-primary-rgb), .2);
  background: rgba(var(--bs-primary-rgb), .08);
  color: var(--bs-primary);
}

.org-node-badge-inactive {
  border-color: rgba(var(--bs-warning-rgb), .35);
  background: rgba(var(--bs-warning-rgb), .12);
  color: #8a5a00;
}

.org-node-user-inactive {
  border-style: dashed;
  opacity: .68;
  filter: grayscale(.65);
}

.org-node-user-inactive .org-node-name {
  text-decoration: line-through;
}

.org-node-warning {
  border-color: var(--bs-warning);
  box-shadow: 0 0 0 .18rem rgba(var(--bs-warning-rgb), .16);
}

.organigrama-inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: .5rem;
}

.perfil-detail-list {
  display: grid;
  grid-template-columns: minmax(7rem, 35%) 1fr;
  gap: .5rem .75rem;
  margin: 0;
}

.perfil-detail-list--wide {
  grid-template-columns: minmax(10rem, 28%) 1fr;
}

.perfil-detail-list dt {
  color: var(--kausia-muted);
  font-size: .8rem;
  font-weight: 700;
}

.perfil-detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.despacho-config-page {
  padding-bottom: 2rem;
}

.despacho-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.despacho-config-layout > [data-despacho-summary-source] {
  display: none;
}

.despacho-config-main {
  grid-column: 1 / -1;
  min-width: 0;
}

.despacho-config-panel {
  background: #fff;
  border: 1px solid var(--kausia-border);
}

.despacho-config-panel__header {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--kausia-border);
}

.despacho-config-panel__header h2 {
  margin: 0;
  font-size: 1rem;
}

.despacho-config-panel__body {
  padding: 1rem;
}

.despacho-config-summary {
  min-width: 0;
}

.despacho-config-summary--in-tab {
  display: block;
  margin-bottom: 1rem;
}

.despacho-detalle-list {
  display: grid;
  grid-template-columns: minmax(7rem, 38%) 1fr;
  gap: .5rem .75rem;
  margin: 0;
}

.despacho-detalle-list dt {
  color: var(--kausia-muted);
  font-size: .8rem;
  font-weight: 700;
}

.despacho-detalle-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.despacho-color-swatch {
  display: inline-block;
  width: .875rem;
  height: .875rem;
  margin-right: .375rem;
  border: 1px solid var(--kausia-border);
  border-radius: 50%;
  background: var(--swatch-color, transparent);
  vertical-align: -.125rem;
}

.despacho-config-tabs {
  min-width: 0;
}

.despacho-config-tabs__header {
  padding-bottom: 0;
}

.despacho-config-tabs .nav-tabs {
  flex-wrap: wrap;
  gap: .125rem;
}

.despacho-config-tab-content {
  min-height: 22rem;
}

.despacho-config-table-panel {
  max-width: 100%;
}

.despacho-config-table-panel table,
.crm-localizaciones-table-panel table,
.despacho-config-table-panel .dt-container,
.crm-localizaciones-table-panel .dt-container {
  width: 100% !important;
}

.despacho-config-form {
  margin-bottom: 1rem;
}

.despacho-config-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .875rem;
  align-items: end;
}

.despacho-config-form-grid--users {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.despacho-config-form-grid--states {
  grid-template-columns: 1fr 1.2fr 1.6fr .7fr .8fr;
}

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

.communication-template-variables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .75rem;
}

.communication-template-row-form {
  min-width: min(28rem, 80vw);
}

.communication-template-email-preview,
.communication-template-preview-html {
  border: 1px solid var(--kausia-border);
  border-radius: .5rem;
  padding: 1rem;
  background: #fff;
}

.communication-template-preview-subject {
  border: 1px solid var(--kausia-border);
  border-radius: .375rem;
  padding: .5rem .75rem;
  background: #f8fafc;
  font-weight: 600;
}

.communication-template-phone-preview {
  max-width: 22rem;
  min-height: 28rem;
  margin: 0 auto;
  padding: 1rem;
  border: 1px solid var(--kausia-border);
  border-radius: 1.25rem;
  background: #f0f2f5;
}

.communication-template-chat-bubble {
  margin-left: auto;
  max-width: 90%;
  padding: .75rem .875rem;
  border-radius: .75rem .75rem .125rem .75rem;
  background: #d9fdd3;
  color: #1f2933;
  box-shadow: 0 .125rem .35rem rgba(15, 23, 42, .12);
  overflow-wrap: anywhere;
}

.despacho-config-inline-form {
  padding: .875rem;
  border: 1px solid var(--kausia-border);
  background: #fafbfc;
}

.despacho-config-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.despacho-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
}

.crm-territory-manager {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-territory-status {
  margin: 0;
}

.crm-localizaciones-tabs {
  min-width: 0;
}

.crm-subtabs {
  flex-wrap: wrap;
  gap: .125rem;
  margin-bottom: 1rem;
}

.crm-localizaciones-tab-panel {
  display: none;
}

.crm-localizaciones-tab-panel.active {
  display: block;
}

.crm-usuarios-tabs form[action*="/desactivar"].d-inline {
  display: none !important;
}

.despacho-ubicaciones-actions-cell {
  width: 1%;
  text-align: right;
}

.despacho-usuarios-actions-cell {
  width: 1%;
  text-align: right;
}

.despacho-usuarios-actions-menu {
  display: inline-block;
  position: relative;
}

.despacho-usuarios-actions-menu:hover .dropdown-menu,
.despacho-usuarios-actions-menu:focus-within .dropdown-menu {
  display: block;
}

.despacho-usuarios-actions-toggle::after {
  display: none;
}

.despacho-usuarios-actions-dropdown {
  z-index: 1085;
  min-width: 14rem;
}

.despacho-usuarios-actions-item {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.despacho-usuarios-actions-icon {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
}

.despacho-ubicacion-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  width: 100%;
}

.despacho-ubicacion-actions form {
  margin: 0;
}

.despacho-ubicacion-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.despacho-economico-actions-cell {
  width: 1%;
  text-align: right;
}

.despacho-economico-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  width: 100%;
}

.despacho-economico-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.despacho-estados-actions-cell {
  width: 1%;
  text-align: right;
}

.despacho-estados-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  width: 100%;
}

.despacho-estados-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.despacho-origenes-actions-cell {
  width: 1%;
  text-align: right;
}

.despacho-origenes-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  width: 100%;
}

.despacho-origenes-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.prescriptor-actions {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.prescriptor-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.prescriptor-action .crm-action-icon {
  width: 1rem;
  height: 1rem;
}

.quick-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0;
  border-top: 1px solid var(--bs-border-color);
  padding-top: 0.75rem;
}

.crm-localizaciones-table-panel {
  min-width: 0;
}

.crm-localizaciones-table-panel table.dataTable {
  margin: 0;
}

.crm-localizaciones-table-panel td:last-child {
  width: 5rem;
}

.crm-config-section {
  min-width: 0;
}

.crm-config-status {
  margin: 0 0 1rem;
}

.error-log-filters {
  margin-bottom: 1rem;
}

.error-log-bulk-actions {
  margin-bottom: 1rem;
}

.error-log-bulk-actions.is-busy {
  opacity: .75;
  pointer-events: none;
}

.error-log-select-column {
  width: 2.75rem;
}

.error-log-row-actions {
  white-space: nowrap;
}

.error-log-delete-action {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.error-log-detail-item {
  border: 1px solid var(--kausia-border);
  border-radius: 8px;
  background: #fff;
  min-height: 100%;
  padding: 0.75rem;
}

.error-log-detail-label {
  display: block;
  color: var(--kausia-muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.error-log-detail-value,
.error-log-stack {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

.error-log-detail-value {
  color: var(--kausia-ink);
  font-family: inherit;
  font-size: 0.9rem;
  max-height: 12rem;
  overflow: auto;
}

.error-log-stack {
  background: #111827;
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.82rem;
  max-height: 28rem;
  overflow: auto;
  padding: 1rem;
}

.crm-config-list {
  display: grid;
  gap: .625rem;
}

.crm-config-item {
  display: grid;
  gap: .5rem;
}

.crm-config-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  min-height: 2.75rem;
  padding: .625rem .75rem;
  border: 1px solid var(--kausia-border);
  background: #fff;
}

.crm-config-parent-row {
  grid-template-columns: 2rem 3rem minmax(0, 1fr) 6rem auto;
  border-left: .25rem solid var(--kausia-accent);
  cursor: pointer;
}

.crm-config-disclosure {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--kausia-muted);
  font-weight: 700;
  line-height: 1;
  transition: transform .15s ease, color .15s ease;
}

.crm-config-disclosure:hover,
.crm-config-parent-row:hover .crm-config-disclosure {
  color: var(--kausia-accent);
}

.crm-config-disclosure[aria-expanded="true"] {
  transform: rotate(90deg);
}

.crm-config-disclosure:disabled {
  cursor: default;
  opacity: .35;
}

.crm-config-child-list {
  display: grid;
  gap: .5rem;
  margin-left: 2rem;
}

.crm-config-child-row {
  background: #fafbfc;
}

.crm-config-copy {
  min-width: 0;
}

.crm-config-name,
.crm-config-meta,
.crm-config-state {
  display: block;
}

.crm-config-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.crm-config-meta {
  color: var(--kausia-muted);
  font-size: .8125rem;
  overflow-wrap: anywhere;
}

.crm-config-state {
  color: var(--kausia-muted);
  font-size: .8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.crm-config-color {
  display: flex;
  gap: .375rem;
  align-items: center;
  margin: 0;
}

.crm-config-color .form-control-color {
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2rem;
  padding: .125rem;
}

.crm-territory-list {
  display: grid;
  gap: .5rem;
}

.crm-territory-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  min-height: 2.75rem;
  padding: .625rem .75rem;
  border: 1px solid var(--kausia-border);
  background: #fff;
}

.crm-territory-copy {
  min-width: 0;
}

.crm-territory-name,
.crm-territory-meta,
.crm-territory-state {
  display: block;
}

.crm-territory-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.crm-territory-meta {
  color: var(--kausia-muted);
  font-size: .8125rem;
  overflow-wrap: anywhere;
}

.crm-territory-state {
  color: var(--kausia-muted);
  font-size: .8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.crm-territory-empty {
  margin: 0;
}

.crm-toggle-switch {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  vertical-align: middle;
}

.crm-toggle-switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.crm-toggle-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #b7bdc5;
  transition: background-color .2s ease, box-shadow .2s ease;
}

.crm-toggle-slider::before {
  position: absolute;
  content: "";
  width: 1.125rem;
  height: 1.125rem;
  left: .1875rem;
  top: .1875rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 .125rem .375rem rgba(32, 36, 42, .25);
  transition: transform .2s ease;
}

.crm-toggle-switch input:checked + .crm-toggle-slider {
  background: var(--kausia-accent);
}

.crm-toggle-switch input:focus-visible + .crm-toggle-slider {
  box-shadow: 0 0 0 .2rem rgba(36, 107, 97, .22);
}

.crm-toggle-switch input:checked + .crm-toggle-slider::before {
  transform: translateX(1.25rem);
}

.crm-toggle-switch input:disabled + .crm-toggle-slider {
  cursor: wait;
  opacity: .7;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  padding: .625rem;
  border-bottom: 1px solid var(--kausia-border);
  text-align: left;
}

.filters, .form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.auth-body {
  box-sizing: border-box;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 1rem;
  background: #f7f8fa;
}

.auth-panel {
  align-self: center;
  justify-self: center;
  width: min(100% - 2rem, 30rem);
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--kausia-border);
}

.kausia-login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.kausia-login-logo {
  display: block;
  width: min(100%, 16rem);
  height: auto;
  aspect-ratio: 799 / 275;
  object-fit: contain;
}

#calendar {
  min-height: 32rem;
  background: #fff;
  border: 1px solid var(--kausia-border);
}

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

  .dashboard-hero {
    flex-direction: column;
  }

  .dashboard-home .dashboard-hero {
    gap: .65rem;
    padding: .7rem;
  }

  .dashboard-hero__summary,
  .dashboard-quick-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-home .dashboard-hero__summary span {
    min-height: 2.75rem;
    padding: .45rem .55rem;
  }

  .dashboard-home .dashboard-kpi {
    min-height: 4.25rem;
    padding: .65rem .75rem;
  }

  .dashboard-card {
    min-height: 0;
  }

  .dashboard-card__header,
  .dashboard-section__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-list-item__actions {
    justify-content: space-between;
    width: 100%;
  }

  .page-header,
  .agenda-toolbar,
  .agenda-toolbar__status {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header-actions {
    justify-content: stretch;
  }

  .page-header-actions .btn,
  .agenda-toolbar__status .form-select {
    width: 100%;
  }

  .papelera-documents__header {
    display: none;
  }

  .papelera-document-node__row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .papelera-document-node__row .text-end {
    text-align: left !important;
  }

  .agenda-calendar {
    padding: .5rem;
  }

  .agenda-calendar .fc-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-timeline-item {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--kausia-border);
  }

  .crm-territory-row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .crm-config-row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .crm-config-parent-row {
    grid-template-columns: 2rem 3rem minmax(0, 1fr);
  }

  .despacho-config-form-grid,
  .despacho-config-form-grid--users,
  .despacho-config-form-grid--states,
  .communication-template-grid,
  .communication-template-variables {
    grid-template-columns: 1fr;
  }

  .crm-config-child-list {
    margin-left: .75rem;
  }

  .crm-config-color {
    grid-column: 2 / -1;
  }

  .crm-config-state {
    grid-column: 2 / -1;
  }

  .crm-territory-state {
    grid-column: 2;
  }
}

@media (max-width: 992px) {
  .dashboard-kpi-shell {
    height: auto;
  }

  .dashboard-kpi-panel {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }

  .dashboard-kpi-shell.is-open .dashboard-kpi-panel {
    display: block;
  }

  .dashboard-kpi-panel .dashboard-card {
    max-height: none;
  }

  .despacho-config-layout {
    grid-template-columns: 1fr;
  }

  .perfil-layout {
    grid-template-columns: 1fr;
  }

  .perfil-profile-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .perfil-profile-card__facts {
    grid-template-columns: minmax(7rem, 35%) 1fr;
  }

  .perfil-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .perfil-preference-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .perfil-preference-row .form-label {
    margin-bottom: -.25rem;
  }

  .perfil-preference-help {
    margin-left: 0;
  }

  .organigrama-toolbar,
  .organigrama-inline-form {
    grid-template-columns: 1fr;
  }

  .perfil-detail-list,
  .perfil-detail-list--wide {
    grid-template-columns: 1fr;
  }

  .modal-cliente-detalle {
    max-width: 95vw;
    width: 95vw;
    height: 95vh;
  }

  .expediente-detalle-layout {
    grid-template-columns: 1fr;
  }

  .expediente-detalle-left {
    max-height: 38%;
    border-right: 0;
    border-bottom: 1px solid var(--kausia-border);
    padding-right: 0;
    padding-bottom: 1rem;
  }

  .cliente-detalle-fields {
    grid-template-columns: 1fr;
  }

  .expediente-detalle-fields {
    grid-template-columns: 1fr;
  }

  .expediente-historico__header {
    flex-direction: column;
  }

  .expediente-documents__body {
    grid-template-columns: 1fr;
  }

  .expediente-documents__tree {
    max-height: 16rem;
  }

  .expediente-documents__search .form-control,
  .expediente-documents__search .btn,
  .expediente-documents__actions .btn,
  .expediente-documents__actions a {
    width: 100%;
  }

  .expediente-documents__actions .document-toolbar-icon {
    width: 2.1rem;
  }

  .expediente-historico__summary {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .historico-timeline-item {
    grid-template-columns: 1fr;
  }
}
.document-index-toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.document-index-toast {
  min-width: 280px;
  max-width: 420px;
  background: #fff;
  border: 1px solid rgba(33, 37, 41, .12);
  border-left: 4px solid #198754;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  padding: 12px 14px;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease;
}

.document-index-toast--warning {
  border-left-color: #ffc107;
}

.document-index-toast--danger {
  border-left-color: #dc3545;
}

.document-index-toast.is-hiding {
  opacity: 0;
  transform: translateY(8px);
}

.document-index-toast-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.document-index-toast-message {
  color: #495057;
  font-size: 13px;
}

.crm-rich-text-display {
  overflow-wrap: anywhere;
}

.crm-rich-text-display > :last-child {
  margin-bottom: 0;
}

.crm-rich-text-display table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: .75rem;
}

.crm-rich-text-display th,
.crm-rich-text-display td {
  border: 1px solid #dee2e6;
  padding: .35rem .5rem;
}

.tox-tinymce {
  border-radius: .375rem;
}

.admin-crm-action-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.admin-crm-action-menu__trigger {
  width: 2rem;
  height: 2rem;
}

.admin-crm-action-menu__items {
  position: absolute;
  top: 50%;
  right: calc(100% + .35rem);
  z-index: 20;
  display: none;
  gap: .25rem;
  padding: .25rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: .375rem;
  box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .16);
  transform: translateY(-50%);
}

.admin-crm-action-menu:hover .admin-crm-action-menu__items,
.admin-crm-action-menu:focus-within .admin-crm-action-menu__items {
  display: inline-flex;
}

.admin-crm-action-menu__items .btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.despacho-setup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.despacho-setup-page .despacho-config-panel {
  margin-top: 1rem;
}

.despacho-setup-progress {
  display: grid;
  gap: .75rem;
  margin-bottom: 1rem;
}

.despacho-setup-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.despacho-setup-steps li {
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: .75rem;
  background: var(--bs-body-bg);
}

.despacho-setup-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bs-secondary-bg);
  margin-right: .35rem;
  font-size: .8rem;
}

.despacho-setup-steps li small {
  display: block;
  color: var(--bs-secondary-color);
  margin-top: .25rem;
}

.despacho-setup-steps li.is-current {
  border-color: var(--bs-primary);
}

.despacho-setup-steps li.is-completed span {
  background: var(--bs-success);
  color: #fff;
}

.despacho-setup-steps li.is-skipped span {
  background: var(--bs-warning);
}

.despacho-setup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
}

.despacho-setup-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}

.despacho-setup-language {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: .75rem;
}

.despacho-setup-summary h3 {
  font-size: 1rem;
  margin-top: 1rem;
}
