/* ============================================================
   ACADEMIC CALENDAR
============================================================ */

.academic-calendar {
  width: 100%;
  min-width: 0;
}

/* ============================================================
   CALENDAR HEADER
============================================================ */

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;

  margin-bottom: 14px;
}

.calendar-month {
  flex: 1;

  text-align: center;

  font-size: 0.92rem;
  font-weight: 700;

  color: var(--text-primary);

  letter-spacing: 0.01em;
}

.calendar-nav-button {
  width: 30px;
  height: 30px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid var(--border);

  border-radius: 8px;

  background: rgba(255, 255, 255, 0.025);

  color: var(--text-secondary);

  font-size: 1.25rem;
  line-height: 1;

  cursor: pointer;

  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.calendar-nav-button:hover {
  background: rgba(91, 140, 255, 0.1);

  border-color: rgba(91, 140, 255, 0.3);

  color: var(--text-primary);
}

.calendar-nav-button:active {
  transform: scale(0.94);
}

/* ============================================================
   WEEKDAY LABELS
============================================================ */

.calendar-weekdays {
  display: grid;

  grid-template-columns: repeat(7, minmax(0, 1fr));

  gap: 3px;

  margin-bottom: 5px;
}

.calendar-weekdays span {
  min-width: 0;

  text-align: center;

  color: var(--text-muted);

  font-size: 0.64rem;
  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.04em;
}

/* ============================================================
   CALENDAR GRID
============================================================ */

.calendar-grid {
  display: grid;

  grid-template-columns: repeat(7, minmax(0, 1fr));

  gap: 3px;
}

/* ============================================================
   CALENDAR DAY
============================================================ */

.calendar-day {
  position: relative;

  min-width: 0;

  min-height: 38px;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 3px;

  padding: 4px 2px;

  border: 1px solid transparent;

  border-radius: 8px;

  background: rgba(255, 255, 255, 0.018);

  color: var(--text-secondary);

  cursor: pointer;

  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.calendar-day:hover {
  background: rgba(91, 140, 255, 0.09);

  border-color: rgba(91, 140, 255, 0.2);

  color: var(--text-primary);
}

.calendar-day:active {
  transform: scale(0.94);
}

/* Empty cells */

.calendar-day.empty {
  visibility: hidden;

  pointer-events: none;

  background: transparent;
}

/* Day number */

.calendar-day-number {
  position: relative;

  z-index: 1;

  font-size: 0.72rem;
  font-weight: 600;

  line-height: 1;
}

/* ============================================================
   TODAY
============================================================ */

.calendar-day.today {
  border-color: rgba(91, 140, 255, 0.38);

  background: rgba(91, 140, 255, 0.1);

  color: var(--blue-light);
}

.calendar-day.today .calendar-day-number {
  font-weight: 800;
  font-size: 0.8rem;
}

/* ============================================================
   SELECTED DAY
============================================================ */

.calendar-day.selected {
  border-color: rgba(154, 114, 255, 0.55);

  background: linear-gradient(135deg,
      rgba(91, 140, 255, 0.16),
      rgba(154, 114, 255, 0.14));

  color: var(--text-primary);

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.calendar-day.selected .calendar-day-number {
  font-weight: 800;
}

/* ============================================================
   EVENT DOTS
============================================================ */

.calendar-event-dots {
  height: 5px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 2px;
}

.calendar-dot {
  width: 4px;
  height: 4px;

  display: inline-block;

  border-radius: 50%;

  flex: 0 0 auto;
}

/*
 * Exam
 */

.calendar-dot.exam {
  background: var(--purple-light);

  box-shadow: 0 0 6px rgba(177, 148, 255, 0.4);
}

/*
 * Assignment
 */

.calendar-dot.assignment {
  background: var(--blue-light);

  box-shadow: 0 0 6px rgba(123, 164, 255, 0.35);
}

/*
 * General academic task
 */

.calendar-dot.task {
  background: var(--green);

  box-shadow: 0 0 6px rgba(79, 211, 154, 0.3);
}

/* ============================================================
   CALENDAR LEGEND
============================================================ */

.calendar-legend {
  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 8px 12px;

  margin-top: 14px;

  padding-top: 12px;

  border-top: 1px solid var(--border);
}

.calendar-legend span {
  display: inline-flex;

  align-items: center;

  gap: 5px;

  color: var(--text-muted);

  font-size: 0.66rem;
}

/* ============================================================
   ADD EVENT BUTTON
============================================================ */

.calendar-add-button {
  width: 100%;

  margin-top: 14px;

  padding: 9px 12px;

  border: 1px solid rgba(91, 140, 255, 0.22);

  border-radius: 9px;

  background: rgba(91, 140, 255, 0.065);

  color: var(--blue-light);

  font-family: inherit;

  font-size: 0.72rem;
  font-weight: 700;

  cursor: pointer;

  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.calendar-add-button:hover {
  background: rgba(91, 140, 255, 0.12);

  border-color: rgba(91, 140, 255, 0.38);

  color: var(--text-primary);
}

.calendar-add-button:active {
  transform: translateY(1px);
}

/* ============================================================
   SELECTED DATE EVENTS
============================================================ */

.selected-day-events {
  margin-top: 16px;

  padding-top: 14px;

  border-top: 1px solid var(--border);
}

.selected-date-title {
  margin-bottom: 12px;

  color: var(--text-primary);

  font-size: 0.76rem;
  font-weight: 800;
}

/* ============================================================
   EVENT GROUP
============================================================ */

.calendar-event-group {
  display: flex;

  flex-direction: column;

  gap: 6px;

  margin-bottom: 12px;
}

.calendar-group-label {
  display: block;

  margin-bottom: 2px;

  color: var(--text-muted);

  font-size: 0.61rem;
  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

/* ============================================================
   EVENT ITEM
============================================================ */

.calendar-event {
  position: relative;

  display: flex;

  flex-direction: column;

  gap: 3px;

  padding: 9px 10px 9px 12px;

  border: 1px solid var(--border);

  border-radius: 9px;

  background: rgba(5, 9, 18, 0.55);

  overflow: hidden;
}

/*
 * Small accent line on the left.
 */

.calendar-event::before {
  content: "";

  position: absolute;

  top: 7px;
  bottom: 7px;
  left: 0;

  width: 2px;

  border-radius: 0 3px 3px 0;

  background: var(--blue);
}

.calendar-event strong {
  color: var(--text-primary);

  font-size: 0.72rem;
  font-weight: 700;

  line-height: 1.35;
}

.calendar-event small {
  color: var(--text-muted);

  font-size: 0.63rem;

  line-height: 1.3;
}

/* Exam event */

.calendar-event.exam-event::before {
  background: var(--purple);
}

/* ============================================================
   EMPTY STATE
============================================================ */

.calendar-empty-message {
  padding: 10px 4px;

  color: var(--text-muted);

  font-size: 0.68rem;

  line-height: 1.5;

  text-align: center;
}

/* ============================================================
   ACADEMIC EVENT DIALOG
============================================================ */

#academicEventDialog {
  width: min(520px, calc(100vw - 28px));

  max-width: 520px;

  padding: 0;

  border: 1px solid var(--border-strong);

  border-radius: var(--radius-lg);

  background: #0b0f1a;

  color: var(--text-primary);

  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

#academicEventDialog::backdrop {
  background: rgba(2, 5, 12, 0.72);

  backdrop-filter: blur(6px);
}

#academicEventDialog .exam-dialog-card {
  padding: 22px;
}

/* ============================================================
   ACADEMIC EVENT FORM
============================================================ */

#academicEventDialog textarea {
  width: 100%;

  min-height: 90px;

  resize: vertical;

  padding: 10px 12px;

  border: 1px solid var(--border);

  border-radius: var(--radius-sm);

  outline: none;

  background: rgba(255, 255, 255, 0.025);

  color: var(--text-primary);

  font-family: inherit;

  font-size: 0.82rem;

  transition:
    border-color var(--transition),
    background var(--transition);
}

#academicEventDialog textarea::placeholder {
  color: var(--text-muted);
}

#academicEventDialog textarea:focus {
  border-color: rgba(91, 140, 255, 0.48);

  background: rgba(91, 140, 255, 0.035);
}

/* ============================================================
   MOBILE SIDEBAR CALENDAR
============================================================ */

@media (max-width: 700px) {
  .academic-calendar {
    padding-bottom: 10px;
  }

  .calendar-day {
    min-height: 42px;

    border-radius: 9px;
  }

  .calendar-day-number {
    font-size: 0.75rem;
  }

  .calendar-weekdays span {
    font-size: 0.62rem;
  }

  .calendar-nav-button {
    width: 34px;
    height: 34px;
  }

  #academicEventDialog {
    width: calc(100vw - 20px);

    max-height: calc(100dvh - 20px);

    overflow-y: auto;

    border-radius: 16px;
  }

  #academicEventDialog .exam-dialog-card {
    padding: 18px;
  }
}

/* ============================================================
   CALENDAR EVENT VISIBILITY UPGRADE
   Paste this at the VERY BOTTOM of your CSS file.
   ============================================================ */

/* ------------------------------------------------------------
   1. EVENT DAYS BECOME VISUALLY OBVIOUS
   ------------------------------------------------------------ */

.calendar-day.has-events {
  position: relative;

  border-color: rgba(245, 158, 11, 0.2);

  background: linear-gradient(180deg,
      rgba(245, 158, 11, 0.1),
      rgba(245, 158, 11, 0.035));

  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.035);
}

/* Strong visual indicator around the date */

.calendar-day.has-events::after {
  content: "";

  position: absolute;

  top: 4px;
  right: 4px;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #fbbf24;

  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.1),
    0 0 12px rgba(251, 191, 36, 0.55);
}

/* Event day number */

.calendar-day.has-events .calendar-day-number {
  color: #fffaf0;

  font-weight: 850;
}

/* Hover */

.calendar-day.has-events:hover {
  border-color: rgba(251, 191, 36, 0.45);

  background: linear-gradient(180deg,
      rgba(245, 158, 11, 0.17),
      rgba(245, 158, 11, 0.07));

  transform: translateY(-1px);
}

/* ------------------------------------------------------------
   2. EXAM DAYS GET EXTRA ATTENTION
   ------------------------------------------------------------ */

.calendar-day.has-exam {
  border-color: rgba(217, 119, 6, 0.38);

  background: linear-gradient(180deg,
      rgba(217, 119, 6, 0.18),
      rgba(245, 158, 11, 0.055));
}

.calendar-day.has-exam::after {
  width: 8px;
  height: 8px;

  background: #f59e0b;

  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.12),
    0 0 14px rgba(245, 158, 11, 0.7);
}

.calendar-day.has-exam .calendar-day-number {
  color: #fbbf24;

  font-weight: 900;
}

/* ------------------------------------------------------------
   3. TODAY + EVENT DAY
   ------------------------------------------------------------ */

.calendar-day.today.has-events {
  border-color: rgba(251, 191, 36, 0.6);

  background: linear-gradient(180deg,
      rgba(245, 158, 11, 0.2),
      rgba(91, 140, 255, 0.08));

  box-shadow:
    inset 0 0 0 1px rgba(251, 191, 36, 0.1),
    0 0 18px rgba(245, 158, 11, 0.08);
}

/* ------------------------------------------------------------
   4. SELECTED EVENT DAY
   ------------------------------------------------------------ */

.calendar-day.selected.has-events {
  border-color: rgba(251, 191, 36, 0.7);

  background: linear-gradient(135deg,
      rgba(245, 158, 11, 0.22),
      rgba(217, 119, 6, 0.13));

  box-shadow:
    inset 0 0 0 1px rgba(251, 191, 36, 0.12),
    0 8px 22px rgba(0, 0, 0, 0.2);
}

.calendar-day.selected.has-events .calendar-day-number {
  color: #fffaf0;
  font-size: 0.4rem;
  font-weight: 900;
}

/* ------------------------------------------------------------
   5. MAKE THE EVENT AREA MUCH MORE IMPORTANT
   ------------------------------------------------------------ */

.selected-day-events {
  margin-top: 18px;

  padding: 16px;

  border: 1px solid rgba(245, 158, 11, 0.16);

  border-radius: 14px;

  background: linear-gradient(145deg,
      rgba(245, 158, 11, 0.065),
      rgba(255, 255, 255, 0.018));

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* ------------------------------------------------------------
   6. SELECTED DATE TITLE
   ------------------------------------------------------------ */

.selected-date-title {
  display: flex;

  align-items: center;

  gap: 8px;

  margin: 0 0 14px;

  color: var(--text-primary);

  font-size: 0.82rem;

  font-weight: 850;

  letter-spacing: -0.01em;
}

.selected-date-title::before {
  content: "";

  width: 7px;
  height: 7px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: #fbbf24;

  box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}

/* ------------------------------------------------------------
   7. EVENT GROUP
   ------------------------------------------------------------ */

.calendar-event-group {
  display: flex;

  flex-direction: column;

  gap: 7px;

  margin-bottom: 15px;
}

.calendar-event-group:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   8. GROUP LABEL
   ------------------------------------------------------------ */

.calendar-group-label {
  display: flex;

  align-items: center;

  gap: 6px;

  margin: 0 0 4px;

  color: var(--text-muted);

  font-size: 0.62rem;

  font-weight: 850;

  text-transform: uppercase;

  letter-spacing: 0.1em;
}

/* ------------------------------------------------------------
   9. EVENT CARD
   ------------------------------------------------------------ */

.calendar-event {
  position: relative;

  display: flex;

  flex-direction: column;

  gap: 4px;

  min-height: 54px;

  padding: 11px 12px 11px 15px;

  border: 1px solid rgba(255, 255, 255, 0.07);

  border-radius: 11px;

  background: rgba(0, 0, 0, 0.22);

  overflow: hidden;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.calendar-event:hover {
  transform: translateX(2px);

  border-color: rgba(251, 191, 36, 0.24);

  background: rgba(245, 158, 11, 0.055);
}

/* Stronger accent bar */

.calendar-event::before {
  content: "";

  position: absolute;

  top: 8px;
  bottom: 8px;
  left: 0;

  width: 3px;

  border-radius: 0 4px 4px 0;

  background: #fbbf24;

  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* Event title */

.calendar-event strong {
  color: var(--text-primary);

  font-size: 0.75rem;

  font-weight: 750;

  line-height: 1.4;
}

/* Event metadata */

.calendar-event small {
  color: var(--text-secondary);

  font-size: 0.64rem;

  line-height: 1.4;
}

/* ------------------------------------------------------------
   10. EXAM EVENT = STRONGEST VISUAL PRIORITY
   ------------------------------------------------------------ */

.calendar-event.exam-event {
  border-color: rgba(217, 119, 6, 0.2);

  background: linear-gradient(135deg,
      rgba(245, 158, 11, 0.09),
      rgba(0, 0, 0, 0.18));
}

.calendar-event.exam-event::before {
  width: 4px;

  background: linear-gradient(180deg, #fbbf24, #f59e0b);

  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.calendar-event.exam-event strong {
  color: #fffaf0;
}

/* ------------------------------------------------------------
   11. EXAM COUNT BADGE SUPPORT
   If your JS creates a count element, this styles it.
   ------------------------------------------------------------ */

.calendar-event-count {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-width: 20px;
  height: 20px;

  padding: 0 6px;

  border-radius: 999px;

  background: rgba(245, 158, 11, 0.15);

  border: 1px solid rgba(245, 158, 11, 0.24);

  color: #fbbf24;

  font-size: 0.62rem;

  font-weight: 850;
}

/* ------------------------------------------------------------
   12. EVENT DOTS — KEEP THEM, BUT MAKE THEM SECONDARY
   ------------------------------------------------------------ */

.calendar-event-dots {
  min-height: 6px;

  height: 6px;

  gap: 3px;

  margin-top: 1px;
}

.calendar-dot {
  width: 5px;
  height: 5px;

  border-radius: 50%;
}

.calendar-dot.exam {
  width: 6px;
  height: 6px;

  background: #f59e0b;

  box-shadow: 0 0 7px rgba(245, 158, 11, 0.65);
}

.calendar-dot.assignment {
  background: #fbbf24;

  box-shadow: 0 0 7px rgba(251, 191, 36, 0.5);
}

.calendar-dot.task {
  background: var(--green);

  box-shadow: 0 0 7px rgba(132, 204, 22, 0.45);
}

/* ------------------------------------------------------------
   13. EMPTY EVENT MESSAGE
   ------------------------------------------------------------ */

.calendar-empty-message {
  margin: 0;

  padding: 14px 8px;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.018);

  color: var(--text-muted);

  font-size: 0.68rem;

  line-height: 1.5;

  text-align: center;
}

/* ------------------------------------------------------------
   14. MOBILE CALENDAR
   ------------------------------------------------------------ */

@media (max-width: 700px) {
  .calendar-day {
    min-height: 46px;

    padding: 5px 3px;

    border-radius: 9px;
  }

  .calendar-day.has-events {
    background: linear-gradient(180deg,
        rgba(245, 158, 11, 0.13),
        rgba(245, 158, 11, 0.045));
  }

  .calendar-day.has-events::after {
    top: 4px;
    right: 4px;

    width: 6px;
    height: 6px;
  }

  .selected-day-events {
    padding: 14px;

    border-radius: 13px;
  }

  .calendar-event {
    min-height: 52px;

    padding: 10px 10px 10px 14px;
  }
}

/* ============================================================
   SCROLLABLE SIDEBAR
   ============================================================ */

.side-panel {
  height: 100vh;
  max-height: 100vh;

  overflow: hidden;
}

/* Sidebar header stays fixed */

.side-panel-header {
  flex: 0 0 72px;
}

/* Only the content area scrolls */

.side-panel-content {
  flex: 1 1 auto;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 20px;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

/* Chrome / Edge / Safari scrollbar */

.side-panel-content::-webkit-scrollbar {
  width: 6px;
}

.side-panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.side-panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);

  border-radius: 999px;
}

.side-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Mobile */

@media (max-width: 900px) {
  .side-panel {
    height: 100dvh;
    max-height: 100dvh;
  }

  .side-panel-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   DAILY EVENTS DIALOG
   ============================================================ */

.daily-events-dialog {
  width: min(620px, calc(100vw - 28px));

  max-width: 620px;

  max-height: calc(100dvh - 28px);

  padding: 0;

  border: 1px solid rgba(251, 191, 36, 0.18);

  border-radius: 20px;

  background: linear-gradient(180deg, #15120d, #0d0c09);

  color: var(--text-primary);

  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);

  overflow: hidden;
}

.daily-events-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);

  backdrop-filter: blur(7px);
}

/* ============================================================
   DIALOG CARD
   ============================================================ */

.daily-events-card {
  display: flex;

  flex-direction: column;

  max-height: calc(100dvh - 28px);
}

/* ============================================================
   HEADER
   ============================================================ */

.daily-events-header {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 18px;

  padding: 22px 22px 18px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.daily-events-header h2 {
  margin: 0;

  font-size: 21px;

  line-height: 1.25;

  letter-spacing: -0.035em;
}

.daily-events-header p {
  margin: 6px 0 0;

  color: var(--text-secondary);

  font-size: 12px;

  line-height: 1.5;
}

/* ============================================================
   EVENT LIST
   ============================================================ */

.daily-events-list {
  display: flex;

  flex-direction: column;

  gap: 10px;

  padding: 18px 22px;

  overflow-y: auto;

  min-height: 0;

  scrollbar-width: thin;

  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.daily-events-list::-webkit-scrollbar {
  width: 6px;
}

.daily-events-list::-webkit-scrollbar-track {
  background: transparent;
}

.daily-events-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);

  border-radius: 999px;
}

/* ============================================================
   DAILY EVENT CARD
   ============================================================ */

.daily-event {
  position: relative;

  display: flex;

  align-items: center;

  gap: 14px;

  padding: 13px 14px 13px 17px;

  border: 1px solid rgba(255, 255, 255, 0.07);

  border-radius: 12px;

  background: rgba(255, 255, 255, 0.025);

  overflow: hidden;
}

.daily-event::before {
  content: "";

  position: absolute;

  top: 8px;
  bottom: 8px;
  left: 0;

  width: 3px;

  border-radius: 0 4px 4px 0;

  background: #fbbf24;
}

/* Exam */

.daily-event.exam {
  border-color: rgba(245, 158, 11, 0.2);

  background: linear-gradient(135deg,
      rgba(245, 158, 11, 0.085),
      rgba(255, 255, 255, 0.018));
}

.daily-event.exam::before {
  width: 4px;

  background: linear-gradient(180deg, #fbbf24, #f59e0b);

  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

/* Assignment */

.daily-event.assignment::before {
  background: #fbbf24;
}

/* Task */

.daily-event.task::before {
  background: var(--green);
}

/* ============================================================
   EVENT ICON
   ============================================================ */

.daily-event-icon {
  display: grid;

  place-items: center;

  flex: 0 0 38px;

  width: 38px;
  height: 38px;

  border-radius: 10px;

  background: rgba(245, 158, 11, 0.1);

  font-size: 17px;
}

/* ============================================================
   EVENT INFORMATION
   ============================================================ */

.daily-event-info {
  min-width: 0;

  flex: 1;
}

.daily-event-type {
  display: block;

  margin-bottom: 3px;

  color: var(--text-muted);

  font-size: 9px;

  font-weight: 850;

  text-transform: uppercase;

  letter-spacing: 0.09em;
}

.daily-event-title {
  color: var(--text-primary);

  font-size: 13px;

  font-weight: 750;

  line-height: 1.35;
}

.daily-event-meta {
  margin-top: 4px;

  color: var(--text-secondary);

  font-size: 11px;

  line-height: 1.4;
}

/* ============================================================
   MULTIPLE EVENTS / EXAMS
   ============================================================ */

.daily-events-count {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-width: 24px;

  height: 24px;

  padding: 0 7px;

  border-radius: 999px;

  background: rgba(245, 158, 11, 0.12);

  border: 1px solid rgba(245, 158, 11, 0.2);

  color: #fbbf24;

  font-size: 10px;

  font-weight: 850;
}

/* ============================================================
   NO EVENTS
   ============================================================ */

.daily-events-empty {
  padding: 35px 20px;

  text-align: center;

  color: var(--text-muted);

  font-size: 12px;
}

.daily-events-empty strong {
  display: block;

  margin-bottom: 5px;

  color: var(--text-secondary);

  font-size: 14px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.daily-events-footer {
  display: flex;

  justify-content: flex-end;

  padding: 14px 22px 18px;

  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 600px) {
  .daily-events-dialog {
    width: calc(100vw - 18px);

    max-height: calc(100dvh - 18px);

    border-radius: 17px;
  }

  .daily-events-card {
    max-height: calc(100dvh - 18px);
  }

  .daily-events-header {
    padding: 18px 16px 15px;
  }

  .daily-events-header h2 {
    font-size: 18px;
  }

  .daily-events-list {
    padding: 14px 16px;
  }

  .daily-event {
    padding: 12px 11px 12px 14px;
  }

  .daily-events-footer {
    padding: 12px 16px 16px;
  }
}

/* ============================================================
   SIDEBAR SCROLL + DAY SCHEDULE DIALOG
   ============================================================ */

/* ------------------------------------------------------------
   SIDEBAR
   ------------------------------------------------------------ */

.side-panel {
  height: 100vh;
  max-height: 100vh;

  overflow: hidden;

  display: flex;
  flex-direction: column;
}

.side-panel-header {
  flex: 0 0 72px;
}

/*
 * ONLY the sidebar content scrolls.
 * The sidebar header remains fixed.
 */
.side-panel-content {
  flex: 1 1 auto;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 18px;

  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

/* Chrome / Edge / Safari scrollbar */

.side-panel-content::-webkit-scrollbar {
  width: 6px;
}

.side-panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.side-panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.side-panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ------------------------------------------------------------
   REMOVE INLINE SELECTED-DAY EVENTS FROM SIDEBAR
   ------------------------------------------------------------ */

.selected-day-events {
  display: none !important;
}

/* ------------------------------------------------------------
   CALENDAR DAYS WITH EVENTS
   ------------------------------------------------------------ */

/*
 * A day containing an event should NOT be represented
 * by only a tiny dot.
 */

.calendar-day.has-event,
.calendar-day.has-exam {
  border-color: rgba(245, 158, 11, 0.24);

  background: linear-gradient(145deg,
      rgba(245, 158, 11, 0.13),
      rgba(217, 119, 6, 0.055));

  color: var(--text-primary);

  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.035);
}

/*
 * Stronger treatment when multiple things happen
 * on the same day.
 */

.calendar-day.has-multiple {
  border-color: rgba(245, 158, 11, 0.48);

  background: linear-gradient(145deg,
      rgba(245, 158, 11, 0.2),
      rgba(217, 119, 6, 0.1));

  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.08),
    inset 0 0 20px rgba(245, 158, 11, 0.035);
}

/*
 * Event day number becomes more prominent.
 */

.calendar-day.has-event .calendar-day-number,
.calendar-day.has-exam .calendar-day-number {
  font-weight: 850;
}

/*
 * Selected event day.
 */

.calendar-day.selected.has-event,
.calendar-day.selected.has-exam {
  border-color: rgba(251, 191, 36, 0.72);

  background: linear-gradient(145deg,
      rgba(245, 158, 11, 0.28),
      rgba(217, 119, 6, 0.15));

  box-shadow:
    0 0 0 2px rgba(245, 158, 11, 0.1),
    0 8px 24px rgba(245, 158, 11, 0.08);
}

/*
 * Make the event summary much more visible.
 */

.calendar-day-summary {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 3px;

  width: 100%;
}

/*
 * Replace tiny dots with compact badges.
 */

.calendar-indicator {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-width: 18px;
  height: 15px;

  padding: 0 4px;

  border-radius: 5px;

  font-size: 8px;
  font-weight: 850;

  line-height: 1;

  letter-spacing: 0.02em;
}

.calendar-indicator-icon {
  margin-right: 2px;

  font-size: 7px;
}

/* Exam */

.exam-indicator {
  color: #fff7ed;

  background: rgba(217, 119, 6, 0.72);

  border: 1px solid rgba(251, 191, 36, 0.38);

  box-shadow: 0 0 8px rgba(245, 158, 11, 0.18);
}

/* Academic event */

.event-indicator {
  color: #fef3c7;

  background: rgba(245, 158, 11, 0.24);

  border: 1px solid rgba(245, 158, 11, 0.28);
}

/* ------------------------------------------------------------
   TODAY + EVENT
   ------------------------------------------------------------ */

.calendar-day.today.has-event,
.calendar-day.today.has-exam {
  border-color: rgba(251, 191, 36, 0.7);
}

/* ------------------------------------------------------------
   DAY SCHEDULE DIALOG
   ------------------------------------------------------------ */

#calendarDayDialog {
  width: min(620px, calc(100vw - 28px));

  max-width: 620px;

  max-height: calc(100vh - 32px);

  padding: 0;

  overflow: hidden;

  border: 1px solid rgba(245, 158, 11, 0.25);

  border-radius: 20px;

  color: var(--text-primary);

  background: linear-gradient(180deg, #15120d 0%, #0d0f15 100%);

  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

#calendarDayDialog::backdrop {
  background: rgba(2, 4, 8, 0.76);

  backdrop-filter: blur(7px);
}

/* Dialog inner */

.calendar-day-dialog-card {
  display: flex;

  flex-direction: column;

  max-height: calc(100vh - 32px);
}

/* Header */

.calendar-day-dialog-header {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 18px;

  padding: 22px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.07);

  background: linear-gradient(135deg,
      rgba(245, 158, 11, 0.12),
      rgba(217, 119, 6, 0.04));
}

.calendar-day-dialog-kicker {
  display: block;

  margin-bottom: 5px;

  color: #fbbf24;

  font-size: 10px;
  font-weight: 850;

  text-transform: uppercase;

  letter-spacing: 0.12em;
}

.calendar-day-dialog-header h2 {
  margin: 0;

  color: var(--text-primary);

  font-size: 21px;
  font-weight: 800;

  letter-spacing: -0.035em;
}

.calendar-day-dialog-count {
  display: flex;

  align-items: center;
  justify-content: center;

  min-width: 42px;
  height: 42px;

  padding: 0 10px;

  border: 1px solid rgba(245, 158, 11, 0.28);

  border-radius: 12px;

  color: #fbbf24;

  background: rgba(245, 158, 11, 0.1);

  font-size: 16px;
  font-weight: 850;
}

/* Body */

.calendar-day-dialog-body {
  flex: 1;

  min-height: 0;

  padding: 18px 22px 22px;

  overflow-y: auto;

  scrollbar-width: thin;

  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.calendar-day-dialog-body::-webkit-scrollbar {
  width: 6px;
}

.calendar-day-dialog-body::-webkit-scrollbar-track {
  background: transparent;
}

.calendar-day-dialog-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* Section */

.calendar-day-dialog-section {
  margin-bottom: 18px;
}

.calendar-day-dialog-section:last-child {
  margin-bottom: 0;
}

.calendar-day-dialog-section-title {
  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 9px;

  color: var(--text-secondary);

  font-size: 10px;
  font-weight: 850;

  text-transform: uppercase;

  letter-spacing: 0.09em;
}

.calendar-day-dialog-section-title span:last-child {
  margin-left: auto;

  min-width: 20px;

  padding: 3px 6px;

  border-radius: 5px;

  color: var(--text-muted);

  background: rgba(255, 255, 255, 0.05);

  text-align: center;
}

.calendar-day-dialog-marker {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--blue);
}

.calendar-day-dialog-marker.exam {
  background: #f59e0b;

  box-shadow: 0 0 8px rgba(245, 158, 11, 0.55);
}

.calendar-day-dialog-marker.event {
  background: #84cc16;

  box-shadow: 0 0 8px rgba(132, 204, 22, 0.4);
}

/* Item */

.calendar-day-dialog-item {
  display: grid;

  grid-template-columns: 48px minmax(0, 1fr);

  gap: 13px;

  padding: 13px;

  margin-bottom: 8px;

  border: 1px solid rgba(255, 255, 255, 0.07);

  border-radius: 13px;

  background: rgba(255, 255, 255, 0.025);

  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}

.calendar-day-dialog-item:hover {
  border-color: rgba(245, 158, 11, 0.22);

  background: rgba(245, 158, 11, 0.045);

  transform: translateY(-1px);
}

.calendar-day-dialog-item:last-child {
  margin-bottom: 0;
}

/* Type badge */

.calendar-day-dialog-item-badge {
  display: flex;

  align-items: center;
  justify-content: center;

  min-height: 38px;

  align-self: start;

  border-radius: 9px;

  color: #fff7ed;

  background: rgba(245, 158, 11, 0.16);

  border: 1px solid rgba(245, 158, 11, 0.25);

  font-size: 8px;
  font-weight: 850;

  text-transform: uppercase;
}

/* Content */

.calendar-day-dialog-item-content {
  min-width: 0;
}

.calendar-day-dialog-item-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 4px;
}

.calendar-day-dialog-item-type {
  color: #fbbf24;

  font-size: 9px;
  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.06em;
}

.calendar-day-dialog-item-time {
  color: var(--text-muted);

  font-size: 10px;

  white-space: nowrap;
}

.calendar-day-dialog-item h3 {
  margin: 0;

  color: var(--text-primary);

  font-size: 13px;
  font-weight: 750;

  line-height: 1.35;
}

.calendar-day-dialog-item p {
  margin: 4px 0 0;

  color: var(--text-secondary);

  font-size: 11px;

  line-height: 1.45;
}

.calendar-day-dialog-subject {
  display: inline-block;

  margin-top: 7px;

  padding: 4px 7px;

  border-radius: 6px;

  color: var(--text-secondary);

  background: rgba(255, 255, 255, 0.045);

  font-size: 9px;
  font-weight: 700;
}

/* Empty day */

.calendar-day-dialog-empty {
  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  min-height: 190px;

  padding: 25px;

  text-align: center;
}

.calendar-day-dialog-empty-icon {
  display: grid;

  place-items: center;

  width: 48px;
  height: 48px;

  margin-bottom: 12px;

  border-radius: 14px;

  color: var(--text-muted);

  background: rgba(255, 255, 255, 0.04);

  font-size: 20px;
}

.calendar-day-dialog-empty strong {
  margin-bottom: 5px;

  color: var(--text-primary);

  font-size: 14px;
}

.calendar-day-dialog-empty span {
  max-width: 280px;

  color: var(--text-muted);

  font-size: 11px;

  line-height: 1.5;
}

/* ------------------------------------------------------------
   MOBILE DIALOG
   ------------------------------------------------------------ */

@media (max-width: 600px) {
  #calendarDayDialog {
    width: calc(100vw - 18px);

    max-height: calc(100dvh - 18px);

    border-radius: 16px;
  }

  .calendar-day-dialog-card {
    max-height: calc(100dvh - 18px);
  }

  .calendar-day-dialog-header {
    padding: 18px;
  }

  .calendar-day-dialog-body {
    padding: 15px 18px 18px;
  }

  .calendar-day-dialog-header h2 {
    font-size: 18px;
  }

  .calendar-day-dialog-item {
    grid-template-columns: 42px minmax(0, 1fr);

    gap: 10px;

    padding: 11px;
  }
}

/* ============================================================
   DAILY EVENTS DIALOG
============================================================ */

.daily-events-dialog {
  width: min(620px, calc(100vw - 32px));

  max-height: calc(100vh - 40px);

  padding: 0;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 20px;

  background: linear-gradient(180deg, #15120d, #0d0b08);

  color: var(--text-primary);

  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.daily-events-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);

  backdrop-filter: blur(6px);
}

.daily-events-card {
  max-height: calc(100vh - 40px);

  display: flex;

  flex-direction: column;
}

.daily-events-header {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 20px;

  padding: 22px;

  border-bottom: 1px solid var(--border);
}

.daily-events-header h2 {
  margin: 4px 0 5px;

  font-size: 20px;

  line-height: 1.25;
}

.daily-events-header p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 12px;
}

.daily-events-list {
  display: flex;

  flex-direction: column;

  gap: 18px;

  padding: 20px 22px;

  overflow-y: auto;

  min-height: 0;

  max-height: 60vh;
}

/* ============================================================
   SECTIONS
============================================================ */

.daily-events-section {
  display: flex;

  flex-direction: column;

  gap: 9px;
}

.daily-events-section-title {
  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 2px;

  color: var(--text-secondary);

  font-size: 11px;

  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

.daily-events-section-title>span:last-child {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-width: 21px;

  height: 21px;

  padding: 0 6px;

  margin-left: auto;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.06);

  color: var(--text-primary);

  font-size: 10px;
}

.daily-events-section-marker {
  width: 7px;

  height: 7px;

  border-radius: 50%;

  flex: 0 0 auto;
}

.daily-events-section-marker.exam {
  background: #f59f0b6b;

  box-shadow: 0 0 10px rgba(245, 159, 11, 0.37);
}

.daily-events-section-marker.event {
  background: #84cc16;

  box-shadow: 0 0 10px rgba(132, 204, 22, 0.5);
}

/* ============================================================
   EVENT ITEMS
============================================================ */

.daily-event-item {
  position: relative;

  display: flex;

  align-items: flex-start;

  gap: 13px;

  padding: 13px;

  border: 1px solid rgba(255, 255, 255, 0.075);

  border-radius: 13px;

  background: rgba(255, 255, 255, 0.025);

  overflow: hidden;
}

.daily-event-item::before {
  content: "";

  position: absolute;

  inset: 0 auto 0 0;

  width: 3px;

  background: var(--blue);
}

.daily-event-exam {
  border-color: rgba(245, 158, 11, 0.18);

  background: linear-gradient(135deg,
      rgba(245, 158, 11, 0.08),
      rgba(255, 255, 255, 0.018));
}

.daily-event-exam::before {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.daily-event-academic::before {
  background: #84cc16;
}

.daily-event-badge {
  display: flex;

  align-items: center;

  justify-content: center;

  flex: 0 0 auto;

  min-width: 48px;

  min-height: 28px;

  padding: 0 8px;

  border-radius: 8px;

  background: rgba(255, 255, 255, 0.06);

  color: var(--text-secondary);

  font-size: 9px;

  font-weight: 850;

  letter-spacing: 0.07em;
}

.daily-event-exam .daily-event-badge {
  background: rgba(245, 158, 11, 0.12);

  color: #fbbe2450;
}

.daily-event-content {
  min-width: 0;

  flex: 1;
}

.daily-event-type {
  margin-bottom: 3px;

  color: var(--text-muted);

  font-size: 10px;

  font-weight: 750;

  text-transform: uppercase;

  letter-spacing: 0.07em;
}

.daily-event-content h3 {
  margin: 0;

  color: var(--text-primary);

  font-size: 14px;

  line-height: 1.35;
}

.daily-event-subject-code {
  display: inline-block;

  margin-top: 6px;

  color: var(--text-secondary);

  font-size: 11px;

  font-weight: 650;
}

.daily-event-content p {
  margin: 8px 0 0;

  color: var(--text-secondary);

  font-size: 12px;

  line-height: 1.5;
}

/* ============================================================
   EMPTY
============================================================ */

.daily-events-empty {
  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 8px;

  min-height: 180px;

  text-align: center;
}

.daily-events-empty-icon {
  display: grid;

  place-items: center;

  width: 46px;

  height: 46px;

  margin-bottom: 5px;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.04);

  color: var(--text-muted);

  font-size: 20px;
}

.daily-events-empty strong {
  font-size: 14px;
}

.daily-events-empty span {
  max-width: 330px;

  color: var(--text-muted);

  font-size: 11px;

  line-height: 1.5;
}

/* ============================================================
   FOOTER
============================================================ */

.daily-events-footer {
  display: flex;

  justify-content: flex-end;

  padding: 14px 22px 18px;

  border-top: 1px solid var(--border);
}

/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 600px) {
  .daily-events-dialog {
    width: calc(100vw - 20px);

    max-height: calc(100dvh - 20px);

    border-radius: 16px;
  }

  .daily-events-header {
    padding: 18px;
  }

  .daily-events-list {
    padding: 16px 18px;

    max-height: 62vh;
  }

  .daily-events-footer {
    padding: 12px 18px 16px;
  }

  .daily-event-item {
    gap: 10px;

    padding: 11px;
  }

  .daily-event-badge {
    min-width: 42px;

    font-size: 8px;
  }
}


