
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #334155;
    line-height: 1.5;
}


.premium-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.premium-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}


.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #172554 100%);
    padding: 10px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 0;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 100px;  
    height: 100px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0; 
    background-color: #ffffff;
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow: hidden;
}


.header-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.header-title p {
    font-size: 13px;
    color: #93c5fd;
}

.btn-report {

    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    color: #1e3a8a;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.btn-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}


.filter-section {
    margin: 0 24px 24px 24px;
    padding: 24px 32px;
}

.filter-group-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 24px;
}

.filter-block h4, .dropdown-box h4 {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pill-group {
    display: flex;
    gap: 10px;
}

.pill {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.pill:hover {
    background-color: #e2e8f0;
    transform: translateY(-1px);
}

.active-pill {
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: white !important;
    border-color: #0f172a !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-red { background-color: #ef4444; }
.dot-green { background-color: #10b981; }
.dot-blue { background-color: #3b82f6; }
.dot-yellow { background-color: #f59e0b; }
.dot-gray { background-color: #9ca3af; }

.dropdown-group { display: flex; gap: 24px; }
.dropdown-box select {
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    color: #334155;
    font-size: 14px;
    min-width: 180px;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}
.dropdown-box select:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
}

.btn-clear {
    background: none; border: none; color: #ef4444;
    cursor: pointer; margin-left: auto; font-size: 14px; font-weight: 500;
    padding: 8px 16px; border-radius: 8px; transition: background 0.2s;
}
.btn-clear:hover { background: #fee2e2; }


.map-container {
    display: flex;
    margin: 0 24px 24px 24px;
    height: 550px;
    padding: 8px;
}

.map-area {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
}

.legend-area {
    width: 360px;
    padding-left: 16px;
    overflow-y: auto;
}

.custom-legend-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    border: 1px solid #e2e8f0;
}

.legend-title {
    font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 20px;
}
.legend-col-headers {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    text-align: center; font-size: 12px; color: #64748b; font-weight: 600;
    margin-bottom: 12px;
}
.legend-status-card {
    background: #f8fafc; border: 1px solid #f1f5f9;
    border-radius: 10px; padding: 12px; margin-bottom: 12px;
}
.status-label {
    font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 12px; text-align: center;
}
.pin-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; justify-items: center;
}


.table-section {
    margin: 0 24px 24px 24px;
    padding: 24px 32px;
}

.table-header-bar {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.table-header-bar h3 { font-size: 18px; color: #1e293b; }

.search-box {
    display: flex; align-items: center;
    background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px;
    padding: 4px; overflow: hidden;
}
.search-icon { padding: 0 12px; color: #94a3b8; }
.search-box input {
    border: none; background: transparent; padding: 8px; width: 280px;
    outline: none; font-size: 14px;
}
.search-box button {
    padding: 8px 16px; background: #e2e8f0; border: none;
    border-radius: 6px; cursor: pointer; font-weight: 500; color: #475569;
}
.search-box button:hover { background: #cbd5e1; }
.result-count { font-size: 12px; color: #64748b; margin-top: 8px; text-align: right; }

.table-responsive {
    border: 1px solid #e2e8f0; border-radius: 12px; overflow-x: auto;
}

table {
    width: 100%; border-collapse: collapse; font-size: 14px; text-align: left;
}


th {
    background-color: #f8fafc; color: #475569; font-weight: 600;
    padding: 16px; border-bottom: 2px solid #e2e8f0;
    cursor: pointer; user-select: none; transition: background 0.2s;
    white-space: nowrap;
}
th:hover {
    background-color: #f1f5f9; color: #1e293b;
}
.sort-icon {
    font-size: 12px; color: #cbd5e1; margin-left: 4px; transition: color 0.2s;
}
th:hover .sort-icon { color: #64748b; }

td {
    padding: 16px; border-bottom: 1px solid #f1f5f9; vertical-align: top;
}
tbody tr { transition: background 0.2s; }
tbody tr:hover { background-color: #f8fafc; }

.proj-name { font-weight: 600; color: #0f172a; margin-bottom: 4px; line-height: 1.4; }
.proj-sub { color: #64748b; font-size: 12px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-yellow { background: #fefce8; color: #a16207; border: 1px solid #fef08a; }
.badge-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.btn-detail {
    background: #ffffff; color: #2563eb; border: 1px solid #bfdbfe;
    padding: 8px 16px; border-radius: 6px; cursor: pointer;
    font-size: 13px; font-weight: 500; transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-detail:hover { background: #eff6ff; border-color: #93c5fd; }

.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 14px; color: #64748b; }
.page-controls button {
    padding: 8px 16px; margin-left: 8px; background: white;
    border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; font-weight: 500;
}
.page-controls button:hover:not(:disabled) { background: #f8fafc; }


.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); z-index: 1000;
    align-items: center; justify-content: center; backdrop-filter: blur(5px);
}
.premium-modal {
    background: #ffffff; width: 90%; max-width: 850px; max-height: 85vh;
    border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    display: flex; flex-direction: column; overflow: hidden;
}
.modal-header {
    background: #f8fafc; padding: 24px 32px; border-bottom: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { color: #0f172a; font-size: 20px; font-weight: 700; }
.btn-close { background: none; border: none; font-size: 28px; color: #94a3b8; cursor: pointer; transition: color 0.2s; }
.btn-close:hover { color: #ef4444; }
.modal-body { padding: 32px; overflow-y: auto; }
.detail-project-name { font-size: 22px; font-weight: 700; color: #0f172a; margin-bottom: 24px; line-height: 1.4; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.info-box { background: #f8fafc; border: 1px solid #e2e8f0; padding: 20px; border-radius: 12px; }
.info-label { font-size: 13px; color: #64748b; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; }
.info-value { font-size: 16px; color: #1e293b; font-weight: 500; }
.progress-container { width: 100%; background-color: #e2e8f0; border-radius: 99px; height: 12px; margin-top: 10px; overflow: hidden; }
.progress-fill { height: 100%; background-color: #3b82f6; border-radius: 99px; transition: width 1s ease-in-out; }


.custom-pin-wrap { background: transparent; border: none; width: 32px; height: 40px; display: flex; justify-content: center; align-items: flex-end; }
.map-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; box-shadow: -2px 2px 5px rgba(0,0,0,0.4); border: 2px solid white; }
.map-pin-inner { width: 14px; height: 14px; background-color: white; border-radius: 50%; transform: rotate(45deg); display: flex; align-items: center; justify-content: center; }
.pin-bg-red { background-color: #ef4444; } .pin-bg-green { background-color: #10b981; } .pin-bg-blue { background-color: #3b82f6; }
.status-icon-progress { width: 6px; height: 6px; background-color: #f59e0b; border-radius: 50%; }
.status-icon-plan { width: 6px; height: 6px; background-color: #3b82f6; border-radius: 1px; }


.custom-footer { background-color: #ffffff; padding: 40px 24px; border-top: 1px solid #e2e8f0; }
.footer-container { max-width: 1280px; margin: 0 auto; text-align: center; }
.footer-title { font-size: 16px; font-weight: 700; color: #475569; margin: 0; }
.footer-line { margin: 12px auto 32px auto; height: 4px; width: 60px; background: linear-gradient(90deg, #3b82f6, #10b981); border-radius: 99px; }
.footer-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 32px 48px; }
.logo-img { height: 45px; width: auto; max-width: 130px; object-fit: contain; transition: transform 0.3s; }
.logo-link:hover .logo-img { transform: scale(1.1); }


@media (max-width: 1024px) {
    .filter-group-row { flex-wrap: wrap; }
    .map-container { flex-direction: column; height: auto; }
    .map-area { height: 450px; flex: none; }
    .legend-area { width: 100%; border-left: none; border-top: 1px solid #e2e8f0; }
}

@media (max-width: 768px) {
   
    body { background-color: #f4f7f6; }
    
    .premium-card {
        margin: 0 12px 16px 12px !important;
        padding: 16px !important;
        border-radius: 12px;
    }

   
    .header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 16px;
        margin-bottom: 16px;

        border-radius: 0;
    }
    .header-title { flex-direction: column; gap: 8px; }
    .header-icon { width: 50px; height: 50px; font-size: 24px; }
    .header-title h2 { font-size: 16px; }
    .header-title p { font-size: 12px; }
    .btn-report { width: 100%; padding: 12px; font-size: 14px; }

   
    .filter-group-row { margin-bottom: 16px; gap: 16px; }
    .filter-block { width: 100%; overflow: hidden; }
    .pill-group {
        display: flex;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .pill-group::-webkit-scrollbar { display: none; }
    .pill { flex-shrink: 0; padding: 6px 14px; font-size: 12px; }

   
    .dropdown-group { flex-direction: column; width: 100%; gap: 12px; }
    .dropdown-box { width: 100%; }
    .dropdown-box select { width: 100%; font-size: 14px; padding: 12px; }
    .btn-clear { width: 100%; background: #fef2f2; margin-top: 4px; padding: 10px; text-align: center; }

    .table-header-bar { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 12px; }
    .table-header-bar h3 { font-size: 16px; }
    .search-box { width: 100%; }
    .search-box input { width: 100%; padding: 10px; }

   
    .map-area { height: 350px; border-radius: 12px 12px 0 0 !important; }
    .legend-area { padding: 12px; }
    .custom-legend-panel { padding: 12px; border: none; box-shadow: none; }
    .legend-title { font-size: 14px; text-align: center; margin-bottom: 12px; }
    .legend-col-headers { font-size: 10px; margin-bottom: 8px; }
    .status-label { font-size: 12px; margin-bottom: 8px; }
    .map-pin { transform: rotate(-45deg) scale(0.8); margin-bottom: 2px; }
    .pin-grid { gap: 4px; }

   
    .premium-modal { width: 95%; max-height: 85vh; border-radius: 16px; }
    .modal-header { padding: 16px; }
    .modal-header h3 { font-size: 16px; }
    .btn-close { font-size: 24px; padding: 0 8px; }
    .modal-body { padding: 16px; }
    .detail-project-name { font-size: 16px; margin-bottom: 16px; }
    .detail-grid { grid-template-columns: 1fr; gap: 12px; }
    .info-box { padding: 12px; border-radius: 8px; }
    .info-label { font-size: 11px; }
    .info-value { font-size: 14px; }
    #modalBudget { font-size: 16px !important; }

   
    .custom-footer { padding: 32px 16px; }
    .footer-logos { gap: 16px 20px; }
    .logo-img { height: 35px; max-width: 100px; }
}