/* Custom Modern UI Styles */
/* NOTE: CSS variables are defined in components.css */

/* ============================================================
   ── SIDEBAR
   ============================================================ */
.gq-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--gq-sidebar-width);
  height: 100vh;
  background: var(--gq-dark);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow: hidden;
  transition: transform 0.3s ease;
}

/* ลวดลายวงกลมใน Sidebar */
.gq-sidebar::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 112, 33, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

/* Logo Area */
.gq-sidebar__logo {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.gq-sidebar__logo img {
  height: 40px;
  object-fit: contain;
}
.gq-sidebar__logo-title {
  font-size: 1.05rem; 
  font-weight: 700;
  color: #fff; 
  letter-spacing: 0.5px;
}

/* Navigation Items */
.gq-sidebar__nav {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.gq-nav__section-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px; 
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  padding: 0 10px;
  margin: 1.5rem 0 0.5rem;
}
.gq-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--gq-transition);
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem; /* ขนาดอักษรใหญ่ขึ้น */
  font-weight: 400;
  margin-bottom: 4px;
  text-decoration: none;
}
.gq-nav__item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateX(4px);
}
.gq-nav__item.active {
  background: linear-gradient(to right, rgba(140, 24, 135, 0.2), rgba(140, 24, 135, 0.05));
  color: #fff;
  font-weight: 600;
  border-right: 4px solid var(--wu-orange);
  border-radius: 12px 0 0 12px;
}
.gq-nav__icon { 
  font-size: 1.3rem; /* ไอคอนใหญ่ขึ้น */
  flex-shrink: 0; 
  transition: color 0.25s ease;
}
.gq-nav__item:hover .gq-nav__icon { color: var(--wu-orange); }
.gq-nav__item.active .gq-nav__icon { color: var(--wu-orange); }

.gq-nav__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background-color: var(--wu-orange);
  box-shadow: 0 0 8px rgba(243, 112, 33, 0.4);
}

/* Sidebar Logo Image */
.gq-sidebar__logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Sidebar Close Button (mobile) */
.gq-sidebar__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  padding: 4px 6px;
  border-radius: 8px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.gq-sidebar__close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* Sidebar Footer */
.gq-sidebar__footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  flex-shrink: 0;
}

/* Desktop Sidebar Collapsed State */
.gq-sidebar.collapsed {
  transform: translateX(-100%);
}

/* ── SIDEBAR OVERLAY (สำหรับมือถือ) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,18,40,0.5);
  z-index: 1039;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* 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; }


/* 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-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 ตัวเลขให้ใหญ่และชัดเจนขึ้น */

/* ตกแต่งส่วนหัวของ 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; }

.researcher-link {
    text-decoration: none;
    color: var(--wu-purple);
    transition: color 0.2s ease;
}
.researcher-link:hover { color: var(--wu-orange); }

/* 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); }
}