/* ==========================================================================
   ระบบบริหารสถานศึกษา วิทยาลัยเทคนิควาปีปทุม (Wapi Pathum Technical College)
   Designed & Developed by Mr.Preecha Chankalee
   ========================================================================== */

:root {
  --font-heading: 'Prompt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --accent-red: #d32f2f;
  --accent-red-hover: #b71c1c;
  --accent-orange: #f57c00;
  --accent-orange-hover: #e65100;
  --maroon-dark: #6b1418;
  --maroon-deeper: #530e11;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-light: #94a3b8;
  --border-gray: #94a3b8;
  
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.12), 0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 20px rgba(15, 23, 42, 0.15), 0 3px 6px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 14px 28px rgba(15, 23, 42, 0.22), 0 5px 10px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 6px 18px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  
  --radius-card: 14px;
  --radius-button: 8px;
}

/* Base Reset & Global Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #0f172a;
}

/* =========================================================
   1. ส่วนหัว (Header / Top Bar - แถบน้ำเงินไล่เฉดโทนสีเย็น)
   ========================================================= */
.site-header {
  background: linear-gradient(135deg, #0b1f3a 0%, #153e75 50%, #1d5ca3 100%);
  border-bottom: 2px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 20px rgba(11, 31, 58, 0.25); /* เงาตกกระทบแบบนุ่มนวล */
  position: relative;
  z-index: 100;
}

.brand-section {
  flex: 1 1 auto;
  min-width: 280px;
}

.brand-logo-wrapper {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.brand-logo-wrapper:hover {
  transform: scale(1.06) rotate(2deg);
}

.brand-logo-img {
  width: auto;
  height: 72px;
  max-width: 80px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  line-height: 1.3;
}

.brand-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: #7dd3fc;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  line-height: 1.3;
}

.brand-en {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* Quick Action Buttons */
.quick-actions {
  flex-wrap: wrap;
}

.btn-action-red,
.btn-action-blue,
.btn-action-orange {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-button);
  color: #ffffff;
  text-decoration: none;
  border: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
  white-space: nowrap;
}

.btn-action-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.btn-action-red:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
}

.btn-action-blue {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}
.btn-action-blue:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.btn-action-orange {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.btn-action-orange:hover {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35);
}

/* =========================================================
   2. ส่วนเนื้อหาหลัก (Main Content)
   ========================================================= */
.main-content {
  flex: 1 0 auto;
  background-color: #f0f2f5;
  background-image: radial-gradient(circle at 100% 100%, #fed7aa35 0%, #ffedd520 40%, transparent 70%);
  min-height: calc(100vh - 200px);
}

/* Service Portals Wrapper */
.services-wrapper {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  height: 100%;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.3px;
}

.section-desc {
  font-size: 0.98rem;
  color: #475569;
  line-height: 1.6;
}

/* Portal Cards 2x2 Grid (เพิ่มความกว้าง 10% สมดุลสวยงาม) */
.portal-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(206px, 248px)); /* เพิ่มความกว้างของการ์ดอีก 10% */
  gap: 12px; /* ปรับระยะห่างให้สมดุล */
  justify-content: center;
  align-items: stretch;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 575.98px) {
  .portal-cards-grid {
    grid-template-columns: minmax(0, 266px);
    gap: 10px;
  }
}

.portal-card {
  position: relative;
  background: linear-gradient(160deg, #ffffff 0%, #f0f7ff 50%, #e0f2fe 100%); /* พื้นหลังสีสันสวยงาม ไล่เฉดโทนเย็น */
  border-radius: 12px; /* ขอบโค้งมนนุ่มนวล */
  border: 1px solid #94a3b8; /* เส้นขอบสีเทา */
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08); /* เงาสีเทาเข้ม */
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  outline: none;
  width: 100%;
  height: 100%;
}

.portal-card:hover, .portal-card:focus-visible {
  transform: translateY(-4px);
  border-color: #64748b;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.12);
}

.portal-card-inner {
  padding: 0.85rem 0.75rem 0.75rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 155px;
  height: 100%;
}

.portal-illustration {
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease;
  width: 100%;
  max-width: 194px; /* ปรับเพิ่มความกว้างรูปภาพอีก 10% ให้สมดุล */
}

.portal-illustration svg {
  max-height: 98px; /* ลดความสูง SVG 15% จาก 115px */
  width: auto;
}

.portal-card:hover .portal-illustration {
  transform: scale(1.03);
}

.portal-name {
  text-align: center;
  width: 100%;
}

.portal-name .title {
  font-family: var(--font-heading); /* ฟอนต์ภาษาไทยหัวมน/ไร้หัว Prompt อ่านง่าย ชัดเจน */
  font-size: 0.92rem; /* ลดขนาดฟอนต์ 15% จาก 1.02rem */
  font-weight: 600;
  color: #011630; /* สีน้ำเงิน (#011630 / #000b17) */
  margin-top: 0.2rem;
  margin-bottom: 0;
  text-align: center; /* จัดวางกึ่งกลางใต้ภาพ */
  letter-spacing: 0.2px;
  transition: color 0.2s ease;
}

.portal-card:hover .portal-name .title {
  color: #000b17; /* สีน้ำเงินเข้มลึกเมื่อ hover */
}

.portal-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(1, 22, 48, 0.95), rgba(14, 73, 140, 0.88));
  color: #ffffff;
  padding: 0.4rem;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.25s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-card:hover .portal-overlay,
.portal-card:focus-visible .portal-overlay {
  opacity: 1;
  transform: translateY(0);
}

.btn-enter {
  font-family: var(--font-heading);
  font-size: 0.76rem; /* ลดขนาดฟอนต์ปุ่มเข้าสู่ระบบ */
  font-weight: 600;
  letter-spacing: 0.4px;
}

/* Announcements Wrapper (ฝั่งขวา) */
.announcements-wrapper {
  background: #ffffff;
  background: radial-gradient(ellipse at 100% 100%, #fed7aa40 0%, #fff7ed 35%, #ffffff 70%);
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  height: 100%;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.announcements-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.announcements-icon {
  color: #ea580c;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  z-index: 2;
}

.news-entry {
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
  line-height: 1.55;
  transition: background-color 0.2s ease;
}

.news-entry:hover {
  background-color: #fffaf5;
}

.news-bracket-date {
  color: #d84315;
  font-size: 0.9rem;
  letter-spacing: -0.2px;
}

.news-headline-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-headline-link:hover {
  color: #d84315;
  text-decoration: underline;
}

.announcements-bottom-spacer {
  height: 120px;
  background: radial-gradient(circle at 100% 100%, rgba(251, 146, 60, 0.2) 0%, rgba(254, 215, 170, 0.1) 50%, transparent 80%);
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}

/* =========================================================
   3. ส่วนท้าย (Footer)
   ========================================================= */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

.footer-upper {
  background-color: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.5rem;
}

.browser-icon-item {
  min-width: 55px;
}

.browser-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.2rem;
}

/* Social media buttons */
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  color: #f1f5f9;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn:hover {
  transform: translateY(-2px);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.btn-phone:hover { background-color: #059669; border-color: #059669; }
.btn-facebook:hover { background-color: #1877f2; border-color: #1877f2; }
.btn-youtube:hover { background-color: #ff0000; border-color: #ff0000; }
.btn-faq:hover { background-color: #6366f1; border-color: #6366f1; }
.btn-line:hover { background-color: #06c755; border-color: #06c755; }

/* Stats Item */
.stats-item {
  font-size: 0.88rem;
  color: #334155;
}

.stats-item .label {
  color: #64748b;
}

.stats-item .value {
  font-size: 1rem;
}

/* Bottom Footer (แถบครามไล่เฉดโทนสีเย็น พร้อมเงาตกกระทบแบบนุ่มนวล) */
.footer-bottom {
  background: linear-gradient(135deg, #0a1128 0%, #1c2541 50%, #274060 100%);
  color: #ffffff;
  border-top: 2px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 -4px 20px rgba(10, 17, 40, 0.25); /* เงาตกกระทบแบบนุ่มนวล */
}

.hover-white:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.policy-links {
  font-size: 0.85rem;
}

.copyright-text {
  font-size: 0.85rem;
}

.developer-credit .badge {
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* =========================================================
   Modal Styles: Refined Dark Gray Borders & Modern UI
   ========================================================= */
.modal-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

#loginModal .modal-content {
  border-radius: 18px;
  border: 1.5px solid #64748b;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(100, 116, 139, 0.15);
  overflow: hidden;
  background: #ffffff;
}

#loginModal .modal-header {
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1.5px solid #cbd5e1 !important;
}

#loginModal .modal-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

#loginModal .btn-close {
  background-color: #f1f5f9;
  border-radius: 50%;
  padding: 0.65rem;
  opacity: 0.75;
  transition: all 0.2s ease;
}

#loginModal .btn-close:hover {
  opacity: 1;
  background-color: #e2e8f0;
  transform: rotate(90deg);
}

#loginModal .modal-body {
  padding: 1.75rem 1.5rem 1.5rem;
}

#loginModal .form-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

#loginModal .input-group {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#loginModal .input-group-text {
  background-color: #f8fafc;
  border: 1.5px solid #64748b;
  border-right: none;
  color: #475569;
  font-size: 1.05rem;
  padding: 0.65rem 0.95rem;
  transition: all 0.2s ease;
}

#loginModal .form-control {
  border: 1.5px solid #64748b;
  font-size: 0.95rem;
  padding: 0.65rem 0.95rem;
  color: #0f172a;
  transition: all 0.2s ease;
}

#loginModal .form-control::placeholder {
  color: #94a3b8;
  font-size: 0.9rem;
}

#loginModal .form-control:focus {
  border-color: #2563eb;
  box-shadow: none;
  background-color: #ffffff;
}

#loginModal .input-group:focus-within {
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.18);
  border-radius: 10px;
}

#loginModal .input-group:focus-within .input-group-text,
#loginModal .input-group:focus-within .btn-outline-secondary {
  border-color: #2563eb;
}

#loginModal .input-group .btn-outline-secondary {
  background-color: #f8fafc;
  border: 1.5px solid #64748b;
  border-left: none;
  color: #475569;
  padding: 0.65rem 0.95rem;
  transition: all 0.2s ease;
}

#loginModal .input-group .btn-outline-secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

#loginModal .form-text {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 5px;
}

#loginModal .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid #64748b;
  border-radius: 4px;
  cursor: pointer;
}

#loginModal .form-check-input:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

#loginModal .form-check-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

#loginModal .forgot-pass-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  transition: color 0.15s ease;
}

#loginModal .forgot-pass-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

#loginModal #btnLoginSubmit {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

#loginModal #btnLoginSubmit:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

#loginModal .login-security-alert {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #166534;
  margin-top: 1.25rem;
}

#loginModal .login-security-alert i {
  color: #15803d;
  font-size: 1.15rem;
}

/* =========================================================
   4. Responsive Breakpoints
   ========================================================= */
@media (max-width: 991.98px) {
  .brand-title {
    font-size: 1.15rem;
  }
  
  .brand-subtitle {
    font-size: 0.85rem;
  }
  
  .quick-actions {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.75rem;
  }
  
  .btn-action-red,
  .btn-action-blue,
  .btn-action-orange {
    font-size: 0.82rem;
    padding: 0.45rem 0.8rem;
  }
}

@media (max-width: 767.98px) {
  .brand-section {
    flex-direction: row;
  }
  
  .brand-logo-svg {
    width: 54px;
    height: 54px;
  }
  
  .brand-title {
    font-size: 1.05rem;
  }
  
  .brand-en {
    display: none;
  }
  
  .quick-actions {
    flex-direction: column;
    align-items: stretch !important;
  }
  
  .quick-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .portal-card-inner {
    padding: 1rem 0.75rem;
  }
  
  .footer-upper {
    text-align: left;
  }
}

/* =========================================================
   5. สไตล์สำหรับระบบบริหารสถานศึกษา และหน้า Personnel
   ========================================================= */

/* Top Bar User Profile Info (Interactive Pill Button) */
.header-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.42rem 0.95rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-decoration: none;
}

.header-user-info:hover, .header-user-info:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.header-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.header-user-info:hover .header-user-avatar {
  transform: scale(1.08);
}

.header-user-text {
  line-height: 1.25;
}

.header-user-name {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
}

.header-user-dept {
  font-size: 0.74rem;
  color: #bae6fd;
}

.btn-header-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-header-logout:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
}

/* Screen Mode (โหมดหน้าจอ) Header Button & Dropdown */
.btn-header-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  user-select: none;
}

.btn-header-mode:hover, .btn-header-mode:focus, .btn-header-mode.show {
  background: rgba(255, 255, 255, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}

.btn-header-mode i {
  font-size: 0.95rem;
  color: #38bdf8;
  transition: transform 0.3s ease;
}

.btn-header-mode:hover i {
  transform: rotate(20deg);
}

.dropdown-menu .dropdown-item {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f1f5f9;
}

.dropdown-menu .dropdown-item.active {
  background-color: #e0f2fe;
  color: #0284c7;
  font-weight: 600;
}

.dropdown-menu .dropdown-item.active .check-icon {
  display: inline-block !important;
  color: #0284c7;
}

/* Operation Calendar Button (ปุ่มปฏิทินการดำเนินงาน) */
.btn-operation-calendar {
  background-color: #64748b;
  color: #ffffff;
  border: 1px solid #475569;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-operation-calendar:hover {
  background-color: #475569;
  color: #ffffff;
  border-color: #334155;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* Breadcrumb Navigation Bar */
.admin-breadcrumb-bar {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #94a3b8;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12), 0 1px 4px rgba(15, 23, 42, 0.06);
  padding: 0.65rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-breadcrumb {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.admin-breadcrumb a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 500;
}

.admin-breadcrumb a:hover {
  color: #0369a1;
  text-decoration: underline;
}

.admin-breadcrumb-separator {
  color: #94a3b8;
  font-size: 0.75rem;
}

.admin-breadcrumb-current {
  color: #334155;
  font-weight: 600;
}

/* Sidebar Menu Navigation (ส่วนที่ 2: เมนูระบบย่อย 10 เมนู) */
.sidebar-panel {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #94a3b8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  padding: 0;
  overflow: hidden;
  height: auto;
}

.sidebar-heading {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #0b1f3a 0%, #153e75 50%, #1d5ca3 100%);
  border-bottom: 2px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.12);
}

.sidebar-heading i {
  color: #38bdf8;
}

.sidebar-menu-list {
  list-style: none;
  padding: 0.75rem 0.65rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-menu-item a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  position: relative;
}

.sidebar-menu-item a:hover {
  background-color: #f8fafc;
  color: #0284c7;
  transform: translateX(4px);
  border-color: #e2e8f0;
}

.sidebar-menu-item a .menu-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.92rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.sidebar-menu-item a:hover .menu-icon {
  transform: scale(1.1);
}

/* 🎨 10 สีเฉพาะตัวสำหรับแต่ละเมนู */
.icon-color-home { background: #e0f2fe !important; color: #0284c7 !important; }
.icon-color-calendar { background: #ffedd5 !important; color: #ea580c !important; }
.icon-color-users { background: #cffafe !important; color: #0891b2 !important; }
.icon-color-exec { background: #fef3c7 !important; color: #d97706 !important; }
.icon-color-personnel { background: #dbeafe !important; color: #2563eb !important; }
.icon-color-dept { background: #dcfce7 !important; color: #16a34a !important; }
.icon-color-student { background: #fce7f3 !important; color: #db2777 !important; }
.icon-color-alumni { background: #f3e8ff !important; color: #9333ea !important; }
.icon-color-classroom { background: #fef9c3 !important; color: #ca8a04 !important; }
.icon-color-news { background: #ffe4e6 !important; color: #e11d48 !important; }

/* สถานะ Active เมื่อเลือกเมนู */
.sidebar-menu-item.active a {
  background: linear-gradient(135deg, #0b2a59 0%, #114282 50%, #1b5ca8 100%);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(11, 42, 89, 0.28);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.sidebar-menu-item.active a .menu-icon {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ป้ายแท็ก Active ทางขวา (Cyan Rounded Pill Badge) */
.menu-active-tag {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  background: #38bdf8;
  color: #03203c;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  margin-left: auto;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

/* =========================================================
   Module View Panes & Header Themes (Main Content Area ฝั่งขวา)
   ========================================================= */
.module-view-pane {
  display: none;
  animation: fadeInView 0.25s ease-in-out forwards;
}

.module-view-pane.active {
  display: block;
}

@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.module-header-banner {
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.module-header-banner .module-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.module-header-banner .module-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.3;
}

.module-header-banner .module-subtitle {
  font-size: 0.88rem;
  opacity: 0.88;
  margin: 0;
}

.module-card-body-box {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #94a3b8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-card-body-box.cursor-pointer:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.1);
  border-color: #64748b;
}

.hover-shadow {
  background: #ffffff;
  border: 1px solid #94a3b8 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1), 0 1px 4px rgba(15, 23, 42, 0.06);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-shadow:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.12) !important;
  border-color: #475569 !important;
}

.banner-home { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }
.banner-calendar { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); }
.banner-users { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.banner-exec { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.banner-personnel { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.banner-dept { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); }
.banner-student { background: linear-gradient(135deg, #db2777 0%, #be185d 100%); }
.banner-alumni { background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%); }
.banner-classroom { background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%); }
.banner-news { background: linear-gradient(135deg, #e11d48 0%, #be123c 100%); }

.modal-header-personnel { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); color: #ffffff; }
.modal-header-calendar { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); color: #ffffff; }
.modal-header-users { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); color: #ffffff; }
.modal-header-exec { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); color: #ffffff; }
.modal-header-dept { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); color: #ffffff; }
.modal-header-student { background: linear-gradient(135deg, #db2777 0%, #be185d 100%); color: #ffffff; }
.modal-header-alumni { background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%); color: #ffffff; }
.modal-header-classroom { background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%); color: #ffffff; }
.modal-header-news { background: linear-gradient(135deg, #e11d48 0%, #be123c 100%); color: #ffffff; }

.modal-stat-badge {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  text-align: center;
}
.modal-stat-number {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}
.modal-stat-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.exec-directory-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.15rem 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  height: 100%;
}
.exec-directory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  border-color: #fde68a;
}
.exec-avatar-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  border: 3px solid #f59e0b;
  background: #fffbeb;
  color: #d97706;
}

/* User Profile & Security Card (ส่วนที่ 3: กล่องสีเขียวขวาบน) */
.user-profile-card-green {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #bbf7d0;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.08);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.profile-card-header-green {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  padding: 0.85rem 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-card-body {
  padding: 1.25rem 1rem;
}

.profile-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 0.85rem;
}

.profile-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #16a34a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  background: #f8fafc;
}

.profile-role-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #22c55e;
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 2px solid #ffffff;
}

.profile-info-block {
  text-align: center;
  margin-bottom: 1rem;
}

.profile-user-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.2rem;
}

.profile-user-role {
  font-size: 0.85rem;
  color: #15803d;
  font-weight: 600;
  background: #dcfce7;
  display: inline-block;
  padding: 0.15rem 0.65rem;
  border-radius: 20px;
}

.profile-audit-section {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.audit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0;
  color: #475569;
}

.audit-row .audit-label {
  color: #64748b;
}

.audit-row .audit-value {
  font-weight: 600;
  color: #1e293b;
}

.profile-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn-profile-action {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-profile-action:hover {
  background: #f1f5f9;
  color: #0284c7;
  border-color: #cbd5e1;
}

.btn-helpdesk-action {
  width: 100%;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-helpdesk-action:hover {
  background: #eff6ff;
  color: #0284c7;
  border-color: #93c5fd;
}

/* Contact / Support Card (กล่องสีม่วง) */
.support-card-purple {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e9d5ff;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.06);
  overflow: hidden;
}

.support-card-header-purple {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: #ffffff;
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.support-card-body {
  padding: 1rem;
  font-size: 0.84rem;
  color: #475569;
}

/* Stats Summary Cards (ส่วนแสดงสถิติตัวเลข) */
.personnel-stat-card {
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  border-radius: 14px;
  border: 1px solid #94a3b8;
  padding: 1rem 1.15rem;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.12), 0 2px 5px rgba(15, 23, 42, 0.06);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.personnel-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.1);
  border-color: #64748b;
}

.stat-content .stat-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.stat-content .stat-number {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: #011630;
  line-height: 1.1;
}

.stat-content .stat-unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: #64748b;
  margin-left: 0.25rem;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.icon-blue { background: #e0f2fe; color: #0284c7; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-purple { background: #f3e8ff; color: #9333ea; }
.icon-red { background: #fee2e2; color: #dc2626; }

/* Personnel Toolbar & Filters */
.personnel-toolbar-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #94a3b8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.filter-input-group {
  position: relative;
}

.filter-input-group .form-control {
  padding-left: 2.35rem;
  border-radius: 10px;
  border-color: #94a3b8;
  font-size: 0.9rem;
}

.filter-input-group .form-control:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.filter-input-group .input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  z-index: 5;
}

.form-select-custom {
  border-radius: 10px;
  border-color: #94a3b8;
  font-size: 0.9rem;
}

.form-select-custom:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Personnel Data Table */
.personnel-table-container {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #94a3b8;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.table-personnel {
  margin-bottom: 0;
  vertical-align: middle;
  font-size: 0.9rem;
}

.table-personnel thead th {
  background-color: #f8fafc;
  color: #334155;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.86rem;
  border-bottom: 2px solid #94a3b8;
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.table-personnel tbody tr {
  transition: background-color 0.15s ease;
}

.table-personnel tbody tr:hover {
  background-color: #f0f7ff;
}

.table-personnel tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.personnel-avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #94a3b8;
  background: #ffffff;
}

.personnel-name-cell {
  line-height: 1.35;
}

.personnel-fullname {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #0f172a;
  font-size: 0.92rem;
}

.personnel-id-code {
  font-size: 0.78rem;
  color: #64748b;
  font-family: monospace;
}

.badge-dept {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-position {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #94a3b8;
}

.badge-status-active {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: #dcfce7;
  color: #15803d;
}

/* Action Buttons inside Table */
.btn-table-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #94a3b8;
  background: #ffffff;
  color: #475569;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-table-action:hover {
  transform: translateY(-1px);
}

.btn-table-view:hover { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
.btn-table-edit:hover { background: #fef3c7; color: #d97706; border-color: #fde68a; }
.btn-table-delete:hover { background: #fee2e2; color: #dc2626; border-color: #fecaca; }

/* Cards Grid View (สำหรับสลับมุมมอง) */
.personnel-grid-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #94a3b8;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.12), 0 2px 5px rgba(15, 23, 42, 0.06);
  padding: 1.25rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.personnel-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.22), 0 4px 10px rgba(15, 23, 42, 0.1);
  border-color: #64748b;
}

.exec-directory-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #94a3b8;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  padding: 1.25rem;
  text-align: center;
  transition: all 0.25s ease;
  height: 100%;
}

.exec-directory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);
  border-color: #64748b;
}

.grid-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e0f2fe;
  margin: 0 auto 0.75rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
}

/* Pagination Bar */
.pagination-container {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Responsive adjustments for 3-column admin */
@media (max-width: 1199.98px) {
  .admin-layout-row {
    row-gap: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .header-user-info {
    display: none; /* ซ่อนบนจอมือถือเล็กมากเพื่อไม่ให้ล้น */
  }
  
  .personnel-stat-card {
    padding: 0.75rem 0.85rem;
  }
  
  .stat-content .stat-number {
    font-size: 1.35rem;
  }
}

/* =========================================================
   6. Dark Mode Styles (โหมดมืด ถนอมสายตา)
   ========================================================= */
[data-theme="dark"] {
  --bg-main: #0b1320;
  --bg-card: #152238;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border-light: #1e3a5f;
}

[data-theme="dark"] body {
  background-color: #0b1320 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .sidebar-panel,
[data-theme="dark"] .module-card-body-box,
[data-theme="dark"] .admin-breadcrumb-bar,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .personnel-data-card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .exec-directory-card,
[data-theme="dark"] .info-card-item,
[data-theme="dark"] .modal-stat-badge,
[data-theme="dark"] .card,
[data-theme="dark"] .pagination-container,
[data-theme="dark"] .filter-card {
  background-color: #152238 !important;
  border-color: #1e3a5f !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .table {
  color: #e2e8f0 !important;
  border-color: #1e3a5f !important;
}

[data-theme="dark"] .table-light,
[data-theme="dark"] thead.table-light,
[data-theme="dark"] thead.table-light th {
  background-color: #1a2c47 !important;
  color: #f1f5f9 !important;
  border-color: #1e3a5f !important;
}

[data-theme="dark"] .table-bordered td,
[data-theme="dark"] .table-bordered th {
  border-color: #1e3a5f !important;
}

[data-theme="dark"] .table-hover > tbody > tr:hover > * {
  background-color: #1c3150 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .sidebar-menu-item a {
  color: #cbd5e1;
}

[data-theme="dark"] .sidebar-menu-item a:hover {
  background-color: #1a2c47;
  color: #38bdf8;
  border-color: #1e3a5f;
}

[data-theme="dark"] .sidebar-menu-item.active a {
  background: linear-gradient(135deg, #0b2a59 0%, #114282 50%, #1b5ca8 100%) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
}

[data-theme="dark"] .admin-breadcrumb-current,
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6,
[data-theme="dark"] .text-dark {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
  color: #94a3b8 !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #1a2c47 !important;
  border-color: #1e3a5f !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: #1a2c47 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .form-control::placeholder {
  color: #64748b !important;
}

[data-theme="dark"] .bg-light {
  background-color: #1a2c47 !important;
}

[data-theme="dark"] .border {
  border-color: #1e3a5f !important;
}

[data-theme="dark"] .dropdown-menu {
  background-color: #152238 !important;
  border: 1px solid #1e3a5f !important;
}

[data-theme="dark"] .dropdown-item {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .dropdown-item:hover {
  background-color: #1a2c47 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .dropdown-item.active {
  background-color: #1e3a5f !important;
  color: #38bdf8 !important;
}

[data-theme="dark"] .dropdown-divider {
  border-color: #1e3a5f !important;
}

[data-theme="dark"] .dropdown-header {
  color: #94a3b8 !important;
}

[data-theme="dark"] .hover-shadow:hover {
  background-color: #1a2c47 !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: #1e3a5f !important;
}

