/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */
:root {
  --bs-font-sans-serif: "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --app-brand-primary: #1e824c;
  --app-brand-primary-text: #ffffff;
  --app-brand-accent: #198754;
  --app-main-bg: #f7f9f7;
  --app-brand-accent-soft: color-mix(in srgb, var(--app-brand-accent) 12%, #ffffff);
  --app-brand-accent-focus: color-mix(in srgb, var(--app-brand-accent) 26%, transparent);
}
.pagination .page-link {
  color: var(--app-brand-accent);
}

.pagination .page-link:hover,
.pagination .page-link:focus {
  color: var(--app-brand-accent);
  background-color: var(--app-brand-accent-soft);
  border-color: var(--app-brand-accent);
}

.pagination .page-item.active .page-link {
  background-color: var(--app-brand-accent);
  border-color: var(--app-brand-accent);
  color: var(--app-brand-primary-text);
}

.btn-success {
  --bs-btn-color: var(--app-brand-primary-text);
  --bs-btn-bg: var(--app-brand-accent);
  --bs-btn-border-color: var(--app-brand-accent);
  --bs-btn-hover-color: var(--app-brand-primary-text);
  --bs-btn-hover-bg: color-mix(in srgb, var(--app-brand-accent) 88%, #000000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--app-brand-accent) 82%, #000000);
  --bs-btn-focus-shadow-rgb: 25, 135, 84;
  --bs-btn-active-color: var(--app-brand-primary-text);
  --bs-btn-active-bg: color-mix(in srgb, var(--app-brand-accent) 78%, #000000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--app-brand-accent) 72%, #000000);
  --bs-btn-disabled-color: var(--app-brand-primary-text);
  --bs-btn-disabled-bg: var(--app-brand-accent);
  --bs-btn-disabled-border-color: var(--app-brand-accent);
}

.btn-outline-success {
  --bs-btn-color: var(--app-brand-accent);
  --bs-btn-border-color: var(--app-brand-accent);
  --bs-btn-hover-color: var(--app-brand-primary-text);
  --bs-btn-hover-bg: var(--app-brand-accent);
  --bs-btn-hover-border-color: var(--app-brand-accent);
  --bs-btn-focus-shadow-rgb: 25, 135, 84;
  --bs-btn-active-color: var(--app-brand-primary-text);
  --bs-btn-active-bg: var(--app-brand-accent);
  --bs-btn-active-border-color: var(--app-brand-accent);
  --bs-btn-disabled-color: var(--app-brand-accent);
  --bs-btn-disabled-border-color: var(--app-brand-accent);
}

.btn-success:focus,
.btn-success:focus-visible,
.btn-outline-success:focus,
.btn-outline-success:focus-visible {
  box-shadow: 0 0 0 0.25rem var(--app-brand-accent-focus);
}

@media (min-width: 992px) {
  .admin-sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    align-self: flex-start;
    overflow-y: auto;
  }

  .admin-sidebar .nav-link {
    font-size: 0.93rem;
  }

  .admin-sidebar .admin-sidebar-subitem {
    font-size: 0.9rem;
  }

  .admin-sidebar .admin-sidebar-subheader,
  .admin-sidebar .border-top {
    font-size: 0.78rem;
  }
}

.admin-topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 56px;
  z-index: 1030;
  color: var(--app-brand-primary-text);
  background: var(--app-brand-primary);
  border-bottom: 1px solid color-mix(in srgb, var(--app-brand-primary) 20%, #ffffff);
}

.admin-main {
  background: var(--app-main-bg);
}

.admin-sidebar .nav-link.active {
  background: var(--app-brand-accent-soft) !important;
}

.establishment-brand-logo-preview {
  width: auto;
  max-width: 180px;
  height: 32px;
  object-fit: contain;
}

.establishment-brand-favicon-preview {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.establishment-color-field {
  width: 100%;
  height: 38px;
  padding: 0.25rem;
}

.units-page .unit-configuration-switches {
  min-height: calc(1.5em + 0.75rem + 2px);
  align-items: center;
}

.units-page .unit-configuration-switches .form-check {
  margin-bottom: 0;
}

.establishment-color-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  font-weight: 600;
}

.establishment-color-swatch {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 50%;
}

.admin-topbar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding-right: 1rem;
  padding-left: 1rem;
}

.admin-topbar-brand,
.admin-topbar-user,
.admin-topbar-user-button,
.admin-topbar-user-text {
  min-width: 0;
}

.admin-topbar-brand {
  justify-self: start;
}

.admin-topbar-brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar-user {
  justify-self: end;
}

.admin-topbar-user-button {
  max-width: min(360px, 46vw);
}

.admin-topbar-user-avatar {
  display: none;
  font-size: 1.35rem;
  line-height: 1;
}

.admin-sidebar .admin-sidebar-subitem {
  padding-left: 1.75rem;
}

.admin-sidebar #settingsMenu .admin-sidebar-subheader {
  padding-left: 1.75rem !important;
}

.admin-sidebar #settingsMenu .admin-sidebar-subitem {
  padding-left: 2.5rem;
}

.table-action-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  text-decoration: none;
  line-height: 1;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.table-action-icon i {
  font-size: 1.05rem;
  line-height: 1;
}

.table-action-icon:not(:disabled):not(.disabled):hover,
.table-action-icon:not(:disabled):not(.disabled):focus {
  color: #495057 !important;
  background-color: rgba(108, 117, 125, 0.14);
  text-decoration: none;
}

.table-action-icon.text-primary:not(:disabled):not(.disabled):hover,
.table-action-icon.text-primary:not(:disabled):not(.disabled):focus {
  color: #0d6efd !important;
  background-color: rgba(13, 110, 253, 0.12);
}

.table-action-icon.text-success:not(:disabled):not(.disabled):hover,
.table-action-icon.text-success:not(:disabled):not(.disabled):focus {
  color: var(--app-brand-accent) !important;
  background-color: var(--app-brand-accent-soft);
}

.table-action-icon.text-danger:not(:disabled):not(.disabled):hover,
.table-action-icon.text-danger:not(:disabled):not(.disabled):focus {
  color: #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.12);
}

.table-action-icon.text-dark:not(:disabled):not(.disabled):hover,
.table-action-icon.text-dark:not(:disabled):not(.disabled):focus {
  color: #212529 !important;
  background-color: rgba(33, 37, 41, 0.12);
}

.table-action-icon:not(:disabled):not(.disabled):focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.18rem rgba(108, 117, 125, 0.22);
}

.table-action-icon:disabled,
.table-action-icon.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.app-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.app-back-button i {
  line-height: 1;
}

.app-back-button.btn:hover,
.app-back-button.btn:focus {
  color: #fff !important;
  background-color: #6c757d;
  border-color: #6c757d;
  text-decoration: none;
}

.app-back-button.btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.28);
}

.admin-page {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  min-width: 0;
}

.admin-page,
.admin-page .card,
.admin-page .card-header,
.admin-page .card-body,
.admin-page .table-responsive,
.admin-page .row,
.admin-page [class*="col-"],
.admin-page h1,
.admin-page h2,
.admin-page .fw-semibold,
.admin-page .text-muted {
  min-width: 0;
}

.admin-page h1,
.admin-page h2,
.admin-page .fw-semibold,
.admin-page .text-muted,
.admin-page td,
.admin-page th {
  overflow-wrap: anywhere;
}

.admin-page .table-responsive {
  border-radius: 8px;
}

.admin-page .pagination {
  flex-wrap: nowrap;
  margin-bottom: 0;
}

.admin-page .d-flex.justify-content-center:has(.pagination),
.admin-page .mt-3:has(.pagination),
.admin-page .card-footer:has(.pagination) {
  min-width: 0;
  overflow-x: auto;
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    width: min(88vw, 340px) !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .admin-sidebar .offcanvas-body {
    overflow-y: auto;
  }

  .admin-sidebar .nav-link {
    min-height: 42px;
    white-space: normal;
  }

  .admin-sidebar .nav-link span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .admin-sidebar .admin-sidebar-subitem {
    padding-left: 1rem;
  }

  .admin-sidebar #settingsMenu .admin-sidebar-subheader {
    padding-left: 1.5rem !important;
  }

  .admin-sidebar #settingsMenu .admin-sidebar-subitem {
    padding-left: 2.25rem;
  }
}

@media (max-width: 575.98px) {
  .admin-page {
    padding-top: 0.5rem !important;
    padding-bottom: 0.75rem !important;
  }

  .admin-page h1.h4,
  .admin-page .h4 {
    font-size: 1.35rem;
    line-height: 1.15;
  }

  .admin-page > .d-flex:first-child,
  .admin-page > form > .d-flex:first-child,
  .admin-page > .card > .card-header.d-flex,
  .admin-page .card-header > .d-flex {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    justify-content: stretch !important;
    gap: 0.75rem !important;
  }

  .admin-page > .d-flex:first-child > .d-flex,
  .admin-page > form > .d-flex:first-child > .d-flex,
  .admin-page > .card > .card-header.d-flex > .d-flex,
  .admin-page .card-header > .d-flex > .d-flex {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .admin-page > .d-flex:first-child .btn,
  .admin-page > form > .d-flex:first-child .btn,
  .admin-page > .card > .card-header.d-flex .btn,
  .admin-page .card-header > .d-flex .btn {
    width: 100%;
  }

  .admin-page .card-body,
  .admin-page .card-header {
    padding: 0.85rem !important;
  }

  .admin-page .card-body.pt-0 {
    padding-top: 0 !important;
  }

  .admin-page .card-body > form .row {
    row-gap: 0.75rem !important;
  }

  .admin-page .card-body > form .d-flex.gap-2 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .admin-page .card-body > form .btn {
    width: 100%;
  }

  .admin-page .table-responsive {
    border: 1px solid #e9eef5;
  }

  .admin-page .table {
    min-width: 680px;
  }

  .admin-page dl.row > dt,
  .admin-page dl.row > dd {
    flex: 0 0 auto;
    width: 100%;
  }

  .admin-page dl.row > dd {
    margin-bottom: 0.85rem;
  }

  .admin-page .border.rounded .d-flex.justify-content-between {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem !important;
  }

  .admin-page .border.rounded .btn {
    width: 100%;
  }
}

.report-page,
.report-page .card,
.report-page .card-body,
.report-page .card-header,
.report-page .table-responsive,
.report-page .table,
.report-page td[data-label],
.report-page td[data-label] > * {
  min-width: 0;
}

.report-page .table td,
.report-page .table th {
  vertical-align: middle;
}

.report-page .report-filter-actions,
.report-page .report-filter-submit {
  min-width: 0;
}

@media (max-width: 767.98px) {
  .report-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .report-page > .d-flex:first-child > .d-flex,
  .report-page > .d-flex:first-child > .btn {
    width: 100%;
  }

  .report-page > .d-flex:first-child > .d-flex {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .report-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .report-page .card-header,
  .report-page .card-body {
    padding: 0.85rem !important;
  }

  .report-page form.row {
    row-gap: 0.75rem !important;
  }

  .report-page .report-filter-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .report-page .report-filter-actions .btn,
  .report-page .report-filter-submit .btn {
    width: 100%;
  }

  .report-page .table-responsive {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .report-page .table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .report-page .table thead {
    display: none;
  }

  .report-page .table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .report-page .table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .report-page .table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .report-page .table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .report-page .table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .report-page .table td[data-label].report-cell-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .report-page .table td[data-label].report-cell-actions::before {
    grid-row: auto;
  }

  .report-page .table td[data-label].report-cell-actions .btn {
    width: 100%;
  }

  .report-page .table td[colspan] {
    display: block;
  }

  .report-page .table td[colspan] .p-4 {
    padding: 1rem !important;
  }

  .report-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .report-page .report-filter-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-page .table tbody {
    padding: 0.75rem;
  }

  .report-page .table tr {
    padding: 0.75rem;
  }

  .report-page .table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .report-page .table td[data-label]::before {
    grid-row: auto;
  }
}

.establishment-page,
.establishment-page .card,
.establishment-page .card-body,
.establishment-page .card-header,
.establishment-page .table-responsive,
.establishment-page .table,
.establishment-page td[data-label],
.establishment-page td[data-label] > *,
.establishment-page .establishment-address-card {
  min-width: 0;
}

.establishment-page .table td,
.establishment-page .table th {
  vertical-align: middle;
}

.establishment-page .establishment-address-card {
  background: #fff;
}

@media (max-width: 767.98px) {
  .establishment-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .establishment-page > .d-flex:first-child > .btn,
  .establishment-page .establishment-header-actions,
  .establishment-page .establishment-header-actions .btn {
    width: 100%;
  }

  .establishment-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .establishment-page .card-header,
  .establishment-page .card-body {
    padding: 0.85rem !important;
  }

  .establishment-page .establishment-address-card {
    padding: 0.85rem !important;
  }

  .establishment-page .establishment-address-card-header {
    display: flex !important;
    align-items: center !important;
  }

  .establishment-page .establishment-address-card-header .btn {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .establishment-page .establishment-add-address-button {
    width: 100%;
  }

  .establishment-page .establishment-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .establishment-page .establishment-form-actions,
  .establishment-page .establishment-form-actions .btn {
    width: 100%;
  }

  .establishment-page .establishment-addresses-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .establishment-page .establishment-addresses-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .establishment-page .establishment-addresses-table thead {
    display: none;
  }

  .establishment-page .establishment-addresses-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .establishment-page .establishment-addresses-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .establishment-page .establishment-addresses-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .establishment-page .establishment-addresses-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .establishment-page .establishment-addresses-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }
}

@media (max-width: 575.98px) {
  .establishment-page .establishment-addresses-table tbody {
    padding: 0.75rem;
  }

  .establishment-page .establishment-addresses-table tr {
    padding: 0.75rem;
  }

  .establishment-page .establishment-addresses-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .establishment-page .establishment-addresses-table td[data-label]::before {
    grid-row: auto;
  }
}

.procedure-page,
.procedure-page .card,
.procedure-page .card-body,
.procedure-page .card-header,
.procedure-page .table-responsive,
.procedure-page .table,
.procedure-page td[data-label],
.procedure-page td[data-label] > *,
.procedure-page .procedure-type-options,
.procedure-page .procedure-row-actions,
.procedure-page .procedure-show-meta,
.procedure-page .procedure-show-actions {
  min-width: 0;
}

.procedure-page .table td,
.procedure-page .table th {
  vertical-align: middle;
}

.procedure-page .procedure-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.procedure-page .procedure-type-fieldset .form-check {
  min-width: 0;
}

.procedure-page .procedure-type-fieldset .form-check-label {
  overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
  .procedure-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .procedure-page > .d-flex:first-child > .btn,
  .procedure-page .procedure-show-actions,
  .procedure-page .procedure-show-actions .btn {
    width: 100%;
  }

  .procedure-page .procedure-show-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .procedure-page .procedure-action-separator {
    display: none;
  }

  .procedure-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .procedure-page .card-header,
  .procedure-page .card-body {
    padding: 0.85rem !important;
  }

  .procedure-page .procedure-type-fieldset {
    padding: 0.85rem !important;
  }

  .procedure-page .procedure-type-options {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.75rem !important;
  }

  .procedure-page .procedure-filter-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .procedure-page .procedure-filter-actions .btn {
    width: 100%;
  }

  .procedure-page .procedure-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .procedure-page .procedure-form-actions,
  .procedure-page .procedure-form-actions .btn {
    width: 100%;
  }

  .procedure-page .procedure-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .procedure-page .procedure-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .procedure-page .procedure-table thead {
    display: none;
  }

  .procedure-page .procedure-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .procedure-page .procedure-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .procedure-page .procedure-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .procedure-page .procedure-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .procedure-page .procedure-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .procedure-page .procedure-table .text-truncate {
    max-width: none !important;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .procedure-page .procedure-row-actions {
    justify-content: flex-start;
  }

  .procedure-page .procedure-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .procedure-page .procedure-table td[colspan] {
    display: block;
  }

  .procedure-page .procedure-table td[colspan] .p-4 {
    padding: 1rem !important;
  }

  .procedure-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .procedure-page .procedure-show-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem !important;
  }

  .procedure-page .procedure-type-options,
  .procedure-page .procedure-filter-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .procedure-page .procedure-table tbody {
    padding: 0.75rem;
  }

  .procedure-page .procedure-table tr {
    padding: 0.75rem;
  }

  .procedure-page .procedure-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .procedure-page .procedure-table td[data-label]::before {
    grid-row: auto;
  }
}

.clinical-case-step-page,
.clinical-case-step-page .card,
.clinical-case-step-page .card-body,
.clinical-case-step-page .card-header,
.clinical-case-step-page .table-responsive,
.clinical-case-step-page .table,
.clinical-case-step-page td[data-label],
.clinical-case-step-page td[data-label] > *,
.clinical-case-step-page .clinical-case-step-row-actions,
.clinical-case-step-page .clinical-case-step-show-actions,
.clinical-case-step-page .clinical-case-step-form-actions,
.clinical-case-step-page .clinical-case-step-form-footer,
.clinical-case-step-page .clinical-case-step-rule-input,
.clinical-case-step-page .clinical-case-step-rule-preview {
  min-width: 0;
}

.clinical-case-step-page,
.clinical-case-step-page .card,
.clinical-case-step-page .row,
.clinical-case-step-page .form-control,
.clinical-case-step-page .form-select,
.clinical-case-step-page .clinical-case-step-rule-input,
.clinical-case-step-page .clinical-case-step-rule-preview {
  max-width: 100%;
}

.clinical-case-step-page {
  overflow-x: clip;
}

.clinical-case-step-page .table td,
.clinical-case-step-page .table th {
  vertical-align: middle;
}

.clinical-case-step-page .clinical-case-step-row-actions {
  align-items: center;
  justify-content: flex-end;
}

.clinical-case-step-page .clinical-case-step-rule-input,
.clinical-case-step-page .clinical-case-step-rule-preview {
  overflow-x: auto;
}

@media (max-width: 767.98px) {
  .admin-main:has(.clinical-case-step-page),
  .admin-main:has(.clinical-case-step-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .clinical-case-step-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .clinical-case-step-page > .d-flex:first-child > .btn,
  .clinical-case-step-page .clinical-case-step-show-actions,
  .clinical-case-step-page .clinical-case-step-show-actions .btn {
    width: 100%;
  }

  .clinical-case-step-page .clinical-case-step-show-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .clinical-case-step-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .clinical-case-step-page .card-header,
  .clinical-case-step-page .card-body {
    padding: 0.85rem !important;
  }

  .clinical-case-step-page .card-body > .row {
    --bs-gutter-x: 0;
  }

  .clinical-case-step-page .form-check-label {
    overflow-wrap: anywhere;
  }

  .clinical-case-step-page .clinical-case-step-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .clinical-case-step-page .clinical-case-step-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .clinical-case-step-page .clinical-case-step-form-actions .btn {
    width: 100%;
  }

  .clinical-case-step-page .clinical-case-step-rule-input,
  .clinical-case-step-page .clinical-case-step-rule-preview {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .clinical-case-step-page .clinical-case-step-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .clinical-case-step-page .clinical-case-step-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .clinical-case-step-page .clinical-case-step-table thead {
    display: none;
  }

  .clinical-case-step-page .clinical-case-step-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .clinical-case-step-page .clinical-case-step-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .clinical-case-step-page .clinical-case-step-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .clinical-case-step-page .clinical-case-step-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .clinical-case-step-page .clinical-case-step-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .clinical-case-step-page .clinical-case-step-row-actions {
    justify-content: flex-start;
  }

  .clinical-case-step-page .clinical-case-step-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .clinical-case-step-page .clinical-case-step-table td[colspan] {
    display: block;
    padding: 1rem !important;
  }

  .clinical-case-step-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .clinical-case-step-page .clinical-case-step-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .clinical-case-step-page .clinical-case-step-table tbody {
    padding: 0.75rem;
  }

  .clinical-case-step-page .clinical-case-step-table tr {
    padding: 0.75rem;
  }

  .clinical-case-step-page .clinical-case-step-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .clinical-case-step-page .clinical-case-step-table td[data-label]::before {
    grid-row: auto;
  }
}

.doctor-page,
.doctor-page .card,
.doctor-page .card-body,
.doctor-page .card-header,
.doctor-page .table-responsive,
.doctor-page .table,
.doctor-page td[data-label],
.doctor-page td[data-label] > *,
.doctor-page .doctor-row-actions,
.doctor-page .doctor-council-row-actions,
.doctor-page .doctor-show-meta,
.doctor-page .doctor-show-actions,
.doctor-page .doctor-form-actions,
.doctor-page .doctor-form-footer,
.doctor-page .doctor-switch-row {
  min-width: 0;
}

.doctor-page,
.doctor-page .card,
.doctor-page .row,
.doctor-page .form-control,
.doctor-page .form-select {
  max-width: 100%;
}

.doctor-page {
  overflow-x: clip;
}

.doctor-page .table td,
.doctor-page .table th {
  vertical-align: middle;
}

.doctor-page .doctor-row-actions,
.doctor-page .doctor-council-row-actions {
  align-items: center;
  justify-content: flex-end;
}

.doctor-page .doctor-council-action-form {
  margin: 0;
}

@media (max-width: 767.98px) {
  .admin-main:has(.doctor-page),
  .admin-main:has(.doctor-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .doctor-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .doctor-page > .d-flex:first-child > .btn,
  .doctor-page .doctor-show-actions,
  .doctor-page .doctor-show-actions .btn,
  .doctor-page .doctor-council-card-header .btn {
    width: 100%;
  }

  .doctor-page .doctor-show-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .doctor-page .doctor-action-separator {
    display: none;
  }

  .doctor-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .doctor-page .card-header,
  .doctor-page .card-body {
    padding: 0.85rem !important;
  }

  .doctor-page .card-body > .row {
    --bs-gutter-x: 0;
  }

  .doctor-page .doctor-switch-row {
    gap: 0.75rem;
  }

  .doctor-page .doctor-switch-row > div:first-child {
    min-width: 0;
  }

  .doctor-page .doctor-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .doctor-page .doctor-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .doctor-page .doctor-form-actions .btn {
    width: 100%;
  }

  .doctor-page .doctor-council-card-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem;
  }

  .doctor-page .doctor-table-wrap,
  .doctor-page .doctor-council-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .doctor-page .doctor-table,
  .doctor-page .doctor-council-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .doctor-page .doctor-table thead,
  .doctor-page .doctor-council-table thead {
    display: none;
  }

  .doctor-page .doctor-table tbody,
  .doctor-page .doctor-council-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .doctor-page .doctor-table tr,
  .doctor-page .doctor-council-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .doctor-page .doctor-table td,
  .doctor-page .doctor-council-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .doctor-page .doctor-table td[data-label],
  .doctor-page .doctor-council-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .doctor-page .doctor-table td[data-label]::before,
  .doctor-page .doctor-council-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .doctor-page .doctor-row-actions,
  .doctor-page .doctor-council-row-actions {
    justify-content: flex-start;
  }

  .doctor-page .doctor-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .doctor-page .doctor-council-row-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .doctor-page .doctor-council-row-actions .btn,
  .doctor-page .doctor-council-action-form {
    width: 100%;
  }

  .doctor-page .doctor-table td[colspan],
  .doctor-page .doctor-council-table td[colspan] {
    display: block;
  }

  .doctor-page .doctor-table td[colspan] .p-4,
  .doctor-page .doctor-council-table td[colspan] .p-4 {
    padding: 1rem !important;
  }

  .doctor-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .doctor-page .doctor-show-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem !important;
  }

  .doctor-page .doctor-form-actions,
  .doctor-page .doctor-council-row-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .doctor-page .doctor-table tbody,
  .doctor-page .doctor-council-table tbody {
    padding: 0.75rem;
  }

  .doctor-page .doctor-table tr,
  .doctor-page .doctor-council-table tr {
    padding: 0.75rem;
  }

  .doctor-page .doctor-table td[data-label],
  .doctor-page .doctor-council-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .doctor-page .doctor-table td[data-label]::before,
  .doctor-page .doctor-council-table td[data-label]::before {
    grid-row: auto;
  }
}

.user-page,
.user-page .card,
.user-page .card-body,
.user-page .card-header,
.user-page .table-responsive,
.user-page .table,
.user-page td[data-label],
.user-page td[data-label] > *,
.user-page .user-identity,
.user-page .user-row-actions,
.user-page .user-show-meta,
.user-page .user-show-actions,
.user-page .user-form-actions,
.user-page .user-form-footer,
.user-page .user-switch-row {
  min-width: 0;
}

.user-page,
.user-page .card,
.user-page .row,
.user-page .form-control,
.user-page .form-select {
  max-width: 100%;
}

.user-page {
  overflow-x: clip;
}

.user-page .table td,
.user-page .table th {
  vertical-align: middle;
}

.user-page .user-row-actions {
  align-items: center;
  justify-content: flex-end;
}

.user-page .user-row-action-form,
.user-page .user-show-action-form {
  margin: 0;
}

@media (max-width: 767.98px) {
  .admin-main:has(.user-page),
  .admin-main:has(.user-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .user-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .user-page > .d-flex:first-child > .btn,
  .user-page .user-show-actions,
  .user-page .user-show-actions .btn {
    width: 100%;
  }

  .user-page .user-show-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-page .user-show-action-form,
  .user-page .user-show-action-form .btn {
    width: 100%;
  }

  .user-page .user-action-separator {
    display: none;
  }

  .user-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .user-page .card-header,
  .user-page .card-body {
    padding: 0.85rem !important;
  }

  .user-page .card-body > .row {
    --bs-gutter-x: 0;
  }

  .user-page .user-switch-row {
    gap: 0.75rem;
  }

  .user-page .user-switch-row > div:first-child {
    min-width: 0;
  }

  .user-page .user-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .user-page .user-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .user-page .user-form-actions .btn {
    width: 100%;
  }

  .user-page .user-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .user-page .user-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .user-page .user-table thead {
    display: none;
  }

  .user-page .user-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .user-page .user-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .user-page .user-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .user-page .user-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .user-page .user-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .user-page .user-identity {
    align-items: flex-start !important;
  }

  .user-page .user-row-actions {
    justify-content: flex-start;
  }

  .user-page .user-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .user-page .user-table td[colspan] {
    display: block;
  }

  .user-page .user-table td[colspan] .p-4 {
    padding: 1rem !important;
  }

  .user-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .user-page .user-show-meta {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem !important;
  }

  .user-page .user-show-actions,
  .user-page .user-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-page .user-table tbody {
    padding: 0.75rem;
  }

  .user-page .user-table tr {
    padding: 0.75rem;
  }

  .user-page .user-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .user-page .user-table td[data-label]::before {
    grid-row: auto;
  }
}

.prescription-medication-page,
.prescription-medication-page .card,
.prescription-medication-page .card-body,
.prescription-medication-page .card-header,
.prescription-medication-page .table-responsive,
.prescription-medication-page .table,
.prescription-medication-page td[data-label],
.prescription-medication-page td[data-label] > *,
.prescription-medication-page .prescription-medication-filter-actions,
.prescription-medication-page .prescription-medication-row-actions,
.prescription-medication-page .prescription-medication-show-actions,
.prescription-medication-page .prescription-medication-form-actions,
.prescription-medication-page .prescription-medication-form-footer {
  min-width: 0;
}

.prescription-medication-page,
.prescription-medication-page .card,
.prescription-medication-page .row,
.prescription-medication-page .form-control,
.prescription-medication-page .form-select {
  max-width: 100%;
}

.prescription-medication-page {
  overflow-x: clip;
}

.prescription-medication-page .table td,
.prescription-medication-page .table th {
  vertical-align: middle;
}

.prescription-medication-page .prescription-medication-row-actions {
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .admin-main:has(.prescription-medication-page),
  .admin-main:has(.prescription-medication-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .prescription-medication-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .prescription-medication-page > .d-flex:first-child > .btn,
  .prescription-medication-page .prescription-medication-show-actions,
  .prescription-medication-page .prescription-medication-show-actions .btn {
    width: 100%;
  }

  .prescription-medication-page .prescription-medication-show-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .prescription-medication-page .prescription-medication-action-separator {
    display: none;
  }

  .prescription-medication-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .prescription-medication-page .card-header,
  .prescription-medication-page .card-body {
    padding: 0.85rem !important;
  }

  .prescription-medication-page .card-body > .row,
  .prescription-medication-page form .row {
    --bs-gutter-x: 0;
    row-gap: 0.75rem !important;
  }

  .prescription-medication-page .prescription-medication-filter-actions,
  .prescription-medication-page .prescription-medication-filter-actions .btn {
    width: 100%;
  }

  .prescription-medication-page .prescription-medication-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .prescription-medication-page .prescription-medication-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .prescription-medication-page .prescription-medication-form-actions .btn {
    width: 100%;
  }

  .prescription-medication-page .prescription-medication-table-wrap,
  .prescription-medication-page .prescription-medication-protocol-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .prescription-medication-page .prescription-medication-table,
  .prescription-medication-page .prescription-medication-protocol-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .prescription-medication-page .prescription-medication-table thead,
  .prescription-medication-page .prescription-medication-protocol-table thead {
    display: none;
  }

  .prescription-medication-page .prescription-medication-table tbody,
  .prescription-medication-page .prescription-medication-protocol-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .prescription-medication-page .prescription-medication-table tr,
  .prescription-medication-page .prescription-medication-protocol-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .prescription-medication-page .prescription-medication-table td,
  .prescription-medication-page .prescription-medication-protocol-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .prescription-medication-page .prescription-medication-table td[data-label],
  .prescription-medication-page .prescription-medication-protocol-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .prescription-medication-page .prescription-medication-table td[data-label]::before,
  .prescription-medication-page .prescription-medication-protocol-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .prescription-medication-page .prescription-medication-row-actions {
    justify-content: flex-start;
  }

  .prescription-medication-page .prescription-medication-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .prescription-medication-page .prescription-medication-table td[colspan],
  .prescription-medication-page .prescription-medication-protocol-table td[colspan] {
    display: block;
    padding: 1rem !important;
  }

  .prescription-medication-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .prescription-medication-page .prescription-medication-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .prescription-medication-page .prescription-medication-table tbody,
  .prescription-medication-page .prescription-medication-protocol-table tbody {
    padding: 0.75rem;
  }

  .prescription-medication-page .prescription-medication-table tr,
  .prescription-medication-page .prescription-medication-protocol-table tr {
    padding: 0.75rem;
  }

  .prescription-medication-page .prescription-medication-table td[data-label],
  .prescription-medication-page .prescription-medication-protocol-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .prescription-medication-page .prescription-medication-table td[data-label]::before,
  .prescription-medication-page .prescription-medication-protocol-table td[data-label]::before {
    grid-row: auto;
  }
}

.prescription-protocol-item-page,
.prescription-protocol-item-page .card,
.prescription-protocol-item-page .card-body,
.prescription-protocol-item-page .card-header,
.prescription-protocol-item-page .table-responsive,
.prescription-protocol-item-page .table,
.prescription-protocol-item-page td[data-label],
.prescription-protocol-item-page td[data-label] > *,
.prescription-protocol-item-page .prescription-protocol-item-filter-actions,
.prescription-protocol-item-page .prescription-protocol-item-row-actions,
.prescription-protocol-item-page .prescription-protocol-item-show-actions,
.prescription-protocol-item-page .prescription-protocol-item-form-actions,
.prescription-protocol-item-page .prescription-protocol-item-form-footer {
  min-width: 0;
}

.prescription-protocol-item-page,
.prescription-protocol-item-page .card,
.prescription-protocol-item-page .row,
.prescription-protocol-item-page .form-control,
.prescription-protocol-item-page .form-select {
  max-width: 100%;
}

.prescription-protocol-item-page {
  overflow-x: visible;
}

.prescription-protocol-item-page .table th {
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}

.prescription-protocol-item-page .table td {
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 768px) {
  .prescription-protocol-item-page .prescription-protocol-item-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table th,
  .prescription-protocol-item-page .prescription-protocol-item-table td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-item {
    width: 13%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-category {
    width: 11%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-type {
    width: 9%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-section {
    width: 12%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-quantity {
    width: 10%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-posology {
    width: 13%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-observation {
    width: 10%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-order {
    width: 6%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-status {
    width: 8%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-actions {
    width: 7%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-text-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .prescription-protocol-item-page .prescription-protocol-item-col-order,
  .prescription-protocol-item-page .prescription-protocol-item-col-status {
    text-align: center;
  }
}

.prescription-protocol-item-page .prescription-protocol-item-row-actions {
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .admin-main:has(.prescription-protocol-item-page),
  .admin-main:has(.prescription-protocol-item-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .prescription-protocol-item-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .prescription-protocol-item-page > .d-flex:first-child > .btn,
  .prescription-protocol-item-page .prescription-protocol-item-show-actions,
  .prescription-protocol-item-page .prescription-protocol-item-show-actions .btn {
    width: 100%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-show-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .prescription-protocol-item-page .prescription-protocol-item-action-separator {
    display: none;
  }

  .prescription-protocol-item-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .prescription-protocol-item-page .card-header,
  .prescription-protocol-item-page .card-body {
    padding: 0.85rem !important;
  }

  .prescription-protocol-item-page .card-body > .row,
  .prescription-protocol-item-page form .row {
    --bs-gutter-x: 0;
    row-gap: 0.75rem !important;
  }

  .prescription-protocol-item-page .prescription-protocol-item-filter-actions,
  .prescription-protocol-item-page .prescription-protocol-item-filter-actions .btn {
    width: 100%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .prescription-protocol-item-page .prescription-protocol-item-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-form-actions .btn {
    width: 100%;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table thead {
    display: none;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .prescription-protocol-item-page .prescription-protocol-item-row-actions {
    justify-content: flex-start;
  }

  .prescription-protocol-item-page .prescription-protocol-item-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table td[colspan] {
    display: block;
    padding: 1rem !important;
  }

  .prescription-protocol-item-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .prescription-protocol-item-page .prescription-protocol-item-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .prescription-protocol-item-page .prescription-protocol-item-table tbody {
    padding: 0.75rem;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table tr {
    padding: 0.75rem;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .prescription-protocol-item-page .prescription-protocol-item-table td[data-label]::before {
    grid-row: auto;
  }
}

.guidance-item-page,
.guidance-item-page .card,
.guidance-item-page .card-body,
.guidance-item-page .card-header,
.guidance-item-page .table-responsive,
.guidance-item-page .table,
.guidance-item-page td[data-label],
.guidance-item-page td[data-label] > *,
.guidance-item-page .guidance-item-filter-actions,
.guidance-item-page .guidance-item-row-actions,
.guidance-item-page .guidance-item-show-actions,
.guidance-item-page .guidance-item-form-actions,
.guidance-item-page .guidance-item-form-footer {
  min-width: 0;
}

.guidance-item-page,
.guidance-item-page .card,
.guidance-item-page .row,
.guidance-item-page .form-control,
.guidance-item-page .form-select {
  max-width: 100%;
}

.guidance-item-page {
  overflow-x: clip;
}

.guidance-item-page .table td,
.guidance-item-page .table th {
  vertical-align: middle;
}

.guidance-item-page .guidance-item-row-actions {
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .admin-main:has(.guidance-item-page),
  .admin-main:has(.guidance-item-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .guidance-item-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .guidance-item-page > .d-flex:first-child > .btn,
  .guidance-item-page .guidance-item-show-actions,
  .guidance-item-page .guidance-item-show-actions .btn {
    width: 100%;
  }

  .guidance-item-page .guidance-item-show-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .guidance-item-page .guidance-item-action-separator {
    display: none;
  }

  .guidance-item-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .guidance-item-page .card-header,
  .guidance-item-page .card-body {
    padding: 0.85rem !important;
  }

  .guidance-item-page .card-body > .row,
  .guidance-item-page form .row {
    --bs-gutter-x: 0;
    row-gap: 0.75rem !important;
  }

  .guidance-item-page .guidance-item-filter-actions,
  .guidance-item-page .guidance-item-filter-actions .btn {
    width: 100%;
  }

  .guidance-item-page .guidance-item-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .guidance-item-page .guidance-item-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .guidance-item-page .guidance-item-form-actions .btn {
    width: 100%;
  }

  .guidance-item-page .guidance-item-table-wrap,
  .guidance-item-page .guidance-item-protocol-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .guidance-item-page .guidance-item-table,
  .guidance-item-page .guidance-item-protocol-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .guidance-item-page .guidance-item-table thead,
  .guidance-item-page .guidance-item-protocol-table thead {
    display: none;
  }

  .guidance-item-page .guidance-item-table tbody,
  .guidance-item-page .guidance-item-protocol-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .guidance-item-page .guidance-item-table tr,
  .guidance-item-page .guidance-item-protocol-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .guidance-item-page .guidance-item-table td,
  .guidance-item-page .guidance-item-protocol-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .guidance-item-page .guidance-item-table td[data-label],
  .guidance-item-page .guidance-item-protocol-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .guidance-item-page .guidance-item-table td[data-label]::before,
  .guidance-item-page .guidance-item-protocol-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .guidance-item-page .guidance-item-row-actions {
    justify-content: flex-start;
  }

  .guidance-item-page .guidance-item-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .guidance-item-page .guidance-item-table td[colspan],
  .guidance-item-page .guidance-item-protocol-table td[colspan] {
    display: block;
    padding: 1rem !important;
  }

  .guidance-item-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .guidance-item-page .guidance-item-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .guidance-item-page .guidance-item-table tbody,
  .guidance-item-page .guidance-item-protocol-table tbody {
    padding: 0.75rem;
  }

  .guidance-item-page .guidance-item-table tr,
  .guidance-item-page .guidance-item-protocol-table tr {
    padding: 0.75rem;
  }

  .guidance-item-page .guidance-item-table td[data-label],
  .guidance-item-page .guidance-item-protocol-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .guidance-item-page .guidance-item-table td[data-label]::before,
  .guidance-item-page .guidance-item-protocol-table td[data-label]::before {
    grid-row: auto;
  }
}

.guidance-protocol-item-page,
.guidance-protocol-item-page .card,
.guidance-protocol-item-page .card-body,
.guidance-protocol-item-page .card-header,
.guidance-protocol-item-page .table-responsive,
.guidance-protocol-item-page .table,
.guidance-protocol-item-page td[data-label],
.guidance-protocol-item-page td[data-label] > *,
.guidance-protocol-item-page .guidance-protocol-item-filter-actions,
.guidance-protocol-item-page .guidance-protocol-item-row-actions,
.guidance-protocol-item-page .guidance-protocol-item-show-actions,
.guidance-protocol-item-page .guidance-protocol-item-form-actions,
.guidance-protocol-item-page .guidance-protocol-item-form-footer {
  min-width: 0;
}

.guidance-protocol-item-page,
.guidance-protocol-item-page .card,
.guidance-protocol-item-page .row,
.guidance-protocol-item-page .form-control,
.guidance-protocol-item-page .form-select {
  max-width: 100%;
}

.guidance-protocol-item-page {
  overflow-x: visible;
}

.guidance-protocol-item-page .table th {
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}

.guidance-protocol-item-page .table td {
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}

@media (min-width: 768px) {
  .guidance-protocol-item-page .guidance-protocol-item-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table th,
  .guidance-protocol-item-page .guidance-protocol-item-table td {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-item {
    width: 19%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-type {
    width: 8%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-phase {
    width: 18%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-audience {
    width: 8%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-order {
    width: 6%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-content {
    width: 26%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-status {
    width: 8%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-actions {
    width: 7%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-text-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .guidance-protocol-item-page .guidance-protocol-item-col-order,
  .guidance-protocol-item-page .guidance-protocol-item-col-status {
    text-align: center;
  }
}

.guidance-protocol-item-page .guidance-protocol-item-row-actions {
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .admin-main:has(.guidance-protocol-item-page),
  .admin-main:has(.guidance-protocol-item-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .guidance-protocol-item-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .guidance-protocol-item-page > .d-flex:first-child > .btn,
  .guidance-protocol-item-page .guidance-protocol-item-show-actions,
  .guidance-protocol-item-page .guidance-protocol-item-show-actions .btn {
    width: 100%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-show-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .guidance-protocol-item-page .guidance-protocol-item-action-separator {
    display: none;
  }

  .guidance-protocol-item-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .guidance-protocol-item-page .card-header,
  .guidance-protocol-item-page .card-body {
    padding: 0.85rem !important;
  }

  .guidance-protocol-item-page .card-body > .row,
  .guidance-protocol-item-page form .row {
    --bs-gutter-x: 0;
    row-gap: 0.75rem !important;
  }

  .guidance-protocol-item-page .guidance-protocol-item-filter-actions,
  .guidance-protocol-item-page .guidance-protocol-item-filter-actions .btn {
    width: 100%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .guidance-protocol-item-page .guidance-protocol-item-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-form-actions .btn {
    width: 100%;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table thead {
    display: none;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .guidance-protocol-item-page .guidance-protocol-item-row-actions {
    justify-content: flex-start;
  }

  .guidance-protocol-item-page .guidance-protocol-item-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table td[colspan] {
    display: block;
    padding: 1rem !important;
  }

  .guidance-protocol-item-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .guidance-protocol-item-page .guidance-protocol-item-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .guidance-protocol-item-page .guidance-protocol-item-table tbody {
    padding: 0.75rem;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table tr {
    padding: 0.75rem;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .guidance-protocol-item-page .guidance-protocol-item-table td[data-label]::before {
    grid-row: auto;
  }
}

.exam-template-page,
.exam-template-page .card,
.exam-template-page .card-body,
.exam-template-page .card-header,
.exam-template-page .table-responsive,
.exam-template-page .table,
.exam-template-page td[data-label],
.exam-template-page td[data-label] > *,
.exam-template-page .exam-template-row-actions,
.exam-template-page .exam-template-form-actions,
.exam-template-page .exam-template-form-footer,
.exam-template-page .document-editor {
  min-width: 0;
}

.exam-template-page .table td,
.exam-template-page .table th {
  vertical-align: middle;
}

.exam-template-page,
.exam-template-page .card,
.exam-template-page .row,
.exam-template-page .form-control,
.exam-template-page .form-select,
.exam-template-page .input-group,
.exam-template-page .ql-toolbar,
.exam-template-page .ql-container,
.exam-template-page .document-editor {
  max-width: 100%;
}

.exam-template-page {
  overflow-x: clip;
}

.exam-template-page .form-control,
.exam-template-page .form-select,
.exam-template-page .input-group,
.exam-template-page .document-editor {
  width: 100%;
}

.exam-template-page .exam-template-row-actions {
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .admin-main:has(.exam-template-page),
  .admin-main:has(.exam-template-page) > .container-fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .exam-template-page > .d-flex:first-child {
    align-items: stretch !important;
  }

  .exam-template-page > .d-flex:first-child > .btn {
    width: 100%;
  }

  .exam-template-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .exam-template-page .card-header,
  .exam-template-page .card-body {
    padding: 0.85rem !important;
  }

  .exam-template-page .card-body > .row {
    --bs-gutter-x: 0;
  }

  .exam-template-page .exam-template-toggle-column {
    width: 100%;
  }

  .exam-template-page .exam-template-toggle-column .form-check {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .exam-template-page .exam-template-editor-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem;
  }

  .exam-template-page .exam-template-preview-button {
    width: 100%;
  }

  .exam-template-page .exam-template-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .exam-template-page .exam-template-form-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .exam-template-page .exam-template-form-actions .btn {
    width: 100%;
  }

  .exam-template-page .exam-template-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .exam-template-page .exam-template-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .exam-template-page .exam-template-table thead {
    display: none;
  }

  .exam-template-page .exam-template-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .exam-template-page .exam-template-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .exam-template-page .exam-template-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .exam-template-page .exam-template-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .exam-template-page .exam-template-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .exam-template-page .exam-template-row-actions {
    justify-content: flex-start;
  }

  .exam-template-page .exam-template-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
  }

  .exam-template-page .exam-template-table td[colspan] {
    display: block;
    padding: 1rem !important;
  }

  .exam-template-page .exam-template-table td[colspan] .p-4 {
    padding: 1rem !important;
  }

  .exam-template-page .badge {
    white-space: normal;
    text-align: left;
  }

  .exam-template-page .ql-toolbar.ql-snow {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
  }

  .exam-template-page .ql-toolbar.ql-snow .ql-formats {
    display: inline-block;
    white-space: nowrap;
  }

  .exam-template-page .document-editor {
    min-height: 420px;
    overflow-x: auto;
  }

  .exam-template-page .document-editor .ql-editor {
    min-height: 360px;
  }
}

@media (max-width: 575.98px) {
  .exam-template-page .exam-template-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .exam-template-page .exam-template-table tbody {
    padding: 0.75rem;
  }

  .exam-template-page .exam-template-table tr {
    padding: 0.75rem;
  }

  .exam-template-page .exam-template-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .exam-template-page .exam-template-table td[data-label]::before {
    grid-row: auto;
  }
}

.document-template-page,
.document-template-page .card,
.document-template-page .card-body,
.document-template-page .card-header,
.document-template-page .table-responsive,
.document-template-page .table,
.document-template-page td[data-label],
.document-template-page td[data-label] > *,
.document-template-page .document-template-row-actions,
.document-template-page .document-template-form-actions,
.document-template-page .document-template-form-footer,
.document-template-page .document-template-tag-cloud,
.document-template-page .document-editor {
  min-width: 0;
}

.document-template-page,
.document-template-page .card,
.document-template-page .row,
.document-template-page .form-control,
.document-template-page .form-select,
.document-template-page .input-group,
.document-template-page .ql-toolbar,
.document-template-page .ql-container,
.document-template-page .document-editor {
  max-width: 100%;
}

.document-template-page {
  overflow-x: clip;
}

.admin-main:has(.document-template-page),
.admin-main:has(.document-template-page) > .container-fluid {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.document-template-page .form-control,
.document-template-page .form-select,
.document-template-page .input-group,
.document-template-page .document-editor {
  width: 100%;
}

.document-template-page > .d-flex:first-child {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch !important;
  gap: 0.75rem !important;
}

.document-template-page > .d-flex:first-child > .btn {
  width: 100%;
}

.document-template-page .card {
  border-radius: 8px;
  overflow: hidden;
}

.document-template-page .card-header,
.document-template-page .card-body {
  padding: 0.85rem !important;
}

.document-template-page .card-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start !important;
  gap: 0.25rem;
}

.document-template-page > .row,
.document-template-page .card-body > .row {
  --bs-gutter-x: 0;
}

.document-template-page .document-template-editor-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start !important;
  gap: 0.75rem;
}

.document-template-page .document-template-preview-button {
  width: 100%;
}

.document-template-page .document-template-form-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem !important;
  width: 100%;
}

.document-template-page .document-template-form-footer {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: start !important;
  gap: 0.75rem !important;
}

.document-template-page .document-template-form-actions .btn,
.document-template-page .document-template-tag-cloud-button {
  width: 100%;
}

.document-template-page .document-template-tag-cloud {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem !important;
}

.document-template-page .document-template-table-wrap {
  overflow-x: visible;
  border: 0 !important;
  border-radius: 0;
}

.document-template-page .document-template-table {
  display: block;
  min-width: 0 !important;
  border: 0;
}

.document-template-page .document-template-table thead {
  display: none;
}

.document-template-page .document-template-table tbody {
  display: grid;
  gap: 0.55rem;
  padding: 0.55rem;
  border-top: 0 !important;
}

.document-template-page .document-template-table tr {
  display: grid;
  gap: 0.7rem 0.8rem;
  padding: 0.75rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
}

.document-template-page .document-template-table td {
  border: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
  width: auto !important;
  min-width: 0 !important;
}

.document-template-page .document-template-table td[data-label] {
  display: block;
  overflow-wrap: break-word;
  text-align: left !important;
}

.document-template-page .document-template-table td[data-label] > * {
  min-width: 0;
}

.document-template-page .document-template-table td[data-label]::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 0.18rem;
  color: #66758a;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.document-template-page .document-template-table td[data-label="Nome"]::before,
.document-template-page .document-template-table td[data-label="Ações"]::before {
  display: none;
}

.document-template-page .document-template-table td[data-label="Nome"] .fw-semibold {
  font-size: 1rem;
  line-height: 1.25;
}

.document-template-page .document-template-table td[data-label] .badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.document-template-page .document-template-table .text-truncate {
  max-width: none !important;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.document-template-page .document-template-row-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-content: stretch;
  gap: 0.5rem !important;
  width: 100%;
}

.document-template-page .document-template-row-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  gap: 0.4rem;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
}

.document-template-page .document-template-row-actions .visually-hidden {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: nowrap !important;
}

.document-template-page .document-template-table td[colspan] {
  display: block;
  padding: 1rem !important;
}

.document-template-page .document-template-table td[colspan] .p-4 {
  padding: 1rem !important;
}

.document-template-page .badge {
  white-space: normal;
  text-align: left;
}

.document-template-page .ql-toolbar.ql-snow {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  z-index: 3;
  white-space: nowrap;
}

.document-template-page .ql-toolbar.ql-snow .ql-picker-options {
  z-index: 4;
}

.document-template-page .ql-container.ql-snow {
  position: relative;
  z-index: 1;
}

.document-template-page .ql-toolbar.ql-snow .ql-formats {
  display: inline-block;
  white-space: nowrap;
}

.document-template-page .document-editor {
  min-height: 420px;
  overflow-x: auto;
}

.document-template-page .document-editor .ql-editor {
  min-height: 360px;
}

@media (min-width: 576px) {
  .document-template-page .document-template-form-actions,
  .document-template-page .document-template-tag-cloud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-template-page .document-template-table tbody {
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .document-template-page .document-template-table tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.85rem;
  }

  .document-template-page .document-template-table td[data-label="Nome"],
  .document-template-page .document-template-table td[data-label="Campo clínico"],
  .document-template-page .document-template-table td[data-label="Atualizado em"],
  .document-template-page .document-template-table td[data-label="Ações"] {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .admin-main:has(.document-template-page),
  .admin-main:has(.document-template-page) > .container-fluid {
    overflow-x: visible;
  }

  .document-template-page > .d-flex:first-child {
    display: flex !important;
    align-items: center !important;
  }

  .document-template-page > .d-flex:first-child > .btn,
  .document-template-page .document-template-preview-button,
  .document-template-page .document-template-form-actions .btn,
  .document-template-page .document-template-tag-cloud-button {
    width: auto;
  }

  .document-template-page .card-header {
    display: flex !important;
    align-items: center !important;
  }

  .document-template-page .ql-toolbar.ql-snow {
    overflow: visible;
  }

  .document-template-page.document-template-form .card-body > .document-template-settings-grid,
  .document-template-page.document-template-form .card-body > .document-template-pdf-grid {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.25rem;
  }

  .document-template-page .document-template-metadata-field > .form-label {
    display: flex;
    align-items: flex-end;
    min-height: 3rem;
    line-height: 1.35;
  }

  .document-template-page .document-template-form-actions {
    display: flex !important;
    width: auto;
  }

  .document-template-page .document-template-form-footer {
    display: flex !important;
    align-items: center !important;
  }

  .document-template-page .document-template-tag-cloud {
    display: flex !important;
  }

  .document-template-page .document-template-table-wrap {
    overflow-x: hidden;
    border-radius: 8px;
  }

  .document-template-page .document-template-table {
    display: table;
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
    border: 0;
  }

  .document-template-page .document-template-table thead {
    display: table-header-group;
  }

  .document-template-page .document-template-table tbody {
    display: table-row-group;
    padding: 0;
  }

  .document-template-page .document-template-table tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .document-template-page .document-template-table td,
  .document-template-page .document-template-table td[data-label],
  .document-template-page .document-template-table th {
    display: table-cell;
    padding: 0.7rem 0.55rem !important;
    border-bottom-width: 1px !important;
    line-height: 1.25;
    vertical-align: middle;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .document-template-page .document-template-table td[data-label]::before {
    content: none;
    display: none;
  }

  .document-template-page .document-template-table th:first-child,
  .document-template-page .document-template-table td:first-child {
    width: 34% !important;
  }

  .document-template-page .document-template-table th:nth-child(2),
  .document-template-page .document-template-table td:nth-child(2) {
    width: 12% !important;
  }

  .document-template-page .document-template-table th:nth-child(3),
  .document-template-page .document-template-table td:nth-child(3) {
    width: 16% !important;
  }

  .document-template-page .document-template-table th:nth-child(4),
  .document-template-page .document-template-table td:nth-child(4),
  .document-template-page .document-template-table th:nth-child(5),
  .document-template-page .document-template-table td:nth-child(5) {
    width: 8% !important;
  }

  .document-template-page .document-template-table th:nth-child(6),
  .document-template-page .document-template-table td:nth-child(6) {
    width: 14% !important;
  }

  .document-template-page .document-template-table th:nth-child(7),
  .document-template-page .document-template-table td:nth-child(7) {
    width: 8% !important;
  }

  .document-template-page .document-template-row-actions {
    display: inline-flex !important;
    justify-content: flex-end;
    width: auto;
  }

  .document-template-page .document-template-row-actions .btn {
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .document-template-page .document-template-row-actions .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

.clinical-case-subresource-page,
.clinical-case-subresource-page .card,
.clinical-case-subresource-page .card-body,
.clinical-case-subresource-page .card-header,
.clinical-case-subresource-page .table-responsive,
.clinical-case-subresource-page .table,
.clinical-case-subresource-page td[data-label],
.clinical-case-subresource-page td[data-label] > *,
.clinical-case-subresource-page .clinical-case-subresource-actions,
.clinical-case-subresource-page .clinical-case-subresource-row-actions,
.clinical-case-subresource-page .clinical-case-subresource-form-actions {
  min-width: 0;
}

.clinical-case-subresource-page .table td,
.clinical-case-subresource-page .table th {
  vertical-align: middle;
}

.clinical-case-subresource-page .clinical-case-subresource-actions,
.clinical-case-subresource-page .clinical-case-subresource-row-actions,
.clinical-case-subresource-page .clinical-case-subresource-form-actions {
  flex-wrap: wrap;
}

.clinical-case-subresource-page .clinical-case-subresource-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.clinical-case-subresource-page .clinical-case-subresource-row-actions form {
  margin: 0;
}

@media (max-width: 767.98px) {
  .clinical-case-subresource-page .clinical-case-subresource-header {
    align-items: stretch !important;
  }

  .clinical-case-subresource-page .clinical-case-subresource-actions,
  .clinical-case-subresource-page .clinical-case-subresource-form-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem !important;
    width: 100%;
  }

  .clinical-case-subresource-page .clinical-case-subresource-actions .btn,
  .clinical-case-subresource-page .clinical-case-subresource-form-actions .btn {
    width: 100%;
  }

  .clinical-case-subresource-page .card {
    border-radius: 8px;
    overflow: hidden;
  }

  .clinical-case-subresource-page .card-body,
  .clinical-case-subresource-page .card-header {
    padding: 0.85rem !important;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table-wrap {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table thead {
    display: none;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #66758a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .clinical-case-subresource-page .clinical-case-subresource-actions-cell {
    justify-items: start;
  }

  .clinical-case-subresource-page .clinical-case-subresource-row-actions {
    justify-content: flex-start;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table td[colspan] {
    display: block;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table td[colspan] .p-4 {
    padding: 1rem !important;
  }

  .clinical-case-subresource-page .badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 575.98px) {
  .clinical-case-subresource-page .clinical-case-subresource-actions,
  .clinical-case-subresource-page .clinical-case-subresource-form-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .clinical-case-subresource-page .clinical-case-subresource-table tbody {
    padding: 0.75rem;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table tr {
    padding: 0.75rem;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table td[data-label] {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .clinical-case-subresource-page .clinical-case-subresource-table td[data-label]::before {
    grid-row: auto;
  }
}

.upcoming-surgery-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
}

.upcoming-surgery-card-patient {
  min-width: 0;
  color: #1f2d3d;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.upcoming-surgery-card-action {
  flex: 0 0 auto;
}

.upcoming-surgery-card-date {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: #66758a;
  font-size: 0.84rem;
  line-height: 1.3;
}

.upcoming-surgery-card-date i {
  color: #198754;
  line-height: 1.25;
}

@media (max-width: 575.98px) {
  .admin-topbar {
    min-height: 56px;
  }

  .admin-topbar-inner {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 0.5rem;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .admin-topbar-icon-button,
  .admin-topbar-user-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .admin-topbar-brand {
    justify-self: center;
    margin-left: 0 !important;
    max-width: 100%;
    font-size: 0.95rem;
  }

  .admin-topbar-logo {
    height: 24px;
  }

  .admin-topbar-user-button {
    max-width: none;
    margin-left: auto;
  }

  .admin-topbar-user-avatar {
    display: inline-flex;
  }

  .admin-topbar-user-text {
    display: none !important;
  }

  .admin-main {
    padding: 0.85rem !important;
  }
}

.planning-procedure-chip {
  line-height: 1.2;
}

.planning-procedure-courtesy-panel {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
}

.planning-procedure-courtesy-panel-label {
  color: #66758a;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.15;
}

.planning-procedure-courtesy-panel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 30px;
}

.planning-procedure-selected-courtesy.form-check {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  margin: 0;
  padding: 0.26rem 0.6rem;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  color: #344054;
  background: #fff;
  font-size: 0.8rem;
  line-height: 1.15;
}

.planning-procedure-selected-courtesy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-procedure-selected-courtesy .form-check-input {
  float: none;
  width: 14px;
  height: 14px;
  margin: 0;
}

.form-check-input.switch-success:checked {
  background-color: var(--app-brand-accent);
  border-color: var(--app-brand-accent);
}

.form-check-input.switch-success:focus {
  border-color: var(--app-brand-accent);
  box-shadow: 0 0 0 0.25rem var(--app-brand-accent-focus);
}

.clinical-document-card .btn {
  --bs-btn-padding-y: 0.2rem;
  --bs-btn-padding-x: 0.5rem;
}

.clinical-document-card .badge {
  font-weight: 600;
}

.badge-soft,
.app-status-badge {
  max-width: 100%;
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.42rem 0.62rem;
  overflow: hidden;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: baseline;
}

.badge-soft-primary,
.app-status-badge.text-bg-primary,
.app-status-badge.bg-primary {
  border-color: #d7def4 !important;
  color: #34488a !important;
  background: #eef2ff !important;
}

.badge-soft-success,
.app-status-badge.text-bg-success,
.app-status-badge.bg-success {
  border-color: #cfe7da !important;
  color: #17633f !important;
  background: #edf8f2 !important;
}

.badge-soft-warning,
.app-status-badge.text-bg-warning,
.app-status-badge.bg-warning {
  border-color: #f0dfbc !important;
  color: #8a5b16 !important;
  background: #fff8e8 !important;
}

.badge-soft-danger,
.app-status-badge.text-bg-danger,
.app-status-badge.bg-danger {
  border-color: #f0c8c4 !important;
  color: #9b241b !important;
  background: #fff1f0 !important;
}

.badge-soft-muted,
.app-status-badge.text-bg-secondary,
.app-status-badge.bg-secondary {
  border-color: #e4e7ec !important;
  color: #475467 !important;
  background: #f2f4f7 !important;
}

.badge-soft-dark,
.app-status-badge.text-bg-dark,
.app-status-badge.bg-dark {
  border-color: #d0d5dd !important;
  color: #344054 !important;
  background: #eaecf0 !important;
}

.badge-soft-info,
.app-status-badge.text-bg-info,
.app-status-badge.bg-info,
.app-status-badge.text-bg-info-subtle {
  border-color: #cfe4f3 !important;
  color: #245b84 !important;
  background: #edf7fd !important;
}

.app-status-badge.text-bg-light,
.app-status-badge.bg-light,
.app-status-badge.bg-white {
  border-color: #e4e7ec !important;
  color: #475467 !important;
  background: #f2f4f7 !important;
}

.clinical-cases-index,
.clinical-case-show-page {
  min-width: 0;
}

.clinical-cases-page-action {
  white-space: nowrap;
}

.clinical-cases-filter-card,
.clinical-cases-filter-card .card-body,
.clinical-cases-mobile-item-main,
.clinical-cases-mobile-title,
.clinical-cases-mobile-subtitle,
.clinical-cases-mobile-meta-item,
.clinical-cases-mobile-value {
  min-width: 0;
}

.clinical-cases-procedure-options {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  row-gap: 0.65rem;
}

.clinical-cases-procedure-options .form-check {
  min-width: 0;
  margin-right: 0;
}

.clinical-cases-procedure-options .form-check-label {
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-cases-mobile-item {
  padding: 0.9rem 1rem;
}

.clinical-cases-mobile-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.clinical-cases-mobile-item-main,
.clinical-cases-mobile-title,
.clinical-cases-mobile-subtitle,
.clinical-cases-mobile-meta,
.clinical-cases-mobile-meta-item,
.clinical-cases-mobile-label,
.clinical-cases-mobile-value {
  display: block;
}

.clinical-cases-mobile-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-cases-mobile-subtitle {
  margin-top: 0.15rem;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-cases-mobile-action {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #66758a;
  background: #fff;
}

.clinical-cases-mobile-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.clinical-cases-mobile-meta--single {
  grid-template-columns: minmax(0, 1fr);
}

.clinical-cases-mobile-label {
  margin-bottom: 0.22rem;
  color: #66758a;
  font-size: 0.74rem;
  line-height: 1.15;
}

.clinical-cases-mobile-value {
  color: #1f2d3d;
  font-size: 0.88rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.clinical-cases-pagination {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.clinical-cases-pagination .pagination {
  flex-wrap: nowrap;
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .clinical-cases-page-action,
  .clinical-cases-filter-actions .btn {
    width: 100%;
  }

  .clinical-cases-filter-card .card-body {
    padding: 0.85rem;
  }

  .clinical-cases-procedure-filter {
    padding-right: 0.75rem !important;
    padding-left: 0.75rem !important;
  }

  .clinical-cases-procedure-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.75rem;
    row-gap: 0.55rem;
  }

  .clinical-cases-mobile-item {
    padding: 0.85rem;
  }

  .clinical-cases-mobile-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .clinical-cases-pagination {
    justify-content: flex-start !important;
  }
}

.clinical-case-editor,
.clinical-case-base-form {
  min-width: 0;
}

.clinical-case-editor {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

.clinical-case-editor-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px) auto;
  gap: 1rem;
  align-items: start;
}

.clinical-case-editor-heading,
.clinical-case-editor-title,
.clinical-case-editor-subtitle,
.clinical-case-editor-summary-item,
.clinical-case-editor-summary-value {
  min-width: 0;
}

.clinical-case-editor-kicker {
  margin-bottom: 0.2rem;
  color: #66758a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.clinical-case-editor-title {
  margin: 0;
  color: #1f2d3d;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.clinical-case-editor-subtitle {
  margin-top: 0.25rem;
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-case-editor-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.clinical-case-editor-summary-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
}

.clinical-case-editor-summary-label {
  color: #66758a;
  font-size: 0.74rem;
  line-height: 1.15;
}

.clinical-case-editor-summary-value {
  color: #1f2d3d;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-case-editor-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.clinical-case-base-form {
  display: grid;
  gap: 1rem;
}

.clinical-case-form-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.clinical-case-form-section--wide {
  grid-column: 1 / -1;
}

.clinical-case-form-card {
  height: 100%;
}

.clinical-case-form-card-header {
  padding: 0.85rem 1rem;
}

.clinical-case-form-card-body {
  padding: 1rem;
}

.clinical-case-form-card-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
}

.clinical-case-form-card-subtitle {
  margin-top: 0.15rem;
  color: #66758a;
  font-size: 0.82rem;
  line-height: 1.25;
}

.clinical-case-form-readonly-block {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 0.15rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
}

.clinical-case-form-readonly-label {
  color: #66758a;
  font-size: 0.76rem;
  line-height: 1.15;
}

.clinical-case-form-readonly-value {
  min-width: 0;
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-case-base-form .form-label {
  margin-bottom: 0.35rem;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.clinical-case-base-form .form-control,
.clinical-case-base-form .form-select {
  min-height: 40px;
  border-color: #d8e2ee;
  border-radius: 7px;
}

.clinical-case-base-form textarea.form-control {
  min-height: 92px;
}

.clinical-case-base-form .form-control[readonly],
.clinical-case-base-form .form-control:disabled,
.clinical-case-base-form .form-select:disabled {
  color: #495057;
  background-color: #f8fafc;
  opacity: 1;
}

.clinical-case-base-form .form-text {
  color: #66758a;
  font-size: 0.78rem;
  line-height: 1.25;
}

.clinical-case-form-field {
  min-width: 0;
}

.clinical-case-form-field--checkbox .form-check {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.clinical-case-form-section--dates .clinical-case-form-card-body {
  padding-bottom: 1.1rem;
}

.clinical-case-form-section--dates .row {
  row-gap: 1.1rem;
}

.clinical-case-form-section--dates .clinical-case-form-field {
  min-width: 160px;
}

.clinical-case-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.clinical-case-form-actions-text {
  min-width: 0;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.3;
}

.clinical-case-form-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.clinical-case-form-action-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1200px) {
  .clinical-case-form-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .clinical-case-editor-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .clinical-case-editor-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 575.98px) {
  .clinical-case-editor-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .clinical-case-editor-title {
    font-size: 1.35rem;
  }

  .clinical-case-editor-summary {
    grid-template-columns: minmax(0, 1fr);
    grid-column: auto;
    grid-row: auto;
  }

  .clinical-case-editor-back {
    width: 100%;
  }

  .clinical-case-form-card-header,
  .clinical-case-form-card-body {
    padding: 0.85rem;
  }

  .clinical-case-base-form .row > .col-6 {
    flex: 0 0 auto;
    width: 100%;
  }

  .clinical-case-form-actions {
    display: grid;
    gap: 0.75rem;
  }

  .clinical-case-form-actions-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .clinical-case-form-action-button {
    width: 100%;
  }
}

.clinical-documents-panel,
.clinical-documents-panel-body,
.clinical-documents-table,
.clinical-documents-row-document,
.clinical-documents-row-title,
.clinical-documents-row-subtitle {
  min-width: 0;
}

.clinical-documents-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.clinical-documents-panel-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
}

.clinical-documents-panel-subtitle {
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.25;
}

.clinical-documents-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.clinical-documents-filter-button,
.clinical-documents-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.clinical-documents-table {
  table-layout: fixed;
}

.clinical-documents-table thead th {
  color: #1f2d3d;
  font-size: 0.9rem;
  border-bottom-color: #d8e2ee;
}

.clinical-documents-group-header {
  padding: 0.65rem 0.5rem;
  color: #495057;
  font-size: 0.86rem;
  line-height: 1.2;
}

.clinical-documents-group-header,
.clinical-documents-group-title {
  vertical-align: middle;
}

.clinical-documents-group-title {
  display: inline-block;
  margin-right: 0.45rem;
  color: #495057;
  font-weight: 700;
}

.clinical-documents-row-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-documents-row-subtitle,
.clinical-documents-row-meta,
.clinical-documents-empty {
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.3;
}

.clinical-documents-row-subtitle,
.clinical-documents-row-meta,
.clinical-documents-row-warning {
  margin-top: 0.18rem;
}

.clinical-documents-row-warning {
  color: #b02a37;
  font-size: 0.84rem;
  line-height: 1.3;
}

.clinical-documents-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.clinical-documents-action-dropdown {
  display: inline-flex;
}

.clinical-documents-empty {
  padding: 0.8rem 0.5rem;
}

@media (max-width: 767.98px) {
  .clinical-documents-panel-body {
    padding: 0.85rem;
  }

  .clinical-documents-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clinical-documents-filter-button {
    width: 100%;
  }

  .clinical-documents-panel .table-responsive {
    overflow-x: visible;
  }

  .clinical-documents-table,
  .clinical-documents-table thead,
  .clinical-documents-table tbody,
  .clinical-documents-table tr,
  .clinical-documents-table th,
  .clinical-documents-table td {
    display: block;
    width: 100%;
  }

  .clinical-documents-table thead {
    display: none;
  }

  .clinical-documents-group-row {
    margin-top: 0.85rem;
    border: 1px solid #d8e2ee;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    overflow: hidden;
  }

  .clinical-documents-group-row:first-child {
    margin-top: 0;
  }

  .clinical-documents-group-header {
    padding: 0.7rem 0.75rem;
    background: #f8fafc;
  }

  .clinical-documents-row {
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    background: #fff;
  }

  .clinical-documents-row + .clinical-documents-row {
    border-top: 0;
  }

  .clinical-documents-row td {
    padding: 0 !important;
    border: 0;
    text-align: left !important;
  }

  .clinical-documents-row td + td {
    margin-top: 0.65rem;
  }

  .clinical-documents-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .clinical-documents-action,
  .clinical-documents-action-dropdown,
  .clinical-documents-action-dropdown .clinical-documents-action {
    width: 100%;
  }

  .clinical-documents-empty {
    padding: 0.85rem;
    border: 1px solid #d8e2ee;
    background: #fff;
  }
}

.patients-index,
.patient-editor,
.patient-form,
.patient-clinical-cases-page {
  min-width: 0;
}

.patients-index,
.patient-editor,
.patient-clinical-cases-page,
.patient-plannings-page,
.plannings-index,
.planning-show-page,
.planning-editor,
.clinical-cases-index,
.clinical-case-show-page,
.clinical-case-editor {
  width: 100%;
  max-width: none;
}

.patients-filter-card,
.patients-filter-card .card-body,
.patients-list-card,
.patients-mobile-main,
.patients-mobile-title,
.patients-mobile-subtitle,
.patients-mobile-meta-item,
.patients-mobile-value,
.patients-table-main,
.patients-table-email,
.patient-clinical-cases-list-card,
.patient-form-heading,
.patient-form-title,
.patient-form-subtitle,
.patient-form-summary-item,
.patient-form-summary-value {
  min-width: 0;
}

.patients-page-action {
  white-space: nowrap;
}

.patients-mobile-item {
  padding: 0.9rem 1rem;
}

.patients-mobile-item-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.patients-mobile-avatar,
.patients-table-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #66758a;
  background: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 700;
}

.patients-mobile-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.patients-mobile-subtitle {
  margin-top: 0.15rem;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.patients-mobile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.patients-mobile-label,
.patients-mobile-value {
  display: block;
}

.patients-mobile-label {
  margin-bottom: 0.22rem;
  color: #66758a;
  font-size: 0.74rem;
  line-height: 1.15;
}

.patients-mobile-value {
  color: #1f2d3d;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.patients-mobile-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.patients-mobile-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.patients-table-main {
  max-width: 360px;
}

.patients-table-email {
  max-width: 320px;
  overflow-wrap: anywhere;
}

.patients-pagination {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.patients-pagination .pagination {
  flex-wrap: nowrap;
  margin-bottom: 0;
}

.patient-form {
  display: grid;
  gap: 1rem;
  max-width: none;
}

.patient-form-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) auto;
  gap: 1rem;
  align-items: start;
}

.patient-form-kicker {
  margin-bottom: 0.2rem;
  color: #66758a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.patient-form-title {
  margin: 0;
  color: #1f2d3d;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.patient-form-subtitle {
  margin-top: 0.3rem;
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.patient-form-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.patient-form-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.patient-form-summary-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
}

.patient-form-summary-label {
  color: #66758a;
  font-size: 0.74rem;
  line-height: 1.15;
}

.patient-form-summary-value {
  color: #1f2d3d;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.patient-form-header-actions {
  display: flex;
  justify-content: flex-end;
}

.patient-form-header-action,
.patient-form-action-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.patient-form > .card {
  margin-bottom: 0 !important;
}

.patient-form > .card .card-header {
  padding: 1rem 1.1rem;
}

.patient-form > .card .card-body {
  padding: 1.1rem;
}

.patient-form > .card .card-body.pt-0 {
  padding-top: 0 !important;
}

.patient-form .form-label {
  margin-bottom: 0.35rem !important;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.patient-form .form-control,
.patient-form .form-select {
  min-height: 40px;
  min-width: 0;
  border-color: #d8e2ee;
  border-radius: 7px;
}

.patient-form .form-text {
  color: #66758a;
  font-size: 0.78rem;
  line-height: 1.3;
}

.patient-form .form-check-label {
  line-height: 1.3;
}

.patient-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.patient-form-actions-text {
  min-width: 0;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.3;
}

.patient-form-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (min-width: 1200px) {
  .patient-form {
    max-width: none;
  }

  .patient-form > .card .row {
    row-gap: 1.15rem;
  }
}

@media (max-width: 991.98px) {
  .patient-form-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .patient-form-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 575.98px) {
  .patients-page-action,
  .patients-filter-actions .btn {
    width: 100%;
  }

  .patients-filter-card .card-body {
    padding: 0.85rem;
  }

  .patients-mobile-item {
    padding: 0.85rem;
  }

  .patients-mobile-meta,
  .patients-mobile-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .patients-pagination {
    justify-content: flex-start !important;
  }

  .patient-form-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .patient-form-title {
    font-size: 1.35rem;
  }

  .patient-form-summary {
    grid-template-columns: minmax(0, 1fr);
    grid-column: auto;
    grid-row: auto;
  }

  .patient-form-header-actions,
  .patient-form-header-action {
    width: 100%;
  }

  .patient-form > .card .card-header,
  .patient-form > .card .card-body {
    padding: 0.85rem;
  }

  .patient-form > .card .card-body.pt-0 {
    padding-top: 0 !important;
  }

  .patient-form .row > .col-4,
  .patient-form .row > .col-6,
  .patient-form .row > .col-8 {
    flex: 0 0 auto;
    width: 100%;
  }

  .patient-form-actions {
    display: grid;
    gap: 0.75rem;
  }

  .patient-form-actions-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .patient-form-action-button {
    width: 100%;
  }
}

.plannings-index,
.patient-clinical-cases-page,
.patient-plannings-page,
.planning-show-page,
.planning-editor,
.planning-form {
  min-width: 0;
}

.planning-filter-card,
.planning-filter-card .card-body,
.planning-mobile-item-main,
.planning-mobile-title,
.planning-mobile-subtitle,
.planning-mobile-meta-item,
.planning-mobile-value,
.planning-card-main,
.planning-card-title,
.planning-card-note,
.patient-clinical-cases-list-card,
.planning-detail,
.planning-detail-value,
.planning-detail-text,
.planning-editor-heading,
.planning-editor-title,
.planning-editor-subtitle,
.planning-editor-summary-item,
.planning-editor-summary-value,
.planning-form-card,
.planning-form-field,
.planning-form-readonly-block,
.planning-form-readonly-value,
.planning-procedure-block,
.planning-procedure-label {
  min-width: 0;
}

.planning-mobile-item,
.planning-card-link {
  padding: 0.9rem 1rem;
}

.planning-mobile-item-header,
.planning-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.planning-mobile-item-main,
.planning-mobile-title,
.planning-mobile-subtitle,
.planning-mobile-meta,
.planning-mobile-meta-item,
.planning-mobile-label,
.planning-mobile-value,
.planning-card-main,
.planning-card-title,
.planning-card-meta,
.planning-card-meta-item,
.planning-card-note {
  display: block;
}

.planning-mobile-title,
.planning-card-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planning-mobile-subtitle {
  margin-top: 0.15rem;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planning-mobile-action {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #66758a;
  background: #fff;
}

.planning-mobile-meta,
.planning-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.planning-mobile-meta--single {
  grid-template-columns: minmax(0, 1fr);
}

.planning-mobile-label {
  margin-bottom: 0.22rem;
  color: #66758a;
  font-size: 0.74rem;
  line-height: 1.15;
}

.planning-mobile-value {
  color: #1f2d3d;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planning-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.planning-card-note {
  margin-top: 0.75rem;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.planning-pagination {
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.planning-pagination .pagination {
  flex-wrap: nowrap;
  margin-bottom: 0;
}

.patient-clinical-cases-header,
.patient-plannings-header,
.planning-show-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.patient-clinical-cases-kicker,
.patient-plannings-kicker,
.planning-show-kicker {
  margin-bottom: 0.2rem;
  color: #66758a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.patient-clinical-cases-title,
.patient-plannings-title,
.planning-show-title {
  margin: 0;
  color: #1f2d3d;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.patient-clinical-cases-subtitle,
.patient-plannings-subtitle,
.planning-show-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.3rem;
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.patient-clinical-cases-subtitle span + span,
.patient-plannings-subtitle span + span {
  color: #66758a;
  font-size: 0.88rem;
  font-weight: 500;
}

.patient-clinical-cases-actions,
.patient-plannings-actions,
.planning-show-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.patient-clinical-cases-action,
.patient-plannings-action,
.planning-show-action,
.planning-clinical-case-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.planning-show-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.planning-show-grid {
  width: 100%;
  max-width: none;
}

.planning-show-card {
  height: auto;
}

.planning-show-sidebar {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.planning-show-card-header,
.planning-clinical-case-header {
  padding: 0.9rem 1rem;
}

.planning-show-card-body {
  padding: 1rem;
}

.planning-show-card-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
}

.planning-show-card-subtitle,
.planning-clinical-case-help {
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.3;
}

.planning-detail-grid,
.planning-summary-list {
  display: grid;
  gap: 0.85rem;
}

.planning-detail {
  display: grid;
  gap: 0.2rem;
}

.planning-detail--compact {
  max-width: 280px;
}

.planning-detail-label {
  color: #66758a;
  font-size: 0.78rem;
  line-height: 1.15;
}

.planning-detail-value,
.planning-summary-amount {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planning-summary-amount {
  font-size: 1.25rem;
}

.planning-detail-text {
  color: #1f2d3d;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.planning-detail-text p:last-child {
  margin-bottom: 0;
}

.planning-summary-item {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e9eef5;
}

.planning-summary-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.planning-clinical-case-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.planning-clinical-case-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.planning-clinical-case-help {
  margin-top: 0.65rem;
}

.planning-empty-state {
  padding: 1rem;
  color: #66758a;
  font-size: 0.9rem;
}

.planning-linked-case {
  padding: 0.9rem 1rem;
}

.planning-linked-case-action {
  flex: 0 0 auto;
}

.planning-editor-header {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 360px) auto;
  gap: 1rem;
  align-items: start;
}

.planning-editor-kicker {
  margin-bottom: 0.2rem;
  color: #66758a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.planning-editor-title {
  margin: 0;
  color: #1f2d3d;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.planning-editor-subtitle {
  margin-top: 0.3rem;
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planning-editor-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.planning-editor-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.planning-editor-summary-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
}

.planning-editor-summary-label {
  color: #66758a;
  font-size: 0.74rem;
  line-height: 1.15;
}

.planning-editor-summary-value {
  color: #1f2d3d;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planning-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.planning-editor-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.planning-form {
  display: grid;
  gap: 1rem;
  max-width: none;
}

.planning-form-card-header {
  padding: 0.9rem 1rem;
}

.planning-form-card-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.planning-form-card-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
}

.planning-form-card-subtitle {
  margin-top: 0.15rem;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.3;
}

.planning-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.planning-form-field--wide {
  grid-column: 1 / -1;
}

.planning-form .form-label {
  margin-bottom: 0.35rem;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
}

.planning-form .form-control,
.planning-form .form-select {
  min-height: 40px;
  min-width: 0;
  border-color: #d8e2ee;
  border-radius: 7px;
}

.planning-form textarea.form-control {
  min-height: 104px;
}

.planning-form .input-group {
  min-width: 0;
}

.planning-form .input-group-text {
  border-color: #d8e2ee;
}

.planning-form .form-control[readonly],
.planning-form .form-control:disabled,
.planning-form .form-select:disabled {
  color: #495057;
  background-color: #f8fafc;
  opacity: 1;
}

.planning-form .form-text {
  color: #66758a;
  font-size: 0.78rem;
  line-height: 1.3;
}

.planning-form-readonly-block {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 0.15rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
}

.planning-form-readonly-label {
  color: #66758a;
  font-size: 0.76rem;
  line-height: 1.15;
}

.planning-form-readonly-value {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.planning-form-date-block {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 0.15rem;
  padding: 0.5rem 0.78rem 0.45rem;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
}

.planning-form-date-block--disabled {
  background: #f8fafc;
}

.planning-form-date-control.form-control {
  min-height: 0;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  background-color: transparent;
}

.planning-form-date-control.form-control:focus {
  box-shadow: none;
}

.planning-form-date-control.form-control:disabled {
  color: #495057;
  background-color: transparent;
}

.planning-positioning-fieldset {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
}

.planning-positioning-legend {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  color: #1f2d3d;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.planning-positioning-help {
  color: #66758a;
  font-size: 0.84rem;
  line-height: 1.35;
}

.planning-positioning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

.planning-positioning-option {
  min-height: 72px;
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #344054;
  background: #fff;
  cursor: pointer;
}

.planning-positioning-option:hover {
  border-color: #b8c7d9;
  background: #f8fafc;
}

.btn-check:focus + .planning-positioning-option {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.16);
}

.btn-check:checked + .planning-positioning-option--accepted {
  border-color: #198754;
  color: #0f5132;
  background: #eaf7f0;
}

.btn-check:checked + .planning-positioning-option--pending {
  border-color: #6c757d;
  color: #343a40;
  background: #f1f3f5;
}

.btn-check:checked + .planning-positioning-option--rejected {
  border-color: #dc3545;
  color: #842029;
  background: #fcebec;
}

.planning-positioning-title {
  font-weight: 700;
  line-height: 1.25;
}

.planning-positioning-description {
  font-size: 0.82rem;
  line-height: 1.3;
}

.planning-procedure-block {
  display: grid;
  gap: 0.75rem;
}

.planning-procedure-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
}

.planning-procedure-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.planning-procedure-search {
  min-width: 0;
}

.planning-procedure-clear {
  min-height: 40px;
}

.planning-procedure-selected {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #f8fafc;
}

.planning-procedure-selected-label {
  color: #66758a;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.15;
}

.planning-procedure-selected-list {
  min-height: 28px;
}

.planning-procedure-list {
  max-height: 18rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: auto;
  padding: 0;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
}

.planning-procedure-item.form-check {
  min-height: 44px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
}

.planning-procedure-item:hover {
  background: #f8fafc;
}

.planning-procedure-item:last-child {
  border-bottom: 0;
}

.planning-procedure-item .form-check-input {
  float: none;
  width: 16px;
  height: 16px;
  margin-top: 0.12rem;
  margin-left: 0;
}

.planning-procedure-label {
  color: #1f2d3d;
  font-size: 0.92rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.planning-form-check-block {
  min-height: 40px;
  max-width: 240px;
  display: flex;
  align-items: center;
  padding: 0.68rem 0.78rem;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
}

.planning-form-field--courtesy {
  padding-top: 1.6rem;
}

.planning-form-card-body--financial {
  align-content: start;
}

.planning-form-grid--financial {
  max-width: 700px;
  align-items: start;
}

.planning-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.planning-form-actions-text {
  min-width: 0;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.3;
}

.planning-form-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.planning-form-action-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .planning-form-grid--overview {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    align-items: end;
  }

  .planning-positioning-grid,
  .planning-form-grid--textareas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planning-procedure-list {
    max-height: 19rem;
  }
}

@media (min-width: 1200px) {
  .planning-positioning-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .planning-procedure-list {
    max-height: 20rem;
  }

  .planning-form-grid--financial {
    grid-template-columns: minmax(280px, 420px) minmax(180px, 240px);
    align-items: start;
  }
}

@media (max-width: 991.98px) {
  .planning-editor-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .planning-editor-summary {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 575.98px) {
  .planning-filter-card .card-body {
    padding: 0.85rem;
  }

  .planning-filter-actions .btn {
    width: 100%;
  }

  .planning-mobile-item,
  .planning-card-link,
  .planning-linked-case {
    padding: 0.85rem;
  }

  .planning-mobile-meta,
  .planning-card-meta {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .planning-pagination {
    justify-content: flex-start !important;
  }

  .patient-clinical-cases-header,
  .patient-plannings-header,
  .planning-show-header,
  .planning-editor-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .patient-clinical-cases-title,
  .patient-plannings-title,
  .planning-show-title,
  .planning-editor-title {
    font-size: 1.35rem;
  }

  .patient-clinical-cases-actions,
  .patient-plannings-actions,
  .planning-show-actions,
  .planning-editor-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .patient-clinical-cases-action,
  .patient-plannings-action,
  .planning-show-action,
  .planning-editor-action {
    width: 100%;
  }

  .planning-editor-summary {
    grid-template-columns: minmax(0, 1fr);
    grid-column: auto;
    grid-row: auto;
  }

  .planning-show-card-header,
  .planning-clinical-case-header,
  .planning-show-card-body,
  .planning-form-card-header,
  .planning-form-card-body {
    padding: 0.85rem;
  }

  .planning-positioning-fieldset {
    padding: 0.85rem;
  }

  .planning-procedure-heading {
    display: grid;
  }

  .planning-procedure-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .planning-procedure-clear {
    width: 100%;
  }

  .planning-procedure-list {
    max-height: 16rem;
  }

  .planning-form-check-block {
    max-width: none;
  }

  .planning-form-field--courtesy {
    padding-top: 0;
  }

  .planning-form-actions {
    display: grid;
    gap: 0.75rem;
  }

  .planning-form-actions-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .planning-form-action-button {
    width: 100%;
  }

  .planning-clinical-case-heading {
    display: grid;
  }

  .planning-clinical-case-actions,
  .planning-clinical-case-action {
    width: 100%;
  }

  .planning-linked-case .planning-card-header {
    display: grid;
  }

  .planning-linked-case-action {
    width: 100%;
  }
}

.clinical-case-header {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.clinical-case-header-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.clinical-case-header-copy,
.clinical-case-header-title,
.clinical-case-header-patient,
.clinical-case-header-detail,
.clinical-case-header-detail-value {
  min-width: 0;
}

.clinical-case-header-title {
  margin: 0 0 0.35rem;
  color: #1f2d3d;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
}

.clinical-case-header-patient {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-case-header-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1rem;
  margin-top: 0.65rem;
  max-width: 720px;
}

.clinical-case-header-detail {
  display: grid;
  gap: 0.12rem;
}

.clinical-case-header-detail-label {
  color: #66758a;
  font-size: 0.76rem;
  line-height: 1.15;
}

.clinical-case-header-detail-value {
  color: #1f2d3d;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-case-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.clinical-case-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  max-width: 360px;
}

.clinical-case-header-action-form,
.clinical-case-header-dropdown {
  margin: 0;
}

.clinical-case-header-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
}

.clinical-case-header-footer {
  display: flex;
}

.clinical-case-header-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #66758a;
  font-size: 0.88rem;
  line-height: 1.2;
  text-decoration: none;
}

.clinical-case-header-back-link:hover,
.clinical-case-header-back-link:focus {
  color: #198754;
}

@media (max-width: 767.98px) {
  .clinical-case-header-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
  }

  .clinical-case-header-title {
    font-size: 1.35rem;
  }

  .clinical-case-header-details {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .clinical-case-header-detail {
    padding: 0.62rem 0.7rem;
    border: 1px solid #d8e2ee;
    border-radius: 7px;
    background: #fff;
  }

  .clinical-case-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    max-width: none;
    width: 100%;
  }

  .clinical-case-header-action-form,
  .clinical-case-header-action-form .clinical-case-header-action,
  .clinical-case-header-dropdown,
  .clinical-case-header-dropdown .clinical-case-header-action {
    width: 100%;
  }

  .clinical-case-header-action-form--primary,
  .clinical-case-header-action--primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 379.98px) {
  .clinical-case-header-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.clinical-case-step-item {
  padding: 0.95rem 1rem;
}

.clinical-case-step-item--recommended {
  border-left: 3px solid #0d6efd;
}

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

.clinical-case-step-main,
.clinical-case-step-title,
.clinical-case-step-description,
.clinical-case-step-notes {
  min-width: 0;
}

.clinical-case-step-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.clinical-case-step-title {
  color: #1f2d3d;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clinical-case-step-badges {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  min-width: 0;
}

.clinical-case-step-description {
  margin-top: 0.45rem;
  color: #66758a;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.clinical-case-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-top: 0.55rem;
  color: #66758a;
  font-size: 0.82rem;
  line-height: 1.25;
}

.clinical-case-step-meta-item {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.clinical-case-step-meta-item i {
  color: #198754;
  line-height: 1.15;
}

.clinical-case-step-risk-hint i {
  color: #8a5a00;
}

.clinical-case-step-notes {
  margin-top: 0.6rem;
  color: #66758a;
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.clinical-case-step-notes p:last-child {
  margin-bottom: 0;
}

.clinical-case-step-actions {
  min-width: 132px;
}

.clinical-case-step-action-form,
.clinical-case-step-action-button {
  width: 100%;
}

@media (max-width: 575.98px) {
  .clinical-case-step-item {
    padding: 0.85rem;
  }

  .clinical-case-step-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .clinical-case-step-heading {
    display: grid;
    gap: 0.45rem;
  }

  .clinical-case-step-badges {
    justify-content: flex-start;
  }

  .clinical-case-step-actions {
    min-width: 0;
  }
}

.modal-backdrop {
  --bs-backdrop-bg: #000;
  --bs-backdrop-opacity: 0.32;
}

.modal-backdrop.show {
  opacity: var(--bs-backdrop-opacity);
}

.document-editor {
  min-height: 560px;
  background: #fff;
}

.document-editor .ql-editor {
  min-height: 500px;
  font-size: 15px;
  line-height: 1.45;
}

.document-template-tag-section {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  background: #fff;
}

.document-template-tag-section-header {
  min-height: 2rem;
}

.document-template-tag-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
}

.document-template-tag-section-toggle .bi {
  transition: transform 0.16s ease;
}

.document-template-tag-section-toggle[aria-expanded="true"] .bi {
  transform: rotate(180deg);
}

.document-template-tag-section-body {
  padding-top: 0.65rem;
}

.document-template-tag-cloud-button {
  --bs-btn-padding-y: 0.2rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-size: 0.78rem;
  border-style: dashed;
}

.document-template-tag-cloud-button code {
  color: inherit;
  white-space: normal;
}

.document-editor .ql-editor .ql-liquid-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  margin: 0 0.1rem;
  border-radius: 999px;
  border: 1px solid #b6d4fe;
  background: #e7f1ff;
  color: #0a3d91;
  font-weight: 600;
  font-size: 0.9em;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.ql-toolbar.ql-snow .ql-picker.ql-size {
  width: 92px;
}

.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item::before {
  content: attr(data-value);
}

.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=""]::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=""]::before {
  content: "Padrão";
}

.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="custom"]::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="custom"]::before {
  content: "Inserir...";
}

.document-editor .ql-editor pre,
.document-editor .ql-editor .ql-code-block-container,
.document-editor .ql-editor .ql-code-block,
.document-editor .ql-editor .ql-highlight-block {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  white-space: pre-wrap !important;
  padding: 8px 12px !important;
}

.document-editor .ql-editor code {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  white-space: normal !important;
  text-align: inherit !important;
  line-height: 1.25;
}

.document-editor .ql-editor .ql-code-block-container.ql-align-justify,
.document-editor .ql-editor .ql-code-block.ql-align-justify,
.document-editor .ql-editor .ql-highlight-block.ql-align-justify {
  text-align: justify !important;
}

.document-editor .ql-editor pre strong,
.document-editor .ql-editor .ql-code-block-container strong,
.document-editor .ql-editor .ql-code-block strong,
.document-editor .ql-editor .ql-highlight-block strong {
  font-weight: 700 !important;
}

.document-editor .ql-editor pre em,
.document-editor .ql-editor .ql-code-block-container em,
.document-editor .ql-editor .ql-code-block em,
.document-editor .ql-editor .ql-highlight-block em {
  font-style: italic !important;
}

.document-editor .ql-editor pre u,
.document-editor .ql-editor .ql-code-block-container u,
.document-editor .ql-editor .ql-code-block u,
.document-editor .ql-editor .ql-highlight-block u {
  text-decoration: underline !important;
}

.document-editor .ql-editor .ql-font-serif {
  font-family: Georgia, "Times New Roman", Times, serif !important;
}

.document-editor .ql-editor .ql-font-monospace {
  font-family: "Courier New", "Liberation Mono", "DejaVu Sans Mono", monospace !important;
}

.document-preview-panel {
  max-height: 76vh;
  overflow: auto;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.8rem;
  background: #f5f6f8;
}

.document-preview-sheet {
  width: 100%;
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 8mm 14mm 10mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
}

.document-preview-sheet .pdf-header-wrap {
  padding: 12px 0 0;
  margin-bottom: 11mm;
}

.document-preview-sheet .pdf-header-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
}

.document-preview-sheet .pdf-header-brand-logo {
  max-width: 300px;
  max-height: 58px;
  object-fit: contain;
}

.document-preview-sheet .pdf-header-brand-text {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.document-preview-sheet .pdf-header-line {
  margin-top: 10px;
  height: 1.5px;
  background: #7f9c80;
}

.document-preview-sheet .pdf-content {
  color: #212529;
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.45;
  position: relative;
  z-index: 2;
  flex: 1;
}

.document-preview-sheet .pdf-content p {
  margin: 0 0 0.45rem;
}

.document-preview-sheet .pdf-content pre,
.document-preview-sheet .pdf-content .ql-code-block-container,
.document-preview-sheet .pdf-content .ql-code-block,
.document-preview-sheet .pdf-content .ql-highlight-block {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  white-space: pre-wrap !important;
  padding: 8px 12px !important;
}

.document-preview-sheet .pdf-content code {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  white-space: normal !important;
  text-align: inherit !important;
  line-height: 1.25;
}

.document-preview-sheet .pdf-content .ql-code-block-container.ql-align-justify,
.document-preview-sheet .pdf-content .ql-code-block.ql-align-justify,
.document-preview-sheet .pdf-content .ql-highlight-block.ql-align-justify {
  text-align: justify !important;
}

.document-preview-sheet .pdf-content pre strong,
.document-preview-sheet .pdf-content .ql-code-block-container strong,
.document-preview-sheet .pdf-content .ql-code-block strong,
.document-preview-sheet .pdf-content .ql-highlight-block strong {
  font-weight: 700 !important;
}

.document-preview-sheet .pdf-content pre em,
.document-preview-sheet .pdf-content .ql-code-block-container em,
.document-preview-sheet .pdf-content .ql-code-block em,
.document-preview-sheet .pdf-content .ql-highlight-block em {
  font-style: italic !important;
}

.document-preview-sheet .pdf-content pre u,
.document-preview-sheet .pdf-content .ql-code-block-container u,
.document-preview-sheet .pdf-content .ql-code-block u,
.document-preview-sheet .pdf-content .ql-highlight-block u {
  text-decoration: underline !important;
}

.document-preview-sheet .pdf-content .ql-align-center {
  text-align: center;
}

.document-preview-sheet .pdf-content .ql-align-right {
  text-align: right;
}

.document-preview-sheet .pdf-content .ql-align-justify {
  text-align: justify;
}

.document-preview-sheet .pdf-content .ql-font-serif {
  font-family: Georgia, "Times New Roman", Times, serif !important;
}

.document-preview-sheet .pdf-content .ql-font-monospace {
  font-family: "Courier New", "Liberation Mono", "DejaVu Sans Mono", monospace !important;
}

.document-preview-sheet .pdf-content ol {
  counter-reset: ql-list-0 ql-list-1 ql-list-2 ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9;
  margin: 0 0 0.75rem;
  padding-left: 1.8em;
}

.document-preview-sheet .pdf-content ol li {
  list-style-type: none;
  position: relative;
}

.document-preview-sheet .pdf-content ol li::before {
  display: inline-block;
  white-space: nowrap;
  width: 1.4em;
  margin-left: -1.6em;
  margin-right: 0.2em;
  text-align: right;
}

.document-preview-sheet .pdf-content ol li[data-list="bullet"] {
  counter-increment: none;
}

.document-preview-sheet .pdf-content ol li[data-list="bullet"]::before {
  content: "• ";
}

.document-preview-sheet .pdf-content ol li:not([class*="ql-indent-"]):not([data-list="bullet"]) {
  counter-reset: ql-list-1 ql-list-2 ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9;
  counter-increment: ql-list-0;
}

.document-preview-sheet .pdf-content ol li:not([class*="ql-indent-"]):not([data-list="bullet"])::before { content: counter(ql-list-0, decimal) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-1:not([data-list="bullet"]) { counter-reset: ql-list-2 ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-1; }
.document-preview-sheet .pdf-content ol li.ql-indent-1:not([data-list="bullet"])::before { content: counter(ql-list-1, lower-alpha) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-2:not([data-list="bullet"]) { counter-reset: ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-2; }
.document-preview-sheet .pdf-content ol li.ql-indent-2:not([data-list="bullet"])::before { content: counter(ql-list-2, lower-roman) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-3:not([data-list="bullet"]) { counter-reset: ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-3; }
.document-preview-sheet .pdf-content ol li.ql-indent-3:not([data-list="bullet"])::before { content: counter(ql-list-3, decimal) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-4:not([data-list="bullet"]) { counter-reset: ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-4; }
.document-preview-sheet .pdf-content ol li.ql-indent-4:not([data-list="bullet"])::before { content: counter(ql-list-4, lower-alpha) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-5:not([data-list="bullet"]) { counter-reset: ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-5; }
.document-preview-sheet .pdf-content ol li.ql-indent-5:not([data-list="bullet"])::before { content: counter(ql-list-5, lower-roman) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-6:not([data-list="bullet"]) { counter-reset: ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-6; }
.document-preview-sheet .pdf-content ol li.ql-indent-6:not([data-list="bullet"])::before { content: counter(ql-list-6, decimal) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-7:not([data-list="bullet"]) { counter-reset: ql-list-8 ql-list-9; counter-increment: ql-list-7; }
.document-preview-sheet .pdf-content ol li.ql-indent-7:not([data-list="bullet"])::before { content: counter(ql-list-7, lower-alpha) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-8:not([data-list="bullet"]) { counter-reset: ql-list-9; counter-increment: ql-list-8; }
.document-preview-sheet .pdf-content ol li.ql-indent-8:not([data-list="bullet"])::before { content: counter(ql-list-8, lower-roman) ". "; }

.document-preview-sheet .pdf-content .ql-indent-1 { padding-left: 3em; }
.document-preview-sheet .pdf-content .ql-indent-2 { padding-left: 6em; }
.document-preview-sheet .pdf-content .ql-indent-3 { padding-left: 9em; }
.document-preview-sheet .pdf-content .ql-indent-4 { padding-left: 12em; }
.document-preview-sheet .pdf-content .ql-indent-5 { padding-left: 15em; }
.document-preview-sheet .pdf-content .ql-indent-6 { padding-left: 18em; }
.document-preview-sheet .pdf-content .ql-indent-7 { padding-left: 21em; }
.document-preview-sheet .pdf-content .ql-indent-8 { padding-left: 24em; }

.document-preview-sheet .pdf-content table th,
.document-preview-sheet .pdf-content table td {
  font-size: inherit;
}

.document-preview-sheet .pdf-content table th span,
.document-preview-sheet .pdf-content table th strong,
.document-preview-sheet .pdf-content table th em,
.document-preview-sheet .pdf-content table th u,
.document-preview-sheet .pdf-content table th b,
.document-preview-sheet .pdf-content table th i,
.document-preview-sheet .pdf-content table th small,
.document-preview-sheet .pdf-content table th a,
.document-preview-sheet .pdf-content table td span,
.document-preview-sheet .pdf-content table td strong,
.document-preview-sheet .pdf-content table td em,
.document-preview-sheet .pdf-content table td u,
.document-preview-sheet .pdf-content table td b,
.document-preview-sheet .pdf-content table td i,
.document-preview-sheet .pdf-content table td small,
.document-preview-sheet .pdf-content table td a {
  font-size: inherit !important;
}

.document-preview-sheet .liquid-page-break {
  border-top: 2px dashed #c5ccd3;
  margin: 1.1rem 0;
  height: 0;
  page-break-before: always;
  break-before: page;
  position: relative;
}

.document-preview-sheet .liquid-page-break::after {
  content: "Quebra de página";
  position: relative;
  top: -0.75rem;
  display: inline-block;
  padding: 0 0.35rem;
  background: #fff;
  color: #6c757d;
  font-size: 11px;
}

.document-preview-sheet .pdf-footer-wrap {
  margin-top: 8mm;
  text-align: center;
  color: #303030;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.app-flash {
  border-left: 4px solid transparent;
  color: #0f172a;
  padding: 0.9rem 2.9rem 0.9rem 1rem;
}

.app-flash .btn-close {
  top: 0.75rem;
  right: 0.75rem;
}

.app-flash__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2rem;
}

.app-flash__title {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.app-flash__message {
  margin: 0;
}

.app-flash--success {
  background: linear-gradient(130deg, #eaf9f0 0%, #ddf3e6 100%);
  border-left-color: #198754;
  color: #0f5132;
}

.app-flash--success .app-flash__icon {
  background: rgba(25, 135, 84, 0.16);
  color: #198754;
}

.app-flash--danger {
  background: linear-gradient(130deg, #fdecef 0%, #fbdde2 100%);
  border-left-color: #dc3545;
  color: #842029;
}

.app-flash--danger .app-flash__icon {
  background: rgba(220, 53, 69, 0.16);
  color: #b02a37;
}

.app-flash--warning {
  background: linear-gradient(130deg, #fff8e2 0%, #fff2cc 100%);
  border-left-color: #f0ad00;
  color: #664d03;
}

.app-flash--warning .app-flash__icon {
  background: rgba(240, 173, 0, 0.2);
  color: #8a5a00;
}

.app-flash--info {
  background: linear-gradient(130deg, #e9f5ff 0%, #d8edff 100%);
  border-left-color: #0d6efd;
  color: #084298;
}

.app-flash--info .app-flash__icon {
  background: rgba(13, 110, 253, 0.16);
  color: #0d6efd;
}

.surgery-agenda {
  --surgery-agenda-border: #d8eadf;
  --surgery-agenda-surface: #fff;
  --surgery-agenda-surface-soft: #f6fbf8;
  --surgery-agenda-text: #1f2d3d;
  --surgery-agenda-muted: #66758a;
  --surgery-agenda-brand: var(--app-brand-accent);
  --surgery-agenda-brand-hover: color-mix(in srgb, var(--app-brand-accent) 82%, #000000);
  --surgery-agenda-brand-soft: var(--app-brand-accent-soft);
  --surgery-agenda-brand-border: color-mix(in srgb, var(--app-brand-accent) 32%, #ffffff);
  color: var(--surgery-agenda-text);
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.surgery-agenda-header,
.surgery-agenda-toolbar,
.surgery-agenda-toolbar-left,
.surgery-agenda-toolbar-actions,
.surgery-agenda-navigation {
  display: flex;
  align-items: center;
}

.surgery-agenda-header {
  justify-content: space-between;
  gap: 1rem;
}

.surgery-agenda-title {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  line-height: 1.2;
}

.surgery-agenda-period,
.surgery-agenda-counter {
  color: var(--surgery-agenda-muted);
  font-size: 0.9rem;
}

.surgery-agenda-counter {
  white-space: nowrap;
}

.surgery-agenda-toolbar {
  justify-content: space-between;
  gap: 1rem;
}

.surgery-agenda-toolbar-left,
.surgery-agenda-toolbar-actions,
.surgery-agenda-navigation {
  gap: 0.75rem;
}

.surgery-agenda-square-button {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.surgery-agenda-today-button {
  min-height: 38px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.surgery-agenda-view-switch .btn {
  min-width: 70px;
  min-height: 38px;
}

.surgery-agenda-view-switch .btn-primary {
  color: var(--app-brand-primary-text);
  background-color: var(--surgery-agenda-brand);
  border-color: var(--surgery-agenda-brand);
}

.surgery-agenda-view-switch .btn-primary:hover,
.surgery-agenda-view-switch .btn-primary:focus {
  color: var(--app-brand-primary-text);
  background-color: var(--surgery-agenda-brand-hover);
  border-color: var(--surgery-agenda-brand-hover);
}

.surgery-agenda-date-dropdown {
  min-width: 260px;
}

.surgery-agenda-date-button,
.surgery-agenda-doctor-select {
  min-height: 38px;
  border-radius: 7px;
}

.surgery-agenda-date-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  color: var(--surgery-agenda-text);
  white-space: nowrap;
}

.surgery-agenda-date-menu {
  width: 300px;
  padding: 1rem;
  border-color: var(--surgery-agenda-border);
  border-radius: 8px;
}

.surgery-agenda-doctor-form {
  min-width: 260px;
  margin-bottom: 0;
}

.surgery-agenda-board {
  min-width: 0;
  overflow: hidden;
  background: var(--surgery-agenda-surface);
  border: 1px solid var(--surgery-agenda-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31, 122, 77, 0.05),
              0 8px 24px rgba(31, 122, 77, 0.04);
}

.surgery-agenda-day-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--surgery-agenda-border);
}

.surgery-agenda-doctor-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--surgery-agenda-brand);
  background: var(--surgery-agenda-brand-soft);
  border: 1px solid var(--surgery-agenda-brand-border);
  font-size: 1.35rem;
}

.surgery-agenda-doctor-name {
  color: var(--surgery-agenda-text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surgery-agenda-doctor-subtitle {
  color: var(--surgery-agenda-muted);
  font-size: 0.84rem;
}

.surgery-agenda-day-panel {
  min-height: 520px;
  padding: 1rem;
}

.surgery-agenda-week-header,
.surgery-agenda-week-grid,
.surgery-agenda-month-weekdays,
.surgery-agenda-month-grid {
  display: grid;
  min-width: 100%;
}

.surgery-agenda-week-header,
.surgery-agenda-week-grid {
  grid-template-columns: repeat(7, minmax(150px, 1fr));
}

.surgery-agenda-week-header {
  border-bottom: 1px solid var(--surgery-agenda-border);
}

.surgery-agenda-week-day-heading {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  color: var(--surgery-agenda-text);
  text-decoration: none;
  border-right: 1px solid var(--surgery-agenda-border);
}

.surgery-agenda-week-day-heading:hover,
.surgery-agenda-week-day-heading:focus {
  color: var(--surgery-agenda-brand);
  background: var(--surgery-agenda-brand-soft);
}

.surgery-agenda-week-day-heading:last-child,
.surgery-agenda-week-day:last-child,
.surgery-agenda-month-weekdays > div:last-child {
  border-right: 0;
}

.surgery-agenda-week-day-heading.is-selected {
  color: var(--surgery-agenda-brand);
  background: var(--surgery-agenda-brand-soft);
}

.surgery-agenda-week-day-heading.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px var(--surgery-agenda-brand-border);
}

.surgery-agenda-week-day-name {
  font-size: 0.9rem;
  line-height: 1.15;
}

.surgery-agenda-week-day-date {
  color: var(--surgery-agenda-muted);
  font-size: 0.82rem;
  line-height: 1.15;
}

.surgery-agenda-week-day {
  min-height: 430px;
  min-width: 0;
  padding: 0.8rem;
  overflow: hidden;
  border-right: 1px solid var(--surgery-agenda-border);
  background: var(--surgery-agenda-surface);
}

.surgery-agenda-week-day-mobile-heading {
  display: none;
}

.surgery-agenda-month-weekdays,
.surgery-agenda-month-grid {
  grid-template-columns: repeat(7, minmax(128px, 1fr));
}

.surgery-agenda-month-weekdays {
  color: var(--surgery-agenda-muted);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--surgery-agenda-border);
}

.surgery-agenda-month-weekdays > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--surgery-agenda-border);
}

.surgery-agenda-month-grid,
.surgery-agenda-week-board {
  overflow-x: auto;
}

.surgery-agenda-month-day {
  min-height: 132px;
  min-width: 0;
  padding: 0.65rem;
  overflow: hidden;
  border-right: 1px solid var(--surgery-agenda-border);
  border-bottom: 1px solid var(--surgery-agenda-border);
  background: var(--surgery-agenda-surface);
}

.surgery-agenda-month-day:nth-child(7n) {
  border-right: 0;
}

.surgery-agenda-month-day.is-outside {
  background: var(--surgery-agenda-surface-soft);
  color: var(--surgery-agenda-muted);
}

.surgery-agenda-month-day.is-selected {
  box-shadow: inset 0 0 0 2px var(--surgery-agenda-brand-border);
}

.surgery-agenda-month-day.is-today .surgery-agenda-month-day-number {
  color: #fff;
  background: var(--surgery-agenda-brand);
}

.surgery-agenda-month-day-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.surgery-agenda-month-day-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--surgery-agenda-text);
  text-decoration: none;
}

.surgery-agenda-month-day-number:hover,
.surgery-agenda-month-day-number:focus {
  color: var(--surgery-agenda-brand);
  background: var(--surgery-agenda-brand-soft);
}

.surgery-agenda-event-list {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.surgery-agenda-event {
  min-height: 58px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid rgba(31, 122, 77, 0.2);
  padding: 0.55rem 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--surgery-agenda-text);
  background: var(--surgery-agenda-brand-soft);
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(47, 54, 64, 0.05);
}

.surgery-agenda-event:hover,
.surgery-agenda-event:focus {
  color: var(--surgery-agenda-text);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(47, 54, 64, 0.08);
}

.surgery-agenda-event--compact {
  min-height: 42px;
  padding: 0.4rem 0.55rem;
}

.surgery-agenda-event-patient,
.surgery-agenda-event-procedure {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.surgery-agenda-event-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 0.5rem;
  row-gap: 0.2rem;
  flex-wrap: wrap;
  margin-bottom: 0.08rem;
}

.surgery-agenda-event-time {
  flex: 0 0 auto;
  color: var(--surgery-agenda-brand);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
}

.surgery-agenda-event-status {
  margin-left: auto;
  max-width: 100%;
  border: 1px solid rgba(31, 122, 77, 0.18);
  border-radius: 999px;
  padding: 0.06rem 0.38rem;
  overflow: hidden;
  color: #3f7058;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.surgery-agenda-event-patient {
  font-size: 0.9rem;
  line-height: 1.15;
}

.surgery-agenda-event-procedure {
  color: var(--surgery-agenda-muted);
  font-size: 0.82rem;
  line-height: 1.15;
}

.surgery-agenda-empty-label,
.surgery-agenda-month-more-link {
  font-size: 0.78rem;
}

.surgery-agenda-empty-label {
  color: var(--surgery-agenda-muted);
}

.surgery-agenda-time-group {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding-bottom: 0.9rem;
}

.surgery-agenda-time-group + .surgery-agenda-time-group {
  border-top: 1px solid var(--surgery-agenda-border);
  padding-top: 0.9rem;
}

.surgery-agenda-time-label {
  color: var(--surgery-agenda-muted);
  font-size: 0.9rem;
  line-height: 1.15;
  padding-top: 0.55rem;
}

.surgery-agenda-month-more-link {
  color: var(--surgery-agenda-brand);
  text-decoration: none;
}

.surgery-agenda-month-more-link:hover,
.surgery-agenda-month-more-link:focus {
  color: var(--surgery-agenda-brand-hover);
  text-decoration: underline;
}

.surgery-agenda-mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.surgery-agenda-mini-calendar-title {
  color: var(--surgery-agenda-text);
}

.surgery-agenda-mini-calendar-nav {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--surgery-agenda-text);
  text-decoration: none;
}

.surgery-agenda-mini-calendar-nav:hover,
.surgery-agenda-mini-calendar-nav:focus {
  color: var(--surgery-agenda-brand);
  background: var(--surgery-agenda-brand-soft);
}

.surgery-agenda-mini-calendar-weekdays,
.surgery-agenda-mini-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}

.surgery-agenda-mini-calendar-weekdays {
  color: var(--surgery-agenda-muted);
  font-size: 0.8rem;
  margin-bottom: 0.55rem;
}

.surgery-agenda-mini-calendar-day {
  width: 32px;
  height: 32px;
  margin: 0.1rem auto;
  border-radius: 50%;
  color: var(--surgery-agenda-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  text-decoration: none;
}

.surgery-agenda-mini-calendar-day:hover,
.surgery-agenda-mini-calendar-day:focus {
  color: var(--surgery-agenda-brand);
  background: var(--surgery-agenda-brand-soft);
}

.surgery-agenda-mini-calendar-day.is-outside {
  color: var(--surgery-agenda-muted);
  opacity: 0.68;
}

.surgery-agenda-mini-calendar-day.is-selected {
  color: #fff;
  background: var(--surgery-agenda-brand);
}

.surgery-agenda-mini-calendar-day.is-today:not(.is-selected) {
  border: 1px solid var(--surgery-agenda-brand-border);
  color: var(--surgery-agenda-brand);
}

.surgery-agenda-empty-state {
  min-height: 320px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--surgery-agenda-muted);
}

@media (max-width: 991.98px) {
  .surgery-agenda-header,
  .surgery-agenda-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .surgery-agenda-toolbar-actions,
  .surgery-agenda-toolbar-left,
  .surgery-agenda-navigation {
    flex-wrap: wrap;
  }
}

@media (max-width: 575.98px) {
  .surgery-agenda-navigation,
  .surgery-agenda-toolbar-actions,
  .surgery-agenda-toolbar-left,
  .surgery-agenda-doctor-form,
  .surgery-agenda-date-dropdown,
  .surgery-agenda-view-switch {
    width: 100%;
  }

  .surgery-agenda-toolbar-left,
  .surgery-agenda-toolbar-actions,
  .surgery-agenda-navigation {
    gap: 0.5rem;
  }

  .surgery-agenda-navigation {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .surgery-agenda-today-button {
    width: auto;
    min-width: 0;
  }

  .surgery-agenda-view-switch .btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .surgery-agenda-square-button {
    flex: 0 0 38px;
  }

  .surgery-agenda-board {
    overflow: hidden;
  }

  .surgery-agenda-week-board,
  .surgery-agenda-month-grid {
    overflow-x: visible;
  }

  .surgery-agenda-week-header {
    display: none;
  }

  .surgery-agenda-week-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .surgery-agenda-week-day {
    min-height: 0;
    padding: 0.75rem;
    border-right: 0;
    border-bottom: 1px solid var(--surgery-agenda-border);
  }

  .surgery-agenda-week-day:last-child {
    border-bottom: 0;
  }

  .surgery-agenda-week-day-mobile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: -0.1rem 0 0.65rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(31, 122, 77, 0.1);
  }

  .surgery-agenda-week-day-mobile-heading.is-selected {
    color: var(--surgery-agenda-brand);
  }

  .surgery-agenda-week-day-mobile-heading.is-today:not(.is-selected) {
    color: var(--surgery-agenda-brand);
  }

  .surgery-agenda-month-weekdays,
  .surgery-agenda-month-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .surgery-agenda-month-weekdays > div {
    min-height: 34px;
    font-size: 0.72rem;
  }

  .surgery-agenda-month-day {
    min-height: 58px;
    padding: 0.3rem;
  }

  .surgery-agenda-month-day-header {
    justify-content: center;
    margin-bottom: 0.2rem;
  }

  .surgery-agenda-month-day-number {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  .surgery-agenda-month-day .surgery-agenda-event-list {
    gap: 0.12rem;
  }

  .surgery-agenda-month-day .surgery-agenda-event {
    min-height: 4px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--surgery-agenda-brand);
    box-shadow: none;
  }

  .surgery-agenda-month-day .surgery-agenda-event > *,
  .surgery-agenda-month-day .surgery-agenda-empty-label,
  .surgery-agenda-month-day .surgery-agenda-month-more-link {
    display: none;
  }

  .surgery-agenda-day-panel {
    min-height: 220px;
    padding: 0.75rem;
  }

  .surgery-agenda-date-menu {
    width: min(300px, calc(100vw - 2rem));
  }

  .surgery-agenda-time-group {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .surgery-agenda-time-label {
    padding-top: 0;
  }
}

/* Paridade visual com clinic_care: estrutura real da sidebar fixa. */
:root {
  --admin-sidebar-width: 268px;
  --admin-shell-bg: #eef5f1;
  --admin-shell-border: #dce7e1;
  --admin-shell-muted: #637083;
  --admin-shell-ink: #16231d;
  --admin-shell-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.06);
  --admin-shell-shadow-sm: 0 6px 18px rgba(18, 39, 29, 0.05);
}

.admin-body {
  min-height: 100vh;
  background: var(--admin-shell-bg);
}

.admin-shell {
  display: flex;
  min-height: 100vh;
  min-width: 0;
}

.admin-sidebar {
  --bs-offcanvas-width: min(88vw, 340px);
  width: var(--admin-sidebar-width) !important;
  min-width: var(--admin-sidebar-width) !important;
  max-width: var(--admin-sidebar-width) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 249, 0.92)) !important;
  box-shadow: 10px 0 30px rgba(18, 39, 29, 0.04);
  backdrop-filter: blur(16px);
}

.admin-sidebar .offcanvas-body {
  height: 100%;
}

.admin-sidebar-branding,
.admin-sidebar nav,
.admin-sidebar-account,
.admin-sidebar-footer {
  flex: 0 0 auto;
}

.admin-sidebar-branding {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border-bottom: 1px solid var(--admin-shell-border);
}

.admin-sidebar-client-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 6.5rem;
  min-height: 6.5rem;
  padding: 0.35rem;
  border: 1px solid var(--admin-shell-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--admin-shell-shadow-xs);
}

.admin-sidebar-client-logo-frame::after {
  display: none;
}

.admin-sidebar-client-logo-frame img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.admin-sidebar-product {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  text-align: center;
}

.admin-sidebar-product-name {
  color: var(--admin-shell-ink);
  font-size: 0.95rem;
  font-weight: 740;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-sidebar-product-signature {
  color: var(--admin-shell-muted);
  font-size: 0.8rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-sidebar nav {
  min-height: 0;
  overflow-y: visible;
}

.admin-sidebar .nav-link {
  min-width: 0;
  min-height: 2.45rem;
  border: 1px solid transparent;
  border-radius: 7px !important;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.admin-sidebar .nav-link:hover {
  border-color: rgba(31, 122, 77, 0.1);
  background: rgba(31, 122, 77, 0.045);
  color: var(--admin-shell-ink) !important;
}

.admin-sidebar .nav-link.active {
  border-color: rgba(31, 122, 77, 0.14);
  background: color-mix(in srgb, var(--app-brand-accent) 7%, #fff) !important;
  color: #244235 !important;
  box-shadow: inset 2px 0 0 rgba(31, 122, 77, 0.58);
}

.admin-sidebar .nav-link.active i {
  color: color-mix(in srgb, var(--app-brand-accent) 74%, #344054);
}

.admin-sidebar .admin-sidebar-subitem.active {
  border-color: rgba(31, 122, 77, 0.1);
  background: rgba(31, 122, 77, 0.045) !important;
  color: #315342 !important;
  box-shadow: inset 2px 0 0 rgba(31, 122, 77, 0.36);
}

.admin-sidebar-item + .admin-sidebar-item {
  margin-top: 0.1rem;
}

.admin-sidebar .nav-link i {
  flex: 0 0 1rem;
  text-align: center;
}

.admin-sidebar .nav-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-sidebar .admin-sidebar-subitem,
.admin-sidebar #settingsMenu .admin-sidebar-subitem {
  padding-left: 2rem !important;
  font-size: 0.88rem;
  margin-left: 0;
}

.admin-sidebar-subheader,
.admin-sidebar #settingsMenu .admin-sidebar-subheader {
  padding-left: 1.75rem !important;
  color: var(--admin-shell-muted) !important;
  font-size: 0.68rem;
  line-height: 1.2;
}

.admin-sidebar #settingsMenu .admin-sidebar-subitem {
  padding-left: 2.5rem !important;
}

.sidebar-caret {
  flex: 0 0 auto;
  margin-left: auto;
}

.admin-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1rem clamp(1rem, 2vw, 1.5rem) 1.5rem;
  background: var(--admin-shell-bg);
}

.admin-main-container {
  width: min(100%, 80rem);
  margin: 0 auto;
  padding: 0;
}

.admin-mobile-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 80rem);
  margin: 0 auto 0.75rem;
  padding: 0.65rem;
  border: 1px solid rgba(202, 217, 209, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--admin-shell-shadow-xs);
}

.admin-mobile-menu-button,
.admin-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-mobile-menu-button {
  grid-column: 1;
  justify-self: start;
}

.admin-mobile-brand {
  grid-column: 2;
  justify-content: center;
  justify-self: center;
  min-width: 0;
  color: #101828;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.admin-mobile-brand:hover,
.admin-mobile-brand:focus {
  color: #101828;
  text-decoration: none;
}

.admin-mobile-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-main > .alert {
  width: min(100%, 80rem);
  margin: 0 auto 0.75rem;
  border: 1px solid rgba(202, 217, 209, 0.88) !important;
  border-radius: 8px !important;
  box-shadow: var(--admin-shell-shadow-xs);
}

.admin-main > .alert .container-fluid {
  padding-right: 0;
  padding-left: 0;
}

.admin-sidebar-account {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem 0.75rem 0.75rem;
  border-top: 1px solid var(--admin-shell-border);
  background: rgba(255, 255, 255, 0.45);
}

.portal-user-role {
  color: #667085;
  font-size: 0.8125rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar-profile {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(202, 217, 209, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--admin-shell-shadow-xs);
}

.admin-sidebar-profile-name {
  color: #101828;
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-decoration: none;
  text-wrap: balance;
}

.admin-sidebar-profile-name:hover,
.admin-sidebar-profile-name:focus {
  color: var(--admin-shell-ink);
  text-decoration: none;
}

.admin-sidebar-profile:hover .admin-sidebar-profile-name,
.admin-sidebar-profile:focus .admin-sidebar-profile-name {
  color: var(--admin-shell-ink);
}

.admin-sidebar-profile:focus-visible {
  outline: 2px solid var(--app-brand-accent-focus);
  outline-offset: 2px;
  border-radius: 5px;
}

.admin-sidebar .portal-user-role {
  font-size: 0.75rem;
}

.admin-sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.52rem 0.65rem;
  border: 1px solid rgba(202, 217, 209, 0.72);
  border-radius: 8px;
  appearance: none;
  background: rgba(255, 255, 255, 0.72);
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.admin-sidebar-logout i {
  color: #667085;
}

.admin-sidebar-logout:hover,
.admin-sidebar-logout:focus {
  border-color: rgba(31, 122, 77, 0.16);
  background: rgba(31, 122, 77, 0.055);
  color: var(--admin-shell-ink);
}

.admin-sidebar-logout:hover i,
.admin-sidebar-logout:focus i {
  color: color-mix(in srgb, var(--app-brand-accent) 70%, #344054);
}

.admin-sidebar-logout:focus-visible {
  outline: 2px solid var(--app-brand-accent-focus);
  outline-offset: 2px;
}

.admin-sidebar-footer {
  display: grid;
  gap: 0.35rem;
  padding: 0 0.75rem 0.85rem;
  color: #667085;
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: center;
}

@media (min-width: 992px) {
  .admin-sidebar {
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    align-self: flex-start;
    border-right: 1px solid var(--admin-shell-border) !important;
    box-shadow: none;
    backdrop-filter: none;
    overflow-y: auto !important;
  }

  .admin-sidebar .offcanvas-body {
    overflow-y: visible !important;
  }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .admin-main-container {
    padding: 0.65rem 0.75rem !important;
  }

  .admin-page h1.h4,
  .admin-page .h4 {
    font-size: 1.25rem;
    line-height: 1.2;
  }

  .admin-page .card-header,
  .admin-page .card-body {
    padding: 0.8rem !important;
  }

  .admin-page .table > :not(caption) > * > * {
    padding: 0.45rem 0.55rem;
    vertical-align: middle;
  }

  .admin-page .table {
    font-size: 0.92rem;
  }
}

@media (max-width: 991.98px) {
  .admin-shell {
    display: block;
  }

  .admin-main {
    padding: 0.75rem;
  }

  .admin-sidebar {
    width: min(88vw, 340px) !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .admin-sidebar .offcanvas-body {
    overflow-y: auto;
  }

  .admin-sidebar .nav-link {
    min-height: 42px;
    white-space: normal;
  }
}

@media (max-width: 575.98px) {
  .admin-mobile-header {
    gap: 0.55rem;
    padding: 0.55rem;
  }

  .admin-mobile-menu-button {
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.25rem 0.55rem;
  }

  .admin-mobile-brand {
    justify-content: center;
    overflow: hidden;
  }

  .admin-mobile-brand span {
    font-size: 0.86rem;
  }

  .admin-main > .alert {
    padding: 0.65rem 0.75rem !important;
  }

  .admin-main > .alert .container-fluid {
    gap: 0.55rem !important;
  }

  .admin-main > .alert span.ms-1 {
    margin-left: 0 !important;
  }
}

/* Paridade visual com clinic_care: tabelas administrativas e acoes de linha. */
.admin-page .table-responsive {
  min-width: 0;
}

.admin-page .card:has(.table-responsive) {
  overflow: hidden;
}

.admin-page .table {
  table-layout: auto;
  margin-bottom: 0;
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(31, 122, 77, 0.028);
  border-color: #e8f0eb;
  font-size: 0.925rem;
}

.admin-page .table th,
.admin-page .table td {
  word-break: normal;
  overflow-wrap: break-word;
  vertical-align: middle;
}

.admin-page .table thead th {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  color: var(--admin-shell-muted);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1.2;
  background: linear-gradient(180deg, #fff, #f8fbf9);
  border-bottom: 1px solid #e3ece7;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-page .table > :not(caption) > * > * {
  border-bottom-color: #edf3ef;
  padding: 0.8rem 0.85rem;
  background-color: rgba(255, 255, 255, 0.92);
}

.admin-page .table tbody tr {
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-page .table tbody tr:hover > * {
  background-color: #fbfdfc;
}

.admin-page .table tbody tr:last-child > * {
  border-bottom: 0;
}

.admin-page .table td[data-label="Status"] {
  color: #315342;
  font-weight: 650;
}

.admin-page .table td[data-label="Ações"],
.admin-page .table td[data-label="Abrir"],
.admin-page .table td:has(.table-action-icon) {
  width: 1%;
  white-space: nowrap;
}

.admin-page .table td[data-label="Ações"] form,
.admin-page .table td[data-label="Abrir"] form,
.admin-page .table td:has(.table-action-icon) form {
  display: inline-block;
  margin: 0;
}

.admin-page .table td:has(.table-action-icon) > .d-inline-flex,
.admin-page .procedure-row-actions,
.admin-page .clinical-case-step-row-actions,
.admin-page .doctor-row-actions,
.admin-page .doctor-council-row-actions,
.admin-page .user-row-actions,
.admin-page .clinical-documents-row-actions,
.admin-page .clinical-case-subresource-row-actions {
  gap: 0.2rem !important;
}

.table-action-icon,
.admin-page .table .table-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  min-height: 2rem;
  margin-left: 0.2rem;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f9fbfa;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.table-action-icon i {
  font-size: 1.05rem;
  line-height: 1;
}

.table-action-icon:hover,
.table-action-icon:focus {
  border-color: #d8e7f1;
  background: #f1f7fb;
  box-shadow: 0 0.35rem 0.8rem rgba(18, 39, 29, 0.05);
}

.table-action-icon.text-primary {
  color: #245f87 !important;
  border-color: #d8e7f1;
  background: #f3f8fb;
}

.table-action-icon.text-secondary {
  color: #5d6b7a !important;
  border-color: #e2e9e5;
  background: #fbfdfc;
}

.table-action-icon.text-success {
  color: color-mix(in srgb, var(--app-brand-accent) 76%, #344054) !important;
  border-color: rgba(31, 122, 77, 0.18);
  background: color-mix(in srgb, var(--app-brand-accent) 7%, #fff);
}

.table-action-icon.text-danger {
  color: #b42318 !important;
  border-color: #f3d5d2;
  background: #fff7f6;
}

.table-action-icon.text-dark {
  color: #344054 !important;
  border-color: #e2e9e5;
  background: #fbfdfc;
}

.table-action-icon:not(:disabled):not(.disabled):hover,
.table-action-icon:not(:disabled):not(.disabled):focus {
  color: #344054 !important;
  border-color: #d8e7f1;
  background: #f1f7fb;
  box-shadow: 0 0.35rem 0.8rem rgba(18, 39, 29, 0.05);
}

.table-action-icon.text-primary:not(:disabled):not(.disabled):hover,
.table-action-icon.text-primary:not(:disabled):not(.disabled):focus {
  color: #174f7c !important;
  border-color: #c9dfed;
  background: #eef6fb;
}

.table-action-icon.text-success:not(:disabled):not(.disabled):hover,
.table-action-icon.text-success:not(:disabled):not(.disabled):focus {
  color: color-mix(in srgb, var(--app-brand-accent) 88%, #344054) !important;
  border-color: rgba(31, 122, 77, 0.24);
  background: color-mix(in srgb, var(--app-brand-accent) 10%, #fff);
}

.table-action-icon.text-danger:not(:disabled):not(.disabled):hover,
.table-action-icon.text-danger:not(:disabled):not(.disabled):focus {
  color: #912018 !important;
  border-color: #efc6c1;
  background: #fff1ef;
}

.table-action-icon.text-secondary:not(:disabled):not(.disabled):hover,
.table-action-icon.text-secondary:not(:disabled):not(.disabled):focus,
.table-action-icon.text-dark:not(:disabled):not(.disabled):hover,
.table-action-icon.text-dark:not(:disabled):not(.disabled):focus {
  border-color: #d8e7f1;
  background: #f1f7fb;
}

.table-action-icon:not(:disabled):not(.disabled):focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.18rem rgba(31, 122, 77, 0.18);
}

.table-action-icon:disabled,
.table-action-icon.disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 575.98px) {
  .admin-page .table-responsive {
    overflow-x: visible;
    border: 0 !important;
    border-radius: 0;
  }

  .admin-page .table {
    display: block;
    min-width: 0 !important;
    border: 0;
  }

  .admin-page .table thead {
    display: none;
  }

  .admin-page .table tbody {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border-top: 0 !important;
  }

  .admin-page .table tr {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid var(--admin-shell-border);
    border-radius: 8px;
    background: #fff;
  }

  .admin-page .table td {
    border: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
  }

  .admin-page .table td[data-label] {
    display: grid;
    grid-template-columns: minmax(7.25rem, 38%) minmax(0, 1fr);
    gap: 0.2rem 0.75rem;
    align-items: start;
    text-align: left !important;
    overflow-wrap: anywhere;
  }

  .admin-page .table td[data-label]::before {
    content: attr(data-label);
    grid-column: 1;
    grid-row: 1 / span 20;
    color: #667085;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .admin-page .table td[data-label="Ações"],
  .admin-page .table td[data-label="Abrir"],
  .admin-page .table td:has(.table-action-icon) {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    white-space: normal;
  }

  .admin-page .table td[data-label="Ações"]::before,
  .admin-page .table td[data-label="Abrir"]::before,
  .admin-page .table td:has(.table-action-icon)::before {
    flex: 0 0 100%;
  }

  .admin-page .table td[colspan] {
    display: block;
  }

  .admin-page .table td[colspan]::before {
    content: none;
  }
}

@media (max-width: 767.98px) {
  .admin-page.document-template-page .document-template-table tr {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.85rem 1rem !important;
    align-items: start;
    overflow: hidden;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Nome"],
  .admin-page.document-template-page .document-template-table td[data-label="Campo clínico"],
  .admin-page.document-template-page .document-template-table td[data-label="Ações"] {
    grid-column: 1 / -1 !important;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Nome"] {
    order: 1;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Tipo"] {
    order: 2;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Status"] {
    order: 3;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Campo clínico"] {
    order: 4;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Versão"] {
    order: 5;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Atualizado em"] {
    order: 6;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Ações"] {
    order: 7;
  }

  .admin-page.document-template-page .document-template-table td[data-label] {
    display: block !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  .admin-page.document-template-page .document-template-table td[data-label]::before {
    display: block !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin-bottom: 0.2rem;
    color: #58677a;
    font-size: 0.72rem;
  }

  .admin-page.document-template-page .document-template-table td[data-label="Nome"]::before,
  .admin-page.document-template-page .document-template-table td[data-label="Ações"]::before {
    display: none !important;
  }

  .admin-page.document-template-page .document-template-table td[data-label] > * {
    max-width: 100%;
  }

  .admin-page.document-template-page .document-template-table .badge {
    max-width: 100%;
    white-space: normal;
  }

  .admin-page.document-template-page .document-template-cell-actions {
    width: 100% !important;
  }

  .admin-page.document-template-page .document-template-row-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 359.98px) {
  .admin-page.document-template-page .document-template-table tr {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
