.btn-primary {
  background-color: #2563eb;
  color: white;
  font-weight: bold;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.5);
  border: none;
}
.btn-primary:hover {
  background-color: #1e40af;
  opacity: 0.9;
}

/* Card dashboard */
.dashboard-card {
  box-shadow: 0 6px 32px 0 rgba(80, 80, 150, 0.10) !important;
  transition: transform 0.18s;
}
.dashboard-card:hover {
  transform: scale(1.04);
}

/* เพิ่มความเข้มตัวหนังสือในกล่องอนุมัติ/รออนุมัติ */
.approved-box,
.pending-box,
.approved-box * {
  color: #111 !important;
}

/* โลโก้เงา */
.ria-glow {
  color: #8b5cf6;
  text-shadow: 0 0 8px #c4b5fd,
               0 0 16px #a78bfa,
               0 0 24px #8b5cf6;
  font-weight: 800;
}

/* Sidebar fix */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 18rem;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  background-color: white;
  border-right: 1px solid #e5e7eb;
}

/* เนื้อหาหลัก */
.main-content {
  margin-left: 18rem;
  padding: 1rem;
  min-height: 100vh;
  background: linear-gradient(to bottom right, #3b82f6, #14b8a6);
}

/* ====== Quota Section ====== */
.quota-card,
.quota-card td,
.quota-card th,
.quota-card span,
.quota-card p,
.quota-card a {
  color:#111827 !important; /* ตัวหนังสือเข้ม */
}

/* ฟอร์ม quota ให้ input และ select สูงเท่ากัน */
#qDept,
#qQuota {
  height: 48px !important;
  line-height: 48px !important;
  padding: 0 1rem !important;
  font-size: 0.95rem;
}

/* ปุ่มฟอร์ม align ตรงกลางกับ input/select */
#qSave,
#qReset {
  height: 48px !important;
  padding: 0 1.2rem !important;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* custom select */
.custom-select{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  background:#fff url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23111827'>\
<path d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/>\
</svg>") no-repeat right .75rem center;
  background-size:1rem;
  border:1px solid #d1d5db;
  border-radius:.75rem;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  font-size:0.95rem;
}

/* scrollbars */
#approvedRequestsScroll::-webkit-scrollbar,
#pendingRequestsList::-webkit-scrollbar,
#approvedRequestsList::-webkit-scrollbar,
#rejectedRequestsList::-webkit-scrollbar {
  height: 10px;
}
#approvedRequestsScroll::-webkit-scrollbar-thumb,
#pendingRequestsList::-webkit-scrollbar-thumb,
#approvedRequestsList::-webkit-scrollbar-thumb,
#rejectedRequestsList::-webkit-scrollbar-thumb {
  background: #a5b4fc;
  border-radius: 999px;
}

/* Table stock */
#currentStockList table, 
#currentStockList th, 
#currentStockList td {
  border: 1px solid #888;
  background: #fff;
  color: #222;
}

/* Sweetalert */
.swal2-popup-stack { margin-top: 1.2em !important; }
.swal2-icon-custom { margin: 0; width: 36px; height: 36px; }

/* Selection style */
.quota-table td::selection,
.quota-table th::selection {
  background: #dbeafe;
  color: #1e3a8a;
}

/* --- Buttons unify size/box --- */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:48px;               /* = h-12 */
  padding:0 1.25rem;         /* = px-5 */
  border-radius:0.5rem;      /* = rounded-lg */
  font-weight:600;
  line-height:1;             /* กัน line-height ทำให้ดูไม่เท่ากัน */
  box-sizing:border-box;     /* คำนวณรวมขอบให้เท่ากัน */
}
.btn:focus{ outline:0; box-shadow:0 0 0 3px rgba(99,102,241,.35); }

.btn-primary{
  background:#4f46e5; color:#fff; border:1px solid transparent;
  box-shadow:0 4px 6px rgba(79,70,229,.25);
}
.btn-primary:hover{ background:#4338ca; }

.btn-secondary{
  background:#f3f4f6; color:#374151; border:1px solid #e5e7eb;
}
.btn-secondary:hover{ background:#e5e7eb; }

/* fix table text color */
#deptSummaryTable td, 
#deptSummaryTable th {
  color: #1f2937 !important; /* = text-gray-800 */
}