:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#19352d;background:#f5f8f5}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}header{background:#12392f;color:white;padding:18px max(22px,calc((100vw - 1300px)/2));display:flex;justify-content:space-between;gap:20px;align-items:center}header b{letter-spacing:.13em}header small{display:block;color:#c0d9cf;margin-top:4px}nav{display:flex;gap:16px;align-items:center}a{color:inherit}nav a,button{background:#e3f2e9;border:0;border-radius:8px;color:#153b2f;padding:11px 16px;font-weight:700;cursor:pointer;text-decoration:none}button:hover,nav a:hover{filter:brightness(.94)}main{max-width:1350px;margin:auto;padding:34px 22px}.intro{display:flex;justify-content:space-between;align-items:end;gap:25px;margin-bottom:28px}.eyebrow{color:#357859;text-transform:uppercase;font-weight:800;letter-spacing:.12em;font-size:13px}h1{font-size:clamp(2rem,4vw,3.2rem);margin:5px 0}p{line-height:1.5}.intro p:last-child{color:#557067;max-width:620px}.totals{display:flex;gap:8px}.totals div{min-width:105px;background:white;border:1px solid #dce9e1;border-radius:12px;padding:15px;font-size:13px}.totals strong{display:block;font-size:27px}.toolbar{background:white;padding:14px 18px;border:1px solid #dce9e1;border-radius:12px 12px 0 0;display:flex;justify-content:space-between;gap:12px;align-items:center}.toolbar>div,.legend{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.legend span{white-space:nowrap;font-size:14px}.legend i{display:inline-block;width:14px;height:14px;border-radius:4px;vertical-align:-2px;margin-right:5px;border:1px solid #456}.green{background:#2ab26b}.yellow{background:#f7c948}.red{background:#e45757}select,input{font:inherit;border:1px solid #bfd1c5;border-radius:7px;padding:9px;background:white;min-width:80px}.map-wrap{overflow:auto;background:#eaf1ed;border:1px solid #dce9e1;border-radius:0 0 12px 12px;max-height:78vh}.map{width:100%;min-width:900px}.map svg{display:block;width:100%;height:auto}.block-ground{fill:#f9fcfa;stroke:#9eb8a8;stroke-width:2}.block-title{font-size:32px;fill:#a6b9af;opacity:.35;text-anchor:middle;pointer-events:none}.block-id{font-size:10px;font-weight:800;fill:#315e49}.road{font-size:12px;letter-spacing:.12em;fill:#3f6655;text-anchor:middle}.parcel polygon{stroke:#395b4d;stroke-width:1.1;cursor:pointer}.parcel.available polygon{fill:#7cd5a4}.parcel.negotiating polygon{fill:#f7ce58}.parcel.sold polygon{fill:#ed7777}.parcel:hover polygon,.parcel:focus polygon{stroke:#082d20;stroke-width:3;filter:brightness(.92)}.parcel:focus{outline:none}.parcel text{pointer-events:none;text-anchor:middle;dominant-baseline:middle;fill:#153f30}.parcel .lot-number{font-size:9px;font-weight:800}.parcel .lot-area{font-size:7.5px}.parcel .lot-measure{font-size:6px;fill:#1e5a42}.map-note{font-size:13px;color:#52665c}.agency-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px;margin:16px 0 28px}.agency-card{border:1px solid #dce9e1;border-left:7px solid var(--card-color);border-radius:12px;padding:16px;background:#fbfdfb}.agency-card h3{margin:0 0 9px}.agency-card p{margin:8px 0}.agency-card ul{margin:4px 0 12px;padding-left:19px}.agency-card button{margin-top:8px}
.panel{background:white;border:1px solid #dce9e1;border-radius:14px;padding:22px;margin:20px 0;box-shadow:0 8px 30px #12392f0c}.panel h2{margin-top:0}.gate{background:#fff2cf;border:1px solid #e5ca79;border-radius:8px;padding:12px}.panel form,.admin-tools{display:flex;gap:12px;flex-wrap:wrap;align-items:end}.panel label{display:grid;gap:5px;font-size:14px;font-weight:650}.panel input{width:230px}.user-row,.report-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #e5ede7}.user-row>span{flex:1;min-width:220px}.user-row select{min-width:120px}.muted{color:#6b7c74;font-size:14px}.panel .danger{background:#fce4e4;color:#8d2424}footer{text-align:center;padding:32px;color:#687f72}@media(max-width:750px){header,.intro,.toolbar{flex-direction:column;align-items:stretch}.totals{justify-content:space-between}.totals div{min-width:0;flex:1}.map-wrap{max-height:65vh}.map{width:900px}nav{justify-content:space-between}}
.zoom-controls{display:inline-flex;align-items:center;gap:5px}.zoom-controls button{padding:8px 11px;min-width:38px}.zoom-controls output{min-width:48px;text-align:center;font-size:13px;font-weight:700}
:root{--brand-primary:#12392f;--brand-secondary:#e3f2e9}header{background:var(--brand-primary)}nav a,button{background:var(--brand-secondary)}.brand{display:flex;align-items:center;gap:12px}.brand img{width:52px;height:52px;object-fit:contain;background:white;border-radius:8px;padding:3px}.stores{margin-bottom:24px}.store-cards{display:flex;gap:12px;flex-wrap:wrap}.store-card{background:white;border:1px solid #dce9e1;border-left:6px solid var(--card-color);border-radius:10px;padding:12px 18px;color:#19352d;text-decoration:none}.store-card.selected{outline:2px solid var(--brand-primary)}#admin>h3{margin-top:32px}#admin form{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:18px}#admin input[type=color]{width:65px;height:42px;padding:3px}#agencySelectorLabel{display:grid;gap:7px;max-width:360px;margin:15px 0}.admin-tools{margin:20px 0}.gate button{margin-left:12px}.store-card small{display:block;color:#59766a;margin-top:4px}


.access-gate{max-width:670px;margin:4rem auto;text-align:center;padding:2.5rem}.access-gate h1{font-size:2rem}.primary-link{display:inline-block;background:var(--brand-primary);color:#fff;border-radius:8px;padding:13px 20px;text-decoration:none;font-weight:700} 

.admin-dashboard {
  --admin-border: #dce9e1;
  --admin-text-muted: #52665c;
  padding: clamp(14px, 3vw, 26px);
  margin-top: 0;
}
.admin-heading, .management-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.admin-heading { margin-bottom: 16px; }
.admin-heading .eyebrow { margin: 0 0 4px; }
.admin-heading h2, .management-heading h3 { margin: 0; }
.admin-map-link { font-weight: 700; text-underline-offset: 3px; }
#lotMap, #teamSection summary { scroll-margin-top: 16px; }

.admin-section {
  margin: 8px 0;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  overflow: clip;
}
.admin-section > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  background: #f7faf8;
  cursor: pointer;
  min-height: 49px;
  padding: 12px 16px;
  font-weight: 700;
  list-style: none;
}
.admin-section > summary::-webkit-details-marker { display: none; }
.admin-section > summary::after {
  content: "";
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  width: 8px;
  height: 8px;
  margin-inline-start: auto;
  margin-inline-end: 3px;
  transform: translateY(-2px) rotate(45deg);
}
.admin-section[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.admin-section > summary:hover,
.admin-section[open] > summary { background: #eaf3ed; }
.admin-section > summary:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -3px;
}
.admin-section-body {
  border-top: 1px solid var(--admin-border);
  padding: clamp(12px, 2vw, 20px);
}
.management-heading { margin-top: 20px; }
.management-heading #agencySelectorLabel { margin: 0; }
.admin-dashboard .agency-overview { margin: 0; }
.admin-dashboard .agency-card { overflow-wrap: anywhere; }
.admin-dashboard #salesGate { margin-top: 0; }
.admin-section .admin-tools { margin-bottom: 0; }
.pending-count, .report-status {
  display: inline-block;
  width: fit-content;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: .8125rem;
  font-weight: 700;
}
.pending-count, .report-status.is-negotiating { background: #fff2cf; color: #65460d; }
.report-status.is-sold { background: #fce4e4; color: #852c2c; }
.report-status { margin-top: 5px; }

.report-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 10px;
  align-items: end;
}
.report-filters select { width: 100%; min-width: 0; }
.report-filters button, .report-filters select { min-height: 42px; }
#admin button:disabled { opacity: .6; cursor: default; }
#reportMessage:empty, .report-row small:empty { display: none; }
.report-summary { font-weight: 650; }
.report-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.report-totals div { background: #f2f7f3; border-radius: 8px; padding: 9px; }
.report-totals dt { color: var(--admin-text-muted); font-size: .8125rem; }
.report-totals dd { margin: 2px 0 0; font-size: 1.4rem; font-weight: 750; }
.report-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: start;
  overflow-wrap: anywhere;
}
.report-row small { display: block; color: var(--admin-text-muted); }
.commission-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  font-size: .875rem;
}
.commission-summary > span { display: inline; }
.commission-summary button { padding: 8px 12px; }
#commissionDialog {
  width: min(440px, calc(100vw - 24px));
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px;
  color: inherit;
}
#commissionDialog::backdrop { background: #10271f88; }
#admin #commissionForm { display: grid; gap: 12px; margin: 0; }
#commissionForm input { width: 100%; }
#commissionMessage { color: #852c2c; margin: 0; }
#commissionMessage:empty { display: none; }
.commission-actions { display: flex; justify-content: flex-end; gap: 8px; }
.report-empty, #reportMessage { color: var(--admin-text-muted); }
.print-report-title { display: none; }

@media (max-width: 850px) {
  .report-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .admin-dashboard .agency-overview { grid-template-columns: minmax(0, 1fr); }
  .admin-dashboard input, .admin-dashboard select { max-width: 100%; }
  .admin-dashboard .user-row > span { min-width: min(220px, 100%); overflow-wrap: anywhere; }
}
@media print {
  .printing-report > header, .printing-report > footer,
  .printing-report main > :not(#admin), .printing-report #admin > :not(#reportSection),
  .printing-report #reportSection > summary, .printing-report .report-filters,
  .printing-report #reportMessage, .printing-report .commission-summary button,
  .printing-report #commissionDialog { display: none !important; }
  .printing-report main, .printing-report #admin,
  .printing-report #reportSection, .printing-report .admin-section-body {
    margin: 0; padding: 0; border: 0; box-shadow: none; overflow: visible;
  }
  .printing-report { background: white; }
  .printing-report .print-report-title { display: block; }
  .printing-report .report-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    break-inside: avoid;
    font-size: 11pt;
  }
}

#admin .check-label, .panel .check-label {
  display: flex;
  align-items: start;
  gap: 8px;
  max-width: 100%;
}
#admin .check-label input, .panel .check-label input {
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  margin: 2px 0 0;
}
#fiscalDialog {
  width: min(500px, calc(100vw - 24px));
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px;
  color: inherit;
}
#fiscalDialog::backdrop { background: #10271f88; }
#admin #fiscalForm { display: grid; gap: 12px; margin: 0; }
#fiscalForm input:not([type=checkbox]) { width: 100%; }
#fiscalMessage:empty { display: none; }
#billingRows p { overflow-wrap: anywhere; }
@media print {
  .printing-report #fiscalDialog { display: none !important; }
}

.admin-section { --section-tint:#e9f3ee; --section-ink:#235442; }
.admin-section > summary { background: var(--section-tint); color: var(--section-ink); }
.admin-section > summary:hover, .admin-section[open] > summary { background: var(--section-tint); filter: brightness(.96); }
#reportSection { --section-tint:#e3f0ff; --section-ink:#173c67; }
#teamSection { --section-tint:#ede7fb; --section-ink:#4c3076; }
#clientSection { --section-tint:#fff0d9; --section-ink:#6b4618; }
#projectManagement, #agencyDirectory { --section-tint:#dff2f0; --section-ink:#145454; }
#complianceSection { --section-tint:#ffe9e4; --section-ink:#783929; }
#billingSection { --section-tint:#f7e6f1; --section-ink:#6d3159; }
.admin-section:has(#holdMinutes) { --section-tint:#fff4ce; --section-ink:#61480e; }
.admin-section:has(#brandForm) { --section-tint:#e8ebf3; --section-ink:#374660; }
.project-list { display:grid; gap:10px; margin-bottom:14px; }
.project-card { display:flex; align-items:center; gap:10px; flex-wrap:wrap; border:1px solid #dce9e1; border-radius:10px; padding:10px; }
.project-card > strong { flex:1; }
.project-card [aria-current=true], .project-card [aria-pressed=true] { outline:2px solid #256a4e; }
#clientDialog { width:min(440px,calc(100vw - 24px)); border:1px solid #dce9e1; border-radius:12px; }
#clientDialog::backdrop { background:#10271f88; }
#admin #editClientForm { display:grid; gap:12px; }
#editClientForm input { width:100%; }
#clientMessage:empty, #clientEditMessage:empty, #projectMessage:empty { display:none; }

#agencyDirectory { --section-tint:#e4f4d8; --section-ink:#345829; }
#createAgency { --section-tint:#f3eadf; --section-ink:#684329; }

#financeSection { --section-tint:#dff1e8; --section-ink:#1b573d; }
#planDialog { width:min(1120px,95vw); max-height:94vh; border:1px solid #dce9e1; border-radius:14px; padding:20px; }
#paymentDialog { width:min(500px,95vw); border:1px solid #dce9e1; border-radius:14px; padding:20px; }
#planDialog::backdrop, #paymentDialog::backdrop { background:#19352d88; }
.plan-heading, .plan-toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:end; margin-block:10px; }
.plan-heading { justify-content:space-between; align-items:center; }
.plan-heading h2 { margin:0; }
.plan-toolbar label { display:grid; gap:4px; }
#planCanvasWrap { max-height:56vh; overflow:auto; background:#f0f4f2; border:1px solid #dce9e1; }
#planCanvas { display:block; min-width:600px; cursor:crosshair; }
.plan-outline { fill:#00a66855; stroke:#076341; stroke-width:2px; vector-effect:non-scaling-stroke; }
.plan-outline.selected { stroke:#194c88; stroke-width:3px; }
.plan-trace { fill:none; stroke:#194c88; stroke-width:2px; vector-effect:non-scaling-stroke; }
.plan-vertex { fill:#194c88; }
.plan-parcel polygon { fill-opacity:.52; vector-effect:non-scaling-stroke; }
.plan-preview polygon { cursor:default; }
#financeRows button { padding:.5em .7em; }
@media print {
  .printing-finance > header,.printing-finance > footer,.printing-finance main > :not(#admin),
  .printing-finance #admin > :not(#financeSection),.printing-finance #financeSection summary,
  .printing-finance #financeSection form,.printing-finance .report-filters,.printing-finance #financeRows button,
  .printing-finance #financeMessage { display:none!important; }
  .printing-finance main,.printing-finance #admin,.printing-finance #financeSection,.printing-finance .admin-section-body { padding:0; margin:0; border:0; }
  .printing-finance .report-row { break-inside:avoid; }
}

.app-evolution { font-size:.85rem; color:#52665c; margin:8px auto 0; max-width:36rem; }
.app-evolution summary { cursor:pointer; }
.app-evolution ul { margin:8px auto 0; padding-inline-start:1.25rem; width:fit-content; text-align:start; line-height:1.5; }

#sellerProjectsDialog { width:min(560px,95vw); max-height:90vh; border:1px solid #dce9e1; border-radius:14px; padding:20px; }
#sellerProjectsDialog::backdrop { background:#19352d88; }
#sellerProjectsList { max-height:35vh; overflow:auto; border:1px solid #dce9e1; border-radius:8px; }
#sellerProjectsList label { display:flex; gap:6px; margin-block:6px; }
#sellerProjectsList input { min-width:auto; }

#commerceDialog { width:min(760px,95vw); max-height:90vh; border:1px solid #dce9e1; border-radius:14px; padding:20px; }
#commerceDialog::backdrop { background:#19352d88; }
#commerceDialog fieldset { width:100%; min-width:0; display:flex; flex-wrap:wrap; gap:10px; align-items:end; margin:0; padding:0; border:0; }
#commerceDialog p { margin-block:8px; }

#contractsDialog { width:min(790px,95vw); max-height:90vh; border:1px solid #dce9e1; border-radius:14px; padding:20px; }
#contractsDialog::backdrop { background:#19352d88; }
#contractsDialog form { display:grid; gap:8px; margin-block:12px; }
#contractsDialog textarea { display:block; width:100%; font:inherit; }
#closingForm fieldset { min-width:0; border:1px solid #dce9e1; padding:10px; }
#closingForm fieldset label { margin-block:5px; }

#impersonationBanner { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px;
  padding:10px 16px; margin:0 0 16px; background:#fff2c9; color:#463117; border:1px solid #ebd997; border-radius:10px; }
#impersonationBanner p { margin:0; }
.impersonate-admin { margin:3px 0; padding:5px 9px; font-size:.8rem; }
.observability-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:8px; }
.observability-metrics div { border:1px solid #dce9e1; border-radius:8px; padding:8px 12px; }
.observability-metrics dt { font-size:.85rem; color:#52665c; }
.observability-metrics dd { margin:3px 0 0; font-weight:700; }
.log-table { overflow:auto; margin-block:8px; }
.log-table table { width:100%; border-collapse:collapse; }
.log-table th,.log-table td { border-bottom:1px solid #dce9e1; padding:7px; text-align:left; vertical-align:top; }
.log-table th { white-space:nowrap; }

#adminWorkflows { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 14px; }
#adminWorkflows a { color:#153b2f; background:#eef6f1; border:1px solid #dce9e1; border-radius:8px;
  padding:6px 11px; text-decoration:none; font-weight:650; }
#projectAdminList .project-card { align-items:start; }
.project-workflows { min-width:140px; max-width:100%; }
.project-workflows[open] { flex-basis:100%; }
.project-workflows > summary,.workflow-section > summary { cursor:pointer; font-weight:700; }
.workflow-section { border:1px solid #dce9e1; border-radius:9px; padding:10px; margin:8px 0; }
.workflow-section[open] > summary { margin-bottom:10px; }
.workflow-fields { display:flex; flex-wrap:wrap; align-items:end; gap:8px; }
#commerceDialog fieldset > .workflow-section { width:100%; }
#lotWorkspace > form,#lotWorkspace .workflow-section form,#paymentWorkspace form { margin:0; }
#lotWorkspace .workflow-section input,#lotWorkspace .workflow-section select { max-width:100%; }
