:root {
    --background: #050b11;
    --panel: #07131d;
    --panel2: #0a1b28;
    --line: #1e4257;
    --text: #e7f7ff;
    --muted: #7f9bad;
    --cyan: #20d4ed;
    --blue: #328cff;
    --green: #36e47e;
    --yellow: #f0d83d;
    --orange: #ff8c3a;
    --red: #ff4b5f;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
    font: inherit;
}

.topbar {
    height: 74px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    background: linear-gradient(90deg, #06111a, #0d2b3d, #06111a);
    border-bottom: 1px solid var(--line);
}

.brand-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-content: center;
    gap: 5px;
    border: 1px solid #267b9d;
    border-radius: 7px;
    background: rgba(32, 212, 237, 0.08);
}

.brand-icon span {
    width: 27px;
    height: 3px;
    background: var(--cyan);
    box-shadow: 0 0 9px var(--cyan);
}

.brand-copy h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.18em;
}

.brand-copy p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.13em;
}

.platform-status {
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid #236746;
    border-radius: 20px;
    background: rgba(54, 228, 126, 0.08);
    color: #b9ffd5;
    font-size: 10px;
    letter-spacing: 0.1em;
}

.status-light {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 9px var(--green);
}

.clock {
    width: 180px;
    text-align: right;
    color: #9cc0d4;
    font-family: monospace;
    font-size: 12px;
}

.layout {
    height: calc(100% - 104px);
    display: grid;
    grid-template-columns: 280px minmax(500px, 1fr) 320px;
}

.sidebar {
    overflow-y: auto;
    background: rgba(7, 19, 29, 0.98);
}

.left-sidebar {
    border-right: 1px solid var(--line);
}

.right-sidebar {
    border-left: 1px solid var(--line);
}

.sidebar section {
    padding: 17px;
    border-bottom: 1px solid rgba(30, 66, 87, 0.75);
}

.sidebar h2 {
    margin: 0 0 13px;
    color: #87d3eb;
    font-size: 10px;
    letter-spacing: 0.14em;
}

.sidebar h3 {
    margin: 0;
    font-size: 16px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
}

input,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #28516a;
    border-radius: 4px;
    outline: 0;
    background: #06131e;
    color: var(--text);
}

input:focus,
select:focus {
    border-color: var(--cyan);
}

button {
    padding: 9px 11px;
    border: 1px solid #2b7392;
    border-radius: 4px;
    background: linear-gradient(#174059, #0b293b);
    color: var(--text);
    cursor: pointer;
}

button:hover {
    border-color: var(--cyan);
}

.search-results {
    margin-top: 12px;
    color: var(--muted);
    font-size: 11px;
}

.search-result {
    padding: 9px 0;
    border-bottom: 1px solid #17364a;
    cursor: pointer;
}

.search-result strong,
.search-result span {
    display: block;
}

.search-result span {
    margin-top: 3px;
    color: var(--muted);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 11px 0;
    color: #c6dbe6;
    font-size: 12px;
}

.check-row input {
    width: auto;
    accent-color: var(--cyan);
}

.legend-row {
    margin: 9px 0;
    color: #b5ccd8;
    font-size: 11px;
}

.dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 8px;
    border-radius: 50%;
}

.green {
    background: var(--green);
}

.yellow {
    background: var(--yellow);
}

.orange {
    background: var(--orange);
}

.red {
    background: var(--red);
}

.gray {
    background: #738696;
}

.center {
    position: relative;
    min-width: 0;
}

.stats {
    height: 72px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: #07131d;
    border-bottom: 1px solid var(--line);
}

.stats div {
    padding: 12px 14px;
    border-right: 1px solid #19374a;
}

.stats small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.08em;
}

.stats strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

#map {
    position: absolute;
    top: 72px;
    right: 0;
    bottom: 0;
    left: 0;
    background: #03080d;
}

.leaflet-container {
    background: #03080d;
}

.leaflet-tile {
    filter:
        brightness(0.52)
        saturate(0.3)
        contrast(1.3)
        hue-rotate(165deg);
}

.map-buttons {
    position: absolute;
    z-index: 800;
    top: 87px;
    right: 14px;
    display: flex;
    gap: 5px;
}

.map-buttons button {
    padding: 7px 9px;
    font-size: 9px;
}

.map-status {
    position: absolute;
    z-index: 800;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 9px 16px;
    border: 1px solid #286987;
    border-radius: 18px;
    background: rgba(4, 17, 26, 0.92);
    color: #bdeeff;
    font-size: 11px;
}

dl {
    margin: 0;
    display: grid;
    grid-template-columns: 105px 1fr;
    gap: 9px 10px;
    font-size: 11px;
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.health-state {
    margin-bottom: 15px;
    padding: 11px;
    border: 1px solid #30495a;
    border-radius: 4px;
    color: #8297a5;
    font-size: 11px;
}

footer {
    height: 30px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    background: #050f17;
    color: #6f91a5;
    font-size: 9px;
    letter-spacing: 0.06em;
}

.facility-marker {
    width: 11px;
    height: 11px;
    border: 1px solid #e2fcff;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 9px var(--cyan);
}

@media (max-width: 1050px) {
    .layout {
        grid-template-columns: 230px minmax(400px, 1fr) 270px;
    }

    .stats strong {
        font-size: 16px;
    }
}

select:active,
select:focus,
input:focus,
button:active {
    box-shadow: 0 0 0 2px rgba(32, 212, 237, 0.22);
}

.check-row:hover,
.legend-row:hover {
    color: #ffffff;
}

.control-feedback-active {
    border-color: #20d4ed !important;
}

/* SATELLITE BASEMAP FIX */
.leaflet-tile-pane .leaflet-tile {
    filter: none !important;
}

.leaflet-control-layers {
    background: rgba(5, 17, 26, 0.94);
    color: #e7f7ff;
    border: 1px solid #2b7392;
}

.leaflet-control-layers label {
    color: #e7f7ff;
}

.leaflet-control-layers-separator {
    border-top-color: #2b5268;
}

/* GLOBAL FIBER CLEAN SATELLITE DISPLAY */
.leaflet-tile {
    filter: none !important;
}

.leaflet-tile-pane {
    opacity: 1 !important;
}

.leaflet-overlay-pane {
    z-index: 450;
}

.leaflet-marker-pane {
    z-index: 650;
}

.leaflet-tooltip-pane {
    z-index: 700;
}

.leaflet-control-layers {
    max-width: 220px;
    background: rgba(4, 15, 24, 0.92);
    color: #eaf9ff;
    border: 1px solid #39718d;
    font-size: 11px;
}

.leaflet-control-layers label {
    color: #eaf9ff;
}

.leaflet-control-attribution {
    background: rgba(4, 15, 24, 0.72) !important;
    color: #d6e8f2 !important;
}

.leaflet-control-attribution a {
    color: #9edfff !important;
}

.leaflet-tooltip {
    background: rgba(4, 15, 24, 0.95);
    color: #ffffff;
    border: 1px solid #58bfdc;
    box-shadow: none;
}
