@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,400;1,600&display=swap');

body {
    background-color: #f6f8fa !important;
    font-family: "Sarabun", sans-serif !important;
    font-size: 14px !important;
    font-weight: normal;
    font-style: normal;
    letter-spacing: normal;
    color: #000 !important;
    word-wrap: break-word;
}

.ti {
    font-size: 18px !important;
}

.footer-main {
    margin-top: 48px;
    padding: 22px 0 40px;
    border-top: 1px solid #e2e6ea;
    font-size: 14px;
}

.faint {
    color: #8a929c;
}

.header-section {
    margin-top: 100px;
    margin-bottom: 15px;
}

.main-title {
    font-size: 24px;
    font-weight: 700;
    color: #001229;
    margin: 0 0 10px 0;
}

.sub-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.stats-container {
    display: flex;
    gap: 20px;
    padding: 15px 0px;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    flex: 1;
    min-width: 250px;
    box-shadow: 0 1px 3px rgba(27, 31, 36, .07), 0 1px 2px rgba(27, 31, 36, .04);
}

/* Card สีเข้ม */
.stat-card-highlight {
    background: linear-gradient(135deg, #704020 0%, #302010 100%);
    color: #fff;
    border: none;
}

.stat-label {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.stat-value {
    font-size: 25px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-sub {
    font-size: 14px;
    opacity: 0.8;
}

.stat-card:not(.stat-card-highlight) .stat-label {
    color: #666;
}

.stat-card:not(.stat-card-highlight) .stat-value {
    color: #000;
}

.stat-card:not(.stat-card-highlight) .stat-sub {
    color: #555;
}

.treemap-header,
.budget-header {
    margin-bottom: 15px;
}

.treemap-title {
    font-size: 16px;
    font-weight: 700;
    color: #001229;
    margin-bottom: 5px;
}

.treemap-meta {
    font-size: 14px;
    color: #555;
    margin: 0;
}

.treemap-container,
.budget-card {
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(27, 31, 36, .07), 0 1px 2px rgba(27, 31, 36, .04);
}

.highcharts-container text {
    font-family: 'Sarabun', sans-serif !important;
}

.highcharts-data-label text {
    font-family: 'Sarabun', sans-serif !important;
}

.highcharts-title {
    font-family: 'Sarabun', sans-serif !important;
}

.budget-list {
    margin-top: 15px;
}

.budget-item {
    display: grid;
    grid-template-columns: 200px 1fr 120px 55px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.budget-name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.budget-name span {
    font-size: 13.5px;
    font-weight: 500;
    color: #222;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

}

.budget-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2ca8c2;
    color: #fff;
    font-size: 13px;
    font-weight: bold;

}

.budget-icon.has-img {
    background: transparent !important; 
    overflow: hidden;
}

.budget-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.budget-name img {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    object-fit: cover;

}

.budget-progress {
    width: 100%;
}

.progress {
    height: 9px !important;
    margin: 0 !important;
    background: #edf1f5 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.progress-bar {
    background: #FBB801 !important;
    border-radius: 20px !important;
}

.budget-value {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    text-align: right;
    white-space: nowrap;
}

.budget-percent {
    text-align: right;
    font-size: 13px;
    color: #7f8ca5;

}



@media (max-width: 768px) {
    .budget-item {
        grid-template-columns: 1fr 100px 90px;
        gap: 7px;
    }

    .budget-value {
        font-size: 12px;
    }

    .budget-percent {
        display: none;
    }

}