if (typeof self === 'undefined') { var self = globalThis; }
.midnight-calendar-container {
  /* Pin the calendar to the visible viewport inside the padded main area */
  height: calc(100dvh - 3rem - 2px);
  display: flex;
  flex-direction: column;
  background-color: transparent;
  color: #ffffff;
  overflow: hidden;
  position: relative !important;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

/* ==================== RESPONSIVE GRID LAYOUT ==================== */

.calendar-layout {
  display: grid;
  height: 100%;
  grid-gap: 0;
  gap: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
  background: rgba(26, 27, 35, 0.5);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  margin: 0;
  box-sizing: border-box;
}

/* Mobile: Stack vertically */
@media (max-width: 640px) {
  .calendar-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .midnight-calendar-container {
    height: 100dvh;
  }
}

/* Tablet: Smaller sidebar */
@media (min-width: 641px) and (max-width: 1024px) {
  .calendar-layout {
    grid-template-columns: 180px 1fr;
  }

  .calendar-layout.has-event-details {
    grid-template-columns: 180px 1fr 300px;
  }
}

/* Small Desktop: Moderate sidebars */
@media (min-width: 1025px) and (max-width: 1440px) {
  .calendar-layout {
    grid-template-columns: 220px 1fr;
  }

  .calendar-layout.has-event-details {
    grid-template-columns: 220px 1fr 340px;
  }
}

/* Standard Desktop (1440p+): Full sidebars */
@media (min-width: 1441px) and (max-width: 1920px) {
  .calendar-layout {
    grid-template-columns: 240px 1fr;
  }

  .calendar-layout.has-event-details {
    grid-template-columns: 240px 1fr 380px;
  }
}

/* Large Desktop (4K+): Wider sidebars */
@media (min-width: 1921px) {
  .calendar-layout {
    grid-template-columns: 280px 1fr;
  }

  .calendar-layout.has-event-details {
    grid-template-columns: 280px 1fr 420px;
  }
}

/* ==================== CALENDAR MAIN AREA ==================== */

.calendar-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  background: transparent;
  min-height: 100%;
  padding: 0;
  border-radius: 0 16px 16px 0;
}

/* Calendar Grid Container */
.calendar-grid-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  min-height: 0;
}

.react-big-calendar-wrapper {
  background: transparent;
  padding: 0 1rem;
  overflow: hidden;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

/* Responsive padding */
@media (max-width: 640px) {
  .react-big-calendar-wrapper {
    padding: 0 0.5rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .react-big-calendar-wrapper {
    padding: 0 0.75rem;
  }
}

.react-big-calendar-wrapper .rbc-calendar {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Event details sidebar styling */
.event-details-sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

/* ==================== REACT BIG CALENDAR THEME ==================== */

.rbc-calendar {
  font-family: inherit;
  background: transparent;
  color: #ffffff;
  border: none !important;
  height: 100%;
}

/* AGGRESSIVE BORDER REMOVAL - Removed outline: none for accessibility */
.rbc-calendar *,
.rbc-calendar *::before,
.rbc-calendar *::after {
  border: none !important;
  border-color: transparent !important;
  border-width: 0 !important;
}

.rbc-month-view *,
.rbc-time-view *,
.rbc-agenda-view *,
.rbc-row *,
.rbc-row-segment *,
.rbc-day-bg *,
.rbc-event *,
.rbc-header * {
  border: none !important;
  border-color: transparent !important;
  border-width: 0 !important;
}

/* Subtle dividers */
.rbc-day-bg + .rbc-day-bg {
  box-shadow: -1px 0 0 0 rgba(255, 255, 255, 0.04);
}

.rbc-month-row + .rbc-month-row {
  box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.04);
}

/* Header styles */
.rbc-header {
  padding: 0.75rem 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none;
  background: transparent;
}

/* Responsive header font */
@media (max-width: 640px) {
  .rbc-header {
    font-size: 0.75rem;
    padding: 0.5rem 0;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rbc-header {
    font-size: 0.8125rem;
    padding: 0.625rem 0;
  }
}

.rbc-header + .rbc-header {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* Month view */
.rbc-month-view {
  background: transparent;
  border: none !important;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.rbc-month-rows {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rbc-month-view .rbc-header-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0;
  padding-bottom: 0.5rem;
  flex: 0 0 auto;
}

.rbc-day-bg {
  background: rgba(255, 255, 255, 0.02) !important;
  border: none !important;
  transition: all 0.2s ease;
  flex: 1;
}

.rbc-day-bg:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border: none !important;
}

.rbc-off-range-bg {
  background: rgba(0, 0, 0, 0.2);
  border: none !important;
}

/* Today highlight */
.rbc-month-view .rbc-day-bg.rbc-today,
.rbc-time-view .rbc-day-slot.rbc-today {
  background: rgba(139, 92, 246, 0.08) !important;
  position: relative;
}

.rbc-month-view .rbc-day-bg.rbc-today::after,
.rbc-time-view .rbc-day-slot.rbc-today::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  pointer-events: none;
}

.rbc-header.rbc-today::after {
  content: none !important;
}

.rbc-time-view .rbc-time-header .rbc-day-bg.rbc-today,
.rbc-time-view .rbc-time-header .rbc-day-bg.rbc-today::after {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
}

.rbc-time-view .rbc-time-header .rbc-header.rbc-today,
.rbc-time-view .rbc-time-header .rbc-header.rbc-today::after {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
}

/* Date numbers */
.rbc-date-cell {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.25rem 0.5rem;
}

/* Responsive date cell */
@media (max-width: 640px) {
  .rbc-date-cell {
    padding: 0.125rem 0.25rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rbc-date-cell {
    padding: 0.2rem 0.4rem;
    font-size: 0.9375rem;
  }
}

.rbc-date-cell.rbc-off-range {
  color: rgba(255, 255, 255, 0.3);
}

.rbc-date-cell.rbc-now {
  color: #8b5cf6;  /* purple-500 */
  font-weight: 700;
}

/* Events - Consolidated rules from lines 332-343, 1053-1057, 1137-1140 */
.rbc-event {
  /* Sizing & Layout */
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 500;

  /* Styling */
  border-radius: 4px;
  border: none !important;
  background-color: rgba(139, 92, 246, 0.9);
  background-color: var(--event-color-base, rgba(139, 92, 246, 0.9));
  color: rgba(255, 255, 255, 0.95);
  color: var(--event-text-color, rgba(255, 255, 255, 0.95));
  border-left: 4px solid rgba(139, 92, 246, 0.9);
  border-left: 4px solid var(--event-color-base, rgba(139, 92, 246, 0.9));

  /* Effects */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease;
}

/* Responsive events */
@media (max-width: 640px) {
  .rbc-event {
    font-size: 0.6875rem;
    padding: 1px 5px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rbc-event {
    font-size: 0.71875rem;
    padding: 1.5px 5.5px;
  }
}

.rbc-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.rbc-event.rbc-selected {
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.5);
}

.rbc-event-label {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Hide default toolbar */
.rbc-toolbar {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Week and Day view */
.rbc-time-view {
  border: none;
  background: transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rbc-time-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rbc-time-header-content {
  border-left: none;
}

.rbc-time-content {
  border-top: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.rbc-time-slot {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rbc-timeslot-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 40px;
  height: 40px;
}

/* Responsive time slots */
@media (max-width: 640px) {
  .rbc-timeslot-group {
    min-height: 30px;
    height: 30px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rbc-timeslot-group {
    min-height: 35px;
    height: 35px;
  }
}

.rbc-current-time-indicator {
  background-color: #8b5cf6;
  height: 2px;
}

/* Agenda view */
.rbc-agenda-view {
  color: rgba(255, 255, 255, 0.92);
  height: 100%;
  overflow: auto;
  padding: 2rem 1.5rem 3rem;
  background: linear-gradient(180deg, rgba(20, 18, 32, 0.55) 0%, rgba(12, 10, 22, 0.32) 36%, rgba(8, 7, 15, 0.08) 100%);
}

.rbc-agenda-view::-webkit-scrollbar {
  width: 8px;
}

.rbc-agenda-view::-webkit-scrollbar-track {
  background: transparent;
}

.rbc-agenda-view::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.rbc-agenda-view table {
  border-collapse: separate;
  border-spacing: 0 1rem;
  width: 100%;
  margin: 0;
}

.rbc-agenda-view table thead > tr {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 5;
}

.rbc-agenda-view table thead > tr > th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: rgba(231, 228, 255, 0.82);
  background: rgba(26, 23, 40, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: none;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.rbc-agenda-view table thead > tr > th:first-child {
  border-radius: 12px 0 0 12px;
}

.rbc-agenda-view table thead > tr > th:last-child {
  border-radius: 0 12px 12px 0;
}

/* Responsive agenda header */
@media (max-width: 640px) {
  .rbc-agenda-view {
    padding: 1.25rem 0.75rem 2rem;
  }

  .rbc-agenda-view table {
    border-spacing: 0 0.7rem;
  }

  .rbc-agenda-view table thead > tr > th {
    padding: 0.5rem 0.6rem;
    font-size: 0.72rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rbc-agenda-view {
    padding: 1.5rem 1rem 2.25rem;
  }

  .rbc-agenda-view table {
    border-spacing: 0 0.85rem;
  }

  .rbc-agenda-view table thead > tr > th {
    padding: 0.6rem 0.85rem;
    font-size: 0.76rem;
  }
}

.rbc-agenda-view table tbody > tr {
  border: none;
  position: relative;
  z-index: 0;
}

.rbc-agenda-view table tbody > tr:hover .rbc-event {
  transform: translateY(-1px);
}

.rbc-agenda-view table tbody > tr > td {
  padding: 1rem 1.25rem;
  color: rgba(245, 243, 255, 0.85);
  border: none;
  background: transparent;
  position: relative;
  z-index: 1;
}

.rbc-agenda-view table tbody > tr > td:first-child {
  padding-left: 1.25rem;
}

.rbc-agenda-view table tbody > tr > td:last-child {
  padding-right: 1rem;
}

.rbc-agenda-view table tbody > tr > td + td {
  border-left: 1px solid rgba(255, 255, 255, 0.04);
}

.rbc-agenda-view table tbody > tr > td.rbc-agenda-event-cell {
  padding: 0.75rem 1rem 0.75rem 0.75rem;
}

.rbc-agenda-view table tbody > tr > td.rbc-agenda-time-cell,
.rbc-agenda-view table tbody > tr > td.rbc-agenda-date-cell {
  vertical-align: middle;
}

.rbc-agenda-view table tbody > tr > td.rbc-agenda-course-cell {
  vertical-align: middle;
  min-width: 200px;
  padding-right: 0.75rem;
}

.rbc-agenda-view table tbody > tr > td.rbc-agenda-time-cell {
  min-width: 170px;
}

.rbc-agenda-view table tbody > tr > td.rbc-agenda-date-cell {
  min-width: 160px;
}

.rbc-agenda-date-cell {
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(230, 228, 255, 0.8);
}

.rbc-agenda-time-cell {
  white-space: nowrap;
  font-size: 0.85rem;
  color: rgba(208, 210, 255, 0.82);
  font-weight: 600;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.rbc-agenda-time-cell::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  right: auto;
  bottom: 0.25rem;
  left: -0.5px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

.rbc-agenda-event-cell {
  width: 100%;
}

.rbc-agenda-view .rbc-event {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  padding: 1rem 1.3rem 1rem 1.7rem;
  border-radius: 18px;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(16, 14, 26, 0.92) 0%, rgba(16, 14, 26, 0.72) 58%),
    linear-gradient(135deg, rgba(139, 92, 246, 0.45) 0%, rgba(16, 14, 26, 0) 78%);
  background:
    linear-gradient(120deg, rgba(16, 14, 26, 0.92) 0%, rgba(16, 14, 26, 0.72) 58%),
    linear-gradient(135deg, var(--event-color-strong, rgba(139, 92, 246, 0.45)) 0%, rgba(16, 14, 26, 0) 78%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border: 1px solid var(--event-border-color, rgba(255, 255, 255, 0.08));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.95);
  color: var(--event-text-color, rgba(255, 255, 255, 0.95));
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rbc-agenda-view .rbc-event::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 18px 0 0 18px;
  background: rgba(139, 92, 246, 0.9);
  background: var(--event-color, rgba(139, 92, 246, 0.9));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(139, 92, 246, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px var(--event-color-strong, rgba(139, 92, 246, 0.24));
}

.rbc-agenda-view .rbc-event::after {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.9);
  background: var(--event-color, rgba(139, 92, 246, 0.9));
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 12px var(--event-color-strong, rgba(139, 92, 246, 0.35));
}

.rbc-agenda-view .rbc-event-label {
  padding-left: 0.9rem;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(210, 207, 244, 0.72);
}

.rbc-agenda-view .rbc-event-content {
  padding-left: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.94rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  color: var(--event-text-color, rgba(255, 255, 255, 0.94));
}

.rbc-agenda-view .rbc-event-content > span:nth-child(2) {
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(206, 202, 245, 0.78);
}

.rbc-agenda-view .rbc-event:hover {
  border-color: rgba(139, 92, 246, 0.65);
  border-color: var(--event-color, rgba(139, 92, 246, 0.65));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.48);
}

.agenda-course-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.18);
  color: rgba(139, 92, 246, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.agenda-course-chip::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.agenda-course-chip--empty {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(220, 222, 255, 0.6);
  box-shadow: none;
}

@media (max-width: 640px) {
  .rbc-agenda-view table tbody > tr > td {
    padding: 0.75rem 0.9rem;
  }

  .rbc-agenda-view table tbody > tr > td:first-child {
    padding-left: 1.1rem;
  }

  .rbc-agenda-view table tbody > tr > td:last-child {
    padding-right: 1.1rem;
  }

  .rbc-agenda-view table tbody > tr > td.rbc-agenda-event-cell {
    padding: 0.65rem 0.85rem 0.65rem 0.65rem;
  }

  .rbc-agenda-view .rbc-event {
    padding: 0.8rem 1rem 0.8rem 1.4rem;
  }

  .rbc-agenda-view .rbc-event::after {
    left: 0.9rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rbc-agenda-view table tbody > tr > td {
    padding: 0.9rem 1rem;
  }

  .rbc-agenda-view table tbody > tr > td.rbc-agenda-event-cell {
    padding: 0.7rem 0.95rem 0.7rem 0.75rem;
  }

  .rbc-agenda-view .rbc-event {
    padding: 0.9rem 1.1rem 0.9rem 1.5rem;
  }
}

/* Selection overlay */
.rbc-overlay {
  background: rgba(26, 27, 35, 0.95);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.rbc-overlay-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #ffffff;
}

/* Show more link */
.rbc-show-more {
  color: #8b5cf6;
  font-weight: 500;
  -webkit-text-decoration: none;
  text-decoration: none;
  transition: color 0.2s ease;
}

.rbc-show-more:hover {
  color: #9538e5;
  -webkit-text-decoration: underline;
  text-decoration: underline;
}

/* Row styles */
.rbc-row {
  border: none !important;
}

.rbc-row-segment {
  border: none !important;
}

.rbc-month-row {
  border: none !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Responsive month row height */
@media (max-width: 640px) {
  .rbc-month-view .rbc-month-row {
    min-height: 60px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .rbc-month-view .rbc-month-row {
    min-height: 80px;
  }
}

@media (min-width: 1025px) {
  .rbc-month-view .rbc-month-row {
    min-height: 100px;
  }
}

.rbc-row-content {
  border: none !important;
}

.rbc-row-segment {
  padding: 0 0.25rem;
}

/* Responsive segment padding */
@media (max-width: 640px) {
  .rbc-row-segment {
    padding: 0 0.125rem;
  }
}

/* Time gutter */
.rbc-time-gutter {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .rbc-time-gutter {
    font-size: 0.75rem;
  }
}

/* ==================== SIDEBAR STYLES ==================== */

/* Upcoming Events in Sidebar */
.upcoming-event-card-sidebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Responsive sidebar cards */
@media (max-width: 640px) {
  .upcoming-event-card-sidebar {
    gap: 0.5rem;
    padding: 0.5rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .upcoming-event-card-sidebar {
    gap: 0.625rem;
    padding: 0.625rem;
  }
}

.upcoming-event-card-sidebar:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.event-date-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  padding: 0.4rem;
  min-width: 40px;
}

/* Responsive date badge */
@media (max-width: 640px) {
  .event-date-sidebar {
    min-width: 32px;
    padding: 0.3rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .event-date-sidebar {
    min-width: 36px;
    padding: 0.35rem;
  }
}

.event-date-sidebar .event-day {
  font-size: 1rem;
  font-weight: 700;
  color: #8b5cf6;
  line-height: 1;
}

@media (max-width: 640px) {
  .event-date-sidebar .event-day {
    font-size: 0.875rem;
  }
}

.event-date-sidebar .event-month {
  font-size: 0.625rem;
  font-weight: 600;
  color: rgba(139, 92, 246, 0.8);
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .event-date-sidebar .event-month {
    font-size: 0.5625rem;
  }
}

.event-info {
  flex: 1;
  min-width: 0;
}

.upcoming-event-card-sidebar .event-info {
  flex: 1;
  min-width: 0;
}

.upcoming-event-card-sidebar .event-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

/* Responsive event title */
@media (max-width: 640px) {
  .upcoming-event-card-sidebar .event-title {
    font-size: 0.75rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .upcoming-event-card-sidebar .event-title {
    font-size: 0.78125rem;
  }
}

.upcoming-event-card-sidebar .event-time {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.2;
}

@media (max-width: 640px) {
  .upcoming-event-card-sidebar .event-time {
    font-size: 0.625rem;
  }
}

.event-type-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 0 12px 0 100%;
  opacity: 0.2;
}

@media (max-width: 640px) {
  .event-type-indicator {
    width: 30px;
    height: 30px;
  }
}

.event-type-indicator.test {
  background: #D4A574;
}

.event-type-indicator.assignment {
  background: #06b6d4;
}

.event-type-indicator.custom {
  background: #10b981;
}

.no-upcoming-events {
  text-align: center;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .no-upcoming-events {
    padding: 2rem;
    font-size: 0.8125rem;
  }
}

/* ==================== SCROLLBAR STYLING ==================== */

.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ==================== CLEAN EVENT STYLING ==================== */

.rbc-event.completed {
  opacity: 0.6;
  -webkit-text-decoration: line-through;
  text-decoration: line-through;
}

.rbc-day-bg {
  background: transparent !important;
  border: none !important;
  border-width: 0 !important;
}

.rbc-month-view .rbc-row {
  border: none !important;
  border-width: 0 !important;
}

.rbc-month-row .rbc-day-bg + .rbc-day-bg {
  border: none !important;
  box-shadow: -1px 0 0 0 rgba(255, 255, 255, 0.04);
}

.rbc-month-row + .rbc-month-row .rbc-day-bg {
  border: none !important;
  box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.04);
}

.rbc-today {
  background: rgba(139, 92, 246, 0.05) !important;
  border: none !important;
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.2) !important;
}

/* ==================== GLOBAL BORDER RESET ==================== */

.midnight-calendar-container *,
.midnight-calendar-container *::before,
.midnight-calendar-container *::after {
  border: 0 !important;
  border-style: none !important;
  border-width: 0 !important;
}

/* Accessible focus rings for keyboard navigation */
.midnight-calendar-container button:not(.does-not-exist):focus-visible {
  outline: 2px solid #8b5cf6 !important;
  outline-offset: 2px !important;
}
.midnight-calendar-container a:not(.does-not-exist):focus-visible {
  outline: 2px solid #8b5cf6 !important;
  outline-offset: 2px !important;
}
.midnight-calendar-container [role="button"]:focus-visible {
  outline: 2px solid #8b5cf6 !important;
  outline-offset: 2px !important;
}
.midnight-calendar-container .rbc-event:focus-visible {
  outline: 2px solid #8b5cf6 !important;
  outline-offset: 2px !important;
}
.midnight-calendar-container .filter-chip:focus-visible {
  outline: 2px solid #8b5cf6 !important;
  outline-offset: 2px !important;
}
.midnight-calendar-container .upcoming-event-card-sidebar:focus-visible {
  outline: 2px solid #8b5cf6 !important;
  outline-offset: 2px !important;
}

.midnight-calendar-container aside,
.midnight-calendar-container aside * {
  border: none !important;
}

.react-big-calendar-wrapper {
  border: none !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.calendar-layout {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.midnight-calendar-container aside {
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Remove all borders from headers and cells */
.rbc-header,
.rbc-header + .rbc-header,
.rbc-month-view .rbc-header-row,
.rbc-time-header,
.rbc-time-content,
.rbc-time-slot,
.rbc-timeslot-group,
.rbc-agenda-view table thead > tr > th,
.rbc-agenda-view table tbody > tr,
.rbc-overlay,
.rbc-overlay-header {
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
}

/* Event shadow already defined in consolidated .rbc-event rule above */

.filter-chip,
.upcoming-event-card-sidebar,
.event-date-sidebar {
  border: none !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.midnight-calendar-container input,
.midnight-calendar-container button,
.midnight-calendar-container select {
  border: none !important;
}

.midnight-calendar-container input:focus,
.midnight-calendar-container button:hover {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.midnight-calendar-container .view-selector button {
  border: none !important;
  background: rgba(255, 255, 255, 0.05);
}

.midnight-calendar-container [class*="course"] {
  border: none !important;
}

