/* Extracted from app.css for route-specific maintainability. */
/* KPI 현장별 통계 (/stat/site) — 목업(컨트롤 바·요약·순위 카드) */
.kpi-ctrl-bar {
    background: #ffffff;
    border-bottom: 0.5px solid #e8eaed;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    box-sizing: border-box;
    width: 100%;
}
.kpi-ctrl-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.kpi-ctrl-label {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}
.kpi-ctrl-divider {
    width: 0.5px;
    height: 16px;
    background: #e5e7eb;
    flex-shrink: 0;
}
.kpi-site-panel-body {
    padding: 10px 10px 16px;
    box-sizing: border-box;
    width: 100%;
    position: relative;
}
.kpi-site-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}
.kpi-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px 8px;
    box-sizing: border-box;
}
.kpi-sec-title {
    display: flex;
    align-items: center;
    gap: 6px;
}
.kpi-sec-title-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kpi-sec-title-text {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}
.kpi-sec-period {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}
.kpi-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 2px;
    width: 100%;
}
.kpi-summary-card {
    background: #ffffff;
    border-radius: 10px;
    border: 0.5px solid #e5e7eb;
    padding: 10px 12px;
    box-sizing: border-box;
}
.kpi-summary-card-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
}
.kpi-summary-card-numrow {
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.kpi-summary-card-num {
    font-size: 20px;
    font-weight: 500;
    color: #111827;
    line-height: 1.1;
}
.kpi-summary-card-unit {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}
.kpi-summary-card-sub {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
}
.kpi-summary-card-zone {
    font-size: 16px;
    font-weight: 500;
    color: #5b21b6;
    line-height: 1.2;
}
.kpi-rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.kpi-rank-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
    padding: 20px 8px;
}
.kpi-rank-card {
    background: #ffffff;
    border-radius: 10px;
    border: 0.5px solid #e5e7eb;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
}
.kpi-rank-card--top1 {
    border: 0.5px solid #fde68a;
    background: #fffbeb;
}
.kpi-rank-card--top1 .kpi-rank-name {
    color: #92400e;
}
.kpi-rank-card--top1 .kpi-rank-count-btn {
    color: #b45309;
}
.kpi-rank-num {
    font-size: 13px;
    font-weight: 500;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.2;
}
.kpi-rank-num--1 {
    color: #f59e0b;
}
.kpi-rank-num--2 {
    color: #9ca3af;
}
.kpi-rank-num--3 {
    color: #b45309;
}
.kpi-rank-num--n {
    color: #d1d5db;
}
.kpi-rank-info {
    flex: 1;
    min-width: 0;
}
.kpi-rank-name {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.kpi-rank-bar-row {
    display: flex;
    align-items: center;
    gap: 7px;
}
.kpi-rank-bar-wrap {
    flex: 1;
    height: 5px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    min-width: 0;
}
.kpi-rank-bar {
    height: 100%;
    border-radius: 3px;
    min-width: 0;
}
.kpi-rank-tag {
    font-size: 10px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.kpi-rank-tag--yg {
    background: #ede9fe;
    color: #5b21b6;
}
.kpi-rank-tag--su {
    background: #e8f0fe;
    color: #1a56db;
}
.kpi-rank-tag--def {
    background: #f3f4f6;
    color: #64748b;
}
.kpi-rank-count-wrap {
    flex-shrink: 0;
    min-width: 44px;
    text-align: right;
}
.kpi-rank-count-btn {
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #1a2744;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
    text-align: right;
    width: 100%;
}
.kpi-rank-count-btn:hover {
    text-decoration: underline;
}

/* 구역별 통계 (/stat/region) — 목업 톤 */
.regstat-page {
    background: #f4f5f7;
    min-height: 60vh;
    padding: 10px 10px 20px;
    box-sizing: border-box;
}
.regstat-filter-bar {
    background: #ffffff;
    border-bottom: 0.5px solid #e8eaed;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    box-sizing: border-box;
    margin-bottom: 8px;
    border-radius: 0;
}
.regstat-filter-dd {
    flex: 1 1 160px;
    min-width: 0;
    font-size: 12px;
}
#region-stat-area-dropdown.regstat-filter-dd {
    flex: 1 1 170px !important;
    min-width: 170px !important;
}
#region-stat-period-dropdown.regstat-filter-dd {
    flex: 0 0 150px !important;
    min-width: 150px !important;
    max-width: 190px !important;
}
@media (min-width: 769px) {
    .regstat-filter-dd {
        min-width: 180px;
    }
    .regstat-filter-dd .Select-control {
        min-height: 40px !important;
        height: 40px !important;
        border-radius: 9px !important;
    }
    .regstat-filter-dd .Select-placeholder,
    .regstat-filter-dd .Select-value-label,
    .regstat-filter-dd .Select-input > input {
        font-size: 13px !important;
        line-height: 38px !important;
    }
    .regstat-filter-dd .Select-arrow-zone,
    .regstat-filter-dd .Select-clear-zone {
        width: 28px !important;
        line-height: 38px !important;
    }
}
.regstat-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 2px 6px;
    box-sizing: border-box;
}
.regstat-sec-title {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}
.regstat-sec-sub {
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
}
.regstat-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}
.regstat-kpi-card {
    background: #ffffff;
    border-radius: 11px;
    border: 0.5px solid #e5e7eb;
    padding: 12px 13px;
    box-sizing: border-box;
}
.regstat-kpi-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.regstat-kpi-badge {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}
.regstat-kpi-badge--good {
    background: #dcfce7;
    color: #166534;
}
.regstat-kpi-badge--warn {
    background: #fef9c3;
    color: #854d0e;
}
.regstat-kpi-badge--over {
    background: #dbeafe;
    color: #1e40af;
}
.regstat-kpi-main {
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 4px;
}
.regstat-kpi-main--sm {
    font-size: 17px;
}
.regstat-kpi-sub {
    font-size: 10px;
    color: #9ca3af;
}
.regstat-kpi-blue {
    color: #1a56db;
}
.regstat-kpi-green {
    color: #059669;
}
.regstat-kpi-amber {
    color: #d97706;
}
.regstat-kpi-purple {
    color: #7c3aed;
}
.regstat-chart-card {
    background: #ffffff;
    border-radius: 11px;
    border: 0.5px solid #e5e7eb;
    padding: 12px 10px 10px;
    box-sizing: border-box;
    margin-bottom: 8px;
}
.regstat-chart-title {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}
.regstat-note-box {
    background: #ffffff;
    border-radius: 11px;
    border: 0.5px solid #e5e7eb;
    padding: 11px 13px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    box-sizing: border-box;
}
.regstat-note-item {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
    padding-left: 10px;
    position: relative;
}
.regstat-note-item::before {
    content: "*";
    position: absolute;
    left: 0;
    color: #9ca3af;
}
