/* ==========================================================================
  1. FOUNDATION - ตัวแปรและสไตล์พื้นฐาน
  ========================================================================== */

/* 1.1 Color & Design Variables */
:root {
  /* Primary Colors */
  --psru-primary: #00796b;
  --psru-secondary: #009688;
  --psru-accent: #26a69a;
  --psru-light: #e0f2f1;
  --psru-dark: #004d40;

  /* Status Colors */
  --psru-success: #28a745;
  --psru-info: #17a2b8;
  --psru-warning: #ffc107;
  --psru-danger: #dc3545;
  --psru-purple: #6f42c1;

  /* Gradients */
  --psru-gradient: linear-gradient(
    135deg,
    var(--psru-primary) 0%,
    var(--psru-secondary) 100%
  );

  /* Shadows */
  --psru-card-shadow: 0 6px 15px rgba(0, 121, 107, 0.1);

  /* Layout */
  --sidebar-width: 280px;
}

/* 1.2 Base Styles */
body {
  font-family: "Kanit", sans-serif;
  background-color: #f8f9fa;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  padding-top: 0px;
}

/* ==========================================================================
  2. LAYOUT COMPONENTS - ส่วนประกอบโครงสร้างหลัก
  ========================================================================== */

/* 2.1 Navigation */
.navbar-psru {
  background: var(--psru-gradient);
  box-shadow: 0 4px 20px rgba(0, 121, 107, 0.15);
  padding: 0.8rem 0;
  transition: all 0.3s ease;
  z-index: 1030;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.navbar-psru.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 15px rgba(0, 121, 107, 0.2);
}

.navbar-brand img {
  height: 50px;
  transition: all 0.3s;
}

.navbar-psru.user-logged-in .navbar-toggler {
  display: none !important;
}

.navbar-psru.user-logged-in .navbar-collapse {
  display: flex !important;
  flex-basis: auto;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.2rem;
  border-radius: 6px;
  transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
}

.user-dropdown .dropdown-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: white;
  transition: all 0.3s;
}

.user-dropdown .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 2.2 Sidebar & Menu System */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 1020;
  transform: translateX(-100%);
}

.sidebar.show {
  transform: translateX(0);
}

.sidebar-header {
  background: var(--psru-gradient);
  padding: 1.5rem;
  color: white;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 80px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-user {
  margin-top: 80px;
  padding: 1.5rem;
  border-bottom: 1px solid #e9ecef;
  text-align: center;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--psru-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 2rem;
  color: var(--psru-primary);
  border: 3px solid var(--psru-primary);
}

.sidebar-menu {
  padding: 1rem 0;
  height: calc(100vh - 240px);
  overflow-y: auto;
}

.menu-section {
  margin-bottom: 1.5rem;
}

.menu-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #495057;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background-color: var(--psru-light);
  color: var(--psru-primary);
  border-left-color: var(--psru-primary);
}

.menu-item.active {
  background-color: var(--psru-light);
  color: var(--psru-primary);
  border-left-color: var(--psru-primary);
  font-weight: 500;
}

.menu-icon {
  width: 20px;
  margin-right: 0.75rem;
  text-align: center;
}

.menu-badge {
  margin-left: auto;
  background: var(--psru-primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  margin-right: 1rem;
  transition: all 0.3s ease;
  display: none;
}

.sidebar-toggle:hover {
  color: var(--psru-light);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1015;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

/* 2.3 Main Content */
.main-content {
  margin-left: 0;
  transition: all 0.3s ease;
  min-height: 100vh;
  padding-top: 80px;
}

.main-content.with-sidebar {
  margin-left: var(--sidebar-width);
}

/* 2.4 Footer */
.footer-psru {
  background: #004d4d;
  color: white;
  position: relative;
  overflow: hidden;
}

.footer-psru::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/pibul1.jpg") center/cover;
  opacity: 0.05;
  z-index: 0;
}

.footer-link {
  color: #d9ebeb;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link:hover {
  color: white;
}

/* ==========================================================================
  3. UI COMPONENTS - ส่วนประกอบอินเทอร์เฟซ
  ========================================================================== */

/* 3.1 Cards */
.content-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--psru-card-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.welcome-card {
  background: var(--psru-gradient);
  color: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.stats-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  background: white;
  box-shadow: var(--psru-card-shadow);
  transition: all 0.3s;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--psru-primary);
}

.stats-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--psru-dark);
}

.stats-label {
  color: #6c757d;
  font-size: 0.875rem;
}

.registration-card {
  border: none;
  border-radius: 15px;
  box-shadow: var(--psru-card-shadow);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.registration-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 121, 107, 0.15);
}

.card-psru {
  border: none;
  border-radius: 12px;
  box-shadow: var(--psru-card-shadow);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  height: 100%;
}

.card-psru:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 121, 107, 0.15);
}

.card-header-psru {
  background: var(--psru-gradient);
  color: white;
  padding: 1.5rem 2rem;
  border-bottom: none;
}

.card-header-psru .round-info {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}

.card-body {
  padding: 2rem;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: var(--psru-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 3.2 Buttons & Actions */
.btn-psru {
  background: var(--psru-gradient);
  color: white;
  border: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-psru:hover {
  background: var(--psru-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-psru {
  border: 2px solid var(--psru-primary);
  color: var(--psru-primary);
  font-weight: 500;
  background: transparent;
  border-radius: 8px;
}

.btn-outline-psru:hover {
  background: var(--psru-primary);
  color: white;
}

.btn-danger-psru {
  background: var(--psru-danger);
  color: white;
  border: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s;
}

.btn-danger-psru:hover {
  background: #c82333;
  color: white;
}

.btn-outline-purple {
  border-color: #6f42c1;
  color: #6f42c1;
}

.btn-outline-purple:hover {
  background-color: #6f42c1;
  color: white;
}

.filter-btn {
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--psru-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s;
}

.floating-btn:hover {
  transform: scale(1.1) translateY(-5px);
  color: white;
}

/* 3.3 Forms & Inputs */
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-title {
  color: var(--psru-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.section-title i {
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--psru-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 121, 107, 0.25);
}

.required-field::after {
  content: " *";
  color: var(--psru-danger);
}

.form-control-lg {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 2px solid #e9ecef;
  transition: all 0.3s;
}

.form-control-lg:focus {
  border-color: var(--psru-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 121, 107, 0.25);
}

.form-check-input:checked {
  background-color: var(--psru-primary);
  border-color: var(--psru-primary);
}

.form-check-input:focus {
  border-color: var(--psru-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 121, 107, 0.25);
}

.form-check-input[type="radio"],
.form-check-input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.75rem;
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input[type="radio"]:checked {
  background-color: var(--psru-primary);
  border-color: var(--psru-primary);
}

.form-check-input[type="checkbox"]:checked {
  background-color: var(--psru-primary);
  border-color: var(--psru-primary);
}

.form-check-label {
  font-size: 1.1rem;
  color: #495057;
  padding-top: 0.1rem;
}

.form-check-input:focus {
  border-color: var(--psru-primary);
  box-shadow: 0 0 0 0.25rem rgba(0, 121, 107, 0.25);
}

.form-check {
  display: flex;
  align-items: center;
  min-height: 2rem;
  margin-bottom: 1rem;
}

/* 3.4 Badges & Status Indicators */
.status-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
}

.status-approved {
  background-color: #d1edff;
  color: #0c5460;
}

.status-completed {
  background-color: #d4edda;
  color: #155724;
}

.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}

.status-waiting {
  background-color: #fff3cd;
  color: #856404;
}

.status-paid {
  background-color: #d4edda;
  color: #155724;
}

.status-unpaid {
  background-color: #fff3cd;
  color: #856404;
}

.badge-psru {
  background: var(--psru-gradient);
  color: white;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.badge.bg-success {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  font-weight: 500;
}

.badge.bg-light {
  border: 1px solid #dee2e6;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
}

.evidence-status-P {
  background-color: #d4edda;
  color: #155724;
}

.evidence-status-N {
  background-color: #f8d7da;
  color: #721c24;
}

.evidence-status-E {
  background-color: #fff3cd;
  color: #856404;
}

.evidence-status-empty {
  background-color: #e9ecef;
  color: #6c757d;
}

.evidence-status-P {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.evidence-status-N {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.evidence-status-E {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.evidence-status-pending {
  background-color: #e9ecef;
  color: #6c757d;
  border: 1px solid #dee2e6;
}

.evidence-status-missing {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px dashed #dc3545;
}

/* 3.5 Progress & Timeline */
.progress {
  height: 8px;
  border-radius: 4px;
}

.progress-bar {
  background: var(--psru-gradient);
}

.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #e9ecef;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--psru-primary);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--psru-primary);
}

.step-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.step-progress::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: #e9ecef;
  transform: translateY(-50%);
  z-index: 1;
}

.step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #6c757d;
  position: relative;
  z-index: 2;
  transition: all 0.3s;
}

.step.active {
  border-color: var(--psru-primary);
  background: var(--psru-primary);
  color: white;
}

.step.completed {
  border-color: var(--psru-success);
  background: var(--psru-success);
  color: white;
}

/* 3.6 List Groups */
.list-group-item {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}

.list-group-item:hover {
  border-color: var(--psru-primary);
  background-color: #f0f9f8;
}

/* ==========================================================================
  4. PAGE SECTIONS - ส่วนต่างๆ ของหน้าเว็บ
  ========================================================================== */

/* 4.1 Hero Section */
.hero-section {
  background: var(--psru-gradient);
  color: white;
  padding: 5rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../images/pibul1.jpg") center/cover;
  opacity: 0.1;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* 4.2 Announcements Section */
.announcement-card {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.announcement-card:hover {
  border-color: var(--psru-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 121, 107, 0.15);
}

.announcements-list {
  max-height: 60vh;
  overflow-y: auto;
}

.announcements-list::-webkit-scrollbar {
  width: 6px;
}

.announcements-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.announcements-list::-webkit-scrollbar-thumb {
  background: var(--psru-primary);
  border-radius: 3px;
}

.announcements-list::-webkit-scrollbar-thumb:hover {
  background: var(--psru-dark);
}

.card.border-primary {
  border-left: 4px solid var(--psru-primary) !important;
}

.announcement-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.announcement-buttons .btn-psru {
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  margin: 0;
}

/* 4.3 Admission Rounds */
.round-card {
  border-left: 4px solid var(--psru-primary);
  transition: all 0.3s;
  height: 100%;
}

.round-number {
  width: 35px;
  height: 35px;
  background: var(--psru-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 1rem;
}

.round-badge {
  background: var(--psru-primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
}

.round-info-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.round-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.round-detail-label {
  font-weight: 500;
  opacity: 0.9;
}

.round-detail-value {
  opacity: 0.9;
}

/* Round Color Variations */
.round-1 {
  border-left-color: #28a745;
}

.round-2 {
  border-left-color: #17a2b8;
}

.round-3 {
  border-left-color: #ffc107;
}

.round-4 {
  border-left-color: #dc3545;
}

.round-5 {
  border-left-color: #6c757d;
}

.round-special {
  border-left-color: #6f42c1;
}

/* 4.4 Features & Quick Links */
.feature-icon {
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--psru-gradient);
  color: white;
  font-size: 1.8rem;
  border-radius: 18px;
  margin-bottom: 1.5rem;
}

.quick-link-item {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  transition: all 0.3s;
  margin-bottom: 0.5rem;
}

.quick-link-item:hover {
  background-color: rgba(0, 121, 107, 0.05);
  transform: translateX(5px);
}

/* ==========================================================================
  5. APPLICATION FEATURES - ฟีเจอร์การสมัคร
  ========================================================================== */

/* 5.1 Application Cards & Status */
.application-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.application-stats {
  background: var(--psru-gradient);
  color: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* 5.2 School Selection */
.school-item {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
  padding: 1.25rem;
  cursor: pointer;
}

.school-item:hover {
  border-color: var(--psru-primary);
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f9f8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 121, 107, 0.15);
}

.school-name {
  color: var(--psru-dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.school-location .text-muted {
  font-size: 0.85rem;
  background: rgba(0, 121, 107, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 121, 107, 0.1);
}

.school-location .d-flex {
  gap: 0.5rem;
}

.school-location i {
  width: 14px;
  color: var(--psru-primary);
}

.school-selected {
  background-color: #e8f5e8;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.selected-school-card {
  background: linear-gradient(135deg, #f8fff8 0%, #f0f9f0 100%);
  border: 2px solid #c8e6c9;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
}

.selected-school-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--psru-success);
  border-radius: 4px 0 0 4px;
}

/* 5.3 Major Selection */
.major-item {
  border-left: 3px solid #e9ecef;
  padding-left: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.major-item:hover {
  border-left-color: var(--psru-primary);
  background-color: #f8f9fa;
}

.major-row {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: between;
  position: relative;
}

.major-row:hover {
  border-color: var(--psru-primary);
  background-color: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 121, 107, 0.1);
}

.major-row.selected {
  border-color: var(--psru-primary);
  background: linear-gradient(135deg, #f8fff8 0%, #f0f9f0 100%);
}

.major-row.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f8f9fa;
}

.major-order-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 30px;
  height: 30px;
  background: var(--psru-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.75rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.major-info {
  flex: 1;
  min-width: 0;
  margin-left: 1rem;
}

.major-name {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.major-faculty {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.major-curriculum {
  display: none;
}

.major-action {
  margin-left: 1rem;
  flex-shrink: 0;
}

.select-major-btn {
  background: var(--psru-primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 80px;
}

.select-major-btn:hover {
  background: var(--psru-dark);
}

.select-major-btn.selected {
  background: var(--psru-danger);
}

.select-major-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.selected-order-badge {
  background: var(--psru-gradient);
  color: white;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.selected-order-badge .order-number {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.order-remove-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.3s;
}

.order-remove-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.major-selected {
  background-color: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  position: relative;
}

.selected-major-card {
  background: linear-gradient(135deg, #f8fff8 0%, #f0f9f0 100%);
  border: 2px solid #c8e6c9;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.selected-major-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--psru-success);
  border-radius: 4px 0 0 4px;
}

.major-remove-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--psru-danger);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.3s;
}

.major-remove-btn:hover {
  background-color: rgba(220, 53, 69, 0.1);
}

/* 5.4 Education Levels */
.education-level-option {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.education-level-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--psru-gradient);
  opacity: 0.1;
  transition: all 0.3s;
}

.education-level-option:hover::before {
  left: 0;
}

.education-level-option.active {
  border-color: var(--psru-primary);
  background-color: #f0f9f8;
}

.education-level-option.active::before {
  left: 0;
}

.education-level-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.education-level-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.bachelor-icon {
  background: var(--psru-gradient);
}

.transfer-icon {
  background: linear-gradient(135deg, var(--psru-info) 0%, #20c997 100%);
}

/* 5.5 File Upload */
.file-upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
  background-color: #f8f9fa;
}

.file-upload-area:hover {
  border-color: var(--psru-primary);
  background-color: #f0f9f8;
}

.file-upload-area.dragover {
  border-color: var(--psru-primary);
  background-color: var(--psru-light);
}

.file-preview {
  max-width: 150px;
  max-height: 150px;
  border-radius: 8px;
  object-fit: cover;
}

/* 5.6 GPA Input */
.gpa-input-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gpa-input {
  margin-bottom: 1rem;
}

/* 5.7 PDPA & Agreements */
.pdpa-agreement {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

/* 5.8 Study Plan */
.study-plan-select {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  transition: all 0.3s;
  background: white;
}

.study-plan-select:focus {
  border-color: var(--psru-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 121, 107, 0.25);
}

.collapse-toggle {
  cursor: pointer;
  transition: all 0.3s;
}

.collapse-toggle:hover {
  color: var(--psru-primary);
}

.alert-psru {
  border-left: 4px solid var(--psru-primary);
  background-color: #f0f9f8;
  border-radius: 8px;
  padding: 1rem;
}

/* ==========================================================================
  6. MEDIA & INTERACTIVE COMPONENTS - สื่อและคอมโพเนนต์เชิงโต้ตอบ
  ========================================================================== */

/* 6.1 Calendar */
.calendar-date {
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--psru-gradient);
  color: white;
  border-radius: 12px;
  margin-right: 1.5rem;
}

/* 6.2 Carousel */
.carousel-item img {
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

/* 6.3 Exam Components */
.exam-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.exam-type {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

.exam-interview {
  background-color: #e3f2fd;
  color: #1565c0;
}

.exam-written {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.exam-practical {
  background-color: #e8f5e8;
  color: #2e7d32;
}

.exam-oral {
  background-color: #fff3e0;
  color: #ef6c00;
}

.exam-schedule {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
  7. UTILITY CLASSES - คลาสช่วยเหลือ
  ========================================================================== */

/* 7.1 Color Utilities */
.text-psru-primary {
  color: var(--psru-primary);
}

.bg-psru-light {
  background-color: var(--psru-light);
}

.bg-purple {
  background-color: #6f42c1 !important;
}

.text-purple {
  color: #6f42c1 !important;
}

mark.bg-warning {
  background-color: #fff3cd !important;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
}

/* 7.2 Animation Utilities */
.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes highlightPulse {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(255, 193, 7, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.announcement-card:first-child {
  animation: highlightPulse 2s ease-in-out 2;
}

.school-selected.fade-in {
  animation: slideInUp 0.5s ease-out;
}

/* 7.3 Layout Utilities */
.section-divider {
  height: 3px;
  background: var(--psru-gradient);
  margin: 2rem 0;
  border-radius: 2px;
}

.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* 7.4 Text Utilities */
.search-highlight {
  background-color: #fff3cd;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  font-weight: 600;
}

/* 7.5 Special Selectors */
#noSchoolResults {
  display: none;
}

/* ==========================================================================
  8. THIRD-PARTY OVERRIDES - ปรับแต่งไลบรารีภายนอก
  ========================================================================== */

/* 8.1 SweetAlert2 Customization */
.swal2-popup {
  border-radius: 15px;
}

.swal2-title {
  font-weight: 600;
}

.swal2-confirm {
  background: var(--psru-gradient) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0.75rem 2rem !important;
  font-weight: 500 !important;
}

.swal2-cancel {
  border-radius: 8px !important;
  padding: 0.75rem 2rem !important;
}

/* 8.2 Modal Enhancements */
.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: var(--psru-gradient);
  color: white;
  border-bottom: none;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
}

.modal-body {
  padding: 2rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
  9. RESPONSIVE DESIGN - การออกแบบตอบสนอง
  ========================================================================== */

/* 9.1 Desktop Styles */
@media (min-width: 992px) {
  .sidebar.logged-in {
    transform: translateX(0);
  }
}

/* 9.2 Mobile Navigation */
@media (max-width: 991.98px) {
  .sidebar-toggle {
    display: block !important;
  }
}

/* 9.3 Tablet Styles */
@media (max-width: 992px) {
  .main-content {
    padding-top: 70px;
  }

  .sidebar-user {
    margin-top: 70px;
  }

  .hero-section {
    padding: 4rem 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .navbar-brand img {
    height: 40px;
  }
}

/* 9.4 Mobile Styles */
@media (max-width: 768px) {
  .main-content {
    padding-top: 64px;
  }

  .sidebar-user {
    margin-top: 64px;
  }

  .hero-section {
    padding: 3rem 0;
    text-align: center;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .navbar-brand img {
    height: 30px;
  }

  body {
    padding-top: 0px;
  }

  .card-body {
    padding: 1.5rem;
  }

  .announcement-buttons {
    justify-content: center;
  }

  .card-header-psru {
    padding: 1rem;
  }

  .gpa-input-group {
    grid-template-columns: 1fr;
  }

  .education-level-option {
    padding: 1rem;
  }

  .round-detail-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .round-detail-value {
    margin-top: 0.25rem;
  }

  .announcement-card .card-body {
    padding: 1rem;
  }

  .announcement-card .d-flex.justify-content-between {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .announcement-card .text-muted {
    align-self: flex-end;
  }

  .school-item {
    padding: 1rem;
  }

  .school-location .d-flex {
    flex-direction: column;
    gap: 0.25rem;
  }

  .school-name {
    font-size: 1rem;
  }

  .school-item {
    padding: 0.75rem;
  }

  .school-details .row .col-md-6 {
    margin-bottom: 0.5rem;
  }

  /* Responsive สำหรับส่วนเลือกระดับการศึกษาและสาขา */
  .major-row {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .major-info {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .major-action {
    margin-left: 0;
    margin-top: 1rem;
    align-self: stretch;
  }

  .select-major-btn {
    width: 100%;
  }

  .form-check-input[type="radio"],
  .form-check-input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
  }

  .form-check-label {
    font-size: 1rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  /* Button Groups */
  .d-flex.flex-wrap {
    gap: 0.5rem !important;
  }

  .d-flex.flex-wrap .btn {
    flex: 1;
    min-width: 120px;
  }

  .btn-group {
    width: 100%;
  }

  .btn-group .btn {
    flex: 1;
  }

  /* Card Header Responsive */
  .card-header h4 {
    font-size: 1.25rem;
  }

  .card-header .d-flex.gap-3 {
    flex-direction: column;
    gap: 0.5rem !important;
    align-items: flex-start;
  }
}

/* ==========================================================================
  10. ACCESSIBILITY & INTERACTION - การเข้าถึงและปฏิสัมพันธ์
  ========================================================================== */

/* 10.1 Focus States */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--psru-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 121, 107, 0.25);
}

/* 10.2 Hover Effects */
.menu-item:hover {
  background-color: var(--psru-light);
  color: var(--psru-primary);
  border-left-color: var(--psru-primary);
}

.school-item:hover {
  border-color: var(--psru-primary);
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f9f8 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 121, 107, 0.15);
}

/* 10.3 Transition Effects */
.card-psru {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-psru {
  transition: all 0.3s ease;
}
