
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas, #F4F8FC); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink, #0F172A);
  background:
    radial-gradient(circle at 90% 8%, rgba(127,142,126,.12), transparent 27rem),
    radial-gradient(circle at 7% 75%, rgba(59,130,246,.08), transparent 30rem),
    var(--canvas, #F4F8FC);
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 31, 51, .97);
  color: white;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner {
  max-width: 1180px;
  margin: auto;
  height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-lockup i { width: 1px; height: 26px; background: rgba(255,255,255,.25); }
.brand-logo {
  display: block;
  object-fit: contain;
  object-position: center;
  filter: brightness(0) invert(1);
}
.brand-logo-topnotch { width: 116px; height: 36px; }
.brand-logo-monaco { width: 62px; height: 50px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 999px;
}
.icon-button:hover { background: rgba(59,130,246,.18); color: white; }

/*
  Keep the original V6.2 Back link and routing code intact.
  It still lives in the header DOM, but is positioned visually below the navbar.
*/
.header-back {
  position: fixed;
  top: 90px;
  left: max(18px, calc(50% - 450px));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  background: rgba(255,255,255,.97);
  color: var(--dark-deep, #0B1F33);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(15,23,42,.06);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.header-back:hover {
  transform: translateX(-2px);
  border-color: #93C5FD;
  background: var(--accent-soft, #EFF6FF);
  color: var(--accent-hover, #1D4ED8);
}
.header-back:focus-visible {
  outline: 3px solid rgba(59,130,246,.22);
  outline-offset: 2px;
}

.page-shell { max-width: 1180px; margin: auto; padding: 30px 22px 70px; }
.wizard-shell { max-width: 900px; margin: auto; padding: 72px 18px 80px; }

.progress-head { display: flex; align-items: center; gap: 16px; }
.step-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: conic-gradient(var(--accent, #3B82F6) var(--progress), rgba(15,23,42,.12) 0);
  padding: 4px;
  transition: background .35s ease, transform .25s ease;
}
.step-orb > div {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--paper, #FFFFFF); display: grid; place-items: center;
  grid-template-columns: auto auto; align-content: center; gap: 2px;
}
.step-orb strong { font-size: 21px; line-height: 1; }
.step-orb span { font-size: 11px; color: var(--muted, #64748B); align-self: end; margin-bottom: 2px; }
.progress-copy small { display: block; color: var(--muted, #64748B); font-size: 11px; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; margin-bottom: 4px; }
.progress-copy h1 { margin: 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.035em; }
.progress-track { height: 4px; background: rgba(15,23,42,.10); border-radius: 999px; margin: 18px 0 22px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--accent-strong, #2563EB); border-radius: inherit; transition: width .38s cubic-bezier(.2,.8,.2,1); }

.step-card, .dashboard-panel {
  background: var(--paper, #FFFFFF);
  border: 1px solid rgba(15,23,42,.09);
  border-radius: var(--radius, 24px);
  box-shadow: var(--shadow, 0 22px 60px rgba(15,23,42,.10));
}
.step-card { padding: clamp(22px, 5vw, 42px); transform: translateX(0); opacity: 1; transition: transform .23s ease, opacity .23s ease; }
.step-leaving .step-card { transform: translateX(-18px); opacity: 0; }
.step-intro { margin-bottom: 30px; }
.step-intro .eyebrow { color: var(--accent-strong, #2563EB); font-size: 11px; text-transform: uppercase; letter-spacing: .18em; font-weight: 800; }
.step-intro h2 { margin: 8px 0 8px; font-size: clamp(27px, 5vw, 40px); letter-spacing: -.045em; }
.step-intro p { margin: 0; color: var(--muted, #64748B); line-height: 1.6; max-width: 640px; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; }
.field-grid.one { grid-template-columns: 1fr; }
.surface-question-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-span { grid-column: 1 / -1; }
.line-field { display: block; position: relative; }
.line-field > span, .field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  letter-spacing: .02em;
}
.line-field input,
.line-field select,
.line-field textarea {
  width: 100%;
  border: 0;
  border-radius: 0;
  outline: 0;
  padding: 9px 0 10px;
  color: var(--ink, #0F172A);
  background-color: transparent;
  border-bottom: 1px solid #CBD5E1;
  background-image: linear-gradient(var(--accent, #3B82F6), var(--accent, #3B82F6));
  background-size: 0 2px;
  background-position: 50% 100%;
  background-repeat: no-repeat;
  transition: background-size .22s ease, border-color .22s ease;
}
.line-field input:focus,
.line-field select:focus,
.line-field textarea:focus {
  border-bottom-color: transparent;
  background-size: 100% 2px;
}
.line-field textarea { min-height: 86px; resize: vertical; line-height: 1.5; }
.line-field small { display: block; color: var(--muted, #64748B); font-size: 11px; line-height: 1.45; margin-top: 7px; }
.line-field select { appearance: none; background-position: 50% 100%, calc(100% - 2px) 50%; padding-right: 26px; }

.choice-section { margin: 28px 0 0; }
.choice-section:first-of-type { margin-top: 0; }
/* Choice groups inside a CSS grid should use the grid gap for spacing.
   The generic choice-section margin was offsetting every item after the first. */
.field-grid > .choice-section { margin-top: 0; }
.choice-section h3 { margin: 0 0 12px; font-size: 14px; }
.choice-section p.help { margin: -4px 0 12px; color: var(--muted, #64748B); font-size: 12px; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-chip { position: relative; }
.choice-chip input { position: absolute; opacity: 0; pointer-events: none; }
.choice-chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px;
  border-radius: 999px; border: 1px solid #D7E0EA; background: #fff;
  color: var(--dark, #16324F); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: .18s ease;
}
.choice-chip input:checked + span { background: var(--accent-strong, #2563EB); color: white; border-color: var(--accent-strong, #2563EB); transform: translateY(-1px); }
.choice-chip input:focus-visible + span { outline: 3px solid rgba(59,130,246,.30); }

.segmented { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.segmented.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.segment-option { position: relative; }
.segment-option input { position: absolute; opacity: 0; pointer-events: none; }
.segment-option span {
  display: grid; place-items: center; min-height: 48px; padding: 8px 12px;
  border: 1px solid #D7E0EA; border-radius: 14px; background: white;
  color: var(--dark, #16324F); font-size: 13px; font-weight: 750; cursor: pointer; text-align: center;
  transition: .18s ease;
}
.segment-option input:checked + span { border-color: var(--accent-strong, #2563EB); background: var(--accent-strong, #2563EB); color: white; box-shadow: 0 9px 20px rgba(37,99,235,.18); }

.field-error { border-radius: 16px; outline: 2px solid rgba(180,61,61,.22); outline-offset: 8px; }
.field-error .field-label { color: var(--danger, #B42318); }

.step-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 34px; padding-top: 22px; border-top: 1px solid #E2E8F0; }
.save-status { color: var(--muted, #64748B); font-size: 12px; }
.save-status.error { color: var(--danger, #B42318); }
.primary-button, .secondary-button, .camera-button {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
}
.primary-button { background: var(--accent-strong, #2563EB); color: #FFFFFF; box-shadow: 0 10px 28px rgba(37,99,235,.18); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.primary-button:hover { transform: translateY(-1px); background: var(--accent-hover, #1D4ED8); box-shadow: 0 12px 30px rgba(37,99,235,.22); }
.primary-button:disabled { opacity: 1; cursor: not-allowed; transform: none; background: #E2E8F0; color: #94A3B8; border: 1px solid #CBD5E1; box-shadow: none; }
.secondary-button { background: #FFFFFF; color: var(--accent-strong, #2563EB); border: 1px solid #BFDBFE; box-shadow: 0 6px 18px rgba(15,23,42,.04); }
.secondary-button:hover { background: var(--accent-soft, #EFF6FF); border-color: #93C5FD; }
.ghost-button { border: 0; background: transparent; color: var(--muted, #64748B); cursor: pointer; padding: 9px; }

.location-row { display: flex; align-items: end; gap: 12px; }
.location-row .line-field { flex: 1; }
.location-button { flex: 0 0 auto; min-height: 42px; border: 0; border-radius: 999px; padding: 0 14px; background: var(--accent-soft, #EFF6FF); color: var(--dark-deep, #0B1F33); font-size: 12px; font-weight: 800; cursor: pointer; }
.location-result { margin-top: 8px; color: var(--muted, #64748B); font-size: 11px; }

/* Login */
.login-page {
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 90% 8%, rgba(127,142,126,.12), transparent 27rem),
    radial-gradient(circle at 7% 75%, rgba(59,130,246,.08), transparent 30rem),
    var(--canvas, #F4F8FC);
  color: var(--text, #0F172A);
}
.login-shell { width: min(460px, 100%); }
.login-header { text-align: center; margin-bottom: 22px; }
.login-header small {
  display: block;
  margin-bottom: 10px;
  color: #677665;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 11px;
  font-weight: 800;
}
.login-header p { margin: 0; color: var(--muted, #64748B); font-size: 16px; line-height: 1.5; }
.login-brand { display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.login-form {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.10);
  padding: 28px;
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(15,23,42,.10);
}
.login-form .line-field { margin-bottom: 20px; }
.login-form .line-field > span { color: #475569; }
.login-form input { color: #0F172A; border-bottom-color: #B8C5D3; }
.login-form input:focus { border-bottom-color: #677665; box-shadow: 0 2px 0 #677665; }
.login-form .primary-button {
  background: #7F8E7E;
  color: #FFFFFF;
  width: 100%;
  margin-top: 8px;
  box-shadow: 0 14px 30px rgba(103,118,101,.20);
}
.login-form .primary-button:hover { background: #677665; }
.login-message { min-height: 18px; color: #B91C1C; margin: 13px 0 0; text-align: center; font-size: 12px; }

/* Dashboard */
.dashboard-hero { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 12px 0 26px; }
.dashboard-hero .eyebrow { color: var(--accent-strong, #2563EB); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 800; }
.dashboard-hero h1 { margin: 7px 0 5px; font-size: clamp(34px, 6vw, 54px); letter-spacing: -.055em; }
.dashboard-hero p { margin: 0; color: var(--muted, #64748B); }
.dashboard-tools { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 22px; }
.dashboard-search, .filter-select { border: 1px solid #CBD5E1; background: rgba(255,255,255,.88); min-height: 46px; border-radius: 15px; padding: 0 15px; outline: none; }
.dashboard-search:focus, .filter-select:focus { border-color: var(--accent, #3B82F6); box-shadow: 0 0 0 3px rgba(59,130,246,.18); }
.visit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.visit-card { border-radius: 22px; overflow: hidden; background: white; border: 1px solid rgba(15,23,42,.09); box-shadow: 0 14px 38px rgba(15,23,42,.08); transition: transform .2s ease, box-shadow .2s ease; }
.visit-card:hover { transform: translateY(-3px); box-shadow: 0 20px 46px rgba(37,99,235,.16); }
.visit-card-link { text-decoration: none; display: block; }
.survey-thumb { aspect-ratio: 1.38 / 1; margin: 17px 17px 0; border: 1px solid #D7E0EA; background: #fff; padding: 10px; color: var(--dark-deep, #0B1F33); font-family: Arial,sans-serif; position: relative; overflow: hidden; }
.thumb-brand { height: 13px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.thumb-brand i { display: inline-block; height: 9px; width: 1px; background: #CBD5E1; }
.thumb-logo { display: block; object-fit: contain; filter: brightness(0); }
.thumb-logo-topnotch { width: 39px; height: 10px; }
.thumb-logo-monaco { width: 16px; height: 13px; }
.thumb-logo-monaco-one { width: 58px; height: 34px; object-fit: contain; filter: none; }
.thumb-title { text-align: right; font-size: 7px; font-weight: 800; margin: 6px 0 7px; }
.thumb-row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #EEF2F7; font-size: 6px; }
.thumb-row span { color: #94A3B8; }
.thumb-row b { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin-top: 8px; }
.thumb-grid i { display: block; height: 18px; border: 1px solid #E2E8F0; }
.thumb-drawing { position: absolute; right: 9px; bottom: 7px; width: 42%; height: 31%; border: 1px solid #D7E0EA; display: grid; place-items: center; font-size: 5px; color: var(--dark, #16324F); transform: rotate(-1deg); }
.thumb-drawing.muted { color: #A0AEC0; }
.visit-card-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px 17px; }
.visit-card-banner strong { display: block; font-size: 14px; margin-bottom: 4px; }
.visit-card-banner span:not(.status-chip) { color: var(--muted, #64748B); font-size: 11px; }
.visit-card-banner { align-items: flex-start; padding-bottom: 19px; }
.visit-card-details { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.visit-card-details strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-card-date { display: block; line-height: 1.35; }
.visit-card-surveyor { display: block; margin-top: 4px; line-height: 1.35; }
.visit-card-surveyor b { color: var(--ink, #0F172A); font-weight: 800; }
.status-chip { white-space: nowrap; border-radius: 999px; padding: 6px 9px; background: #F1F5F9; color: #64748B; font-size: 10px; font-weight: 800; }
.status-chip.completed { background: #DCFCE7; color: #166534; }
.empty-state { padding: 56px 20px; text-align: center; background: rgba(255,255,255,.55); border: 1px dashed #CBD5E1; border-radius: 22px; color: var(--muted, #64748B); }
.empty-state h3 { color: var(--ink, #0F172A); margin: 0 0 8px; }

/* Drawing */
.drawing-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tool-button { min-height: 40px; border: 1px solid #D7E0EA; background: white; border-radius: 12px; padding: 0 12px; color: #334155; font-size: 12px; font-weight: 750; cursor: pointer; }
.tool-button.active { background: var(--accent-strong, #2563EB); border-color: var(--accent-strong, #2563EB); color: white; }
.drawing-stage { position: relative; width: 100%; height: min(60vh, 570px); min-height: 410px; border: 1px solid #CBD5E1; border-radius: 18px; overflow: hidden; background-color: #fff; background-image: linear-gradient(#E8EEF6 1px, transparent 1px), linear-gradient(90deg,#E8EEF6 1px,transparent 1px); background-size: 24px 24px; touch-action: none; }
#drawingCanvas { width: 100%; height: 100%; display: block; touch-action: none; }
.drawing-hint { color: var(--muted, #64748B); font-size: 11px; margin: 9px 0 0; }
.drawing-stage:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }

/* Photos */
.photo-categories { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: stretch; }
.photo-slot { border: 1px solid #D7E0EA; background: #fff; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; min-height: 142px; }
.photo-slot.required { border-color: var(--accent-strong, #2563EB); background: #F8FBFF; box-shadow: inset 0 0 0 1px rgba(59,130,246,.13); }
.photo-slot h3 { margin: 0 0 5px; font-size: 15px; }
.photo-slot p { margin: 0 0 13px; color: var(--muted, #64748B); font-size: 11px; line-height: 1.45; flex: 1; }
.camera-button { background: var(--accent-strong, #2563EB); color: #FFFFFF; width: 100%; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.camera-button:hover { background: var(--accent-hover, #1D4ED8); transform: translateY(-1px); }
.camera-button input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 22px; }
.photo-item { position: relative; background: #fff; border: 1px solid #D7E0EA; border-radius: 14px; overflow: hidden; }
.photo-item img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-meta { padding: 8px 9px; }
.photo-meta strong { display:block; font-size: 11px; }
.photo-meta span { color: var(--muted, #64748B); font-size: 10px; }
.photo-delete { position: absolute; right: 7px; top: 7px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(11,31,51,.90); color: white; cursor: pointer; }
.upload-status { color: var(--muted, #64748B); font-size: 12px; margin-top: 12px; min-height: 16px; }

/* Confirm */
.confirm-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.summary-block { border: 1px solid #E2E8F0; border-radius: 16px; padding: 16px; background: #fff; }
.summary-block small { display:block; color: var(--muted, #64748B); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px; }
.summary-block strong { font-size: 14px; }
.confirm-box { margin-top: 24px; padding: 20px; border-radius: 18px; background: linear-gradient(135deg, #F8FBFF 0%, #EFF6FF 100%); border: 1px solid #BFDBFE; }
.confirm-check { display:flex; align-items:flex-start; gap:10px; cursor:pointer; }
.confirm-check input { width:20px; height:20px; accent-color: var(--accent-strong, #2563EB); }
.confirm-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:18px; }

/* Printable survey */
.print-page { background: #E7EDF4; padding: 24px; }
.print-toolbar { max-width: 1120px; margin: 0 auto 14px; display:flex; gap:10px; justify-content:flex-end; }
.print-sheet { width: min(1120px,100%); aspect-ratio: 1.414/1; margin:auto; background:#fff; padding:18px 22px; box-shadow:0 18px 45px rgba(0,0,0,.12); font-family:Arial,sans-serif; overflow:hidden; }
.print-header { display:flex; justify-content:space-between; align-items:start; border-bottom:2px solid #0F172A; padding-bottom:8px; }
.print-brand-logos { display:flex; align-items:center; gap:9px; min-height:34px; }
.print-brand-logos i { width:1px; height:25px; background:#94A3B8; }
.print-logo { display:block; object-fit:contain; filter:brightness(0); }
.print-logo-topnotch { width:96px; height:28px; }
.print-logo-monaco { width:44px; height:34px; }
.print-logo-monaco-one { width:112px; height:42px; object-fit:contain; filter:none; }
.print-header h1 { margin:0; font-size:20px; }
.print-header small { color:#64748B; }
.print-body { display:grid; grid-template-columns: 1.05fr .95fr; gap:10px; margin-top:10px; height:calc(100% - 58px); }
.print-column { display:grid; grid-template-rows:auto auto 1fr; gap:8px; min-height:0; }
.print-section { border:1px solid #CBD5E1; padding:8px 10px; min-height:0; }
.print-section h2 { margin:0 0 6px; font-size:10px; text-transform:uppercase; letter-spacing:.11em; }
.print-row { display:grid; grid-template-columns: 40% 60%; gap:5px; font-size:8px; padding:2.5px 0; border-bottom:1px solid #EEF2F7; }
.print-row:last-child { border:0; }
.print-row span { color:#64748B; }
.print-row b { font-weight:600; }
.print-drawing { width:100%; height:100%; min-height:150px; object-fit:contain; border:1px solid #EEF2F7; }
.photo-sheet { max-width: 1000px; margin:auto; background:white; padding:20px; }
.photo-sheet-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
.photo-sheet-card { break-inside:avoid; }
.photo-sheet-card img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.photo-sheet-card strong { display:block; margin-top:5px; font-size:12px; }
.photo-sheet-card small { display:block; margin-top:2px; color:#64748B; font-size:10px; }
.photo-sheet-plan-card { grid-column:1 / -1; margin-top:4px; padding-top:14px; border-top:1px solid #E2E8F0; }
.photo-sheet-plan-card img { aspect-ratio:auto; max-height:520px; object-fit:contain; background:#F8FAFC; border:1px solid #E2E8F0; }

.panel-error { color: var(--danger, #B42318); padding: 20px; background: #FFF5F3; border-radius: 16px; }

@media (max-width: 880px) {
  .visit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .header-inner { height: 62px; padding: 0 14px; }
  .brand-logo-topnotch { width: 92px; height: 29px; }
  .brand-logo-monaco { width: 48px; height: 40px; }
  .brand-lockup { gap: 8px; }
  .header-back {
    top: 74px;
    left: 12px;
    min-height: 34px;
    padding: 0 12px;
  }
  .wizard-shell { padding: 62px 12px 68px; }
  .step-card { padding: 21px 17px; border-radius: 20px; }
  .field-grid { grid-template-columns: 1fr; gap: 23px; }
  .field-span { grid-column: auto; }
  .segmented.three { grid-template-columns: 1fr; }
  .dashboard-hero { align-items: stretch; flex-direction: column; }
  .dashboard-hero .primary-button { align-self: flex-start; }
  .dashboard-tools { grid-template-columns: 1fr; }
  .visit-grid { grid-template-columns: 1fr; }
  .photo-categories { grid-template-columns: 1fr; }
  .photo-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .confirm-summary { grid-template-columns: 1fr; }
  .step-footer { align-items: flex-start; flex-direction: column-reverse; }
  .step-footer .primary-button { width: 100%; }
  .location-row { align-items: stretch; flex-direction: column; }
  .location-button { align-self: flex-start; }
  .login-brand { gap: 12px; margin-bottom: 28px; }
  .login-brand .brand-logo-topnotch { width: 132px; height: 48px; }
  .login-brand .brand-logo-monaco { width: 72px; height: 60px; }
  .drawing-stage { min-height: 54vh; height: 54vh; }
}

@media print {
  body.print-page { background:white; padding:0; }
  .app-header, .print-toolbar { display:none !important; }
  .print-sheet { box-shadow:none; width:100%; height:100vh; aspect-ratio:auto; padding:9mm; }
  @page { size: A4 landscape; margin: 0; }
  .photo-sheet { padding:8mm; }
  .photo-sheet-grid { grid-template-columns:repeat(2,1fr); }
}


/* V5 independent operations palette polish */
.primary-button:focus-visible, .secondary-button:focus-visible, .camera-button:focus-visible, .location-button:focus-visible { outline: 3px solid rgba(59,130,246,.28); outline-offset: 2px; }
.location-button { background: var(--accent-soft, #EFF6FF); color: var(--accent-strong, #2563EB); border: 1px solid #BFDBFE; }
.location-button:hover { background: #DBEAFE; }
.status-chip { border: 1px solid #E2E8F0; }

/* V6 marquee bay planner */
.planner-wizard-shell { max-width: 1180px; }
.planner-step-card { padding: clamp(20px, 3.6vw, 38px); }
.planner-intro { margin-bottom: 22px; }
.planner-app { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.planner-palette {
  border: 1px solid #D8E2EF;
  background: #F8FBFF;
  border-radius: 18px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}
.planner-palette-section { display: grid; gap: 10px; }
.planner-palette-heading { display: grid; gap: 2px; }
.planner-palette-heading strong { font-size: 12px; color: #0F172A; }
.planner-palette-heading span { font-size: 10px; color: #64748B; }
.planner-depth-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; background: #EAF1F9; border-radius: 12px; }
.planner-depth-toggle button { border: 0; border-radius: 9px; min-height: 36px; background: transparent; color: #475569; font-weight: 800; font-size: 12px; cursor: pointer; }
.planner-depth-toggle button.active { background: #FFFFFF; color: #2563EB; box-shadow: 0 3px 10px rgba(15,23,42,.08); }
.bay-palette-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.bay-palette-item {
  border: 1px solid #CBD8E7;
  border-radius: 12px;
  background: #FFFFFF;
  min-height: 58px;
  padding: 8px 6px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #0F172A;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.bay-palette-item:hover { transform: translateY(-1px); border-color: #60A5FA; box-shadow: 0 8px 18px rgba(37,99,235,.09); }
.bay-palette-item b { font-size: 14px; }
.bay-palette-item span { font-size: 9px; color: #64748B; }
.marker-palette-grid { display: grid; gap: 7px; }
.marker-palette-item {
  border: 1px solid #CBD8E7;
  background: #FFFFFF;
  border-radius: 12px;
  min-height: 50px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0F172A;
  cursor: pointer;
  text-align: left;
}
.marker-palette-item b { font-size: 11px; }
.power-icon, .heater-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 900; font-size: 11px; }
.power-icon { color: #7C3AED; border-left: 4px solid #7C3AED; border-top: 4px solid #7C3AED; border-radius: 3px 0 0 0; }
.heater-icon { color: #EA580C; border-top: 4px solid #EA580C; }
.planner-legend { margin-top: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 8px; border-top: 1px solid #DDE6F0; padding-top: 12px; }
.planner-legend > strong { grid-column: 1 / -1; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #64748B; }
.planner-legend span { font-size: 9px; color: #475569; }
.planner-legend span b { color: #0F172A; }
.planner-main { min-width: 0; }
.planner-toolbar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.planner-toolbar .tool-button { min-height: 36px; padding: 0 10px; border-radius: 10px; }
.planner-stage {
  position: relative;
  height: min(63vh, 650px);
  min-height: 500px;
  border: 1px solid #C9D7E7;
  border-radius: 18px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9);
  touch-action: none;
}
#plannerSvg { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.planner-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 5px; pointer-events: none; text-align: center; color: #64748B; }
.planner-empty[hidden] { display: none; }
.planner-empty strong { color: #334155; font-size: 15px; }
.planner-empty span { font-size: 11px; }
.planner-stage:fullscreen { width: 100vw; height: 100vh; min-height: 100vh; border: 0; border-radius: 0; background: white; }

.edge-editor { margin-top: 18px; border: 1px solid #CBD8E7; border-radius: 18px; background: #F8FBFF; padding: 18px; }
.edge-editor[hidden] { display: none; }
.edge-editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.edge-editor-head .eyebrow { font-size: 9px; text-transform: uppercase; letter-spacing: .15em; color: #2563EB; font-weight: 900; }
.edge-editor-head h3 { margin: 4px 0 4px; font-size: 18px; }
.edge-editor-head p { margin: 0; color: #64748B; font-size: 11px; }
.edge-editor-close { border: 0; background: #EAF1F9; width: 34px; height: 34px; border-radius: 50%; color: #334155; cursor: pointer; font-size: 20px; line-height: 1; }
.bay-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.secondary-button.compact { min-height: 38px; padding: 0 13px; font-size: 11px; }
.danger-outline { color: #B42318; border-color: #F2C5C0; }
.edge-segments { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 13px; padding-top: 14px; border-top: 1px solid #DCE6F1; }
.edge-segments button { min-height: 34px; border: 1px solid #CBD8E7; background: white; color: #475569; border-radius: 10px; padding: 0 11px; font-size: 10px; font-weight: 800; cursor: pointer; }
.edge-segments button.active { background: #0B1F33; color: white; border-color: #0B1F33; }
.edge-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edge-control-group { display: grid; gap: 8px; }
.edge-control-group > strong { font-size: 11px; color: #334155; }
.edge-option-row { display: flex; flex-wrap: wrap; gap: 7px; }
.edge-option-row button { min-height: 38px; border: 1px solid #CBD8E7; background: #FFFFFF; color: #334155; border-radius: 11px; padding: 0 11px; font-size: 10px; font-weight: 800; cursor: pointer; }
.edge-option-row button.active { background: #2563EB; border-color: #2563EB; color: white; }
.edge-option-row button b { margin-right: 3px; }
.edge-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.planner-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.planner-summary span { border: 1px solid #D9E3EE; background: #FFFFFF; border-radius: 999px; padding: 6px 9px; color: #64748B; font-size: 9px; }
.planner-summary b { color: #0F172A; }

@media (max-width: 900px) {
  .planner-app { grid-template-columns: 1fr; }
  .planner-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .planner-palette-section:nth-child(1), .planner-legend { grid-column: 1 / -1; }
  .bay-palette-grid { grid-template-columns: repeat(6, minmax(80px, 1fr)); overflow-x: auto; padding-bottom: 3px; }
  .planner-legend { grid-template-columns: repeat(4, 1fr); }
  .planner-legend > strong { grid-column: 1 / -1; }
  .planner-stage { min-height: 520px; height: 58vh; }
}

@media (max-width: 680px) {
  .planner-step-card { padding: 18px 13px; }
  .planner-palette { grid-template-columns: 1fr; padding: 12px; }
  .planner-palette-section:nth-child(1), .planner-legend { grid-column: auto; }
  .bay-palette-grid { grid-template-columns: repeat(6, 86px); }
  .marker-palette-grid { grid-template-columns: 1fr 1fr; }
  .planner-legend { grid-template-columns: repeat(2, 1fr); }
  .planner-stage { min-height: 55vh; height: 55vh; border-radius: 14px; }
  .planner-toolbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .planner-toolbar .tool-button { white-space: nowrap; flex: 0 0 auto; }
  .edge-control-grid { grid-template-columns: 1fr; }
  .edge-editor-actions .secondary-button { width: 100%; }
}

/* V6.7 dashboard survey deletion */
.visit-card { position: relative; }
.visit-delete-button {
  position: absolute;
  top: 27px;
  right: 27px;
  z-index: 4;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148,163,184,.55);
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #64748B;
  box-shadow: 0 7px 18px rgba(15,23,42,.10);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.visit-delete-button svg { width: 18px; height: 18px; }
.visit-delete-button:hover {
  color: #B42318;
  background: #FFF5F3;
  border-color: #FDA29B;
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(180,35,24,.14);
}
.visit-delete-button:focus-visible { outline: 3px solid rgba(180,35,24,.20); outline-offset: 2px; }

.dialog-open { overflow: hidden; }
.delete-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6,19,33,.52);
  backdrop-filter: blur(8px);
}
.delete-dialog-backdrop[hidden] { display: none; }
.delete-dialog {
  width: min(440px, 100%);
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 28px 80px rgba(6,19,33,.28);
  padding: 25px;
  animation: deleteDialogIn .18s ease-out;
}
.delete-dialog-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #FFF1F0;
  color: #B42318;
  margin-bottom: 17px;
}
.delete-dialog-icon svg { width: 24px; height: 24px; }
.delete-dialog-copy h2 { margin: 0 0 8px; font-size: 23px; letter-spacing: -.035em; }
.delete-dialog-copy p { margin: 0; color: #64748B; font-size: 13px; line-height: 1.55; }
.delete-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.danger-button {
  min-height: 48px;
  padding: 0 19px;
  border: 0;
  border-radius: 999px;
  background: #B42318;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 9px 24px rgba(180,35,24,.18);
}
.danger-button:hover { background: #912018; }
.danger-button:disabled { background: #D0D5DD; color: #667085; cursor: wait; box-shadow: none; }
@keyframes deleteDialogIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 680px) {
  .visit-delete-button { top: 25px; right: 25px; width: 40px; height: 40px; }
  .delete-dialog-actions { flex-direction: column-reverse; }
  .delete-dialog-actions .secondary-button,
  .delete-dialog-actions .danger-button { width: 100%; }
}


/* V6.8 drawing method choice */
.drawing-method-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 15px 16px;
  border: 1px solid #D8E2EF;
  border-radius: 18px;
  background: #F8FBFF;
}
.drawing-method-picker > div:first-child { display: grid; gap: 3px; }
.drawing-method-picker strong { font-size: 14px; color: #0F172A; }
.drawing-method-picker span { font-size: 12px; line-height: 1.45; color: #64748B; }
.drawing-method-buttons {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  background: #EAF1FA;
  flex: 0 0 auto;
}
.drawing-method-button {
  border: 0;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.drawing-method-button.active {
  background: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(37,99,235,.18);
}
.drawing-upload-panel { margin-top: 4px; }
.drawing-upload-card {
  border: 1px dashed #93B4E8;
  border-radius: 22px;
  padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(145deg, #F8FBFF 0%, #EFF6FF 100%);
  min-height: 300px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.drawing-upload-copy { max-width: 580px; }
.drawing-upload-copy h3 { margin: 5px 0 7px; font-size: 24px; letter-spacing: -.03em; }
.drawing-upload-copy p { margin: 0; color: #64748B; line-height: 1.55; font-size: 13px; }
.drawing-upload-button {
  margin-top: 20px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37,99,235,.20);
}
.drawing-upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drawing-upload-preview {
  width: min(640px, 100%);
  margin-top: 20px;
  padding: 10px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid #D8E2EF;
  box-shadow: 0 10px 28px rgba(15,23,42,.08);
}
.drawing-upload-preview img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 10px;
}
.drawing-upload-card .upload-status { margin-top: 13px; }

/* V6.8 completed-survey delete gate */
.delete-password-field {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}
.delete-password-field[hidden] { display: none; }
.delete-password-field span {
  font-size: 12px;
  font-weight: 800;
  color: #344054;
}
.delete-password-field input {
  width: 100%;
  border: 0;
  border-bottom: 2px solid #CBD5E1;
  padding: 10px 2px 9px;
  background: transparent;
  color: #0F172A;
  font: inherit;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.delete-password-field input:focus {
  border-bottom-color: #2563EB;
  box-shadow: 0 2px 0 #2563EB;
}
.delete-dialog-error {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: #FFF1F0;
  color: #B42318;
  font-size: 12px;
  line-height: 1.45;
}
.delete-dialog-error[hidden] { display: none; }

/* V6.8 readable printable-survey preview on phones */
@media (max-width: 680px) {
  body.print-page {
    padding: 12px;
    min-height: 100vh;
    background: #E7EDF4;
  }

  .print-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    margin: 0 0 12px;
    padding: 8px 0;
    justify-content: stretch;
    background: rgba(231,237,244,.94);
    backdrop-filter: blur(10px);
  }

  .print-toolbar .secondary-button,
  .print-toolbar .primary-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .print-sheet {
    width: 100%;
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    overflow: visible;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(15,23,42,.12);
  }

  .print-header {
    gap: 14px;
    align-items: flex-start;
  }

  .print-brand-logos { gap: 6px; min-height: 26px; }
  .print-logo-topnotch { width: 72px; height: 24px; }
  .print-logo-monaco { width: 38px; height: 28px; }
  .print-logo-monaco-one { width: 94px; height: 34px; }
  .print-header h1 { font-size: 19px; line-height: 1.05; }
  .print-header small { font-size: 11px; line-height: 1.35; display: block; }

  .print-body {
    display: block;
    height: auto;
    margin-top: 12px;
  }

  .print-column {
    display: block;
  }

  .print-section {
    margin-bottom: 10px;
    padding: 10px 11px;
    border-radius: 10px;
  }

  .print-section h2 {
    margin-bottom: 7px;
    font-size: 11px;
  }

  .print-row {
    grid-template-columns: 42% 58%;
    font-size: 11px;
    line-height: 1.35;
    gap: 8px;
    padding: 5px 0;
  }

  .print-drawing {
    min-height: 220px;
    max-height: 360px;
  }

  .drawing-method-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .drawing-method-buttons {
    width: 100%;
  }

  .drawing-method-button {
    padding: 0 10px;
  }

  .drawing-upload-card {
    min-height: 260px;
    padding: 18px 14px;
  }
}

/* Keep actual printed/PDF output as the compact one-page A4 landscape sheet. */
@media print {
  .print-body {
    display: grid !important;
    grid-template-columns: 1.05fr .95fr !important;
    gap: 10px !important;
    margin-top: 10px !important;
    height: calc(100% - 58px) !important;
  }
  .print-column {
    display: grid !important;
    grid-template-rows: auto auto 1fr !important;
    gap: 8px !important;
  }
  .print-section {
    margin-bottom: 0 !important;
    padding: 8px 10px !important;
    border-radius: 0 !important;
  }
  .print-section h2 { font-size: 10px !important; }
  .print-row {
    grid-template-columns: 40% 60% !important;
    font-size: 8px !important;
    padding: 2.5px 0 !important;
  }
  .print-drawing {
    min-height: 150px !important;
    max-height: none !important;
  }
}

/* Monaco One portal shell -------------------------------------------------- */
.login-brand-monaco-one {
  margin-bottom: 10px;
}
.login-monaco-one-logo {
  display: block;
  width: min(190px, 52vw);
  height: 158px;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.portal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 8%, rgba(127,142,126,.12), transparent 27rem),
    radial-gradient(circle at 7% 75%, rgba(59,130,246,.08), transparent 30rem),
    var(--canvas, #F4F8FC);
}
.portal-header {
  background: rgba(255,255,255,.90);
  border-bottom: 1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.portal-header-inner {
  width: min(1180px, calc(100% - 36px));
  height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.portal-wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.portal-wordmark img {
  display: block;
  width: 88px;
  height: 74px;
  object-fit: contain;
}
.portal-logout {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #D8E0E8;
  border-radius: 999px;
  background: #FFFFFF;
  color: #334155;
  font-weight: 750;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.portal-logout:hover {
  border-color: #AFC0D1;
  background: #F8FAFC;
  color: #0F172A;
}
.portal-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 82px) 0 80px;
}
.portal-intro {
  max-width: 680px;
  margin-bottom: 34px;
}
.portal-intro .eyebrow {
  color: #7F8E7E;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 850;
}
.portal-intro h1 {
  margin: 9px 0 10px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.02;
  letter-spacing: -.05em;
}
.portal-intro p {
  margin: 0;
  color: var(--muted, #64748B);
  font-size: 16px;
}
.portal-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.portal-module-card {
  min-height: 330px;
  padding: 28px;
  border: 1px solid rgba(15,23,42,.09);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 20px 55px rgba(15,23,42,.08);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.portal-module-card-active {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.portal-module-card-active::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  right: -75px;
  top: -75px;
  background: rgba(127,142,126,.09);
  pointer-events: none;
}
.portal-module-card-active:hover {
  transform: translateY(-4px);
  border-color: rgba(127,142,126,.46);
  box-shadow: 0 28px 68px rgba(15,23,42,.12);
}
.portal-module-icon,
.portal-module-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 38px;
}
.portal-module-icon {
  background: #EEF2ED;
  color: #677665;
}
.portal-module-icon svg {
  width: 29px;
  height: 29px;
}
.portal-module-placeholder {
  background: #F1F5F9;
  color: #94A3B8;
  font-size: 28px;
  font-weight: 300;
}
.portal-module-copy {
  position: relative;
  z-index: 1;
}
.portal-module-kicker {
  display: block;
  margin-bottom: 8px;
  color: #7F8E7E;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 10px;
  font-weight: 850;
}
.portal-module-card h2 {
  margin: 0 0 10px;
  font-size: 27px;
  letter-spacing: -.035em;
}
.portal-module-card p {
  margin: 0;
  color: #64748B;
  line-height: 1.55;
  font-size: 14px;
}
.portal-module-action,
.portal-coming-badge {
  margin-top: auto;
  padding-top: 28px;
  font-size: 13px;
  font-weight: 850;
}
.portal-module-action {
  color: #526350;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-module-action b {
  font-size: 21px;
  font-weight: 500;
  transition: transform .18s ease;
}
.portal-module-card-active:hover .portal-module-action b {
  transform: translateX(4px);
}
.portal-module-card-soon {
  background: rgba(248,250,252,.78);
  border-style: dashed;
  box-shadow: none;
  color: #64748B;
}
.portal-module-card-soon .portal-module-kicker {
  color: #94A3B8;
}
.portal-coming-badge {
  color: #94A3B8;
}

@media (max-width: 820px) {
  .portal-module-grid { grid-template-columns: 1fr; }
  .portal-module-card { min-height: 255px; }
  .portal-module-icon,
  .portal-module-placeholder { margin-bottom: 28px; }
}

@media (max-width: 520px) {
  .login-monaco-one-logo {
    width: min(174px, 54vw);
    height: 148px;
  }
  .portal-header-inner {
    width: min(100% - 28px, 1180px);
    height: 76px;
  }
  .portal-wordmark img {
    width: 72px;
    height: 62px;
  }
  .portal-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 38px;
  }
  .portal-module-card {
    padding: 24px;
    border-radius: 24px;
  }
}


/* Monaco One - Site Survey light theme ------------------------------------- */
.app-header-monaco-one {
  background: rgba(255,255,255,.90);
  color: var(--ink, #0F172A);
  border-bottom: 1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(18px);
  box-shadow: none;
}
.app-header-monaco-one .header-inner {
  height: 86px;
}
.brand-lockup-monaco-one {
  gap: 0;
}
.monaco-one-header-logo {
  display: block;
  width: 88px;
  height: 74px;
  object-fit: contain;
  object-position: center;
}
.app-header-monaco-one .icon-button {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #D8E0E8;
  border-radius: 999px;
  background: #FFFFFF;
  color: #334155;
  font-weight: 750;
}
.app-header-monaco-one .icon-button:hover {
  border-color: #AFC0D1;
  background: #F8FAFC;
  color: #0F172A;
}
.header-back {
  top: 104px;
  border-color: #D8E0E8;
  color: #334155;
  box-shadow: 0 5px 16px rgba(15,23,42,.05);
}
.header-back:hover {
  border-color: rgba(127,142,126,.55);
  background: #F4F7F3;
  color: #566554;
}
.header-back:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.camera-button:focus-visible,
.location-button:focus-visible {
  outline-color: rgba(127,142,126,.30);
}

.dashboard-hero .eyebrow,
.step-intro .eyebrow {
  color: #7F8E7E;
}
.dashboard-search:focus,
.filter-select:focus {
  border-color: #7F8E7E;
  box-shadow: 0 0 0 3px rgba(127,142,126,.16);
}
.visit-card:hover {
  box-shadow: 0 20px 46px rgba(86,101,84,.14);
}
.primary-button,
.camera-button {
  background: #677665;
  box-shadow: 0 10px 28px rgba(103,118,101,.18);
}
.primary-button:hover,
.camera-button:hover {
  background: #566554;
  box-shadow: 0 12px 30px rgba(86,101,84,.22);
}
.secondary-button {
  color: #677665;
  border-color: #CBD6CA;
}
.secondary-button:hover {
  background: #EEF2ED;
  border-color: #AEBEAC;
}
.location-button {
  background: #EEF2ED;
  color: #566554;
}
.step-orb {
  background: conic-gradient(#7F8E7E var(--progress), rgba(15,23,42,.12) 0);
}
.progress-track span {
  background: #677665;
}
.tool-button.active,
.drawing-method-button.active,
.drawing-upload-button {
  background: #677665;
  border-color: #677665;
  box-shadow: 0 8px 20px rgba(103,118,101,.18);
}
.photo-slot.required {
  border-color: #AEBEAC;
  background: #F7F9F6;
  box-shadow: inset 0 0 0 1px rgba(127,142,126,.12);
}
.confirm-box {
  background: linear-gradient(135deg, #FAFBF9 0%, #EEF2ED 100%);
  border-color: #CBD6CA;
}
.drawing-method-picker {
  border-color: #D8E0D6;
  background: #F7F9F6;
}
.drawing-method-buttons {
  background: #E9EEE8;
}
.drawing-upload-card {
  border-color: #AEBEAC;
  background: linear-gradient(145deg, #FBFCFA 0%, #EEF2ED 100%);
}

@media (max-width: 680px) {
  .app-header-monaco-one .header-inner {
    height: 74px;
  }
  .monaco-one-header-logo {
    width: 76px;
    height: 62px;
  }
  .header-back {
    top: 88px;
  }
}

/* Monaco One security UI --------------------------------------------------- */
.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  user-select: none;
}
.remember-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #677665;
}
.login-remember {
  color: #334155;
  margin: -3px 0 18px;
}
.turnstile-shell {
  width: 100%;
  margin: 2px 0 15px;
  min-height: 0;
}
.turnstile-shell:not([hidden]) {
  min-height: 65px;
}

html.session-locked,
html.session-locked body {
  overflow: hidden;
}
html.session-locked body > *:not(#sessionLockOverlay) {
  filter: blur(10px);
  transform: scale(.997);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter .18s ease, transform .18s ease;
}
.session-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15,23,42,.26);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.session-lock-overlay[hidden] {
  display: none !important;
}
.session-lock-card {
  width: min(430px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 32px 90px rgba(15,23,42,.24);
  color: #0F172A;
}
.session-lock-logo {
  display: block;
  width: 84px;
  height: 70px;
  object-fit: contain;
  margin: 0 auto 14px;
}
.session-lock-copy {
  text-align: center;
  margin-bottom: 24px;
}
.session-lock-copy small {
  color: #7F8E7E;
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: 10px;
  font-weight: 850;
}
.session-lock-copy h2 {
  margin: 7px 0 7px;
  font-size: 30px;
  letter-spacing: -.04em;
}
.session-lock-copy p {
  margin: 0 auto;
  max-width: 330px;
  color: #64748B;
  line-height: 1.5;
  font-size: 13px;
}
.session-lock-form .line-field {
  margin-bottom: 18px;
}
.session-lock-form .remember-check {
  margin: 0 0 18px;
}
.session-lock-form .primary-button {
  width: 100%;
  margin-top: 3px;
}
.session-lock-form .login-message {
  color: #B42318;
}

@media (max-width: 520px) {
  .session-lock-overlay { padding: 14px; }
  .session-lock-card {
    padding: 24px 20px;
    border-radius: 24px;
  }
  .session-lock-copy h2 { font-size: 27px; }
}
