* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  min-height: 100vh;
  position: relative;
  color: #ffffff;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.08)"/><circle cx="10" cy="50" r="0.5" fill="rgba(255,255,255,0.08)"/><circle cx="90" cy="30" r="0.5" fill="rgba(255,255,255,0.08)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
  z-index: -1;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 120px 20px;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="20" fill="rgba(255,255,255,0.08)"/><circle cx="70" cy="20" r="10" fill="rgba(255,255,255,0.12)"/></svg>');
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 25px;
  text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 50px;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.2s both;
  line-height: 1.6;
  font-weight: 400;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.breadcrumb-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
  color: rgba(255, 255, 255, 1);
}

.breadcrumb-nav .separator {
  color: rgba(255, 255, 255, 0.5);
}

/* Calendar Section */
.calendar-section {
  padding: 100px 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 70px;
}

.section-header h2 {
  font-size: 2.8rem;
  color: #1e293b;
  margin-bottom: 20px;
  font-weight: 800;
}

.section-header p {
  color: #64748b;
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* NEW Calendar Filters */
.calendar-filters {
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
  border: 1px solid #e5e7eb;
}

.filter-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.calendar-filters .form-label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.calendar-filters .form-label i {
  color: #1e3c72;
}

.calendar-filters .form-select,
.calendar-filters .form-control {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.calendar-filters .form-select:focus,
.calendar-filters .form-control:focus {
  border-color: #1e3c72;
  box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
  outline: none;
}

.filter-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.btn-search {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 60, 114, 0.3);
}

.btn-reset {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Calendar Container */
.calendar-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px;
  border: 1px solid #e5e7eb;
  max-width: 1400px;
  margin: 0 auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
}

.calendar-day-header {
  text-align: center;
  font-weight: 700;
  color: #1e3c72;
  padding: 10px 0;
  font-size: 0.8rem;
  background: #f8fafc;
  border-radius: 6px;
}

.calendar-day {
  min-height: 100px;
  max-height: none;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  position: relative;
  overflow: visible;
  width: 100%;
}

.calendar-day:hover {
  border-color: #1e3c72;
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.15);
  z-index: 10;
}

.calendar-day.other-month {
  background: #f8fafc;
  opacity: 0.5;
}

.calendar-day.today {
  background: linear-gradient(
    135deg,
    rgba(30, 60, 114, 0.1),
    rgba(42, 82, 152, 0.1)
  );
  border-color: #1e3c72;
  border-width: 3px;
}

.day-number {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.9rem;
}

.calendar-day-number {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.9rem;
}

.calendar-day-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.calendar-day-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.event-count-badge {
  background: #1e3c72;
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.calendar-event {
  background: white;
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 2px;
  border-left: 3px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.7rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.calendar-event:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  z-index: 5;
}

.calendar-event.status-pending {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.calendar-event.status-confirmed {
  border-left-color: #10b981;
  background: #ecfdf5;
}

.calendar-event.status-completed {
  border-left-color: #6b7280;
  background: #f3f4f6;
}

.calendar-event .event-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1px;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  width: 100%;
  display: block;
  max-width: 100%;
}

.calendar-event .event-time {
  color: #64748b;
  font-size: 0.65rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  display: block;
}

.calendar-event .event-facility {
  color: #64748b;
  font-size: 0.6rem;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  display: none;
  width: 100%;
}

.more-events-indicator {
  text-align: center;
  font-size: 0.65rem;
  color: #1e3c72;
  font-weight: 600;
  padding: 3px;
  background: #e0e7ff;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 2px;
}

.more-events-indicator:hover {
  background: #c7d2fe;
}

.day-indicator {
  margin-top: 4px;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pending {
  background: #f59e0b; /* Yellow for pending */
}

.status-scheduled {
  background: #10b981; /* Green for scheduled (same as confirmed) */
}

.status-accepted {
  background: #10b981; /* Green for confirmed/accepted */
}

.status-completed {
  background: #6b7280; /* Gray for completed */
}

/* Sidebar */
.booking-sidebar {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  height: fit-content;
}

.sidebar-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-card {
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  border-left: 4px solid;
  transition: all 0.3s ease;
  cursor: pointer;
}

.booking-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.booking-card.pending {
  background: #fef3c7;
  border-left-color: #f59e0b;
}

.booking-card.scheduled {
  background: #d1fae5;
  border-left-color: #10b981;
}

.booking-card.accepted {
  background: #d1fae5;
  border-left-color: #10b981;
}

.booking-card.completed {
  background: #e5e7eb;
  border-left-color: #6b7280;
}

.booking-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.booking-name {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.booking-facility {
  font-size: 0.85rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.booking-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 8px;
}

.badge-pending {
  background: #f59e0b;
  color: white;
}

.badge-scheduled {
  background: #10b981;
  color: white;
}

.badge-accepted {
  background: #10b981;
  color: white;
}

.badge-completed {
  background: #6b7280;
  color: white;
}

/* Upcoming Events Sidebar - Original Style */
.upcoming-events {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  margin-top: 0;
}

.upcoming-events h3 {
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.event-item {
  padding: 16px;
  margin-bottom: 12px;
  border-left: 3px solid #1e3c72;
  background: #f8fafc;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.event-item:hover {
  background: #f1f5f9;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-item.cultural {
  border-left-color: #9c27b0;
}

.event-item.sports {
  border-left-color: #4caf50;
}

.event-date {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.event-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.event-location {
  font-size: 0.9rem;
  color: #64748b;
}

/* Event Modal */
.event-modal {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  border-bottom: none;
  padding: 20px 24px;
}

.modal-title {
  font-weight: 700;
  font-size: 1.5rem;
}

.btn-close {
  filter: invert(1);
}

.modal-body {
  padding: 24px;
}

.event-detail {
  margin-bottom: 16px;
}

.event-detail-label {
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.event-detail-value {
  color: #1e293b;
  font-size: 1rem;
  line-height: 1.5;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
}

.btn-primary {
  background: linear-gradient(45deg, #1e3c72, #2a5298);
  border: none;
  border-radius: 12px;
  padding: 12px 30px;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
}

/* Add Event Button */
.add-event-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(45deg, #1e3c72, #2a5298);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(30, 60, 114, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

.add-event-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 35px rgba(30, 60, 114, 0.5);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 80px 0 30px;
}

.footer-section h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 25px;
  font-size: 1.2rem;
}

.footer-section a {
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
}

.footer-section a:hover {
  color: #fff;
  transform: translateX(8px);
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  color: #2a5298;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.footer-social a {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 0;
}

.footer-social a:hover {
  background: #2a5298;
  color: white;
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  color: #94a3b8;
  font-size: 1rem;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .calendar-grid {
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .calendar-container {
    padding: 20px;
  }

  .section-header h2 {
    font-size: 2.2rem;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    padding: 4px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 80px 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .calendar-section {
    padding: 60px 0;
  }

  .footer {
    padding: 60px 0 20px;
  }
}
.status-dot.status-confirmed {
  background: #10b981; /* Green for confirmed */
}

.booking-card.confirmed {
  background: #d1fae5;
  border-left-color: #10b981;
}

.badge-confirmed {
  background: #10b981;
  color: white;
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

.navbar-brand {
  font-size: 28px;
  font-weight: 800;
  color: #1e3c72 !important;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cspc-logo-nav {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #1e3c72, #2a5298);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.navbar-nav .nav-link {
  color: #1e293b !important;
  font-weight: 600;
  margin: 0 15px;
  padding: 12px 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #1e3c72 !important;
  background: rgba(30, 60, 114, 0.1);
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  color: #1e3c72 !important;
  background: rgba(30, 60, 114, 0.15);
}

.login-btn,
.dashboard-btn {
  background: linear-gradient(45deg, #1e3c72, #2a5298) !important;
  color: white !important;
  padding: 12px 25px;
  border-radius: 16px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.login-btn:hover,
.dashboard-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 60, 114, 0.5);
}

/* Calendar Navigation Header */
.calendar-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-radius: 12px;
  color: white;
}

.calendar-nav-header h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
}

.month-navigation {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.current-month-display {
  font-size: 1.3rem;
  font-weight: 700;
  min-width: 180px;
  text-align: center;
}

.today-button {
  background: rgba(255, 255, 255, 0.9);
  color: #1e3c72;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.today-button:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Calendar Day Number */
.calendar-day-number {
  font-weight: 700;
  color: #1e293b;
  font-size: 1rem;
  margin-bottom: 6px;
}

/* Calendar Event Items */
.calendar-event {
  background: white;
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 2px;
  border-left: 3px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.7rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  min-width: 0; /* Critical for text truncation in flexbox */
  width: 100%; /* Ensure full width within container */
  box-sizing: border-box;
}

.calendar-event:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  z-index: 5;
}

.calendar-event.status-pending {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.calendar-event.status-confirmed {
  border-left-color: #10b981;
  background: #ecfdf5;
}

.calendar-event.status-completed {
  border-left-color: #6b7280;
  background: #f3f4f6;
}

.calendar-event .event-title {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1px;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  width: 100%;
  display: block;
  max-width: 100%;
}

.calendar-event .event-time {
  color: #64748b;
  font-size: 0.65rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  display: block;
}

.calendar-event .event-facility {
  color: #64748b;
  font-size: 0.6rem;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  display: none; /* Hide facility on small calendar cells */
  width: 100%;
}

/* Show more events indicator */
.more-events-indicator {
  text-align: center;
  font-size: 0.65rem;
  color: #1e3c72;
  font-weight: 600;
  padding: 3px;
  background: #e0e7ff;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 2px;
}

.more-events-indicator:hover {
  background: #c7d2fe;
}

/* Compact calendar day styling */
.calendar-day-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-width: 0; /* Critical for text truncation */
  overflow: hidden;
}

.calendar-day-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  flex-shrink: 0; /* Prevent shrinking */
}

.event-count-badge {
  background: #1e3c72;
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0; /* Prevent shrinking */
  white-space: nowrap;
}

/* Legend */
.calendar-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-color.pending {
  background: #f59e0b;
}

.legend-color.confirmed {
  background: #10b981;
}

.legend-color.completed {
  background: #6b7280;
}

.legend-label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9rem;
}

/* Event Detail Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border: 1px solid #888;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 20px 24px;
  border-radius: 16px 16px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
}

.event-detail-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.event-detail-item:last-child {
  border-bottom: none;
}

.event-detail-label {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-detail-value {
  color: #1e293b;
  font-size: 1rem;
  font-weight: 500;
}

.status-badge-modal {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-badge-modal.pending {
  background: #fef3c7;
  color: #f59e0b;
}

.status-badge-modal.confirmed {
  background: #d1fae5;
  color: #10b981;
}

.status-badge-modal.completed {
  background: #e5e7eb;
  color: #6b7280;
}

/* No events message */
.no-events-message {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.no-events-message i {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 20px;
}

.no-events-message h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 10px;
}

.no-events-message p {
  font-size: 1rem;
  color: #64748b;
}

/* Loading spinner */
.loading-spinner {
  text-align: center;
  padding: 40px;
}

.spinner {
  border: 4px solid rgba(30, 60, 114, 0.1);
  border-radius: 50%;
  border-top: 4px solid #1e3c72;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .calendar-container {
    padding: 16px;
  }

  .calendar-day {
    min-height: 90px;
    max-height: none;
  }

  .calendar-day-number {
    font-size: 0.85rem;
  }

  .calendar-event .event-title {
    font-size: 0.68rem;
  }
}

@media (max-width: 992px) {
  .calendar-container {
    padding: 14px;
  }

  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 85px;
    max-height: none;
    padding: 5px;
  }

  .calendar-event {
    padding: 3px 5px;
  }

  .calendar-event .event-title {
    font-size: 0.66rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 80px 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .calendar-nav-header {
    flex-direction: column;
    gap: 15px;
  }

  .calendar-nav-header h3 {
    font-size: 1.3rem;
  }

  .month-navigation {
    flex-wrap: wrap;
    gap: 10px;
  }

  .current-month-display {
    min-width: 140px;
    font-size: 1rem;
  }

  .calendar-container {
    padding: 12px;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    min-height: 80px;
    max-height: none;
    padding: 4px;
  }

  .calendar-day-number {
    font-size: 0.75rem;
  }

  .event-count-badge {
    font-size: 0.6rem;
    padding: 1px 4px;
  }

  .calendar-event {
    padding: 3px 4px;
    font-size: 0.65rem;
  }

  .calendar-event .event-title {
    font-size: 0.62rem;
  }

  .calendar-event .event-time {
    font-size: 0.58rem;
  }

  .more-events-indicator {
    font-size: 0.6rem;
    padding: 2px;
  }

  .calendar-filters {
    padding: 20px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .calendar-legend {
    gap: 10px;
  }

  .legend-item {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

@media (max-width: 576px) {
  .calendar-container {
    padding: 10px;
  }

  .calendar-grid {
    gap: 3px;
  }

  .calendar-day {
    min-height: 75px;
    max-height: none;
    padding: 3px;
  }

  .calendar-day-number {
    font-size: 0.72rem;
  }

  .calendar-event .event-title {
    font-size: 0.6rem;
  }

  .calendar-event .event-time {
    font-size: 0.56rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .calendar-container {
    padding: 8px;
  }

  .calendar-grid {
    gap: 2px;
  }

  .calendar-day {
    min-height: 70px;
    max-height: none;
    padding: 2px;
  }

  .calendar-day-number {
    font-size: 0.7rem;
  }

  .event-count-badge {
    font-size: 0.55rem;
    padding: 1px 3px;
  }

  .calendar-event {
    padding: 2px 3px;
  }

  .calendar-event .event-title {
    font-size: 0.58rem;
  }

  .calendar-event .event-time {
    font-size: 0.54rem;
  }

  .more-events-indicator {
    font-size: 0.58rem;
    padding: 2px;
  }

  .nav-button {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .today-button {
    padding: 8px 15px;
    font-size: 0.85rem;
  }
}

@media (max-width: 375px) {
  .calendar-day {
    min-height: 65px;
    max-height: none;
  }

  .calendar-day-number {
    font-size: 0.65rem;
  }

  .calendar-event .event-title {
    font-size: 0.56rem;
  }

  .calendar-event .event-time {
    font-size: 0.52rem;
  }

  .event-count-badge {
    font-size: 0.52rem;
  }
}



        /* Navigation */
        .navbar {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            padding: 15px 0;
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.8);
        }

        .navbar-brand {
            font-size: 28px;
            font-weight: 800;
            color: #1e3c72 !important;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .cspc-logo-nav {
            width: 40px;
            height: 40px;
            background: linear-gradient(45deg, #1e3c72, #2a5298);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.2rem;
            box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
        }

        .navbar-nav .nav-link {
            color: #1e293b !important;
            font-weight: 600;
            margin: 0 15px;
            padding: 12px 20px;
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        .navbar-nav .nav-link:hover {
            color: #1e3c72 !important;
            background: rgba(30, 60, 114, 0.1);
            transform: translateY(-2px);
        }

        .navbar-nav .nav-link.active {
            color: #1e3c72 !important;
            background: rgba(30, 60, 114, 0.15);
        }

        .login-btn, .dashboard-btn {
            background: linear-gradient(45deg, #1e3c72, #2a5298) !important;
            color: white !important;
            padding: 12px 25px;
            border-radius: 16px;
            font-weight: 600;
            box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .login-btn:hover, .dashboard-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(30, 60, 114, 0.5);
        }

        /* Calendar Navigation Header */
        .calendar-nav-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding: 20px;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            border-radius: 12px;
            color: white;
        }

        .calendar-nav-header h3 {
            font-size: 1.8rem;
            font-weight: 800;
            margin: 0;
        }

        .month-navigation {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .nav-button {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 10px 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .nav-button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
        }

        .current-month-display {
            font-size: 1.3rem;
            font-weight: 700;
            min-width: 180px;
            text-align: center;
        }

        .today-button {
            background: rgba(255, 255, 255, 0.9);
            color: #1e3c72;
            border: none;
            border-radius: 8px;
            padding: 10px 20px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .today-button:hover {
            background: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        /* Calendar Day Number */
        .calendar-day-number {
            font-weight: 700;
            color: #1e293b;
            font-size: 1rem;
            margin-bottom: 6px;
        }

        /* Calendar Event Items */
        .calendar-event {
            background: white;
            border-radius: 4px;
            padding: 4px 6px;
            margin-bottom: 2px;
            border-left: 3px solid;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.7rem;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
            min-width: 0; /* Critical for text truncation in flexbox */
            width: 100%; /* Ensure full width within container */
            box-sizing: border-box;
        }

        .calendar-event:hover {
            transform: translateX(2px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
            z-index: 5;
        }

        .calendar-event.status-pending {
            border-left-color: #f59e0b;
            background: #fffbeb;
        }

        .calendar-event.status-confirmed {
            border-left-color: #10b981;
            background: #ecfdf5;
        }

        .calendar-event.status-completed {
            border-left-color: #6b7280;
            background: #f3f4f6;
        }

        .calendar-event .event-title {
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 1px;
            font-size: 0.7rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
            width: 100%;
            display: block;
            max-width: 100%;
        }

        .calendar-event .event-time {
            color: #64748b;
            font-size: 0.65rem;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            width: 100%;
            display: block;
        }

        .calendar-event .event-facility {
            color: #64748b;
            font-size: 0.6rem;
            margin-top: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
            display: none; /* Hide facility on small calendar cells */
            width: 100%;
        }

        /* Show more events indicator */
        .more-events-indicator {
            text-align: center;
            font-size: 0.65rem;
            color: #1e3c72;
            font-weight: 600;
            padding: 3px;
            background: #e0e7ff;
            border-radius: 3px;
            cursor: pointer;
            margin-top: 2px;
        }

        .more-events-indicator:hover {
            background: #c7d2fe;
        }

        /* Compact calendar day styling */
        .calendar-day-wrapper {
            display: flex;
            flex-direction: column;
            height: auto;
            width: 100%;
            min-width: 0; /* Critical for text truncation */
            overflow: visible;
        }

        .calendar-day-header-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 4px;
            flex-shrink: 0; /* Prevent shrinking */
        }

        .event-count-badge {
            background: #1e3c72;
            color: white;
            font-size: 0.65rem;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: 600;
            flex-shrink: 0; /* Prevent shrinking */
            white-space: nowrap;
        }

        /* Legend */
        .calendar-legend {
            display: flex;
            gap: 20px;
            justify-content: center;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
        }

        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
        }

        .legend-color.pending {
            background: #f59e0b;
        }

        .legend-color.confirmed {
            background: #10b981;
        }

        .legend-color.completed {
            background: #6b7280;
        }

        .legend-label {
            font-weight: 600;
            color: #1e293b;
            font-size: 0.9rem;
        }

        /* Event Detail Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 9999;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background-color: #fefefe;
            margin: 5% auto;
            padding: 0;
            border: 1px solid #888;
            border-radius: 16px;
            width: 90%;
            max-width: 600px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .modal-header {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: white;
            padding: 20px 24px;
            border-radius: 16px 16px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            margin: 0;
        }

        .close {
            color: white;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            border-radius: 8px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .close:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: rotate(90deg);
        }

        .modal-body {
            padding: 24px;
        }

        .event-detail-item {
            margin-bottom: 16px;
            padding-bottom: 16px;
            border-bottom: 1px solid #e5e7eb;
        }

        .event-detail-item:last-child {
            border-bottom: none;
        }

        .event-detail-label {
            font-weight: 600;
            color: #64748b;
            font-size: 0.85rem;
            text-transform: uppercase;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .event-detail-value {
            color: #1e293b;
            font-size: 1rem;
            font-weight: 500;
        }

        .status-badge-modal {
            display: inline-block;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
        }

        .status-badge-modal.pending {
            background: #fef3c7;
            color: #f59e0b;
        }

        .status-badge-modal.confirmed {
            background: #d1fae5;
            color: #10b981;
        }

        .status-badge-modal.completed {
            background: #e5e7eb;
            color: #6b7280;
        }

        /* No events message */
        .no-events-message {
            text-align: center;
            padding: 60px 20px;
            color: #64748b;
        }

        .no-events-message i {
            font-size: 4rem;
            color: #cbd5e1;
            margin-bottom: 20px;
        }

        .no-events-message h3 {
            font-size: 1.5rem;
            font-weight: 700;
            color: #475569;
            margin-bottom: 10px;
        }

        .no-events-message p {
            font-size: 1rem;
            color: #64748b;
        }

        /* Loading spinner */
        .loading-spinner {
            text-align: center;
            padding: 40px;
        }

        .spinner {
            border: 4px solid rgba(30, 60, 114, 0.1);
            border-radius: 50%;
            border-top: 4px solid #1e3c72;
            width: 50px;
            height: 50px;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Responsive Design */
        @media (max-width: 1200px) {
            .calendar-container {
                padding: 16px;
            }

            .calendar-day {
                min-height: 90px;
                max-height: none;
            }

            .calendar-day-number {
                font-size: 0.85rem;
            }

            .calendar-event .event-title {
                font-size: 0.68rem;
            }
        }

        @media (max-width: 992px) {
            .calendar-container {
                padding: 14px;
            }

            .calendar-grid {
                gap: 5px;
            }

            .calendar-day {
                min-height: 85px;
                max-height: none;
                padding: 5px;
            }

            .calendar-event {
                padding: 3px 5px;
            }

            .calendar-event .event-title {
                font-size: 0.66rem;
            }
        }

        @media (max-width: 768px) {
            .hero-section {
                padding: 80px 20px;
            }

            .hero-content h1 {
                font-size: 2rem;
            }

            .calendar-nav-header {
                flex-direction: column;
                gap: 15px;
            }

            .calendar-nav-header h3 {
                font-size: 1.3rem;
            }

            .month-navigation {
                flex-wrap: wrap;
                gap: 10px;
            }

            .current-month-display {
                min-width: 140px;
                font-size: 1rem;
            }

            .calendar-container {
                padding: 12px;
            }

            .calendar-grid {
                gap: 4px;
            }

            .calendar-day {
                min-height: 80px;
                max-height: none;
                padding: 4px;
            }

            .calendar-day-number {
                font-size: 0.75rem;
            }

            .event-count-badge {
                font-size: 0.6rem;
                padding: 1px 4px;
            }

            .calendar-event {
                padding: 3px 4px;
                font-size: 0.65rem;
            }

            .calendar-event .event-title {
                font-size: 0.62rem;
            }

            .calendar-event .event-time {
                font-size: 0.58rem;
            }

            .more-events-indicator {
                font-size: 0.6rem;
                padding: 2px;
            }

            .calendar-filters {
                padding: 20px;
            }

            .filter-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .calendar-legend {
                gap: 10px;
            }

            .legend-item {
                font-size: 0.8rem;
                padding: 6px 12px;
            }
        }

        @media (max-width: 576px) {
            .calendar-container {
                padding: 10px;
            }

            .calendar-grid {
                gap: 3px;
            }

            .calendar-day {
                min-height: 75px;
                max-height: none;
                padding: 3px;
            }

            .calendar-day-number {
                font-size: 0.72rem;
            }

            .calendar-event .event-title {
                font-size: 0.6rem;
            }

            .calendar-event .event-time {
                font-size: 0.56rem;
            }
        }

        @media (max-width: 480px) {
            .hero-content h1 {
                font-size: 1.5rem;
            }

            .calendar-container {
                padding: 8px;
            }

            .calendar-grid {
                gap: 2px;
            }

            .calendar-day {
                min-height: 70px;
                max-height: none;
                padding: 2px;
            }

            .calendar-day-number {
                font-size: 0.7rem;
            }

            .event-count-badge {
                font-size: 0.55rem;
                padding: 1px 3px;
            }

            .calendar-event {
                padding: 2px 3px;
            }

            .calendar-event .event-title {
                font-size: 0.58rem;
            }

            .calendar-event .event-time {
                font-size: 0.54rem;
            }

            .more-events-indicator {
                font-size: 0.58rem;
                padding: 2px;
            }

            .nav-button {
                padding: 8px 12px;
                font-size: 0.85rem;
            }

            .today-button {
                padding: 8px 15px;
                font-size: 0.85rem;
            }
        }

        @media (max-width: 375px) {
            .calendar-day {
                min-height: 65px;
                max-height: none;
            }

            .calendar-day-number {
                font-size: 0.65rem;
            }

            .calendar-event .event-title {
                font-size: 0.56rem;
            }

            .calendar-event .event-time {
                font-size: 0.52rem;
            }

            .event-count-badge {
                font-size: 0.52rem;
            }
        }
