﻿

:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --border: rgba(16, 42, 99, 0.12);
    --surface: rgba(255, 255, 255, 0.88);
    --blue-soft: #dbe9ff;
    --blue: #102a63;
    --orange: #ff7a00;
    --orange-dark: #cb5200;
    --ink: #12372d;
    --forest: #174d3b;
    --forest-deep: #0d3429;
    --leaf: #72904a;
    --lime: #d9e8a5;
    --cream: #f7f2e5;
    --paper: #fffdf7;
    --clay: #c9643d;
    --gold: #e4ad4d;
    --muted: #6d776f;
    --line: rgba(18,55,45,.16);
    --shadow: 0 22px 60px rgba(21,48,39,.13);
    --radius: 26px
}








.stat-icon {
    position: relative;
    display: block;
    width: 3.5rem;
    height: 3.5rem;
}

.factory-icon::before {
    content: "";
    position: absolute;
    inset: 1.35rem 0.35rem 0.35rem;
    background: var(--orange);
    clip-path: polygon(0 100%, 0 48%, 22% 48%, 22% 28%, 42% 48%, 42% 28%, 64% 48%, 100% 48%, 100% 100%);
}

.factory-icon::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    bottom: 0.35rem;
    width: 0.52rem;
    height: 3.1rem;
    background: linear-gradient(var(--orange), var(--orange-dark));
}

.gear-icon,
.people-icon {
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--blue) 0 12deg, transparent 12deg 27deg, var(--blue) 27deg 40deg, transparent 40deg 60deg, var(--blue) 60deg 74deg, transparent 74deg 92deg, var(--blue) 92deg 106deg, transparent 106deg 130deg, var(--blue) 130deg 145deg, transparent 145deg 166deg, var(--blue) 166deg 180deg, transparent 180deg 360deg);
}

    .gear-icon::after {
        content: "";
        position: absolute;
        inset: 1rem;
        border-radius: 50%;
        background: #fff;
    }

.people-icon {
    background: none;
}

    .people-icon::before,
    .people-icon::after {
        content: "";
        position: absolute;
        background: var(--orange);
    }

    .people-icon::before {
        left: 1rem;
        top: 0.35rem;
        width: 1.45rem;
        height: 1.45rem;
        border-radius: 50%;
        box-shadow: -1.2rem 0.42rem 0 -0.26rem var(--orange), 1.2rem 0.42rem 0 -0.26rem var(--orange);
    }

    .people-icon::after {
        left: 0.65rem;
        bottom: 0.35rem;
        width: 2.2rem;
        height: 1.9rem;
        border-radius: 1rem 1rem 0.25rem 0.25rem;
        box-shadow: -1.14rem 0.26rem 0 -0.35rem var(--orange), 1.14rem 0.26rem 0 -0.35rem var(--orange);
    }

.workspace {
    display: grid;
    grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
    gap: clamp(1rem, 2vw, 1.5rem);
    padding-top: clamp(1rem, 2vw, 1.5rem);
}

.panel {
    align-self: start;
    min-height: 35rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

    .panel h2 {
        margin-bottom: 0.75rem;
        font-size: 1.65rem;
        line-height: 1.05;
        letter-spacing: 0;
    }

.summary {
    color: var(--muted);
    line-height: 1.55;
}

.detail-list {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.detail-item {
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    background: #fff;
}

    .detail-item.proposed {
        border-left-color: var(--blue);
    }

    .detail-item strong {
        display: block;
        margin-bottom: 0.25rem;
    }

    .detail-item small {
        color: var(--muted);
        line-height: 1.45;
    }

.legend {
    display: grid;
    gap: 0.65rem;
    padding-top: 0rem;
    padding-left: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
}

    .legend span {
        display: flex;
        align-items: center;
        gap: 0.55rem;
    }

.pin-swatch {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

    .pin-swatch.orange {
        background: var(--orange);
    }

    .pin-swatch.blue {
        background: var(--blue);
    }

.area-swatch {
    width: 1.1rem;
    height: 0.8rem;
    border: 2px solid var(--orange);
    border-radius: 3px;
    background: var(--blue-soft);
}

.map-stage {
    position: relative;
    min-height: 38rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(0deg, rgba(255,255,255,0.8), rgba(255,255,255,0.45)), radial-gradient(circle at 70% 18%, rgba(255,122,0,0.13), transparent 21rem), radial-gradient(circle at 20% 82%, rgba(16,42,99,0.12), transparent 24rem);
    box-shadow: var(--shadow);
}

.map-toolbar {
    position: absolute;
    z-index: 10;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.45rem;
}

.map-toolbar1 {
    position: absolute;
    z-index: 10;
    top: 1rem;
    right: 1rem;
    top: 80%;
    display: flex;
    gap: 0.45rem;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--blue);
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(8, 27, 73, 0.12);
}

    .icon-button.active {
        color: #fff;
        background: var(--blue);
    }

.target-icon {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 0.28rem inset rgba(255,255,255,0.18);
}

.cube-icon {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid currentColor;
    transform: rotate(45deg) skew(-10deg, -10deg);
}

.label-icon {
    font-weight: 900;
    font-size: 0.84rem;
}

.map-scene {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: grid;
    place-items: center;
    perspective: 1200px;
}

#mapSvg {
    width: min(100%, 76rem);
    padding-bottom: 70px;
    height: auto;
    max-height: 88vh;
    overflow: visible;
    transition: transform 280ms ease;
}

    #mapSvg *:focus {
        outline: none;
    }

.map-scene.is-tilted #mapSvg {
    transform: rotateX(10deg) rotateZ(-1deg);
    transform-origin: center center;
}

.district-depth {
    fill: #d16500;
    opacity: 0.2;
    stroke: none;
}

.district-halo {
    fill: none;
    stroke: rgba(255, 122, 0, 0.78);
    stroke-linejoin: round;
    stroke-width: 10;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 16px rgba(255, 122, 0, 0.56)) drop-shadow(0 0 26px rgba(255, 122, 0, 0.32));
    transition: opacity 160ms ease;
}

    .district-halo.active {
        opacity: 1;
    }

.district {
    fill: url("#districtFill");
    stroke: var(--orange);
    stroke-width: 1.45;
    cursor: pointer;
    transition: fill 160ms ease, stroke-width 160ms ease, filter 160ms ease;
}

    .district.proposed-area {
        fill: url("#proposedFill");
    }

    .district.selected {
        fill: url("#selectedFill");
        stroke: #ff6f00;
        stroke-width: 2.7;
        filter: drop-shadow(0 8px 10px rgba(255, 122, 0, 0.22));
    }

.district-label {
    pointer-events: none;
    fill: var(--ink);
    font-size: 12px;
    font-weight: 800;
    paint-order: stroke;
    stroke: rgba(255,255,255,0.9);
    stroke-width: 4px;
    stroke-linejoin: round;
}

.labels-hidden .district-label {
    display: none;
}

.pin {
    cursor: pointer;
    filter: drop-shadow(0 8px 8px rgba(8, 27, 73, 0.22));
}

    .pin path {
        stroke: #fff;
        stroke-width: 2.4;
    }

    .pin circle {
        fill: #fff;
    }

    .pin.operational path {
        fill: var(--orange);
    }

    .pin.proposed path {
        fill: var(--blue);
    }

    .pin:hover {
        filter: drop-shadow(0 12px 12px rgba(8, 27, 73, 0.34));
    }

.tooltip {
    position: fixed;
    z-index: 30;
    max-width: 18rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 14px 40px rgba(8, 27, 73, 0.18);
    pointer-events: none;
    font-size: 0.88rem;
    font-weight: 700;
}

@media (max-width: 980px) {
    .map-hero,
    .workspace {
        grid-template-columns: 1fr;
    }

    .map-scene {
        width: 100%;
        height: 100%;
        min-height: inherit;
        display: grid;
        place-items: center;
        perspective: 1200px;
    }

    .map-hero {
        background-size: auto;
        background-position: center;
    }

    .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat {
        grid-template-columns: 1fr;
    }

    .map-stage,
    .panel {
        min-height: auto;
    }
}

@media (max-width: 680px) {
    .app-shell {
        padding: 0.75rem;
    }

    .map-scene {
        width: 100%;
        height: 100%;
        min-height: inherit;
        display: grid;
        place-items: center;
        perspective: 1200px;
    }

    .map-hero {
        padding: 1rem;
        min-height: 20rem;
        background-size: auto;
        background-position: center;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .workspace {
        gap: 0.75rem;
    }

    .panel {
        order: 2;
    }

    .map-stage {
        order: 1;
        min-height: 25rem;
    }

    #mapSvg {
        width: 100%;
        max-width: none;
    }
}
