.units-page { padding: 18px 0 36px; }
.units-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.units-head h1 { margin: 0; font-size: 28px; font-weight: 800; color: #0e4d30; }
.units-head p { margin: 4px 0 0; color: #5d7266; }
.unit-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.unit-stat { background: #fff; border: 1px solid #d7e6dc; border-radius: 12px; padding: 10px 14px; min-width: 120px; }
.unit-stat b { display: block; font-size: 22px; color: #157347; }
.unit-stat span { font-size: 12px; color: #5d7266; }
.units-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 14px; }
.units-card { background: #fff; border: 1px solid #d7e6dc; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(16, 40, 28, 0.05); }
.units-card h2 { margin: 0; padding: 12px 14px; font-size: 16px; background: #157347; color: #fff; }
.unit-map-wrap { position: relative; }
.unit-map-back {
    position: absolute;
    top: 12px;
    left: 52px;
    z-index: 500;
    border: 0;
    background: #0e4d30;
    color: #fff;
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(14, 77, 48, .28);
}
.unit-map-back[hidden] { display: none !important; }
#unitMap, #unitDetailMap { height: 560px; }
#unitDetailMap { background: #e7f2ea; }
#unitMap {
    background:
        radial-gradient(circle at 82% 12%, rgba(167, 243, 208, .7), transparent 42%),
        radial-gradient(circle at 8% 90%, rgba(191, 219, 254, .6), transparent 40%),
        linear-gradient(180deg, #f8fbff, #eef4fb);
}
#unitMap .leaflet-container { background: transparent; font-family: inherit; }
#unitMap .leaflet-overlay-pane svg { filter: drop-shadow(0 10px 16px rgba(14, 77, 48, .22)); }
.unit-dist-label { background: none !important; border: 0 !important; }
.unit-dist-label span {
    display: block;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.15;
    color: #0e4d30;
    text-align: center;
    text-shadow: 0 1px 0 #fff, 0 0 4px #fff;
    white-space: nowrap;
    pointer-events: none;
}
.units-filters { display: flex; gap: 8px; padding: 10px; }
.units-filters select, .units-filters input { border: 1px solid #d7e6dc; border-radius: 8px; padding: 8px 10px; width: 100%; }
.units-table-wrap { max-height: 460px; overflow: auto; }
.units-table { width: 100%; margin: 0; font-size: 13px; }
.units-table th { position: sticky; top: 0; background: #f3faf5; }
.units-table a { font-weight: 700; color: #157347; }
.unit-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.unit-detail table th { width: 38%; color: #0e4d30; }
.unit-photo { width: 100%; border-radius: 12px; max-height: 240px; object-fit: cover; background: #f3faf5; }
.infra-card { min-height: 190px; display: flex; align-items: center; justify-content: center; transition: transform .15s ease, box-shadow .15s ease; }
.infra-card p { margin-bottom: 4px; }
.infra-map-tag { display: inline-block; margin-top: 4px; background: #e7f6ec; color: #0e4d30; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 8px; }
a:hover .infra-card { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(21, 115, 71, 0.16); }
.unit-profile { position: fixed; inset: 0; z-index: 4000; }
.unit-profile[hidden] { display: none !important; }
.unit-profile-backdrop { position: absolute; inset: 0; background: rgba(14, 40, 28, .45); }
.unit-profile-panel {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100% - 28px));
    max-height: calc(100% - 28px);
    margin: 14px auto;
    overflow: auto;
    background: #f4f7f5;
    border-radius: 16px;
    padding: 18px 18px 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.unit-profile-close {
    position: sticky;
    top: 0;
    float: right;
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0e4d30;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.unit-profile-panel h2 { margin: 0 42px 12px 0; color: #0e4d30; font-size: 22px; }
.unit-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; clear: both; }
.unit-profile-card { background: #fff; border: 1px solid #d7e6dc; border-radius: 12px; padding: 12px; }
.unit-profile-card h3 { margin: 0 0 8px; color: #157347; font-size: 15px; }
.unit-profile-card table { width: 100%; font-size: 13px; }
.unit-profile-card th { width: 38%; color: #0e4d30; text-align: left; padding: 4px 8px 4px 0; vertical-align: top; }
.unit-profile-card td { padding: 4px 0; }
.unit-profile-bar { height: 12px; background: #e7f6ec; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.unit-profile-bar span { display: block; height: 100%; background: #16a34a; }
.unit-profile-done { display: inline-block; background: #dcfce7; color: #166534; border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 8px; }
.unit-profile-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.unit-profile-photos img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; background: #f3faf5; }
.unit-profile-photos figcaption { font-size: 12px; color: #5d7266; margin-top: 4px; }
.unit-profile-mini { height: 220px; margin-top: 10px; border-radius: 10px; }
.unit-profile-page { margin: 12px 0 0; }
.unit-profile-page a { font-weight: 700; color: #157347; }
.unit-profile-loading { margin: 24px 8px; color: #0e4d30; }
@media (max-width: 991px) {
    .units-layout, .unit-detail, .unit-profile-grid, .unit-profile-photos { grid-template-columns: 1fr; }
    #unitMap, #unitDetailMap { height: 360px; }
}
