/* --- 1. General Styles --- */
body {
    font-family: 'Sarabun', sans-serif;
    background-color: #FFFDE7;
}

/* --- 2. UI Components --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.nav-item.active {
    background-color: #AEC6CF;
    color: white;
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.chart-container {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 1rem;
}

/* --- 3. Stats Cards & Gradients --- */
.gradient-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.gradient-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.gradient-card-1 { background: linear-gradient(135deg, #26A69A, #4DB6AC); }
.gradient-card-2 { background: linear-gradient(135deg, #AED581, #C5E1A5); }
.gradient-card-3 { background: linear-gradient(135deg, #FFCA28, #FFD54F); }
.gradient-card-4 { background: linear-gradient(135deg, #FF8A65, #FFAB91); }
.gradient-card-5 { background: linear-gradient(135deg, #EF5350, #E57373); }
.gradient-card-6 { background: linear-gradient(135deg, #4A2C6D, #6A4C93); }
.gradient-card-7 { background: linear-gradient(135deg, #D32F2F, #F44336); }
.gradient-card-8 { background: linear-gradient(135deg, #F57C00, #FF9800); }
.gradient-card-9 { background: linear-gradient(135deg, #FBC02D, #FFEB3B); }
.gradient-card-10 { background: linear-gradient(135deg, #0288D1, #03A9F4); }

/* --- 4. Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #AEC6CF;
    border-radius: 4px;
}

/* --- 5. Print Settings --- */
@media print {
    /* 1. ซ่อนสิ่งที่ไม่เกี่ยวข้องกับการพิมพ์ทั้งหมด */
    body * {
        visibility: hidden;
    }
    
    nav, aside, .sidebar, button, header, .no-print, #loading-overlay, #toast {
        display: none !important;
    }

    /* 2. กำหนดให้เฉพาะพื้นที่รายงานเท่านั้นที่แสดงผล */
    #printable-area, #printable-area * {
        visibility: visible;
    }

    /* 3. จัดตำแหน่งพื้นที่พิมพ์ */
    #printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none !important;
        border: none !important;
    }

    /* 4. ตั้งค่าหน้ากระดาษ */
    @page {
        size: A4;
        margin: 0.5cm;
    }

    /* 5. ตกแต่งตารางสำหรับการพิมพ์ */
    table {
        width: 100%;
        border-collapse: collapse;
    }
    
    th, td {
        border: 1px solid #000 !important;
        padding: 8px;
        color: #000 !important;
    }
    
    th {
        background-color: #f3f4f6 !important;
        -webkit-print-color-adjust: exact;
    }
}


