:root {
  --line: #dee2e6;
  --soft: #f8f9fa;
  --ink: #212529;
  --muted: #6c757d;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--soft);
}

.app-header,
.filters,
.side-panel,
#detailPanel {
  box-shadow: 0 1px 2px rgba(33, 37, 41, 0.04);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.weekdays {
  background: transparent;
  border: 0;
}

.weekdays > div {
  padding: 0.4rem 0.5rem;
  background: var(--soft);
  text-align: center;
}

.calendar-day {
  min-height: 118px;
  padding: 0.45rem;
  background: #fff;
  overflow: hidden;
}

.calendar-day.is-muted {
  background: #fbfbfc;
  color: var(--muted);
}

.calendar-day.is-today {
  outline: 2px solid #0d6efd;
  outline-offset: -2px;
}

.day-number {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  align-items: center;
  min-height: 1.4rem;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.event-chip {
  display: block;
  width: 100%;
  margin-bottom: 0.25rem;
  padding: 0.18rem 0.32rem;
  border: 1px solid #cfe2ff;
  border-radius: 4px;
  background: #f0f6ff;
  color: #084298;
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-more {
  color: var(--muted);
  font-size: 0.72rem;
}

.side-panel {
  max-height: 70vh;
  overflow: hidden;
}

.exam-list {
  max-height: calc(70vh - 58px);
  overflow: auto;
}

.exam-list .list-group-item {
  cursor: pointer;
}

.exam-list .list-group-item.active {
  background: #f0f6ff;
  color: var(--ink);
  border-color: #cfe2ff;
}

.exam-name {
  font-weight: 700;
}

.exam-meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.date-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.date-row:last-child {
  border-bottom: 0;
}

.date-label {
  color: var(--muted);
}

@media (max-width: 768px) {
  .calendar-day {
    min-height: 84px;
    padding: 0.3rem;
  }

  .event-chip {
    font-size: 0.68rem;
  }

  .side-panel,
  .exam-list {
    max-height: none;
  }
}
