/* SHAREfire door workspace: scoped to preserve the rest of SHAREhub. */
body.fd-app-active main.hub-shell {
  max-width: 1480px;
  width: 100%;
  padding: 24px clamp(14px, 3vw, 42px);
}
body.fd-app-active main > .article-header {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #dce4ed;
}
body.fd-app-active main > .article-header .meta-row {
  display: none;
}
body.fd-app-active
  main
  > :not(.article-header):not(#fire-door-app):not(#fire-documents):not(.sfw-resources) {
  display: none !important;
}
#fire-door-app {
  --fd-navy: #123e68;
  --fd-ink: #102236;
  --fd-red: #d9162b;
  color: var(--fd-ink);
  font:
    15px/1.5 Arial,
    sans-serif;
  container-type: inline-size;
}
#fire-door-app *,
.fd-dialog * {
  box-sizing: border-box;
}
#fire-door-app [hidden],
.fd-dialog [hidden] {
  display: none !important;
}
#fire-door-app button,
#fire-door-app .fd-file,
.fd-dialog button {
  min-height: 44px;
  border: 1px solid #bdcbd9;
  border-radius: 7px;
  background: #fff;
  color: #123e68;
  font:
    700 14px/1.25 Arial,
    sans-serif;
  padding: 11px 16px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}
#fire-door-app button:hover,
.fd-dialog button:hover {
  background: #edf2f8;
  border-color: #123e68;
}
#fire-door-app button:disabled,
.fd-dialog button:disabled {
  opacity: 0.5;
  cursor: default;
}
#fire-door-app button.fd-primary,
.fd-dialog button.fd-primary {
  background: #d9162b;
  border-color: #d9162b;
  color: white;
}
#fire-door-app button.fd-dark {
  background: #123e68;
  border-color: #123e68;
  color: white;
}
#fire-door-app :focus-visible,
.fd-dialog :focus-visible {
  outline: 3px solid #2587d6;
  outline-offset: 3px;
}
#fire-door-app h2 {
  font-size: 23px;
  line-height: 1.25;
  margin: 0 0 8px;
  color: #123e68;
  text-transform: none;
  letter-spacing: -0.3px;
}
#fire-door-app h3,
.fd-dialog h2 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0 0 14px;
  color: #123e68;
  text-transform: none;
}
#fire-door-app h4 {
  font-size: 16px;
  margin: 0 0 6px;
  color: #123e68;
}
#fire-door-app p {
  max-width: none;
  margin: 6px 0 14px;
  line-height: 1.6;
}
.fd-topbar,
.fd-toolbar,
.fd-row,
.fd-photo-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.fd-topbar {
  justify-content: space-between;
  background: #092744;
  color: #fff;
  padding: 18px 22px;
  border-radius: 10px 10px 0 0;
}
.fd-topbar strong {
  font-size: 18px;
}
.fd-topbar small {
  display: block;
  color: #c9d6e4;
  margin-top: 3px;
}
#fire-door-app .fd-status {
  background: #edf3f9;
  padding: 10px 18px;
  margin: 0;
  border: 1px solid #d5e0ed;
  border-top: 0;
  min-height: 45px;
  font-size: 14px;
}
#fire-door-app .fd-status.fd-error {
  background: #fff1f1;
  border-color: #e5a4ac;
  color: #8c1422;
}
.fd-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 15px 0 0;
  border-bottom: 1px solid #ced9e5;
  margin-bottom: 20px;
}
#fire-door-app .fd-nav button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  white-space: nowrap;
  padding: 13px 18px;
  color: #53677e;
}
#fire-door-app .fd-nav button[aria-selected='true'] {
  color: #123e68;
  border-bottom-color: #d9162b;
}
.fd-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.fd-metric {
  background: white;
  border: 1px solid #d5e0ea;
  border-radius: 9px;
  padding: 15px 20px;
  position: relative;
}
.fd-metric strong {
  font-size: 30px;
  display: block;
  line-height: 1.2;
  color: #123e68;
  font-variant-numeric: tabular-nums;
}
.fd-metric span {
  display: block;
  color: #52677d;
  font-size: 13px;
  margin-top: 5px;
}
.fd-section,
.fd-editor,
.fd-list {
  border: 1px solid #d5e0ea;
  border-radius: 9px;
  background: white;
  padding: 24px;
  margin-bottom: 18px;
  min-width: 0;
}
.fd-section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 15px;
}
.fd-section-head p {
  color: #53677e;
  font-size: 14px;
}
.fd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 15px 0;
}
.fd-grid .fd-wide {
  grid-column: 1/-1;
}
#fire-door-app label,
.fd-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #344e68;
  letter-spacing: 0;
  text-transform: none;
}
#fire-door-app label small {
  font-weight: 400;
}
#fire-door-app input:not([type='checkbox']):not([type='file']),
#fire-door-app select,
#fire-door-app textarea,
.fd-dialog input,
.fd-dialog select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #bccbdb;
  border-radius: 6px;
  padding: 11px;
  color: #102236;
  background: white;
  font:
    15px/1.4 Arial,
    sans-serif;
}
#fire-door-app textarea {
  min-height: 90px;
  resize: vertical;
}
#fire-door-app label.fd-checkbox {
  flex-direction: row;
  align-items: start;
  font-size: 14px;
  gap: 10px;
  max-width: 850px;
  padding: 15px 0;
}
#fire-door-app input[type='checkbox'] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 2px 0;
}
.fd-help {
  background: #f4f7fa;
  border-left: 3px solid #123e68;
  padding: 13px 17px;
  color: #425970;
  font-size: 14px;
  border-radius: 0 5px 5px 0;
}
.fd-split {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.fd-list {
  padding: 16px;
  position: sticky;
  top: 18px;
}
#fire-door-app .fd-door-button {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #dce4ec;
  background: white;
  font-weight: 400;
}
#fire-door-app .fd-door-button[aria-current='true'] {
  background: #edf3fa;
  border-color: #123e68;
  box-shadow: inset 3px 0 #d9162b;
}
.fd-door-button strong {
  display: block;
  font-size: 16px;
}
.fd-door-button span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}
.fd-door-button small {
  display: block;
  color: #5a6e81;
  font-size: 12px;
  margin-top: 7px;
}
.fd-badge {
  display: inline-block !important;
  border: 1px solid #cad6e1;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 12px;
  background: #f0f4f8;
  color: #344e68;
  font-weight: 700;
}
.fd-badge.fd-alert {
  background: #fff1f2;
  color: #9d1725;
  border-color: #efbdc4;
}
.fd-editor .fd-nav {
  margin-top: -10px;
  margin-bottom: 20px;
}
.fd-check {
  padding: 19px 0;
  border-bottom: 1px solid #e0e7ef;
}
.fd-check:last-child {
  border-bottom: 0;
}
.fd-check p {
  color: #53677e;
  font-size: 14px;
}
.fd-responses {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
#fire-door-app .fd-responses button {
  padding: 9px 12px;
  font-size: 12px;
  border-radius: 5px;
}
#fire-door-app .fd-responses button[aria-pressed='true'] {
  background: #123e68;
  color: #fff;
  border-color: #123e68;
}
#fire-door-app .fd-responses button[data-result='defect'][aria-pressed='true'] {
  background: #a61b2c;
  border-color: #a61b2c;
}
.fd-group-heading {
  margin: 24px 0 0 !important;
  padding: 10px 13px;
  background: #edf2f8;
  border-radius: 5px;
}
.fd-gap-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 15px 0;
}
.fd-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.fd-photo {
  border: 1px solid #d5e0ea;
  border-radius: 7px;
  overflow: hidden;
  padding: 12px;
  background: #f7f9fc;
}
.fd-photo img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #e5ebf1;
  margin-bottom: 12px;
  cursor: zoom-in;
}
.fd-photo-actions {
  margin-top: 12px;
}
.fd-empty {
  text-align: center;
  padding: 48px 20px;
  background: #f5f8fc;
  border: 1px dashed #b9cadb;
  border-radius: 8px;
  color: #53677e;
}
.fd-empty h3 {
  margin-bottom: 8px !important;
}
.fd-plan-controls {
  margin: 15px 0;
}
.fd-stage-scroll {
  overflow: auto;
  max-height: 70vh;
  background: #e9eef5;
  border: 1px solid #c6d4e1;
  border-radius: 8px;
  padding: 12px;
  overscroll-behavior: contain;
}
.fd-stage {
  position: relative;
  line-height: 0;
  min-width: 200px;
  margin: 0 auto;
  max-width: none;
  touch-action: pan-x pan-y;
}
.fd-stage > img {
  width: 100%;
  display: block;
  max-width: none;
  height: auto;
  user-select: none;
  pointer-events: none;
}
#fire-door-app .fd-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  background: #123e68;
  color: white;
  border-radius: 18px;
  min-height: 36px;
  min-width: 36px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 1px 6px #0006;
  touch-action: none;
  white-space: nowrap;
}
#fire-door-app .fd-pin[aria-current='true'] {
  background: #d9162b;
}
.fd-plan-controls label {
  flex: 1;
  min-width: 130px;
}
.fd-action {
  border: 1px solid #d4dfe9;
  border-left: 4px solid #123e68;
  padding: 20px;
  border-radius: 7px;
  margin: 15px 0;
}
.fd-action[data-priority='immediate'] {
  border-left-color: #d9162b;
}
.fd-table-wrap {
  overflow-x: auto;
}
#fire-door-app table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 15px 0;
}
#fire-door-app th {
  background: #edf2f7;
  text-align: left;
  color: #123e68;
}
#fire-door-app th,
#fire-door-app td {
  padding: 12px;
  border-bottom: 1px solid #d5e0ea;
  vertical-align: top;
}
.fd-dialog {
  width: min(1100px, 96vw);
  max-height: 96dvh;
  padding: 20px;
  border: 1px solid #bdcbd9;
  border-radius: 12px;
  color: #102236;
  overflow: auto;
  font:
    15px/1.5 Arial,
    sans-serif;
  box-shadow: 0 20px 90px #0005;
}
.fd-dialog::backdrop {
  background: #092744bd;
}
.fd-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.fd-dialog-head h2 {
  margin: 0;
}
.fd-draw-wrap {
  max-height: 65dvh;
  overflow: auto;
  background: #e5ebf2;
  margin: 15px 0;
  text-align: center;
}
.fd-dialog canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: auto;
  touch-action: none;
  cursor: crosshair;
}
.fd-dialog .fd-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.fd-dialog button[aria-pressed='true'] {
  background: #123e68;
  color: white;
}
.fd-dialog input[type='color'] {
  width: 50px;
  padding: 3px;
}
.fd-dialog input[type='range'] {
  width: 110px;
}
.fd-issues {
  max-height: 300px;
  overflow: auto;
  background: #fff4f4;
  color: #8b1727;
  border-radius: 6px;
  padding: 18px 18px 18px 36px;
}
@container (max-width:850px) {
  .fd-split {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .fd-editor {
    padding: 16px;
  }
  .fd-grid {
    grid-template-columns: 1fr;
  }
  .fd-grid .fd-wide {
    grid-column: auto;
  }
  .fd-gap-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .fd-metric {
    padding: 14px;
  }
}
@container (max-width:650px) {
  .fd-split {
    display: block;
  }
  .fd-list {
    position: static;
    max-height: 310px;
    overflow: auto;
  }
  .fd-section,
  .fd-editor {
    padding: 16px;
  }
  .fd-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .fd-topbar {
    padding: 16px;
  }
  .fd-section-head {
    flex-wrap: wrap;
  }
  .fd-nav button {
    padding: 12px !important;
  }
  .fd-photos {
    grid-template-columns: 1fr;
  }
  .fd-gap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media print {
  #fire-door-app button,
  #fire-door-app .fd-nav {
    display: none;
  }
}

body.fd-app-active main > #fire-documents {
  display: block !important;
  margin-top: 30px;
}

#fire-door-app .audit-voice [data-voice='record'],
#fire-door-app .audit-voice small:empty {
  display: none !important;
}
#fire-door-app .audit-voice {
  margin: 8px 0 12px;
  font-weight: 400;
  line-height: 1.5;
}
#fire-door-app .audit-voice-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
#fire-door-app .audit-voice button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 11px;
  font-size: 12px;
}
#fire-door-app .audit-voice svg {
  width: 18px;
  height: 18px;
}
#fire-door-app .audit-voice small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #53677e;
}
#fire-door-app .audit-voice .audit-voice-review {
  white-space: pre-wrap;
  background: #f3f6fa;
}
#fire-door-app .audit-voice small[role='status'] {
  font-size: 12px;
  margin-top: 5px;
}
#fire-door-app .audit-voice.is-error small[role='status'] {
  color: #a01428;
}
#fire-door-app .audit-pen-entry {
  margin: 6px 0 10px;
}
#fire-door-app .fd-note-images {
  grid-column: 1/-1;
}
#fire-door-app .fd-note-images:empty {
  display: none;
}
#fire-door-app .fd-note-images figure {
  margin: 10px 0;
  border: 1px solid #d3dfeb;
  padding: 10px;
  border-radius: 7px;
}
#fire-door-app .fd-note-images img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}
#fire-door-app .fd-note-images figcaption {
  font-size: 12px;
  color: #53677e;
}
.audit-pen-dialog .audit-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #bacbdc;
  border-radius: 6px;
  color: #123e68;
  background: white;
  font: 700 14px Arial;
  cursor: pointer;
}
.audit-pen-dialog .audit-primary {
  background: #123e68;
  color: white;
}
.audit-microphone-dialog {
  width: min(800px, 96vw);
  max-height: 94dvh;
  overflow: auto;
  border: 1px solid #bacbdc;
  border-radius: 10px;
  padding: 24px;
  color: #102236;
  background: white;
  font: 15px/1.6 Arial;
}
.audit-microphone-dialog::backdrop {
  background: #092744aa;
}

.fd-dialog-head {
  padding-right: 45px;
}

body.fd-app-active .audit-pen-head {
  padding-right: 68px;
}

.fd-check-photo-tools {
  margin: 12px 0;
  padding: 12px;
  border-radius: 6px;
  background: #f4f7fa;
}
.fd-check-photo-tools .fd-file {
  font-size: 12px !important;
  max-width: 100%;
}
.fd-check-photo-tools input[type='file'] {
  max-width: 100%;
  font: 12px Arial;
}
.fd-check-photo-tools .fd-photos {
  margin: 12px 0;
}
.fd-photo-compact img {
  height: 170px;
}
.fd-photo-element {
  font-size: 13px;
  color: #123e68;
  margin-bottom: 8px !important;
}
.fd-photo-hint {
  font-size: 12px !important;
  color: #53677e;
  margin: 8px 0 0 !important;
}

.fd-label-preview {
  padding: 12px;
  background: white;
  max-width: 350px;
}
.fd-label-preview canvas {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.fd-label-dialog input {
  width: 100%;
  min-height: 44px;
}
.fd-label-dialog label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.fd-label-dialog select {
  min-height: 44px;
  padding: 10px;
}
.fd-label-dialog .fd-help {
  padding: 14px;
  background: #f4f7fa;
  line-height: 1.6;
}
.fd-label-dialog summary {
  min-height: 44px;
  cursor: pointer;
}
#fire-door-app .fd-responses button {
  min-height: 44px;
}

/* Public quick guide stays within the existing application introduction. */
.fd-quick-help {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-top: 16px;
  font:
    15px/1.5 Arial,
    sans-serif;
}
.fd-quick-help .fd-guide-download,
.fd-quick-help summary {
  display: block;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid #bdcbd9;
  border-radius: 7px;
  background: white;
  color: #123e68;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.fd-quick-help details {
  flex: 1;
  min-width: min(280px, 100%);
}
.fd-quick-help details[open] {
  padding: 0 16px 16px;
  border: 1px solid #bdcbd9;
  border-radius: 7px;
  background: #fff;
  color: #102236;
}
.fd-quick-help details[open] summary {
  border: 0;
  margin: 0 -16px 8px;
}
.fd-quick-help details p,
.fd-quick-help details li {
  color: #102236;
  font:
    15px/1.6 Arial,
    sans-serif;
}
.fd-quick-help details li {
  margin: 6px 0;
}
.fd-quick-help details a {
  color: #123e68;
}
.fd-quick-help :focus-visible {
  outline: 3px solid #2587d6;
  outline-offset: 3px;
}
.fd-label-preview {
  max-width: 700px;
  width: 100%;
}

.fd-label-preview canvas {
  border: 1px solid #d9e3ec;
  border-radius: 4px;
  display: block;
}
