:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --panel: #ffffff;
  --panel-2: #eef6f5;
  --line: #e5e7eb;
  --text: #1f2933;
  --muted: #667085;
  --teal: #0f766e;
  --violet: #7c4dff;
  --blue: #2563eb;
  --red: #dc2626;
  --green: #16a34a;
  --amber: #d97706;
  --soft-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, .1), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
select {
  color-scheme: light;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
}
.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  line-height: 1;
}
.brand-block {
  display: grid;
  gap: 4px;
  width: max-content;
  max-width: 100%;
}
.brand-block p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  width: 100%;
}
.brand-button {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
  width: max-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.brand-logo {
  display: block;
  width: 132px;
  height: auto;
  overflow: visible;
}
.brand-logo-word {
  font-family: "Arial Black", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -2px;
  dominant-baseline: alphabetic;
}
.brand-logo-ib { fill: #009b99; }
.brand-logo-v { fill: #2477f3; }
.brand-logo-ia { fill: #7348f4; }
.brand-logo-reg {
  fill: #7348f4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
}
.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.sidebar {
  border-right: 1px solid var(--line);
  padding: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 10px 0 28px rgba(15, 23, 42, .04);
}
.sidebar .brand-mark {
  line-height: 1;
}
.sidebar .brand-logo {
  width: 93px;
}
.sidebar .brand-block {
  margin-bottom: 28px;
}
.sidebar .brand-block p {
  font-size: 11px;
  max-width: 180px;
}
.nav {
  display: grid;
  gap: 8px;
}
.nav button, .ghost, .primary, .danger {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.nav button {
  text-align: left;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.nav button.active, .nav button:hover {
  background: var(--panel-2);
  color: var(--teal);
}
.main {
  padding: 28px;
  padding-bottom: 96px;
  max-width: 1160px;
  width: 100%;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.offline-sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  max-width: min(360px, 100%);
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 999px;
  background: #f0fdfa;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.offline-sync-chip small {
  display: inline;
  max-width: 210px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
}
.offline-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}
.offline-sync-chip.offline {
  border-color: rgba(217, 119, 6, .3);
  background: #fffbeb;
  color: var(--amber);
}
.offline-sync-chip.pending,
.offline-sync-chip.syncing {
  border-color: rgba(37, 99, 235, .26);
  background: #eff6ff;
  color: var(--blue);
}
.offline-sync-chip.error {
  border-color: rgba(220, 38, 38, .28);
  background: #fef2f2;
  color: var(--red);
}
.offline-sync-chip.conflict {
  border-color: rgba(124, 45, 18, .32);
  background: #fff7ed;
  color: #9a3412;
}
.clinical-outbox-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-left: 6px;
  padding: 3px 7px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  vertical-align: middle;
  white-space: normal;
}
.clinical-outbox-badge.conflict {
  border-color: rgba(124, 45, 18, .32);
  background: #fff7ed;
  color: #9a3412;
}
.clinical-outbox-badge.error {
  border-color: rgba(220, 38, 38, .28);
  background: #fef2f2;
  color: var(--red);
}
.clinical-outbox-badge.syncing {
  border-color: rgba(37, 99, 235, .28);
  background: #eff6ff;
  color: var(--blue);
}
.case-status-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted { color: var(--muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}
.form {
  display: grid;
  gap: 12px;
  max-width: 760px;
}
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
}
.internal-select-field {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.internal-select-native {
  position: absolute !important;
  top: auto !important;
  left: -10000px !important;
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}
.internal-select-trigger {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 760;
  line-height: 1.2;
  text-align: left;
  touch-action: manipulation;
}
.internal-select-trigger:hover,
.internal-select-trigger:focus-visible,
.internal-select-trigger[aria-expanded="true"] {
  border-color: rgba(15, 118, 110, .45);
  background: var(--panel-2);
  color: var(--teal);
  outline: none;
}
.internal-select-trigger[aria-invalid="true"] {
  border-color: #fca5a5;
}
.internal-select-trigger:disabled,
.internal-select-field.disabled .internal-select-trigger {
  cursor: not-allowed;
  opacity: .62;
  background: #f8fafc;
}
.internal-select-trigger-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.internal-select-trigger-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: currentColor;
}
.internal-select-trigger-icon .ui-icon {
  width: 18px;
  height: 18px;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 54px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  background: #e8f7f4;
  color: var(--teal);
  outline: none;
}
.password-toggle .ui-icon {
  width: 20px !important;
  height: 20px !important;
}
textarea {
  min-height: 92px;
  resize: vertical;
}
.inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.primary {
  background: linear-gradient(135deg, var(--teal), #14b8a6);
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 118, 110, .18);
}
.primary:disabled, .ghost:disabled {
  cursor: progress;
  opacity: .78;
}
.primary.loading, .ghost.loading {
  animation: ibvia-button-working .78s ease-in-out infinite;
}
.primary.loading::after, .ghost.loading::after {
  content: "";
  width: 12px;
  height: 12px;
  margin-left: 9px;
  display: inline-block;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .74);
  border-top-color: transparent;
  border-radius: 50%;
  animation: ibvia-button-spin .72s linear infinite;
}
@keyframes ibvia-button-working {
  0%, 100% { transform: translateY(0); filter: brightness(1); }
  50% { transform: translateY(2px); filter: brightness(1.13); }
}
@keyframes ibvia-button-spin {
  to { transform: rotate(360deg); }
}
.ghost {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--text);
}
.top .ghost,
.detail-actions .ghost,
.detail-actions .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}
.top .ghost {
  min-width: 92px;
}
.danger {
  background: #fee2e2;
  color: #991b1b;
}
.status {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 14px;
  white-space: pre-wrap;
}
.status.ok { border-color: rgba(22, 163, 74, .35); background: #f0fdf4; color: #166534; }
.status.warn { border-color: rgba(217, 119, 6, .38); background: #fffbeb; color: #92400e; }
.status.err { border-color: rgba(220, 38, 38, .38); background: #fef2f2; color: #991b1b; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
  margin: 2px 4px 2px 0;
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar label {
  min-width: min(260px, 100%);
}
.professionals-directory {
  display: grid;
  gap: 16px;
}
.directory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.directory-head h2 {
  margin-bottom: 4px;
}
.directory-head h2 span {
  display: inline-flex;
  margin-left: 8px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 800;
}
.professionals-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(150px, .8fr)) auto;
  gap: 12px;
  align-items: end;
}
.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  color: var(--text);
  font-weight: 700;
}
.checkbox-line input {
  width: auto;
}
.professionals-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.professionals-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}
.professionals-table th,
.professionals-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.professionals-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.professionals-table tr:last-child td {
  border-bottom: 0;
}
.professional-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, .18);
  background: #ecfdf5;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.professional-status.inativo,
.professional-status.acesso {
  border-color: rgba(217, 119, 6, .24);
  background: #fffbeb;
  color: var(--amber);
}
.professional-status.excluido {
  border-color: rgba(220, 38, 38, .22);
  background: #fef2f2;
  color: var(--red);
}
.professional-provision {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.professional-provision-form {
  max-width: none;
}
.professional-provision-form .primary {
  justify-self: start;
}
@media (max-width: 760px) {
  .directory-head,
  .professionals-filters {
    grid-template-columns: 1fr;
  }
  .directory-head {
    display: grid;
  }
  .professional-provision-form .primary {
    justify-self: stretch;
  }
}
.case-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.ops-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ops-counter {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 4px;
  box-shadow: var(--soft-shadow);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  width: 100%;
}
.ops-counter strong {
  font-size: 34px;
  line-height: 1;
}
.ops-counter.good strong { color: var(--kpi-improving-color); }
.ops-counter.stable strong { color: var(--kpi-stable-color); }
.ops-counter.bad strong { color: var(--kpi-worsening-color); }
.ops-counter.warn strong { color: var(--kpi-overdue-color); }
.ops-counter.neutral strong { color: var(--kpi-unassessed-color); }
.case-card {
  display: grid;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}
.ops-case {
  border-left: 6px solid var(--line);
}
.ops-case.ok { border-left-color: var(--green); }
.ops-case.warn { border-left-color: var(--amber); }
.ops-case.danger, .ops-case.critical { border-left-color: var(--red); }
.case-card p {
  margin-bottom: 0;
}
.case-kicker {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.photo-thumb, .photo-placeholder {
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
}
.photo-thumb {
  display: grid;
  padding: 0;
  color: var(--text);
  text-align: left;
}
.photo-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.photo-thumb span {
  padding: 10px 12px;
  font-weight: 800;
}
.photo-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 16px;
}
.photo-placeholder b {
  color: var(--text);
}
.ops-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ops-dates span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: #f8fafc;
}
.case-detail-grid {
  margin-bottom: 14px;
}
.back-button {
  margin-bottom: 14px;
}
.wound-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wound-chip {
  display: grid;
  gap: 4px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}
.wound-chip span {
  color: var(--muted);
}
.timeline {
  display: grid;
  gap: 12px;
}
.timeline-item {
  border-left: 3px solid var(--teal);
  background: var(--panel);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--soft-shadow);
}
.actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.detail-actions {
  display: grid;
  grid-template-columns: repeat(2, 220px);
  justify-content: flex-start;
  align-items: stretch;
  margin-bottom: 14px;
}
.detail-actions .ghost,
.detail-actions .primary {
  width: 220px;
  min-width: 0;
  text-align: center;
}
.detail-actions .back-button {
  width: 220px;
  min-width: 0;
}
.inline.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.inline.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.new-case-scope-row {
  margin-top: 12px;
  align-items: start;
}
.clinical-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.clinical-section h3 {
  margin-bottom: 0;
}
.ops-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.ops-section h3 {
  margin-bottom: 0;
}
.pending-panel {
  border-color: rgba(217, 119, 6, .35);
}
.pending-panel.ok {
  border-color: rgba(22, 163, 74, .28);
}
.pending-panel-highlight {
  animation: ibvia-pending-panel-highlight 1.8s ease-out 1;
}
.pending-summary-card {
  display: grid;
  gap: 12px;
  width: 100%;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.pending-summary-card:hover {
  border-color: rgba(217, 119, 6, .56);
  background: #fffaf0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .09);
}
.pending-summary-card:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .28);
  outline-offset: 3px;
}
.pending-summary-head,
.pending-summary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pending-summary-title {
  font-weight: 800;
  font-size: 1.05rem;
}
.pending-summary-count {
  display: inline-grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(217, 119, 6, .24);
  border-radius: 999px;
  color: var(--amber);
  background: #fff7ed;
  font-weight: 820;
}
.pending-summary-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}
.pending-summary-list li {
  padding-left: 2px;
}
.pending-summary-footer {
  color: var(--muted);
  line-height: 1.35;
}
.pending-summary-arrow {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: var(--amber);
  background: #fff7ed;
  font-size: 1.35rem;
  line-height: 1;
}
.pending-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffbeb;
  margin-top: 10px;
}

@keyframes ibvia-pending-panel-highlight {
  0% {
    border-color: rgba(20, 184, 166, .8);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .18), var(--soft-shadow);
  }
  100% {
    box-shadow: var(--soft-shadow);
  }
}
.pending-action {
  width: 100%;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.pending-action:hover {
  border-color: rgba(217, 119, 6, .6);
  background: #fef3c7;
}
.pending-solution-card {
  border-color: rgba(217, 119, 6, .35);
}
.solution-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.pending-item span {
  color: var(--muted);
}
.wound-ops-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 14px;
}
.conduct-panel {
  border-color: rgba(15, 118, 110, .28);
  background: #f0fdfa;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.danger-outline {
  border-color: rgba(220, 38, 38, .38);
}
.specialist-action {
  border-color: rgba(217, 119, 6, .38);
}
.specialist-contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  align-items: center;
  gap: 16px;
  border-color: rgba(37, 99, 235, .22);
  background: #eff6ff;
}
.specialist-contact-panel h3,
.specialist-contact-panel p {
  margin-bottom: 0;
}
.specialist-contact-button {
  min-height: 52px;
}
.bottom-nav {
  position: fixed;
  left: 260px;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 6px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 -12px 28px rgba(15, 23, 42, .08);
}
.bottom-nav button {
  flex: 1 1 0;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}
.bottom-nav button:hover,
.bottom-nav button.active {
  background: var(--panel-2);
  color: var(--teal);
}
.bottom-nav button:disabled {
  cursor: default;
  opacity: .45;
}
.photo-future-note {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 12px;
  color: var(--muted);
  background: #f8fafc;
}
.pill.evolution.melhorando { color: #166534; border-color: rgba(22, 163, 74, .28); background: #f0fdf4; }
.pill.evolution.estavel { color: #1d4ed8; border-color: rgba(37, 99, 235, .26); background: #eff6ff; }
.pill.evolution.piorando { color: #991b1b; border-color: rgba(220, 38, 38, .32); background: #fef2f2; }
.pill.evolution.semAvaliacao { color: var(--muted); }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text);
}
.check-option input {
  width: auto;
  min-width: 16px;
  padding: 0;
}
.area-output {
  min-height: 45px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  padding: 12px 14px;
}
.alert-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.alert-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  border: 1px solid rgba(217, 119, 6, .35);
  color: #92400e;
  background: #fffbeb;
}
.ok-soft {
  border-color: rgba(22, 163, 74, .25);
  color: #166534;
  background: #f0fdf4;
}
.wound-detail-list {
  display: grid;
  gap: 12px;
}
.wound-detail-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 14px;
}
.wound-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.clinical-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.clinical-facts span {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--muted);
  background: #ffffff;
}
.empty {
  text-align: center;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--soft-shadow);
}
.info-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  padding: 12px 14px;
}
.ghost.compact {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.login-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}
.qr-login-trigger {
  width: 100%;
}
.web-pairing-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.web-pairing-card h2 {
  margin-bottom: 0;
  font-size: 20px;
}
.qr-code-box {
  display: grid;
  place-items: center;
  width: min(280px, 100%);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}
.qr-code-box svg {
  width: 100%;
  height: auto;
  display: block;
}
.qr-expiry {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.qr-connect-button {
  white-space: nowrap;
}
.qr-scanner-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .42);
}
.qr-scanner-modal {
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h2 {
  margin: 0;
  font-size: 20px;
}
.qr-camera-box {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: #0f172a;
}
.qr-camera-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qr-scan-frame {
  position: absolute;
  inset: 12%;
  border: 3px solid rgba(255, 255, 255, .88);
  border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(15, 23, 42, .24);
}
.qr-confirm-card {
  display: grid;
  gap: 4px;
  width: 100%;
  margin-top: 0;
  text-align: left;
}
.qr-confirm-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.qr-confirm-card strong {
  color: var(--text);
}
@media (max-width: 760px) {
  .page { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .main { padding: 18px 18px 104px; }
  .grid, .inline, .inline.three, .inline.four, .action-grid { grid-template-columns: 1fr; }
  .top { flex-direction: column; }
  .wound-card-head { flex-direction: column; }
  .detail-actions .ghost,
  .detail-actions .primary {
    width: 100%;
  }
  .detail-actions {
    grid-template-columns: 1fr;
  }
  .specialist-contact-panel {
    grid-template-columns: 1fr;
  }
  .solution-actions {
    grid-template-columns: 1fr;
  }
  .bottom-nav {
    left: 0;
    overflow-x: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  }
  .bottom-nav button {
    min-width: 86px;
    font-size: 13px;
  }
}

/* v3.3.1: refinamento mobile-first para experiência de app clínico. */
html,
body {
  overflow-x: hidden;
}
.main {
  padding-bottom: 28px;
}
.top {
  align-items: flex-start;
  margin-bottom: 14px;
}
.top h1 {
  margin-bottom: 4px;
  line-height: 1.08;
}
.top p {
  margin-bottom: 0;
  line-height: 1.35;
}
.sidebar .brand-mark {
  line-height: 1;
}
.sidebar .brand-logo {
  width: 93px;
}
.sidebar .brand-block {
  margin-bottom: 22px;
}
.panel {
  border-radius: 14px;
}
.ops-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}
.ops-counter {
  min-height: 92px;
  padding: 13px 14px;
}
.ops-counter strong {
  font-size: 28px;
}
.ops-counter span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.case-list {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.case-card {
  gap: 8px;
  border-radius: 16px;
  padding: 14px 15px 14px 16px;
}
.case-card-header,
.case-badges {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.case-badges {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.case-title {
  margin-bottom: 2px;
  line-height: 1.05;
}
.case-meta,
.case-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.case-line {
  font-size: 14px;
  line-height: 1.35;
}
.case-open {
  justify-self: start;
  min-height: 38px;
  padding: 9px 13px;
}
.photo-future-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px dashed rgba(15, 118, 110, .34);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--teal);
  background: #f0fdfa;
  font-size: 12px;
  font-weight: 800;
}
.ops-case {
  position: relative;
  border-left-width: 0;
  overflow: hidden;
}
.ops-case::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--green);
}
.ops-case.evo-estavel::before { background: var(--blue); }
.ops-case.warn::before,
.ops-case.critical::before { background: var(--amber); }
.ops-case.danger::before { background: var(--red); }
.ops-case.evo-piorando::before { background: var(--red); }
.ops-case.evo-semAvaliacao::before { background: #eab308; }
.ops-dates {
  gap: 6px;
}
.ops-dates span,
.pill,
.alert-chip {
  font-size: 12px;
  line-height: 1.2;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}
.detail-actions .ghost,
.detail-actions .primary,
.detail-actions .back-button {
  width: auto;
  min-width: 136px;
  min-height: 40px;
  padding: 9px 13px;
}
.wound-ops-card,
.ops-section,
.clinical-section,
.wound-detail-card {
  padding: 12px;
  border-radius: 14px;
}
.action-grid {
  gap: 8px;
}
.action-grid .ghost {
  min-height: 44px;
  padding: 10px 12px;
}
.timeline {
  gap: 8px;
}
.timeline-item {
  padding: 12px 14px;
  border-radius: 14px;
}
.bottom-nav {
  display: none;
}

@media (max-width: 760px) {
  body {
    background: var(--bg);
  }
  .page {
    display: block;
    min-height: 100vh;
  }
  .sidebar {
    display: none;
  }
  .main {
    max-width: none;
    padding: 12px 12px calc(74px + env(safe-area-inset-bottom));
  }
  .top {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
  }
  .top h1 {
    font-size: 24px;
    letter-spacing: 0;
  }
  .top p,
  .muted {
    font-size: 14px;
  }
  .top .ghost {
    min-width: 64px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 10px;
  }
  .brand-logo {
    width: 128px;
  }
  .brand-block p {
    font-size: 11px;
  }
  h2 {
    font-size: 19px;
  }
  h3 {
    font-size: 16px;
  }
  .grid {
    gap: 8px;
  }
  .panel {
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  }
  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 8px;
    margin-bottom: 10px;
  }
  .toolbar label {
    min-width: 0;
  }
  .toolbar button {
    min-height: 38px;
    padding: 8px 10px;
  }
  .ops-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }
  .ops-counter {
    min-height: 74px;
    padding: 10px 8px;
    border-radius: 14px;
    text-align: center;
  }
  .ops-counter strong {
    font-size: 25px;
  }
  .ops-counter span {
    font-size: 12px;
  }
  .case-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .case-card {
    padding: 12px 12px 12px 14px;
    gap: 7px;
  }
  .case-kicker {
    font-size: 11px;
    margin-bottom: 2px;
  }
  .case-title {
    font-size: 22px;
  }
  .case-line {
    font-size: 13.5px;
  }
  .case-summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .case-open {
    min-height: 36px;
  }
  .photo-thumb,
  .photo-placeholder {
    min-height: 118px;
  }
  .photo-thumb img {
    height: 126px;
  }
  input,
  select,
  textarea {
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 10px;
  }
  textarea {
    min-height: 72px;
  }
  .primary,
  .ghost,
  .danger {
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 10px;
  }
  .actions-row {
    gap: 8px;
  }
  .detail-actions {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
  .detail-actions .ghost,
  .detail-actions .primary,
  .detail-actions .back-button {
    width: auto;
    min-width: 132px;
    flex: 0 0 auto;
  }
  .case-detail-grid,
  .back-button {
    margin-bottom: 10px;
  }
  .wound-detail-list,
  .wound-ops-card {
    gap: 8px;
  }
  .wound-card-head {
    flex-direction: row;
    align-items: flex-start;
  }
  .conduct-panel,
  .pending-panel,
  .specialist-contact-panel,
  .action-panel {
    margin-top: 10px;
  }
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .action-grid .ghost {
    min-height: 54px;
    font-size: 13px;
  }
  .specialist-contact-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .specialist-contact-button {
    min-height: 42px;
    justify-self: start;
  }
  .timeline-item p {
    font-size: 13px;
  }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: stretch;
    gap: 4px;
    overflow-x: hidden;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .08);
  }
  .bottom-nav button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    padding: 6px 4px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .ops-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toolbar {
    grid-template-columns: 1fr;
  }
}

/* Base visual clara inspirada no mockup aprovado. */
:root {
  --bg: #f7fafb;
  --panel: #ffffff;
  --panel-2: #effafa;
  --line: #e6edf1;
  --text: #121826;
  --muted: #667085;
  --teal: #009b99;
  --teal-dark: #087f7c;
  --violet: #7348f4;
  --blue: #2563eb;
  --red: #ef233c;
  --green: #38b56b;
  --amber: #f97316;
  --yellow: #f4c20d;
  --kpi-improving-color: #2f8f5e;
  --kpi-stable-color: #3f6fb5;
  --kpi-worsening-color: #c44e5b;
  --kpi-unassessed-color: #64748b;
  --kpi-overdue-color: #c2672a;
  --kpi-improving-bg: rgba(47, 143, 94, .12);
  --kpi-stable-bg: rgba(63, 111, 181, .11);
  --kpi-worsening-bg: rgba(196, 78, 91, .10);
  --kpi-unassessed-bg: rgba(100, 116, 139, .12);
  --kpi-overdue-bg: rgba(194, 103, 42, .12);
  --kpi-improving-ring: rgba(47, 143, 94, .18);
  --kpi-stable-ring: rgba(63, 111, 181, .16);
  --kpi-worsening-ring: rgba(196, 78, 91, .16);
  --kpi-unassessed-ring: rgba(100, 116, 139, .18);
  --kpi-overdue-ring: rgba(194, 103, 42, .18);
  --soft-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}
body {
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 155, 153, .1), transparent 28%),
    linear-gradient(180deg, #fbfdfe 0%, #f4f8fa 100%);
}
.page {
  grid-template-columns: 238px minmax(0, 1fr);
}
.main {
  max-width: 1120px;
  padding: 24px 26px 32px;
}
.mobile-app-header {
  display: none;
}
.brand-mark {
  line-height: .92;
}
.brand-block {
  justify-items: center;
  text-align: center;
}
.brand-block p {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255, 255, 255, .86);
  border-right: 1px solid rgba(226, 232, 240, .9);
  backdrop-filter: blur(16px);
}
.nav {
  gap: 10px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 14px;
  color: #475467;
}
.nav button.active,
.nav button:hover {
  background: #e8f8f7;
  color: var(--teal-dark);
}
.ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.top {
  margin-bottom: 14px;
}
.top h1 {
  font-size: 27px;
  font-weight: 860;
}
.top .muted {
  color: #586174;
}
.panel,
.case-card,
.ops-counter,
.timeline-item,
.login-card,
.info-card {
  border-color: rgba(226, 232, 240, .95);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}
.ops-dashboard {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.ops-counter {
  position: relative;
  min-height: 104px;
  align-content: center;
  justify-items: center;
  text-align: center;
  border-radius: 18px;
  padding: 14px 10px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.ops-counter:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, .24);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .09);
}
.ops-counter:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .28);
  outline-offset: 2px;
}
.ops-counter.active {
  border-color: rgba(15, 118, 110, .42);
  background: #eefcf9;
  box-shadow: 0 14px 34px rgba(15, 118, 110, .14);
}
.ops-counter.active::after {
  content: "Filtro ativo";
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--kpi-improving-color);
  background: var(--kpi-improving-bg);
  box-shadow: inset 0 0 0 1px var(--kpi-improving-ring);
}
.ops-counter.stable .metric-icon { color: var(--kpi-stable-color); background: var(--kpi-stable-bg); box-shadow: inset 0 0 0 1px var(--kpi-stable-ring); }
.ops-counter.bad .metric-icon { color: var(--kpi-worsening-color); background: var(--kpi-worsening-bg); box-shadow: inset 0 0 0 1px var(--kpi-worsening-ring); }
.ops-counter.warn .metric-icon { color: var(--kpi-overdue-color); background: var(--kpi-overdue-bg); box-shadow: inset 0 0 0 1px var(--kpi-overdue-ring); }
.ops-counter.neutral .metric-icon { color: var(--kpi-unassessed-color); background: var(--kpi-unassessed-bg); box-shadow: inset 0 0 0 1px var(--kpi-unassessed-ring); }
.ops-counter strong {
  margin-top: 2px;
  font-size: 29px;
  font-weight: 880;
}
.toolbar {
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}
.toolbar label {
  color: #344054;
  font-weight: 760;
}
.toolbar select,
.toolbar input,
.toolbar .internal-select-trigger {
  min-height: 42px;
  border-radius: 999px;
  background: #ffffff;
}
.case-list {
  grid-template-columns: 1fr;
  gap: 10px;
}
.case-card {
  grid-template-columns: minmax(0, 1fr) minmax(132px, 164px);
  align-items: center;
  column-gap: 12px;
  border-radius: 18px;
  padding: 14px 14px 14px 18px;
}
.case-card-main {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.case-avatar {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid rgba(0, 155, 153, .22);
  background: #dff7f4;
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 870;
}
.case-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}
.case-card-copy {
  min-width: 0;
}
.case-card-header {
  align-items: center;
}
.case-title {
  color: #111827;
  font-size: 18px;
  font-weight: 860;
}
.case-meta {
  color: #475467;
}
.case-line,
.case-summary {
  margin: 4px 0 0;
}
.case-badges {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: grid;
  justify-items: start;
  min-width: 126px;
}
.case-open {
  grid-column: 2;
  justify-self: stretch;
  color: var(--teal-dark);
  font-weight: 850;
}
.ops-dates {
  grid-column: 2;
  grid-row: 2;
}
.alert-row {
  grid-column: 1 / -1;
}
.case-summary {
  grid-column: 1 / -1;
}
.case-card-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 2px;
}
.my-shift-button,
.my-shift-filter-button,
.my-shift-end-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, .22);
  background: #ffffff;
  color: var(--teal-dark);
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}
.my-shift-button {
  padding: 9px 13px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}
.my-shift-button .ui-icon,
.my-shift-filter-button .ui-icon,
.my-shift-end-button .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.my-shift-button.active,
.my-shift-filter-button.active {
  border-color: rgba(180, 83, 9, .42);
  background: #fffbeb;
  color: #92400e;
}
.my-shift-button.active .ui-icon,
.my-shift-filter-button.active .ui-icon {
  fill: currentColor;
}
.my-shift-button:focus-visible,
.my-shift-filter-button:focus-visible,
.my-shift-end-button:focus-visible {
  outline: 3px solid rgba(20, 184, 166, .34);
  outline-offset: 2px;
}
.my-shift-button.detail {
  min-width: 190px;
}
.my-shift-empty {
  display: grid;
  gap: 10px;
}
.my-shift-empty .ghost {
  width: fit-content;
  min-height: 44px;
}
.compact-toolbar .my-shift-filter-button {
  min-height: 42px;
  padding: 0 14px;
}
.compact-toolbar .my-shift-end-button {
  min-height: 42px;
  padding: 0 14px;
}
.my-shift-sync-status {
  margin: -2px 0 12px;
  color: #667085;
  font-size: 12px;
  font-weight: 720;
}
.my-shift-sync-status.warn {
  color: #9f1239;
}
.case-open {
  grid-row: 3;
}
.ops-case::before {
  width: 4px;
  border-radius: 18px 0 0 18px;
}
.pill,
.alert-chip,
.photo-future-chip,
.photo-empty-chip,
.ops-dates span {
  border-radius: 999px;
  font-weight: 760;
}
.pill.evolution.melhorando,
.pill.evolution.estavel,
.pill.evolution.piorando,
.pill.evolution.semAvaliacao {
  gap: 4px;
}
.photo-future-chip {
  gap: 5px;
}
.photo-future-chip .ui-icon {
  width: 15px;
  height: 15px;
}
.photo-empty-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px dashed rgba(100, 116, 139, .26);
  background: #f8fafc;
  color: var(--muted);
  padding: 7px 10px;
  font-size: .82rem;
}
.photo-empty-chip .ui-icon {
  width: 15px;
  height: 15px;
}
.wound-selector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.wound-selector-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 850;
}
.wound-selector-chip.active {
  border-color: rgba(15, 118, 110, .42);
  background: #e9fbf8;
  color: var(--teal);
}
.case-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-radius: 20px;
  margin-bottom: 12px;
}
.case-hero h2 {
  margin-bottom: 4px;
  font-size: 22px;
}
.case-hero .pill {
  align-self: start;
}
.case-identity,
.conduct-panel,
.pending-panel,
.action-panel,
.specialist-contact-panel {
  border-radius: 18px;
}
.conduct-panel {
  background: #f0fdfa;
}
.pending-resolution-main {
  margin: 10px 0 12px;
}
.pending-resolution-main .primary {
  width: 100%;
  justify-content: center;
}
.pending-item {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  background: #fffaf0;
}
.pending-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--amber);
  background: #fff7ed;
}
.pending-item b,
.pending-item small {
  display: block;
}
.pending-item small {
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}
.pending-resolution-form {
  display: grid;
  gap: 16px;
  max-height: min(78vh, 760px);
  overflow: auto;
  padding-right: 2px;
}
.pending-resolution-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.pending-resolution-section h3 {
  margin: 2px 0 4px;
  font-size: 1rem;
}
.pending-current-list,
.pending-current-conduct,
.case-admin-confirm-summary {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 12px;
  background: #fff;
}
.pending-current-list ul {
  margin: 0;
  padding-left: 18px;
}
.pending-current-conduct p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.pending-conduct-review {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed rgba(15, 118, 110, .28);
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 760;
  line-height: 1.35;
}
.check-row input {
  width: auto;
  margin-top: 3px;
}
.case-admin-confirm-dialog {
  display: grid;
  gap: 14px;
}
.case-admin-confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--amber);
  background: #fff7ed;
}
.case-admin-confirm-summary span {
  color: var(--muted);
  line-height: 1.35;
}
.case-admin-confirm-summary b {
  color: var(--text);
}
.case-admin-confirm-check {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, .28);
}
.primary.admin-attention {
  background: var(--amber);
}
.action-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: left;
}
.action-button.active {
  border-color: rgba(15, 118, 110, .4);
  background: #e9fbf8;
  color: var(--teal);
  box-shadow: 0 12px 26px rgba(15, 118, 110, .12);
}
.action-button small {
  color: var(--muted);
  font-weight: 760;
}
.quick-action-panel {
  display: grid;
  gap: 14px;
  border-color: rgba(15, 118, 110, .18);
  background: #fbfefd;
}
.quick-action-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.quick-action-head h3 {
  margin: 2px 0 4px;
}
.quick-action-form {
  display: grid;
  gap: 12px;
}
.quick-evolve-body {
  display: grid;
  gap: 12px;
}
.segmented-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.segmented-options label {
  min-width: 0;
}
.segmented-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented-options span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  font-size: .88rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}
.segmented-options input:checked + span {
  border-color: rgba(15, 118, 110, .46);
  background: #e9fbf8;
  color: var(--teal);
  box-shadow: 0 8px 18px rgba(15, 118, 110, .12);
}
.segmented-options input:focus-visible + span {
  outline: 3px solid rgba(15, 118, 110, .18);
  outline-offset: 2px;
}
.segmented-options input:disabled + span {
  cursor: not-allowed;
  opacity: .62;
}
.conduct-evolution-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.specialist-adherence-fields {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px;
}
.specialist-adherence-fields h4 {
  margin: 2px 0 4px;
  font-size: .98rem;
}
.specialist-adherence-details {
  display: grid;
  gap: 10px;
}
.specialist-adherence-details[hidden] {
  display: none;
}
.field-feedback {
  display: block;
  margin-top: 4px;
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.25;
}
.field-feedback.warn {
  color: #9a3412;
}
.quick-evolve-evolution-feedback {
  margin-top: -4px;
}
.case-card-specialist-notice {
  width: fit-content;
  margin: 4px 0 0;
  border: 1px solid rgba(217, 119, 6, .26);
  border-radius: 999px;
  background: #fffaf0;
  color: #92400e;
  padding: 4px 9px;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: uppercase;
}
.specialist-requests-panel {
  display: grid;
  gap: 14px;
  border-color: rgba(37, 99, 235, .2);
}
.specialist-requests-head,
.specialist-request-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.specialist-request-list {
  display: grid;
  gap: 10px;
}
.specialist-request-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.specialist-request-card h3 {
  margin: 6px 0 2px;
}
.specialist-request-card p {
  margin: 5px 0 0;
}
.specialist-request-context {
  display: grid;
  gap: 4px;
}
.specialist-request-context span,
.specialist-request-context small {
  color: var(--muted);
}
.specialist-orientation-highlight {
  display: grid;
  gap: 10px;
  border-color: rgba(37, 99, 235, .24);
  background: #f8fbff;
}
.specialist-orientation-highlight.new {
  border-color: rgba(217, 119, 6, .32);
  background: #fffaf0;
}
.specialist-orientation-highlight h3 {
  margin: 2px 0 4px;
}
.specialist-orientation-highlight > p {
  margin: 0;
}
.specialist-orientation-highlight.audit {
  background: #fbfefd;
}
.specialist-audit-list {
  display: grid;
  gap: 8px;
}
.specialist-audit-list article {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  font-size: .88rem;
}
.specialist-audit-list span {
  color: var(--muted);
}
.specialist-ack-dialog {
  gap: 14px;
}
.specialist-orientation-text {
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  line-height: 1.45;
}
.quick-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sr-only-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.photo-future-note {
  display: flex;
  align-items: center;
  gap: 10px;
}
.photo-upload-box {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  padding: 14px;
}
.photo-upload-box h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 1rem;
}
.photo-file-control {
  display: grid;
  gap: 8px;
  border: 1px dashed rgba(15, 118, 110, .36);
  border-radius: 14px;
  background: #ecfeff;
  color: var(--teal);
  font-weight: 850;
  padding: 12px;
  cursor: pointer;
}
.photo-file-control input {
  width: 100%;
  font-size: .9rem;
}
.photo-draft-preview-area {
  min-height: 44px;
}
.photo-draft-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 820;
}
.photo-draft-limit,
.photo-draft-error {
  color: #b45309;
}
.photo-draft-list {
  display: grid;
  gap: 10px;
}
.photo-draft-hint {
  margin: 8px 0 0;
}
.initial-photo-box {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed rgba(15, 118, 110, .28);
  border-radius: 16px;
  background: #f8fffe;
}
.choice-field {
  display: grid;
  gap: 9px;
  margin: 4px 0 12px;
}
.choice-label {
  color: var(--ink);
  font-size: .86rem;
  font-weight: 850;
}
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice-collapsible {
  gap: 8px;
}
.choice-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.choice-toggle:hover {
  border-color: rgba(15, 118, 110, .28);
  background: #f8fffe;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .08);
}
.choice-toggle:focus-visible {
  outline: 3px solid rgba(15, 118, 110, .18);
  outline-offset: 2px;
  border-color: rgba(15, 118, 110, .52);
}
.choice-toggle:disabled {
  cursor: not-allowed;
  opacity: .64;
}
.choice-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.choice-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  transition: transform .16s ease;
}
.choice-collapsible.expanded .choice-toggle-icon {
  transform: rotate(180deg);
}
.choice-grid-collapsible {
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}
.choice-grid-collapsible[hidden] {
  display: none;
}
.choice-grid-collapsible .choice-chip {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  padding: 9px 10px;
  font-weight: 400;
  text-align: left;
}
.choice-grid-collapsible .choice-chip:hover,
.choice-grid-collapsible .choice-chip:focus-visible {
  background: #f8fffe;
  border-color: rgba(15, 118, 110, .24);
}
.choice-grid-collapsible .choice-chip.selected {
  box-shadow: none;
  font-weight: 400;
}
.wound-lp-classification {
  margin: 3px 0 0;
}
.choice-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}
.choice-chip.selected {
  border-color: rgba(15, 118, 110, .42);
  color: var(--teal);
  background: #e9fbf8;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .12);
}
.choice-chip.good.selected { color: var(--green); background: #ecfdf3; border-color: rgba(34, 197, 94, .38); }
.choice-chip.stable.selected { color: var(--blue); background: #eff6ff; border-color: rgba(37, 99, 235, .35); }
.choice-chip.bad.selected { color: var(--red); background: #fff1f2; border-color: rgba(225, 29, 72, .35); }
.choice-chip.warn.selected { color: var(--amber); background: #fff7ed; border-color: rgba(245, 158, 11, .42); }
.choice-chip.neutral.selected { color: var(--muted); background: #f8fafc; }
.wound-create-section {
  position: relative;
}
.wound-create-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.add-wound-inline {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  margin: 6px 0 12px;
  border-style: dashed;
}
.photo-draft {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}
.photo-draft.loading {
  display: block;
  color: var(--muted);
  font-weight: 800;
}
.photo-draft-preview {
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}
.photo-draft-preview.placeholder {
  width: 108px;
  height: 86px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.photo-draft-preview img {
  display: block;
  width: 108px;
  height: 86px;
  object-fit: cover;
}
.photo-draft b,
.photo-draft span {
  display: block;
}
.photo-draft span {
  color: var(--muted);
  margin: 2px 0 8px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}
.wound-photo-area {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
}
.wound-photo-main {
  display: grid;
  grid-template-columns: minmax(112px, 160px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.wound-photo-main b,
.wound-photo-main span {
  display: block;
}
.wound-photo-main span {
  color: var(--muted);
  font-weight: 760;
  margin-top: 2px;
}
.photos-panel {
  background: #ffffff;
}
.photo-empty {
  border: 1px dashed rgba(100, 116, 139, .28);
  border-radius: 16px;
  color: var(--muted);
  font-weight: 760;
  padding: 18px;
  text-align: center;
}
.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}
.photo-strip-item {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  color: #334155;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}
.photo-strip-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #e2e8f0;
}
.photo-strip-item span {
  display: -webkit-box;
  min-height: 2.4em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: .82rem;
}
.wound-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wound-photo-actions .ghost {
  min-height: 38px;
}
.photo-confirm-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 16px;
  background: #ecfeff;
}
.photo-confirm-panel h4 {
  margin: 0;
  font-size: 1rem;
}
.photo-confirm-panel textarea {
  min-height: 70px;
}
.event-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.event-photo-thumb {
  width: 74px;
  height: 74px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
}
.event-photo-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  background: rgba(15, 23, 42, .86);
}
.photo-viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
}
.photo-viewer-img {
  max-width: min(100%, 1100px);
  max-height: calc(100vh - 164px);
  justify-self: center;
  align-self: center;
  border-radius: 18px;
  object-fit: contain;
  background: #0f172a;
}
.photo-viewer-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: min(100%, 760px);
  justify-self: center;
  overflow-x: auto;
  padding: 4px;
}
.photo-viewer-thumbs button {
  width: 68px;
  height: 54px;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.16);
  cursor: pointer;
}
.photo-viewer-thumbs button.active {
  border-color: var(--teal);
}
.photo-viewer-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wound-ops-card.active {
  border-color: rgba(15, 118, 110, .5);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .12);
}
.timeline-item {
  position: relative;
  border-left-color: var(--teal);
}
.login-card {
  border-radius: 24px;
}
.login-card .brand-block {
  justify-items: center;
  width: 100%;
  margin-bottom: 18px;
}
.login-card .brand-mark {
  line-height: 1;
}
.login-card .brand-logo {
  width: 220px;
}
.login-card input {
  min-height: 48px;
}
.login-card .primary {
  min-height: 48px;
  border-radius: 12px;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .ops-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .photo-draft {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .photo-draft-preview img {
    width: 88px;
    height: 72px;
  }
  .photo-viewer {
    padding: 12px;
  }
  .photo-viewer-img {
    max-height: calc(100vh - 140px);
    border-radius: 14px;
  }
  .mobile-app-header {
    display: flex;
    justify-content: center;
    padding: 8px 12px 2px;
  }
  .mobile-app-header .brand-block {
    justify-items: center;
    text-align: center;
    gap: 2px;
  }
  .mobile-app-header .brand-mark {
    line-height: 1;
  }
  .mobile-app-header .brand-logo {
    width: 154px;
  }
  .mobile-app-header .brand-block p {
    width: 100%;
    max-width: 154px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
  }
  .main {
    padding-top: 6px;
  }
  .top h1 {
    font-size: 22px;
  }
  .top .muted {
    font-size: 13px;
  }
  .ops-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ops-counter {
    min-height: 76px;
    padding: 8px 6px;
  }
  .metric-icon {
    width: 24px;
    height: 24px;
  }
  .metric-icon .ui-icon {
    width: 15px;
    height: 15px;
  }
  .case-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 12px 12px 16px;
  }
  .case-card-main {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
  }
  .case-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  .case-badges,
  .ops-dates,
  .case-open {
    grid-column: auto;
    grid-row: auto;
  }
  .case-badges {
    display: flex;
    justify-items: start;
    min-width: 0;
  }
  .case-card-actions {
    justify-content: stretch;
  }
  .my-shift-button.card,
  .my-shift-button.detail,
  .my-shift-end-button,
  .my-shift-empty .ghost {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  .case-open {
    justify-self: start;
  }
  .case-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
  }
  .case-hero .pill {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .case-hero h2 {
    font-size: 19px;
  }
  .bottom-nav button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
  }
  .bottom-nav .ui-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 430px) {
  .ops-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ops-counter span {
    font-size: 11px;
  }
  .ops-counter strong {
    font-size: 22px;
  }
}

/* Ajustes visuais de logo, painel e navegação. */
.brand-button {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.brand-block p {
  color: #07827f;
  font-size: 11px;
  font-weight: 780;
  line-height: 1.08;
  text-align: center;
  width: 100%;
}
svg.ui-icon,
.ui-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  fill: none !important;
  stroke: currentColor !important;
  color: currentColor;
}
.nav button {
  color: #5f6b7a;
}
.nav button .ui-icon {
  color: #667085;
  stroke-width: 1.85;
}
.nav button.active .ui-icon,
.nav button:hover .ui-icon {
  color: var(--teal-dark);
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.overview-card {
  display: grid;
  gap: 6px;
  align-content: center;
  justify-items: start;
  min-height: 116px;
}
.overview-card strong {
  font-size: 30px;
  line-height: 1;
  color: var(--teal-dark);
}
.overview-card .metric-icon {
  color: var(--kpi-improving-color);
  background: var(--kpi-improving-bg);
  box-shadow: inset 0 0 0 1px var(--kpi-improving-ring);
}
.overview-card.bad .metric-icon {
  color: var(--kpi-worsening-color);
  background: var(--kpi-worsening-bg);
  box-shadow: inset 0 0 0 1px var(--kpi-worsening-ring);
}
.overview-card.warn .metric-icon {
  color: var(--kpi-overdue-color);
  background: var(--kpi-overdue-bg);
  box-shadow: inset 0 0 0 1px var(--kpi-overdue-ring);
}
.overview-card.neutral .metric-icon,
.overview-card .metric-icon.neutral {
  color: var(--kpi-unassessed-color);
  background: var(--kpi-unassessed-bg);
  box-shadow: inset 0 0 0 1px var(--kpi-unassessed-ring);
}
.overview-card.bad strong { color: var(--red); }
.overview-card.warn strong { color: var(--amber); }
.overview-card.neutral strong { color: var(--muted); }
.overview-card > span:last-child {
  color: var(--muted);
  font-weight: 780;
}
.overview-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.overview-actions h2,
.overview-actions p {
  margin-bottom: 0;
}
.overview-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.overview-buttons button,
.compact-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.session-strip {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  min-height: 70px;
  padding: 12px 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.session-strip > div {
  min-width: 0;
  align-self: center;
}
.session-strip b,
.session-strip span {
  display: block;
}
.session-strip b {
  color: var(--text);
}
.session-avatar {
  width: 42px;
  height: 42px;
  font-size: 15px;
  align-self: center;
}
.compact-toolbar {
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto auto auto auto;
  gap: 9px;
}
.scope-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px);
  align-items: end;
  margin-bottom: 12px;
}
.compact-toolbar.with-institution-filter {
  grid-template-columns: minmax(220px, 1.25fr) minmax(150px, .85fr) minmax(150px, .85fr) auto auto auto auto;
}
.compact-toolbar .filter-field {
  gap: 4px;
}
.filter-select-field {
  min-width: 0;
}
.compact-toolbar .filter-field > span {
  color: #344054;
  font-size: 13px;
  font-weight: 820;
}
.compact-toolbar select,
.scope-toolbar select,
.compact-toolbar .internal-select-trigger,
.scope-toolbar .internal-select-trigger,
.filter-summary {
  min-height: 44px;
  padding: 8px 14px;
}
.filter-select-field select,
.filter-select-field .internal-select-trigger {
  appearance: auto;
  cursor: pointer;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.institution-filter-trigger {
  appearance: none;
  min-height: 44px;
  text-align: left;
}
.filter-menu-field {
  position: relative;
  min-width: 0;
}
.filter-menu {
  position: relative;
  width: 100%;
}
.filter-menu summary {
  list-style: none;
}
.filter-menu summary::-webkit-details-marker {
  display: none;
}
.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 820;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.filter-summary span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  z-index: 60;
  display: grid;
  gap: 4px;
  width: max-content;
  min-width: max(100%, 220px);
  max-height: min(360px, 64vh);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(15, 118, 110, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}
.filter-menu-field:first-child .filter-options {
  min-width: max(100%, 310px);
}
.institution-filter .filter-options {
  min-width: max(100%, 340px);
}
.filter-options button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: #344054;
  text-align: left;
  white-space: normal;
  font-weight: 760;
  cursor: pointer;
}
.filter-options button:hover,
.filter-options button.selected {
  background: #e8f7f4;
  color: var(--teal);
}
.institution-filter-dialog {
  gap: 18px;
}
.institution-dialog-options {
  display: grid;
  gap: 8px;
}
.institution-dialog-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-weight: 820;
}
.institution-dialog-option:hover,
.institution-dialog-option:focus-visible,
.institution-dialog-option.selected {
  border-color: rgba(15, 118, 110, .34);
  background: var(--panel-2);
  color: var(--teal);
  outline: none;
}
.institution-option-check {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(15, 118, 110, .1);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}
.refresh-button {
  min-width: 44px;
}
.new-case-button {
  min-width: 132px;
}
.case-card {
  min-height: 0;
}
.case-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.case-open {
  min-height: 38px;
  padding: 8px 12px;
}
.case-identity {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}
.identity-compact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.identity-compact-head h3 {
  margin: 2px 0 3px;
  font-size: 18px;
  line-height: 1.18;
}
.identity-compact-head .muted {
  margin: 0;
  line-height: 1.32;
}
.identity-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.identity-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 6px 10px;
  font-size: .84rem;
  line-height: 1.2;
}
.identity-chip b {
  color: var(--ink);
  margin-right: 4px;
}
.case-wound-summary {
  margin-top: 6px;
}
.case-wound-chip {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .mobile-app-header .brand-mark {
    line-height: 1;
  }
  .mobile-app-header .brand-logo {
    width: 154px;
  }
  .mobile-app-header .brand-block p {
    width: 100%;
    max-width: 154px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.08;
    white-space: nowrap;
  }
  .main {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }
  .top {
    margin-bottom: 8px;
  }
  .top h1 {
    font-size: 21px;
  }
  .top .ghost {
    min-height: 34px;
    padding: 7px 11px;
  }
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .overview-card {
    min-height: 82px;
    padding: 10px;
  }
  .overview-card strong {
    font-size: 24px;
  }
  .overview-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .overview-buttons {
    justify-content: stretch;
  }
  .overview-buttons button {
    flex: 1 1 0;
    min-height: 40px;
  }
  .session-strip {
    margin-bottom: 10px;
  }
  .ops-dashboard {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }
  .ops-counter {
    min-height: 64px;
    padding: 7px 4px;
    border-radius: 14px;
  }
  .ops-counter strong {
    font-size: 20px;
  }
  .ops-counter span {
    font-size: 10px;
    line-height: 1.05;
  }
  .metric-icon {
    width: 22px;
    height: 22px;
  }
  .compact-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
  }
  .scope-toolbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
  }
  .compact-toolbar .filter-field {
    min-width: 0;
  }
  .compact-toolbar .filter-field > span {
    font-size: 11px;
  }
  .compact-toolbar select,
  .scope-toolbar select,
  .compact-toolbar .internal-select-trigger,
  .scope-toolbar .internal-select-trigger,
  .filter-summary {
    min-height: 44px;
    padding: 7px 10px;
    font-size: 14px;
  }
  .filter-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    width: max-content;
    min-width: max(100%, 190px);
    max-width: calc(100vw - 32px);
    max-height: 46vh;
    border-radius: 16px;
    padding: 8px;
  }
  .compact-toolbar.with-institution-filter .institution-filter .filter-options {
    width: 100%;
    min-width: 0;
  }
  .filter-options button {
    min-height: 44px;
    font-size: 15px;
  }
  .refresh-button {
    min-width: 0;
    width: 100%;
    min-height: 38px;
    padding: 0;
  }
  .refresh-button span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .new-case-button {
    grid-column: auto;
    min-height: 40px;
  }
  .compact-toolbar.with-institution-filter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .compact-toolbar.with-institution-filter .institution-filter {
    grid-column: 1 / -1;
  }
  .compact-toolbar.with-institution-filter .refresh-button {
    grid-column: 1 / 2;
    width: 100%;
  }
  .compact-toolbar.with-institution-filter .refresh-button span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }
  .compact-toolbar.with-institution-filter .new-case-button {
    grid-column: 2 / 3;
  }
  .case-list {
    padding-bottom: 76px;
  }
  .case-card {
    gap: 6px;
    padding: 11px 11px 11px 15px;
  }
  .case-title {
    font-size: 20px;
  }
  .case-line {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }
  .case-summary {
    -webkit-line-clamp: 1;
  }
  .case-open {
    min-height: 36px;
    margin-top: 2px;
  }
  .case-identity {
    gap: 8px;
    padding: 12px 14px;
  }
  .identity-compact-head h3 {
    font-size: 17px;
  }
  .identity-chip-row {
    gap: 6px;
  }
  .identity-chip {
    min-height: 28px;
    padding: 5px 8px;
    font-size: .78rem;
  }
  .wound-ops-card {
    padding: 11px;
  }
  .bottom-nav {
    padding-bottom: calc(9px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 430px) {
  .ops-dashboard {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .ops-counter span {
    font-size: 9.5px;
  }
  .ops-counter strong {
    font-size: 19px;
  }
}

/* v3.3.4: ícones mais leves e menos saturados. */
.nav button .ui-icon,
.bottom-nav button .ui-icon {
  color: #8b96a8;
  stroke-width: 1.75;
}
.nav button.active .ui-icon,
.nav button:hover .ui-icon,
.bottom-nav button.active .ui-icon,
.bottom-nav button:hover .ui-icon {
  color: #0c9a96;
}
.ops-counter .metric-icon {
  background: var(--kpi-improving-bg);
  color: var(--kpi-improving-color);
  box-shadow: inset 0 0 0 1px var(--kpi-improving-ring);
}
.metric-icon .ui-icon,
.ops-counter .metric-icon .ui-icon {
  stroke-width: 1.75;
  color: currentColor;
  opacity: .78;
}
.ops-counter.stable .metric-icon {
  background: var(--kpi-stable-bg);
  color: var(--kpi-stable-color);
  box-shadow: inset 0 0 0 1px var(--kpi-stable-ring);
}
.ops-counter.bad .metric-icon {
  background: var(--kpi-worsening-bg);
  color: var(--kpi-worsening-color);
  box-shadow: inset 0 0 0 1px var(--kpi-worsening-ring);
}
.ops-counter.warn .metric-icon {
  background: var(--kpi-overdue-bg);
  color: var(--kpi-overdue-color);
  box-shadow: inset 0 0 0 1px var(--kpi-overdue-ring);
}
.ops-counter.neutral .metric-icon {
  background: var(--kpi-unassessed-bg);
  color: var(--kpi-unassessed-color);
  box-shadow: inset 0 0 0 1px var(--kpi-unassessed-ring);
}

/* v3.3.4: símbolo registrado legível e próximo à marca. */
.case-avatar,
.session-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.case-avatar .avatar-text,
.session-avatar .avatar-text {
  position: absolute;
  inset: 0;
  display: grid !important;
  place-items: center;
  line-height: 1;
  transform: translateY(0);
  width: 100%;
  height: 100%;
  text-align: center;
  pointer-events: none;
}
.session-avatar {
  letter-spacing: 0;
}

/* v3.3.4: alinhamento da barra de ações no detalhe do caso. */
.actions-row.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 10px 0 14px;
}
.actions-row.detail-actions .ghost,
.actions-row.detail-actions .primary,
.actions-row.detail-actions .back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 146px;
  min-height: 42px;
  height: 42px;
  margin: 0;
  padding: 0 15px;
  line-height: 1;
  border-radius: 11px;
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 520px) {
  .actions-row.detail-actions {
    gap: 8px;
    margin-top: 8px;
  }
  .actions-row.detail-actions .ghost,
  .actions-row.detail-actions .primary,
  .actions-row.detail-actions .back-button {
    min-width: 0;
    flex: 1 1 0;
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    font-size: 14px;
  }
}

/* v3.5.5: card inteiro clicável, seleção explícita da ferida e administração sem exclusão. */
.case-card[role="button"] {
  cursor: pointer;
}

.case-card[role="button"]:focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.28);
  outline-offset: 3px;
}

.selected-wound-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.case-admin-panel {
  border-color: var(--line);
  background: var(--panel);
}

.case-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.case-admin-panel.collapsed {
  padding: 14px 16px;
}

.case-admin-panel.collapsed .case-admin-head {
  align-items: center;
  margin-bottom: 0;
}

.case-admin-panel.collapsed h3,
.case-admin-panel.open h3 {
  margin-bottom: 4px;
}

.case-admin-panel.collapsed .muted,
.case-admin-panel.open .muted {
  margin: 0;
}

.case-admin-toggle {
  flex: 0 0 auto;
  min-width: 118px;
}

.compact-admin-form {
  display: grid;
  gap: 12px;
}

@media (max-width: 720px) {
  .case-admin-panel.collapsed {
    padding: 12px 14px;
  }

  .case-admin-panel.collapsed .case-admin-head {
    gap: 10px;
  }

  .case-admin-panel.collapsed .case-kicker,
  .case-admin-panel.collapsed .muted {
    display: none;
  }

  .case-admin-panel.collapsed h3 {
    font-size: 1rem;
    margin: 0;
  }

  .case-admin-toggle {
    min-width: 96px;
    height: 38px;
    padding: 0 12px;
  }
}

/* v3.5.7: resumo do caso compacto, unificando identificação e seleção de ferida. */
.case-summary-compact {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.case-summary-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.case-summary-title {
  min-width: 0;
}

.case-summary-title h2 {
  margin: 0 0 2px;
  font-size: 22px;
  line-height: 1.05;
}

.case-summary-title .muted {
  margin: 0;
}

.case-summary-wounds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.wound-selector-list.compact {
  margin-top: 0;
}

.identity-chip-row.compact {
  margin-top: 0;
}

.case-hero,
.case-identity,
.case-wound-selector-legacy {
  display: none;
}

@media (max-width: 720px) {
  .case-summary-compact {
    gap: 8px;
    padding: 12px 14px;
  }

  .case-summary-topline {
    gap: 9px;
  }

  .case-summary-compact .case-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .case-summary-title h2 {
    font-size: 20px;
  }

  .case-summary-title .muted {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .case-summary-compact .pill.evolution {
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .case-summary-wounds,
  .wound-selector-list.compact {
    gap: 6px;
  }

  .wound-selector-list.compact .wound-selector-chip {
    padding: 7px 10px;
    font-size: 0.86rem;
  }

  .identity-chip-row.compact {
    gap: 5px;
  }

  .identity-chip-row.compact .identity-chip {
    padding: 5px 8px;
    font-size: 0.78rem;
  }
}

/* v3.6.9: feedback local e confirmação acessível na Gestão do caso. */
.inline-feedback {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  line-height: 1.35;
}

.inline-feedback.warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.inline-feedback.err {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.inline-feedback.ok {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

.ibvia-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(8px);
}

.ibvia-dialog {
  width: min(440px, 100%);
  max-height: calc(100dvh - 48px);
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, .98);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .22);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ibvia-dialog.wide {
  width: min(760px, 100%);
}

.orientation-dialog textarea {
  resize: vertical;
  min-height: 136px;
}

.ibvia-dialog-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--teal);
  background: var(--panel-2);
}

.ibvia-dialog-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.ibvia-dialog-copy {
  display: grid;
  gap: 6px;
}

.ibvia-dialog-copy h2,
.ibvia-dialog-copy p {
  margin: 0;
}

.ibvia-dialog-actions {
  justify-content: flex-end;
}

.ibvia-dialog-backdrop.case-admin-confirm-backdrop {
  align-items: center;
  justify-items: center;
  padding-block: 16px;
  overscroll-behavior: contain;
}

.ibvia-dialog.case-admin-confirm-dialog {
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.case-admin-confirm-header,
.case-admin-confirm-footer {
  flex: 0 0 auto;
  background: var(--panel);
}

.case-admin-confirm-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 18px 18px 14px;
}

.case-admin-confirm-header h2,
.case-admin-confirm-header p,
.case-admin-confirm-body p {
  margin: 0;
}

.case-admin-confirm-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px 16px;
}

.case-admin-confirm-body:focus-visible {
  outline: 2px solid rgba(15, 118, 110, .35);
  outline-offset: -2px;
  border-radius: 12px;
}

.case-admin-confirm-footer {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 18px max(16px, env(safe-area-inset-bottom));
  box-shadow: 0 -10px 24px rgba(15, 23, 42, .06);
}

.case-admin-confirm-actions {
  justify-content: flex-end;
}

.case-admin-confirm-actions button {
  min-height: 44px;
}

.internal-select-open {
  overflow: hidden;
}

.internal-select-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .36);
  overscroll-behavior: contain;
}

.internal-select-dialog {
  width: min(420px, 100%);
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

.internal-select-header,
.internal-select-footer {
  flex: 0 0 auto;
  background: var(--panel);
}

.internal-select-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.internal-select-header h2,
.internal-select-header p {
  margin: 0;
}

.internal-select-options {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.internal-select-option {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  font-weight: 760;
}

.internal-select-option:hover,
.internal-select-option:focus-visible,
.internal-select-option.selected {
  border-color: rgba(15, 118, 110, .45);
  background: var(--panel-2);
  color: var(--teal);
}

.internal-select-check {
  display: inline-flex;
  color: var(--teal);
}

.internal-select-check .ui-icon {
  width: 18px;
  height: 18px;
}

.internal-select-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 12px;
}

@media (max-height: 640px) {
  .ibvia-dialog-backdrop.case-admin-confirm-backdrop {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .case-admin-panel.open {
    scroll-margin-bottom: 120px;
  }

  .compact-admin-form {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .case-admin-submit-row {
    position: sticky;
    bottom: calc(74px + env(safe-area-inset-bottom));
    z-index: 3;
    padding: 8px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--panel) 30%);
  }

  .case-admin-submit-row .primary {
    width: 100%;
  }

  .ibvia-dialog-backdrop {
    align-items: end;
    padding: 16px;
  }

  .ibvia-dialog {
    max-height: calc(100dvh - 32px);
    padding: 18px;
    border-radius: 16px;
  }

  .ibvia-dialog-actions {
    grid-template-columns: 1fr;
  }

  .ibvia-dialog-actions button {
    width: 100%;
  }

  .ibvia-dialog-backdrop.case-admin-confirm-backdrop {
    align-items: center;
    padding: 16px;
  }

  .ibvia-dialog.case-admin-confirm-dialog {
    max-height: calc(100dvh - 32px);
    border-radius: 16px;
  }

  .case-admin-confirm-header {
    padding: 16px 16px 12px;
  }

  .case-admin-confirm-body {
    padding: 0 16px 14px;
  }

  .case-admin-confirm-footer {
    padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  }

  .case-admin-confirm-actions {
    grid-template-columns: 1fr;
  }

  .case-admin-confirm-actions button {
    width: 100%;
  }

  .case-admin-confirm-actions .primary {
    order: 1;
  }

  .case-admin-confirm-actions .ghost {
    order: 2;
  }
}

@media (max-height: 640px) {
  .ibvia-dialog-backdrop.case-admin-confirm-backdrop {
    align-items: flex-start;
  }
}
/* v3.6.10: Gestão por seletor compacto, sem ações fixas aparentes. */
.case-admin-action-select {
  max-width: 360px;
}

.case-admin-panel.open {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.case-admin-panel.open .case-admin-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 720px) {
  .case-admin-action-select {
    max-width: none;
  }
}

/* v3.6.21: seletor institucional e respiro da gestão no mobile. */
.case-admin-panel {
  margin-bottom: 24px;
  overflow: visible;
}

.case-admin-head > div {
  min-width: 0;
}

.case-timeline-title {
  clear: both;
  margin-top: 24px;
}

/* MOBILE-DIRECTORY-HEADER-SYNC-04 */
.professionals-directory,
.directory-head,
.directory-head > div,
.professionals-filters,
.professionals-filters label,
.professionals-results,
.professionals-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.directory-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.directory-head h2 span {
  margin-left: 0;
  white-space: normal;
}

.professionals-filters input,
.professionals-filters select,
.professionals-filters .internal-select-trigger {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.professionals-filters .checkbox-line input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.professionals-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.professionals-table {
  table-layout: fixed;
}

.professionals-table th,
.professionals-table td {
  max-width: 240px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.professionals-table th:nth-child(2),
.professionals-table td:nth-child(2) {
  word-break: break-word;
}

@media (max-width: 760px) {
  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    min-width: 0;
  }

  .offline-sync-chip {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-self: stretch;
    justify-content: flex-start;
    white-space: normal;
  }

  .offline-sync-chip small {
    max-width: none;
    white-space: normal;
  }

  .mobile-app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding: 10px 16px 4px;
    overflow: visible;
    box-sizing: border-box;
  }

  .mobile-app-header .brand-block {
    display: grid;
    justify-items: center;
    align-items: center;
    width: min(176px, 58vw);
    min-width: 142px;
    max-width: 100%;
    gap: 1px;
    text-align: center;
  }

  .mobile-app-header .brand-button,
  .mobile-app-header .brand-mark {
    max-width: 100%;
    overflow: visible;
  }

  .mobile-app-header .brand-logo {
    width: min(176px, 58vw);
    min-width: 142px;
    max-width: 100%;
    overflow: visible;
  }

  .mobile-app-header .brand-block p {
    width: 100%;
    margin-inline: auto;
    padding-inline: 0;
    max-width: 100%;
    font-size: 10px;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
  }

  .main {
    max-width: 100%;
    padding-top: 4px;
  }

  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }

  .top > div {
    min-width: 0;
    width: 100%;
  }

  .top h1 {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: manual;
  }

  .top .ghost {
    justify-self: end;
    min-height: 40px;
    max-width: 100%;
    white-space: nowrap;
  }

  .professionals-directory {
    gap: 12px;
    overflow: visible;
  }

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

  .directory-head .refresh-button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    padding: 0 12px;
  }

  .professionals-filters {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .checkbox-line {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .professionals-table {
    min-width: 700px;
  }

  .professionals-results {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 720px) {
  .case-admin-panel,
  .case-admin-panel.collapsed,
  .case-admin-panel.open {
    margin-bottom: 30px;
    padding-bottom: 18px;
  }

  .case-admin-head,
  .case-admin-panel.collapsed .case-admin-head,
  .case-admin-panel.open .case-admin-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  .case-admin-panel.collapsed .case-kicker,
  .case-admin-panel.collapsed .muted,
  .case-admin-panel.open .case-kicker,
  .case-admin-panel.open .muted {
    display: block;
  }

  .case-admin-panel.collapsed h3,
  .case-admin-panel.open h3,
  .case-admin-panel .muted {
    overflow-wrap: anywhere;
  }

  .case-admin-toggle {
    width: 100%;
    min-height: 44px;
    height: auto;
    padding: 10px 14px;
    white-space: normal;
  }

  .case-timeline-title {
    margin-top: 30px;
  }
}

/* v3.6.62-sprint40: flow and specialist visual polish. */
@media (max-width: 760px) {
  .top-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .top-actions .offline-sync-chip {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 30px;
    padding: 6px 9px;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
  }

  .top-actions .offline-sync-chip small {
    display: none;
  }

  .top-actions .qr-connect-button {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.15;
  }

  .top-actions > button:not(.qr-connect-button) {
    grid-column: 2;
    justify-self: stretch;
    min-width: 58px;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.15;
  }

  .compact-toolbar {
    align-items: stretch;
    gap: 7px;
    padding: 8px;
  }

  .compact-toolbar .filter-field {
    gap: 3px;
  }

  .compact-toolbar .filter-field > span {
    font-size: 10.5px;
    line-height: 1.1;
  }

  .compact-toolbar button,
  .compact-toolbar .filter-summary,
  .compact-toolbar .internal-select-trigger,
  .compact-toolbar select {
    min-height: 40px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.15;
  }

  .compact-toolbar button {
    gap: 5px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
  }

  .compact-toolbar button .ui-icon {
    width: 16px;
    height: 16px;
  }

  .compact-toolbar button span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  .compact-toolbar .refresh-button,
  .compact-toolbar .new-case-button,
  .compact-toolbar .my-shift-filter-button,
  .compact-toolbar .my-shift-end-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 7px 9px;
  }
}

@media (max-width: 340px) {
  .compact-toolbar {
    gap: 6px;
    padding: 7px;
  }

  .compact-toolbar button,
  .compact-toolbar .filter-summary,
  .compact-toolbar .internal-select-trigger,
  .compact-toolbar select {
    padding: 6px 8px;
    font-size: 11.5px;
  }

  .compact-toolbar .refresh-button,
  .compact-toolbar .new-case-button,
  .compact-toolbar .my-shift-filter-button,
  .compact-toolbar .my-shift-end-button {
    padding: 6px 8px;
  }
}

@media (max-width: 560px) {
  .segmented-options {
    grid-template-columns: 1fr;
  }

  .specialist-requests-head,
  .specialist-request-card {
    display: grid;
  }

  .specialist-request-card > button,
  .specialist-orientation-highlight > button {
    width: 100%;
  }
}

.professionals-table {
  min-width: 920px;
}

.professionals-table th:nth-child(7),
.professionals-table td:nth-child(7) {
  width: 178px;
  max-width: 178px;
  overflow-wrap: normal;
  word-break: normal;
}

.professionals-table td:nth-child(7) .ghost.small {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 11.5px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-align: center;
}

@media (max-width: 760px) {
  .professionals-table {
    min-width: 860px;
  }

  .professionals-table th:nth-child(7),
  .professionals-table td:nth-child(7) {
    width: 170px;
    max-width: 170px;
  }
}

/* Hotfix: compact secondary shift action and cleaner professionals layout. */
.case-card-actions .my-shift-button.card {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 14px;
  gap: 6px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.15;
  box-shadow: none;
}

.case-card-actions .my-shift-button.card .ui-icon {
  width: 16px;
  height: 16px;
}

.case-card-actions .my-shift-button.card span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.case-card-actions .my-shift-button.card.active {
  font-weight: 800;
}

.professionals-filters {
  grid-template-columns: minmax(280px, 1.55fr) minmax(140px, .72fr) minmax(230px, 1.08fr) max-content;
  gap: 12px 14px;
}

.professionals-filters .checkbox-line {
  justify-self: end;
  white-space: nowrap;
}

.professionals-table {
  table-layout: auto;
  min-width: 0;
}

.professionals-table th,
.professionals-table td {
  max-width: none;
  padding: 11px 12px;
  overflow-wrap: normal;
  word-break: normal;
}

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

.professionals-table th:nth-child(2),
.professionals-table td:nth-child(2) {
  width: 26%;
  min-width: 238px;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.professionals-table th:nth-child(3),
.professionals-table td:nth-child(3) {
  width: 9%;
}

.professionals-table th:nth-child(4),
.professionals-table td:nth-child(4) {
  width: 22%;
  min-width: 218px;
  overflow-wrap: break-word;
}

.professionals-table th:nth-child(5),
.professionals-table td:nth-child(5) {
  width: 14%;
  min-width: 148px;
  overflow-wrap: break-word;
}

.professionals-table th:nth-child(6),
.professionals-table td:nth-child(6) {
  width: 7%;
  white-space: nowrap;
}

.professionals-table th:nth-child(7),
.professionals-table td:nth-child(7) {
  width: 142px;
  min-width: 142px;
  max-width: 150px;
}

.professionals-table td:nth-child(7) .ghost.small {
  width: auto;
  max-width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 11.5px;
  line-height: 1.15;
}

@media (max-width: 1120px) {
  .professionals-filters {
    grid-template-columns: minmax(240px, 1.4fr) minmax(132px, .72fr) minmax(220px, 1fr) max-content;
  }

  .professionals-table {
    min-width: 980px;
  }
}

@media (max-width: 900px) {
  .professionals-filters {
    grid-template-columns: minmax(0, 1.35fr) minmax(150px, .75fr);
  }

  .professionals-filters .checkbox-line {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .professionals-table-wrap {
    overflow-x: visible;
    border: 0;
    border-radius: 0;
  }

  .professionals-table,
  .professionals-table thead,
  .professionals-table tbody,
  .professionals-table tr,
  .professionals-table th,
  .professionals-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .professionals-table {
    min-width: 0;
    border-collapse: separate;
  }

  .professionals-table thead {
    display: none;
  }

  .professionals-table tbody {
    display: grid;
    gap: 12px;
  }

  .professionals-table tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  }

  .professionals-table td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 0;
    border-bottom: 0;
    overflow-wrap: break-word;
  }

  .professionals-table th:nth-child(n),
  .professionals-table td:nth-child(n) {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .professionals-table td::before {
    color: var(--muted);
    font-size: 11px;
    font-weight: 840;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .professionals-table td:nth-child(1)::before { content: 'Nome'; }
  .professionals-table td:nth-child(2)::before { content: 'E-mail'; }
  .professionals-table td:nth-child(3)::before { content: 'Perfil'; }
  .professionals-table td:nth-child(4)::before { content: 'Instituição'; }
  .professionals-table td:nth-child(5)::before { content: 'Setor'; }
  .professionals-table td:nth-child(6)::before { content: 'Status'; }
  .professionals-table td:nth-child(7)::before { content: 'Acesso'; }

  .professionals-table td:nth-child(2) {
    overflow-wrap: anywhere;
  }

  .professionals-table td:nth-child(6) {
    white-space: normal;
  }

  .professionals-table td:nth-child(7) .ghost.small {
    width: max-content;
    max-width: 100%;
    min-height: 36px;
    justify-self: start;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 520px) {
  .case-card-actions .my-shift-button.card {
    max-width: min(100%, 238px);
    min-height: 40px;
    padding: 7px 12px;
    font-size: 13.5px;
  }

  .professionals-filters {
    grid-template-columns: 1fr;
  }

  .professionals-filters .checkbox-line {
    min-height: 38px;
  }
}

@media (max-width: 390px) {
  .case-card-actions .my-shift-button.card {
    max-width: 100%;
    padding-inline: 11px;
    font-size: 13px;
  }

  .case-card-actions .my-shift-button.card .ui-icon {
    width: 15px;
    height: 15px;
  }

  .professionals-table td {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Minhas atuações do especialista, com persistência user-scoped. */
.professional-actions-toolbar {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  gap: 12px 14px;
  width: 100%;
  max-width: 100%;
}

.professional-actions-toolbar label,
.professional-action-form label,
.professional-action-form .field-stack {
  min-width: 0;
}

.professional-actions-toolbar-filters {
  display: grid;
  grid-template-columns: minmax(120px, 140px) minmax(300px, 1fr);
  align-items: end;
  gap: 12px;
  flex: 1 1 540px;
  max-width: 560px;
  min-width: 0;
}

.professional-actions-toolbar-filters label {
  width: 100%;
}

.professional-actions-toolbar-filters label:first-child > input[type="month"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-right: 36px;
}

.professional-actions-toolbar-filters label:nth-child(2) > select {
  padding: 12px 38px 12px 18px;
}

.professional-actions-toolbar-filters label:nth-child(2) .internal-select-trigger {
  padding-left: 18px;
  padding-right: 14px;
}

.professional-actions-toolbar-filters label:nth-child(2) .internal-select-trigger-icon {
  margin-left: 10px;
}

.professional-actions-toolbar .primary,
.professional-actions-toolbar .ghost {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: auto;
  padding: 0 13px;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.professional-actions-toolbar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.professional-actions-summary.ops-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 12px 0 14px;
}

.professional-actions-summary .professional-actions-indicator {
  min-width: 0;
  min-height: 70px;
  padding: 6px 7px;
  gap: 2px;
  border-radius: 14px;
  cursor: default;
}

.professional-actions-summary .professional-actions-indicator .metric-icon {
  width: 23px;
  height: 23px;
}

.professional-actions-summary .professional-actions-indicator .metric-icon .ui-icon {
  width: 14px;
  height: 14px;
}

.professional-actions-summary .professional-actions-indicator:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.professional-actions-summary .professional-actions-indicator strong {
  font-size: 21px;
  line-height: 1;
}

.professional-actions-summary .professional-actions-indicator span:last-child {
  font-size: 11px;
  line-height: 1.1;
}

.professional-actions-summary .professional-actions-indicator strong,
.professional-actions-summary .professional-actions-indicator span:last-child {
  overflow-wrap: anywhere;
}

.professional-action-form-panel,
.professional-report-preview,
.professional-action-card {
  box-shadow: var(--shadow-sm);
}

.professional-action-form {
  display: grid;
  gap: 12px;
}

.professional-action-form-panel .section-heading {
  align-items: start;
  margin-bottom: 2px;
}

.professional-action-fixed-context {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 760;
}

.professional-action-date-row {
  max-width: 240px;
}

.professional-action-form textarea {
  resize: vertical;
}

.professional-action-location-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-stack {
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0;
}

.professional-action-modality {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.char-counter {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.professional-actions-list-title {
  margin-top: 6px;
}

.professional-actions-list {
  display: grid;
  gap: 12px;
}

.professional-actions-group {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.professional-action-card {
  display: grid;
  gap: 10px;
}

.professional-action-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: 12px;
}

.professional-action-card h3,
.professional-action-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.professional-action-card .compact-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.professional-unit-session-panel,
.professional-unit-session-entries,
.professional-unit-session-confirm {
  display: grid;
  gap: 12px;
}

.professional-unit-session-nav {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.professional-unit-session-panel {
  gap: 12px;
}

.professional-unit-session-start,
.professional-unit-session-summary,
.professional-unit-session-context-form,
.professional-unit-session-entry-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.professional-unit-session-summary {
  display: grid;
  gap: 5px;
}

.professional-unit-session-summary h2,
.professional-unit-session-summary p {
  margin: 0;
}

.professional-unit-session-summary strong {
  color: var(--text);
  font-size: 15px;
}

.professional-unit-session-summary .ghost {
  justify-self: start;
  margin-top: 4px;
}

.professional-unit-session-body {
  display: grid;
  gap: 14px;
}

.professional-unit-session-entry-form h3 {
  margin: 0;
}

.professional-unit-session-entry-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.professional-unit-session-entry-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.professional-unit-session-entry-content {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.professional-unit-session-entry-index {
  color: var(--muted);
  font-weight: 850;
}

.professional-unit-session-entry-list strong,
.professional-unit-session-entry-list p {
  margin: 0;
  overflow-wrap: anywhere;
}

.professional-unit-session-entry-list p {
  margin-top: 4px;
}

.professional-unit-session-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.professional-unit-session-finish {
  justify-content: flex-end;
}

.professional-unit-session-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.professional-unit-session-confirm p {
  margin: 0;
}

.professional-report-preview textarea {
  width: 100%;
  min-height: 420px;
  font-family: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
}

.professional-report-export-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.professional-report-export-actions button {
  min-height: 40px;
}

@media (max-width: 1120px) {
  .professional-actions-toolbar-buttons button {
    flex: 0 1 auto;
    min-width: 0;
  }

  .professional-actions-report-button {
    flex-basis: auto;
  }

}

@media (min-width: 721px) {
  .professional-actions-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-start;
    column-gap: 18px;
    row-gap: 12px;
  }

  .professional-actions-toolbar-filters {
    display: grid;
    grid-template-columns: minmax(170px, 190px) minmax(260px, 1fr);
    align-items: end;
    column-gap: 18px;
    row-gap: 12px;
    flex: 0 1 608px;
    max-width: 100%;
    min-width: 0;
  }

  .professional-actions-toolbar-filters label {
    width: 100%;
    min-width: 0;
  }

  .professional-actions-toolbar-buttons {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-start;
  }
}

@media (min-width: 960px) {
  .professional-actions-toolbar-filters {
    grid-template-columns: 190px minmax(380px, 1fr);
  }
}

@media (min-width: 1200px) {
  .professional-actions-toolbar {
    column-gap: 10px;
  }

  .professional-actions-toolbar-filters {
    grid-template-columns: 190px 360px;
    flex: 0 0 568px;
    max-width: 568px;
  }

  .professional-actions-toolbar .primary,
  .professional-actions-toolbar .ghost {
    padding-inline: 8px;
  }

  .professional-actions-toolbar-buttons {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .professional-actions-toolbar {
    align-items: start;
    column-gap: 18px;
  }

  .professional-actions-toolbar-filters {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .professional-actions-toolbar-buttons {
    flex: 1 1 100%;
  }

  .professional-actions-summary.ops-dashboard {
    grid-template-columns: repeat(5, minmax(80px, 1fr));
    width: 100%;
  }

  .professional-actions-summary .professional-actions-indicator {
    min-height: 62px;
    padding: 5px 6px;
    gap: 1px;
    border-radius: 12px;
  }

  .professional-actions-summary .professional-actions-indicator .metric-icon {
    width: 20px;
    height: 20px;
  }

  .professional-actions-summary .professional-actions-indicator .metric-icon .ui-icon {
    width: 12px;
    height: 12px;
  }

  .professional-actions-summary .professional-actions-indicator strong {
    font-size: 18px;
  }

  .professional-actions-summary .professional-actions-indicator span:last-child {
    font-size: 10px;
    line-height: 1.05;
  }
}

@media (max-width: 720px) {
  .professional-action-form .inline.two {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-actions-toolbar {
    width: 100%;
    gap: 11px;
  }

  .professional-actions-toolbar-filters {
    grid-template-columns: minmax(124px, 150px) minmax(220px, 1fr);
    width: 100%;
    gap: 9px;
  }

  .professional-actions-toolbar-buttons {
    width: 100%;
  }

  .professional-actions-toolbar-buttons {
    justify-content: stretch;
  }

  .professional-actions-toolbar-buttons button {
    flex: 1 1 100%;
    width: 100%;
  }

  .professional-actions-summary.ops-dashboard {
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .professional-actions-summary .professional-actions-indicator {
    flex: 0 0 82px;
    min-height: 50px;
    padding: 4px 5px;
    gap: 1px;
    border-radius: 12px;
    scroll-snap-align: start;
  }

  .professional-actions-summary .professional-actions-indicator .metric-icon {
    width: 16px;
    height: 16px;
  }

  .professional-actions-summary .professional-actions-indicator .metric-icon .ui-icon {
    width: 10px;
    height: 10px;
  }

  .professional-actions-summary .professional-actions-indicator strong {
    font-size: 16px;
  }

  .professional-actions-summary .professional-actions-indicator span:last-child {
    font-size: 9px;
    line-height: 1;
  }

  .professional-action-card-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-action-card .compact-actions {
    justify-content: stretch;
  }

  .professional-action-card .compact-actions button {
    flex: 1 1 0;
  }

  .professional-unit-session-entry-list li {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-unit-session-entry-list .compact-actions {
    justify-content: stretch;
  }

  .professional-unit-session-entry-list .compact-actions button {
    flex: 1 1 0;
  }
}

@media (max-width: 420px) {
  .professional-actions-toolbar-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-actions-summary .professional-actions-indicator {
    flex-basis: 78px;
    min-height: 50px;
  }

  .professional-action-modality {
    grid-template-columns: minmax(0, 1fr);
  }

  .professional-report-preview textarea {
    min-height: 340px;
  }

  .professional-report-export-actions button {
    flex: 1 1 100%;
  }
}
