/* Custom Modern UI Styles */
:root {
    --wu-orange: #F37021;
    --wu-purple: #8C1887;
    --bg-light: #F8F9FC;
}

body { background-color: var(--bg-light); }

/* Page Header */
.page-title { font-weight: 700; color: #2C3E50; }
.text-orange { color: var(--wu-orange); }
.sync-badge {
    background-color: #E2E8F0;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sync-dot {
    width: 8px; height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.stat-label { font-size: 0.9rem; color: #64748B; font-weight: 600; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: #1E293B; line-height: 1.2; }

/* Specific Icon Colors */
.icon-total { background: #EEF2FF; color: #4F46E5; }
.icon-article { background: #ECFEFF; color: #0891B2; }
.icon-project { background: #FFF7ED; color: #EA580C; }
.icon-patent { background: #FEF2F2; color: #DC2626; }
.icon-award { background: #FEFCE8; color: #CA8A04; }
.icon-other { background: #F3F4F6; color: #4B5563; }

/* Filter Pills */
.filter-pill {
    border: 1px solid #E2E8F0;
    background: #fff;
    color: #64748B;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.filter-pill:hover { background: #F8FAFC; color: #0F172A; }
.filter-pill.active {
    background: var(--wu-purple);
    border-color: var(--wu-purple);
    color: #fff;
}

/* Table Enhancements */
/* .table-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.table-custom thead th {
    background-color: #F8FAFC;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #E2E8F0;
    padding: 1rem;
    white-space: nowrap;
}
.table-custom tbody td {
    vertical-align: middle;
    padding: 1rem;
    font-size: 0.9rem;
    color: #334155;
} */

/* ปรับขนาดตัวอักษรพื้นฐานในตารางให้ใหญ่ขึ้น */
.table-custom {
    font-size: 1rem; /* ขนาดอักษรใหญ่ขึ้น */
}
.table-custom thead th {
    background-color: #f8f9fc;
    color: var(--wu-purple, #8C1887); /* ใช้สีม่วงเป็นหัวตาราง */
    font-weight: 700;
    font-size: 0.95rem;
    padding: 1.2rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.table-custom tbody td {
    vertical-align: middle;
    padding: 1rem;
    color: #334155;
}

/* ตกแต่ง Badge ตัวเลขให้ใหญ่และชัดเจนขึ้น */
.num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem; /* ขยายขนาดตัวเลข */
    background-color: #F1F5F9;
    color: #475569;
}
.hindex-badge {
    background: linear-gradient(135deg, var(--wu-purple, #8C1887), #C026D3);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem; /* ขยายขนาดตัวเลข H-index */
    box-shadow: 0 2px 4px rgba(140, 24, 135, 0.2);
}

/* ตกแต่งส่วนหัวของ DataTables (ช่อง Search และ แสดงจำนวน) */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--wu-orange, #F37021);
    box-shadow: 0 0 0 0.25rem rgba(243, 112, 33, 0.25);
    outline: none;
}
.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    padding: 0.4rem 2rem 0.4rem 1rem;
    font-size: 1rem;
}

/* ตกแต่ง Pagination ให้เป็นสีมหาลัย */
.dataTables_wrapper .page-item.active .page-link {
    background-color: var(--wu-purple, #8C1887);
    border-color: var(--wu-purple, #8C1887);
    color: white;
    font-weight: 600;
}
.dataTables_wrapper .page-link {
    color: #475569;
    font-size: 1rem;
    padding: 0.5rem 1rem;
}
.dataTables_wrapper .page-link:hover {
    color: var(--wu-orange, #F37021);
}

.researcher-name-th { font-weight: 600; color: #1E293B; display: block; }
.researcher-name-en { font-size: 0.8rem; color: #94A3B8; }

/* Badges */
.num-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: #F1F5F9;
}
.hindex-badge {
    background: linear-gradient(135deg, var(--wu-purple), #C026D3);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}