/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background: #f5f8ff;
  line-height: 1.6;
}

/* ==================== LOGIN PAGE ==================== */
#login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #2971b7;
  padding: 20px;
}

.login-container {
  background: white;
  padding: 45px 40px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 480px;
}

.logo-container {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  max-width: 350px;
  width: 100%;
  height: auto;
}

.welcome-text {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
  color: #1a1a1a;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 45px 14px 45px;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #fafafa;
}

.input-wrapper input:focus {
  outline: none;
  border-color: #2971b7;
  background: white;
  box-shadow: 0 0 0 3px rgba(41, 113, 183, 0.1);
}

.input-icon-left {
  position: absolute;
  left: 15px;
  display: flex;
  align-items: center;
  color: #888;
  pointer-events: none;
}

.input-icon-right {
  position: absolute;
  right: 15px;
  display: flex;
  align-items: center;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.input-icon-right:hover {
  color: #2971b7;
}

.forgot-password {
  text-align: right;
  margin-bottom: 25px;
  margin-top: -5px;
}

.forgot-password a {
  color: #2971b7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #1E5BA8;
}

.sign-in-btn {
  width: 100%;
  padding: 15px;
  background: #2971b7;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.sign-in-btn:hover {
  background: #1E5BA8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 113, 183, 0.3);
}

.sign-in-btn:active {
  transform: translateY(0);
}

.create-account {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.create-account a {
  color: #2971b7;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.create-account a:hover {
  color: #1E5BA8;
}

/* ==================== DASHBOARD PAGE ==================== */
#dashboard-page {
  min-height: 100vh;
  background: #f5f8ff;
}

/* Header */
.header {
  background: #2971b7;
  color: white;
  padding: 12px 40px 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 20px 20px;
  flex-wrap: nowrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  display: flex;
  align-items: center;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

.header-logo-img {
  height: 45px;
  width: auto;
  max-width: 100%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-weight: 500;
  font-size: 15px;
  background: rgba(0, 0, 0, 25%);
  padding: 8px 18px;
  border-radius: 15px;
  color: white;
  white-space: nowrap;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid white;
  background: white;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main Content */
.main-content {
  display: flex;
  gap: 30px;
  padding: 30px 40px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: transparent;
  padding: 0;
  height: fit-content;
  position: sticky;
  top: 100px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar-close-btn {
  display: none;
}

.sidebar-header-mobile {
  display: none;
}

.sidebar-logo-mobile {
  display: none;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-overlay.active {
  opacity: 1;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-menu li {
  margin: 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s ease;
  border-radius: 10px;
  background: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sidebar-menu a svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: #1a1a1a;
  flex-shrink: 0;
}

.sidebar-menu a.active svg {
  stroke: white;
}

.sidebar-menu a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.sidebar-menu a:hover svg {
  stroke: #2971b7;
}

.sidebar-menu a.active {
  background: #2971b7;
  color: white;
  box-shadow: 0 4px 12px rgba(41, 113, 183, 0.3);
}

/* Content Area */
.content-area {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* Left Column - Profile Section */
.profile-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Right Column - Content Section */
.content-column {
  display: flex;
  flex-direction: column;
}

/* Card */
.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1a1a1a;
}

/* Profile Card - Compact Version */
.profile-card-compact {
  padding: 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.profile-header svg {
  stroke: #1a1a1a;
}

.profile-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.profile-content {
  display: flex;
  gap: 15px;
  align-items: center;
}

.profile-avatar-small {
  width: 98px;
  height: 98px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}

.profile-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-details {
  flex: 1;
}

.profile-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.profile-info {
  font-size: 13px;
  color: #666;
  margin-bottom: 3px;
}

/* Attendance Card */
.attendance-card {
  padding: 20px;
}

.attendance-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.attendance-today {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.attendance-view-btn {
  padding: 8px 20px;
  margin: 0;
}

.attendance-divider {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 15px;
}

.attendance-content {
  margin-bottom: 0;
}

.attendance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.attendance-row:last-child {
  margin-bottom: 0;
}

.attendance-label {
  color: #1a1a1a;
  font-weight: 500;
}

.attendance-value-blue {
  color: #2971b7;
  font-weight: 600;
}

.attendance-value-green {
  color: #059669;
  font-weight: 500;
}

.attendance-value-red {
  color: #dc2626;
  font-weight: 500;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: #2971b7;
  color: white;
}

.btn-primary:hover {
  background: #1E5BA8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 113, 183, 0.3);
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-full {
  width: 100%;
}

/* Application Section Header */
.application-section-header {
  background: #E3F2FD;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.application-section-header .card-title {
  color: #2971b7;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.application-section-header-with-action {
  background: #E3F2FD;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.application-section-header-with-action .card-title {
  color: #2971b7;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.view-all-btn {
  background: transparent;
  border: none;
  color: #2971b7;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
}

.view-all-btn:hover {
  color: #1E5BA8;
}

.view-all-btn svg {
  stroke: currentColor;
}

.application-section-wrapper {
  margin-bottom: 30px;
}

.application-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

.application-cards-grid .application-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Application Card */
.application-card {
  padding: 20px;
  border: 1px solid #e0e0e0;
  background: white;
  display: flex;
  flex-direction: column;
}

.application-card:not(:last-child) {
  margin-bottom: 20px;
}

.application-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e7eb;
}

.application-card-header .card-title {
  margin-bottom: 0;
  flex: 1;
  color: #2971b7;
  font-size: 16px;
  font-weight: 600;
}

.application-details-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
  flex: 1;
}

.detail-item {
  display: flex;
  font-size: 14px;
  gap: 8px;
}

.detail-label {
  color: #555;
  font-weight: 500;
  min-width: fit-content;
}

.detail-value {
  color: #1a1a1a;
}

/* Status Badge */
.status-badge {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-draft {
  background: #dc2626;
  color: white;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-ongoing {
  background: #FEF3C7;
  color: #F59E0B;
  border: 2px solid #F59E0B;
  border-radius: 8px;
  font-weight: 600;
  padding: 6px 14px;
  font-size: 13px;
  white-space: nowrap;
}

.status-completed {
  background: #059669;
  color: white;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Event Card */
.event-card {
  padding: 20px;
}

.event-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 20px;
  gap: 15px;
}

.event-header .card-title {
  margin-bottom: 0;
  flex: 1;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.event-detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #1a1a1a;
}

.event-detail-row svg {
  stroke: #666;
  flex-shrink: 0;
}


/* Event Card - Simplified */
.event-header-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}

.event-header-simple .card-title {
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
}

.event-header-simple .status-badge {
  flex-shrink: 0;
}

.event-header-simple .btn {
  flex-shrink: 0;
}

.event-details-simple {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.event-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1a1a1a;
}

.event-info-row svg {
  stroke: #666;
  flex-shrink: 0;
}

/* Upload Card - Compact Version */
.upload-card-compact {
  padding: 20px;
}

.upload-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.upload-card-compact .card-title {
  font-size: 16px;
  margin-bottom: 0;
  color: #2971b7;
  font-weight: 600;
}

.upload-date {
  font-size: 14px;
}

.upload-divider {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 15px;
}

.text-blue {
  color: #2971b7;
  font-weight: 600;
}

/* Exam Card */
.exam-card {
  padding: 20px;
}

.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.exam-header .card-title {
  margin-bottom: 0;
  flex: 1;
}

.exam-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-detail-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #1a1a1a;
}

.exam-detail-row svg {
  stroke: #666;
  flex-shrink: 0;
}

.text-gray {
  color: #666;
}

/* Important Message Card */
.important-card {
  padding: 20px;
}

.important-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e5e7eb;
}

.important-header svg {
  stroke: #1a1a1a;
  flex-shrink: 0;
}

.important-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.important-message {
  padding: 0;
}

.important-message p {
  font-size: 14px;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.6;
}

.important-message p:last-child {
  margin-bottom: 0;
}

.important-message strong {
  font-weight: 600;
  color: #2971b7;
}

/* ==================== APPLICATIONS SECTION ==================== */
.applications-section {
  flex: 1;
  padding: 0;
}

/* ==================== NOTIFICATION SECTION ==================== */
.notification-section {
  flex: 1;
  padding: 0;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 30px;
  position: relative;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  position: relative;
}

.notification-item:last-child {
  margin-bottom: 0;
}

.notification-icon-wrapper {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
}

.notification-icon-container {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.notification-icon {
  color: #6b7280;
  width: 20px;
  height: 20px;
}

.notification-line {
  position: absolute;
  left: 50%;
  top: 40px;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 12px);
  background: #e5e7eb;
  z-index: 1;
}

.notification-item:last-child .notification-line {
  display: none;
}

.notification-card {
  background: white;
  border-radius: 8px;
  padding: 16px;
  flex: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.notification-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.notification-content {
  flex: 1;
}

.notification-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.notification-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  line-height: 1.4;
}

.notification-badge-new {
  background: #dc2626;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.notification-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  padding-top: 0;
}

.notification-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

/* ==================== HALL TICKET SECTION ==================== */
.hallticket-section {
  flex: 1;
  padding: 0;
}

.hallticket-container {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hallticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.hallticket-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.hallticket-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a1a;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #2971b7;
  box-shadow: 0 0 0 3px rgba(41, 113, 183, 0.1);
}

.search-input::placeholder {
  color: #9ca3af;
}

.hallticket-table-wrapper {
  overflow-x: auto;
  margin-bottom: 25px;
}

.hallticket-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.hallticket-table thead {
  background: #f9fafb;
}

.hallticket-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.hallticket-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: #1a1a1a;
  border-bottom: 1px solid #f3f4f6;
}

.hallticket-table tbody tr {
  transition: background-color 0.2s ease;
}

.hallticket-table tbody tr:hover {
  background-color: #f9fafb;
}

.hallticket-table td:nth-child(1) {
  font-weight: 500;
  color: #6b7280;
  width: 80px;
}

.hallticket-table td:nth-child(2) {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hallticket-table td:nth-child(3) {
  color: #6b7280;
  width: 140px;
}

.hallticket-table td:nth-child(4) {
  width: 80px;
  text-align: center;
}

.badge-new-small {
  background: #dc2626;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.download-btn,
.view-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-btn:hover,
.view-btn:hover {
  background: #2971b7;
  color: white;
  border-color: #2971b7;
  transform: scale(1.05);
}

.hallticket-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.pagination-info {
  font-size: 14px;
  color: #6b7280;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #1a1a1a;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  border-color: #2971b7;
  color: #2971b7;
}

.pagination-btn.active {
  background: #2971b7;
  border-color: #2971b7;
  color: white;
}

.pagination-next {
  font-size: 14px;
  color: #2971b7;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  transition: color 0.2s ease;
}

.pagination-next:hover {
  color: #1e5498;
  text-decoration: underline;
}

/* Responsive for Hall Ticket */
@media (max-width: 768px) {
  .hallticket-container {
    padding: 20px;
  }

  .hallticket-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hallticket-search {
    width: 100%;
  }

  .hallticket-table-wrapper {
    overflow-x: scroll;
  }

  .hallticket-table {
    min-width: 600px;
  }

  .hallticket-pagination {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .pagination-controls {
    justify-content: center;
  }
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 6px;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover {
  border-color: #2971b7;
  color: #2971b7;
}

.pagination-btn.active {
  background: #2971b7;
  border-color: #2971b7;
  color: white;
}

.pagination-next {
  color: #2971b7;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  transition: color 0.3s ease;
}

.pagination-next:hover {
  color: #1E5BA8;
}

/* ==================== INSTITUTION SECTION ==================== */
.institution-section {
  flex: 1;
  padding: 0;
}

.institution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  padding: 0;
}

.institution-card {
  background: white;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.institution-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.institution-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f0f0f0;
}

.institution-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.institution-content {
  padding: 20px;
}

.institution-affiliation {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.institution-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.4;
}

.institution-address {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
  line-height: 1.5;
}

.institution-phone {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
  font-weight: 500;
}

.institution-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #2971b7;
  border: 2px solid #2971b7;
  border-radius: 0;
  font-weight: 600;
}

.institution-btn:hover {
  background: #2971b7;
  color: white;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet */
@media (max-width: 1200px) {
  .content-area {
    grid-template-columns: 320px 1fr;
  }
}

@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .content-area {
    grid-template-columns: 1fr;
  }

  .institution-grid {
    grid-template-columns: 1fr;
  }

  .application-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Header layout fix to prevent overlap - USE COLUMN LAYOUT */
  .header {
    padding: 10px 15px !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    overflow: hidden !important;
    display: flex !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
  }

  .header-logo-img {
    height: 40px !important;
  }

  .user-name {
    display: none !important;
  }
  
  .header-left {
    width: 100% !important;
    flex: 0 0 auto !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    order: 1 !important;
  }
  
  .header-logo {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 50px) !important;
    overflow: hidden !important;
  }
  
  .header-logo-img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  .mobile-menu-toggle {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    margin-right: 0 !important;
    padding: 8px !important;
    box-sizing: border-box !important;
  }
  
  /* Profile menu responsive */
  .user-profile {
    width: 100% !important;
    flex: 0 0 auto !important;
    max-width: 100% !important;
    order: 2 !important;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px !important;
    padding-top: 15px !important;
    border-top: 2px solid rgba(255, 255, 255, 0.3) !important;
    clear: both !important;
    justify-content: flex-end !important;
    box-sizing: border-box !important;
    display: flex !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .profile-menu-wrapper {
    position: relative !important;
    z-index: 10 !important;
    flex-shrink: 0 !important;
  }
  
  #userDropdown {
    z-index: 1001 !important;
  }
  
  .profile-menu-btn {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  
  .profile-menu-btn .user-name {
    display: none !important;
  }
  
  .profile-menu-btn .user-avatar {
    width: 28px !important;
    height: 28px !important;
  }
  
  .logout-btn {
    padding: 6px 10px !important;
    font-size: 12px !important;
    flex-shrink: 0;
  }
  
  .logout-btn span {
    display: none;
  }
  
  .logout-btn svg {
    width: 16px !important;
    height: 16px !important;
  }
  
  .userDropdown {
    min-width: 200px !important;
    right: 0 !important;
    left: auto !important;
  }

  .main-content {
    padding: 20px;
    position: relative;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 999;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    overflow-y: auto;
    transition: transform 0.3s ease;
  }

  .sidebar-header-mobile {
    display: none;
  }

  .sidebar.active .sidebar-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
  }

  .sidebar-logo-mobile {
    display: flex;
    align-items: center;
    flex: 1;
  }

  .sidebar-logo-img {
    max-width: 150px;
    width: 100%;
    height: auto;
  }

  .sidebar-close-btn {
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .sidebar-close-btn:hover {
    background: #e5e7eb;
    color: #2971b7;
    transform: scale(1.1);
  }

  .sidebar-close-btn:active {
    transform: scale(0.95);
  }

  .sidebar-close-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block !important;
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-menu {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sidebar-menu a {
    padding: 12px 15px;
  }

  .card {
    padding: 20px;
  }

  .login-container {
    padding: 35px 25px;
  }

  .welcome-text {
    font-size: 22px;
  }

  .logo {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 15px;
    gap: 20px;
  }

  .card {
    padding: 15px;
  }

  .profile-content {
    flex-direction: column;
    text-align: center;
  }

  .exam-header,
  .event-header,
  .event-header-simple,
  .application-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .exam-header .btn,
  .event-header .btn {
    width: 100%;
  }

  .detail-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .login-container {
    padding: 30px 20px;
  }

  .header {
    padding: 10px 12px !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
  }
  
  .header-left {
    gap: 10px;
  }
  
  .header-logo-img {
    height: 35px;
  }
  
  /* Profile menu extra small */
  .user-profile {
    gap: 6px !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    order: 2 !important;
    display: flex !important;
  }
  
  .header-left {
    width: 100% !important;
    flex: 0 0 auto !important;
    order: 1 !important;
    margin-bottom: 0 !important;
  }
  
  .profile-menu-btn {
    padding: 5px 8px !important;
    font-size: 12px !important;
  }
  
  .profile-menu-btn .user-avatar {
    width: 24px !important;
    height: 24px !important;
  }
  
  .logout-btn {
    padding: 5px 8px !important;
  }
  
  .userDropdown {
    min-width: 180px !important;
    right: 0 !important;
  }
}

/* ==================== STUDY MATERIALS SECTION ==================== */
.studymaterials-section {
  flex: 1;
  padding: 0;
}

.studymaterials-container {
  padding: 0;
}

.studymaterials-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #6b7280;
}

.studymaterials-breadcrumb a {
  color: #2971b7;
  text-decoration: none;
  transition: color 0.2s ease;
}

.studymaterials-breadcrumb a:hover {
  color: #1E5BA8;
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #9ca3af;
}

.studymaterials-header {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.studymaterials-icon-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.studymaterials-icon {
  color: #2971b7;
  width: 24px;
  height: 24px;
}

.studymaterials-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.studymaterials-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.studymaterials-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
}

.studymaterials-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.studymaterials-tab:hover {
  color: #2971b7;
}

.studymaterials-tab.active {
  background: #2971b7;
  color: white;
  border-bottom-color: #2971b7;
  border-radius: 13px;
}

.semester-section {
  margin-bottom: 40px;
}

.semester-section:last-child {
  margin-bottom: 0;
}

.semester-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #dfe4efd6;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.semester-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.semester-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.semester-search .search-icon {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  pointer-events: none;
}

.semester-search .search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a1a;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.semester-search .search-input:focus {
  outline: none;
  border-color: #2971b7;
  box-shadow: 0 0 0 3px rgba(41, 113, 183, 0.1);
}

.semester-search .search-input::placeholder {
  color: #9ca3af;
}

.studymaterials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.studymaterial-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.studymaterial-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #2971b7;
}

.pdf-icon {
  width: 80px;
  height: 80px;
  background: #dc2626;
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.studymaterial-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.5;
  text-align: center;
}

/* Responsive for Study Materials */
@media (max-width: 1024px) {
  .studymaterials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .studymaterials-tabs {
    flex-direction: column;
    border-bottom: none;
  }

  .studymaterials-tab {
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
  }

  .studymaterials-tab.active {
    border-radius: 8px;
    border-bottom: 1px solid #2971b7;
  }

  .semester-header {
    flex-direction: column;
    align-items: stretch;
  }

  .semester-search {
    width: 100%;
  }

  .studymaterials-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== ACTIVITIES SECTION ==================== */
.activities-section {
  flex: 1;
  padding: 0;
}

.activities-container {
  padding: 0;
}

.activities-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.activities-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.activities-header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.activities-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 300px;
}

.activities-search .search-icon {
  position: absolute;
  left: 12px;
  color: #9ca3af;
  pointer-events: none;
}

.activities-search .search-input {
  width: 100%;
  padding: 10px 12px 10px 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1a1a1a;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.activities-search .search-input:focus {
  outline: none;
  border-color: #2971b7;
  box-shadow: 0 0 0 3px rgba(41, 113, 183, 0.1);
}

.activities-search .search-input::placeholder {
  color: #9ca3af;
}

.upload-activity-btn {
  white-space: nowrap;
}

.activities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.activity-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.activity-program-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.activity-date {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.activity-certificate {
  width: 100%;
  margin: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #f9fafb;
}

.certificate-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.activity-position {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.activity-grade {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

/* Responsive for Activities */
@media (max-width: 1400px) {
  .activities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .activities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .activities-header {
    flex-direction: column;
    align-items: stretch;
  }

  .activities-header-right {
    flex-direction: column;
    align-items: stretch;
  }

  .activities-search {
    width: 100%;
  }

  .upload-activity-btn {
    width: 100%;
  }

  .activities-grid {
    grid-template-columns: 1fr;
  }
}

