#datacenter-wrapper {
    position: relative;
    height: 120svh;
    background-color: #F1F1F1;
}
#datacenter-sticky {
    position: sticky;
    top: 0;
    z-index: 1;
}
#datacenter-charts {
    width: 100%;
    height: 800px;
    max-height: 100svh;
    background-color: #F7F7F7;
}
#datacenter-layer-controls {
    position: absolute;
    top: 20px;
    right: 360px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.layer-control-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.layer-control-label {
    flex-shrink: 0;
}
.layer-control-switch {
    margin-left: auto;
    font-size: 12px;
    color: #666666;
}
.layer-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.layer-dot--datacenter {
    background-color: #1D5BD0;
}
.layer-dot--substation {
    background-color: #F0A73F;
    border-radius: 2px;
    transform: rotate(45deg);
}
.substation-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #eeeeee;
    font-size: 12px;
    color: #666666;
}
.substation-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.substation-legend-diamond {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 2px;
    transform: rotate(45deg);
}
.substation-legend-diamond--high {
    background-color: #FF5562;
}
.substation-legend-diamond--mid {
    background-color: #F0A73F;
}
.substation-legend-diamond--low {
    background-color: #59CEEE;
}
.datacenter-switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}
.datacenter-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}
.datacenter-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.datacenter-switch-track {
    position: absolute;
    inset: 0;
    background-color: #cccccc;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}
.datacenter-switch-track::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.datacenter-switch input:checked + .datacenter-switch-track {
    background-color: #FF5562;
}
.datacenter-switch input:checked + .datacenter-switch-track::before {
    transform: translateX(16px);
}
.datacenter-switch input:focus-visible + .datacenter-switch-track {
    outline: 2px solid #1D5BD0;
    outline-offset: 2px;
}
#dc-metric-select-wrapper {
    position: absolute;
    right: 375px;
    bottom: 76px;
    z-index: 10;
}
#dc-metric-select {
    font-size: 14px;
    color: #969696;
    border: none;
    cursor: pointer;
    padding: 2px 0;
    border-radius: 3px;
}
#datacenter-box {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 320px;
    max-height: calc(100% - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    padding: 20px;
    font-size: 13px;
    box-sizing: border-box;
    color: #333333;
}
.dc-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.dc-stats-title {
    font-size: 18px;
    font-weight: 700;
}
.dc-stats-badge {
    background: #1D5BD0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
}
.dc-stats-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-bottom: 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eeeeee;
}
.dc-stats-summary-item:nth-child(3) {
    flex-basis: 100%;
}
.dc-stats-summary-label {
    color: #969696;
    font-size: 12px;
    margin-bottom: 4px;
}
.dc-stats-summary-value {
    font-size: 22px;
    font-weight: 700;
}
.dc-stats-summary-unit {
    font-size: 12px;
    font-weight: 400;
    color: #969696;
    margin-left: 2px;
}
.dc-stats-summary-pct {
    font-size: 12px;
    font-weight: 400;
    color: #969696;
    margin-left: 6px;
}
.dc-stats-table-header {
    display: grid;
    grid-template-columns: 64px 1fr 32px;
    gap: 8px;
    align-items: center;
    color: #969696;
    font-size: 12px;
    padding-bottom: 8px;
}
.dc-stats-col-count {
    text-align: right;
}
.dc-stats-sort-arrow {
    font-size: 10px;
}
.dc-stats-row {
    display: grid;
    grid-template-columns: 64px 48px 1fr 32px;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
}
.dc-stats-city {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dc-stats-bar-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.dc-stats-bar {
    height: 8px;
    border-radius: 4px;
    background: #FF5562;
    flex-shrink: 0;
}
.dc-stats-value {
    color: #666666;
    white-space: nowrap;
}
.dc-stats-count {
    text-align: right;
}
.dc-detail-card {
    padding: 12px 0;
    border-bottom: 1px solid #eeeeee;
}
.dc-detail-card:last-child {
    border-bottom: none;
}
.dc-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.dc-detail-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.dc-detail-badge--operational {
    background: #1D5BD0;
    color: #ffffff;
}
.dc-detail-badge--inactive {
    background: #e5e5e5;
    color: #666666;
}
.dc-detail-badge--type {
    background: #EEF2FA;
    color: #5B6B8C;
}
.dc-detail-name-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}
.dc-detail-name {
    font-weight: 700;
}
.dc-detail-operator {
    color: #969696;
    font-size: 12px;
}
.dc-detail-stats {
    display: flex;
    gap: 24px;
}
.dc-detail-stat-label {
    color: #969696;
    font-size: 12px;
    margin-bottom: 2px;
}
.dc-detail-stat-value {
    font-size: 16px;
    font-weight: 700;
}
.dc-detail-stat-value--undisclosed {
    color: #d23a3a;
    font-size: 14px;
}
.dc-detail-unit {
    font-size: 12px;
    font-weight: 400;
    color: #969696;
}
.dc-detail-empty {
    color: #969696;
    padding: 24px 0;
    text-align: center;
}
.dc-detail-footnote {
    position: sticky;
    padding: 6px 0 10px;
    bottom: -24px;
    color: #969696;
    border-top: 1px solid #eeeeee;
    background-color: #ffffff;
    font-size: 11px;
}