/* history.css — 강우 이력 조회 페이지 (본 모니터 팔레트 준수) */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #eef1f5;
    color: #2c3e50;
    padding: 16px;
}
.hx-container { max-width: 1280px; margin: 0 auto; }

/* 헤더 */
.hx-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 6px 4px 14px;
    flex-wrap: wrap;
}
.hx-title { font-size: 24px; font-weight: 700; color: #2c3e50; }
.hx-sub { font-size: 14px; color: #7f8c8d; }
.hx-back {
    margin-left: auto;
    font-size: 13px;
    color: #2980b9;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #d6dde4;
    border-radius: 8px;
    background: #fff;
}
.hx-back:hover { background: #f4f8fb; }

/* 컨트롤 바 */
.hx-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e8ec;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.hx-ctl-group { display: flex; align-items: center; gap: 8px; }
.hx-nav {
    width: 34px; height: 34px;
    border: 1px solid #d6dde4;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #34495e;
}
.hx-nav:hover:not(:disabled) { background: #f0f4f8; }
.hx-nav:disabled { opacity: .4; cursor: default; }
.hx-date {
    font-family: inherit;
    font-size: 15px;
    padding: 6px 10px;
    border: 1px solid #d6dde4;
    border-radius: 8px;
    color: #2c3e50;
}
.hx-dow { font-size: 14px; color: #7f8c8d; font-weight: 500; }
.hx-lbl { font-size: 14px; color: #7f8c8d; font-weight: 600; }
.hx-select {
    font-family: inherit;
    font-size: 15px;
    padding: 6px 12px;
    border: 1px solid #d6dde4;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
}

/* 본문 2열 */
.hx-main {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 14px;
    align-items: start;
}
.hx-card {
    background: #fff;
    border: 1px solid #e5e8ec;
    border-radius: 10px;
    padding: 16px 18px;
}
.hx-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f2f5;
}
.hx-iv-name { color: #2980b9; }

/* 구간별 최대 표 */
.hx-peak-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hx-peak-table th {
    text-align: left;
    color: #95a5a6;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 8px;
    border-bottom: 1px solid #eef1f5;
}
.hx-peak-table td { padding: 8px 8px; border-bottom: 1px solid #f4f6f9; }
.hx-peak-table tr.is-active td { background: #f4f9ff; }
.hx-peak-table tr.clickable { cursor: pointer; }
.hx-peak-table tr.clickable:hover td { background: #f7fafd; }
.pk-iv { font-weight: 600; color: #34495e; }
.pk-val { font-weight: 700; color: #d35400; font-size: 15px; white-space: nowrap; }
.pk-name { color: #2c3e50; }
.pk-dist { color: #95a5a6; font-size: 11px; }
.pk-time { color: #7f8c8d; font-size: 13px; white-space: nowrap; }
.pk-none { color: #bdc3c7; }

/* 강우강도 배지 (시간당 기준) */
.intensity {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 6px;
    margin-left: 6px;
    vertical-align: middle;
}
.intensity.lv1 { background: #eaf4fb; color: #2980b9; }   /* 보통 3~15 */
.intensity.lv2 { background: #fff3e0; color: #e67e22; }   /* 강한 15~30 */
.intensity.lv3 { background: #fdecea; color: #c0392b; }   /* 매우강한 30+ */

/* 시간대별 차트 */
.hx-chart-wrap { position: relative; height: 240px; margin-bottom: 4px; }
.hx-hint { font-size: 12px; color: #95a5a6; margin-bottom: 14px; }

/* 순위 표 */
.hx-rank-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin: 8px 0 10px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}
.hx-rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hx-rank-table th {
    text-align: left;
    color: #95a5a6;
    font-weight: 600;
    font-size: 12px;
    padding: 5px 8px;
    border-bottom: 1px solid #eef1f5;
}
.hx-rank-table td { padding: 7px 8px; border-bottom: 1px solid #f4f6f9; }
.rk-rank { color: #3498db; font-weight: 700; width: 40px; }
.rk-name { color: #2c3e50; }
.rk-dist { color: #95a5a6; font-size: 11px; }
.rk-val { color: #d35400; font-weight: 700; text-align: right; }

.hx-empty {
    color: #bdc3c7;
    font-size: 13px;
    text-align: center;
    padding: 24px 0;
}
.hx-status { font-size: 12px; color: #b0b8c0; text-align: right; padding: 10px 4px 0; }

/* 반응형 */
@media (max-width: 820px) {
    .hx-main { grid-template-columns: 1fr; }
    .hx-chart-wrap { height: 200px; }
}
