/* --- Responsive Font Sizing --- */
/* บน Mobile ใช้ขนาด default, บน Desktop ลดเหลือ 80% */
@media (min-width: 640px) {
    :root {
        font-size: 90%;
    }
}

/* --- ตั้งค่าธีมสีและฟอนต์ --- */
:root {
    --pico-font-family: 'Sarabun', sans-serif;
    --pico-primary: #8e1921; /* สีแดงเข้มทางการ (สไตล์จุฬาฯ) */
    --pico-primary-hover: #b71c1c;
    --pico-border-radius: 6px;
    --pico-background-color: #f8f9fa;
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: var(--pico-background-color);
}

/* ม้านรับ Element สำหรับ Highlight */
mark.highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* ส่วนหัวเว็บไซต์ (Top Navigation) */
.top-nav {
    background-color: white;
    border-bottom: 3px solid var(--pico-primary);
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    max-width: 900px;
    margin: auto;
    padding: 0 1rem;
}

.logo-box {
    background-color: var(--pico-primary);
    color: white;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 4px;
    margin-right: 15px;
    font-size: 1.2rem;
}

/* กล่องเนื้อหาหลัก */
.main-container { 
    max-width: 800px; 
    margin: auto; 
    padding: 0 1rem; 
}

/* กล่องค้นหา */
.search-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    border: 1px solid #eee;
}

/* การ์ดแสดงผลข้อมูล */
.result-card { 
    background: white; 
    padding: 1.5rem; 
    border-radius: 8px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    border-left: 5px solid #ccc; /* แถบสีด้านซ้ายบอกสถานะ */
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* สถานะ (Status Pill) */
.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* สีของสถานะ */
.status-success { background: #d4edda; color: #155724; border-left-color: #28a745; }
.status-pending { background: #fff3cd; color: #856404; border-left-color: #ffc107; }
.status-default { background: #e2e3e5; color: #383d41; border-left-color: #6c757d; }

.amount-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pico-primary);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid #ddd;
}

/* Loading Spinner Animation */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--pico-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}