/* Responsive foundation shared by every administration module. */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
.leaflet-container canvas,
.leaflet-container svg { max-width: none !important; }
input, select, textarea, button { max-width: 100%; }

/* Compact labels keep the lot polygons visible instead of covering the map. */
.leaflet-tooltip.gis-lot-label {
  width: auto !important;
  min-width: 48px;
  max-width: 76px;
  padding: 4px 6px !important;
  border: 1px solid rgba(21, 59, 56, .2) !important;
  border-radius: 6px !important;
  background: rgba(255, 253, 249, .88) !important;
  box-shadow: 0 2px 8px rgba(21, 59, 56, .14) !important;
  color: #153b38 !important;
  line-height: 1.05 !important;
  text-align: center;
  pointer-events: none;
}
.leaflet-tooltip.gis-lot-label::before { display: none !important; }
.leaflet-tooltip.gis-lot-label b,
.leaflet-tooltip.gis-lot-label span { display: block !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaflet-tooltip.gis-lot-label b { font-size: 9px !important; }
.leaflet-tooltip.gis-lot-label span { margin-top: 2px; font-size: 7px !important; font-weight: 650; opacity: .72; }

/* The public lot viewer prioritizes the interactive map over its heading. */
.public-lot-page .public-lot-head { padding: 22px clamp(20px, 6vw, 90px) 14px !important; }
.public-lot-page .public-lot-head-inner { gap: 22px !important; }
.public-lot-page .public-lot-head h1 {
  margin: 6px 0 !important;
  font-size: clamp(28px, 2.45vw, 38px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.025em !important;
}
.public-lot-page .public-lot-head p { max-width: 720px; margin: 5px 0; font-size: 13px !important; line-height: 1.5; }
.public-lot-page .public-lot-head .overline { margin: 0 0 5px !important; }

/* Compact, image-led lotization cards on the public home page. */
.public-subdivisions { padding-top: 66px !important; padding-bottom: 72px !important; }
.public-subdivisions .section-heading { margin-bottom: 28px !important; }
.public-subdivisions .section-heading h2 { font-size: clamp(32px, 3.2vw, 48px) !important; line-height: 1.05 !important; }
.public-subdivisions .subdivision-plan { height: 170px !important; isolation: isolate; }
.public-subdivisions .subdivision-plan img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.public-subdivisions .subdivision-plan:after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,rgba(5,47,53,.16),rgba(5,47,53,.58)); }
.public-subdivisions .subdivision-card-body { padding: 19px 21px 21px !important; }
.public-subdivisions .subdivision-card-body h3 { font-size: 20px !important; }
.public-subdivisions .subdivision-card-body p { min-height: 0 !important; }
.gis-cover-form { display: grid; grid-template-columns: 82px minmax(220px,1fr) auto; gap: 14px; align-items: center; margin: -5px 0 18px; padding: 12px 14px; border: 1px solid #deded6; border-radius: 12px; background: #fffdf9; }
.gis-cover-preview { width: 82px; height: 52px; border-radius: 8px; background: linear-gradient(135deg,#174d49,#0b3737) center/cover; }
.gis-cover-form label { display: grid; gap: 3px; font-size: 10px; }
.gis-cover-form label span { color: #7b8985; font-size: 8px; }
.gis-cover-form input { margin-top: 5px; font-size: 9px; }
.gis-cover-form button { margin: 0; }

/* Premium public-card microinteractions. */
@media (hover: hover) and (pointer: fine) {
  .public-card,
  .subdivision-card { position: relative; transition: transform .32s cubic-bezier(.2,.75,.25,1), box-shadow .32s ease, border-color .32s ease !important; will-change: transform; }
  .public-card:hover,
  .subdivision-card:hover { transform: translateY(-8px) !important; box-shadow: 0 24px 55px rgba(7,63,70,.16) !important; }
  .public-card .card-image,
  .subdivision-card .subdivision-plan { overflow: hidden; }
  .public-card .card-image:after,
  .subdivision-card .subdivision-plan:before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(115deg,transparent 20%,rgba(255,255,255,.18) 48%,transparent 72%); transform: translateX(-120%); transition: transform .65s ease; pointer-events: none; }
  .public-card:hover .card-image:after,
  .subdivision-card:hover .subdivision-plan:before { transform: translateX(120%); }
  .public-card .card-image { transition: filter .35s ease; }
  .public-card:hover .card-image { filter: saturate(1.08) contrast(1.03) brightness(1.025); }
  .subdivision-card .subdivision-plan img { transition: transform .55s cubic-bezier(.2,.75,.25,1),filter .35s ease; }
  .subdivision-card:hover .subdivision-plan img { transform: scale(1.055); filter: saturate(1.08); }
  .public-card .card-body h3,
  .subdivision-card .subdivision-card-body h3 { transition: transform .3s ease,color .3s ease; }
  .public-card:hover .card-body h3,
  .subdivision-card:hover .subdivision-card-body h3 { transform: translateX(4px); color: #0b5558; }
  .public-card .card-body strong,
  .subdivision-card .subdivision-card-body>strong { transition: color .3s ease,letter-spacing .3s ease; }
  .public-card:hover .card-body strong,
  .subdivision-card:hover .subdivision-card-body>strong { color: #ad8141; letter-spacing: .02em; }
}

@media (prefers-reduced-motion: reduce) {
  .public-card,
  .public-card *,
  .subdivision-card,
  .subdivision-card * { transition: none !important; animation: none !important; transform: none !important; }
}

/* Live territory map on the public home page. */
.territory-live { padding-top: 78px !important; padding-bottom: 78px !important; grid-template-columns: minmax(300px,.72fr) minmax(520px,1.28fr) !important; gap: clamp(45px,6vw,90px) !important; }
.territory-live .territory-copy h2 { font-size: clamp(38px,4vw,60px) !important; }
.territory-live .territory-copy>p:not(.overline) { max-width: 510px; font-size: 14px; }
.territory-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 26px 0 6px; }
.territory-highlights span { padding: 14px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.045); color: #a9c0ba; font-size: 8px; line-height: 1.4; }
.territory-highlights b { display: block; margin-bottom: 4px; color: #e0b675; font-size: 20px; }
.home-map-shell { overflow: hidden; border: 1px solid rgba(222,184,120,.3); border-radius: 18px; background: #fffdf9; box-shadow: 0 28px 70px rgba(0,25,29,.25); }
.home-map-heading,.home-map-foot { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #fffdf9; color: #153b38; }
.home-map-heading span { display: grid; gap: 3px; }
.home-map-heading small { color: #ad8141; font-size: 7px; letter-spacing: 1.4px; }
.home-map-heading b { font-size: 14px; }
.home-map-heading>i { color: #7d8b87; font-size: 8px; font-style: normal; }
#home-public-map { height: 440px; background: #e8eeeb; }
.home-map-foot { padding-block: 11px; border-top: 1px solid #e5e2da; font-size: 8px; }
.home-map-foot span { display: flex; align-items: center; gap: 6px; color: #71807c; }
.home-map-foot span i { width: 8px; height: 8px; border-radius: 50%; background: #d1a75f; box-shadow: 0 0 0 4px #d1a75f24; }
.home-map-foot a { color: #9b743a; font-weight: 800; text-decoration: none; }
.premium-property-pin { background: transparent !important; border: 0 !important; }
.premium-property-pin span { display: grid; place-items: center; width: 38px; height: 38px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: #d0a65f; color: #fff; box-shadow: 0 8px 20px rgba(7,63,70,.32); font-size: 14px; transform: rotate(-45deg); transition: transform .22s ease,background .22s ease; }
.premium-property-pin span:after { content: ""; display: block; width: 16px; height: 16px; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAABACAYAAACKhS4jAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAEPUlEQVRoge2Zz2/aZhjHXxJKgaSBZAklDVsypY0SqW2idGs1rZceuu1UaT310FN32Q7TTt1tf8BuU3vopLX7L6YtTVhVJbTdFhIgbUwEJphggyH8CGAwGPvtoSJ1wAZsnBhrfG9+/T7P+7Gf5/0NgArKxAIxqID61IBXSj14taRXGwAAADi2CtJRxNOsjskyNjtgtRtPiklU9R2WKRdhK5tk2LfV67DdIn1qDwkAXWcfwdBU0H7+ky+VgmpX+hHH7PlOneSS2IgSMFKl6bTRNHzDOM9xLOCqleZGBtOxAUlRA3w2Fgh94JibbmZEFzLM6QGr6hOcptPmWOHx7dXB4/TfMXwpt1/Jkbv3+WUk6jbGA//9YZu+ko8H1/8kUfeRNUlhP/pTKbdf7bRtUL9eSEURtJUNXcgwHMfCxK7nn72tZ1b+O8y7ciufwvN8n/kUTmHelVv8ehGfczQZ9ro7WdvIgs/G0WTE9/c9fhmJuo3x4PoSW2UEdz1slYHx4PpSfRQiW8++zafw/InBQwiPjDSYd+V2IU1QgtR1EopCO31DMfiaSNRtJFG3k2Wr7XAfSiwKJwYf8TnvFNJESQyQKRdhMux1M+Wi6EcU0kRDFI4VHt9eHSRDG8+b/e1sHE1inqdXAQAA8zy9mo2jSbG67UahY/iIz3mXypKif7tCU5Dwv/hNyJbwv3zSRhRuKw6Pb68OJkKbLo5jRRvPxIIk5llebPb3WkaBrUIy6F4WioIs+PDm0hSVJctiDVZoCuKI61EzaDlRCG/+NdsKvuUMq+vrd5gtNoPQu2wsSMR2XsxPzH3+nRT4c7OffUMga9cOyNC+0PuB4XFzX/+phVZ+ZC0PGJoChN/1YPjchYnJ+Zs+OT4mF77412qfHovtvPq9WinJcSEdPkMEogSydmli7voPtTKpCzDIm+TeRcF15YAMJaSytA1fKRUAgaz9MjIx8+HU4leva+U44npospxFpDSa2nvjjW6v/lx7nly4uWG1T5+N7bx8LCkKrTos5l25nsZ3sPoOhHmXL9cOjw4S4YwU+JpdOurHwptLRw4AMM/yYjaOkhGf8w6/XLEZFkdcjyr0+6WMXHgIISwX8yw/CjXVD5eKwdOFzJGlYyfwEPaO+7SnHrxaUuTsRW8wmYVGDPH65iFF2lXCidliM5gtth+V8CVFmk6bHrxakpXziV3P9zqdTsmjvKIcI1nwH1268ascO6X1/0ubVBTZ1RtMh2N1mToI2T6e/7RdezK08dw4OHKx9syxTGV4/MK4VA5Z8ANWu4N/uZADmKQIGkxnZobGJg8v4U5sG9hN6sGrJU3Dq36jB8C7q9FWW8E+feO5V1fAAyDvblfTaaNpeFXShs6nX6VZ/+VO/agCPz5z7Wsl/Gg6bTQN35A2pjOjjmTYt9XMqN9g7IohthF+aNRgGhq9KFS526TptOnBq6W3oG3TOB50OgwAAAAASUVORK5CYII='); background-size: contain; background-repeat: no-repeat; background-position: center; transform: rotate(45deg); }
.premium-property-pin:hover span { background: #0b5558; transform: rotate(-45deg) translate(2px,-2px) scale(1.08); }
.home-map-popup { display: grid; min-width: 190px; gap: 5px; padding: 3px; font-family: inherit; }
.home-map-popup small { color: #a77d3e; font-size: 8px; text-transform: uppercase; }
.home-map-popup b { color: #123b37; font-size: 13px; }
.home-map-popup span { color: #71807c; font-size: 10px; }
.home-map-popup a { margin-top: 5px; color: #9b743a; font-size: 9px; font-weight: 800; text-decoration: none; }
.home-map-shell .leaflet-popup-content-wrapper { border-radius: 11px; box-shadow: 0 12px 30px rgba(7,63,70,.2); }
.home-map-shell .leaflet-popup-content { margin: 12px 14px; }

@media (max-width: 1000px) {
  .territory-live { grid-template-columns: 1fr !important; }
  #home-public-map { height: 390px; }
}

@media (max-width: 1100px) {
  main header { gap: 10px; padding-inline: 22px; }
  main .content { padding: 26px 22px; }
  .metrics, .finance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gis-workspace, .editor-grid, .agenda-layout, .columns, .command-grid { grid-template-columns: 1fr !important; }
  .gis-detail { position: static !important; min-height: 0 !important; }
  .dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
  table { width: 100%; }
}

@media (max-width: 760px) {
  body:not(.public-page) main,
  body.sidebar-collapsed main { margin-left: 0 !important; width: 100% !important; }
  body:not(.public-page) .sidebar,
  body.sidebar-collapsed .sidebar {
    width: min(300px, 86vw) !important;
    padding: 22px 16px !important;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 18px 0 45px rgba(7, 63, 70, .22);
    z-index: 1002;
  }
  body.mobile-menu-open .sidebar { transform: translateX(0) !important; }
  body.mobile-menu-open { overflow: hidden; }
  body.mobile-menu-open .brand div,
  body.mobile-menu-open .sidebar nav a span,
  body.mobile-menu-open .user div { display: flex !important; }
  body.mobile-menu-open .sidebar nav a { justify-content: flex-start !important; padding: 11px 14px !important; font-size: 14px !important; }
  .sidebar-toggle { display: none !important; }
  .mobile-nav-toggle {
    position: fixed; left: 12px; top: 12px; z-index: 1004;
    width: 42px; height: 42px; border: 1px solid #d8dfdb; border-radius: 11px;
    background: #fffdf9; color: #153b38; box-shadow: 0 7px 22px rgba(21,59,56,.16);
    display: grid; place-items: center; font-size: 21px; cursor: pointer;
  }
  .mobile-nav-backdrop { position: fixed; inset: 0; z-index: 1001; background: rgba(6,42,44,.48); opacity: 0; visibility: hidden; transition: .2s; }
  body.mobile-menu-open .mobile-nav-backdrop { opacity: 1; visibility: visible; }
  main header { min-height: 64px; height: auto; padding: 10px 14px 10px 66px; flex-wrap: wrap; }
  main header .public-view { margin-left: auto; }
  main .content { padding: 20px 14px; }
  .welcome, .panel-title, .gis-head, .import-head, .agenda-compact-head { gap: 12px; align-items: flex-start !important; }
  .welcome { flex-direction: column; }
  .welcome h1, .gis-head h1, .import-head h1, .create-gis-page > section h1 { font-size: clamp(27px, 8vw, 36px) !important; }
  .metrics, .finance-metrics, .agenda-summary, .gis-summary, .access-matrix { grid-template-columns: 1fr 1fr !important; width: 100%; }
  .form-grid, .edit-grid { grid-template-columns: 1fr !important; }
  .form-grid .wide, .edit-grid .wide { grid-column: auto !important; }
  .actions, .edit-actions, .create-actions { flex-wrap: wrap; }
  .actions > *, .edit-actions > * { flex: 1 1 130px; text-align: center; }
  .modal { padding: 8px; align-items: start; }
  .dialog, .dialog.small { width: 100%; margin-block: 8px; padding: 22px 16px; border-radius: 14px; max-height: calc(100dvh - 16px); }
  #admin-map, #property-map, #gis-map, #import-map { min-height: 390px !important; height: 58dvh !important; max-height: 600px; }
  .gis-map-wrap { min-width: 0; }
  .gis-legend { left: 10px !important; right: 10px !important; top: 10px !important; gap: 6px !important; }
  .gis-picker { width: 100%; }
  .gis-picker label { align-items: stretch !important; flex-direction: column; }
  .gis-picker select { width: 100%; min-width: 0 !important; }
  .lot-numbers { grid-template-columns: 1fr 1fr !important; }
  .lot-numbers span:last-child { grid-column: 1 / -1; }
  .property-sort article { min-width: 0; }
  .client-table, .users-list, .finance-list, .property-list { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .client-table article { min-width: 520px; }
  .finance-row { min-width: 520px; }
  .users-list > article { min-width: 0; }
  .user-controls { grid-template-columns: 1fr 1fr !important; }
  .user-controls > * { min-width: 0; }
  .calendar-grid { min-width: 700px; }
  .calendar-shell, .calendar-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .toast { left: 14px !important; right: 14px !important; bottom: 14px; width: auto !important; text-align: center; }
  .public-lot-page .public-lot-head { padding: 22px 16px 14px !important; }
  .public-lot-page .public-lot-head h1 { font-size: clamp(27px, 9vw, 36px) !important; }
  .public-subdivisions { padding: 54px 18px !important; }
  .public-subdivisions .section-heading h2 { font-size: 32px !important; }
  .gis-cover-form { grid-template-columns: 64px 1fr; }
  .gis-cover-preview { width: 64px; height: 48px; }
  .gis-cover-form button { grid-column: 1 / -1; width: 100%; }
  .territory-live { padding: 58px 18px !important; }
  .territory-highlights { grid-template-columns: 1fr 1fr; }
  #home-public-map { height: 360px; }
  .home-map-heading>i { display: none; }
}

@media (max-width: 480px) {
  .metrics, .finance-metrics, .agenda-summary, .gis-summary { grid-template-columns: 1fr !important; }
  .panel-title { flex-direction: column; }
  .panel-title > button, .panel-title > a { width: 100%; text-align: center; }
  .property { grid-template-columns: 58px minmax(0, 1fr); padding-inline: 12px; }
  .management-strip { grid-template-columns: 1fr !important; }
  .lot-title { flex-direction: column; }
  .lot-numbers { grid-template-columns: 1fr !important; }
  .lot-numbers span:last-child { grid-column: auto; }
  .mobile-nav-toggle { width: 40px; height: 40px; }
  .leaflet-tooltip.gis-lot-label span { display: none !important; }
  .leaflet-tooltip.gis-lot-label { min-width: 38px; max-width: 54px; padding: 3px 4px !important; }
}

@media (hover: none) and (pointer: coarse) {
  button, .button, .primary, .outline, .mini-button, select { min-height: 44px; }
  input, textarea { font-size: 16px !important; }
}

.leaflet-tooltip.gis-street-label { background: #fffdf6ea; border: 1px solid #073f4626; box-shadow: 0 1px 3px #073f4659; color: #073f46; font-size: 10px; font-weight: 700; letter-spacing: .2px; padding: 2px 7px; border-radius: 3px; }
.leaflet-tooltip.gis-street-label::before { display: none !important; }
