:root {
  font-family: "Source Sans 3", sans-serif;
  color: #103d41;
  background: #f2f6f7;
  font-synthesis: none;
  --teal: #004b4f;
  --dark: #003b3e;
  --orange: #f67b1c;
  --line: #d4e0e3;
  --muted: #61777c;
  --soft: #edf3f4;
  --shadow: 0 2px 5px #003b3e08;
}
.model-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.model-card {
  border: 1px solid var(--line);
  padding: 20px;
  display: grid;
  gap: 12px;
  border-radius: 7px;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  overflow: auto;
  gap: 14px;
  padding: 20px 0;
}
.kanban > section {
  background: var(--soft);
  padding: 14px;
  border-radius: 6px;
}
.kanban-item {
  display: block;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  padding: 15px;
  margin-top: 14px;
  color: var(--dark);
}
.timeline-item,
.review-item,
.notification-item,
.catalog-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.review-item > *,
.action-detail > *,
.editor-form details > * {
  margin-bottom: 12px;
}
.notification-item.unread {
  border-left: 3px solid var(--orange);
  padding-left: 16px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 24px 0;
}
.metric {
  display: grid;
  gap: 7px;
}
.metric strong {
  font-size: 30px;
  color: var(--teal);
}
.metric span {
  font-size: 14px;
  color: var(--muted);
}
.formula {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.report-bars {
  padding: 24px 0;
}
.report-bars > div {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px;
}
.report-bars span {
  width: 180px;
}
.report-bars meter {
  flex: 1;
  min-width: 40px;
  accent-color: var(--teal);
}
.module-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.service-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.service-row > span {
  margin-left: 16px;
  color: var(--muted);
}
.signature-pad canvas {
  width: 100%;
  max-width: 600px;
  border: 1px dashed var(--muted);
  border-radius: 5px;
  background: #fff;
  display: block;
  min-height: 90px;
}
.signature-pad img {
  max-width: 100%;
  max-height: 180px;
  background: #fff;
}
.question-rules,
details.unit-address {
  margin: 18px 0;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
}
.pagination {
  justify-content: flex-end;
  margin-top: 20px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 10px 0 26px;
}
.page-title p {
  margin-top: 12px;
  color: var(--muted);
}
.grid2 > *,
.grid3 > * {
  min-width: 0;
}
.service-row p {
  margin-top: 8px;
}
.app nav {
  scrollbar-width: thin;
}
.action-detail > h3 {
  margin-top: 22px;
}
.card > .actions {
  margin: 16px 0;
}
.auth-page {
  max-width: 540px;
  margin: 80px auto;
  padding: 20px;
}
.auth-page .field {
  margin: 15px 0;
}
.report-bars strong {
  font-size: 13px;
}
table td {
  overflow-wrap: anywhere;
}
.card .field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
@media (max-width: 700px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-title {
    flex-direction: column;
  }
  .report-bars > div {
    flex-wrap: wrap;
  }
  .report-bars span {
    width: 100%;
  }
  .model-library {
    grid-template-columns: 1fr;
  }
  .service-row > span {
    display: block;
    margin: 4px 0;
  }
  .action-detail .actions,
  .card > .actions {
    flex-wrap: wrap;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
button,
input,
textarea,
select,
a {
  outline-offset: 3px;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #efac61;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.45px;
}
h2 {
  font-size: 20px;
  line-height: 1.3;
}
h3 {
  font-size: 18px;
  line-height: 1.35;
}
p {
  line-height: 1.55;
}
small {
  display: block;
  font-size: 12px;
  line-height: 1.4;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  min-height: 43px;
  border: 1px solid #bfd1d6;
  border-radius: 5px;
  background: #fff;
  color: #163f44;
}
input::placeholder,
textarea::placeholder {
  color: #8b9fa4;
}
textarea {
  resize: vertical;
  line-height: 1.45;
}
input:disabled,
textarea:disabled,
select:disabled {
  background: #f4f7f8;
  color: #36565d;
  opacity: 1;
}
input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  height: 17px;
  accent-color: var(--teal);
  flex: none;
  margin: 0;
}
label {
  cursor: pointer;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
legend {
  font-weight: 700;
}
code {
  background: #edf3f4;
  padding: 2px 5px;
  border-radius: 3px;
}
.boot,
.loading {
  padding: 70px 20px;
  text-align: center;
  color: var(--muted);
}
.app {
  max-width: 1100px;
  margin: auto;
  min-height: 100vh;
}
.masthead {
  min-height: 72px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 25px;
  gap: 20px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  color: #004b4f;
  font-size: 13px;
  letter-spacing: 1.5px;
}
.brand-logo {
  display: block;
  height: 30px;
  width: auto;
}
.auth-brand .brand-logo {
  height: 44px;
}
.account {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
}
.account strong {
  font-size: 14px;
}
.account small {
  color: var(--muted);
  font-size: 11px;
}
.app-header {
  background: var(--dark);
  color: white;
  min-height: 116px;
  padding: 24px 29px;
  border-bottom: 3px solid var(--orange);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.app-header h2 {
  font-size: 29px;
  margin-top: 5px;
}
.app-header p {
  color: #c7dce0;
  font-size: 13px;
  margin-top: 3px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.55px;
  color: #5e797f;
  margin-bottom: 7px;
}
.eyebrow.light {
  color: #a7ced0;
  letter-spacing: 1.6px;
}
.app nav {
  display: flex;
  background: white;
  padding: 0 23px;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
.app nav button {
  white-space: nowrap;
  border: 0;
  background: none;
  padding: 16px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #657d83;
  position: relative;
  font-weight: 600;
}
.app nav button.active {
  color: var(--teal);
  font-weight: 700;
  background: #f2f7f7;
}
.app nav button.active:after {
  position: absolute;
  content: "";
  height: 3px;
  background: var(--orange);
  bottom: -1px;
  left: 12px;
  right: 12px;
}
.app main {
  padding: 30px 27px 50px;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 5px 28px 24px;
  color: #879b9f;
  font-size: 11px;
  gap: 15px;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}
.page-title p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  max-width: 650px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-title > .actions {
  justify-content: flex-end;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid #bcd0d4;
  border-radius: 5px;
  background: #fff;
  color: var(--teal);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 2px #003c4005;
}
.btn:hover:not(:disabled) {
  background: #f0f6f6;
  border-color: #80a6ac;
}
.btn.primary {
  background: var(--orange);
  border-color: #ee751b;
  color: #fff;
  box-shadow: 0 2px 3px #a34d1320;
}
.btn.primary:hover:not(:disabled) {
  background: #e66d11;
  border-color: #dc6810;
}
.btn.ghost {
  background: #f5f9f9;
}
.btn.link {
  border: 0;
  background: none;
  box-shadow: none;
  padding: 6px 0;
  min-height: auto;
  white-space: normal;
}
.btn.small {
  min-height: 32px;
  font-size: 12px;
  padding: 6px 10px;
}
.btn.icon-button {
  padding: 8px;
  min-width: 38px;
}
.btn.full {
  width: 100%;
}
.back {
  margin: 0 0 15px !important;
}
.danger-text {
  color: #a43c37;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.intro-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(100deg, #004b4f, #06626a);
  border: 1px solid #025055;
  border-radius: 8px;
  padding: 27px 31px;
  color: white;
  margin-bottom: 20px;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.intro-banner:after {
  content: "";
  position: absolute;
  right: 76px;
  bottom: -70px;
  width: 260px;
  height: 260px;
  border: 1px solid #ffffff0d;
  border-radius: 100%;
  pointer-events: none;
}
.intro-banner h2 {
  font-size: 24px;
  margin-top: 5px;
}
.intro-banner p {
  font-size: 13px;
  color: #b9dadd;
  margin-top: 8px;
}
.progress-circle {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: center;
  width: 83px;
  height: 83px;
  border: 5px solid #ffffff2b;
  border-top-color: #f88c3b;
  border-right-color: #f88c3b;
  border-radius: 100%;
  font-size: 31px;
  font-weight: 700;
  padding-top: 14px;
}
.progress-circle span {
  font-size: 16px;
  font-weight: 400;
  color: #c2dadc;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
  margin-bottom: 14px;
}
.step-card {
  padding: 21px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}
.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #719397;
  margin-bottom: 16px;
}
.step-number {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #e8f0f1;
  align-items: center;
  justify-content: center;
  color: #345b62;
  font-size: 13px;
  font-weight: 700;
}
.step-number.done {
  background: #e3f2e7;
  color: #33844b;
}
.step-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 13px;
  color: var(--muted);
  min-height: 63px;
  margin-bottom: 21px;
}
.step-card > .btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: 12px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 0 0 18px;
}
.section-title > span {
  color: var(--muted);
  font-size: 12px;
}
.section-title h2 {
  font-size: 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.stats .card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border-top: 2px solid #c2dadb;
}
.stats strong {
  font-size: 31px;
  line-height: 1.1;
  margin-bottom: 7px;
  color: var(--teal);
}
.stats span {
  font-size: 12px;
  color: var(--muted);
}
.record-row {
  width: 100%;
  border: 0;
  border-top: 1px solid #e4ecee;
  background: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 2px;
  text-align: left;
  color: inherit;
}
.record-row:hover {
  background: #f5f9f9;
}
.record-row.static {
  cursor: default;
}
.record-row > span:nth-child(2) {
  flex: 1;
}
.record-row strong {
  display: block;
  font-size: 14px;
}
.record-row small {
  color: var(--muted);
  margin-top: 3px;
}
.record-icon {
  width: 36px;
  height: 36px;
  background: #eef4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #548389;
}
.row-date {
  font-size: 12px;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 4px;
  border: 1px solid #d8e2e4;
  color: #637d82;
  white-space: nowrap;
  background: #f1f5f6;
}
.pill.completed {
  color: #2b7942;
  border-color: #c5e3c6;
  background: #edf7ed;
}
.pill.in_progress {
  color: #9c6513;
  border-color: #f0ddb0;
  background: #fff8e8;
}
.empty {
  padding: 33px 20px;
  text-align: center;
}
.empty h3 {
  font-size: 17px;
  margin: 12px 0 6px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  max-width: 380px;
  margin: 0 auto 15px;
}
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 51px;
  height: 51px;
  border-radius: 12px;
  color: #72999e;
  background: #eef5f6;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
  min-width: 0;
}
.field > span,
.field > label {
  font-size: 12px;
  font-weight: 700;
}
.field small {
  color: #7a9096;
  font-size: 11px;
}
.field.invalid input,
.field.invalid textarea {
  border-color: #c0443e;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 16px;
}
.check-field,
.check-inline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  line-height: 1.4;
}
.check-field {
  margin: 13px 0 20px;
  min-height: 26px;
}
.check-inline {
  white-space: nowrap;
}
.editor-form h2 {
  margin-bottom: 20px;
}
.editor-form .section-title h2 {
  margin: 0;
}
.form-footer {
  border-top: 1px solid #e1eaec;
  padding-top: 19px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.notice {
  padding: 12px 15px;
  border: 1px solid #c6dcdf;
  border-left: 4px solid #2c8389;
  border-radius: 5px;
  background: #eff7f7;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0 17px;
  color: #315d65;
}
.notice.error {
  border-color: #ecc6c4;
  border-left-color: #ba3e39;
  background: #fff3f2;
  color: #8e3330;
}
.error-text {
  color: #b03631 !important;
  font-size: 12px;
}
.list-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  padding-bottom: 17px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e1e9eb;
}
.list-toolbar > input {
  max-width: 370px;
}
.list-toolbar > .muted {
  margin-left: auto;
  white-space: nowrap;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
}
th {
  font-weight: 600;
  font-size: 11px;
  color: #7a9298;
  letter-spacing: 0.3px;
  padding: 14px 12px;
  background: #f5f8f9;
  border-bottom: 1px solid #dce7e9;
  white-space: nowrap;
}
td {
  padding: 17px 12px;
  border-bottom: 1px solid #e5edef;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-size: 13px;
  font-weight: 600;
}
td small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.nowrap {
  white-space: nowrap;
}
.model-row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #e4ecee;
}
.model-row:last-child {
  border-bottom: 0;
}
.model-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 52px;
  background: #edf5f5;
  color: #457f84;
  border-radius: 7px;
  flex: none;
}
.model-main {
  flex: 1;
}
.model-main h3 {
  font-size: 17px;
  margin-bottom: 4px;
}
.model-main p {
  font-size: 12px;
  color: var(--muted);
}
.model-main small {
  font-size: 11px;
  color: #81989d;
  margin-top: 4px;
}
.model-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.segmented {
  display: flex;
  padding: 4px;
  background: #e7eff1;
  border-radius: 7px;
  gap: 4px;
  margin-bottom: 20px;
}
.segmented > button {
  flex: 1;
  background: none;
  border: 0;
  border-radius: 5px;
  min-height: 42px;
  color: #4b6b74;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 12px;
}
.segmented > button.on {
  background: var(--teal);
  color: white;
  box-shadow: 0 1px 4px #00393d1a;
}
.save-state {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 9px 0;
  font-size: 12px;
  color: #5c7e72;
  margin-bottom: 12px;
}
.save-dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #48936b;
  flex: none;
}
.save-state.pending,
.save-state.saving {
  color: #967126;
}
.save-state.pending .save-dot,
.save-state.saving .save-dot {
  background: #d7a134;
}
.save-state.error {
  color: #a23631;
}
.save-state.error .save-dot {
  background: #ba4640;
}
.save-state.error > span:nth-child(2) {
  flex: 1;
}
.section-editor {
  padding: 0;
  overflow: hidden;
}
.section-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f7fafb;
  border-bottom: 1px solid #dce7e9;
  padding: 17px 19px;
}
.section-number {
  color: #78959a;
  font-weight: 700;
  font-size: 19px;
}
.section-heading .field {
  flex: 1;
  margin: 0;
}
.section-heading .actions {
  align-self: flex-end;
}
.section-heading input {
  min-height: 39px;
  padding: 8px 10px;
}
.question-editor {
  margin: 18px 19px;
  border: 1px solid #d9e4e6;
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}
.question-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
  gap: 10px;
}
.question-heading strong {
  font-size: 12px;
  color: #6b878e;
}
.question-editor > .field {
  margin-bottom: 12px;
}
.section-editor > .btn {
  margin: 0 19px 19px;
}
.narrow {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
.form-illustration {
  display: flex;
  width: 65px;
  height: 65px;
  border-radius: 15px;
  background: #e8f2f2;
  align-items: center;
  justify-content: center;
  color: #3f858c;
  margin: 4px 0 20px;
}
.application-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 20px;
  font-size: 12px;
  color: var(--muted);
}
.mini-progress {
  height: 5px;
  background: #e7eff0;
  border-radius: 4px;
  width: 100%;
  overflow: hidden;
}
.mini-progress > span {
  display: block;
  height: 100%;
  background: #237f86;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e0eaec;
  padding-bottom: 16px;
}
.section-label > span {
  font-size: 21px;
  color: #8aadb1;
  font-weight: 700;
}
.section-label h2 {
  font-size: 19px;
  flex: 1;
  min-width: 0;
}
.skip-question {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
}
.step-section {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-section > span {
  flex: 1;
  min-width: 0;
}
.question-skipped .answer-title h3 {
  color: #6b8389;
}
.skipped-summary h2 {
  font-size: 18px;
  margin-bottom: 8px;
}
.skipped-summary ul {
  padding-left: 20px;
  margin-top: 14px;
}
.skipped-summary li + li {
  margin-top: 10px;
}
.skipped-summary li small {
  display: block;
  color: #6b8389;
  margin-top: 4px;
}
.answer-card {
  padding: 21px 0 20px;
  border-bottom: 1px solid #e1e9eb;
  scroll-margin-top: 20px;
}
.answer-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.answer-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
}
.answer-title > span {
  color: #77949b;
  font-size: 12px;
  padding-top: 3px;
  font-weight: 700;
  white-space: nowrap;
}
.answer-title h3 {
  font-size: 16px;
  flex: 1;
}
.answer-title h3 em {
  font-style: normal;
  color: #d36a29;
  margin-left: 4px;
}
.answer-title small {
  font-size: 10px;
  color: #769097;
  padding-top: 3px;
  max-width: 130px;
  text-align: right;
}
.choice-group {
  display: flex;
  gap: 9px;
  margin-bottom: 17px;
}
.choice {
  flex: 1;
  min-height: 43px;
  border: 1px solid #c5d7db;
  background: #fafcfc;
  border-radius: 5px;
  color: #5d777e;
  font-weight: 600;
  font-size: 13px;
}
.choice.selected {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}
.choice .answer-mark {
  justify-content: center;
}
.choice.selected .answer-mark {
  color: inherit;
}
.choice.selected.negative {
  background: #a54c43;
  border-color: #a54c43;
}
.choice.selected.neutral {
  background: #b7791f;
  border-color: #b7791f;
}
.choice.selected.excellent {
  background: #1f7a4d;
  border-color: #1f7a4d;
}
.choice.selected.na {
  background: #70858b;
  border-color: #70858b;
}
.answer-input > .field {
  margin-top: 17px;
}
.answer-input > .field textarea {
  background: #fbfcfd;
  font-size: 13px;
}
.answer-error {
  background: #fff7f5;
  margin: 0 -12px;
  padding: 21px 12px;
  border-radius: 5px;
}
.attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.attachment {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: #f2f7f8;
  border: 1px solid #dce7e9;
  border-radius: 5px;
}
.attachment > div {
  flex: 1;
  min-width: 0;
}
.attachment strong {
  font-size: 12px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attachment small {
  font-size: 10px;
  color: var(--muted);
}
.upload-label {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #407b83;
  border: 1px dashed #afc9ce;
  border-radius: 4px;
  padding: 8px 11px;
  background: #fcfefe;
  position: relative;
  overflow: hidden;
}
.upload-label input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.upload-label.disabled {
  opacity: 0.5;
}
.attachments > .muted {
  font-size: 10px;
}
.sticky-footer {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid #bdcfd4;
  border-radius: 7px;
  box-shadow: 0 3px 15px #002d391a;
}
.sticky-footer strong {
  font-size: 14px;
}
.sticky-footer small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.permissions {
  margin-top: 16px;
}
.permissions fieldset {
  border: 1px solid #d8e4e6;
  border-radius: 6px;
  padding: 12px 15px;
  max-height: 280px;
  overflow: auto;
}
.permissions legend {
  font-size: 12px;
  padding: 0 5px;
}
.permissions .check-field {
  margin: 8px 0;
  font-size: 13px;
}
.help h2 {
  margin: 22px 0 12px;
  font-size: 19px;
}
.help h2:first-child {
  margin-top: 0;
}
.help p,
.help li {
  font-size: 14px;
  color: #4e7078;
  line-height: 1.65;
  margin-bottom: 12px;
}
.help ol {
  padding-left: 22px;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 23px;
  max-width: 500px;
  z-index: 20;
  background: #004b4f;
  color: white;
  padding: 15px 16px;
  border-radius: 6px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  font-size: 13px;
  box-shadow: 0 4px 18px #002d3933;
  border-left: 4px solid #f38431;
}
.toast.error {
  background: #8c3732;
}
.toast button {
  border: 0;
  background: none;
  color: white;
  font-size: 20px;
  line-height: 1;
}
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 55px 20px;
  background: radial-gradient(ellipse at 50% 0, #e5f0f0, #f2f6f7 64%);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 2px;
  font-size: 11px;
  color: #6d8b91;
  margin-bottom: 32px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border: 1px solid #d0dfe2;
  border-radius: 9px;
  border-top: 4px solid var(--orange);
  padding: 30px;
  box-shadow: 0 7px 25px #00383e0b;
}
.auth-card h1 {
  font-size: 25px;
}
.auth-card > p {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 24px;
}
.auth-card .btn.full {
  margin-top: 12px;
}
.auth-footer {
  font-size: 10px;
  color: #849ba1;
  text-align: center;
  border-top: 1px solid #e5edef;
  padding-top: 18px;
  margin-top: 21px;
}
.auth-caption {
  font-size: 12px;
  color: #819ba0;
  margin-top: 27px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.embedded .masthead {
  display: none;
}
.embedded .app-header {
  min-height: 90px;
}
.embedded main {
  padding-top: 24px;
}
@media (min-width: 1200px) {
  .app {
    box-shadow: 0 0 0 1px #e0e9eb;
    background: #f4f7f8;
  }
  .masthead {
    border-radius: 0 0 0 0;
  }
}
@media (max-width: 850px) {
  .app main {
    padding: 24px 19px 40px;
  }
  .app nav {
    padding: 0 8px;
    gap: 0;
  }
  .app nav button {
    font-size: 13px;
    padding: 14px 12px;
  }
  .page-title {
    align-items: flex-start;
  }
  .page-title > .actions {
    max-width: 240px;
  }
  .step-grid {
    gap: 11px;
  }
  .step-card {
    padding: 18px 15px;
  }
  .step-card h3 {
    font-size: 16px;
  }
  .step-card p {
    min-height: 80px;
  }
  .stats {
    gap: 10px;
  }
  .stats .card {
    padding: 16px;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .section-heading > .actions {
    margin-left: 42px;
  }
  .row-date {
    display: none;
  }
  .grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  h1 {
    font-size: 24px;
  }
  .masthead {
    padding: 12px 15px;
    gap: 7px;
    min-height: 64px;
  }
  .wordmark {
    gap: 6px;
  }
  .wordmark .brand-logo {
    height: 22px;
  }
  .account {
    gap: 7px;
  }
  .account strong {
    font-size: 12px;
  }
  .account small {
    font-size: 9px;
  }
  .app-header {
    padding: 20px 17px;
    min-height: 112px;
    align-items: center;
  }
  .app-header .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .app-header h2 {
    font-size: 25px;
  }
  .app-header p {
    font-size: 11px;
    max-width: 190px;
  }
  .app-header > .btn {
    font-size: 11px;
    padding: 10px;
    gap: 2px;
  }
  .app nav button {
    font-size: 11px;
    padding: 13px 11px;
    gap: 5px;
  }
  .app nav svg {
    width: 16px;
  }
  .app main {
    padding: 22px 13px 32px;
  }
  .page-title {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 21px;
  }
  .page-title > .actions {
    max-width: none;
    width: 100%;
    justify-content: flex-start;
  }
  .page-title p {
    font-size: 13px;
  }
  .intro-banner {
    padding: 21px;
    gap: 14px;
  }
  .intro-banner h2 {
    font-size: 21px;
  }
  .intro-banner p {
    font-size: 12px;
  }
  .progress-circle {
    width: 62px;
    height: 62px;
    border-width: 4px;
    padding-top: 8px;
    font-size: 25px;
  }
  .progress-circle span {
    font-size: 13px;
  }
  .step-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .step-card {
    position: relative;
    padding: 17px 18px 18px;
  }
  .step-top {
    margin-bottom: 10px;
  }
  .step-card h3 {
    font-size: 18px;
  }
  .step-card p {
    min-height: 0;
    margin-bottom: 15px;
  }
  .step-card > .btn {
    font-size: 12px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .stats .card {
    margin-bottom: 4px;
    padding: 17px 18px;
  }
  .stats strong {
    font-size: 29px;
  }
  .stats span {
    font-size: 11px;
  }
  .section-title {
    align-items: flex-start;
    margin-top: 9px;
    gap: 9px;
  }
  .section-title h2 {
    font-size: 17px;
  }
  .section-title > span {
    font-size: 10px;
    max-width: 125px;
    text-align: right;
  }
  .stats + .card {
    margin-top: 18px;
  }
  .card {
    padding: 17px 15px;
    border-radius: 7px;
    margin-bottom: 15px;
  }
  .record-row {
    gap: 9px;
  }
  .record-row strong {
    font-size: 12px;
  }
  .record-row small {
    font-size: 10px;
  }
  .record-icon {
    width: 28px;
    height: 32px;
    flex: none;
  }
  .record-row .pill {
    font-size: 9px;
    padding: 4px 6px;
  }
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .check-field {
    margin-top: 3px;
  }
  .list-toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .list-toolbar > input {
    max-width: none;
  }
  .list-toolbar > .muted {
    font-size: 11px;
  }
  .check-inline {
    font-size: 12px;
  }
  .model-row {
    gap: 11px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px 0;
  }
  .model-icon {
    width: 36px;
    height: 42px;
  }
  .model-main h3 {
    font-size: 16px;
  }
  .model-main p {
    font-size: 11px;
  }
  .model-actions {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
  .model-actions > .actions {
    gap: 4px;
  }
  .btn.small {
    padding: 6px 8px;
    font-size: 11px;
  }
  .segmented {
    gap: 0;
    padding: 3px;
  }
  .segmented > button {
    font-size: 11px;
    padding: 9px 7px;
    min-height: 42px;
    line-height: 1.25;
  }
  .section-editor {
    padding: 0;
  }
  .section-heading {
    gap: 10px;
    padding: 14px;
  }
  .section-heading > .actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
  .section-heading input {
    font-size: 14px;
  }
  .question-editor {
    margin: 14px 12px;
    padding: 12px;
  }
  .question-heading {
    flex-wrap: wrap;
    gap: 9px;
  }
  .question-heading > .actions {
    margin-left: auto;
  }
  .question-heading strong {
    font-size: 11px;
  }
  .section-editor > .btn {
    margin: 0 12px 14px;
  }
  .application-summary {
    padding: 15px;
    gap: 12px;
  }
  .application-summary > span {
    font-size: 11px;
  }
  .answer-title {
    gap: 8px;
    flex-wrap: wrap;
  }
  .answer-title h3 {
    font-size: 15px;
  }
  .answer-title small {
    width: 100%;
    max-width: none;
    text-align: left;
    margin-left: 27px;
    font-size: 10px;
  }
  .choice-group {
    gap: 5px;
  }
  .choice {
    font-size: 12px;
    min-height: 42px;
  }
  .attachments > .muted {
    font-size: 9px;
  }
  .attachment {
    gap: 6px;
    padding: 8px;
  }
  .sticky-footer {
    bottom: 6px;
    padding: 13px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .sticky-footer > .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .sticky-footer > .actions .btn {
    font-size: 12px;
    padding: 10px 7px;
  }
  .sticky-footer small {
    font-size: 10px;
  }
  .form-footer {
    flex-wrap: wrap;
    gap: 12px;
  }
  .form-footer > .muted {
    font-size: 11px;
  }
  .auth-page {
    padding: 36px 16px;
  }
  .auth-brand {
    gap: 9px;
  }
  .auth-brand .brand-logo {
    height: 36px;
  }
  .auth-card {
    padding: 25px 22px;
  }
  .auth-card h1 {
    font-size: 24px;
  }
  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    font-size: 12px;
  }
  .app-footer {
    padding: 4px 15px 20px;
    font-size: 10px;
  }
  .narrow {
    margin-top: 0;
  }
  .permissions {
    gap: 17px;
  }
}
/* Escalas, complementos e plano de ação na aplicação */
.answer-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.answer-mark.positive {
  color: #1d7f57;
}
.answer-mark.negative {
  color: #b23b31;
}
.answer-mark.neutral {
  color: #b7791f;
}
.answer-mark.excellent {
  color: #1f7a4d;
}
.answer-mark.na {
  color: #61777c;
}
.question-setup {
  display: grid;
  gap: 16px;
  margin: 6px 0 4px;
  padding: 14px;
  border: 1px solid #e1eaec;
  border-radius: 6px;
  background: #f8fbfb;
}
.setup-block {
  display: grid;
  gap: 8px;
}
.setup-block > strong {
  font-size: 13px;
}
.setup-block > small {
  font-size: 11px;
}
.scale-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.scale-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 130px;
  padding: 10px 14px;
  border: 1px solid #c9dade;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
}
.scale-card.on {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px var(--teal);
  color: var(--teal);
}
.scale-card small {
  font-size: 11px;
}
.scale-marks {
  display: flex;
  gap: 10px;
  font-size: 13px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid #c9dade;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.chip.on {
  border-color: #1d7f57;
  background: #e7f4ee;
  color: #1d6b4b;
}
.rule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rule-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid #d6e3e6;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}
.rule-icons {
  display: inline-flex;
  gap: 5px;
  padding-left: 9px;
  border-left: 1px solid #e1eaec;
}
.rule-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #c9d6d9;
  border-radius: 50%;
  background: #f1f4f5;
  color: #8a9ca1;
}
.rule-icon.on {
  border-color: #1d7f57;
  background: #1d7f57;
  color: #fff;
}
.rule-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.rule-extra {
  display: grid;
  gap: 6px;
  align-content: start;
}
.rule-extra .check-inline {
  font-size: 12px;
}
.plan-add {
  align-self: flex-start;
  margin-top: 12px;
}
.plan-editor {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #f0c9a3;
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  background: #fffaf5;
}
.plan-editor.required {
  border-color: #e9a873;
  border-left-color: #d9600d;
}
.plan-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.plan-heading strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a4500f;
  font-size: 14px;
}
.plan-heading em {
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
}
.plan-editor .field {
  margin-top: 10px;
}
.plan-editor textarea,
.plan-editor input,
.plan-editor select {
  background: #fff;
}
.plan-editor > .muted {
  display: block;
  margin-top: 8px;
  font-size: 11px;
}
.linked-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #f0c9a3;
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  background: #fffaf5;
  color: #a4500f;
}
.linked-plan > span {
  flex: 1;
  min-width: 0;
  color: var(--dark);
}
.linked-plan strong {
  display: block;
  font-size: 13px;
}
.linked-plan small {
  font-size: 11px;
  color: var(--muted);
}
.select-cell {
  width: 34px;
}
.btn.danger-text {
  color: #a43c37;
}
.choice {
  min-width: 0;
}
@media (max-width: 600px) {
  .choice-group {
    flex-wrap: wrap;
  }
  .choice {
    flex: 1 1 calc(33% - 5px);
    padding: 4px;
    white-space: normal;
  }
  .rule-box {
    width: 100%;
    justify-content: space-between;
  }
  .scale-card {
    flex: 1 1 100%;
  }
  .plan-heading {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* Eventos relacionados (acidentes, quase acidentes, incidentes) */
.events-card .section-title p {
  margin-top: 6px;
  font-size: 12px;
}
.event-row {
  margin: 14px 0 0;
  padding: 12px 14px 14px;
  border: 1px solid #dfe8ea;
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  background: #fbfdfd;
  min-width: 0;
}
.event-row.accident {
  border-left-color: #b84a44;
}
.event-row.near_miss {
  border-left-color: #c4923a;
}
.event-row legend {
  padding: 0 4px;
  font-size: 13px;
  color: var(--dark);
}
.event-row legend strong {
  color: var(--teal);
  margin-right: 4px;
}
.event-row .field {
  margin-top: 8px;
}
.event-footer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.event-footer .field {
  flex: 1;
  min-width: 0;
}
@media (max-width: 600px) {
  .event-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
/* Revisão de usabilidade: atalhos, avisos e ajuda em passos */
.notice.warning {
  border-color: #f0d3a8;
  border-left-color: #d9861c;
  background: #fff8ec;
  color: #7a4a0c;
}
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 15px;
  margin-bottom: 26px;
}
.quick-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  text-align: left;
  color: var(--teal);
  cursor: pointer;
}
.quick-link:hover {
  border-color: #80a6ac;
  background: #f7fbfb;
}
.quick-link strong {
  font-size: 16px;
  color: var(--dark);
}
.quick-link small {
  font-size: 12px;
  color: var(--muted);
}
.intro-banner .btn.primary {
  flex-shrink: 0;
}
.help-steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0 !important;
}
.help-steps li {
  position: relative;
  padding-left: 40px;
  min-height: 28px;
}
.help-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-steps strong,
.help-faq strong {
  color: var(--dark);
}
.help-faq dt {
  font-weight: 700;
  color: var(--dark);
  margin-top: 14px;
}
.help-faq dd {
  margin: 4px 0 0;
  font-size: 14px;
  color: #4e7078;
  line-height: 1.6;
}
.editor-options {
  margin: 20px 0 6px;
  padding: 14px 16px 6px;
  border: 1px solid #dfe8ea;
  border-radius: 6px;
  min-width: 0;
}
.editor-options legend {
  padding: 0 6px;
  font-weight: 700;
  color: var(--dark);
}
.editor-options .muted {
  margin: -4px 0 10px 28px;
  font-size: 12px;
}
@media (max-width: 600px) {
  .intro-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}
/* Menu por perfil, painel "Mais", sino e nome no topo */
.nav-sep {
  flex: 0 0 1px;
  align-self: center;
  height: 22px;
  margin: 0 4px;
  background: var(--line);
}
.app nav .more-toggle {
  margin-left: auto;
}
.app nav.more-menu {
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 23px;
  background: #f6fafa;
  overflow: visible;
}
.app nav.more-menu button {
  padding: 10px 13px;
  border-radius: 6px;
}
.app nav.more-menu button.active:after {
  display: none;
}
.account-name {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border: 0;
  background: none;
  padding: 4px 6px;
  border-radius: 6px;
  color: inherit;
  cursor: pointer;
}
.account-name:hover {
  background: #f2f7f7;
}
.btn.icon-button.bell {
  position: relative;
}
.btn.icon-button .badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}
@media (max-width: 600px) {
  .account-name {
    display: none;
  }
  .app nav .more-toggle {
    margin-left: 0;
  }
  .app nav.more-menu {
    padding: 6px 8px;
  }
}
/* Editor: escala visível e "Mais opções" recolhido com resumo */
.scale-block {
  margin: 4px 0 12px;
}
.question-rules > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.question-rules .rules-summary {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.question-rules[open] .rules-summary {
  display: none;
}
.question-rules .question-setup {
  margin-bottom: 14px;
}
/* Plano de ação: um passo de cada vez */
.action-step {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #d9e6e8;
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  background: #f8fbfb;
}
.action-step h3 {
  margin-bottom: 4px;
}
.action-step .muted {
  font-size: 13px;
  margin-bottom: 6px;
}
.action-more {
  margin: 14px 0;
}
/* Celular: menu na parte de baixo, inspeção uma pergunta por vez e foto pela câmera */
.app nav.tabbar,
.app nav button.phone-only,
.sheet-backdrop {
  display: none;
}
.view-mode {
  max-width: 470px;
  margin-bottom: 18px;
}
.step-head {
  display: grid;
  gap: 10px;
  padding: 16px 20px;
  scroll-margin-top: 10px;
}
.step-head:focus {
  outline: none;
}
.step-count {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}
.step-count strong {
  font-size: 18px;
  color: var(--dark);
}
.step-count span {
  font-size: 13px;
  color: var(--muted);
}
.step-head .save-state {
  margin: 0;
}
.step-section {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #6f8d93;
}
.question-step .answer-card {
  padding-top: 12px;
  border-bottom: 0;
}
.question-step .answer-title h3 {
  font-size: 19px;
}
.question-step .choice {
  min-height: 60px;
  font-size: 16px;
}
.question-step .answer-mark svg {
  width: 26px;
  height: 26px;
}
.review-step h2 {
  margin-bottom: 8px;
}
.review-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.review-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.review-list li > span {
  flex: 1;
  min-width: 0;
}
.review-list strong {
  display: block;
  font-size: 14px;
  color: var(--dark);
}
.review-list small {
  color: var(--muted);
}
.review-list li.problem small {
  color: #a43c37;
  font-weight: 600;
}
.step-bar {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  background: #fff;
  border: 1px solid #bdcfd4;
  border-radius: 8px;
  box-shadow: 0 3px 15px #002d391a;
}
.step-bar .btn {
  flex: 1;
  min-height: 52px;
  font-size: 16px;
}
.step-bar .btn.primary {
  flex: 2;
}
.evidence-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.upload-label.camera {
  background: var(--teal);
  border: 1px solid var(--teal);
  color: #fff;
}
.attachment-thumb {
  width: 52px;
  height: 52px;
  flex: none;
  object-fit: cover;
  border-radius: 4px;
  background: #e7eff0;
}
@media (max-width: 600px) {
  .app {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  .app.focus {
    padding-bottom: 0;
  }
  .app.stepping {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .app nav.top-nav,
  .app.focus .app-header,
  .app.focus nav.tabbar,
  .app.focus .page-title > .actions:empty {
    display: none;
  }
  .app nav.tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    gap: 0;
    padding: 0 4px env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 0 -3px 12px #002d3912;
    overflow: visible;
  }
  .app nav.tabbar button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 62px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 8px 2px;
    font-size: 12px;
    line-height: 1.1;
  }
  .app nav.tabbar button > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .app nav.tabbar svg {
    width: 23px;
    height: 23px;
  }
  .app nav.tabbar button.active:after {
    top: -1px;
    bottom: auto;
    left: 25%;
    right: 25%;
  }
  .app nav.tabbar .more-toggle[aria-expanded="true"] {
    color: var(--teal);
    background: #f2f7f7;
  }
  .sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 13;
    background: #002d3947;
  }
  .app nav.more-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(62px + env(safe-area-inset-bottom));
    z-index: 14;
    max-height: calc(100vh - 150px);
    overflow: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px 12px;
    border: 0;
    border-radius: 14px 14px 0 0;
    background: #fff;
    box-shadow: 0 -8px 24px #002d3926;
  }
  .app nav.more-menu button,
  .app nav.more-menu button.phone-only {
    display: flex;
    min-height: 52px;
    padding: 10px 12px;
    font-size: 14px;
    white-space: normal;
    text-align: left;
    background: #f4f8f8;
  }
  .app nav.more-menu svg {
    width: 20px;
    flex: none;
  }
  .app-header {
    min-height: 0;
    padding: 12px 15px;
  }
  .app-header .eyebrow,
  .app-header p {
    display: none;
  }
  .app-header h2 {
    margin: 0;
    font-size: 21px;
  }
  .app-header > .btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  /* Avisos logo acima do menu de baixo ou dos botões Anterior/Próxima. */
  .toast {
    bottom: calc(74px + env(safe-area-inset-bottom));
  }
  .app.focus .toast {
    bottom: 12px;
  }
  .app.stepping .toast {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
  /* Abaixo de 16px, o iPhone amplia a tela ao tocar no campo. */
  .app input,
  .app select,
  .app textarea {
    font-size: 16px !important;
  }
  .choice {
    min-height: 52px;
    font-size: 14px;
  }
  .app.focus .page-title {
    gap: 8px;
    margin-bottom: 14px;
  }
  .app.focus .page-title h1 {
    font-size: 21px;
  }
  .app.stepping .page-title .eyebrow {
    display: none;
  }
  .view-mode {
    max-width: none;
    margin-bottom: 12px;
  }
  .view-mode > button {
    font-size: 13px;
  }
  .step-head {
    gap: 8px;
    padding: 12px 15px;
  }
  .question-step .choice-group {
    flex-direction: column;
    gap: 10px;
  }
  .question-step .choice {
    flex: none;
    width: 100%;
    min-height: 58px;
    padding: 0 16px;
    font-size: 17px;
  }
  .step-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: 0 -3px 12px #002d3912;
  }
  .step-bar .btn {
    min-height: 54px;
  }
  .evidence-buttons .upload-label {
    flex: 1 1 180px;
    justify-content: center;
    min-height: 50px;
    font-size: 15px;
    font-weight: 600;
  }
  .review-list li {
    flex-wrap: wrap;
  }
  .events-card .section-title {
    flex-direction: column;
    align-items: stretch;
  }
  .narrow .form-footer .btn {
    flex: 1;
    min-height: 50px;
    font-size: 15px;
  }
}
/* Backup: tela do administrador e restauração no primeiro acesso */
a.btn {
  text-decoration: none;
}
.btn.upload-label {
  align-self: flex-start;
  min-height: 40px;
  padding: 9px 15px;
  border-style: dashed;
  font-size: 14px;
  color: var(--teal);
}
.btn.upload-label.full {
  width: 100%;
}
.restore-start {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #e5edef;
}
.restore-start p {
  margin: 6px 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.backup-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 4px 0 0;
}
.backup-facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.backup-facts dd {
  margin: 4px 0 0;
  font-size: 14px;
}
.backup-facts code {
  display: inline-block;
  padding: 3px 7px;
  font-family: inherit;
  font-size: 13px;
}
.backup-facts code,
.backup-path {
  overflow-wrap: anywhere;
}
.backup-status > .notice:first-child {
  margin-top: 0;
}
.backup-status > .notice:last-child {
  margin-bottom: 0;
}
.backup-places {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.backup-place {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.backup-place.selected {
  border-color: var(--teal);
  background: #f3f9f9;
}
.backup-place input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
  flex: none;
}
.backup-place strong,
.backup-info strong {
  display: block;
  font-size: 14px;
}
.backup-place small,
.backup-info small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.backup-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.backup-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 2px;
  border-top: 1px solid #e4ecee;
}
.backup-info {
  flex: 1;
  min-width: 0;
}
.backup-list .actions {
  flex-wrap: nowrap;
}
@media (max-width: 600px) {
  .backup-list li {
    flex-wrap: wrap;
  }
  .backup-list .actions {
    width: 100%;
  }
  .backup-list .actions .btn {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
  }
  .btn.upload-label {
    width: 100%;
    min-height: 50px;
  }
}
.backup-upload {
  margin: 8px 0 14px;
  font-size: 14px;
  color: var(--muted);
}

/* Perguntas avulsas */
.structure-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.structure-form .actions {
  justify-content: flex-end;
}
.adhoc-add {
  margin-top: 14px;
}

/* Checklists agrupados por unidade */
.unit-group + .unit-group {
  margin-top: 22px;
}
.unit-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0eaec;
  font-size: 16px;
  color: var(--dark, #10343f);
}
.unit-group-title small {
  margin-left: auto;
  font-weight: 600;
  color: var(--muted);
}
.unit-picker {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-width: 520px;
}
.unit-picker .actions {
  justify-content: flex-start;
}
.unit-group-title .btn.link {
  font-size: 13px;
}
.unit-page-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}
.unit-page-links .btn {
  margin: 0 !important;
}
.frequency-custom {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(120px, 200px);
  gap: 12px;
}
.frequency-line {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
}
.frequency-line.late {
  color: #b42318;
  font-weight: 600;
}
.frequency-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.donut {
  margin: 0;
}
.donut figcaption h3 {
  margin: 0;
}
.donut figcaption small {
  color: var(--muted);
}
.donut-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.donut svg {
  width: 150px;
  height: 150px;
  flex: none;
}
.donut svg circle {
  transition:
    stroke-width 0.12s,
    opacity 0.12s;
}
.donut-value {
  font-size: 30px;
  font-weight: 700;
  fill: var(--dark);
}
.donut-caption {
  font-size: 11px;
  fill: var(--muted);
}
.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 170px;
}
.donut-legend li {
  display: grid;
  grid-template-columns: 12px 1fr auto 40px;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 6px;
}
.donut-legend li.on {
  background: var(--soft);
}
.donut-legend li.zero {
  color: var(--muted);
}
.donut-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.donut-legend small {
  color: var(--muted);
  text-align: right;
}
.continuity-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.continuity-banner > div:first-child {
  display: grid;
  gap: 3px;
}
.continuity-banner strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dark);
}
.continuity-banner small,
.continuity-banner.first {
  color: var(--muted);
}
.continuity-banner.first {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
}
.change-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.change-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef2f3;
  color: var(--dark);
}
.change-chips .change-chip {
  margin-left: 0;
}
.change-chip.improved {
  background: #e3f3e5;
  color: #1f6b2a;
}
.change-chip.worsened,
.change-chip.recurrent {
  background: #fbe5e4;
  color: #a43c37;
}
.change-chip.attention {
  background: #fff1dc;
  color: #8a4b00;
}
.previous-answer {
  margin: 0 0 10px;
}
.previous-answer > p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
}
.previous-answer > p strong {
  color: var(--dark);
}
.linked-plan.earlier {
  border-color: #f2c9a0;
  background: #fff8f0;
}
/* Computador, notebook e tablet: menu fixo na lateral esquerda. O celular
   (até 600px) continua com o menu de baixo, definido acima. */
.sidebar-brand,
.side-more {
  display: none;
}
@media (min-width: 601px) {
  :root {
    --sidebar: 236px;
  }
  .app {
    max-width: none;
    margin: 0;
    padding-left: var(--sidebar);
  }
  .masthead {
    justify-content: flex-end;
    border-bottom: 1px solid var(--line);
  }
  .masthead .wordmark {
    display: none;
  }
  .app nav.top-nav {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 0 12px 20px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow-x: hidden;
    overflow-y: auto;
  }
  .app nav.top-nav .sidebar-brand {
    display: flex;
    align-items: center;
    min-height: 72px;
    margin: 0 -12px 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }
  .app nav.top-nav .sidebar-brand .brand-logo {
    height: auto;
    max-width: 100%;
  }
  .app nav.top-nav button:not(.sidebar-brand) {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    white-space: normal;
    text-align: left;
  }
  .app nav.top-nav button:not(.sidebar-brand):hover {
    background: #f2f7f7;
  }
  .app nav.top-nav button.active {
    background: #e8f2f2;
  }
  .app nav.top-nav button.active:after {
    top: 8px;
    bottom: 8px;
    left: 0;
    right: auto;
    width: 3px;
    height: auto;
    border-radius: 2px;
  }
  .app nav.top-nav .nav-sep {
    flex: 0 0 1px;
    align-self: stretch;
    height: 1px;
    margin: 8px 6px;
  }
  .app nav.top-nav .more-toggle {
    margin-left: 0;
  }
  .side-more {
    display: grid;
    gap: 2px;
    margin: 2px 0 0 12px;
    padding-left: 8px;
    border-left: 1px solid var(--line);
  }
  /* Grupo aberto (Cadastros, Mais): o destaque fica só na página de dentro. */
  .app nav.top-nav .more-toggle.active {
    background: transparent;
  }
  .app nav.top-nav .more-toggle.active:after {
    display: none;
  }
  .app nav.top-nav .side-more button {
    padding: 9px 12px;
    font-size: 13px;
  }
  .app nav.more-menu {
    display: none;
  }
}
@media (min-width: 601px) and (max-width: 1000px) {
  :root {
    --sidebar: 208px;
  }
}
/* Retorno à unidade: pendências da última visita e baixa dos planos. */
.continuity-banner .continuity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  width: 100%;
}
.continuity-head > div:first-child {
  display: grid;
  gap: 3px;
}
.visit-pending {
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.visit-pending h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0 0 8px;
  font-size: 16px;
}
.visit-pending h2 small {
  font-size: 13px;
  font-weight: 600;
}
.visit-pending ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.visit-pending li > button,
.visit-pending li.visit-elsewhere {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.visit-pending li.visit-elsewhere {
  cursor: default;
  background: #fff8f0;
}
.visit-pending li > button:hover {
  border-color: var(--dark);
}
.visit-number {
  flex: none;
  min-width: 34px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.visit-text {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}
.visit-text strong {
  display: block;
  color: var(--dark);
  font-size: 14px;
}
.visit-text small {
  overflow-wrap: anywhere;
}
.visit-pending .change-chip {
  flex: none;
  margin-left: 0;
}
.previous-answer > p.previous-note {
  font-style: italic;
}
.previous-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.previous-photos img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.linked-plan.earlier > span:not(.plan-buttons) {
  display: grid;
  gap: 3px;
}
.linked-plan.earlier .change-chip {
  justify-self: start;
  margin-left: 0;
}
.settle-hint {
  color: #8a4b00;
}
.plan-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
.settle-plan {
  display: grid;
  gap: 6px;
  min-width: min(320px, 100%);
}
.settle-plan .field {
  margin: 0;
}
.settle-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.visit-summary {
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #f2c9a0;
  border-radius: 8px;
  background: #fff8f0;
  color: var(--dark);
}
.visit-summary > div {
  display: grid;
  gap: 3px;
}
.visit-summary small {
  color: var(--muted);
}
@media (max-width: 600px) {
  .visit-pending li > button {
    flex-wrap: wrap;
  }
  .visit-pending .change-chip {
    margin-left: 44px;
  }
}
/* Menu lateral verde-escuro de cima a baixo, um tom abaixo da faixa do topo,
   com destaque laranja; a logo fica em branco sobre o verde. */
@media (min-width: 601px) {
  .app nav.top-nav {
    background: #002f31;
    border-right: 0;
    box-shadow: inset -1px 0 0 #ffffff14;
    scrollbar-color: #ffffff40 transparent;
  }
  .app nav.top-nav .sidebar-brand {
    background: transparent;
    border-bottom: 1px solid #ffffff1f;
  }
  .app nav.top-nav .sidebar-brand .brand-logo {
    filter: brightness(0) invert(1);
  }
  .app nav.top-nav button:not(.sidebar-brand) {
    color: #b8d0d2;
  }
  .app nav.top-nav button:not(.sidebar-brand):hover {
    background: #ffffff12;
    color: #fff;
  }
  .app nav.top-nav button.active,
  .app nav.top-nav .more-toggle.active {
    color: #fff;
  }
  .app nav.top-nav button.active:not(.more-toggle) {
    background: #ffffff1c;
  }
  .app nav.top-nav button.active svg {
    color: var(--orange);
  }
  .app nav.top-nav button:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: -2px;
  }
  .app nav.top-nav .nav-sep {
    background: #ffffff24;
  }
  .side-more {
    border-left-color: #ffffff2e;
  }
}
/* Parte de cima toda verde no computador e no tablet: a barra da conta e a
   faixa "Checklist" viram um bloco só, com o título mais perto do topo. */
@media (min-width: 601px) {
  .masthead {
    background: var(--dark);
    border-bottom: 0;
    color: #fff;
  }
  .masthead .account small {
    color: #b8d0d2;
  }
  .masthead .account-name:hover {
    background: #ffffff14;
  }
  .masthead .btn.icon-button {
    background: transparent;
    border-color: #ffffff38;
    color: #fff;
    box-shadow: none;
  }
  .masthead .btn.icon-button:hover {
    background: #ffffff14;
    border-color: #ffffff66;
  }
  .masthead :focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
  }
  .app-header {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 22px;
  }
  .app-header h2 {
    margin-top: 2px;
  }
}
/* Computador e tablet: os textos "Checklist" sobem para a barra verde de
   cima, que ganha o filete laranja, e "Nova inspeção" fica no conteúdo, à
   direita. No celular (e na tela incorporada) a faixa continua como antes. */
.masthead-title,
.start-row {
  display: none;
}
@media (min-width: 601px) {
  .app:not(.embedded) .masthead {
    justify-content: space-between;
    padding: 14px 29px 18px;
    border-bottom: 3px solid var(--orange);
  }
  .app:not(.embedded) .masthead-title {
    display: block;
    min-width: 0;
  }
  .masthead-title .eyebrow {
    display: block;
    margin-bottom: 4px;
  }
  .masthead-title h2 {
    margin: 0;
    font-size: 29px;
    line-height: 1.15;
  }
  .masthead-title p {
    margin: 3px 0 0;
    color: #c7dce0;
    font-size: 13px;
  }
  .app:not(.embedded) .app-header {
    display: none;
  }
  .app:not(.embedded) .start-row {
    display: flex;
    justify-content: flex-end;
    margin: -12px 0 2px;
  }
}
/* Tags do checklist: no editor (chips + campo) e na lista, entre as
   informações e os botões; a descrição fica abaixo das informações. */
.tags-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid #bcd0d4;
  border-radius: 6px;
  background: #fff;
}
.tags-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px #f67b1c33;
}
.tags-field input {
  flex: 1;
  min-width: 160px;
  border: 0;
  outline: 0;
  padding: 6px 4px;
  background: transparent;
  box-shadow: none;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px 4px 9px;
  border-radius: 999px;
  background: #e6f1f0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
.tag-chip button {
  border: 0;
  background: none;
  padding: 0 3px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.tag-chip button:hover {
  color: #a43c37;
}
.model-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 0 1 220px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.model-tags li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.model-tags svg {
  flex: none;
  color: #2c8c8f;
}
.model-description {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 700px) {
  .model-row {
    flex-wrap: wrap;
  }
  .model-tags {
    flex: 1 1 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-left: 64px;
  }
}
@media (max-width: 600px) {
  .model-tags {
    padding-left: 47px;
  }
}
/* Inserir modelo pronto no editor do checklist e galeria de modelos. */
.template-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.template-picker .field {
  margin: 0;
}
.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gallery-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #00262880;
}
.model-gallery {
  width: min(880px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.gallery-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 1;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--dark);
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.gallery-tile svg {
  color: #2c8c8f;
}
.gallery-tile strong {
  font-size: 15px;
  line-height: 1.25;
}
.gallery-tile:hover,
.gallery-tile.on {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px #f67b1c33;
}
.library-unit-hint {
  margin: 10px 0;
}
/* Matriz de risco: cards no editor e a imagem no começo da inspeção. */
.risk-matrix-field {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}
.risk-matrix-field legend {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
}
.risk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}
.risk-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.risk-card span {
  font-weight: 700;
  color: var(--dark);
}
.risk-card img {
  grid-column: 1 / -1;
  width: 100%;
  border-radius: 4px;
  border: 1px solid #e4ecee;
}
.risk-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--dark);
}
.risk-card.on {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px #f67b1c33;
}
.risk-card.locked {
  cursor: not-allowed;
  opacity: 0.5;
}
.risk-matrix-figure {
  margin: 0 0 16px;
}
.risk-matrix-figure figcaption {
  margin-bottom: 10px;
  color: var(--muted);
}
.risk-matrix-figure figcaption strong {
  color: var(--dark);
}
.risk-matrix-figure img {
  display: block;
  width: 100%;
  max-width: 1080px;
  border-radius: 4px;
}
/* Probabilidade × severidade em cada pergunta, com a matriz e o X. */
.risk-input {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}
.risk-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.risk-selects .field {
  margin: 0;
}
.risk-grid-wrap {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  justify-self: start;
  gap: 4px 6px;
}
.risk-axis-x {
  grid-column: 2;
  font-size: 13px;
  color: var(--dark);
}
.risk-axis-y {
  grid-column: 1;
  grid-row: 2;
  writing-mode: vertical-rl;
  text-align: center;
  font-size: 13px;
  color: var(--dark);
}
.risk-grid {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  border: 1px solid #222;
}
.risk-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: 1px solid #222;
  margin: -0.5px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 1px 2px #0006;
}
.risk-result {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.risk-result strong {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  color: #1d1d1d;
}
/* Link para conferir a unidade no Google Maps. */
.unit-map-link {
  margin: 4px 0 12px;
}
.unit-map-link a {
  color: var(--dark);
  font-weight: 700;
}
/* Assinatura do técnico com data, hora e local. */
.technician-signature .actions {
  margin-top: 10px;
}
.signature-record {
  display: grid;
  gap: 12px;
  justify-items: start;
}
.signature-record img {
  max-width: 100%;
  width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.signature-record dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0;
}
.signature-record dt {
  font-weight: 700;
  color: var(--dark);
}
.signature-record dd {
  margin: 0;
}
.signature-record dd small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .signature-record dl {
    grid-template-columns: 1fr;
  }
  .signature-record dd {
    margin-bottom: 6px;
  }
}
/* Permissões por aba no cadastro do usuário. */
.perm-editor {
  display: grid;
  gap: 10px;
  margin: 8px 0 16px;
}
.perm-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f8f9;
}
.perm-summary strong,
.perm-summary small {
  display: block;
}
.perm-summary small,
.perm-head small,
.perm-admin small {
  color: var(--muted);
}
.perm-tab {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.perm-tab.off {
  background: #fafbfb;
}
.perm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.perm-head strong {
  color: var(--dark);
}
.perm-head small {
  display: block;
  margin-top: 2px;
}
.perm-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}
.perm-badge.full {
  background: #e3f4ea;
  color: #1d6b3e;
}
.perm-badge.partial {
  background: #fdf0d9;
  color: #8a5a00;
}
.perm-badge.view {
  background: #e3f1fa;
  color: #1c5a80;
}
.perm-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.perm-switch input {
  appearance: none;
  position: relative;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background: #c9d3d6;
  cursor: pointer;
  transition: background 0.15s;
}
.perm-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}
.perm-switch input:checked {
  background: var(--dark);
}
.perm-switch input:checked::after {
  transform: translateX(18px);
}
.perm-switch input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.perm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 14px;
}
.perm-actions > span {
  color: var(--muted);
}
.perm-actions .check-field {
  margin: 0;
}
.perm-admin {
  padding: 12px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}
.perm-admin strong {
  display: block;
  color: var(--dark);
}
