* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f4f6f9;
}

.layout {
    display: flex;
    height: 100vh;
}

/* 🔹 สไดล์บาร์ */
/* ============================================
   SIDEBAR STYLES
   โทนสีฟ้า-ชมพู | Font: Prompt + Sarabun
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ======= SIDEBAR WRAPPER ======= */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(160deg, #1a3a6e 0%, #1e4d8c 40%, #7b2d6e 100%);
  display: flex;
 
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 4px 0 24px rgba(26, 58, 110, 0.35);
}

/* Decorative glow blobs */
.sidebar::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 150, 200, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 60px;
  left: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(100, 180, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ======= LOGO AREA ======= */
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 18px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
}

.logo-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 30%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.25),
    0 0 0 4px rgba(255, 255, 255, 0.15);
  margin-bottom: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.logo-circle:hover {
  transform: scale(1.06);
}

.logo-circle img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.logo-circle .logo-icon {
  font-size: 36px;
  color: #1e4d8c;
}

.school-name {
  font-family: 'Prompt', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.school-sub {
  font-family: 'Sarabun', sans-serif;
  font-size: 11px;
  color: rgba(255, 200, 230, 0.85);
  margin-top: 2px;
  text-align: center;
}

/* ======= SECTION TITLE ======= */
.sidebar-title {
  font-family: 'Prompt', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 200, 230, 0.65);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  padding: 16px 20px 6px;
}

/* ======= NAV LINKS ======= */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
  font-weight: 400;
  border-radius: 0 24px 24px 0;
  margin: 2px 10px 2px 0;
  transition: all 0.22s ease;
}

.nav-link i {
  width: 18px;
  font-size: 13px;
  color: rgba(255, 200, 230, 0.8);
  flex-shrink: 0;
  transition: color 0.22s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  padding-left: 26px;
}

.nav-link:hover i {
  color: #f9a8d4;
}

/* ======= DROPDOWN MENU ======= */
.menu {
  margin: 2px 0;
}

.menu-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 24px 24px 0;
  margin-right: 10px;
  transition: all 0.22s ease;
}

.menu-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #f472b6);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(244, 114, 182, 0.6);
}

.menu-btn .arrow {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 200, 230, 0.7);
  transition: transform 0.3s ease;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menu.open .menu-btn .arrow {
  transform: rotate(180deg);
}

/* ── Submenu ── */
.submenu {
  display: none;
  background: rgba(0, 0, 0, 0.15);
  border-left: 2px solid rgba(244, 114, 182, 0.4);
  margin-left: 24px;
  border-radius: 0 0 8px 0;
  overflow: hidden;
}

.menu.open .submenu {
  display: block;
  animation: slideDown 0.25s ease;
}

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

.submenu .nav-link {
  font-size: 13px;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 6px 0 0;
}

.submenu .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding-left: 20px;
}

/* ======= DIVIDER ======= */
.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 20px;
}

/* ======= LOGOUT ======= */
.logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255, 200, 230, 0.85);
  text-decoration: none;
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  transition: all 0.22s ease;
  background: rgba(0, 0, 0, 0.1);
}

.logout i {
  font-size: 14px;
}

.logout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

/* 🔹 Content */
.content {
    flex: 1;
    padding: 40px;
}


.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: transparent;
    padding: 8px 0;
}

.table-section h1 {
    margin-bottom: 12px;
    color: #1f2937;
}


.student-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.student-table th, .student-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.student-table th {
    background: #2c3e50;
    color: white;
}

.student-table tr:hover {
    background: #f5f7fa;
}

/* สถานะ */
.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}


/* ปุ่ม */
.btn {
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
}

.btn.edit { background: #ffd745; color: white; }
.btn.delete { background: #e74c3c; color: white; }


.summary-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}


/* 🔹 สไตล์พื้นฐานของ Card (แบบ Modern) */
.summary-card {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    border-radius: 18px;
    text-decoration: none;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

/* 🔹 ตกแต่ง Icon Box */
.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 20px;
    transition: all 0.3s ease;
}

/* 🎨 แยกสีตามธีม (ม.1 / ม.4 / รวม) */

/* ม.1 - สีฟ้า */
.summary-card.smte .card-icon {
    background: #e0f2fe;
    color: #0284c7;
}
.summary-card.smte:hover .card-icon {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
}

/* ม.4 - สีชมพู */
.summary-card.mep .card-icon {
    background: #fce7f3;
    color: #db2777;
}
.summary-card.mep:hover .card-icon {
    background: #db2777;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(219, 39, 119, 0.4);
}

/* รวมทั้งหมด - สีคราม/เขียว */
.summary-card.total .card-icon {
    background: #f0fdf4;
    color: #16a34a;
}
.summary-card.total:hover .card-icon {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(22, 163, 74, 0.4);
}

/* 🔹 ตกแต่งตัวเลขและข้อความ */
.card-content {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2px;
}

.card-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.card-unit {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ===============================
   🔥 DataTable Style (เหมือนหน้า Ticket)
=============================== */

table.display {
    width: 100% !important;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

table.display thead {
    background: #2c3e50;
    color: #ffffff;
}

table.display th,
table.display td {
    padding: 12px;
    text-align: left;
}

table.display tbody tr:nth-child(even) {
    background: #f8fafc;
}

table.display tbody tr:hover {
    background: #eef2f7;
}

/* 🔹 DataTable Search */
.dataTables_filter input {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* 🔹 Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 2px;
    border-radius: 6px;
    background: #e2e8f0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #3b82f6 !important;
    color: #fff !important;
}

/* ===============================
   🔹 Button Fix
=============================== */

.btn-primary {
    background: #3498db;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
}

.btn-primary:hover,
.btn-danger:hover {
    opacity: 0.85;
}


/* ===============================
chart */

.chart-box{
    display:flex;
    gap:30px;
    margin-bottom:40px;
}

.chart-left{
    flex:2;
}

.chart-right{
    flex:1;
    display:flex;
    flex-direction:column;
    gap:15px;
}

.stat-card{
    background:white;
    padding:20px;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    text-align:center;
}


