/* ========================================
   대시보드 페이지 전용 스타일
   공통 스타일은 common.css 참조
   ======================================== */

.dashboard-section {
    display: grid;
    grid-template-rows: auto auto auto auto;
    row-gap: 20px;
    align-content: start;
}

.dashboard-section.section-1 {
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    order: 2;
}

.dashboard-section.section-2 {
    display: flex;
    flex-direction: column;
    order: 3;
    background: #CCEDDF;
    margin: -24px 0;
    box-sizing: border-box;
}

[data-theme="dark"] .dashboard-section.section-2 {
    background: rgba(5, 147, 118, 0.15);
}

.dashboard-section.section-3 {
    grid-template-columns: 1fr;
    order: 1;
}

/* ========================================
   재난안전 & 교통현황 카드 (대시보드 전용)
   ======================================== */
.disaster-card {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}


.disaster-content {
    background: var(--dashboard-card-content-bg);
    border-radius: 16px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.disaster-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: relative;
}

.disaster-grid::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
}

.disaster-grid::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

[data-theme="light"] .disaster-grid::before,
[data-theme="light"] .disaster-grid::after {
    background: rgba(0, 0, 0, 0.1);
}

.disaster-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 12px;
    background: transparent;
    border-radius: 12px;
}

.disaster-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
}

.disaster-icon img {
    width: 24px;
}

.disaster-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 55px;
}

.disaster-number {
    font-size: 22px;
    font-weight: 500;
    color: #00B541;
    line-height: 1.2;
}

.disaster-number small {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-left: 2px;
}

.disaster-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.traffic-card {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.traffic-content {
    background: var(--dashboard-card-content-bg);
    border-radius: 25px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.traffic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: relative;
}

.traffic-grid::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-50%);
}

.traffic-grid::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
}

[data-theme="light"] .traffic-grid::before,
[data-theme="light"] .traffic-grid::after {
    background: rgba(0, 0, 0, 0.1);
}

.traffic-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 12px;
    background: transparent;
    border-radius: 12px;
}

.traffic-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 147, 118, 0.12);
    flex-shrink: 0;
}

.traffic-icon img {
    width: 24px;
}

.traffic-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 55px;
}

.traffic-number {
    font-size: 22px;
    font-weight: 500;
    color: #1998FF;
    line-height: 1.2;
}

.traffic-number small {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-left: 2px;
}

.traffic-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.population-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 2px;
    margin-left: 10px;
    vertical-align: middle;
}

.toggle-btn {
    padding: 4px 14px;
    border-radius: 20px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-family: var(--paper);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #FFFFFF;
    color: var(--color-primary);
    font-weight: 600;
}

.detail-change {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-tertiary);
}

.detail-change.increase {
    color: #EF4444;
}

.detail-change.decrease {
    color: #3B82F6;
}

.population-change.increase {
    color: #EF4444;
}

.population-change.decrease {
    color: #3B82F6;
}

/* ========================================
   인구현황 카드 (대시보드 전용)
   ======================================== */
.population-card {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    overflow: visible;
    background: var(--color-primary);
    padding: 24px;
}

[data-theme="dark"] .population-card {
    background: rgba(5, 147, 118, 0.5);
}

.section-2 .population-card .card-header h3,
.section-2 .population-card .card-header .update-time {
    color: #FFFFFF;
}

.section-2 .indicator-card .card-header h3,
.section-2 .indicator-card .card-header .update-time {
    color: var(--dashboard-header-text);
}


.population-card .card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-height: 340px;
    overflow-y: auto;
}

.population-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: 20px;
    margin-bottom: 16px;
}

[data-theme="dark"] .population-main {
    background: var(--dashboard-card-content-bg);
}

[data-theme="dark"] .population-label {
    color: var(--text-tertiary);
}

[data-theme="dark"] .population-number {
    color: var(--text-primary);
}

[data-theme="dark"] .population-number small {
    color: var(--text-tertiary);
}

[data-theme="dark"] .detail-label {
    color: var(--text-tertiary);
}

[data-theme="dark"] .detail-value {
    color: var(--text-primary);
}

[data-theme="dark"] .detail-value small {
    color: var(--text-tertiary);
}

.population-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding:10px 0px;
}

.population-icon {
    width: 80px;
    height: 80px;
    background: var(--population-icon-bg);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.population-icon img {
    width: 48px;

}

.population-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.population-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 400;
}

.population-number {
    font-size: 30px;
    font-weight: 700;
    color: #1F2937;
    letter-spacing: -0.5px;
}

.population-number small {
    font-size: 16px;
    font-weight: 400;
    color: #6B7280;
    margin-left: 4px;
}

.population-change {
    font-size: 14px;
    color: #EF4444;
    font-weight: 300;
}

.population-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.population-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 16px;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.population-detail-item:last-child {
    border-right: none;
}

[data-theme="light"] .population-detail-item {
    border-right-color: rgba(0, 0, 0, 0.1);
}

.detail-label {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 400;
    text-align: center;
}

.detail-value {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    text-align: center;
}

.detail-value small {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-tertiary);
    margin-left: 3px;
}

.detail-value.increase::before {
    content: '▲ ';
    color: #10B981;
    margin-right: 4px;
    font-size: 12px;
}

.detail-value.decrease::before {
    content: '▼ ';
    color: #EF4444;
    margin-right: 4px;
    font-size: 12px;
}

/* ========================================
   지도 카드
   ======================================== */
.map-card {
    grid-column: 1 / 3;
    grid-row: 2 / 5;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}

.map-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.map-tab img {
    width: 20px;
    height: 20px;
}

.map-tab span {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-primary);
}

.map-container {
    flex: 1;
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: visible;
}

.andong-map {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.map-marker {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.marker-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--card-bg-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 16px;
    background: rgba(15, 23, 42, 0.9);
    padding: 12px 20px;
    border-radius: 12px;
}

[data-theme="light"] .map-legend {
    background: rgba(255, 255, 255, 0.9);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-icon {
    width: 32px;
    height: 32px;
}

.legend-icon img {
    width: 16px;
    height: 16px;
}

.legend-item span {
    font-size: 15px;
    color: var(--text-primary);
}

.legend-pause-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    margin-left: 8px;
}

[data-theme="light"] .legend-pause-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.legend-pause-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.legend-pause-btn img {
    width: 14px;
    height: 14px;
}

/* ========================================
   지도 영역 - 원본 스타일 적용
   ======================================== */
.map-area {
    flex: 1;
    position: relative;
}

.map-control-box {
    position: absolute;
    bottom: 40px;
    left: 0px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    z-index: 15;
}

.map-tab {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    position: relative;
    padding: 0;
}

.map-tab:hover {
    transform: scale(1.05);
}

.map-tab.active .tab-icon {
    background: #0BCE53;
}

.map-tab:not(.active) .tab-icon {
    background: #464f61;
}

/* 라이트 모드 */
[data-theme="light"] .tab-icon {
    background: #FFFFFF !important;
}

[data-theme="light"] .map-tab.active .tab-icon {
    background: #0BCE53 !important;
}

[data-theme="light"] .map-tab.active .tab-icon img {
    filter: brightness(0) invert(1);
}

.tab-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.tab-icon img.icon-default {
    width: 29px;
    height: 29px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.tab-icon img.icon-hover {
    width: 29px;
    height: 29px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-tab:hover .tab-icon img.icon-default,
.map-tab.active .tab-icon img.icon-default {
    opacity: 0;
}

.map-tab:hover .tab-icon img.icon-hover,
.map-tab.active .tab-icon img.icon-hover {
    opacity: 1;
}

.tab-label {
    font-size: 15px;
    font-weight: 3300;
    color: #8492A8 !important;
    font-family: var(--paper);
    white-space: nowrap;
    transition: color 0.3s ease;
    text-shadow: -1px -1px 0 #FFFFFF, 1px -1px 0 #FFFFFF, -1px 1px 0 #FFFFFF, 1px 1px 0 #FFFFFF;
}

.map-tab:hover .tab-label,
.map-tab.active .tab-label {
    color: #0BCE53 !important;
}

[data-theme="dark"] .tab-label {
    color: #CBD5E1 !important;
    text-shadow: none;
}

.map-pause-btn {
    background: #0BCE53;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-pause-btn:hover {
    transform: scale(1.05);
}

.pause-icon {
    width: 12px;
    height: 16px;
    position: relative;
}

/* 기본 상태 (자동 회전 중): 일시정지 아이콘 (II) */
.pause-icon::before,
.pause-icon::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 16px;
    background: white;
    border-radius: 2px;
    top: 0;
}

.pause-icon::before {
    left: 0;
}

.pause-icon::after {
    right: 0;
}

/* paused 상태 (일시정지됨): 재생 아이콘 (▶) */
.map-pause-btn.paused .pause-icon::before {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid white;
    border-radius: 0;
    left: 2px;
    top: 0;
    background: transparent;
}

.map-pause-btn.paused .pause-icon::after {
    display: none;
}

.map-legend-box {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
    font-family: var(--paper);
}

.map-legend-box .legend-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.legend-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.legend-icon-circle img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.legend-label {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    font-family: var(--paper);
    text-align: center;
}

/* SVG 맵 스타일 */
#svg-map {
    width: 493px;
    height: 560px;
    margin: 0 auto;
    position: relative;
}

#svg-map svg path:hover {
    stroke: var(--color-yellow);
    stroke-width: 5px;
}

#svg-map .ico-box {
    position: absolute;
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
    font-family: var(--paper);
    transform: translate(-50%, -50%);
}

#svg-map .ico-box .icon-container {
    position: absolute;
    top: -52px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

#svg-map .ico-box .icon {
    position: relative;
    width: 36px;
    height: 42px;
    font-size: 0;
    background-size: 100% 100%;
}

#svg-map .ico-box .location {
    display: block;
    color: #FFFFFF;
    font-family: var(--pretendard);
    font-weight: var(--fontweight-medium);
}

/* 녹전면 */
#svg-map .ico-box.el-1 {
    top: 14%;
    left: 58.6%;
}
/* 도산면 */
#svg-map .ico-box.el-2 {
    top: 13%;
    left: 73%;
}
/* 북후면 */
#svg-map .ico-box.el-3 {
    top: 26%;
    left: 42%;
}
/* 예안면 */
#svg-map .ico-box.el-4 {
    top: 27%;
    left: 83%;
}
/* 서후면 */
#svg-map .ico-box.el-5 {
    top: 36%;
    left: 40%;
}
/* 와룡면 */
#svg-map .ico-box.el-6 {
    top: 36%;
    left: 63%;
}
/* 풍산읍 */
#svg-map .ico-box.el-7 {
    top: 44%;
    left: 28%;
}
/* 임동면 */
#svg-map .ico-box.el-8 {
    top: 48%;
    left: 88%;
}
/* 안동시가지 */
#svg-map .ico-box.el-9 {
    top: 49.5%;
    left: 54%;
}
/* 풍천면 */
#svg-map .ico-box.el-10 {
    top: 55%;
    left: 15%;
}
/* 남후면 */
#svg-map .ico-box.el-11 {
    top: 56%;
    left: 36%;
}
/* 남선면 */
#svg-map .ico-box.el-12 {
    top: 60.5%;
    left: 56%;
}
/* 임하면 */
#svg-map .ico-box.el-13 {
    top: 60%;
    left: 73.5%;
}
/* 일직면 */
#svg-map .ico-box.el-14 {
    top: 68.5%;
    left: 37%;
}
/* 길안면 */
#svg-map .ico-box.el-15 {
    top: 80%;
    left: 85%;
}

/* 아이콘 배경 이미지 */
.icon {
    background-size: 100%;
    cursor: pointer;
    pointer-events: auto;
}

.icon.emer {
    background-image: url(/images/main/ico_emergency.png) !important;
}

.icon.rescue {
    background-image: url(/images/main/ico_rescue.png) !important;
}

.icon.burn {
    background-image: url(/images/main/ico_burn.png) !important;
}

.icon.etc {
    background-image: url(/images/main/ico_etc-1.png) !important;
}

.icon.accident {
    background-image: url(/images/main/legend-traffic-1.png) !important;
}

.icon.dig {
    background-image: url(/images/main/legend-traffic-2.png) !important;
}

.icon.event {
    background-image: url(/images/main/legend-traffic-3.png) !important;
}

.icon.etc-2 {
    background-image: url(/images/main/legend-traffic-4.png) !important;
}

/* 저수량 아이콘 */
.icon.over60 {
    background-image: url(/images/main/legend-reservoir-1.png) !important;
}

.icon.to5060 {
    background-image: url(/images/main/legend-reservoir-2.png) !important;
}

.icon.to4050 {
    background-image: url(/images/main/legend-reservoir-3.png) !important;
}

.icon.under40 {
    background-image: url(/images/main/legend-reservoir-4.png) !important;
}

.icon.drought {
    background-image: url(/images/main/legend-reservoir-5.png) !important;
}

/* 저수량 마커 */
.reservoir-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

.reservoir-marker img {
    width: 36px;
    height: 42px;
    object-fit: contain;
}

/* ========================================
   저수지 상세 팝업
   ======================================== */
.reservoir-popup-box {
    display: none;
    position: absolute;
    z-index: 100;
    background: var(--dashboard-card-bg);
    border-radius: 20px;
    padding: 28px 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    min-width: 320px;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    pointer-events: auto;
}

.reservoir-popup-box.active {
    display: block;
}

.reservoir-popup-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reservoir-popup-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--paper);
    margin: 0;
}

.reservoir-popup-close {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.reservoir-popup-close:hover {
    color: var(--text-primary);
}

[data-theme="light"] .reservoir-popup-box {
    background: #FFFFFF;
}

[data-theme="light"] .reservoir-graph-area,
[data-theme="light"] .reservoir-rate {
    background: #F3F4F6;
}

.reservoir-popup-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reservoir-graph-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    background: var(--dashboard-card-content-bg);
    border-radius: 12px;
}

.water-tank-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 auto;
}

.water-tank {
    position: relative;
    width: 100px;
    height: 200px;
    border: 3px solid #6AB4FD;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(106, 180, 253, 0.03), rgba(106, 180, 253, 0.08));
}

.water-level {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: url(/images/main/water.gif) center / cover no-repeat;
    border-radius: 0 0 11px 11px;
    overflow: hidden;
}

.water-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
}

.water-line.flood-line {
    top: 5%;
    border-top: 2px dashed #EF4444;
}

.water-line.full-line {
    top: 30%;
    border-top: 2px solid #475569;
}

.water-line.dead-line {
    top: 85%;
    border-top: 2px solid #94A3B8;
}

.water-labels-left {
    position: relative;
    width: 90px;
    margin-right: 10px;
    flex-shrink: 0;
    text-align: right;
}

.water-labels-right {
    position: relative;
    width: 90px;
    margin-left: 10px;
    flex-shrink: 0;
}

.water-label {
    position: absolute;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--paper);
    white-space: nowrap;
    transform: translateY(-50%);
}

.water-labels-left .water-label {
    right: 0;
}

.water-label em.red {
    color: #EF4444;
    font-style: normal;
    font-weight: 600;
}

.water-label.current-badge {
    position: absolute;
    top: 45%;
    left: 0;
    background: #3B82F6;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 10px;
    text-align: center;
    line-height: 1.3;
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    white-space: nowrap;
}

.water-label.current-badge strong {
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-top: 2px;
}

.reservoir-info-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reservoir-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--paper);
}

.reservoir-info-row .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.reservoir-info-row .dot.red { background: #EF4444; }
.reservoir-info-row .dot.dark { background: #475569; }
.reservoir-info-row .dot.gray { background: #94A3B8; }
.reservoir-info-row .dot.none { background: transparent; }

.reservoir-info-row .label {
    font-size: 14px;
    font-family: var(--paper);
    color: var(--text-secondary);
    min-width: 60px;
}

.reservoir-info-row .value {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--paper);
    color: var(--text-primary);
    margin-left: auto;
}

.reservoir-rate {
    margin-top: 16px;
    text-align: center;
    padding: 14px;
    background: var(--dashboard-card-content-bg);
    border-radius: 50px;
    font-size: 16px;
    color: var(--text-primary);
    font-family: var(--paper);
}

.reservoir-rate strong {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 18px;
}

/* ========================================
   재난안전 상세 툴팁
   ======================================== */
.disaster-tooltip {
    display: none;
    position: absolute;
    background: #FFFFFF;
    border-radius: 12px;
    padding: 0;
    width: 280px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid #E5E7EB;
    z-index: 1000;
    animation: tooltipFadeIn 0.2s ease;
    overflow: hidden;
    font-family: var(--paper);
}

.disaster-tooltip.active {
    display: block;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tooltip-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    font-size: 16px;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.tooltip-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #FFFFFF;
}

.tooltip-title {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    padding: 12px 16px;
    background: var(--color-primary);
    font-family: var(--paper);
}

.tooltip-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 16px;
}

.tooltip-info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
}

.tooltip-info-row:last-child {
    border-bottom: none;
}

.tooltip-label {
    font-size: 12px;
    font-weight: 500;
    color: #9CA3AF;
    min-width: 65px;
    flex-shrink: 0;
}

.tooltip-value {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    flex: 1;
    text-align: left;
}

.tooltip-value.status-progress {
    color: #EF4444;
    font-weight: 600;
}

.tooltip-value.status-complete {
    color: var(--color-primary);
    font-weight: 600;
}

.tooltip-arrow {
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    transform: translateX(-50%) rotate(45deg);
}

.tooltip-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px 12px;
    background: #F9FAFB;
}

.tooltip-page-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    font-size: 14px;
    color: #6B7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooltip-page-btn:hover {
    background: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-primary);
}

.tooltip-page-info {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

.tooltip-page-info {
    font-size: 14px;
    color: #64748B;
    font-family: var(--paper);
}

.tooltip-page-info strong {
    color: #0F172A;
    font-weight: 600;
}

/* ========================================
   공약 달성도 카드
   ======================================== */
.promise-card {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    overflow: visible;
}

.promise-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 4px;
    margin-bottom: 15px;
}

.promise-card .card-header h3 {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.promise-card .card-content {
    background: var(--dashboard-card-content-bg);
    border-radius: 25px;
    padding: 30px;
    box-sizing: border-box;
    max-height: 300px;
    overflow-y: auto;
}

.year-badge {
    padding: 6px 16px;
    background: linear-gradient(135deg, #07B594 0%, #059376 100%);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 200;
    color: #FFFFFF;
    cursor:default;
}

.promise-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.promise-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.promise-header {
    display: flex;
    align-items: center;
    min-width: fit-content;
}

.promise-name {
    width:110px;
    font-size: 15px;
    font-weight: 300;
    color: var(--text-primary);
    white-space: nowrap;
    font-family: var(--paper);
}

.promise-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.promise-bar {
    flex: 1;
    height: 16px;
    background: var(--promise-bar-bg);
    border-radius: 20px;
    overflow: hidden;
}

.promise-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    background: linear-gradient(90deg, #10B981 0%, #059669 100%);
}

.promise-total {
    width:50px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    min-width: 32px;
    text-align: right;
}

.promise-current {
    color: #10B981;
}

/* ========================================
   인구지표 카드
   ======================================== */
.indicator-card {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    overflow: visible;
    padding: 10px 24px 24px;
    flex: 1;
}

.indicator-card .card-content {
    padding: 0;
    max-height: 540px;
    overflow-y: auto;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.indicator-item {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: var(--paper);
    height:140px;
}

.indicator-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.indicator-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--dashboard-card-content-bg);
    border-radius: 25px 25px 0 0;
    flex: 1;
}

.indicator-icon-circle {
    width: 40px;
    height: 40px;
    background: var(--indicator-icon-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .indicator-icon-circle {
    background: rgb(33 154 130);
}

.indicator-icon-circle img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.indicator-title {
    font-size: 18px;
    color: var(--dashboard-text-white);
    font-weight: 500;
    text-align: center;
}

.indicator-number-box {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    padding: 14px 16px;
    background: var(--indicator-number-bg);
    border-radius: 0 0 25px 25px;
}

.indicator-number {
    font-size: 20px;
    font-weight: 500;
    color: #FFFFFF;
    letter-spacing: -0.5px;
}

.indicator-unit {
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
}

/* ========================================
   예산현황 카드
   ======================================== */
.budget-card {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    overflow: visible;
}

.budget-card .card-header {
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
}

.budget-card .card-content {
    background: var(--dashboard-card-content-bg);
    border-radius: 25px;
    padding: 25px;
    box-sizing: border-box;
    max-height: 280px;
    overflow-y: auto;
}

.budget-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.budget-chart-area {
    width: 160px;
    height: 120px;
    flex-shrink: 0;
    position: relative;
}

.budget-chart-area canvas {
    max-width: 100%;
    max-height: 100%;
}

.budget-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.budget-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--dashboard-text-white);
    font-weight: 300;
    font-family: var(--paper);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ========================================
   검색 키워드 순위 카드
   ======================================== */
.keyword-card {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
    overflow: visible;
}

.keyword-card .card-content {
    background: var(--dashboard-card-content-bg);
    border-radius: 25px;
    padding: 20px;
    box-sizing: border-box;
    height: 260px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.keyword-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.keyword-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-family: var(--paper);
    color: var(--text-tertiary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.keyword-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--text-primary);
}

.keyword-cloud {
    width: 100%;
    height: 180px;
}

.keyword-cloud span {
    font-family: var(--paper) !important;
}

.jqcloud-word {
    cursor: pointer;
    transition: all 0.3s ease;
}

.jqcloud-word:hover {
    transform: scale(1.1);
    text-shadow: 0 0 10px currentColor;
}

.jqcloud-word a {
    text-decoration: none !important;
}

/* ========================================
   민원현황 카드
   ======================================== */
.petition-summary-card {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    overflow: visible;
}

.petition-summary-card .card-content {
    background:var(--dashboard-card-content-bg);
    border-radius: 25px;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.petition-main-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 40px;
    position: relative;
}

.petition-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* cursor: pointer; */
}

.petition-icon-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    background: var(--population-icon-bg);
}

.petition-icon-badge img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.petition-month-label,
.petition-year-label {
    font-size: 16px;
    color: var(--dashboard-text-white);
    font-weight: 300;
}

.petition-number {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.petition-number.green {
    color: #10B981;
}

.petition-number.blue {
    color: #3B82F6;
}

.petition-number small {
    font-size: 16px;
    font-weight: 400;
    margin-left: 4px;
}

.petition-divider {
    width: 1px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.petition-note-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
}

.petition-note {
    font-size: 11px;
    color: #94A3B8;
    text-align: center;
    margin: 0;
    font-weight: 300;
}

/* ========================================
   민원분류별 처리현황 차트 카드
   ======================================== */
.petition-chart-card {
    grid-column: 1;
    grid-row: 3;
    min-height: 0;
    overflow: visible;
}

.petition-chart-card .card-content {
    background: var(--dashboard-card-content-bg);
    border-radius: 25px;
    padding: 25px;
    box-sizing: border-box;
}

.chart-wrapper {
    width: 100%;
    height: 250px;
    position: relative;
}

.chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

#petitionChart {
	cursor: pointer;
}

/* ================================
   저수지 팝업
================================ */
.reservoir-popup {
    position: absolute;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.reservoir-popup.active {
    display: block;
}

.reservoir-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reservoir-popup-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.reservoir-popup-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.reservoir-popup-close:hover {
    color: #3182F6;
}

.reservoir-popup-body {
    display: flex;
    gap: 24px;
}

/* 수위 현황 그래프 */
.reservoir-graph-section {
    flex-shrink: 0;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.graph-title {
    display: none;
}

.water-level-graph {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 240px;
    overflow: visible;
}

.water-container {
    position: relative;
    width: 90px;
    height: 210px;
    border: 3px solid #6AB4FD;
    border-radius: 10px;
    overflow: visible;
    background: linear-gradient(to bottom, rgba(106, 180, 253, 0.05), rgba(106, 180, 253, 0.1));
}

.water-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: url('/images/main/water.gif') no-repeat;
    background-size: cover;
    background-position: bottom center;
    height: 0%;
    max-height: 100%;
    transition: height 0.8s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    border-radius: 0 0 7px 7px;
    opacity: 0.85;
}

.water-marker {
    position: absolute;
    left: 3px;
    right: 3px;
    display: flex;
    align-items: center;
    z-index: 10;
}

.water-marker.flood-level { top: 0; }
.water-marker.full-level { top: 30%; }
.water-marker.dead-level { top: 70%; }

.marker-line {
    flex: 1;
    height: 2px;
    background: #EF4444;
}

.water-marker.flood-level .marker-line {
    background: transparent;
    border-top: 2px dashed #EF4444;
    height: 0;
}

.water-marker.full-level .marker-line { background: #475569; }
.water-marker.dead-level .marker-line { background: #94A3B8; }

.marker-label {
    position: absolute;
    right: -60px;
    font-size: 14px;
    font-weight: 300;
    color: var(--text-primary);
    white-space: nowrap;
}

.water-marker.flood-level .marker-label {
    color: #EF4444;
    font-weight: 600;
}

/* .water-marker.full-level .marker-label { color: #475569; } */

.water-level-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.flood { background: #EF4444; }
.legend-dot.full { background: #475569; }
.legend-dot.dead { background: #64748B; }

.legend-text {
    color: #888;
    flex: 1;
}

.legend-value {
    font-weight: 600;
    color: #333;
}

.water-rate {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rate-label {
    font-size: 14px;
    color: #888;
    margin-right: 4px;
}

.rate-value {
    font-size: 18px;
    font-weight: 700;
    color: #3182F6;
}

/* ================================
   저수지 팝업 (disaster-tooltip 내부용)
================================ */
.disaster-tooltip .reservoir-tooltip-content {
    display: block;
}

.disaster-tooltip .reservoir-tooltip-content .reservoir-graph-section {
    width: 100%;
}

.disaster-tooltip .reservoir-tooltip-content .water-level-graph {
    position: relative;
    min-height: 180px;
    padding: 12px;
}

.disaster-tooltip .reservoir-tooltip-content .water-container {
    width: 70px;
    height: 160px;
}

.disaster-tooltip .reservoir-tooltip-content .water-level-legend {
    margin-top: 8px;
}

.disaster-tooltip .reservoir-tooltip-content .legend-row {
    font-size: 11px;
}

.disaster-tooltip .reservoir-tooltip-content .water-rate {
    margin-top: 8px;
    padding: 8px;
}

/* 현재수위 표시 박스 */
.current-water-level {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 14px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
    text-align: center;
}

.current-water-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.current-water-value {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1;
}

/* 현황지표 토글 버튼 */
.indicator-period-toggle {
    display: flex;
    background: var(--dashboard-card-content-bg);
    border-radius: 25px;
    padding: 4px;
    font-family: var(--paper);
    margin-bottom: -6px;
}

.indicator-period-toggle .toggle-btn {
    padding: 4px 18px;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--paper);
}

.indicator-period-toggle .toggle-btn.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(5, 147, 118, 0.3);
}

.indicator-period-toggle .toggle-btn:hover:not(.active) {
    color: var(--color-primary);
}