:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #1b3041;
  background: #f2f5f8;
  font-size: 16px;
  --nav: #101f2e;
  --muted: #5c7083;
  --line: #dde5eb;
  --blue: #1661bb;
  --teal: #007e72;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
a {
  color: var(--blue);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--nav);
  color: #afbecc;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.8px;
}
.brandmark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 36px;
  background: #c0ef73;
  color: #102231;
  border-radius: 9px;
  font-size: 25px;
  font-weight: 800;
}
.brand-sub {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 9px 0 30px 44px;
  color: #8c9eae;
}
.nav-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 22px 14px 8px;
  color: #8195a7;
}
.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #c6d2dd;
  padding: 11px 13px;
  text-align: left;
  font-size: 14px;
  margin: 2px 0;
}
.nav-button:hover {
  background: #203448;
}
.nav-button.active {
  background: #2b4055;
  color: #fff;
  box-shadow: inset 3px 0 #b9ed6e;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 8px 0;
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #f5f9fb;
}
.avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #344d65;
  display: grid;
  place-items: center;
  color: #dcebc9;
  font-weight: 700;
}
.muted {
  color: var(--muted);
}
.sidebar .muted {
  color: #99acbd;
}
.small {
  font-size: 13px;
}
.topbar {
  height: 80px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 36px;
}
.topbar select {
  max-width: 250px;
  background: #f6f8fa;
}
.workspace-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sso {
  color: #336454;
  background: #edf7f0;
  padding: 6px 10px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 650;
}
.content {
  max-width: 1560px;
  padding: 30px 36px 55px;
  margin: auto;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 0 0 8px;
  line-height: 1.2;
}
h2 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 16px;
  margin: 0 0 5px;
}
p {
  line-height: 1.55;
  margin: 6px 0;
}
.page-heading p {
  color: var(--muted);
  font-size: 14px;
}
.button {
  border: 1px solid #cad6df;
  border-radius: 7px;
  padding: 10px 15px;
  background: #fff;
  color: #20394e;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.button:hover {
  background: #edf3f7;
}
.button.primary {
  color: white;
  background: #1760a9;
  border-color: #1760a9;
}
.button.primary:hover {
  background: #124d89;
}
.button.danger {
  color: #a32929;
  background: #fff5f4;
  border-color: #edc2bc;
}
.button.tiny {
  padding: 7px 10px;
  font-size: 13px;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.notice {
  border: 1px solid #e0d6b0;
  border-left: 3px solid #b69533;
  background: #fffbee;
  border-radius: 7px;
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  color: #6f581c;
  font-size: 14px;
}
.notice.info {
  background: #eff6fc;
  border-color: #ccdfef;
  color: #375f7d;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  position: relative;
}
.stat-label {
  font-size: 14px;
  color: var(--muted);
}
.stat-value {
  font-size: 36px;
  font-weight: 650;
  letter-spacing: -1.5px;
  margin: 10px 0 5px;
}
.stat-foot {
  font-size: 13px;
  color: var(--muted);
}
.stat-icon {
  position: absolute;
  right: 18px;
  top: 20px;
  color: #7893a8;
}
.stat.red .stat-value {
  color: #b63632;
}
.stat.teal .stat-value {
  color: var(--teal);
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.panel-body {
  padding: 22px;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 22px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  background: #edf1f5;
  color: #54687a;
}
.badge.available,
.badge.passed,
.badge.closed {
  background: #e7f5ed;
  color: #21684a;
}
.badge.out_of_service,
.badge.failed,
.badge.overdue {
  background: #ffedeb;
  color: #a2332d;
}
.badge.open {
  background: #eef3fa;
  color: #315c97;
}
.badge.review {
  background: #fff4dc;
  color: #8a641d;
}
.badge.demo {
  background: #fff4dc;
  color: #836125;
}
.badge.decommissioned {
  background: #e9edf0;
  color: #62727e;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #60778b;
  background: #f8fafb;
  padding: 13px 20px;
  white-space: nowrap;
}
td {
  padding: 17px 20px;
  border-top: 1px solid #edf1f4;
  vertical-align: middle;
}
td strong {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
td .small {
  line-height: 1.4;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 290px;
}
.toolbar select {
  max-width: 200px;
}
input,
select,
textarea {
  color: #20394e;
  background: #fff;
  border: 1px solid #ced9e1;
  border-radius: 6px;
  padding: 10px 11px;
  min-height: 41px;
  max-width: 100%;
  font-size: 14px;
}
input[type="checkbox"] {
  min-height: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 550;
}
label.check {
  display: flex;
  gap: 9px;
  align-items: center;
  font-weight: 400;
  padding: 8px 0;
}
.field-help {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty h3 {
  color: #29465d;
  margin-bottom: 7px;
}
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f4;
  gap: 12px;
}
.status-line:last-child {
  border-bottom: 0;
}
.status-line p {
  font-size: 13px;
  color: var(--muted);
}
.facility-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 24px;
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.site-code {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1px;
  background: #edf2f6;
  color: #456379;
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.full {
  grid-column: 1/-1;
}
.form-stack {
  display: grid;
  gap: 18px;
}
dialog {
  width: min(700px, calc(100% - 28px));
  border: 1px solid #c9d5df;
  border-radius: 12px;
  padding: 0;
  max-height: 90vh;
  box-shadow: 0 30px 100px #10223144;
  color: #1b3041;
}
dialog::backdrop {
  background: #0d1f36a6;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-content {
  padding: 24px 26px;
}
.dialog-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafb;
}
.close {
  border: 0;
  background: transparent;
  font-size: 25px;
  color: #6a7d8d;
  line-height: 1;
  padding: 4px 7px;
}
.error {
  color: #a42c26;
  background: #fff0ee;
  padding: 12px;
  border-radius: 5px;
  font-size: 14px;
  margin-top: 15px;
}
.question {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.question .q-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}
.q-number {
  width: 25px;
  height: 25px;
  border-radius: 5px;
  background: #edf3f7;
  color: #546d80;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.question label {
  font-weight: 400;
}
.question select,
.question input,
.question textarea {
  width: 100%;
}
.record-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  background: #f2f6f9;
  border-radius: 6px;
  font-size: 13px;
  color: #506c80;
}
.audit-detail {
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 430px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #183e3a;
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 30px #10223133;
  z-index: 5;
  max-width: 400px;
  display: none;
}
#toast.visible {
  display: block;
}
.loading {
  display: grid;
  place-content: center;
  text-align: center;
  min-height: 80vh;
  gap: 10px;
}
.loading .brandmark {
  margin: auto;
}
.auth-card {
  max-width: 540px;
  margin: 12vh auto;
  padding: 35px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.auth-card h1 {
  margin-top: 20px;
}
.mobile-toggle {
  display: none;
}
.report-sheet {
  background: white;
  padding: 28px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.report-table {
  font-size: 12px;
}
.report-table th,
.report-table td {
  padding: 7px;
  border: 1px solid #c8d2da;
  white-space: normal;
}
.report-table th {
  font-size: 11px;
}
.report-sheet h2 {
  margin: 10px 0 15px;
}
.report-meta {
  font-size: 13px;
  line-height: 1.8;
}
.question-builder {
  border: 1px solid var(--line);
  background: #f8fafb;
  border-radius: 8px;
  padding: 15px;
  margin: 12px 0;
}
.access-options {
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
.view-error {
  padding: 35px;
}
.welcome-strip {
  background: #183449;
  color: #d8e8f3;
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 22px;
}
.welcome-strip p {
  color: #b4c9d8;
  font-size: 14px;
}
.welcome-strip h2 {
  color: white;
  margin-bottom: 5px;
}
@media (min-width: 1700px) {
  .content {
    padding-top: 40px;
  }
  .stat {
    padding: 25px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 215px minmax(0, 1fr);
  }
  .sidebar {
    padding: 22px 12px;
  }
  .content {
    padding: 26px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 17px;
  }
  .stat-value {
    font-size: 30px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .top-right .date-label {
    display: none;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 4;
    width: 248px;
    box-shadow: 20px 0 80px #10223155;
  }
  .sidebar.mobile-open {
    display: flex;
  }
  .mobile-toggle {
    display: inline-flex;
  }
  .topbar {
    height: auto;
    min-height: 72px;
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .topbar select {
    max-width: 170px;
  }
  .top-right {
    gap: 7px;
  }
  .sso {
    display: none;
  }
  .content {
    padding: 22px 16px;
  }
  .page-heading {
    flex-wrap: wrap;
    gap: 12px;
  }
  h1 {
    font-size: 26px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-cards {
    grid-template-columns: 1fr;
  }
  .stat-label {
    font-size: 13px;
  }
  .stat-foot {
    font-size: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .dialog-content {
    padding: 20px;
  }
  .panel-head {
    padding: 16px;
  }
  .toolbar {
    padding: 14px;
  }
  .toolbar input {
    flex: 1;
    min-width: 130px;
  }
  .button {
    white-space: normal;
  }
  .report-sheet {
    padding: 12px;
  }
  .report-meta {
    font-size: 12px;
  }
}
@media print {
  body {
    background: white;
    font-size: 11px;
  }
  .sidebar,
  .topbar,
  .page-heading,
  .no-print,
  #toast,
  dialog {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .content {
    padding: 0;
    max-width: none;
  }
  .report-sheet {
    border: 0;
    padding: 0;
    break-after: page;
  }
  .report-table tr {
    break-inside: avoid;
  }
  .report-table thead {
    display: table-header-group;
  }
  .report-table th,
  .report-table td {
    font-size: 10px;
  }
  .notice {
    font-size: 11px;
  }
  @page {
    size: A4 landscape;
    margin: 12mm;
  }
}
/* Organization login and administration use the same working-surface theme. */
:root {
  --accent-ink: #fff;
}
.button.primary {
  color: var(--accent-ink);
}
.org-logo {
  display: block;
  max-width: 220px;
  max-height: 88px;
  object-fit: contain;
}
.sidebar .brand .org-logo {
  width: 100%;
  max-height: 72px;
  background: #fff;
  padding: 8px;
  border-radius: 8px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 700;
}
.login-brand .org-logo {
  max-width: 100%;
  max-height: 110px;
}
.login-change {
  margin-top: 16px;
}
.admin-surface {
  max-width: 1150px;
  margin: 0 auto;
  padding: 28px;
}
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.admin-header .brand {
  color: var(--nav);
  text-decoration: none;
}
.admin-surface .panel {
  margin-bottom: 24px;
}
.admin-surface .form-stack {
  max-width: 760px;
}
.admin-surface input[readonly] {
  width: 100%;
}
.admin-surface .check-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-surface .check-label input {
  width: auto;
}
.admin-surface fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.admin-surface #admin-message:not(:empty) {
  padding: 14px;
  background: #e8effa;
  border-radius: 8px;
}
.admin-surface input[type="color"] {
  width: 90px;
  min-height: 44px;
  padding: 4px;
}
.admin-surface .toolbar {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .admin-surface {
    padding: 16px;
  }
  .admin-header {
    align-items: flex-start;
  }
  .customer-login {
    margin: 32px 16px;
    width: auto;
  }
}
.platform-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 3px;
}
.login-brand .platform-logo {
  width: 76px;
  height: 76px;
}
.brand .platform-logo {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}

.auth-card [hidden] {
  display: none !important;
}

.form-editor{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:20px;align-items:start}
.form-editor:not(:has(aside)){display:block;max-width:1050px}
#field-properties{position:sticky;top:12px;max-height:85vh;overflow:auto}
.mapped-page{position:relative;background:white;margin:20px 0;box-shadow:0 2px 10px #17324d22;touch-action:none}
.mapped-page>img{width:100%;height:auto;display:block;pointer-events:none}
.field-layer{position:absolute;inset:0;pointer-events:none}
.mapped-field{position:absolute!important;pointer-events:auto;border:1px solid #1678c5!important;background:#dcefff80!important;padding:0!important;min-height:0!important;min-width:0!important;margin:0!important;border-radius:2px!important;overflow:hidden;font-size:12px;text-align:left}
.mapped-field input,.mapped-field textarea,.mapped-field select{width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:1px 3px!important;border:0!important;border-radius:0!important;font-size:clamp(10px,1vw,16px)!important;background:#ffffffcc!important;color:#071b30!important;resize:none}
.mapped-field input[type=checkbox]{appearance:auto}
.mapped-field.locked{background:transparent!important;border:0!important;white-space:pre-wrap;color:#000}
.drawing-box{position:absolute;border:2px dashed #156ab1;background:#b1ddff66;pointer-events:none}
.form-row{display:flex;justify-content:space-between;gap:15px;padding:16px 0;border-bottom:1px solid #dce4ed}
.form-row p{margin:5px 0}#form-work summary{cursor:pointer;padding:18px;font-weight:600}
@media(max-width:800px){.form-editor{grid-template-columns:1fr}#field-properties{position:static}.form-row{flex-direction:column}}

.form-canvas-scroll{overflow:auto;min-width:0}.form-zoom{display:flex;align-items:center;gap:12px;max-width:250px;margin:12px 0}.form-zoom select{max-width:150px}.mapped-page{container-type:inline-size}.mapped-field input,.mapped-field textarea,.mapped-field select{font-size:clamp(6px,.9cqw,16px)!important;line-height:1.05!important;padding:0 1px!important}.mapped-field.locked{font-size:clamp(6px,.9cqw,16px);line-height:1.05}.mapped-field .form-image-picker{position:absolute;inset:0;cursor:pointer;background:transparent!important;opacity:.65}.mapped-field:has(.form-image-picker):hover .form-image-picker{opacity:1}

/* Asset inspection workspace */
.guide-layout{display:grid;grid-template-columns:minmax(210px,290px) minmax(0,1fr);gap:24px;align-items:start}.guide-sections{max-height:72vh;overflow:auto;position:sticky;top:12px}.guide-section{display:flex;flex-direction:column;gap:7px;width:100%;text-align:left;padding:16px;margin:6px 0;border:1px solid #ccd7e2;border-radius:10px;background:white;color:#17344b;cursor:pointer}.guide-section.selected{background:#e6f0ff;border:2px solid #1a5fa6}.guide-option{display:flex;align-items:center;gap:12px;padding:16px;margin:8px 0;border:1px solid #d1dbe5;border-radius:8px;background:#fff;cursor:pointer}.guide-option input{width:auto}.guide-photo{display:block;max-width:240px;max-height:200px;object-fit:contain}.guided-work fieldset{min-width:0;border:1px solid #ccd7e2;border-radius:8px;padding:16px}.guided-work input,.guided-work select,.guided-work textarea{max-width:100%}.guided-work .toolbar{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.guide-builder-question{margin:16px 0}.guided-work small{display:block}.guided-work .panel-body{overflow-wrap:anywhere}@media(max-width:760px){.guide-layout{grid-template-columns:1fr}.guide-sections{position:static;max-height:220px}.guide-option{min-height:48px}}
