/* =========================
   PROJECTTOOLS - BASE STYLES
   ========================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
  color: #1f2933;
}


/* =========================
   APP LAYOUT
   ========================= */

.app-shell {
  display: flex;
  min-height: 100vh;
}


/* =========================
   SIDEBAR
   ========================= */

.sidebar {
  width: 250px;
  background: #17212b;
  color: white;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
}

.logo {
  padding: 26px 22px;
  border-bottom: 1px solid #2d3945;
}

.logo h1 {
  font-size: 22px;
  letter-spacing: 1px;
}

.logo h1 span {
  color: #38bdf8;
}

.logo p {
  margin-top: 5px;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}


/* =========================
   NAVIGATION
   ========================= */

.main-nav {
  padding: 18px 12px;
}

.nav-heading {
  padding: 20px 12px 7px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1.2px;
  color: #64748b;
}

.nav-item {
  display: block;
  padding: 11px 12px;
  margin-bottom: 3px;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: 0.2s;
}

.nav-item:hover {
  background: #24313e;
  color: white;
}

.nav-item.active {
  background: #0ea5e9;
  color: white;
  font-weight: bold;
}


/* =========================
   MAIN CONTENT
   ========================= */

.main-content {
  margin-left: 250px;
  width: calc(100% - 250px);
  min-height: 100vh;
}


/* =========================
   TOP BAR
   ========================= */

.topbar {
  height: 76px;
  background: white;
  border-bottom: 1px solid #dfe3e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.project-label {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #8492a6;
}

.project-name {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 600;
  color: #17212b;
}

.project-number {
  padding: 8px 13px;
  background: #eef6fa;
  color: #087ca7;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
}


/* =========================
   PAGE
   ========================= */

.page-content {
  max-width: 1250px;
  margin: 0 auto;
  padding: 32px 34px 60px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.page-header h2 {
  font-size: 27px;
  color: #17212b;
}

.page-header p {
  margin-top: 6px;
  color: #718096;
  font-size: 14px;
}

.edit-button {
  border: 0;
  background: #0ea5e9;
  color: white;
  padding: 11px 17px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.edit-button:hover {
  background: #0284c7;
}


/* =========================
   CARDS
   ========================= */

.card {
  background: white;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card-header {
  padding: 17px 21px;
  border-bottom: 1px solid #edf0f2;
  background: #fbfcfd;
}

.card-header h3 {
  font-size: 15px;
  color: #253442;
}


/* =========================
   INFORMATION GRID
   ========================= */

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.info-field {
  padding: 21px;
  min-height: 88px;
  border-right: 1px solid #edf0f2;
}

.info-field:last-child {
  border-right: none;
}

.info-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: bold;
  color: #8795a5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-value {
  font-size: 15px;
  font-weight: 600;
  color: #263746;
}


/* =========================
   NOTES
   ========================= */

.notes-box {
  padding: 22px;
  color: #8492a6;
  font-size: 14px;
  min-height: 90px;
}


/* =========================
   TABLET
   ========================= */


/* =========================
   MOBILE
   ========================= */

@media (max-width: 700px) {

  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    padding: 0 18px;
  }

  .page-content {
    padding: 22px 16px 40px;
  }

  .page-header {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-field {
    border-right: none;
    border-bottom: 1px solid #edf0f2;
  }

  .info-field:last-child {
    border-bottom: none;
  }

}/* =========================
   EDIT MODE
   ========================= */

.edit-input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: white;
  color: #263746;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.edit-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.12);
}

.edit-button.save-mode {
  background: #16a34a;
}

.edit-button.save-mode:hover {
  background: #15803d;
}
.cancel-button {
  border: 1px solid #cbd5e1;
  background: white;
  color: #475569;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.cancel-button:hover {
  background: #f1f5f9;
}/* =========================
   PROJECTS PAGE
   ========================= */

.projects-toolbar {
  margin-bottom: 18px;
}

.project-search {
  width: 100%;
  max-width: 420px;
  padding: 11px 13px;
  border: 1px solid #d7dee5;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  outline: none;
}

.project-search:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  padding: 18px 20px;
}

.project-main-info {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.project-card-number {
  min-width: 72px;
  font-size: 13px;
  font-weight: bold;
  color: #0ea5e9;
}

.project-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.project-card p {
  font-size: 13px;
  color: #718096;
}

.project-manager {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}

.project-status {
  padding: 6px 10px;
  border-radius: 20px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 12px;
  font-weight: bold;
}

.open-project-button {
  text-decoration: none;
  padding: 9px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: bold;
}

.open-project-button:hover {
  background: #f8fafc;
}


/* =========================
   MODAL
   ========================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 560px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 22px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  font-size: 20px;
}

.modal-header p {
  margin-top: 4px;
  font-size: 13px;
  color: #718096;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}

.modal-body {
  padding: 22px;
}

.modal-field {
  margin-bottom: 17px;
}

.modal-field:last-child {
  margin-bottom: 0;
}

.modal-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.modal-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.modal-field input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 16px 22px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}/* =========================
   SURVEYORS TOOL
   ========================= */

.survey-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.summary-card {
  background: white;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  padding: 18px 20px;
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.7px;
  color: #8795a5;
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 22px;
  color: #17212b;
}

/* =========================
   SURVEY SUMMARY PAGE
   ========================= */

.survey-summary-section {
  margin-bottom: 18px;
}


.survey-summary-section .summary-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(130px, 1fr)
  );
  gap: 12px;
}


.survey-summary-section .summary-card {
  padding: 14px 10px;
  min-height: 74px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
}


.survey-summary-section .summary-card strong {
  display: block;

  font-size: 24px;
  line-height: 1;

  text-align: center;
}


.survey-summary-section .summary-label {
  display: block;

  margin-bottom: 8px;

  font-size: 10px;
  line-height: 1.2;

  text-align: center;
}

/* =========================
   SURVEY LOCATION
   ========================= */

.survey-location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 20px;
}

.survey-location-grid select,
.modal-field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  outline: none;
}

.survey-location-grid select:focus,
.modal-field select:focus {
  border-color: #0ea5e9;
}

.survey-location-actions {
  display: flex;
  gap: 8px;
  padding-bottom: 1px;
}

.secondary-button {
  border: 1px solid #cbd5e1;
  background: white;
  color: #334155;
  padding: 10px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.secondary-button:hover {
  background: #f8fafc;
}


/* =========================
   ROOM LIST
   ========================= */

.room-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.room-list-header p {
  margin-top: 4px;
  font-size: 12px;
  color: #8795a5;
}

.room-search {
  width: 260px;
  padding: 9px 11px;
  border: 1px solid #d7dee5;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.room-search:focus {
  border-color: #0ea5e9;
}

.room-table-wrap {
  overflow-x: auto;
}

.room-table {
  width: 100%;
  border-collapse: collapse;
}

.room-table th {
  text-align: left;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.room-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f2;
  font-size: 13px;
  color: #334155;
  vertical-align: middle;
}

.room-table tbody tr:last-child td {
  border-bottom: none;
}

.room-table tbody tr:hover {
  background: #fbfdff;
}

.room-table td strong {
  display: block;
  font-size: 14px;
  color: #17212b;
}

.room-code {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
}


/* =========================
   SURVEY STATUS
   ========================= */

.status-pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
}

.status-pill.complete {
  background: #ecfdf5;
  color: #15803d;
}

.status-pill.progress {
  background: #eff6ff;
  color: #2563eb;
}

.status-pill.not-started {
  background: #f1f5f9;
  color: #64748b;
}

.status-pill.no-access {
  background: #fef2f2;
  color: #dc2626;
}

.status-pill.assumed {
  background: #eff6ff;
  color: #2563eb;
}

/* =========================
   OPEN ROOM
   ========================= */

.room-open-button {
  border: 1px solid #cbd5e1;
  background: white;
  color: #334155;
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.room-open-button:hover {
  background: #f8fafc;
}


/* =========================
   RESPONSIVE SURVEY
   ========================= */

@media (max-width: 1000px) {

  .survey-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .survey-location-grid {
    grid-template-columns: 1fr 1fr;
  }

  .survey-location-actions {
    grid-column: 1 / -1;
  }

}

@media (max-width: 700px) {

  .survey-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .survey-location-grid {
    grid-template-columns: 1fr;
  }

  .survey-location-actions {
    grid-column: auto;
    flex-direction: column;
  }

  .room-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .room-search {
    width: 100%;
  }

}/* =========================
   CUSTOM ROOM TYPE
   ========================= */

.custom-room-type-field {
  display: none;
}

.custom-room-type-field.show {
  display: block;
}

.field-help {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
}/* =========================
   ROOM EXTRAS
   ========================= */

.room-extra-section {
  margin-bottom: 18px;
}

.add-extra-button {
  border: 0;
  background: transparent;
  color: #0284c7;
  padding: 0;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.add-extra-button:hover {
  text-decoration: underline;
}

.room-subcategory-field {
  display: none;
  margin-top: 15px;
}

.room-subcategory-field.show {
  display: block;
}


/* =========================
   ROOM PHOTO
   ========================= */

.room-photo-upload {
  display: block;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: 0.2s;
}

.room-photo-upload:hover {
  border-color: #0ea5e9;
  background: #f0f9ff;
}

.room-photo-upload input {
  display: none;
}

.photo-upload-content {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
}

.photo-upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;

  font-size: 22px;
}

.photo-upload-content strong {
  display: block;
  font-size: 13px;
  color: #334155;
}

.photo-upload-content p {
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
}

.room-photo-preview {
  margin-top: 10px;
}

.room-photo-preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 7px;
}/* =========================
   ROOM LIST PHOTO / SUBCATEGORY
   ========================= */

.room-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-thumbnail {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
}

.room-thumbnail-placeholder {
  width: 54px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 9px;
  text-align: center;
}

.room-subcategory {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
}/* =========================
   ADD ROOM MODAL LAYOUT
   ========================= */

.room-modal {
  max-width: 820px;
}

.room-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.room-modal .modal-body {
  padding: 24px;
}

.room-modal .room-photo-upload {
  min-height: 90px;
}

@media (max-width: 700px) {

  .room-modal {
    max-width: 100%;
  }

  .room-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

}.room-photo-empty {
  width: 54px;
  height: 42px;
  border-radius: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}/* =========================
   ROOM SURVEY PAGE
   ========================= */

.room-back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #0284c7;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
}

.room-back-link:hover {
  text-decoration: underline;
}

.room-location-label {
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: bold;
}

.room-page-header {
  margin-bottom: 20px;
}

.room-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* =========================
   ROOM SUMMARY
   ========================= */

.room-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
  background: white;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  overflow: hidden;
}

.room-summary-strip > div {
  padding: 16px 18px;
  border-right: 1px solid #edf0f2;
}

.room-summary-strip > div:last-child {
  border-right: none;
}

.room-summary-strip span {
  display: block;
  margin-bottom: 5px;
  color: #8795a5;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.room-summary-strip strong {
  color: #17212b;
  font-size: 14px;
}


/* =========================
   SURVEY SECTIONS
   ========================= */

.survey-section {
  margin-bottom: 16px;
  background: white;
  border: 1px solid #e1e6eb;
  border-radius: 9px;
  overflow: hidden;
}

.survey-section-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  background: #fbfcfd;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
}

.survey-section-header > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.survey-section-number {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 11px;
  font-weight: bold;
}

.survey-section-header h3 {
  color: #17212b;
  font-size: 15px;
}

.survey-section-header p {
  margin-top: 3px;
  color: #8795a5;
  font-size: 11px;
}

.section-chevron {
  color: #64748b;
  font-size: 18px;
}

.survey-section-body {
  padding: 20px;
  border-top: 1px solid #edf0f2;
}

.survey-section-body.collapsed {
  display: none;
}


/* =========================
   ROOM SURVEY FIELDS
   ========================= */

.survey-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.survey-field {
  margin-bottom: 18px;
}

.survey-field label {
  display: block;
  margin-bottom: 7px;
  color: #475569;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.survey-field input,
.survey-field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: #263746;
  font-size: 14px;
  outline: none;
}

.survey-field input:focus,
.survey-field textarea:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}

.survey-field > span {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 10px;
}

.full-width {
  grid-column: 1 / -1;
}


/* =========================
   CHOICE BUTTONS
   ========================= */

.choice-group {
  display: flex;
  gap: 8px;
}

.choice-group.wrap {
  flex-wrap: wrap;
}

.choice-button {
  border: 1px solid #cbd5e1;
  background: white;
  color: #475569;
  padding: 9px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.choice-button:hover {
  background: #f8fafc;
}

.choice-button.active {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #0284c7;
}


/* =========================
   TOGGLES / CHECKBOXES
   ========================= */

.toggle-list {
  display: flex;
  flex-direction: column;
}

.toggle-row,
.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0f2;
}

.toggle-row:last-child,
.check-row:last-child {
  border-bottom: none;
}

.toggle-row span,
.check-row span {
  flex: 1;
}

.toggle-row strong,
.check-row strong {
  display: block;
  color: #334155;
  font-size: 13px;
}

.toggle-row small,
.check-row small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
}

.toggle-row input,
.check-row input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}


/* =========================
   FITTING LIST
   ========================= */

.fitting-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fitting-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fbfdff;
}

.fitting-card-quantities {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.fitting-card-actions {
  margin-left: 0;
}

.fitting-card-quantity {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fitting-card-quantity > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fitting-card-stepper {
  display: grid;
  grid-template-columns: 34px 38px 34px;
  align-items: center;
}

.fitting-card-quantity-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.fitting-card-quantity-button:first-child {
  border-radius: 6px 0 0 6px;
  border-right: 0;
}

.fitting-card-quantity-button:last-child {
  border-radius: 0 6px 6px 0;
  border-left: 0;
}

.fitting-card-quantity-button:hover {
  background: #e0f2fe;
  color: #0284c7;
}

.fitting-card-quantity-button:active {
  background: #bae6fd;
}

.fitting-card-quantity-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  background: white;
  color: #17212b;
  font-size: 14px;
}

.fitting-card-main {
  display: flex;
  align-items: center;
  gap: 13px;
}

.fitting-tag {
  min-width: 44px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #17212b;
  color: white;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
}

.fitting-card h4 {
  color: #17212b;
  font-size: 14px;
}

.fitting-card p {
  margin-top: 4px;
  color: #718096;
  font-size: 11px;
}

.add-fitting-button {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #38bdf8;
  border-radius: 7px;
  background: #f0f9ff;
  color: #0284c7;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.add-fitting-button:hover {
  background: #e0f2fe;
}


/* =========================
   ROOM SURVEY RESPONSIVE
   ========================= */

@media (max-width: 900px) {

  .room-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .survey-form-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 700px) {

  .room-header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .room-summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .survey-section-header {
    padding: 14px;
  }

  .survey-section-body {
    padding: 14px;
  }

  .fitting-card {
    align-items: flex-start;
  }

}/* =========================
   ROOM PAGE REFINEMENT
   ========================= */

.room-page-header {
  padding: 20px 22px;
  background: white;
  border: 1px solid #e1e6eb;
  border-radius: 10px;
}

.room-page-header h2 {
  margin-top: 4px;
  font-size: 28px;
}

.room-page-header p {
  margin-top: 5px;
}

.room-summary-strip {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.room-summary-strip > div {
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.survey-section {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
}

.survey-section-header {
  min-height: 66px;
}

.survey-section-header:hover {
  background: #f7fafc;
}

.survey-section-header h3 {
  font-size: 16px;
}

.survey-section-header p {
  font-size: 12px;
}

.survey-section-number {
  width: 34px;
  height: 34px;
}

.survey-section-body {
  background: white;
}

.fitting-card {
  min-height: 70px;
}

.fitting-tag {
  min-width: 52px;
  padding: 10px;
}

.add-fitting-button {
  min-height: 46px;
  font-size: 14px;
}


/* =========================
   TABLET / MOBILE SURVEY UX
   ========================= */

@media (max-width: 900px) {

  .room-page-header {
    padding: 18px;
  }

  .room-page-header h2 {
    font-size: 24px;
  }

  .choice-button {
    min-height: 44px;
    padding: 10px 15px;
  }

  .survey-field input,
  .survey-field textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .room-open-button,
  .edit-button,
  .secondary-button {
    min-height: 44px;
  }

}

@media (max-width: 700px) {

  .page-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .room-page-header {
    border-radius: 8px;
  }

  .room-summary-strip {
    gap: 0;
  }

  .survey-section {
    border-radius: 8px;
  }

  .survey-section-header {
    min-height: 72px;
  }

}/* =========================
   FITTING MODAL
   ========================= */

.fitting-modal {
  max-width: 900px;
}

.fitting-modal .modal-body {
  padding: 24px;
}

.survey-subsection {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.survey-subsection h3 {
  margin-bottom: 14px;
  font-size: 14px;
  color: #334155;
}

/* =========================
   QUANTITY STEPPER
   ========================= */

.quantity-stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: stretch;
  width: 100%;
}

.quantity-stepper input {
  min-width: 0;
  text-align: center;
  border-radius: 0;
}

.quantity-stepper-button {
  min-width: 48px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.quantity-stepper-button:first-child {
  border-radius: 6px 0 0 6px;
  border-right: 0;
}

.quantity-stepper-button:last-child {
  border-radius: 0 6px 6px 0;
  border-left: 0;
}

.quantity-stepper-button:hover {
  background: #e0f2fe;
  color: #0284c7;
}

.quantity-stepper-button:active {
  background: #bae6fd;
}

.multi-choice-group .choice-button.active {
  background: #e0f2fe;
  border-color: #0ea5e9;
  color: #0284c7;
}

.fitting-thumbnail {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
}/* =========================
   FIX MODAL SCROLLING
   ========================= */

#fitting-modal {
  overflow-y: auto;
  padding: 24px;
}

#fitting-modal .fitting-modal {
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#fitting-modal .modal-header {
  flex-shrink: 0;
}

#fitting-modal .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

#fitting-modal .modal-footer {
  flex-shrink: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
}#mounting-type-group {
  margin-bottom: 16px;
}/* =========================
   CONDITIONAL REASONS
   ========================= */

.conditional-reason {
  display: none;
  margin-top: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
}

.conditional-reason.show {
  display: block;
}

.conditional-other {
  display: none;
}

.conditional-other.show {
  display: block;
}

.conditional-reason select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  font-size: 14px;
}/* =========================
   CUSTOM WATTAGE
   ========================= */

.conditional-wattage-field {
  display: none;
}

.conditional-wattage-field.show {
  display: block;
}
#suggested-product-family {
  width: 100%;
}
/* =========================
   DRAWING COVERAGE
   ========================= */

.survey-view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.survey-view-tab {
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  color: #475569;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
}

.survey-view-tab.active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: white;
}


/* =========================
   DRAWING TOOLBAR
   ========================= */

.drawing-toolbar {
  display: grid;

  grid-template-columns:
    minmax(180px, 1.25fr)
    minmax(180px, 1.25fr)
    minmax(150px, 0.8fr)
    minmax(160px, 1fr)
    auto;

  gap: 12px;

  align-items: end;

  padding: 14px 20px;
}

.drawing-toolbar .modal-field {
  margin-bottom: 0;
}

.drawing-toolbar select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: white;
  font-size: 14px;
}

.drawing-toolbar-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 1px;
}


/* =========================
   DRAWING LAYOUT
   ========================= */

.drawing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.drawing-card {
  min-width: 0;
}

.drawing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.drawing-card-header p {
  margin-top: 4px;
  color: #8795a5;
  font-size: 11px;
}


/* =========================
   STATUS TOOLBAR
   ========================= */

.drawing-status-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.drawing-status-button {
  display: flex;
  align-items: center;
  gap: 7px;

  border: 1px solid #cbd5e1;
  border-radius: 20px;

  padding: 8px 11px;

  background: white;
  color: #475569;

  font-size: 11px;
  font-weight: bold;

  cursor: pointer;
}

.drawing-status-button > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.drawing-status-button.complete > span {
  background: #16a34a;
}

.drawing-status-button.query > span {
  background: #f59e0b;
}

.drawing-status-button.no-access > span {
  background: #dc2626;
}

.drawing-status-button.assumed > span {
  background: #2563eb;
}

.drawing-status-button.active {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
}


/* =========================
   DRAWING CANVAS
   ========================= */

.drawing-canvas {
  position: relative;

  min-height: 620px;

  overflow: hidden;

  background:
    linear-gradient(#eef2f7 1px, transparent 1px),
    linear-gradient(90deg, #eef2f7 1px, transparent 1px),
    white;

  background-size: 24px 24px;

  cursor: crosshair;
}

.drawing-placeholder {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  pointer-events: none;

  text-align: center;
  color: #64748b;
}

.drawing-placeholder strong {
  font-size: 18px;
  color: #334155;
}

.drawing-placeholder p {
  margin-top: 8px;
  font-size: 13px;
}

.drawing-help {
  max-width: 420px;
  color: #94a3b8;
}


/* =========================
   DRAWING MARKERS
   ========================= */

.drawing-marker {
  position: absolute;

  width: 42px;
  height: 42px;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  border: 3px solid white;

  color: white;

  font-size: 12px;
  font-weight: bold;

  box-shadow:
    0 2px 7px rgba(15, 23, 42, 0.25);

  cursor: pointer;
}

.drawing-marker.complete {
  background: #16a34a;
}

.drawing-marker.query {
  background: #f59e0b;
}

.drawing-marker.no-access {
  background: #dc2626;
}

.drawing-marker.assumed {
  background: #2563eb;
}


/* =========================
   COVERAGE PANEL
   ========================= */

.coverage-panel {
  position: sticky;
  top: 94px;
}

.coverage-list {
  padding: 8px 16px;
}

.coverage-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;

  padding: 12px 0;

  border-bottom: 1px solid #edf0f2;

  font-size: 12px;
}

.coverage-row:last-child {
  border-bottom: none;
}

.coverage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.coverage-dot.complete {
  background: #16a34a;
}

.coverage-dot.query {
  background: #f59e0b;
}

.coverage-dot.no-access {
  background: #dc2626;
}

.coverage-dot.assumed {
  background: #2563eb;
}

.coverage-row strong {
  color: #17212b;
}

.coverage-row.unmarked {
  color: #64748b;
}


/* =========================
   CURRENT ROOM
   ========================= */

.current-room-card {
  padding: 18px;
}

.current-room-card > strong {
  display: block;
  font-size: 20px;
  color: #17212b;
}

.current-room-card > span {
  display: block;
  margin-top: 5px;
  margin-bottom: 16px;
  color: #718096;
  font-size: 12px;
}

.current-room-card .edit-button {
  width: 100%;
}


/* =========================
   RESPONSIVE DRAWING
   ========================= */

@media (max-width: 1000px) {

  .drawing-layout {
    grid-template-columns: 1fr;
  }

  .coverage-panel {
    position: static;
  }

}

/* Compact drawing selector for tablet / narrow screens */

@media (max-width: 1100px) {

  .drawing-toolbar {
    grid-template-columns:
      1fr
      1fr;
  }

  .drawing-toolbar-actions {
    align-items: stretch;
  }

  .drawing-toolbar-actions .secondary-button {
    width: 100%;
    text-align: center;
  }

}

@media (max-width: 700px) {

  .drawing-toolbar {
    grid-template-columns: 1fr;
  }

  .drawing-status-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .drawing-status-button {
    min-height: 44px;
    justify-content: flex-start;
  }

  .drawing-canvas {
    min-height: 520px;
  }

}
/* =========================
   DRAWING COVERAGE AREAS
   ========================= */

.coverage-area {
  position: absolute;

  border: 2px solid;

  box-sizing: border-box;

  z-index: 5;

  cursor: pointer;
}


/* COMPLETE */

.coverage-area.complete {
  border-color: rgba(22, 163, 74, 0.9);

  background:
    repeating-linear-gradient(
      45deg,
      rgba(22, 163, 74, 0.28),
      rgba(22, 163, 74, 0.28) 6px,
      rgba(22, 163, 74, 0.12) 6px,
      rgba(22, 163, 74, 0.12) 12px
    );
}


/* QUERY */

.coverage-area.query {
  border-color: rgba(245, 158, 11, 0.95);

  background:
    repeating-linear-gradient(
      45deg,
      rgba(245, 158, 11, 0.3),
      rgba(245, 158, 11, 0.3) 6px,
      rgba(245, 158, 11, 0.12) 6px,
      rgba(245, 158, 11, 0.12) 12px
    );
}


/* NO ACCESS */

.coverage-area.no-access {
  border-color: rgba(220, 38, 38, 0.95);

  background:
    repeating-linear-gradient(
      45deg,
      rgba(220, 38, 38, 0.3),
      rgba(220, 38, 38, 0.3) 6px,
      rgba(220, 38, 38, 0.12) 6px,
      rgba(220, 38, 38, 0.12) 12px
    );
}


/* NO ACCESS / ASSUMED */

.coverage-area.assumed {
  border-color: rgba(37, 99, 235, 0.95);

  background:
    repeating-linear-gradient(
      45deg,
      rgba(37, 99, 235, 0.3),
      rgba(37, 99, 235, 0.3) 6px,
      rgba(37, 99, 235, 0.12) 6px,
      rgba(37, 99, 235, 0.12) 12px
    );
}


/* Make hatch slightly stronger on hover */

.coverage-area:hover {
  filter: brightness(0.95);
}
/* =========================
   POLYGON DRAWING TOOL
   ========================= */

.drawing-svg-layer {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 5;

  overflow: visible;
}


/* Toolbar */

.polygon-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;

  padding: 10px 16px;

  background: #f8fafc;

  border-bottom: 1px solid #e5e7eb;
}

.polygon-actions button {
  padding: 7px 12px;

  border: 1px solid #cbd5e1;
  border-radius: 5px;

  background: white;
  color: #475569;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;
}

.polygon-actions button:hover {
  background: #f1f5f9;
}

.polygon-actions button.danger {
  margin-left: auto;

  color: #dc2626;
}


/* Polygon currently being drawn */

.active-coverage-line {
  fill: none;

  stroke-dasharray: 5 4;

  pointer-events: none;
}

.active-coverage-line.complete {
  stroke: #16a34a;
}

.active-coverage-line.query {
  stroke: #f59e0b;
}

.active-coverage-line.no-access {
  stroke: #dc2626;
}

.active-coverage-line.assumed {
  stroke: #2563eb;
}


/* Point handles */

.polygon-point {
  stroke: white;
  stroke-width: 2;

  pointer-events: none;
}

.polygon-point.complete {
  fill: #16a34a;
}

.polygon-point.query {
  fill: #f59e0b;
}

.polygon-point.no-access {
  fill: #dc2626;
}

.polygon-point.assumed {
  fill: #2563eb;
}


/* Completed polygons */

.coverage-polygon {
  cursor: pointer;

  transition:
    opacity 0.15s ease;
}

.coverage-polygon.complete {
  fill: rgba(22, 163, 74, 0.25);
  stroke: #16a34a;
}

.coverage-polygon.query {
  fill: rgba(245, 158, 11, 0.28);
  stroke: #f59e0b;
}

.coverage-polygon.no-access {
  fill: rgba(220, 38, 38, 0.25);
  stroke: #dc2626;
}

.coverage-polygon.assumed {
  fill: rgba(37, 99, 235, 0.25);
  stroke: #2563eb;
}


/* Selected polygon */

.coverage-polygon.selected {
  stroke: #0f172a !important;
  filter: brightness(0.72);
}
.drawing-status-button.led > span {
  background: #eab308;
}

.coverage-dot.led {
  background: #eab308;
}

.active-coverage-line.led {
  stroke: #eab308;
}

.polygon-point.led {
  fill: #eab308;
}

.coverage-polygon.led {
  fill: rgba(234, 179, 8, 0.28);
  stroke: #eab308;
}
/* =========================
   UPLOADED DRAWINGS
   ========================= */

.uploaded-drawing-image,
.uploaded-drawing-pdf {
  display: block;

  width: 100%;
  height: auto;

  position: relative;

  z-index: 1;

  user-select: none;
  pointer-events: none;
}

.uploaded-drawing-image {
  object-fit: contain;
}
.mark-drawing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.room-header-actions
.mark-drawing-button,

.room-header-actions
#redraw-room-boundary-button,

.room-header-actions
#copy-room-button {
  width: 120px;
  min-width: 120px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-align: center;
}
/* Make Finish Shape the primary drawing action */

#finish-polygon {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: white;

  padding: 10px 20px;

  font-size: 12px;
  font-weight: 800;

  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.15);
}

#finish-polygon:hover {
  background: #0284c7;
  border-color: #0284c7;
}
/* =========================
   OPERATING HOURS CALCULATOR
   ========================= */

.operating-hours-modal-window {
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.operating-hours-modal-window .modal-header {
  flex-shrink: 0;
}

.operating-hours-modal-window .modal-body {
  overflow-y: auto;
  min-height: 0;
}

.operating-hours-modal-window .modal-footer {
  flex-shrink: 0;
}

.operating-hours-week {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.operating-day-row {
  display: grid;
  grid-template-columns: 110px 1fr auto 1fr 100px;
  gap: 10px;
  align-items: center;
}

.operating-day-row strong {
  font-size: 13px;
  color: #334155;
}

.operating-day-row input[type="time"] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.operating-day-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

.operating-hours-result {
  margin-top: 20px;
  padding: 18px;
  border-radius: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.operating-hours-result span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: bold;
  color: #64748b;
}

.operating-hours-result strong {
  font-size: 24px;
  color: #0284c7;
}

@media (max-width: 800px) {

  .operating-day-row {
    grid-template-columns: 1fr 1fr;
  }

  .operating-day-row strong,
  .operating-day-row label {
    grid-column: 1 / -1;
  }

}
.info-label-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.inline-calculate-button,
.info-source-link {
  padding: 0;
  border: 0;
  background: none;

  color: #0284c7;

  font-size: 11px;
  font-weight: 800;

  text-decoration: none;
  cursor: pointer;
}

.inline-calculate-button:hover,
.info-source-link:hover {
  text-decoration: underline;
}

.inline-calculate-button {
  padding: 0;
  border: 0;
  background: none;

  color: #0284c7;

  font: inherit;
  font-size: 11px;
  font-weight: 800;

  cursor: pointer;
}

.inline-calculate-button:hover {
  text-decoration: underline;
}
.info-source-link {
  color: #0284c7;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.info-source-link:hover {
  text-decoration: underline;
}
/* ==============================
   PROJECT NOTES EDITING
============================== */

.project-notes-input {
  display: block;
  width: 100%;
  min-height: 130px;
  box-sizing: border-box;

  padding: 14px 16px;

  border: 1px solid #cbd5e1;
  border-radius: 6px;

  background: #ffffff;

  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;

  resize: vertical;
  outline: none;
}

.project-notes-input:focus {
  border-color: #16a9e0;
  box-shadow: 0 0 0 2px rgba(22, 169, 224, 0.1);
}

.notes-box:has(.project-notes-input) {
  padding: 16px 20px;
}
/* ==============================
   SITE INFORMATION ALIGNMENT
============================== */

.info-field {
  display: flex;
  flex-direction: column;
}

/* Give every field the same heading area */
.info-field > label,
.info-label-action {
  min-height: 46px;
  margin: 0;
}

/* Remove the normal label margin from simple fields */
.info-field > label {
  display: block;
  margin-bottom: 0;
}

/* Labels which also contain Calculate / Source */
.info-label-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
}

.info-label-action label {
  margin-bottom: 0;
}

/* Inputs/value boxes now start at the same height */
.info-field .field-value {
  margin-top: 0;
}
.page-header {
  position: relative;
}

.page-header .cancel-button {
  margin-right: 8px;
}

.page-header .cancel-button,
.page-header .edit-button {
  flex-shrink: 0;
}
/* Keep Survey Location dropdowns level with action buttons */
.survey-location-grid .modal-field {
  margin-bottom: 0;
}
/* ==============================
   ROOM ROW ACTIONS
============================== */

.room-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.room-copy-button,
.room-delete-button {
  border: 1px solid #cbd5e1;
  background: white;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

.room-copy-button {
  color: #334155;
}

.room-copy-button:hover {
  background: #f8fafc;
}

.room-delete-button {
  color: #dc2626;
  border-color: #fecaca;
}

.room-delete-button:hover {
  background: #fef2f2;
}
/* ==============================
   COPY ROOM MODAL
============================== */

.copy-room-modal {
  max-width: 560px;
}

.copy-room-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.copy-room-summary > div {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
}

.copy-room-summary strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #172333;
}

.copy-room-summary p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}
/* ==============================
   DELETE ROOM MODAL
============================== */

.delete-room-modal {
  max-width: 520px;
}

.delete-room-warning {
  padding: 16px 18px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
}

.delete-room-warning strong {
  display: block;
  margin-bottom: 6px;
  color: #b91c1c;
  font-size: 14px;
}

.delete-room-warning p {
  margin: 0;
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.5;
}

.delete-room-confirm-button {
  border: 0;
  background: #dc2626;
  color: white;
  padding: 11px 17px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.delete-room-confirm-button:hover {
  background: #b91c1c;
}
/* Equal Survey Location columns */
.survey-location-grid {
  grid-template-columns: repeat(3, 1fr);
}

.survey-location-actions {
  grid-column: 1 / -1;
}
/* Show All Areas active state */
#show-all-areas-button.all-areas-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

#show-all-areas-button.all-areas-active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
/* ==============================
   ALL AREAS GROUP HEADERS
============================== */

.room-area-header td {
  padding: 10px 16px;
  background: #eef6fa;
  border-top: 1px solid #dbe7ee;
  border-bottom: 1px solid #dbe7ee;
  color: #087ca7;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.room-area-header:hover {
  background: transparent !important;
}
/* ==============================
   DRAWING STATUS PILLS
============================== */

.drawing-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}

/* Initial / Unmarked */
.drawing-status-pill.unmarked,
.drawing-status-pill.initial-survey {
  background: #f1f5f9;
  color: #64748b;
}

/* Complete */
.drawing-status-pill.complete,
.drawing-status-pill.marked {
  background: #ecfdf5;
  color: #15803d;
}

/* LED */
.drawing-status-pill.led {
  background: #fefce8;
  color: #a16207;
}

/* Query */
.drawing-status-pill.query {
  background: #fff7ed;
  color: #c2410c;
}

/* No Access */
.drawing-status-pill.no-access {
  background: #fef2f2;
  color: #dc2626;
}

/* No Access / Assumed */
.drawing-status-pill.assumed {
  background: #eff6ff;
  color: #2563eb;
}
/* ==============================
   ROOM INFORMATION TIDY-UP
============================== */

.room-location-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 42px;
  padding: 9px 10px;

  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}

.room-location-display #room-location-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.4;
}

.room-location-edit-button {
  flex-shrink: 0;

  padding: 7px 10px;

  border: 1px solid #cbd5e1;
  border-radius: 5px;

  background: white;
  color: #334155;

  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.room-location-edit-button:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.tag-manage-button {
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: white;
  color: #334155;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
}

.tag-manage-button:hover {
  background: #f8fafc;
}
/* ==============================
   EXISTING TAG PICKER
============================== */

.existing-tag-field {
  position: relative;
}

.existing-tag-input-row {
  display: flex;
  gap: 6px;
}

.existing-tag-input-row input {
  flex: 1;
}

.tag-picker-button {
  width: 42px;
  flex-shrink: 0;

  border: 1px solid #cbd5e1;
  border-radius: 5px;

  background: #ffffff;
  color: #475569;

  cursor: pointer;
}

.tag-picker-button:hover {
  background: #f8fafc;
}


.tag-picker-dropdown {
  display: none;

  margin-top: 5px;

  border: 1px solid #cbd5e1;
  border-radius: 6px;

  background: #ffffff;

  overflow: hidden;

  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.tag-picker-dropdown.show {
  display: block;
}


.tag-picker-option {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 10px 12px;

  border: 0;
  border-bottom: 1px solid #e2e8f0;

  background: #ffffff;
  text-align: left;

  cursor: pointer;
}

.tag-picker-option:last-child {
  border-bottom: 0;
}

.tag-picker-option:hover {
  background: #f8fafc;
}

.tag-picker-option strong {
  min-width: 28px;

  font-size: 12px;
  color: #0f172a;
}

.tag-picker-option span {
  font-size: 11px;
  color: #64748b;
}
/* =========================
   REPLACEMENTS
   ========================= */

.replacement-building-toolbar {
  display: flex;
  align-items: end;
  gap: 24px;
  padding: 20px;
}

.replacement-building-toolbar .modal-field {
  width: 300px;
}

.replacement-building-help {
  padding-bottom: 11px;
  color: #718096;
  font-size: 13px;
}


.replacement-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.replacement-list-header p {
  margin-top: 4px;
  color: #718096;
  font-size: 12px;
}


.replacement-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.replacement-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1000px;
}

.replacement-table th {
  padding: 11px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.replacement-table td {
  padding: 14px;
  border-bottom: 1px solid #edf0f2;
  vertical-align: middle;
  font-size: 13px;
}

.replacement-table tbody tr:last-child td {
  border-bottom: none;
}

.replacement-table tbody tr:hover {
  background: #fbfdff;
}


.replacement-subtext {
  display: block;
  margin-top: 4px;
  color: #8492a6;
  font-size: 11px;
}


.replacement-group-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #17212b;
  cursor: pointer;
  text-align: left;
}

.replacement-group-link strong {
  color: #0ea5e9;
  font-size: 14px;
}

.replacement-group-link span {
  color: #64748b;
  font-size: 11px;
}

.replacement-group-link:hover strong {
  text-decoration: underline;
}


.replacement-select-button {
  min-width: 170px;
  padding: 9px 11px;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
}

.replacement-select-button:hover {
  border-color: #0ea5e9;
  background: #f0f9ff;
  color: #0284c7;
}

.replacement-select-button.assigned {
  border-style: solid;
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.replacement-select-button span {
  display: block;
  margin-top: 3px;
  color: #7c8b9a;
  font-size: 10px;
  font-weight: normal;
}


.replacement-placeholder {
  padding: 50px 25px;
  color: #8492a6;
  font-size: 14px;
  text-align: center;
}


/* Replacement tabs use buttons rather than links */

button.survey-view-tab {
  border-top: 0;
  border-left: 0;
  border-right: 0;
  cursor: pointer;
  font-family: inherit;
}


@media (max-width: 900px) {

  .replacement-building-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .replacement-building-toolbar .modal-field {
    width: 100%;
  }

  .replacement-building-help {
    padding-bottom: 0;
  }

  .replacement-list-header {
    align-items: stretch;
    flex-direction: column;
  }

}
/* ==============================
   PROJECT PAGE - ARCHIVE
   ============================== */

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.projects-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.projects-toolbar .project-search {
  margin-left: auto;
}

.project-tab.active {
  background: #10a8e0;
  color: white;
  border-color: #10a8e0;
}

.projects-empty-state {
  padding: 30px;
  text-align: center;
  color: #718096;
  background: white;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
}
/* ==============================
   SITE OPERATION HEADER
============================== */

.site-operation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-operation-lifetime {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-operation-lifetime span {
  font-size: 11px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-operation-lifetime .lifetime-field-value {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  padding: 0;
  min-height: 0;
}
.site-operation-lifetime .edit-input {
  width: 90px;
  padding: 5px 7px;
}
.day-hours {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 14px;
  color: #1e293b;
  box-sizing: border-box;
}

.day-hours:focus {
  outline: none;
  border-color: #0ea5e9;
}

/* Remove number spinner arrows */
.day-hours::-webkit-outer-spin-button,
.day-hours::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.day-hours {
  appearance: textfield;
  -moz-appearance: textfield;
}
/* ==============================
   SURVEY DRAWINGS
============================== */

.survey-drawing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid #e2e8f0;
}

.survey-drawing-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.survey-drawing-info strong {
  font-size: 14px;
  color: #0f172a;
}

.survey-drawing-info span {
  font-size: 12px;
  color: #718096;
}

.survey-drawing-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawing-empty-state {
  padding: 14px 16px;
  color: #718096;
  font-size: 13px;
}
/* ==============================
   DRAWING ZOOM / PAN
============================== */

.drawing-canvas {
  position: relative;
  overflow: hidden;
  height: 650px;
  min-height: 650px;
  background: #f8fafc;
  touch-action: none;
}

.drawing-stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.drawing-stage .uploaded-drawing-pdf,
.drawing-stage .uploaded-drawing-image {
  display: block;
  position: relative;
  z-index: 1;
}

.drawing-stage .drawing-svg-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.drawing-canvas.pan-ready {
  cursor: grab;
}

.drawing-canvas.is-panning {
  cursor: grabbing;
  user-select: none;
}
.room-linked-polygon {
  fill: rgba(14, 165, 233, 0.10);
  stroke: #0ea5e9;
  cursor: pointer;
}

.room-linked-polygon:hover {
  fill: rgba(14, 165, 233, 0.20);
}

.drawing-canvas.room-outline-mode {
  cursor: crosshair;
}
.drawing-status-button.initial span,
.coverage-dot.initial {
  background: #64748b;
}

.active-coverage-line.initial {
  stroke: #64748b;
}

.coverage-polygon.initial {
  fill: rgba(100, 116, 139, 0.18);
  stroke: #64748b;
}
/* =========================
   ROOM INFORMATION LAYOUT
   ========================= */

.room-access-field {
  align-self: start;
}

#room-no-access-reason {
  margin-bottom: 0;
}
/* =========================
   ROOM PHOTO GALLERY
   ========================= */

.room-photo-list {
  display: grid;
  grid-template-columns:
    repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.room-photo-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f7f9;
}

.room-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.room-photo-delete {
  position: absolute;
  top: 6px;
  right: 6px;

  width: 26px;
  height: 26px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 50%;

  background: rgba(20, 32, 44, 0.85);
  color: white;

  font-size: 18px;
  line-height: 1;

  cursor: pointer;
}

.room-photo-delete:hover {
  background: #d92d20;
}
/* =========================
   LINKED ROOM DRAWING STATUS
   ========================= */

.room-linked-polygon.initial {
  fill: rgba(100, 116, 139, 0.18);
  stroke: #64748b;
}

.room-linked-polygon.complete {
  fill: rgba(34, 197, 94, 0.20);
  stroke: #16a34a;
}

.room-linked-polygon.query {
  fill: rgba(249, 115, 22, 0.22);
  stroke: #ea580c;
}

.room-linked-polygon.no-access {
  fill: rgba(239, 68, 68, 0.22);
  stroke: #dc2626;
}

.room-linked-polygon.assumed {
  fill: rgba(59, 130, 246, 0.22);
  stroke: #2563eb;
}
/* ==============================
   ROOM COPY LINEAGE
============================== */

#room-copy-lineage {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.room-copy-source-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
}

.room-copy-source-link:hover {
  text-decoration: underline;
}

/* ==============================
   MANAGE TAGS
   ============================== */

.manage-tags-modal {
  max-width: 760px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.manage-tags-modal .modal-body {
  overflow-y: auto;
  min-height: 0;
}

.manage-tags-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manage-tag-row {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 14px 16px;

  border: 1px solid #e2e8f0;
  border-radius: 8px;

  background: white;
}

.manage-tag-code {
  width: 54px;
  flex-shrink: 0;

  font-size: 16px;
  font-weight: bold;

  color: #0f172a;
}

.manage-tag-details {
  flex: 1;
  min-width: 0;
}

.manage-tag-preview {
  display: block;

  font-size: 12px;
  font-weight: 600;

  color: #334155;
}

.manage-tag-usage {
  display: block;

  margin-top: 4px;

  font-size: 11px;

  color: #94a3b8;
}

.manage-tag-actions {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}

.manage-tag-action {
  border: 1px solid #cbd5e1;
  border-radius: 5px;

  background: white;

  padding: 7px 10px;

  font-size: 11px;
  font-weight: bold;

  color: #475569;

  cursor: pointer;
}

.manage-tag-action:hover {
  background: #f8fafc;
}

.manage-tags-empty {
  padding: 30px 20px;

  border: 1px dashed #cbd5e1;
  border-radius: 8px;

  text-align: center;

  color: #94a3b8;
  font-size: 13px;
}
/* ==============================
   EDIT TAG
   ============================== */

.edit-tag-modal {
  max-width: 820px;
  max-height: calc(100vh - 40px);

  display: flex;
  flex-direction: column;
}

.edit-tag-modal .modal-body {
  overflow-y: auto;
  min-height: 0;
}

.tag-edit-context {
  margin-bottom: 20px;
  padding: 12px 14px;

  border: 1px solid #bae6fd;
  border-radius: 7px;

  background: #f0f9ff;

  color: #475569;
  font-size: 12px;
}

.edit-tag-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 14px;
}

.edit-tag-feature-grid label {
  display: flex;
  align-items: center;
  gap: 7px;

  font-size: 12px;
  color: #475569;
}

.edit-tag-feature-grid input {
  width: auto;
}

.edit-tag-led-details {
  margin-top: 15px;
}

.edit-tag-led-details.hidden {
  display: none;
}

.edit-tag-modal textarea {
  width: 100%;

  padding: 10px 11px;

  border: 1px solid #cbd5e1;
  border-radius: 6px;

  font-family: inherit;
  font-size: 13px;

  resize: vertical;
}

@media (max-width: 700px) {

  .edit-tag-feature-grid {
    grid-template-columns: 1fr 1fr;
  }

}
/* ==============================
   TAG QA
   ============================== */

.manage-tag-qa {
  display: inline-block;

  margin-top: 6px;

  padding: 3px 7px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 700;
}

.manage-tag-qa-good {
  background: #ecfdf5;
  color: #15803d;
}

.manage-tag-qa-warning {
  background: #fff7ed;
  color: #c2410c;
}
/* ==============================
   TAG DETAIL / QA
   ============================== */

.manage-tag-row {
  cursor: pointer;
}

.manage-tag-row:hover {
  background: #f8fafc;
}

.manage-tag-row:has(.manage-tag-action:hover) {
  background: white;
}


.tag-detail-modal {
  max-width: 850px;
  max-height: calc(100vh - 40px);

  display: flex;
  flex-direction: column;
}

.tag-detail-modal .modal-body {
  overflow-y: auto;
  min-height: 0;
}


.tag-detail-summary {
  margin-bottom: 18px;
  padding: 14px 16px;

  border: 1px solid #e2e8f0;
  border-radius: 8px;

  background: #f8fafc;
}

.tag-detail-summary-main {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.tag-detail-summary-sub {
  margin-top: 4px;

  font-size: 11px;
  color: #64748b;
}


.tag-detail-fitting-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.tag-detail-fitting {
  padding: 14px 16px;

  border: 1px solid #e2e8f0;
  border-radius: 8px;

  background: white;
}


.tag-detail-fitting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}


.tag-detail-room {
  font-size: 13px;
  font-weight: 700;

  color: #0f172a;
}


.tag-detail-room-meta {
  margin-top: 3px;

  font-size: 11px;
  color: #64748b;
}


.tag-detail-status {
  flex-shrink: 0;

  padding: 4px 8px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 700;
}


.tag-detail-status.good {
  background: #ecfdf5;
  color: #15803d;
}


.tag-detail-status.warning {
  background: #fff7ed;
  color: #c2410c;
}


.tag-detail-differences {
  margin-top: 12px;
  padding-top: 10px;

  border-top: 1px solid #e2e8f0;
}


.tag-detail-difference {
  display: grid;
  grid-template-columns: 160px 1fr 24px 1fr;
  gap: 8px;
  align-items: center;

  padding: 6px 0;

  font-size: 11px;
}


.tag-detail-difference-field {
  font-weight: 700;
  color: #475569;
}


.tag-detail-difference-old {
  color: #c2410c;
}


.tag-detail-difference-arrow {
  text-align: center;
  color: #94a3b8;
}


.tag-detail-difference-new {
  color: #15803d;
}


.tag-detail-empty {
  padding: 25px;

  border: 1px dashed #cbd5e1;
  border-radius: 8px;

  text-align: center;

  color: #94a3b8;
  font-size: 12px;
}
.tag-detail-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tag-detail-open-fitting {
  padding: 6px 10px;

  border: 1px solid #cbd5e1;
  border-radius: 5px;

  background: white;

  color: #334155;

  font-size: 10px;
  font-weight: 700;

  cursor: pointer;
}

.tag-detail-open-fitting:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.tag-qa-resolution-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;

  margin-top: 12px;
  padding-top: 12px;

  border-top: 1px solid #e2e8f0;
}

.tag-qa-resolution-button {
  padding: 7px 10px;

  border: 1px solid #cbd5e1;
  border-radius: 5px;

  background: white;
  color: #475569;

  font-size: 10px;
  font-weight: 700;

  cursor: pointer;
}

.tag-qa-resolution-button:hover {
  background: #f8fafc;
}

.tag-qa-resolution-button.primary {
  border-color: #0ea5e9;
  background: #0ea5e9;
  color: white;
}

.tag-qa-resolution-button.primary:hover {
  background: #0284c7;
}
/* ==============================
   RECLASSIFY TAG
   ============================== */

.reclassify-tag-modal {
  max-width: 620px;
}

.reclassify-option {
  padding: 16px;

  border: 1px solid #e2e8f0;
  border-radius: 8px;

  background: #f8fafc;
}

.reclassify-option h3 {
  margin: 0 0 5px;

  font-size: 14px;
  color: #0f172a;
}

.reclassify-option p {
  margin: 0 0 12px;

  font-size: 11px;
  color: #64748b;
}

.reclassify-option select,
.reclassify-option input {
  width: 100%;

  margin-bottom: 10px;
}

.reclassify-divider {
  padding: 12px;

  text-align: center;

  font-size: 10px;
  font-weight: 800;

  color: #94a3b8;
}
.tag-detail-status.overridden {
  background: #eef2f7;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.manage-tag-delete:not(:disabled) {
  color: #dc2626;
  border-color: #fecaca;
}

.manage-tag-delete:not(:disabled):hover {
  background: #fef2f2;
  border-color: #fca5a5;
}

.manage-tag-delete:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.current-room-card > button {
  width: 100%;
  justify-content: center;
}
/*
  While drawing a new shape,
  existing polygons are drawing surfaces,
  not clickable objects.
*/

.drawing-canvas.is-drawing .room-linked-polygon,
.drawing-canvas.is-drawing .coverage-polygon,
.drawing-canvas.is-drawing .room-reference-marker {
  cursor: crosshair !important;
  pointer-events: none !important;
}
/* ==============================
   ROOM REFERENCE MARKERS
   ============================== */

.room-reference-marker {
  cursor: pointer;
}

.room-reference-marker rect {
  fill: rgba(255, 255, 255, 0.35);
  stroke: #1f2937;
  stroke-width: 0.75;
}

.room-reference-marker text {
  fill: #111827;
  font-weight: 700;
  font-family: Arial, sans-serif;
  pointer-events: none;
}

.drawing-canvas.is-drawing .room-reference-marker {
  pointer-events: none;
}
/* ==============================
   DRAWING HEADER ACTIONS
   ============================== */

.drawing-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* ==============================
   SCREEN-SPACE ROOM TRACING
   ============================== */

.room-trace-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}

.room-trace-line {
  fill: none;
  stroke: #64748b;
  stroke-width: 5px;
  stroke-linejoin: miter;
  stroke-linecap: butt;
  pointer-events: none;
}

.room-trace-point {
  fill: #64748b;
  stroke: none;
  pointer-events: none;
}
/* =========================
   ROOM BACK ACTIONS
   ========================= */

.room-back-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.room-back-actions .room-back-link {
  margin-bottom: 0;
}

.room-back-drawing-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
/* =========================
   BACK TO DRAWING BUTTON
   ========================= */

.room-back-drawing-header-button {
  border: 0;
  background: #0ea5e9;
  color: white;

  padding: 11px 17px;

  border-radius: 6px;

  font-size: 13px;
  font-weight: bold;

  cursor: pointer;

  white-space: nowrap;
}

.room-back-drawing-header-button:hover {
  background: #0284c7;
}
/* =========================
   DELETE ROOM
   ========================= */

.delete-room-button {
  border: 1px solid #dc2626;
  background: #ffffff;
  color: #dc2626;

  padding: 10px 16px;

  border-radius: 6px;

  font-size: 13px;
  font-weight: bold;

  cursor: pointer;

  white-space: nowrap;
}

.delete-room-button:hover {
  background: #fef2f2;
}


/* =========================
   ACCESS ATTEMPTS
   ========================= */

.room-access-attempt {
  margin-top: 14px;
  padding-top: 14px;

  border-top: 1px solid #e5e7eb;
}


.room-access-history {
  margin-top: 14px;

  display: flex;
  flex-direction: column;

  gap: 8px;
}


.room-access-history-empty {
  padding: 10px 12px;

  border-radius: 6px;

  background: #f8fafc;

  color: #64748b;

  font-size: 12px;
}


.room-access-history-row {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 16px;

  padding: 11px 12px;

  border: 1px solid #e2e8f0;

  border-radius: 7px;

  background: #f8fafc;
}


.room-access-history-main {
  min-width: 0;
}


.room-access-history-heading {
  display: flex;

  align-items: center;

  gap: 10px;

  margin-bottom: 4px;
}


.room-access-history-heading strong {
  color: #b91c1c;

  font-size: 13px;
}


.room-access-history-heading span {
  color: #64748b;

  font-size: 11px;
}


.room-access-history-detail {
  color: #334155;

  font-size: 12px;
  font-weight: 600;
}


.room-access-history-notes {
  margin-top: 3px;

  color: #64748b;

  font-size: 12px;
}


.room-access-history-actions {
  display: flex;

  align-items: center;

  gap: 7px;

  flex-shrink: 0;
}


.room-access-history-edit,
.room-access-history-delete {
  border: 0;

  background: transparent;

  padding: 5px 7px;

  font-size: 11px;
  font-weight: bold;

  cursor: pointer;
}


.room-access-history-edit {
  color: #0284c7;
}


.room-access-history-delete {
  color: #dc2626;
}


.room-access-history-edit:hover,
.room-access-history-delete:hover {
  text-decoration: underline;
}
/* =========================
   ACCESS ATTEMPT TWO-COLUMN LAYOUT
   ========================= */

.room-access-field.has-access-attempt {
  grid-column: 1 / -1;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  column-gap: 18px;

  align-items: start;
}


/* Access label */

.room-access-field.has-access-attempt
> label {
  grid-column: 1;
}


/* Y / N / NA-Assumed buttons */

.room-access-field.has-access-attempt
> #room-access-options {
  grid-column: 1;
}


/* Reason + notes box */

.room-access-field.has-access-attempt
> #room-no-access-reason {
  grid-column: 1;
}


/* Attempt history on the right */

.room-access-field.has-access-attempt
> #room-access-attempt {
  grid-column: 2;

  grid-row: 1 / span 3;

  margin-top: 0;
  padding-top: 0;

  border-top: 0;
}
.room-access-edit-time {
  margin-top: 10px;
}

.room-access-edit-time label {
  display: block;

  margin-bottom: 6px;

  font-size: 11px;
  font-weight: bold;

  color: #64748b;

  text-transform: uppercase;
}

.room-access-edit-time input {
  width: 100%;

  padding: 9px 10px;

  border: 1px solid #cbd5e1;

  border-radius: 6px;

  background: white;

  font: inherit;
}
/* =========================
   RESOLVE ACCESS MODAL
   ========================= */

.resolve-access-modal {
  width: min(
    560px,
    calc(100vw - 32px)
  );
}


.resolve-access-options {
  display: flex;
  flex-direction: column;

  gap: 10px;

  margin-top: 18px;
}


.resolve-access-option {
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 5px;

  padding: 14px 16px;

  border: 1px solid #cbd5e1;
  border-radius: 7px;

  background: #ffffff;

  text-align: left;

  cursor: pointer;

  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}


.resolve-access-option strong {
  font-size: 13px;

  color: #0f172a;
}


.resolve-access-option span {
  font-size: 12px;
  line-height: 1.45;

  color: #64748b;
}


.resolve-access-option:hover {
  border-color: #0ea5e9;

  background: #f0f9ff;
}


/* Make Archive the obvious recommended action */

#archive-access-attempts {
  border-color: #0ea5e9;

  background: #f0f9ff;
}


#archive-access-attempts strong {
  color: #0284c7;
}
/* =========================
   ACCESS HISTORY STATUS
   ========================= */

.room-access-resolution {
  margin-left: auto;

  padding: 3px 7px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: bold;

  white-space: nowrap;
}


.room-access-resolution.resolved {
  background: #dcfce7;

  color: #15803d;
}


.room-access-resolution.active {
  background: #fef2f2;

  color: #dc2626;
}
/* ==============================
   TABLET DRAWING CONTROL DOCK
   Fixed to the device screen
   ============================== */

@media (max-width: 1000px) {

  /*
    STATUS CONTROLS
    Initial / Complete / LED /
    Query / No Access / Assumed
  */

  .drawing-status-toolbar {
    position: fixed;

    left: 250px;
    right: 0;
    bottom: 54px;

    z-index: 100;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;

    gap: 8px;

    padding: 8px 12px;

    overflow-x: auto;
    overflow-y: hidden;

    background: #ffffff;

    border-top: 1px solid #cbd5e1;

    box-shadow:
      0 -3px 8px rgba(15, 23, 42, 0.10);

    -webkit-overflow-scrolling: touch;
  }


  .drawing-status-button {
    flex: 0 0 auto;

    min-height: 38px;

    white-space: nowrap;
  }


  /*
    POLYGON ACTIONS
    Undo / Finish / Cancel /
    Delete Selected
  */

  .polygon-actions {
    position: fixed;

    left: 250px;
    right: 0;
    bottom: 0;

    z-index: 101;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;

    gap: 8px;

    min-height: 54px;

    padding: 7px 12px;

    overflow-x: auto;
    overflow-y: hidden;

    background: #f8fafc;

    border-top: 1px solid #cbd5e1;

    -webkit-overflow-scrolling: touch;
  }


  .polygon-actions button {
    flex: 0 0 auto;

    min-height: 38px;

    white-space: nowrap;
  }


  .polygon-actions button.danger {
    margin-left: 0;
  }


  /*
    Stop the fixed controls covering
    the bottom of the page.
  */

  .page-content {
    padding-bottom: 135px;
  }

}


/*
  On smaller screens the sidebar
  disappears, so the fixed controls
  can use the full screen width.
*/

@media (max-width: 700px) {

  .drawing-status-toolbar,
  .polygon-actions {
    left: 0;
  }

}
/* ==============================
   DRAWING COMMAND DOCK
   ============================== */

.drawing-status-toolbar {
  position: fixed;
  left: 250px;
  right: 0;
  bottom: 0;
  z-index: 100;

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;

  gap: 8px;

  padding: 8px 12px;

  background: #ffffff;
  border-top: 1px solid #cbd5e1;

  box-shadow:
    0 -3px 8px rgba(15, 23, 42, 0.10);

  overflow-x: auto;
  overflow-y: hidden;

  -webkit-overflow-scrolling: touch;
}


.drawing-status-button {
  flex: 0 0 auto;
  min-height: 38px;
  white-space: nowrap;
}


.drawing-status-toolbar .polygon-actions {
  position: static;

  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;

  gap: 8px;

  padding: 0;
  margin: 0 0 0 8px;

  background: transparent;
  border: 0;

  flex: 0 0 auto;
}


.drawing-status-toolbar .polygon-actions::before {
  content: "";

  width: 1px;
  height: 28px;

  margin-right: 4px;

  background: #cbd5e1;
}


.drawing-status-toolbar .polygon-actions button {
  flex: 0 0 auto;

  min-height: 38px;

  white-space: nowrap;
}


.drawing-status-toolbar
.polygon-actions
button.danger {
  margin-left: 0;
}


.page-content {
  padding-bottom: 85px;
}


@media (max-width: 700px) {

  .drawing-status-toolbar {
    left: 0;

    /*
      Override the older mobile rule
      that turns this toolbar vertical.
    */
    flex-direction: row;
    align-items: center;
  }

}
/* ==============================
   DRAWING SIDEBAR COLLAPSE
   ============================== */

.sidebar {
  position: fixed;
}


/* Collapse button inside sidebar */

.sidebar-collapse-button {
  position: absolute;

  top: 18px;
  right: 12px;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 10;

  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;

  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;

  font-size: 20px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;
}


.sidebar-collapse-button:hover {
  background: rgba(255, 255, 255, 0.12);
}


/* Expand button shown when sidebar is hidden */

.sidebar-expand-button {
  position: fixed;

  left: 0;
  top: 22px;

  width: 38px;
  height: 38px;

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 200;

  border: 1px solid #cbd5e1;
  border-left: 0;

  border-radius: 0 6px 6px 0;

  background: #ffffff;
  color: #334155;

  font-size: 20px;
  font-weight: 700;

  cursor: pointer;

  box-shadow:
    2px 2px 6px rgba(15, 23, 42, 0.08);
}


/* COLLAPSED STATE */

body.drawing-sidebar-collapsed .sidebar {
  display: none;
}


body.drawing-sidebar-collapsed .main-content {
  margin-left: 0;
  width: 100%;
}


body.drawing-sidebar-collapsed
.drawing-status-toolbar {
  left: 0;
}


body.drawing-sidebar-collapsed
.sidebar-expand-button {
  display: flex;
}
/* ==============================
   ADD ROOM - DRAWING PEEK
   ============================== */

.drawing-room-return-button {
  position: fixed;

  top: 92px;
  right: 22px;

  z-index: 250;

  box-shadow:
    0 3px 10px rgba(15, 23, 42, 0.18);
}
/* =========================
   SURVEY SUMMARY TABLES
   ========================= */

.survey-summary-table {
  width: 100%;
  border-collapse: collapse;
}


.survey-summary-table th {
  padding: 10px 12px;

  background: #17212b;
  color: white;

  font-size: 11px;
  font-weight: 700;
  text-align: centre;

 line-height: 1.2;
vertical-align: middle;
}


.survey-summary-table td {
  padding: 10px 12px;

  border-bottom: 1px solid #e5e7eb;

  font-size: 12px;
  color: #334155;

  vertical-align: middle;

  text-align: center;
}


.survey-summary-table tbody tr:last-child td {
  border-bottom: 0;
}


.survey-summary-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
/* =========================
   SURVEY STATUS COLOURS
   ========================= */

#survey-status-summary.survey-status-complete {
  color: #16a34a;
}


#survey-status-summary.survey-status-progress {
  color: #0284c7;
}


#survey-status-summary.survey-status-not-started {
  color: #17212b;
}
/* =========================
   SURVEY SUMMARY STICKY SCOPE
   ========================= */

.survey-summary-scope-card {
  position: sticky;
  top: 88px;
  z-index: 9;
}

/* =========================================================
   PROPOSED ITEMS SUMMARY
========================================================= */

.proposed-summary-card {
  overflow: hidden;
}


.proposed-summary-card .summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
}


.proposed-summary-card .summary-card-header h2 {
  margin: 0 0 3px 0;
  font-size: 16px;
  font-weight: 700;
}


.proposed-summary-card .summary-card-header p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}


.summary-card-count {
  flex: 0 0 auto;
  min-width: 90px;
  padding: 8px 14px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  text-align: center;
  background: #f8fafc;
}


.summary-card-count span {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 700;
  color: #17212b;
}


.summary-card-count small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7b8da3;
}


.proposed-summary-table-wrap {
  width: 100%;
  overflow-x: auto;
}


.proposed-summary-table {
  width: 100%;
  border-collapse: collapse;
}


.proposed-summary-table thead {
  background: #17212b;
  color: #ffffff;
}


.proposed-summary-table th {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}


.proposed-summary-table td {
  padding: 11px 20px;
  border-top: 1px solid #e5eaf0;
  font-size: 12px;
  color: #24364b;
}


.proposed-summary-table tbody tr:hover {
  background: #f8fafc;
}


.proposed-summary-table .number-column {
  width: 90px;
  text-align: center;
}


.proposed-summary-table td.number-column {
  font-weight: 700;
}


.proposed-summary-table .summary-empty-row td {
  padding: 22px 20px;
  text-align: center;
  color: #7b8da3;
  font-style: italic;
  background: #ffffff;
}

/* =========================================================
   SURVEY SUMMARY — CONSISTENT TABLE CARDS
========================================================= */

.survey-summary-table {
  width: 100%;
  border-collapse: collapse;
}


.table-wrap {
  overflow-x: auto;
}


.survey-summary-table thead {
  background: #17212b;
  color: #ffffff;
}


.survey-summary-table th {
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  vertical-align: middle;
}


.survey-summary-table td {
  padding: 11px 16px;
  border-top: 1px solid #e5eaf0;
  font-size: 12px;
  color: #24364b;
  vertical-align: middle;
}


.survey-summary-table tbody tr:hover {
  background: #f8fafc;
}


.survey-summary-table td strong {
  font-weight: 700;
  color: #17212b;
}


.card > .table-wrap {
  border-top: 0;
}


.card-header + .table-wrap {
  margin-top: 0;
}


.card-header p {
  margin-top: 3px;
  font-size: 13px;
  color: #64748b;
}


.card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
/* =========================================================
   SURVEY SUMMARY — LAYOUT POLISH
========================================================= */

.survey-summary-scope-card,
.survey-summary-section,
.proposed-summary-card,
.card {
  border-radius: 8px;
}


/* Consistent section headers */

.survey-summary-section .card-header,
.card > .card-header {
  padding: 14px 18px;
}

.survey-summary-section .card-header h3,
.card > .card-header h3 {
  font-size: 15px;
  line-height: 1.2;
}

.survey-summary-section .card-header p,
.card > .card-header p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
}


/* Compact summary statistic sections */

.survey-summary-section .summary-grid {
  gap: 0;
}

.survey-summary-section .summary-card {
  min-height: 68px;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
}

.survey-summary-section .summary-card:last-child {
  border-right: 0;
}


/* Proposed Items header to match normal cards */

.proposed-summary-card {
  padding: 0;
  margin-bottom: 20px;
}

.proposed-summary-card .summary-card-header {
  padding: 14px 18px;
  background: #fbfcfd;
  border-bottom: 1px solid #edf0f2;
}

.proposed-summary-card .summary-card-header h2 {
  font-size: 15px;
  line-height: 1.2;
}

.proposed-summary-card .summary-card-header p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
}


/* Smaller total badge */

.summary-card-count {
  min-width: 76px;
  padding: 6px 11px;
}

.summary-card-count span {
  font-size: 18px;
}

.summary-card-count small {
  font-size: 9px;
}


/* Tables — same density throughout */

.survey-summary-table th,
.proposed-summary-table th {
  padding: 9px 12px;
  font-size: 10px;
}

.survey-summary-table td,
.proposed-summary-table td {
  padding: 10px 12px;
  font-size: 11px;
}


/* Don't make proposed tags enormous */

.proposed-summary-table td:first-child strong {
  font-size: 13px;
}


/* Rooms Included can breathe horizontally */

#summary-room-table td {
  line-height: 1.25;
}
/* =========================================================
   SURVEY SUMMARY — TABLE ALIGNMENT
========================================================= */

/* Proposed Items tag size */
.proposed-summary-table td:first-child strong {
  font-size: 11px;
  font-weight: 700;
}


/* Proposed Items — centre quantity */
.proposed-summary-table th:last-child,
.proposed-summary-table td:last-child {
  text-align: center;
}


/* Fitting Summary numeric columns */
.survey-summary-table th:nth-child(2),
.survey-summary-table th:nth-child(3),
.survey-summary-table th:nth-child(4) {
  text-align: center;
}


/* Rooms Included numeric/status area */
#summary-room-table td:nth-child(6),
#summary-room-table td:nth-child(7),
#summary-room-table td:nth-child(8),
#summary-room-table td:nth-child(9),
#summary-room-table td:nth-child(12),
#summary-room-table td:nth-child(13),
#summary-room-table td:nth-child(14),
#summary-room-table td:nth-child(15) {
  text-align: center;
}


/* Matching Rooms Included headers */
#summary-room-table {
  text-align: left;
}
/* Rooms Included — header alignment */

.rooms-included-table th:nth-child(6),
.rooms-included-table th:nth-child(7),
.rooms-included-table th:nth-child(8),
.rooms-included-table th:nth-child(9),
.rooms-included-table th:nth-child(12),
.rooms-included-table th:nth-child(13),
.rooms-included-table th:nth-child(14),
.rooms-included-table th:nth-child(15) {
  text-align: center;
}
/* Survey Summary — clean header alignment */

.survey-summary-table th,
.proposed-summary-table th {
  text-align: center;
}
/* Proposed Items — align body with headers */

.proposed-summary-table td {
  text-align: center;
}

.proposed-summary-table td:first-child {
  text-align: center;
}

.proposed-summary-table td:first-child strong {
  font-size: 11px;
}
/* =========================================================
   MANAGE PROPOSED TAGS
========================================================= */

#manage-proposed-tags-modal .modal {
  max-width: 650px;
}


/* Tag list spacing */

#manage-proposed-tags-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* Individual saved tag */

#manage-proposed-tags-list .fitting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  min-height: 72px;
  padding: 14px 16px;

  background: #fbfcfd;
  border: 1px solid #dfe5eb;
  border-radius: 7px;
}


/* Left-hand tag + details */

#manage-proposed-tags-list .fitting-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}


#manage-proposed-tags-list .fitting-tag {
  min-width: 54px;
  flex-shrink: 0;
}


/* Part code / family */

#manage-proposed-tags-list .fitting-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}


#manage-proposed-tags-list .fitting-details strong {
  display: block;

  color: #17212b;
  font-size: 13px;
  line-height: 1.3;
}


#manage-proposed-tags-list .fitting-details span {
  display: block;

  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}


/* Edit / Delete area */

#manage-proposed-tags-list .fitting-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}


/* Edit */

#manage-proposed-tags-list .secondary-button {
  min-height: 34px;
  padding: 7px 12px;

  border-radius: 6px;

  font-size: 11px;
}


/* Delete */

#manage-proposed-tags-list .danger-button {
  min-height: 34px;
  padding: 7px 12px;

  border: 1px solid #fecaca;
  border-radius: 6px;

  background: #fff;
  color: #dc2626;

  font-size: 11px;
  font-weight: 700;

  cursor: pointer;
}


#manage-proposed-tags-list .danger-button:hover {
  background: #fef2f2;
  border-color: #fca5a5;
}


/* Footer */

#manage-proposed-tags-modal .modal-footer {
  padding: 14px 18px;
}