:root {
  --blue: #1a56db;
  --blue-dark: #123a99;
  --ink: #1b2430;
  --ink-soft: #5b6472;
  --line: #dde2e8;
  --bg: #f4f6f9;
  --card: #ffffff;
  --green: #2e7d32;
  --amber: #f9a825;
  --orange: #ef6c00;
  --red: #c62828;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.app-header {
  background: var(--blue);
  color: #fff;
}
.app-header-inner {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 56px;
}
.brand { color: #fff; font-weight: 700; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.main-nav { display: flex; gap: 1.1rem; flex: 1; }
.main-nav a { color: rgba(255,255,255,0.78); font-weight: 500; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav a.active { color: #fff; border-bottom-color: #fff; }
.header-account { display: flex; align-items: center; gap: 0.85rem; font-size: 0.85rem; }
.credits-pill { background: rgba(255,255,255,0.15); padding: 0.25rem 0.6rem; border-radius: 999px; font-weight: 600; }
.user-email { color: rgba(255,255,255,0.8); }
.logout-link { color: #fff; text-decoration: underline; }

.app-main {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: clamp(0.75rem, 1.2vw, 1.25rem);
}

/* ---------- generic ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.card + .card { margin-top: 1rem; }
h1 { font-size: 1.4rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.muted { color: var(--ink-soft); }
.stack { display: flex; flex-direction: column; gap: 0.75rem; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
th { color: var(--ink-soft); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select {
  font-size: 0.92rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
label { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; display: block; margin-bottom: 0.2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.btn:hover { border-color: var(--blue); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.alert { padding: 0.7rem 0.9rem; border-radius: var(--radius); font-size: 0.9rem; }
.alert-error { background: #fdecea; color: var(--red); border: 1px solid #f5c2c0; }
.alert-success { background: #e8f5e9; color: var(--green); border: 1px solid #c3e6c5; }

.pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; color: #fff; }

/* ---------- auth pages ---------- */
.auth-page { min-height: 100vh; background: #fff; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .9fr) minmax(460px, 1.1fr); }
.auth-brand-panel { position: relative; overflow: hidden; padding: clamp(2rem, 5vw, 5rem); color: #fff; background: linear-gradient(145deg, #0b2b6f, #1557d5 58%, #1688e8); display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand-panel::after { content: ''; position: absolute; width: 460px; height: 460px; border: 80px solid rgba(255,255,255,.07); border-radius: 50%; right: -230px; bottom: -180px; }
.auth-brand-content { position: relative; z-index: 1; max-width: 620px; margin: auto 0; }
.auth-logo { display: flex; align-items: center; gap: .75rem; font-size: 1.15rem; font-weight: 750; margin-bottom: clamp(3rem, 8vh, 6rem); }
.auth-logo svg { width: 42px; height: 42px; fill: #fff; }
.auth-brand-panel h1 { font-size: clamp(2rem, 3.7vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 1.25rem; }
.auth-brand-panel p { max-width: 540px; font-size: 1.08rem; color: rgba(255,255,255,.82); }
.auth-benefits { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; }
.auth-benefits span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-right: .55rem; background: rgba(255,255,255,.16); }
.auth-brand-panel small { position: relative; z-index: 1; color: rgba(255,255,255,.62); }
.auth-form-panel { display: grid; place-items: center; padding: 2rem; background: #f7f9fc; }
.auth-shell { width: min(100%, 460px); margin: 0; padding: clamp(1.5rem, 4vw, 2.6rem); border-radius: 14px; box-shadow: 0 18px 55px rgba(22,42,73,.1); }
.auth-shell h2 { font-size: 1.75rem; letter-spacing: -.02em; margin-bottom: .35rem; }
.auth-subtitle { color: var(--ink-soft); margin: 0 0 1.5rem; }
.auth-shell input[type=email], .auth-shell input[type=password] { width: 100%; min-height: 45px; }
.auth-submit { width: 100%; justify-content: center; min-height: 45px; margin-top: .25rem; }
.password-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: -.65rem; }
.password-label label { margin: 0; }
.password-label a { font-size: .8rem; font-weight: 600; }
.auth-switch { text-align: center; margin: 1.25rem 0 0; font-size: .88rem; }
.auth-mobile-brand { display: none; color: var(--blue); font-weight: 750; margin-bottom: 1.5rem; }
@media (max-width: 820px) {
  .auth-layout { display: block; min-height: 100vh; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 1rem; }
  .auth-mobile-brand { display: block; }
}

/* ---------- dashboard ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 22vw, 410px);
  gap: 1rem;
  align-items: start;
}
#map {
  height: clamp(620px, calc(100vh - 245px), 860px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.map-error {
  position: absolute;
  z-index: 10;
  left: 1rem;
  right: 1rem;
  top: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #f5c2c0;
  border-radius: var(--radius);
  background: #fdecea;
  color: var(--red);
  font-size: 0.85rem;
}
.map-style-control {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem;
  background: #fff;
}
.map-style-control label {
  margin: 0;
  color: var(--ink);
  font-size: 0.72rem;
  white-space: nowrap;
}
.map-style-control select {
  max-width: 145px;
  padding: 0.28rem 0.35rem;
  border: 1px solid var(--line);
  font-size: 0.78rem;
}
.filters-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.85rem; }
.filters-bar input, .filters-bar select { min-width: 140px; }
.full-zip-option {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  margin: 0.1rem 0 0;
  color: var(--ink);
}
.full-zip-option small {
  width: 100%;
  margin-left: 1.35rem;
  color: var(--ink-soft);
  font-weight: 400;
}

.result-list {
  height: clamp(620px, calc(100vh - 245px), 860px);
  overflow-y: auto;
  padding-right: 0.25rem;
}
.result-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.6rem 0.2rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.result-row:hover { background: #f8fafc; }
.result-row .addr { font-weight: 600; }
.result-row .meta { font-size: 0.82rem; color: var(--ink-soft); }
.roof-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; margin-top: 0.3rem; }

.selection-bar {
  display: flex; align-items: center; gap: 0.6rem; justify-content: space-between;
  padding: 0.5rem 0.2rem; margin-bottom: 0.4rem; border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,26,33,0.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 3rem 1rem;
  /* Leaflet's own panes/controls use z-index up to 1000 (see leaflet.css) —
     this has to clear that or the map renders on top of the modal. */
  z-index: 2000;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: #fff; border-radius: var(--radius); max-width: 640px; width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 1.25rem 1.4rem;
}
.property-detail-modal { max-width: 980px; padding: 0; border-radius: 7px; box-shadow: 0 18px 60px rgba(0,0,0,.28); }
.property-detail-modal > h2 { margin: 0; padding: 1.3rem 1.5rem 0; font-size: 1.3rem; }
.property-detail-modal > #modal-subaddress { margin: .2rem 0 0; padding: 0 1.5rem 1.1rem; }
.property-detail-modal > .modal-close { margin: .65rem .9rem 0 0; position: relative; z-index: 2; }
.property-detail-modal .tabs { gap: .25rem; margin: 0; padding: .7rem 1.5rem 0; background: #fafbfc; }
.property-detail-modal .tabs button { min-width: 100px; padding: .55rem 1rem; border-radius: 4px 4px 0 0; }
.property-detail-modal .tabs button.active { color: #fff; background: var(--blue); border-bottom-color: var(--blue); }
.property-detail-modal .tab-panel { padding: 1.25rem 1.5rem 1.6rem; }
.property-detail-modal .detail-grid {
  grid-template-columns: minmax(130px, 0.7fr) minmax(0, 1.3fr) minmax(130px, 0.7fr) minmax(0, 1.3fr);
  gap: 1.1rem 1.25rem;
  align-items: baseline;
}
.modal-property-map { height: 280px; margin-bottom: 1.25rem; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #eef2f5; display: flex; align-items: center; justify-content: center; }
.modal-property-map .mapboxgl-map { width: 100%; height: 100%; }
.owner-action-row { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem; margin: 1.4rem 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.owner-action-row .btn[disabled] { opacity: .7; cursor: default; }
.owner-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.instant-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 1rem 0; padding: 1rem; background: #fafbfc; border-radius: 5px; }
.instant-contact-grid h4 { margin: 0 0 .55rem; font-size: .82rem; color: var(--ink-soft); }
.instant-contact-grid p { margin: .28rem 0; font-size: .86rem; }
.instant-contact-grid small { color: var(--ink-soft); }
.trace-confirm-backdrop { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(10,18,28,.72); }
.trace-confirm-dialog { position: relative; width: min(390px, 100%); padding: 1.25rem; background: #fff; border-radius: 8px; box-shadow: 0 20px 65px rgba(0,0,0,.35); }
.trace-confirm-dialog h3 { margin: 0 0 1rem; font-size: 1.05rem; }
.trace-confirm-close { position: absolute; top: .7rem; right: .8rem; border: 0; background: transparent; color: var(--ink-soft); font-size: 1.15rem; cursor: pointer; }
.trace-property-summary, .trace-cost-summary { display: flex; flex-direction: column; gap: .28rem; padding: 1rem; border-radius: 6px; font-size: .85rem; }
.trace-property-summary { background: #eef8ff; }
.trace-property-summary strong { margin-bottom: .25rem; }
.trace-property-summary b { font-size: .75rem; margin-top: .15rem; }
.trace-cost-summary { margin-top: .8rem; background: #edfff4; border: 1px solid #d8f4e3; }
.trace-cost-summary h4 { margin: 0 0 .35rem; color: #258154; font-size: .95rem; }
.trace-cost-summary div { display: flex; justify-content: space-between; gap: 1rem; }
.trace-cost-summary hr { width: 100%; border: 0; border-top: 1px solid #cce8d7; }
.trace-cost-summary small { margin-top: .3rem; color: var(--ink-soft); }
.trace-confirm-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: 1rem; }
.permit-external-link { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 1.25rem; }
.permit-external-link a { color: var(--blue); font-weight: 700; text-decoration: none; }
.permit-refresh-controls { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 0 0 1.25rem; padding: .8rem; background: #f4f8ff; border: 1px solid #dfe9f7; border-radius: 5px; }
.permit-refresh-controls .muted { font-size: .78rem; }
.permit-info-card { padding: 1.15rem 1.25rem; margin-bottom: 1rem; background: #fafcfb; border: 1px solid #edf1ef; border-radius: 5px; }
.permit-info-card h3 { margin: 0 0 1rem; font-size: 1rem; }
.permit-summary-grid, .permit-detail-grid { display: grid; margin: 0; gap: 1.1rem 1.6rem; }
.permit-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.permit-detail-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.permit-summary-grid dt, .permit-detail-grid dt { color: var(--ink-soft); font-size: .74rem; }
.permit-summary-grid dd, .permit-detail-grid dd { margin: .2rem 0 0; font-weight: 700; font-size: .86rem; }
.permit-history-heading { margin: 1.4rem 0 .7rem; font-size: 1rem; }
.permit-history-toolbar { display: flex; justify-content: flex-end; margin: 0 0 .75rem; }
.permit-history-toolbar label { color: var(--ink-soft); font-size: .78rem; }
.permit-history-toolbar select { margin-left: .35rem; }
.permit-history-table { font-size: .82rem; }
.permit-empty-state { padding: 2rem; text-align: center; background: #fafbfc; border: 1px dashed var(--line); border-radius: 5px; }
.permit-empty-state p { max-width: 620px; margin: .5rem auto 0; color: var(--ink-soft); }
.modal-close { float: right; border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink-soft); }
.tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--line); margin: 0.5rem 0 1rem; }
.tabs button { background: none; border: none; padding: 0.5rem 0; font-weight: 600; color: var(--ink-soft); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1.2rem; font-size: 0.9rem; }
.detail-grid dt { color: var(--ink-soft); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }
.detail-grid dd { margin: 0.1rem 0 0; font-weight: 600; }

.legend { display: flex; gap: 0.9rem; font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.6rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.3rem; }

/* ---------- advanced search filters ---------- */
.filters-backdrop {
  padding: 1.25rem;
  background: rgba(20, 26, 33, 0.72);
}
.filters-modal {
  width: min(1180px, calc(100vw - 2rem));
  height: min(820px, calc(100vh - 2.5rem));
  background: #fff !important;
  opacity: 1;
  isolation: isolate;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.filters-modal-header, .filters-modal-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.filters-modal-header h2 { margin: 0; }
.filters-modal-footer { border-top: 1px solid var(--line); border-bottom: 0; }
#more-filter-form { display: flex; flex-direction: column; min-height: 0; flex: 1; background: #fff; }
.filters-modal-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: 0; flex: 1; background: #fff; }
.filter-sections { overflow-y: auto; padding: 0.85rem; background: #fff; }
.applied-filters { border-left: 1px solid var(--line); padding: 0.85rem; overflow-y: auto; background: #fff; }
.filter-section { margin-bottom: 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.filter-section summary {
  cursor: pointer;
  list-style: none;
  padding: 0.7rem 0.85rem;
  background: var(--blue);
  color: #fff;
  font-weight: 650;
}
.filter-section summary::-webkit-details-marker { display: none; }
.filter-section summary::after { content: "⌄"; float: right; }
.filter-section[open] summary::after { content: "⌃"; }
.section-count:not(:empty) {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; margin-left: 0.35rem;
  border-radius: 999px; background: #fff; color: var(--blue); font-size: 0.72rem;
}
.filter-section-content { padding: 1rem; background: #fff; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 1rem; }
.filter-grid input, .filter-grid select { width: 100%; }
.filter-grid fieldset { min-width: 0; }
.span-2 { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; }
fieldset legend { font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 0.35rem; }
fieldset > label { display: block; color: var(--ink); font-weight: 400; }
.range-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.choice-card {
  display: flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-height: 42px; padding: 0.45rem; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); font-weight: 500; text-align: center;
}
.choice-card:has(input:checked) { border-color: var(--blue); background: #eef5ff; color: var(--blue); }
.inline-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
.inline-choices label { color: var(--ink); font-weight: 400; }
.applied-filter-list { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.75rem; }
.filter-chip {
  padding: 0.45rem 0.55rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); text-align: left; cursor: pointer; font-size: 0.76rem;
}
.filter-chip:hover { border-color: var(--red); }

.selected-design-panel {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #f8fafc;
}
.mail-estimate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #b9e2c3;
  border-radius: var(--radius);
  background: #f0fbf3;
}
.mail-estimate[hidden] { display: none; }
.mail-estimate h2 { color: var(--green); }
.chosen-design-preview {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 1rem;
  border-right: 1px solid #b9e2c3;
}
.chosen-design-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  max-height: 285px;
  margin-bottom: 0.55rem;
  padding: 0.4rem;
  overflow: hidden;
  border-radius: 5px;
  background: #e7f2ea;
}
.chosen-design-proof img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 270px;
  object-fit: contain;
}
.chosen-design-preview > span { font-size: 0.8rem; }
.estimate-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
}
.estimate-total {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid #b9e2c3;
  font-size: 1.05rem;
}
.estimate-delivery {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid #b9e2c3;
  font-size: 0.82rem;
}
.estimate-details > p { margin: 0.6rem 0 0; color: var(--ink-soft); font-size: 0.72rem; }
#design-picker { padding: 1rem; align-items: center; }
.design-picker-modal {
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(100vw - 2rem));
  max-width: 1180px;
  height: min(760px, calc(100vh - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}
.design-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.6rem;
  padding: 0.15rem 0.35rem 0.5rem 0;
  overflow-y: auto;
  min-height: 0;
}
.design-option {
  display: flex;
  flex-direction: column;
  align-self: start;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  background: #fff;
}
.design-option.selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(26,86,219,0.12); }
.design-option[hidden] { display: none; }
.design-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(92px, 15vh, 135px);
  overflow: hidden;
  background: #eef2f7;
  border-radius: 5px;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.design-proof img { width: 100%; height: 100%; object-fit: contain; }
.design-option h3 {
  margin: 0.45rem 0 0.05rem;
  font-size: 0.86rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.design-option p { margin: 0 0 0.4rem; font-size: 0.74rem; }
.design-actions { display: flex; gap: 0.45rem; }
.design-actions .btn { flex: 1; justify-content: center; padding: 0.38rem 0.45rem; font-size: 0.78rem; }

.skiptrace-memo {
  display: inline-block;
  margin: .45rem 0 0;
  padding: .18rem .5rem;
  border-radius: 999px;
  background: #e8f1ff;
  color: #245b9e;
  font-size: .75rem;
  font-weight: 600;
}

.roof-age-pill-marker {
  min-width: 42px;
  height: 22px;
  padding: 0 7px;
  border: 1.5px solid #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  color: #fff;
  font: 700 10px/19px Arial, sans-serif;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.roof-age-pill-marker:hover { transform: scale(1.08); z-index: 2; }

.mapboxgl-popup.property-rollover-popup { z-index: 8; }
.property-rollover-popup .mapboxgl-popup-content {
  width: 245px;
  padding: 13px;
  border-radius: 6px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .28);
}
.property-rollover-popup .mapboxgl-popup-close-button {
  top: 4px; right: 5px; width: 25px; height: 25px;
  color: #52606d; font-size: 21px;
}
.property-rollover-address { display: flex; gap: 6px; align-items: flex-start; padding-right: 18px; }
.property-rollover-address input { margin: 2px 0 0; }
.property-rollover-address strong { display: block; color: #1f2937; font-size: 12px; line-height: 1.25; }
.property-rollover-address span { display: block; color: #8a94a3; font-size: 9px; margin-top: 2px; }
.property-rollover-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px 12px; margin: 10px 0;
}
.property-rollover-grid span { display: block; color: #8a94a3; font-size: 8px; line-height: 1.2; }
.property-rollover-grid strong { display: block; color: #253142; font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; }
.property-rollover-details {
  width: 100%; border: 0; border-radius: 4px; padding: 7px 10px;
  background: #0866e8; color: #fff; font-size: 10px; font-weight: 700; cursor: pointer;
}
.property-rollover-details:hover { background: #0758c7; }

@media (max-width: 900px) {
  .app-header-inner { height: auto; min-height: 56px; flex-wrap: wrap; gap: 0.6rem 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; white-space: nowrap; padding-bottom: 0.15rem; }
  .header-account { margin-left: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  #map { height: min(620px, 68vh); }
  .result-list { height: auto; max-height: 620px; }
  .filters-modal-body { grid-template-columns: 1fr; }
  .applied-filters { display: none; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .design-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .property-detail-modal .detail-grid, .owner-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .permit-summary-grid, .permit-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail-estimate { grid-template-columns: 1fr; }
  .chosen-design-preview { padding-right: 0; padding-bottom: 1rem; border-right: 0; border-bottom: 1px solid #b9e2c3; }
}
@media (max-width: 480px) {
  .design-grid { grid-template-columns: 1fr; }
  .selected-design-panel { align-items: stretch; flex-direction: column; }
  .property-detail-modal .detail-grid, .owner-summary-grid { grid-template-columns: 1fr !important; }
  .permit-summary-grid, .permit-detail-grid { grid-template-columns: 1fr; }
}

/* User access toggle in Admin. */
.user-block-toggle { display: inline-flex; align-items: center; gap: .5rem; }
.user-block-toggle::before { content: ''; width: 2rem; height: 1.1rem; border-radius: 1rem; background: #64748b; }
.user-block-toggle::after { content: ''; position: absolute; width: .8rem; height: .8rem; border-radius: 50%; background: #fff; margin-left: .15rem; transition: transform .15s; }
.user-block-toggle { position: relative; }
.user-block-toggle[aria-checked="true"]::before { background: #b91c1c; }
.user-block-toggle[aria-checked="true"]::after { transform: translateX(.9rem); }
.user-block-toggle:disabled { opacity: .5; cursor: not-allowed; }
