@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap');

:root {
  --ink: #1b1f24;
  --muted: #5d6b74;
  --brand: #0d5f63;
  --brand-strong: #0b3f41;
  --accent: #d9a45b;
  --surface: #ffffff;
  --surface-2: #f4f1ec;
  --border: rgba(18, 28, 36, 0.12);
  --shadow: 0 18px 48px rgba(8, 12, 18, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #f7efe3 0%, #f1f3f4 45%, #e8f0ef 100%);
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(13, 95, 99, 0.06), transparent 40%),
    radial-gradient(circle at 90% 20%, rgba(217, 164, 91, 0.12), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'IBM Plex Sans', sans-serif;
  margin: 0;
}

p {
  margin: 0;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  width: auto;
  height: 62px;
  max-width: 280px;
  object-fit: contain;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: conic-gradient(from 180deg, #0d5f63, #1f8a78, #d9a45b, #0d5f63);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.logo-text span {
  display: block;
  font-weight: 600;
  font-size: 18px;
}

.logo-text small {
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}

.menu {
  display: flex;
  gap: 18px;
  font-size: 14px;
  align-items: center;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.menu-link:hover,
.menu-link.is-active {
  background: rgba(13, 95, 99, 0.1);
  color: var(--brand-strong);
}

.menu-dropdown {
  position: relative;
}

.menu-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(13, 95, 99, 0.14);
  box-shadow: 0 18px 30px rgba(12, 24, 34, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  pointer-events: none;
  z-index: 40;
}

.menu-dropdown.is-open .menu-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-sublink {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}

.menu-sublink:hover,
.menu-sublink.is-active {
  background: rgba(13, 95, 99, 0.1);
  color: var(--brand-strong);
}

.user-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 6px;
  transition: background 0.15s;
}
.user-chip:hover {
  background: rgba(0, 0, 0, 0.06);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.user-role {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

.logout-form {
  margin: 0;
}

.logout-button {
  min-height: 34px;
  padding: 7px 12px;
}

.content {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 28px 32px;
}

.content.is-test-focus {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px 14px;
}

.content.is-test-focus .sidebar {
  display: none !important;
}

.content.is-test-focus .main-header {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 4px;
  margin: 0;
}

.content.is-test-focus .main-header h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.content.is-test-focus .main-header p,
.content.is-test-focus .main-header .actions {
  display: none;
}

.content.is-test-focus .panel {
  border-radius: 14px;
  padding: 12px 14px;
}

.content.is-test-focus .panel-title {
  display: none;
}

body.is-test-focus .topbar {
  display: none;
}

.sidebar-collapse-control {
  display: flex;
  justify-content: flex-end;
}

.sidebar-collapse-control.is-hidden {
  display: none;
}

.sidebar-collapse-control .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle-icon {
  font-size: 18px;
  line-height: 1;
}

.content.is-sidebar-collapsed {
  grid-template-columns: 56px minmax(0, 1fr);
}

.content.is-sidebar-collapsed .sidebar {
  padding: 12px 8px;
  align-items: center;
}

.content.is-sidebar-collapsed .sidebar-collapse-control {
  width: 100%;
  justify-content: center;
}

.content.is-sidebar-collapsed .sidebar-collapse-control .btn {
  width: 36px;
  height: 36px;
}

.content.is-sidebar-collapsed .sidebar > :not(.sidebar-collapse-control) {
  display: none !important;
}

.sidebar {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.sidebar-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.sidebar-panel.active {
  display: flex;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-header > :first-child {
  min-width: 0;
}

.sidebar-header-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.sidebar-header h3 {
  font-size: 18px;
}

.test-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.test-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--surface-2);
  transition: all 0.2s ease;
}

.test-item.active,
.test-item:hover {
  border-color: rgba(13, 95, 99, 0.3);
  background: #fff;
  transform: translateY(-1px);
}

.test-code {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-strong);
}

.test-name {
  font-weight: 600;
  margin-top: 6px;
}

.test-desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.test-delivery-icons {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.test-delivery-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: #f7fffd;
  border: 2px solid rgba(13, 95, 99, 0.34);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  color: #0d5f63;
  font-weight: 700;
  cursor: default;
}

.test-delivery-icon:hover,
.test-delivery-icon:focus-visible {
  background: #e7f7f5;
  border-color: rgba(13, 95, 99, 0.7);
  box-shadow: 0 8px 18px rgba(13, 95, 99, 0.18);
}

.test-delivery-icon:hover .test-delivery-label,
.test-delivery-icon:focus-visible .test-delivery-label {
  opacity: 1;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
}

.test-delivery-symbol {
  width: 22px;
  height: 22px;
  font-size: 0;
  line-height: 1;
  color: currentColor;
}

.test-delivery-symbol::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: var(--delivery-icon) center / contain no-repeat;
  mask: var(--delivery-icon) center / contain no-repeat;
}

.test-delivery-icon[data-delivery-mode="presencial_tecnico"] {
  --delivery-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v5a3 3 0 0 0 6 0V2h2v5a5 5 0 0 1-4 4.9V14a4 4 0 0 0 8 0v-1.2a3 3 0 1 1 2 0V14a6 6 0 0 1-12 0v-2.1A5 5 0 0 1 7 7V2Zm15 7.5a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z'/%3E%3C/svg%3E");
}

.test-delivery-icon[data-delivery-mode="presencial_paciente"] {
  --delivery-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.4 0-8 2.7-8 6v1h16v-1c0-3.3-3.6-6-8-6Z'/%3E%3C/svg%3E");
}

.test-delivery-icon[data-delivery-mode="presencial_papel"] {
  --delivery-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h8l5 5v15H6V2Zm7 1.8V8h4.2L13 3.8ZM8 12h8v2H8v-2Zm0 4h8v2H8v-2Z'/%3E%3C/svg%3E");
}

.test-delivery-icon[data-delivery-mode="presencial_digital"] {
  --delivery-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h18v12H3V4Zm2 2v8h14V6H5Zm4 12h6l1 2h3v2H5v-2h3l1-2Z'/%3E%3C/svg%3E");
}

.test-delivery-icon[data-delivery-mode="online_paciente"] {
  --delivery-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-3.9 0-7 2.4-7 5.4V19h14v-1.6C16 14.4 12.9 12 9 12Zm8.5 4.8 1.4 1.4a4.1 4.1 0 0 0 0-5.8l-1.4 1.4a2.1 2.1 0 0 1 0 3Zm2.8 2.8 1.4 1.4a8.1 8.1 0 0 0 0-11.4L20.3 11a6.1 6.1 0 0 1 0 8.6Z'/%3E%3C/svg%3E");
}

.test-delivery-icon[data-delivery-mode="online_digital"] {
  --delivery-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h8a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 3v13h8V5H7Zm3 14v1h2v-1h-2Zm9.8-10.2 1.4-1.4a6 6 0 0 0-4.2-1.8v2a4 4 0 0 1 2.8 1.2Zm-2.1 2.1 1.4-1.4a3 3 0 0 0-2.1-.9v2a1 1 0 0 1 .7.3Z'/%3E%3C/svg%3E");
}

.test-delivery-label {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 20;
  width: max-content;
  max-width: 190px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #17212b;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 4px));
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}

.test-delivery-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: #17212b;
  transform: translateX(-50%) rotate(45deg);
}

.test-group {
  background: var(--surface-2);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.profile-quick-panel {
  display: block;
  padding: 10px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.profile-quick-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.profile-quick-head::-webkit-details-marker {
  display: none;
}

.profile-quick-head h4 {
  margin: 0;
  font-size: 13px;
}

.profile-quick-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.profile-quick-item {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.profile-quick-item:hover,
.profile-quick-item:focus-visible {
  border-color: rgba(13, 95, 99, 0.5);
  background: #eef8f7;
  outline: none;
}

.profile-quick-item.is-selected {
  border-color: rgba(13, 95, 99, 0.78);
  background: #e7f7f5;
}

.profile-quick-item strong,
.profile-quick-item small {
  display: block;
}

.profile-quick-item strong {
  font-size: 12px;
}

.profile-quick-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.test-explore-head {
  display: grid;
  gap: 2px;
  padding: 2px 2px 0;
}

.test-explore-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.test-explore-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.test-subsection {
  display: grid;
  gap: 8px;
}

.test-subsection + .test-subsection {
  padding-top: 8px;
  border-top: 1px dashed rgba(18, 28, 36, 0.14);
}

.test-subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.test-subsection-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.test-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.test-group-details > .test-group-header,
.test-subsection-details > .test-subsection-head {
  list-style: none;
  cursor: pointer;
}

.test-group-details > .test-group-header::-webkit-details-marker,
.test-subsection-details > .test-subsection-head::-webkit-details-marker {
  display: none;
}

.test-group-details[open] > .test-group-header {
  border-bottom: 1px solid rgba(18, 28, 36, 0.1);
  padding-bottom: 8px;
}

.test-subsection-details[open] > .test-subsection-head {
  border-bottom: 1px dashed rgba(18, 28, 36, 0.14);
  padding-bottom: 6px;
}

.test-group-header h4 {
  margin: 0;
  font-size: 14px;
}

.group-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(13, 95, 99, 0.12);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 600;
}

.test-option-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.test-subgroup {
  border-radius: 12px;
  border: 1px solid rgba(18, 28, 36, 0.12);
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.test-subgroup > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-strong);
}

.test-subgroup > summary::-webkit-details-marker {
  display: none;
}

.test-subgroup[open] > summary {
  border-bottom: 1px solid rgba(18, 28, 36, 0.08);
  background: rgba(13, 95, 99, 0.05);
}

.test-subgroup-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.test-option {
  border-radius: 14px;
  border: 1px solid transparent;
  background: #fff;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.test-option.selected {
  border-color: rgba(13, 95, 99, 0.35);
  box-shadow: 0 10px 24px rgba(13, 95, 99, 0.12);
}

.test-option.focused {
  border-color: rgba(13, 95, 99, 0.7);
  box-shadow: 0 0 0 2px rgba(13, 95, 99, 0.2);
}

.check-item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.check-item input {
  flex-shrink: 0;
}

.test-option-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.check-item small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.test-subtests {
  margin-top: 8px;
  margin-left: 24px;
  padding-left: 10px;
  border-left: 2px solid rgba(13, 95, 99, 0.18);
  display: grid;
  gap: 6px;
}

.check-item-subtest {
  font-size: 12px;
}

.check-item-static {
  opacity: 0.92;
}

.check-item-static input[disabled] {
  cursor: default;
}

.test-subtests-static {
  margin-left: 34px;
  border-left: 2px solid rgba(13, 95, 99, 0.14);
  padding-left: 8px;
  gap: 4px;
}

.test-subtests-static span {
  display: block;
}

/* Bateria: versão compacta do painel de testes (lado esquerdo) */
.sidebar-panel[data-sidebar-panel="tests"] {
  gap: 10px;
  min-height: 0;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 4px;
}

.sidebar-panel[data-sidebar-panel="tests"] .sidebar-header h3 {
  font-size: 16px;
}

.sidebar-panel[data-sidebar-panel="tests"] .sidebar-header p {
  font-size: 12px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-group {
  padding: 10px;
  border-radius: 14px;
  gap: 8px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-group-header h4 {
  font-size: 13px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-group .badge {
  padding: 3px 8px;
  font-size: 10px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-subgroup > summary {
  padding: 8px 10px;
  font-size: 12px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-option-list {
  gap: 8px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-option {
  padding: 8px 10px;
  border-radius: 12px;
}

.sidebar-panel[data-sidebar-panel="tests"] .check-item {
  gap: 8px;
  font-size: 12px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-delivery-icons {
  gap: 4px;
  max-width: 58px;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-delivery-icon {
  width: 24px;
  height: 24px;
  border-width: 1px;
  box-shadow: none;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-delivery-symbol {
  font-size: 14px;
}

.sidebar-panel[data-sidebar-panel="tests"] .check-item small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.sidebar-panel[data-sidebar-panel="tests"] .test-subtests {
  margin-top: 6px;
  margin-left: 18px;
  padding-left: 8px;
  gap: 4px;
}

.note {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(217, 164, 91, 0.15);
  color: #6a4b16;
  font-size: 13px;
}

.empty-state {
  background: rgba(13, 95, 99, 0.08);
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
}

.empty-state.small {
  padding: 12px;
  font-size: 12px;
}

.sidebar-kpis {
  display: grid;
  gap: 12px;
}

.sidebar-kpi {
  background: var(--surface-2);
  padding: 12px 14px;
  border-radius: 12px;
}

.sidebar-kpi .kpi-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.sidebar-kpi-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.sidebar-checklist-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.sidebar-checklist-card h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.sidebar-checklist-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sidebar-checklist-card li + li {
  margin-top: 7px;
}

.note.subtle {
  margin-top: 12px;
  background: rgba(13, 95, 99, 0.08);
  color: var(--brand-strong);
}

.main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.main-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.main-header h1 {
  font-size: 28px;
}

.actions {
  display: flex;
  gap: 12px;
}

.panel {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel.panel-test-shell {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.panel-title {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.kpi-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(18, 28, 36, 0.08);
  background: #fff;
  box-shadow: 0 12px 28px rgba(12, 24, 34, 0.08);
}

.kpi-card h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.kpi-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.kpi-note {
  margin-top: 16px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.settings-panel {
  display: grid;
  gap: 16px;
}

.settings-card {
  display: none;
}

.settings-card.active {
  display: block;
}

.settings-menu {
  position: sticky;
  top: 90px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.settings-group {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 14px;
  box-shadow: var(--shadow);
}

.settings-group h4 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.settings-link {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.settings-link + .settings-link {
  margin-top: 6px;
}

.settings-link.active,
.settings-link:hover {
  background: rgba(13, 95, 99, 0.12);
  color: var(--brand-strong);
}

.settings-layout-catalog .settings-panel {
  min-width: 0;
}

.settings-table-scroll {
  overflow-x: auto;
  position: relative;
}

.settings-tests-table {
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 0;
}

.settings-tests-table thead th {
  text-align: center;
  white-space: nowrap;
  padding: 8px 8px;
}

.settings-tests-table tbody td {
  padding: 6px 8px;
  vertical-align: middle;
}

.settings-tests-table input[type="text"],
.settings-tests-table input[type="number"],
.settings-tests-table textarea,
.settings-tests-table select {
  width: 100%;
  min-width: 120px;
  box-sizing: border-box;
  font-size: 12px;
  padding: 8px 8px;
}

.settings-tests-table .settings-multi-checklist {
  min-width: 220px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.settings-tests-table .settings-multi-checklist > div {
  margin: 0;
}

.settings-tests-table .settings-multi-checklist label {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid rgba(18, 28, 36, 0.14);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.settings-tests-table .settings-multi-checklist label:hover {
  border-color: rgba(13, 95, 99, 0.4);
  background: rgba(13, 95, 99, 0.06);
}

.settings-tests-table .settings-multi-checklist input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #0d5f63;
}

.settings-modal-cell {
  min-width: 170px;
}

.settings-modal-trigger {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.settings-modal-trigger-text {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.settings-modal-open {
  overflow: hidden;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.settings-modal[hidden] {
  display: none !important;
}

.settings-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.45);
}

.settings-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(860px, 94vw);
  max-height: 86vh;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(18, 28, 36, 0.16);
  box-shadow: 0 24px 56px rgba(8, 12, 18, 0.28);
  display: flex;
  flex-direction: column;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(18, 28, 36, 0.12);
}

.settings-modal-header h4 {
  margin: 0;
  font-size: 15px;
}

.settings-modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(18, 28, 36, 0.2);
  border-radius: 999px;
  background: #fff;
  color: #28323d;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.settings-modal-body {
  padding: 14px;
  overflow: auto;
}

.settings-modal-field select,
.settings-modal-field input[type="text"],
.settings-modal-field textarea {
  width: 100%;
  min-width: 0;
}

.settings-modal-field textarea {
  min-height: 220px;
}

.settings-modal-subsection {
  display: grid;
  gap: 8px;
}

.settings-modal-subsection + .settings-modal-subsection {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(18, 28, 36, 0.14);
}

.settings-modal-subsection.is-hidden {
  display: none;
}

.settings-modal-subsection h5 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4f616f;
}

.settings-modal-field .settings-multi-checklist {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.settings-modal-field .settings-multi-checklist > div {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.settings-modal-field .settings-multi-checklist label {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left !important;
  white-space: normal !important;
  cursor: pointer;
}

.settings-modal-field .settings-multi-checklist label.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.settings-modal-field .settings-multi-checklist.settings-tests-tree > div {
  display: block !important;
}

.settings-test-parent-item {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(18, 28, 36, 0.12);
}

.settings-test-parent-item:last-child {
  border-bottom: 0;
}

.settings-test-parent-item.is-selected > label {
  font-weight: 700;
  color: #0d5f63;
}

.settings-test-children-list {
  margin: 6px 0 0 26px;
  padding: 6px 0 0 10px;
  border-left: 2px solid rgba(13, 95, 99, 0.18);
  color: #5f6f7b;
  font-size: 11px;
  line-height: 1.35;
  display: grid;
  gap: 6px;
}

.settings-modal-field .settings-multi-checklist input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
  accent-color: #0d5f63;
}

.settings-subtest-tree {
  display: grid;
  gap: 8px;
  width: 100%;
}

.settings-subtest-details {
  border: 1px solid rgba(18, 28, 36, 0.14);
  border-radius: 12px;
  background: #fbfcfd;
  overflow: hidden;
}

.settings-subtest-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-weight: 600;
  color: #1c3448;
}

.settings-subtest-summary::-webkit-details-marker {
  display: none;
}

.settings-subtest-details[open] > .settings-subtest-summary {
  border-bottom: 1px solid rgba(18, 28, 36, 0.1);
  background: rgba(13, 95, 99, 0.08);
}

.settings-subtest-parent-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-subtest-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(13, 95, 99, 0.14);
  color: #0d5f63;
  font-size: 11px;
  font-weight: 700;
}

.settings-subtest-children {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px 12px;
}

.settings-subtest-item {
  margin: 0 !important;
}

.settings-subtest-item.is-disabled {
  opacity: 0.45;
}

.settings-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(18, 28, 36, 0.12);
}

.settings-tests-table .settings-input-disabled,
.settings-tests-table input:disabled.settings-input-disabled,
.settings-tests-table textarea:disabled.settings-input-disabled {
  background: rgba(18, 28, 36, 0.08);
  color: #6c7a88;
  cursor: not-allowed;
}

.settings-tests-table th:nth-child(1),
.settings-tests-table td:nth-child(1) {
  min-width: 280px;
}

.settings-tests-table th:nth-child(2),
.settings-tests-table td:nth-child(2) {
  min-width: 220px;
}

.settings-tests-table td:nth-child(1) select {
  min-width: 240px;
}

.settings-tests-table td:nth-child(2) input[type="text"],
.settings-tests-table td:nth-child(3) input[type="text"],
.settings-tests-table td:nth-child(4) input[type="text"],
.settings-tests-table td:nth-child(5) input[type="text"],
.settings-tests-table td:nth-child(6) textarea,
.settings-tests-table td:nth-child(16) input[type="text"] {
  min-width: 160px;
}

.settings-tests-table td:nth-child(17) input[type="number"],
.settings-tests-table td:nth-child(18) input[type="number"] {
  min-width: 90px;
}

.settings-parent-row td {
  background: rgba(13, 95, 99, 0.06);
}

/* Fundos das colunas presencial/online (substituem inline styles) */
.settings-bg-presencial {
  background: #f8fbff;
}

.settings-bg-online {
  background: #f6fef9;
}

/* Hover nas linhas — sobrepõe todos os fundos de célula */
.settings-tests-table tbody tr.settings-parent-row:hover > td,
.settings-tests-table tbody tr.settings-child-row:hover > td,
.settings-tests-table tbody tr.settings-parent-row:hover > td.settings-bg-presencial,
.settings-tests-table tbody tr.settings-child-row:hover > td.settings-bg-presencial,
.settings-tests-table tbody tr.settings-parent-row:hover > td.settings-bg-online,
.settings-tests-table tbody tr.settings-child-row:hover > td.settings-bg-online {
  background: rgba(13, 95, 99, 0.22) !important;
}

/* Coluna "Teste" fixa ao scroll horizontal */
.settings-tests-table thead tr:first-child th:first-child {
  position: sticky;
  left: 0;
  z-index: 6;
  min-width: 280px;
  background: rgba(13, 95, 99, 0.08);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.08);
}

.settings-tests-table .settings-test-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 280px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.06);
  background-clip: padding-box;
}

.settings-parent-row .settings-test-cell {
  background: rgba(13, 95, 99, 0.14);
}

.settings-child-row .settings-test-cell {
  background: rgba(13, 95, 99, 0.08);
}

.settings-tests-table tbody tr.settings-parent-row:hover > .settings-test-cell,
.settings-tests-table tbody tr.settings-child-row:hover > .settings-test-cell {
  background: rgba(13, 95, 99, 0.22) !important;
}

.settings-child-row.is-collapsed {
  display: none;
}

.settings-test-cell {
  white-space: nowrap;
}

.settings-test-cell-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-test-cell-child {
  color: var(--muted);
}

.settings-tree-toggle,
.settings-tree-spacer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
}

.settings-tree-toggle {
  border: 1px solid rgba(18, 28, 36, 0.2);
  border-radius: 6px;
  background: #fff;
  color: #1f2d3a;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.settings-tree-toggle:hover {
  border-color: rgba(13, 95, 99, 0.5);
  background: rgba(13, 95, 99, 0.08);
}

.settings-tree-toggle.is-collapsed {
  transform: rotate(-90deg);
}

.settings-check-cell {
  text-align: center;
}

.settings-check-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.settings-check-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 4px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(18, 28, 36, 0.2);
  accent-color: #0d5f63;
}

/* Colunas 7..19 da Tabela de Caracterização centralizadas */
.settings-tests-table thead th:nth-child(n + 7):nth-child(-n + 19),
.settings-tests-table tbody td:nth-child(n + 7):nth-child(-n + 19) {
  text-align: center;
}

.settings-tests-table tbody td:nth-child(16) input[type="text"],
.settings-tests-table tbody td:nth-child(17) input[type="number"],
.settings-tests-table tbody td:nth-child(18) input[type="number"] {
  text-align: center;
}

.settings-form-errors td {
  background: #fff3f3 !important;
  color: #b83b2f;
  font-size: 12px;
}

.settings-field {
  display: grid;
  gap: 10px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(13, 95, 99, 0.12);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
}

.chip-input {
  display: flex;
  gap: 10px;
}

.chip-input input {
  flex: 1;
}

@media (max-width: 980px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-menu {
    position: static;
    order: -1;
  }
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.info-grid label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.value {
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
}

.form-field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  border-radius: 12px;
  border: 1px solid rgba(18, 28, 36, 0.16);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(13, 95, 99, 0.2);
  border-color: rgba(13, 95, 99, 0.4);
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.result-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(13, 95, 99, 0.08);
}

.result-card h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(18, 28, 36, 0.08);
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(13, 95, 99, 0.08);
  color: var(--brand-strong);
  font-weight: 600;
  border-bottom: 1px solid rgba(18, 28, 36, 0.08);
}

.data-table tbody td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(18, 28, 36, 0.06);
  vertical-align: top;
}

.data-table tbody tr:nth-child(even) td {
  background: rgba(13, 95, 99, 0.03);
}

.wais-table {
  text-align: left;
}

.wais-table th:first-child,
.wais-table td:first-child {
  width: 70px;
}

.wais-table input[type="text"],
.wais-table input[type="number"],
.wais-table select {
  text-align: left;
  width: 100%;
  min-width: 160px;
}

.wais-table-cb input[type="number"] {
  min-width: 140px;
  text-align: center;
}

.data-table.wais-table.wais-table-cb thead th,
.data-table.wais-table.wais-table-cb tbody td {
  text-align: center;
  vertical-align: middle;
}

.cb-image {
  width: 72px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.cb-ensaio {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.cb-ensaio-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.cb-time-input {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.cb-row-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.cb-correct-toggle {
  justify-content: center;
}

.cb-correct-toggle .toggle-btn {
  min-width: 96px;
}

.cb-time-input input {
  flex: 1 1 auto;
}

.wais-table-cb .cb-time-input input {
  flex: 0 0 5.5rem;
  width: 5.5rem;
  min-width: 0;
}

.wais-table-cb .wais-toggle input:disabled + .toggle-btn {
  opacity: 0.45;
  cursor: not-allowed;
}

.cb-timer-btn {
  min-width: 42px;
  width: 42px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(13, 95, 99, 0.35);
  background: rgba(13, 95, 99, 0.12);
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cb-timer-btn:hover {
  background: rgba(13, 95, 99, 0.2);
  transform: translateY(-1px);
}

.cb-timer-btn.is-running {
  background: rgba(197, 48, 48, 0.12);
  border-color: rgba(197, 48, 48, 0.4);
  color: #c53030;
}

.wais-table-cb .cb-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-cb .cb-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-cb .cb-start-marker img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.data-table.wais-table.wais-table-cb tbody tr.cb-item-odd td {
  background: #fff;
}

.data-table.wais-table.wais-table-cb tbody tr.cb-item-even td {
  background: rgba(13, 95, 99, 0.03);
}

.data-table.wais-table.wais-table-cb tbody tr.cb-item-initial td {
  background: rgba(217, 164, 91, 0.18) !important;
}

.wais-table-cb tr.cb-item-disabled td {
  opacity: 0.65;
}

.wais-table-cb tr.cb-item-auto td {
  background: rgba(13, 95, 99, 0.08) !important;
}


.cd-cell input {
  display: none;
}

.cd-cell .cd-btn {
  width: 100%;
  min-width: 32px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(13, 95, 99, 0.2);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: block;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cd-number {
  display: block;
  line-height: 1.1;
}

.cd-symbol {
  display: block;
  font-size: 12px;
  line-height: 1.1;
}

.cd-cell .cd-btn.is-correct {
  background: #2f855a;
  border-color: #2f855a;
  color: #fff;
  box-shadow: 0 6px 14px rgba(47, 133, 90, 0.24);
  transform: translateY(-1px);
}

.cd-cell .cd-btn.is-wrong {
  background: #c53030;
  border-color: #c53030;
  color: #fff;
  box-shadow: 0 6px 14px rgba(197, 48, 48, 0.24);
  transform: translateY(-1px);
}

.cd-cell .cd-btn:hover {
  border-color: rgba(13, 95, 99, 0.45);
  box-shadow: 0 4px 10px rgba(13, 95, 99, 0.12);
}

.cd-cell .cd-btn.is-disabled,
.cd-cell .cd-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.wais-toggle {
  display: inline-flex;
  gap: 6px;
  background: rgba(13, 95, 99, 0.08);
  padding: 4px;
  border-radius: 999px;
}

.wais-toggle input {
  display: none;
}

.wais-toggle .toggle-btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--brand-strong);
  transition: background 0.2s ease, color 0.2s ease;
}

.wais-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 10px;
  border-radius: 50%;
  background: rgba(13, 95, 99, 0.2);
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(13, 95, 99, 0.4);
  box-shadow: 0 6px 12px rgba(13, 95, 99, 0.18);
  cursor: help;
}

.wais-info:hover {
  background: rgba(13, 95, 99, 0.3);
  box-shadow: 0 10px 18px rgba(13, 95, 99, 0.24);
}

.wais-table-ari th .wais-info {
  margin-left: 6px;
  margin-right: 0;
  width: 18px;
  height: 18px;
  font-size: 11px;
  vertical-align: middle;
}

.wais-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 999;
}

.wais-modal.open {
  display: grid;
}

.wais-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 20, 0.5);
}

.wais-modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 90vw);
  background: #fff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.wais-modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wais-modal-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ink);
}

.wais-toggle input:checked + .toggle-yes {
  background: #2f855a;
  color: #fff;
}

.wais-toggle input:checked + .toggle-high {
  background: #2c7a7b;
  color: #fff;
}

.wais-toggle input:checked + .toggle-mid {
  background: #d69e2e;
  color: #fff;
}

.wais-toggle input:checked + .toggle-no {
  background: #c53030;
  color: #fff;
}

.wais-toggle.wais-toggle-mt {
  padding: 0;
  background: transparent;
}

.wais-toggle.wais-toggle-mt .toggle-btn {
  min-width: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 95, 99, 0.35);
  background: rgba(13, 95, 99, 0.08);
  color: var(--brand-strong);
}

.wais-toggle.wais-toggle-mt .toggle-btn.mt-correct-answer {
  border-color: #1f5a2f;
  box-shadow: 0 0 0 2px rgba(31, 90, 47, 0.65);
}

.wais-table-mt {
  width: 100%;
  table-layout: auto;
}

.wais-table-mt th,
.wais-table-mt td {
  padding: 6px 6px;
  text-align: center;
}

.wais-table-mt th:nth-child(1),
.wais-table-mt td:nth-child(1),
.wais-table-mt th:nth-child(2),
.wais-table-mt td:nth-child(2),
.wais-table-mt th:nth-child(3),
.wais-table-mt th:nth-child(4),
.wais-table-mt th:nth-child(5),
.wais-table-mt th:nth-child(6),
.wais-table-mt th:nth-child(7),
.wais-table-mt td:nth-child(3),
.wais-table-mt td:nth-child(4),
.wais-table-mt td:nth-child(5),
.wais-table-mt td:nth-child(6),
.wais-table-mt td:nth-child(7),
.wais-table-mt th:nth-child(9),
.wais-table-mt td:nth-child(9) {
  width: 1%;
  white-space: nowrap;
}

.wais-table-mt th:nth-child(8),
.wais-table-mt td:nth-child(8) {
  text-align: left;
  width: 100%;
}

.wais-table-mt .mt-response-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: block;
}

.wais-toggle.wais-toggle-mt .toggle-btn:hover {
  background: rgba(13, 95, 99, 0.16);
  border-color: rgba(13, 95, 99, 0.5);
  box-shadow: 0 4px 10px rgba(13, 95, 99, 0.12);
}

.wais-toggle input:checked + .toggle-mt {
  background: #2c7a7b;
  border-color: #2c7a7b;
  color: #fff;
  box-shadow: 0 6px 14px rgba(44, 122, 123, 0.24);
}

.wais-toggle input:checked + .toggle-mt.mt-correct-answer {
  border-color: #1f5a2f;
  box-shadow: 0 0 0 2px rgba(31, 90, 47, 0.85), 0 6px 14px rgba(44, 122, 123, 0.24);
}

.wais-table-mt .mt-response-input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


.wais-table.wais-table-mt tbody tr.mt-practice td {
  background: rgba(213, 214, 216, 0.65) !important;
}

.wais-table.wais-table-mt tbody tr.mt-practice:nth-child(even) td {
  background: rgba(213, 214, 216, 0.75) !important;
}

.wais-table.wais-table-mt tbody tr.mt-abc td {
  background: rgba(210, 227, 239, 0.7);
}

.wais-table.wais-table-mt tbody tr.mt-abc:nth-child(even) td {
  background: rgba(210, 227, 239, 0.85);
}

.wais-table-cg th:nth-child(2),
.wais-table-cg td:nth-child(2) {
  width: 1%;
  min-width: 0;
  white-space: nowrap;
}

.wais-table-cg th:nth-child(3),
.wais-table-cg td:nth-child(3) {
  min-width: 220px;
}

.wais-table-cg th:nth-child(4),
.wais-table-cg td:nth-child(4) {
  min-width: 170px;
}

.wais-table-cg th:nth-child(5),
.wais-table-cg td:nth-child(5) {
  min-width: 110px;
}

.wais-table-cg th:first-child,
.wais-table-cg td:first-child {
  width: 1% !important;
  min-width: 0;
  white-space: nowrap;
}

.wais-table-cg input[type="text"],
.wais-table-cg input[type="number"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.wais-table-ari th:nth-child(3),
.wais-table-ari td:nth-child(3),
.wais-table-ari th:nth-child(5),
.wais-table-ari td:nth-child(5),
.wais-table-ari th:nth-child(6),
.wais-table-ari td:nth-child(6) {
  text-align: center;
}

.wais-table-ari .ari-transition-row td {
  background: rgba(225, 236, 245, 0.92) !important;
  color: #0d3b5b;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  border-right: none !important;
  border-top: 1px solid rgba(13, 59, 91, 0.28);
  border-bottom: 1px solid rgba(13, 59, 91, 0.28);
}

.wais-table-cg {
  width: 100%;
  min-width: 760px;
  table-layout: auto;
}

.wais-table-cg th,
.wais-table-cg td {
  text-align: center;
}

.data-table.wais-table.wais-table-cg thead th:nth-child(1),
.data-table.wais-table.wais-table-cg thead th:nth-child(2),
.data-table.wais-table.wais-table-cg thead th:nth-child(4),
.data-table.wais-table.wais-table-cg thead th:nth-child(5),
.data-table.wais-table.wais-table-cg tbody td:nth-child(1),
.data-table.wais-table.wais-table-cg tbody td:nth-child(2),
.data-table.wais-table.wais-table-cg tbody td:nth-child(4),
.data-table.wais-table.wais-table-cg tbody td:nth-child(5) {
  text-align: center;
}

.data-table.wais-table.wais-table-cg tbody td:nth-child(5) input[type="number"],
.data-table.wais-table.wais-table-cg tbody td:nth-child(5) input[type="text"] {
  text-align: center;
}

@media (max-width: 980px) {
  .wais-table-cg {
    min-width: 640px;
  }

  .wais-table-cg th,
  .wais-table-cg td {
    padding: 6px 8px;
  }

  .wais-table-cg .wais-toggle .toggle-btn {
    font-size: 11px;
    padding: 5px 10px;
  }
}

@media (max-width: 640px) {
  .wais-table-cg {
    min-width: 560px;
  }

  .wais-table-cg th:nth-child(3),
  .wais-table-cg td:nth-child(3) {
    min-width: 170px;
  }
}

.wais-table-inf th,
.wais-table-inf td {
  border-right: 1px solid rgba(18, 28, 36, 0.08);
}

.wais-table-inf th:last-child,
.wais-table-inf td:last-child {
  border-right: none;
}

.wais-table-dg th,
.wais-table-dg td {
  border-right: 1px solid rgba(18, 28, 36, 0.08);
}

.wais-table-dg th:last-child,
.wais-table-dg td:last-child {
  border-right: none;
}

.wais-table-com th,
.wais-table-com td {
  border-right: 1px solid rgba(18, 28, 36, 0.08);
}

.wais-table-com th:last-child,
.wais-table-com td:last-child {
  border-right: none;
}

.wais-table-dg th:nth-child(3),
.wais-table-dg td:nth-child(3),
.wais-table-dg th:nth-child(4),
.wais-table-dg td:nth-child(4),
.wais-table-dg th:nth-child(5),
.wais-table-dg td:nth-child(5),
.wais-table-dg th:nth-child(6),
.wais-table-dg td:nth-child(6) {
  text-align: center;
}

.wais-table-dg td.dg-empty-ref {
  background: rgba(213, 214, 216, 0.75) !important;
}

.data-table.wais-table.wais-table-dg tbody tr td {
  background: #fff;
}

.data-table.wais-table.wais-table-dg tbody tr.dg-row-a td {
  background: rgba(13, 95, 99, 0.03);
}

.data-table.wais-table.wais-table-dg tbody tr.dg-row-b td {
  background: #fff;
}

.wais-table-inf .inf-elemento-header {
  text-align: center;
}

.wais-table-com .com-elemento-header {
  text-align: center;
}

.wais-table-sem th:nth-child(1),
.wais-table-sem td:nth-child(1) {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

.wais-table-sem th,
.wais-table-sem td {
  border-right: 1px solid rgba(18, 28, 36, 0.14);
}

.wais-table-sem th:last-child,
.wais-table-sem td:last-child {
  border-right: none;
}

.wais-table-sem th:nth-child(2),
.wais-table-sem td:nth-child(2) {
  min-width: 180px;
}

.wais-table-sem th:nth-child(3),
.wais-table-sem th:nth-child(4),
.wais-table-sem th:nth-child(5),
.wais-table-sem th:nth-child(6) {
  text-align: center;
}

.wais-table-sem td:nth-child(3),
.wais-table-sem td:nth-child(4),
.wais-table-sem td:nth-child(5) {
  padding: 0;
  vertical-align: top;
  min-width: 230px;
}

.wais-table-voc td:nth-child(3),
.wais-table-voc td:nth-child(4),
.wais-table-voc td:nth-child(5),
.wais-table-com td:nth-child(4),
.wais-table-com td:nth-child(5),
.wais-table-com td:nth-child(6) {
  padding: 0;
  vertical-align: top;
}

.wais-table-sem td:nth-child(6) {
  min-width: 220px;
}

.wais-table-sem td:nth-child(6) input[type="text"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.sem-score-cell {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  white-space: pre-line;
  line-height: 1.3;
  padding: 8px 10px;
  box-sizing: border-box;
  cursor: pointer;
}

.data-table td[data-score-cell-hitarea] {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.sem-score-cell:hover {
  background: transparent;
}

.sem-score-cell.is-selected {
  background: transparent;
  box-shadow: none;
}

.sem-score-cell.is-disabled {
  cursor: not-allowed;
}

.data-table td[data-score-cell-hitarea]:hover {
  background: rgba(13, 95, 99, 0.08);
}

.data-table td[data-score-cell-hitarea].is-selected {
  background: rgba(13, 95, 99, 0.16) !important;
  box-shadow: inset 0 0 0 2px rgba(13, 95, 99, 0.28);
}

.data-table td[data-score-cell-hitarea].is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.wais-table-sem tr.sem-row-score-2 td:nth-child(3),
.wais-table-sem tr.sem-row-score-2 td:nth-child(4),
.wais-table-sem tr.sem-row-score-2 td:nth-child(5),
.wais-table-sem tr.sem-row-score-1 td:nth-child(3),
.wais-table-sem tr.sem-row-score-1 td:nth-child(4),
.wais-table-sem tr.sem-row-score-1 td:nth-child(5),
.wais-table-sem tr.sem-row-score-0 td:nth-child(3),
.wais-table-sem tr.sem-row-score-0 td:nth-child(4),
.wais-table-sem tr.sem-row-score-0 td:nth-child(5) {
  background: rgba(13, 95, 99, 0.05);
}

.wais-table-sem tr.sem-row-score-2 td:nth-child(3),
.wais-table-sem tr.sem-row-score-1 td:nth-child(4),
.wais-table-sem tr.sem-row-score-0 td:nth-child(5) {
  background: rgba(13, 95, 99, 0.16);
}

.wais-table-com .com-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-cg .cg-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-voc .voc-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-sem .sem-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-cg tr.cg-item-disabled td,
.wais-table-voc tr.voc-item-disabled td,
.wais-table-sem tr.sem-item-disabled td {
  color: var(--ink);
}

.wais-table-cg tr.cg-item-disabled .wais-toggle,
.wais-table-cg tr.cg-item-disabled .cb-time-input,
.wais-table-cg tr.cg-item-disabled input:not([type="hidden"]),
.wais-table-voc tr.voc-item-disabled td[data-score-cell-hitarea],
.wais-table-sem tr.sem-item-disabled td[data-score-cell-hitarea],
.wais-table-sem tr.sem-item-disabled input:not([type="hidden"]) {
  opacity: 0.55;
}

.wais-table-cg tr.cg-item-disabled .wais-toggle,
.wais-table-cg tr.cg-item-disabled .toggle-btn,
.wais-table-cg tr.cg-item-disabled .cb-time-input,
.wais-table-cg tr.cg-item-disabled .cb-timer-btn,
.wais-table-cg tr.cg-item-disabled input:not([type="hidden"]) {
  pointer-events: none;
}

.wais-table-sem tr.sem-item-disabled td[data-score-cell-hitarea],
.wais-table-sem tr.sem-item-disabled .sem-score-cell,
.wais-table-sem tr.sem-item-disabled input:not([type="hidden"]) {
  pointer-events: none;
}

.wais-table-sem tr.sem-item-active td[data-score-cell-hitarea],
.wais-table-sem tr.sem-item-active .sem-score-cell,
.wais-table-sem tr.sem-item-active input:not([type="hidden"]),
.wais-table-sem tr.sem-item-auto td[data-score-cell-hitarea],
.wais-table-sem tr.sem-item-auto .sem-score-cell,
.wais-table-sem tr.sem-item-auto input:not([type="hidden"]) {
  opacity: 1;
}

.wais-table-ari tr.ari-item-disabled td {
  color: var(--ink);
}

.wais-table-ari tr.ari-item-disabled .wais-toggle,
.wais-table-ari tr.ari-item-disabled .cb-time-input,
.wais-table-ari tr.ari-item-disabled input:not([type="hidden"]) {
  opacity: 0.55;
  pointer-events: none;
}

.wais-table-ari tr.ari-item-active .wais-toggle,
.wais-table-ari tr.ari-item-active .cb-time-input,
.wais-table-ari tr.ari-item-active input:not([type="hidden"]),
.wais-table-ari tr.ari-item-auto .wais-toggle,
.wais-table-ari tr.ari-item-auto .cb-time-input,
.wais-table-ari tr.ari-item-auto input:not([type="hidden"]) {
  opacity: 1;
}

.wais-table-ari tr.ari-item-auto {
  background: rgba(217, 164, 91, 0.18) !important;
}

.wais-table-mt tr.mt-item-disabled .wais-toggle,
.wais-table-mt tr.mt-item-disabled input:not([type="hidden"]) {
  opacity: 0.55;
  pointer-events: none;
}

.wais-table-mt tr.mt-item-active .wais-toggle,
.wais-table-mt tr.mt-item-active input:not([type="hidden"]),
.wais-table-mt tr.mt-item-auto .wais-toggle,
.wais-table-mt tr.mt-item-auto input:not([type="hidden"]) {
  opacity: 1;
}

.wais-table-mt tr.mt-item-auto {
  background: rgba(217, 164, 91, 0.18) !important;
}

.wais-table-cg tr.cg-item-active .wais-toggle,
.wais-table-cg tr.cg-item-active .cb-time-input,
.wais-table-cg tr.cg-item-active input:not([type="hidden"]) {
  opacity: 1;
}

.wais-table-cg tr.cg-item-active .wais-toggle .toggle-btn {
  color: #1f2d3a;
}

.wais-table-cg tr.cg-item-active .cb-time-input input,
.wais-table-cg tr.cg-item-active input[type="text"]:not([type="hidden"]) {
  color: #1f2d3a;
  -webkit-text-fill-color: #1f2d3a;
}

.wais-table-cg tr.cg-item-active .cb-timer-btn {
  color: #1f2d3a;
}

.wais-table-com .com-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-cg .cg-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-voc .voc-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-sem .sem-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-com .com-start-marker img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.wais-table-cg .cg-start-marker img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.wais-table-voc .voc-start-marker img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.wais-table-sem .sem-start-marker img {
  width: 120px;
  max-width: 100%;
  height: auto;
  display: block;
}

.wais-table-inf .inf-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-inf .inf-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-inf .inf-start-marker img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.wais-table-ari .ari-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-ari .ari-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-ari .ari-start-marker img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.wais-table-mt .mt-start-row td {
  border-right: none !important;
  background: transparent !important;
  padding: 6px 10px;
}

.wais-table-mt .mt-start-marker {
  display: flex;
  justify-content: flex-start;
}

.wais-table-mt .mt-start-marker img {
  width: 240px;
  max-width: 100%;
  height: auto;
  display: block;
}

.wais-table-com tbody td:nth-child(1) {
  border-right: none;
}

.wais-table-inf tbody td:nth-child(1) {
  border-right: none;
  width: 1%;
  white-space: nowrap;
}

.wais-toggle {
  align-items: center;
  justify-content: center;
}

.wais-toggle .wais-info {
  margin-right: 6px;
}

.wais-table:not(.wais-table-perfil):not(.wais-table-cd):not(.wais-table-com):not(.wais-table-ps):not(.wais-table-sln):not(.wais-table-dg) tbody tr:nth-child(-n + 5) td {
  background: rgba(217, 164, 91, 0.18);
}

.wais-table-cd tbody tr:nth-child(-n + 5) td {
  background: transparent;
}

.wais-table-com tbody tr:nth-child(-n + 3) td {
  background: rgba(217, 164, 91, 0.18);
}

.data-table.wais-table.wais-table-voc tbody .voc-start-row + tr td {
  background: #fff !important;
}

.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-2 td:nth-child(3),
.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-1 td:nth-child(4),
.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-0 td:nth-child(5),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-2 td:nth-child(4),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-1 td:nth-child(5),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-0 td:nth-child(6) {
  background: rgba(13, 95, 99, 0.16) !important;
}

.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-2 td:nth-child(1),
.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-2 td:nth-child(2),
.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-1 td:nth-child(1),
.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-1 td:nth-child(2),
.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-0 td:nth-child(1),
.data-table.wais-table.wais-table-voc tbody tr.sem-row-score-0 td:nth-child(2),
.data-table.wais-table.wais-table-sem tbody tr.sem-row-score-2 td:nth-child(1),
.data-table.wais-table.wais-table-sem tbody tr.sem-row-score-2 td:nth-child(2),
.data-table.wais-table.wais-table-sem tbody tr.sem-row-score-1 td:nth-child(1),
.data-table.wais-table.wais-table-sem tbody tr.sem-row-score-1 td:nth-child(2),
.data-table.wais-table.wais-table-sem tbody tr.sem-row-score-0 td:nth-child(1),
.data-table.wais-table.wais-table-sem tbody tr.sem-row-score-0 td:nth-child(2),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-2 td:nth-child(1),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-2 td:nth-child(2),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-1 td:nth-child(1),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-1 td:nth-child(2),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-0 td:nth-child(1),
.data-table.wais-table.wais-table-com tbody tr.sem-row-score-0 td:nth-child(2) {
  background: rgba(13, 95, 99, 0.82) !important;
  color: #fff !important;
  font-weight: 700;
}

.data-table.wais-table.wais-table-inf thead th:nth-child(2) {
  background: rgba(13, 95, 99, 0.16);
  white-space: nowrap;
}

.data-table.wais-table.wais-table-inf thead th:last-child {
  text-align: center;
}

.data-table.wais-table.wais-table-inf tbody tr td:nth-child(3) {
  background: rgba(13, 95, 99, 0.08);
  white-space: nowrap;
}

.data-table.wais-table.wais-table-com thead th:nth-child(2) {
  background: rgba(197, 144, 58, 0.2);
}

.data-table.wais-table.wais-table-com tbody tr td:nth-child(3) {
  background: rgba(197, 144, 58, 0.12);
}

.ps-examples {
  display: grid;
  gap: 12px;
  margin: 10px 0 14px;
}

.ps-example-block {
  border: 1px solid rgba(18, 28, 36, 0.18);
  border-radius: 0;
  background: #fff;
}

.ps-example-block h5 {
  margin: 0;
  padding: 6px 10px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  color: #1f3e66;
  background: #f1f2f4;
  border-bottom: 1px solid rgba(18, 28, 36, 0.18);
}

.ps-grid-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
}

.data-table.wais-table.wais-table-ps-grid {
  width: auto;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.data-table.wais-table.wais-table-ps-grid td {
  min-width: 42px;
  height: 40px;
  padding: 0 4px;
  text-align: center;
  vertical-align: middle;
  border: 2px solid #1f1f1f;
  background: #ececed !important;
  color: #35578a;
  font-size: 26px;
  line-height: 1;
  font-weight: 600;
}

.ps-symbol-img {
  display: block;
  width: 34px;
  height: 34px;
  margin: 0 auto;
  object-fit: contain;
}

.data-table.wais-table.wais-table-ps-grid.wais-table-ps-grid-small td {
  min-width: 54px;
}

.ps-answer-tables {
  display: grid;
  gap: 10px;
  margin: 8px 0 14px;
}

.ps-table-block {
  display: grid;
  gap: 0;
}

.ps-answer-tables .table-scroll {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 8px;
}

.data-table.wais-table.wais-table-ps {
  --ps-symbol-col: clamp(34px, 4.2vw, 50px);
  --ps-gap-col: 2ch;
  --ps-answer-col: clamp(170px, 24vw, 250px);
  --ps-img-size: clamp(20px, 2.8vw, 32px);
  width: 100%;
  min-width: 760px;
  table-layout: auto;
}

.data-table.wais-table.wais-table-ps th,
.data-table.wais-table.wais-table-ps td {
  padding: 4px 6px;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid rgba(18, 28, 36, 0.12);
}

.data-table.wais-table.wais-table-ps th:last-child,
.data-table.wais-table.wais-table-ps td:last-child {
  border-right: none;
}

.data-table.wais-table.wais-table-ps tbody td:nth-child(-n + 8) {
  min-width: var(--ps-symbol-col);
  width: var(--ps-symbol-col);
  font-size: clamp(14px, 1.8vw, 20px);
  line-height: 1;
}

.data-table.wais-table.wais-table-ps th.ps-gap-col,
.data-table.wais-table.wais-table-ps td.ps-gap-col {
  width: var(--ps-gap-col);
  min-width: var(--ps-gap-col);
  max-width: var(--ps-gap-col);
  padding: 0;
  background: transparent !important;
  border-left: 1px solid rgba(18, 28, 36, 0.2);
  border-right: 1px solid rgba(18, 28, 36, 0.2);
}

.data-table.wais-table.wais-table-ps thead th.ps-gap-col,
.data-table.wais-table.wais-table-ps tbody td.ps-gap-col {
  border-bottom: none !important;
}

.data-table.wais-table.wais-table-ps tbody td:nth-child(2) {
  border-right: none;
}

.data-table.wais-table.wais-table-ps tbody td:nth-child(4) {
  border-left: none;
}

.data-table.wais-table.wais-table-ps tbody td:nth-child(9) {
  width: var(--ps-answer-col);
  min-width: var(--ps-answer-col);
}

.data-table.wais-table.wais-table-ps td:nth-child(9) .wais-toggle {
  width: 100%;
  justify-content: center;
}

.data-table.wais-table.wais-table-ps td:nth-child(9) .wais-toggle .toggle-btn {
  min-width: clamp(70px, 10vw, 92px);
}

.data-table.wais-table.wais-table-ps td .ps-symbol-img {
  width: var(--ps-img-size);
  height: var(--ps-img-size);
}

.ps-stop-banner {
  margin-top: 16px;
  padding: 14px 20px;
  background: rgba(217, 164, 91, 0.18);
  border: 1.5px solid rgba(217, 164, 91, 0.55);
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #7a5a1e;
  text-align: center;
}

.data-table.wais-table.wais-table-ps tbody td:not(.ps-gap-col) {
  background: rgba(255, 255, 255, 0.96);
}

.data-table.wais-table.wais-table-ps tbody tr:nth-child(even) td:not(.ps-gap-col) {
  background: rgba(13, 95, 99, 0.03);
}

.data-table.wais-table.wais-table-sln th,
.data-table.wais-table.wais-table-sln td {
  border-right: 1px solid rgba(18, 28, 36, 0.14);
}

.data-table.wais-table.wais-table-sln th:last-child,
.data-table.wais-table.wais-table-sln td:last-child {
  border-right: none;
}

.data-table.wais-table.wais-table-sln th:nth-child(1),
.data-table.wais-table.wais-table-sln td:nth-child(1),
.data-table.wais-table.wais-table-sln th:nth-child(5),
.data-table.wais-table.wais-table-sln td:nth-child(5) {
  text-align: center;
}

.data-table.wais-table.wais-table-sln tbody tr td {
  background: #fff;
}

.data-table.wais-table.wais-table-sln tbody tr.sln-row-a td {
  background: rgba(13, 95, 99, 0.03);
}

.data-table.wais-table.wais-table-sln tbody tr.sln-row-b td {
  background: #fff;
}

.data-table.wais-table.wais-table-ps tr.ps-partial-row td {
  padding: 6px 8px;
  border-top: 1px solid rgba(18, 28, 36, 0.14);
  background: rgba(13, 95, 99, 0.06);
}

.data-table.wais-table.wais-table-ps tr.ps-partial-row td.ps-partial-label {
  text-align: right;
  font-weight: 600;
}

.data-table.wais-table.wais-table-ps tr.ps-partial-row td.ps-partial-value {
  text-align: center;
  font-weight: 700;
}

.wais-table-cd td.cd-highlight-cell {
  background: rgba(217, 164, 91, 0.45);
  box-shadow: inset 0 0 0 1px rgba(217, 164, 91, 0.55);
}

.wais-table-cd td.cd-highlight-cell .cd-btn:not(.is-correct):not(.is-wrong) {
  background: transparent;
}

.wais-table-cd td.cd-highlight-cell .cd-btn.is-correct {
  background: #2f855a;
  border-color: #2f855a;
  color: #fff;
}

.wais-table-cd td.cd-highlight-cell .cd-btn.is-wrong {
  background: #c53030;
  border-color: #c53030;
  color: #fff;
}

.wais-table-perfil td {
  text-align: left;
  vertical-align: top;
}

.wais-table-perfil th,
.wais-table-perfil td {
  border-right: 1px solid rgba(18, 28, 36, 0.08);
}

.wais-table-perfil th:last-child,
.wais-table-perfil td:last-child {
  border-right: none;
}

.wais-table-perfil-qi td:first-child {
  width: auto;
  min-width: 260px;
  white-space: nowrap;
}

.wais-table-perfil-indices td:first-child {
  width: auto;
  min-width: 260px;
  white-space: nowrap;
}

.wais-table-perfil-qi tbody td:nth-child(2),
.wais-table-perfil-qi tbody td:nth-child(3),
.wais-table-perfil-qi tbody td:nth-child(4),
.wais-table-perfil-indices tbody td:nth-child(2),
.wais-table-perfil-indices tbody td:nth-child(3),
.wais-table-perfil-indices tbody td:nth-child(4) {
  text-align: center;
}

.wais-table-perfil-qi tbody tr.perfil-qi-header-row td,
.wais-table-perfil-indices tbody tr.perfil-qi-header-row td,
.wais-table-perfil-subtests tbody tr.perfil-qi-header-row td {
  background: rgba(13, 95, 99, 0.14);
  color: var(--brand-strong);
  font-weight: 700;
  text-align: center;
}

.wais-table-perfil-subtests tbody td.perfil-subtests-empty-cell,
.wais-table-perfil-subtests tbody td:nth-child(n + 3):nth-child(-n + 8):empty {
  background: #eceff3 !important;
}

.wais-table-perfil-subtests tbody td:nth-child(n + 3):nth-child(-n + 13) {
  text-align: center;
}

.wais-table-perfil-subtests tbody tr.perfil-subtests-real-row td:nth-child(1),
.wais-table-perfil-subtests tbody tr.perfil-subtests-real-row td:nth-child(2) {
  background: #e8f5ee !important;
}

.wais-table-perfil-subtests tbody tr.perfil-subtests-verbal-row td:nth-child(1),
.wais-table-perfil-subtests tbody tr.perfil-subtests-verbal-row td:nth-child(2) {
  background: #f2eef7 !important;
}

.perfil-subtests-legend {
  margin-top: 6px;
  margin-bottom: 14px;
  padding: 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12px;
  color: var(--muted);
}

.perfil-subtests-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.perfil-subtests-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(18, 28, 36, 0.14);
  flex: 0 0 12px;
}

.perfil-subtests-legend-swatch-real {
  background: #e8f5ee;
}

.perfil-subtests-legend-swatch-verbal {
  background: #f2eef7;
}

.perfil-tables {
  display: grid;
  gap: 12px;
}

.perfil-table-block {
  display: grid;
  gap: 8px;
}

.perfil-table-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.perfil-graphs {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 8px;
  align-items: start;
}

.perfil-graph-card {
  padding: 8px;
  border: 1px solid rgba(18, 28, 36, 0.14);
  border-radius: 10px;
  background: #f8fafb;
}

.perfil-graph-title {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.2;
  color: #3e7e97;
}

.perfil-graph-canvas {
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.perfil-graph-svg {
  display: block;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  height: auto;
  background: #fdfefe;
}

.perfil-text-card {
  border: 1px solid rgba(18, 28, 36, 0.14);
  border-radius: 10px;
  background: #f8fafb;
  padding: 10px;
}

.perfil-textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid rgba(18, 28, 36, 0.16);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.45;
}

.perfil-textarea:focus {
  outline: 2px solid rgba(13, 95, 99, 0.22);
  border-color: rgba(13, 95, 99, 0.35);
}

.perfil-textarea-admin {
  min-height: 220px;
}

.perfil-admin-note {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .perfil-graphs {
    grid-template-columns: 1fr;
  }
}

.wais-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.wais-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(18, 28, 36, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.cd-legend {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
}

.cd-legend td {
  padding: 6px 8px;
  border: 1px solid rgba(18, 28, 36, 0.08);
}

.wais-note h5 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
}

.wais-note-extra {
  margin-top: 0;
  font-size: 14px;
  color: var(--muted);
}

.wais-note p {
  margin: 0;
}

.wais-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(13, 95, 99, 0.08);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.wais-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.recent-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(13, 95, 99, 0.08);
  border: 1px solid rgba(13, 95, 99, 0.16);
  transition: background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.recent-card:hover {
  background: rgba(13, 95, 99, 0.12);
  border-color: rgba(13, 95, 99, 0.26);
}

.recent-title {
  font-weight: 600;
  font-size: 14px;
}

.recent-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.recent-data {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 12px;
}

.recent-date {
  color: var(--muted);
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(13, 95, 99, 0.16);
  color: var(--brand-strong);
  font-weight: 600;
}

.action-list {
  display: grid;
  gap: 14px;
}

.action-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(13, 95, 99, 0.16);
  background: rgba(13, 95, 99, 0.05);
}

.action-card-main {
  min-width: 0;
}

.action-card-title {
  font-size: 15px;
  font-weight: 600;
}

.action-card-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.action-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.action-card-date {
  font-size: 12px;
  color: var(--muted);
}

.action-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.action-card-actions form {
  margin: 0;
}

.history-live-search {
  margin-bottom: 16px;
}

.history-live-search .form-field {
  max-width: 720px;
}

.history-filter-form {
  display: grid;
  gap: 16px;
}

.history-filter-panel {
  padding: 0;
  overflow: hidden;
}

.history-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.history-filter-summary::-webkit-details-marker {
  display: none;
}

.history-filter-summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(13, 95, 99, 0.12);
  color: var(--brand-strong);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.history-filter-panel[open] .history-filter-summary::after {
  content: "-";
}

.history-filter-summary-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.history-filter-panel .history-filter-form {
  padding: 0 20px 20px;
}

.history-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.history-search-field {
  grid-column: span 2;
}

.history-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-title-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 24px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(13, 95, 99, 0.12);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}

.patient-access-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(13, 95, 99, 0.16);
  border-radius: 12px;
  background: rgba(13, 95, 99, 0.05);
}

.patient-access-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.patient-access-head strong {
  display: block;
  color: var(--text);
}

.patient-access-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.patient-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.patient-access-grid > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(18, 28, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.patient-access-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.patient-access-grid strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.patient-access-grid small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.history-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
}

.history-status-badge strong {
  font-weight: 800;
}

.history-status-new {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.history-status-started {
  color: #854d0e;
  background: #fef3c7;
  border-color: #fde68a;
}

.history-status-finished {
  color: #ffffff;
  background: #14532d;
  border-color: #14532d;
}

.report {
  border: 1px dashed rgba(18, 28, 36, 0.2);
}

.report-body p {
  margin-bottom: 8px;
  color: var(--ink);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--surface-2);
  color: var(--ink);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 20px rgba(13, 95, 99, 0.2);
}

.btn-outline {
  border: 1px solid rgba(13, 95, 99, 0.3);
  background: transparent;
  color: var(--brand-strong);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

[data-test-focus-toggle].is-active {
  background: rgba(13, 95, 99, 0.16);
  border-color: rgba(13, 95, 99, 0.5);
  color: var(--brand-strong);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-icon [data-focus-icon] {
  font-size: 17px;
  line-height: 1;
}

.btn-ghost {
  background: rgba(13, 95, 99, 0.08);
  color: var(--brand-strong);
}

.btn-danger {
  background: #f8ecec;
  color: #8f2020;
  border: 1px solid rgba(143, 32, 32, 0.28);
}

.btn-danger:hover {
  background: #f4dfdf;
}

.settings-delete-field {
  display: none;
}

.settings-delete-cell {
  text-align: center;
}

.settings-delete-btn {
  min-height: 32px;
}

.settings-row-pending-delete {
  opacity: 0.55;
}

.settings-row-pending-delete td {
  background: #fff5f5;
}

.btn.full {
  width: 100%;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.autosave-status {
  font-size: 12px;
  color: var(--muted);
  margin-right: auto;
}

.autosave-status[data-state="saving"] {
  color: var(--brand-strong);
}

.autosave-status[data-state="saved"] {
  color: #2f855a;
}

.autosave-status[data-state="error"] {
  color: #c53030;
}

.tabs {
  display: grid;
  gap: 16px;
}

.tabs > input {
  display: none;
}

.tab-controls {
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
  background: #fff;
  border: 1px solid rgba(13, 95, 99, 0.18);
  border-radius: 999px;
  padding: 6px;
}

.tab-controls label {
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand-strong);
  transition: background 0.2s ease, color 0.2s ease;
}

#tab-info:checked ~ .tab-controls label[for="tab-info"],
#tab-anamnese:checked ~ .tab-controls label[for="tab-anamnese"],
#tab-tests:checked ~ .tab-controls label[for="tab-tests"],
#tab-start:checked ~ .tab-controls label[for="tab-start"],
#tab-relatorio-global:checked ~ .tab-controls label[for="tab-relatorio-global"] {
  background: var(--brand);
  color: #fff;
}

.tab-panels {
  background: var(--surface-2);
  padding: 16px;
  border-radius: 18px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.anamnese-editor {
  border: 1px solid rgba(18, 28, 36, 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.anamnese-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid rgba(18, 28, 36, 0.1);
  background: rgba(13, 95, 99, 0.04);
}

.anamnese-stt-btn.is-recording {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.anamnese-ai-status {
  display: block;
  min-height: 18px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.anamnese-ai-status.is-saving {
  color: #b45309;
}

.anamnese-ai-status.is-ok {
  color: #047857;
}

.anamnese-ai-status.is-error {
  color: #b91c1c;
}

.anamnese-editor-content {
  min-height: 220px;
  padding: 12px;
  line-height: 1.45;
  outline: none;
}

.anamnese-editor-content:empty::before {
  content: "Escreva aqui a anamnese...";
  color: rgba(18, 28, 36, 0.4);
}

.anamnese-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tab-info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 8px 12px;
  margin-bottom: 14px;
  background: #f4f6f8;
  border-radius: 8px;
  border: 1px solid #e2e6ea;
  font-size: 13px;
  color: #3a3a3a;
}

.tab-info-strip:empty {
  display: none;
}

.wais-rule-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.wais-rule-alert[hidden] {
  display: none !important;
}

.tab-info-strip-item {
  display: flex;
  gap: 5px;
  align-items: baseline;
}

.tab-info-strip-label {
  font-size: 11px;
  font-weight: 600;
  color: #7a8799;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tab-header h4 {
  margin: 0;
}

.tab-header-actions,
.test-inline-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cd-timer-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cd-timer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 95, 99, 0.24);
  background: rgba(13, 95, 99, 0.08);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.cd-timer-chip.is-running {
  border-color: rgba(45, 102, 173, 0.4);
  background: rgba(45, 102, 173, 0.12);
  color: #1f4f89;
}

.cd-timer-chip.is-finished {
  border-color: rgba(197, 48, 48, 0.45);
  background: rgba(197, 48, 48, 0.14);
  color: #9b2c2c;
}

.test-inline-actions {
  margin-bottom: 8px;
}

.md-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.md-info-col {
  display: flex;
  flex-direction: column;
}

.md-tables {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  align-items: start;
}

.md-table-block {
  display: grid;
  gap: 6px;
}

.md-instrucao {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(13, 95, 99, 0.06);
  border-left: 3px solid rgba(13, 95, 99, 0.4);
  font-size: 13px;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.md-instrucao-label {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-instrucao-text {
  font-style: italic;
}

.md-training-block {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(18, 28, 36, 0.1);
}

.md-training-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.md-training-example {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(18, 28, 36, 0.03);
  border: 1px solid rgba(18, 28, 36, 0.08);
  font-size: 13px;
}

.md-training-example-2 {
  background: rgba(220, 150, 30, 0.05);
  border-color: rgba(220, 150, 30, 0.25);
}

.md-training-ex-label {
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-training-seq {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.md-training-answer {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

.md-training-note {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.md-training-note-fail {
  color: #c07000;
}

.md-training-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(18, 28, 36, 0.08);
}

.md-training-result-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-training-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.md-training-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.wais-table-md th:first-child,
.wais-table-md td:first-child,
.wais-table-md th:nth-child(2),
.wais-table-md td:nth-child(2) {
  width: 48px;
  text-align: center;
}

.wais-table-md th:nth-child(3),
.wais-table-md td:nth-child(3) {
  text-align: left;
}

.wais-table-md th:nth-child(4),
.wais-table-md td:nth-child(4) {
  text-align: center;
}

.wais-table-md th,
.wais-table-md td {
  border-right: 1px solid rgba(18, 28, 36, 0.08);
}

.wais-table-md th:last-child,
.wais-table-md td:last-child {
  border-right: none;
}

.wais-table-md tbody tr:nth-child(even) td {
  background: transparent;
}

.md-row-stop td {
  background: rgba(220, 60, 40, 0.07) !important;
}

.md-row-locked td {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.md-section-locked {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

#tab-info:checked ~ .tab-panels .tab-panel[data-tab="info"],
#tab-anamnese:checked ~ .tab-panels .tab-panel[data-tab="anamnese"],
#tab-tests:checked ~ .tab-panels .tab-panel[data-tab="tests"],
#tab-start:checked ~ .tab-panels .tab-panel[data-tab="start"],
#tab-relatorio-global:checked ~ .tab-panels .tab-panel[data-tab="relatorio-global"] {
  display: block;
}
#tab-info:checked ~ .tab-panels .tab-panel[data-tab="info"],
#tab-perfil:checked ~ .tab-panels .tab-panel[data-tab="perfil"],
#tab-relatorio:checked ~ .tab-panels .tab-panel[data-tab="relatorio"],
#tab-prompts:checked ~ .tab-panels .tab-panel[data-tab="prompts"],
#tab-prompt:checked ~ .tab-panels .tab-panel[data-tab="prompt"],
#tab-cg:checked ~ .tab-panels .tab-panel[data-tab="cg"],
#tab-voc:checked ~ .tab-panels .tab-panel[data-tab="voc"],
#tab-cd:checked ~ .tab-panels .tab-panel[data-tab="cd"],
#tab-sem:checked ~ .tab-panels .tab-panel[data-tab="sem"],
#tab-cb:checked ~ .tab-panels .tab-panel[data-tab="cb"],
#tab-ari:checked ~ .tab-panels .tab-panel[data-tab="ari"],
#tab-mt:checked ~ .tab-panels .tab-panel[data-tab="mt"],
#tab-md:checked ~ .tab-panels .tab-panel[data-tab="md"],
#tab-inf:checked ~ .tab-panels .tab-panel[data-tab="inf"],
#tab-dg:checked ~ .tab-panels .tab-panel[data-tab="dg"],
#tab-com:checked ~ .tab-panels .tab-panel[data-tab="com"],
#tab-ps:checked ~ .tab-panels .tab-panel[data-tab="ps"],
#tab-sln:checked ~ .tab-panels .tab-panel[data-tab="sln"] {
  display: block;
}

.wais-nav {
  display: grid;
  gap: 10px;
}

.wais-nav-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.wais-nav-item {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wais-nav-item:hover {
  background: #fff;
  border-color: rgba(13, 95, 99, 0.3);
  box-shadow: 0 10px 24px rgba(13, 95, 99, 0.12);
  transform: translateY(-1px);
}

.wais-nav-item.active {
  background: #fff;
  color: var(--brand-strong);
  border-color: rgba(13, 95, 99, 0.6);
  box-shadow: 0 12px 28px rgba(13, 95, 99, 0.18);
}

.settings-nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
}

.settings-nav-button.active {
  background: var(--brand-strong);
  box-shadow: 0 12px 28px rgba(13, 95, 99, 0.22);
}

.wais-nav-item.status-partial {
  background: rgba(245, 190, 40, 0.18);
  border-color: rgba(245, 190, 40, 0.45);
  color: #7a5a00;
}

.wais-nav-item.status-complete {
  background: rgba(48, 170, 90, 0.18);
  border-color: rgba(48, 170, 90, 0.5);
  color: #1f6a3b;
}

.wais-nav-item.active.status-partial {
  background: rgba(245, 190, 40, 0.32);
  border-color: rgba(245, 190, 40, 0.75);
  color: #7a5a00;
  box-shadow: 0 12px 28px rgba(245, 190, 40, 0.24);
}

.wais-nav-item.active.status-complete {
  background: rgba(48, 170, 90, 0.32);
  border-color: rgba(48, 170, 90, 0.75);
  color: #1f6a3b;
  box-shadow: 0 12px 28px rgba(48, 170, 90, 0.24);
}

.oci-helper-text {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.data-table.wais-table.oci-table th:nth-child(1),
.data-table.wais-table.oci-table td:nth-child(1) {
  width: 60px;
  text-align: center;
}

.data-table.wais-table.oci-table th:nth-child(2),
.data-table.wais-table.oci-table td:nth-child(2) {
  text-align: left;
}

.data-table.wais-table.oci-table th:nth-child(3),
.data-table.wais-table.oci-table td:nth-child(3) {
  width: 140px;
  text-align: center;
}

.oci-subscale-table th,
.oci-subscale-table td {
  text-align: center;
}

.oci-subscale-table th:first-child,
.oci-subscale-table td:first-child {
  text-align: left;
}

.oci-analise-table {
  border: 1px solid #b8b8b8;
  background: #d9d9db;
}

.oci-analise-table th,
.oci-analise-table td {
  border: 1px solid #b8b8b8;
  background: #d9d9db;
  color: #33363a;
  padding: 6px 7px;
  font-size: 14px;
  line-height: 1.25;
}

.oci-analise-table thead th {
  background: #2f435f;
  color: #f2f2f2;
  font-weight: 700;
}

.oci-analise-table th:nth-child(5) {
  text-decoration: underline;
}

.oci-analise-table td {
  font-weight: 600;
}

.oci-analise-table td:first-child {
  font-weight: 700;
}

.oci-analise-table th:nth-child(n + 2),
.oci-analise-table td:nth-child(n + 2) {
  text-align: center;
}

.asrs-screener-table th:nth-child(1),
.asrs-screener-table td:nth-child(1) {
  width: 64px;
  text-align: center;
}

.asrs-screener-table th:nth-child(2),
.asrs-screener-table td:nth-child(2) {
  text-align: left;
}

.oci-analise-resultado {
  font-weight: 700;
}

.oci-analise-resultado.is-above {
  color: #b63a2d;
}

.oci-analise-resultado.is-below {
  color: #3d596f;
}

.oci-total-banner {
  margin-top: 14px;
  background: #2f435f;
  border: 1px solid #2a3c55;
  padding: 10px 12px;
  text-align: center;
}

.oci-total-main {
  margin: 0;
  color: #f2f2f2;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 700;
  line-height: 1.25;
}

.oci-total-main .label {
  color: #f2f2f2;
}

.oci-total-main .value {
  color: #f2f2f2;
}

.oci-total-main.is-significant .value {
  color: #f2cf44;
}

.oci-total-main.is-nonsignificant .value {
  color: #7ecf92;
}

.oci-total-main.is-incomplete .value {
  color: #f0b24a;
}

.oci-total-main .separator {
  color: #c7c7c7;
  margin: 0 8px;
}

.oci-total-main .cutoff {
  color: #d7d7d7;
  font-size: 0.9em;
  font-weight: 500;
}

.oci-total-result {
  margin: 6px 0 0;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 700;
  line-height: 1.2;
}

.oci-total-result.is-significant {
  color: #f2cf44;
}

.oci-total-result.is-nonsignificant {
  color: #7ecf92;
}

.oci-total-result.is-incomplete {
  color: #f0b24a;
}

.oci-group-card {
  border: 1px solid rgba(18, 28, 36, 0.12);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}

.oci-group-card h5 {
  margin: 0 0 10px;
}

.oci-items-list {
  display: grid;
  gap: 10px;
}

.oci-item-row {
  border-top: 1px solid rgba(18, 28, 36, 0.08);
  padding-top: 10px;
}

.oci-item-row:first-child {
  border-top: none;
  padding-top: 0;
}

.oci-item-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.oci-item-options ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.oci-item-options li label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.form-error {
  color: #c53030;
  font-size: 12px;
  margin-top: 4px;
}

.oci-interpretacao {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
}

.oci-report-body {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.oci-report-section {
  border: 1px solid rgba(18, 28, 36, 0.12);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(18, 28, 36, 0.05);
}

.oci-report-section h5 {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(18, 28, 36, 0.1);
  font-size: 14px;
  font-weight: 700;
}

.oci-interpretacao-paragraph {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.oci-interpretacao-paragraph:last-child {
  margin-bottom: 0;
}

.oci-cutoff-note {
  margin: 0;
  color: #44566a;
  font-size: 13px;
  font-weight: 600;
}

.oci-panel-actions {
  position: sticky;
  bottom: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(245, 247, 249, 0.96);
  backdrop-filter: blur(3px);
  padding: 12px 0 6px;
  margin-top: 16px;
}

.oci-panel-actions .oci-save-status,
.oci-panel-actions .save-status {
  margin-right: auto;
}

.patient-next-btn {
  display: inline-flex;
}

.patient-next-btn[hidden] {
  display: none !important;
}

.wais-next-actions {
  display: flex;
  position: sticky;
  bottom: 0;
  z-index: 12;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(245, 247, 249, 0.96);
  backdrop-filter: blur(3px);
  padding: 12px 0 6px;
  margin-top: 16px;
}

.oci-panel-actions.is-hidden {
  display: none;
}

.asrs-actions-fixed {
  position: sticky;
  right: auto;
  bottom: 0;
  z-index: 12;
  padding: 12px 0 6px;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 960px) {
  .asrs-actions-fixed {
    right: auto;
    bottom: 0;
    left: auto;
    justify-content: flex-end;
  }
}

.oci-save-status {
  font-size: 12px;
  color: #5c6f80;
}

.oci-save-status.is-saving {
  color: #2f435f;
}

.oci-save-status.is-ok {
  color: #2a7f43;
}

.oci-save-status.is-error {
  color: #b83b2f;
}

.oci-paper {
  background: #f5f5f5;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  padding: 14px;
}

.oci-paper-title {
  margin: 0 0 8px;
  color: #2f2f2f;
}

.oci-paper-text {
  margin: 0 0 10px;
  color: #2f2f2f;
  font-size: 13px;
  line-height: 1.45;
}

.oci-test-info-card {
  border: 1px solid rgba(18, 28, 36, 0.12);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 14px;
  margin-top: 12px;
}

.oci-test-info-card h5 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2d3a;
}

.oci-test-info-card p {
  margin: 0 0 10px;
  color: #2f2f2f;
  font-size: 13px;
  line-height: 1.5;
  text-align: justify;
}

.oci-test-info-card p:last-child {
  margin-bottom: 0;
}

.oci-avaliacao-card {
  border: 1px solid rgba(18, 28, 36, 0.12);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 14px;
}

.oci-avaliacao-card h5 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2d3a;
}

.oci-avaliacao-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.oci-avaliacao-item label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.oci-observacoes-card {
  border: 1px solid rgba(18, 28, 36, 0.12);
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 14px;
  margin-top: 12px;
}

.oci-observacoes-card h5 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1f2d3a;
}

.oci-observacoes-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.oci-observacoes-card textarea {
  width: 100%;
  display: block;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .oci-avaliacao-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .oci-avaliacao-list {
    grid-template-columns: 1fr;
  }
}

.oci-paper-scale {
  width: 420px;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 12px;
  table-layout: fixed;
}

.oci-paper-scale th,
.oci-paper-scale td {
  border: 1px solid #8f8f8f;
  text-align: center;
  padding: 4px 6px;
  background: #efefef;
  color: #2d2d2d;
}

.oci-paper-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #f0f0f0;
  font-size: 12px;
  border: 1px solid #8f8f8f;
}

.oci-paper-table th,
.oci-paper-table td {
  border-top: 1px solid #8f8f8f;
  border-bottom: 1px solid #8f8f8f;
  border-left: none;
  border-right: none;
  padding: 4px 6px;
  color: #2d2d2d;
}

.oci-paper-table th {
  background: #e5e5e5;
  text-align: center;
  font-weight: 600;
}

.oci-paper-table th:first-child,
.oci-paper-table td:first-child {
  width: auto;
  text-align: left;
}

.oci-paper-table th:not(:first-child),
.oci-paper-table td:not(:first-child) {
  width: 40px;
  text-align: center;
}

.oci-score-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.oci-score-pill input[type="radio"] {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.oci-score-pill span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #8f8f8f;
  background: #ffffff;
  color: #2d2d2d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.oci-score-pill input[type="radio"]:checked + span {
  background: #2f435f;
  border-color: #2f435f;
  color: #ffffff;
}

.oci-score-pill input[type="radio"]:focus-visible + span {
  outline: 2px solid rgba(47, 67, 95, 0.45);
  outline-offset: 1px;
}

.hads-response-sheet {
  display: grid;
  gap: 12px;
}

.hads-item {
  border: 1px solid rgba(18, 28, 36, 0.14);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.hads-item.is-unanswered {
  border-color: #d9a45b;
  background: #fff8e6;
}

.hads-item.is-unanswered .hads-item-header {
  background: #fff0bf;
}

.hads-item-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f2f5f6;
  border-bottom: 1px solid rgba(18, 28, 36, 0.1);
}

.hads-item-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.hads-item-text {
  color: #1f2d3a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.hads-item-scale {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(13, 95, 99, 0.1);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.hads-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 12px;
}

.hads-option {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(18, 28, 36, 0.14);
  border-radius: 8px;
  background: #fbfbfb;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hads-option:hover {
  border-color: rgba(13, 95, 99, 0.35);
  background: #f6fbfb;
}

.hads-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hads-option-text {
  color: #2d2d2d;
  font-size: 12px;
  line-height: 1.3;
}

.hads-option:has(input:checked) {
  border-color: rgba(13, 95, 99, 0.55);
  background: rgba(13, 95, 99, 0.08);
  box-shadow: 0 0 0 2px rgba(13, 95, 99, 0.08);
}

.hads-option:has(input:checked) .hads-option-text {
  color: var(--brand-strong);
  font-weight: 700;
}

.hads-option:has(input:focus-visible) {
  outline: 2px solid rgba(13, 95, 99, 0.45);
  outline-offset: 2px;
}

.oci-paper-error-row td {
  background: #fff3f3;
}

.selected-tests {
  display: grid;
  gap: 16px;
}

.selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.selected-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.selected-header h3 {
  margin: 0;
  font-size: 16px;
}

.selected-groups {
  display: grid;
  gap: 16px;
}

.selected-group {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(18, 28, 36, 0.08);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.selected-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.selected-group-header h4 {
  margin: 0;
  font-size: 14px;
}

.selected-group-list {
  display: grid;
  gap: 10px;
}

.selected-group-block {
  display: grid;
  gap: 8px;
}

.selected-group-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #e9f7ea;
  border: 1px solid #b9dfbc;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-group-item .test-delivery-icons {
  flex-shrink: 0;
}

.delivery-mode-legend {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.delivery-mode-legend h4 {
  margin: 0 0 7px;
  font-size: 0.76rem;
  color: var(--color-text, #1f2937);
}

.delivery-mode-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.delivery-mode-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  color: var(--color-muted, #667085);
}

.delivery-mode-legend-item .test-delivery-icon {
  width: 20px;
  height: 20px;
  border-width: 1px;
  box-shadow: none;
}

.delivery-mode-legend-item .test-delivery-symbol {
  width: 11px;
  height: 11px;
}

.settings-tests-table th .test-delivery-icon {
  width: 22px;
  height: 22px;
  margin-right: 4px;
  border-width: 1px;
  box-shadow: none;
  vertical-align: middle;
}

.settings-tests-table th .test-delivery-symbol {
  width: 13px;
  height: 13px;
}

.selected-group-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2f5b34;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-group-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.selected-group-body strong {
  display: block;
  font-size: 13px;
  color: #1a3a1c;
  line-height: 1.2;
}

.selected-group-meta {
  display: block;
  color: #406343;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.selected-group-item[draggable="true"] {
  cursor: grab;
}

.selected-group-item.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.selected-group-item:hover {
  background: #dff2e0;
  border-color: #9fcea3;
}

.selected-group-item.is-drop-before {
  box-shadow: inset 0 3px 0 #0d5f63;
}

.selected-group-item.is-drop-after {
  box-shadow: inset 0 -3px 0 #0d5f63;
}

.selected-subtest-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.selected-subtest-item {
  padding: 9px 12px;
  border-radius: 10px;
  background: #f4fbf5;
  border: 1px solid #d2ead4;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-subtest-badge {
  flex-shrink: 0;
  min-width: 42px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #6f8f72;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-subtest-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.selected-subtest-body strong {
  display: block;
  font-size: 12px;
  color: #244726;
  line-height: 1.25;
}

.selected-subtest-item[draggable="true"] {
  cursor: grab;
}

.selected-subtest-item.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.selected-subtest-item:hover {
  background: #edf8ee;
  border-color: #c2dfc5;
}

.selected-subtest-item.is-drop-before {
  box-shadow: inset 0 3px 0 #0d5f63;
}

.selected-subtest-item.is-drop-after {
  box-shadow: inset 0 -3px 0 #0d5f63;
}

.selected-remove-zone {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(18, 28, 36, 0.26);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
  transition: all 0.18s ease;
}

.selected-remove-zone.active {
  border-color: rgba(178, 52, 52, 0.6);
  color: #8a2828;
  background: rgba(255, 245, 245, 0.95);
}

.selected-remove-zone.is-over {
  border-color: #b23434;
  background: #ffeaea;
  color: #7f1f1f;
  box-shadow: 0 0 0 2px rgba(178, 52, 52, 0.18);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.auth-card {
  width: min(420px, 92vw);
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.auth-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.auth-brand-logo {
  display: block;
  width: min(320px, 100%);
  height: auto;
  object-fit: contain;
}

.auth-brand h1 {
  margin: 0;
  font-size: 20px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.form-error {
  background: rgba(208, 55, 72, 0.12);
  color: #9d1b2b;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   RESPONSIVE — TABLET  (≤ 980 px)
   ============================================================ */
@media (max-width: 980px) {
  .content {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 16px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .menu {
    flex-wrap: wrap;
    gap: 8px;
  }

  .main-header {
    flex-direction: column;
    gap: 12px;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }

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

  .wais-nav {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 768 px)
   ============================================================ */

/* Backdrop para fechar o sidebar no mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 299;
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.is-visible {
  display: block;
}

/* Botão hamburger — só visível em mobile */
.mobile-sidebar-btn {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

/* Nav mobile (links da topbar visíveis dentro do sidebar) */
.mobile-nav-links {
  display: none;
}

.mobile-logout-form {
  display: none;
}

@media (max-width: 768px) {
  /* --- Topbar --- */
  .topbar {
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .mobile-sidebar-btn {
    display: inline-flex;
    order: -1;
  }

  /* Esconde links de navegação na topbar; ficam no drawer */
  .menu {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .logout-form {
    display: none;
  }

  .user-role {
    display: none;
  }

  /* --- Content --- */
  /* !important necessário para sobrepor .content.is-sidebar-collapsed (maior especificidade) */
  .content,
  .content.is-sidebar-collapsed {
    grid-template-columns: 1fr !important;
    padding: 14px 14px 24px;
    gap: 0;
  }

  /* --- Sidebar como drawer --- */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 288px;
    max-width: 88vw;
    z-index: 300;
    border-radius: 0 20px 20px 0;
    transform: translateX(-110%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    /* Não deixa a grelha ocupar espaço */
    grid-column: unset;
  }

  .sidebar.is-mobile-open {
    transform: translateX(0);
  }

  /* Estado colapsado do desktop não deve interferir no drawer mobile */
  .content.is-sidebar-collapsed .sidebar {
    width: 288px;
    padding: 20px;
    align-items: unset;
  }

  .content.is-sidebar-collapsed .sidebar > :not(.sidebar-collapse-control) {
    display: flex !important;
  }

  /* Nav links visíveis dentro do drawer */
  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
  }

  .mobile-nav-links a,
  .mobile-nav-links button {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    transition: background 0.15s ease;
  }

  .mobile-nav-links svg,
  .mobile-nav-links img,
  .mobile-nav-links i,
  .mobile-nav-links [class*="icon"],
  .mobile-nav-links [class*="Icon"] {
    display: none !important;
  }

  .mobile-nav-links button {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
  }

  .mobile-logout-form {
    display: block;
    margin: 0;
  }

  .mobile-nav-links a:hover,
  .mobile-nav-links a:active,
  .mobile-nav-links button:hover,
  .mobile-nav-links button:active {
    background: rgba(13, 95, 99, 0.1);
    color: var(--brand-strong);
  }

  .hads-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-card {
    flex-direction: column;
    align-items: stretch;
  }

  .action-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .history-filter-grid {
    grid-template-columns: 1fr;
  }

  .history-search-field {
    grid-column: auto;
  }

  .patient-access-head,
  .patient-access-grid {
    grid-template-columns: 1fr;
  }

  .patient-access-head {
    flex-direction: column;
  }

  /* --- Tipografia --- */
  h1 { font-size: clamp(20px, 5vw, 28px); }
  h2 { font-size: clamp(17px, 4vw, 22px); }
  h3 { font-size: clamp(15px, 3.5vw, 18px); }

  /* --- Formas --- */
  .form-grid {
    grid-template-columns: 1fr;
  }

  /* --- Panels --- */
  .panel {
    border-radius: 16px;
    padding: 16px;
  }

  /* --- Tabs --- */
  .tab-controls {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .tab-controls::-webkit-scrollbar {
    display: none;
  }

  /* --- Main header actions --- */
  .actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }

  /* --- Tables --- */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }

  /* --- Settings --- */
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-menu {
    position: static;
    order: -1;
  }

  /* --- KPIs dashboard --- */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* --- Wais nav --- */
  .wais-nav {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE  (≤ 480 px)
   ============================================================ */
@media (max-width: 480px) {
  .topbar {
    padding: 10px 12px;
  }

  .logo-text span {
    font-size: 16px;
  }

  .brand-logo {
    height: 48px;
    max-width: 200px;
  }

  .content {
    padding: 10px 10px 20px;
  }

  .panel {
    padding: 12px;
    border-radius: 14px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    min-height: 44px;
  }

  .hads-options {
    grid-template-columns: 1fr;
  }

  .hads-option {
    min-height: 54px;
  }

  /* Auth page */
  .auth-card {
    padding: 20px 16px;
    border-radius: 18px;
  }

  /* OCI e ASRS grids */
  .ocir-avaliacao-grid,
  .asrs-grid {
    grid-template-columns: 1fr !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .sidebar,
  .actions,
  .panel:not(.report) {
    display: none !important;
  }

  .content {
    padding: 0;
  }

  .report {
    box-shadow: none;
    border: none;
  }
}

/* ─── Resultados Globais tab ──────────────────────────────────────── */
.report-global-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-global-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.report-global-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.report-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-result-card {
  background: var(--surface-1, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 10px;
  overflow: hidden;
}

.report-result-card-title {
  background: var(--brand, #4361ee);
  color: #fff;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.report-result-card-body {
  padding: 12px 14px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.report-result-card-body p {
  margin: 4px 0;
}

.report-subscale-list {
  margin: 6px 0 0 0;
  padding-left: 18px;
  list-style: disc;
}

.report-subscale-list li.elevated {
  color: #c0392b;
  font-weight: 600;
}

.report-interp-details {
  margin-top: 8px;
  border-top: 1px solid var(--border, #e0e0e0);
  padding-top: 8px;
}

.report-interp-details summary {
  cursor: pointer;
  color: var(--brand, #4361ee);
  font-size: 0.8rem;
  font-weight: 500;
}

.report-interp-text {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-2, #555);
  white-space: pre-wrap;
}

.badge-danger {
  background: #fdecea;
  color: #c0392b;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ok {
  background: #eafaf1;
  color: #1e8449;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.muted {
  color: var(--text-2, #888);
  font-style: italic;
}

/* ── Página Testes / Tabela de Caracterização ───────────────────── */

.testes-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.testes-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.testes-legend-sep {
  color: rgba(18, 28, 36, 0.2);
  font-size: 18px;
}

.testes-check-icon {
  display: inline-block;
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
}

.testes-subtest-label {
  display: inline-block;
  background: rgba(13, 95, 99, 0.12);
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.testes-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid rgba(18, 28, 36, 0.1);
  position: relative;
}

.testes-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

/* Cabeçalho principal */
.testes-table .testes-head-group th {
  background: var(--brand-strong);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.testes-table .testes-head-group th.th-name {
  text-align: left;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 5;
  min-width: 260px;
  background: var(--brand-strong);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.12);
}

.testes-table .testes-head-group th.th-group {
  text-align: center;
}

.testes-table .testes-head-group th.th-age {
  min-width: 44px;
  font-size: 10.5px;
}

/* Sub-cabeçalho — uma linha por coluna */
.testes-table .testes-head-sub th {
  background: rgba(13, 95, 99, 0.1);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(13, 95, 99, 0.2);
  white-space: nowrap;
  line-height: 1.25;
}

/* Células de dados — igual ao data-table: só border-bottom */
.testes-row td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(18, 28, 36, 0.06);
  vertical-align: middle;
}

/* Linhas alternadas: parent ligeiramente destacado */
.testes-row-parent {
  background: rgba(13, 95, 99, 0.03);
}

.testes-row-child {
  background: #fff;
}

/* Hover igual ao data-table: mesmo tom do cabeçalho, sem transição */
.testes-table tbody tr:hover > td {
  background: rgba(13, 95, 99, 0.08);
}

/* Coluna de nome: nunca parte — dimensão definida pelo conteúdo */
.testes-table .td-name {
  white-space: nowrap;
  font-size: 12.5px;
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 260px;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
  background-clip: padding-box;
}

.testes-row-parent .td-name {
  background: rgba(13, 95, 99, 0.03);
}

.testes-row-child .td-name {
  background: #fff;
}

/* Hover na célula sticky */
.testes-table tbody tr:hover > .td-name {
  background: rgba(13, 95, 99, 0.08);
}

.testes-table .td-child {
  color: #555;
  padding-left: 12px;
}

.testes-table .td-check {
  text-align: center;
  width: 40px;
  min-width: 40px;
}

.testes-table .testes-dash {
  color: rgba(18, 28, 36, 0.2);
  font-size: 13px;
}

.testes-table .td-age {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  width: 46px;
  min-width: 46px;
}

.testes-footer-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.testes-profile-panel {
  margin-top: 18px;
}

.testes-profile-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.testes-profile-card {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  align-items: stretch;
  border: 1px solid rgba(18, 28, 36, 0.1);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.testes-profile-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-right: 1px solid rgba(18, 28, 36, 0.08);
  background: linear-gradient(180deg, rgba(13, 95, 99, 0.08), rgba(13, 95, 99, 0.035));
}

.testes-profile-header h3 {
  margin: 0;
  color: var(--brand-strong);
  font-size: 15px;
  line-height: 1.25;
}

.testes-profile-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.testes-profile-tests {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.testes-profile-tests li {
  padding: 10px 11px;
  border: 1px solid rgba(18, 28, 36, 0.08);
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.85);
}

.testes-profile-test-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.testes-profile-test-name strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.testes-profile-test-name span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.testes-profile-subtests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.testes-profile-subtests span {
  border-radius: 4px;
  background: rgba(13, 95, 99, 0.1);
  color: var(--brand-strong);
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 6px;
}

.testes-profile-empty {
  margin: 0;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 600px) {
  .testes-table {
    font-size: 11.5px;
  }

  .testes-footer-legend {
    flex-direction: column;
    gap: 6px;
  }

  .testes-profile-card {
    grid-template-columns: 1fr;
  }

  .testes-profile-header {
    border-right: 0;
    border-bottom: 1px solid rgba(18, 28, 36, 0.08);
  }

  .testes-profile-tests {
    grid-template-columns: 1fr;
  }
}
