@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Sarabun', sans-serif;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-weight: 400;
}

/* =========================
   HEADER & NAVIGATION
========================= */
.app {
    height: 100vh;
    display: grid;
    grid-template-rows: minmax(90px, 10vh) 1fr;
}

.header {
    display: flex;
    align-items: center;
    padding: 0 30px;
    background: linear-gradient(135deg, #d7ccc8 0%, #a1887f 50%, #8d6e63 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(141, 110, 99, 0.2);
    position: relative;
    gap: 40px;
    z-index: 1000;
}

.logo {
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#user_display {
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-size: 14px;
}

.btn-manual {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #4e342e;
}

.btn-manual:hover {
    background: #efebe9;
    transform: scale(1.1) rotate(5deg);
    color: #3e2723;
}

.btn-header-contact {
    background: white;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 13px;
    color: #4e342e;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-header-contact:hover {
    background: #efebe9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* =========================
   MENUS
========================= */
.hazard-menu {
    display: flex;
    gap: 15px;
    padding: 0;
    background: transparent;
    flex: 1;
    max-width: 900px;
}

.hazard-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none; 
    min-width: auto; 
}

.hazard-item.disabled {
    cursor: pointer;
    opacity: 0.7;
}

.hazard-item.disabled::after {
    content: "อยู่ระหว่างพัฒนา";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    font-size: 10px;
    font-weight: 800;
    color: rgba(239, 68, 68, 0.4);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    text-transform: uppercase;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.6);
}

.hazard {
    flex: 1;
    text-align: center;
    padding: 8px 15px;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    transition: .2s;
    font-size: 12px;
    white-space: nowrap;
    min-width: 45px;
}

.hazard:hover {
    background: #ddd;
}

.hazard.active {
    background: #efebe9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    font-weight: 800;
    color: #3e2723;
}

.hazard-icon {
    font-size: 18px;
    vertical-align: middle;
}

.hazard-text {
    vertical-align: middle;
    margin-left: 5px;
}

/* Tooltip & Compact style */
.hazard-item:not(.active-container) .hazard-text {
    display: none;
}


.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

#user_display {
    font-weight: 800;
    color: #ffffff;
    font-size: 14px;
}

.btn-header-contact {
    background: white;
    border: none;
    border-radius: 999px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 13px;
    color: #4e342e;
    cursor: pointer;
}

/* =========================
   DASHBOARD MAIN (3/15/82 Layout)
========================= */
.dashboard-main {
    display: flex;
    flex: 1;
    min-height: 0;
    padding: 0;
    gap: 0;
    position: relative;
    overflow: hidden;
}



/* 2. Side Panel (50%) */
.info-sidebar {
    width: 50%;
    min-width: 50%; 
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900;
}

/* 3. Map Area (82%) */
.map-container {
    flex: 1;
    position: relative;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-title-overlay {
    width: 100%;
    text-align: center;
    padding: 15px 0;
    font-weight: 800;
    font-size: 32px;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    z-index: 800;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#map {
    width: 100%;
    flex: 1;
}



/* =========================
   COMPONENTS
========================= */
.info-card {
    background: white;
    border-radius: 16px;
    padding: 12px 15px;
    border: 1px solid rgba(131, 197, 190, 0.3);
    box-shadow: 0 4px 10px rgba(0, 77, 77, 0.02);
}



.shadow-soft {
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
}

/* =========================
   MODALS
========================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

#on_progres, #login_overlay, #contact_overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
}

.login-box, .processing-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.processing-card {
    width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
    animation: swal-show 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spinner-box {
    padding: 10px;
}

.modern-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #fdfaf9;
    border-top: 5px solid #8d6e63;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.processing-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.proc-title {
    font-size: 22px;
    font-weight: 800;
    color: #4e342e;
    letter-spacing: -0.5px;
}

.proc-status {
    font-size: 14.5px;
    color: #8d6e63;
    line-height: 1.5;
    font-weight: 500;
}

.btn-cancel-modal {
    width: 100%;
    padding: 12px;
    border: 1px solid #d7ccc8;
    background: #fdfaf9;
    color: #795548;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13.5px;
    margin-top: 10px;
}

.btn-cancel-modal:hover {
    background: #fff0f0;
    color: #e63946;
    border-color: #ffb3b3;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes swal-show { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.contact-card {
    background: white;
    width: 800px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.contact-header {
    background: linear-gradient(135deg, #8d6e63 0%, #4e342e 100%);
    padding: 20px 25px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-title {
    font-size: 20px;
    font-weight: 700;
}

.contact-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.contact-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.contact-body {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    background: #f0f7f7;
}

.dept-name {
    color: #2d6a4f;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.4;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 15px;
    color: #444;
    line-height: 1.5;
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.contact-map {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: 350px;
}

/* =========================
   PRINT MEDIA
========================= */
@media print {
    @page { size: A4 landscape; margin: 10mm; }
    .header, .sidebar-trigger-bar { display: none !important; }
    .app { height: auto !important; }
    .dashboard-main { display: flex !important; flex-direction: row !important; height: auto !important; }
    .map-container { flex: 2 !important; height: 650px !important; }
    .info-sidebar { flex: 1 !important; width: 350px !important; display: block !important; opacity: 1 !important; }
    .map-title-overlay { font-size: 24px !important; background: white !important; }
}

/* =========================
   MOBILE PORTRAIT (Responsive)
========================= */
@media (max-width: 768px) {
    .app {
        min-width: 0 !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        overflow-x: hidden;
    }

    .header {
        padding: 15px !important;
        height: auto !important;
        min-height: 80px;
        flex-direction: column;
        gap: 15px;
        background: linear-gradient(135deg, #d7ccc8 0%, #a1887f 50%, #8d6e63 100%) !important;
    }

    .logo {
        height: 45px;
        margin-bottom: 5px;
    }

    .hazard-menu {
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
        width: 100%;
        justify-content: flex-start;
        display: flex;
        -webkit-overflow-scrolling: touch;
    }
    
    .hazard-menu::-webkit-scrollbar {
        display: none;
    }

    .hazard-item {
        flex: 0 0 auto;
    }

    .hazard {
        flex: 0 0 auto !important;
        text-align: center !important;
        padding: 6px 12px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(4px) !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 1px solid rgba(255,255,255,0.3) !important;
    }

    .hazard.active {
        background: #ffffff !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
        font-weight: 800 !important;
        color: #4e342e !important;
    }

    .hazard:not(.active) .hazard-text {
        display: none !important;
    }

    .hazard.active .hazard-text {
        display: inline-block !important;
        margin-left: 5px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }

    .dashboard-main {
        flex-direction: column !important;
        height: auto !important;
        display: block !important;
    }

    .info-sidebar {
        width: 100% !important;
        padding: 15px !important;
        height: auto !important;
        overflow: visible !important;
    }

    .map-container {
        width: 100% !important;
        height: 450px !important;
        order: -1;
    }

    /* Scale down Leaflet controls on mobile portrait */
    .leaflet-bottom.leaflet-right {
        transform: scale(0.5) !important;
        transform-origin: bottom right !important;
        bottom: 5px !important;
        right: 5px !important;
    }

    .map-title-overlay {
        font-size: 18px !important;
        padding: 10px 15px !important;
    }

    .map-title-overlay .title-date {
        display: block !important;
        font-size: 14px !important;
        margin-top: 5px;
        opacity: 0.9;
    }

    /* Metric Cards Mobile Portrait Refinements */
    .metric-card-v2 {
        padding: 10px !important;
        gap: 10px !important;
        border-radius: 12px !important;
    }

    .metric-card-v2 > div:first-child {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }

    .metric-card-v2 div div:first-child {
        font-size: 9.5px !important;
        margin-bottom: 2px;
    }

    .metric-card-v2 div div:last-child {
        font-size: 15px !important;
    }

    .metric-card-v2 div div:last-child small {
        font-size: 10px !important;
    }

    /* Modals adjustments */
    .contact-card, .login-box {
        width: 95% !important;
        max-width: 100% !important;
        margin: 10px !important;
    }

    .contact-body {
        grid-template-columns: 1fr !important;
        padding: 20px !important;
    }

    .contact-map {
        height: 200px !important;
    }

    /* Hide administrative labels on map for mobile portrait */
    .label {
        display: none !important;
    }
}

/* =========================
   MOBILE LANDSCAPE (Standardized)
========================= */
@media (orientation: landscape) and (max-height: 600px) {
    .app {
        height: 100vh !important;
        width: 100vw !important;
        display: flex !important;
        flex-direction: column !important;
        background: #f4f6f9 !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0;
        left: 0;
    }

    .header {
        flex: none !important;
        height: 70px !important;
        min-height: 70px !important;
        padding: 0 12px !important;         /* ลด padding ขอบลงเหลือ 12px */
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;               /* ลด gap ระหว่าง Logo/Menu/Right เหลือ 12px */
        background: linear-gradient(135deg, #d7ccc8 0%, #a1887f 50%, #8d6e63 100%) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
        box-shadow: 0 8px 24px rgba(141, 110, 99, 0.2) !important;
        z-index: 1000 !important;
        position: relative !important;
        width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .logo {
        height: 32px !important;            /* ลดความสูงโลโก้ลงอีก */
        width: auto !important;
        max-width: 150px !important;        /* จำกัดความกว้างไม่ให้เบียด */
        flex-shrink: 0 !important;
        margin: 0 !important;
        cursor: pointer !important;
    }

    .hazard-menu {
        display: flex !important;
        gap: 6px !important;                /* ลด gap ระหว่างปุ่มเมนูเหลือ 6px */
        padding: 0 5px !important;
        margin: 0 !important;
        background: transparent !important;
        flex: 1 1 0 !important;             /* กินพื้นที่ที่เหลือ */
        align-items: center !important;
        overflow-x: auto !important;        /* ให้เลื่อนแนวนอนได้ถ้าเมนูเยอะเกิน */
        overflow-y: hidden !important;
        min-width: 0 !important;            /* สำคัญ: ให้ flex item หดได้ */
        -webkit-overflow-scrolling: touch !important;
    }

    /* ซ่อน scrollbar สำหรับ hazard-menu */
    .hazard-menu::-webkit-scrollbar {
        display: none !important;
    }

    .hazard {
        flex: 0 0 auto !important;
        text-align: center !important;
        padding: 4px 10px !important;       /* ลด padding ลงเหลือ 4px 10px */
        border-radius: 8px !important;
        cursor: pointer !important;
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(4px) !important;
        transition: .2s !important;
        font-size: 10px !important;         /* ลดฟอนต์เหลือ 10px */
        white-space: nowrap !important;
        color: #333 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        min-width: 32px !important;         /* ขนาดขั้นต่ำเล็กลง */
    }

    .hazard.active {
        background: #ffffff !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .15) !important;
        font-weight: 800 !important;
        color: #4e342e !important;
    }

    .hazard-icon {
        font-size: 16px !important;         /* ลดขนาดไอคอนเหลือ 16px */
    }

    .hazard-text {
        margin-left: 5px !important; 
        font-weight: inherit !important;
    }

    /* ตรรกะแสดงเฉพาะ Active Text */
    .hazard:not(.active) .hazard-text {
        display: none !important;
    }

    .hazard.active .hazard-text {
        display: inline-block !important;
    }

    .header-right {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;          /* ห้ามหด */
        margin-left: auto !important;
        min-width: fit-content !important;
    }

    #user_display {
        display: none !important;           /* ซ่อนชื่อผู้ใช้ใน landscape เพื่อเพิ่มพื้นที่ */
    }

    .btn-header-contact {
        padding: 5px 10px !important;       /* ลด padding ปุ่มให้เล็กลง */
        font-size: 11px !important;         /* ลดขนาดฟอนต์ปุ่ม */
        white-space: nowrap !important;
        height: 32px !important;            /* กำหนดความสูงให้พอดีกับโลโก้ */
        display: flex !important;
        align-items: center !important;
    }

    .dashboard-main {
        flex: 1 !important;
        display: flex !important;
        flex-direction: row !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .info-sidebar {
        width: 60% !important;
        min-width: 60% !important;
    }

    .map-container {
        width: 40% !important;
        flex: none !important;
    }

    /* ปรับ Modal ติดต่อเราให้พอดีกับจอแนวตั้งในโหมดแนวนอน */
    .contact-card {
        max-height: 95vh !important;
        width: 90% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        margin: auto !important;
    }
    .contact-header {
        padding: 10px 20px !important;
    }
    .contact-body {
        overflow-y: auto !important;
        padding: 15px !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        flex: 1 !important;
    }
    .contact-map {
        height: 180px !important;
    }
    .dept-name {
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }
    .info-item {
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }
    .map-title-overlay {
        font-size: 16px !important;
        padding: 5px 10px !important;
    }

    .map-title-overlay .title-date {
        display: block !important;
        font-size: 12px !important;
        margin-top: 2px !important;
        opacity: 0.9;
    }

    .card-title .title-date-stats {
        display: block !important;
        font-size: 12px !important;
        margin-top: 5px !important;
        opacity: 0.8;
    }

    /* Scale down Leaflet controls on mobile landscape */
    .leaflet-bottom.leaflet-right {
        transform: scale(0.5) !important;
        transform-origin: bottom right !important;
        bottom: 5px !important;
        right: 5px !important;
    }

    /* Hide administrative labels on map for mobile landscape */
    .label {
        display: none !important;
    }
}

/* =========================
   FILTER BAR (Standardized)
========================= */
.filter-bar {
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(141, 110, 99, 0.05);
    margin-bottom: 15px;
    border: 1px solid rgba(161, 136, 127, 0.2);
}

.filter-bar .card-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    color: #4e342e;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.filter-bar .card-title:hover {
    color: #8d6e63;
}

.filter-group[style*="display: block"] {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(161, 136, 127, 0.3);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 12.5px;
    font-weight: 700;
    color: #3e2723;
    margin-left: 2px;
}

.filter-item select {
    border: 1px solid #d7ccc8;
    border-radius: 12px;
    padding: 0 12px;
    background: #fdfaf9;
    font-size: 14px;
    color: #4e342e;
    height: 40px;
    outline: none;
    transition: all 0.2s;
}

.filter-item select:focus {
    border-color: #a1887f;
    background: white;
    box-shadow: 0 0 0 4px rgba(161, 136, 127, 0.1);
}

.filter-item .date-box {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fdfaf9;
    border-radius: 12px;
    border: 1px solid #d7ccc8;
    height: 40px;
    overflow: hidden;
}

.filter-item .date-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 12px;
    font-size: 13px;
    color: #4e342e;
    text-align: center;
    outline: none;
    cursor: pointer;
}

.filter-item .date-box span {
    padding: 0 5px;
    color: #a1887f;
    font-weight: 700;
}

.btn-filter-process {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #8d6e63 0%, #4e342e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-filter-process:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(78, 52, 46, 0.3);
}

/* Stats Card Styles */
.stats-summary {
    background: #fdfaf9;
    border-radius: 14px;
    padding: 10px;
}

.summary-box {
    background: white;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #efebe9;
}

.summary-box.highlight-box {
    background: linear-gradient(135deg, #8d6e63 0%, #4e342e 100%);
    color: white;
    border: none;
}

.metric-card-v2 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.metric-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(141, 110, 99, 0.12) !important;
}

.chart-box-v2 {
    transition: all 0.3s ease;
}

.chart-box-v2:hover {
    border-color: #d7ccc8 !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.04);
}

.residue-list-wrapper {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.residue-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.residue-list-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.residue-list-wrapper::-webkit-scrollbar-thumb {
    background: #d7ccc8;
    border-radius: 10px;
}

.residue-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a1887f;
}

.summary-label {
    font-size: 11px;
    color: #795548;
    font-weight: 600;
    margin-bottom: 4px;
}

.highlight-box .summary-label {
    color: rgba(255, 255, 255, 0.8);
}

.summary-value {
    font-size: 18px;
    font-weight: 800;
    color: #3e2723;
}

.highlight-box .summary-value {
    color: white;
    font-size: 22px;
}

.summary-value small {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
}

.no-data-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #d7ccc8;
    gap: 12px;
}

.no-data-placeholder i {
    font-size: 40px;
}

.no-data-placeholder p {
    font-size: 14px;
    font-weight: 500;
}

/* =========================
   MAP LABELS (Standardized)
========================= */
.label {
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-weight: 800;
    text-shadow:
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white;
    pointer-events: none;
}

/* ==========================================
   SUB MENU / SEGMENTED TOGGLE SWITCH
   ========================================== */
.sub-menu {
    display: flex;
    background: #efebe9; /* Light warm brown background */
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 15px;
    border: 1px solid rgba(141, 110, 99, 0.15);
    position: relative;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(141, 110, 99, 0.05);
}

.sub-menu .sub {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #8d6e63;
    cursor: pointer;
    border-radius: 11px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sub-menu .sub:hover {
    color: #4e342e;
    background: rgba(255, 255, 255, 0.4);
}

.sub-menu .sub.active {
    background: #ffffff;
    color: #4e342e;
    box-shadow: 0 4px 10px rgba(78, 52, 46, 0.12);
}


