
:root {
  --color-holiday:    #c82333;
  --color-no-lesson:  #90EE90;
  --color-school-event: #f0c046;
  --color-weekday:    #ffffff;
  --color-weekend:    #90EE90;
  --color-orange:     #FFA500;
  --color-red:        #FF0000;
  --font-stack:       system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  --bg:               #f5f7fa;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-stack);
  background: var(--bg);
  color: #1f1f1f;
}
.page-wrapper {
  max-width:1280px;
  margin:0 auto;
  padding:24px 16px;
}
.page-title {
  font-size:42px;
  margin-bottom:12px;
  font-weight:600;
}
.tabs-wrapper { margin-bottom:12px; }
.tabs {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding-bottom:4px;
  border-bottom:1px solid #dcdcdc;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.tabs::-webkit-scrollbar { display:none }
.tab-btn {
  background:transparent;
  border:none;
  padding:10px 12px;
  font-size:13px;
  cursor:pointer;
  color:#555;
  border-radius:4px 4px 0 0;
  white-space:nowrap;
  transition:background .2s,color .2s;
}
.tab-btn.active {
  background:#b08d62;
  color:#fff;
}
.tabs.grid-4x3 {
  display:grid!important;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
}
.tabs.grid-6x2 {
  display:grid!important;
  grid-template-columns:repeat(6,1fr);
  gap:6px;
}
.content-wrapper { display:flex; justify-content:center; }
.inner-layout {
  display:flex;
  gap:32px;
  width:100%;
  max-width:1100px;
  align-items:flex-start;
  flex-wrap:wrap;
}

/* Calendar Section */
.calendar-section {
  flex:1;
  min-width:300px;
}
.calendar-container {
  background:#fff;
  border:1px solid #e3e3e3;
  border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,0.03);
  padding:14px 16px;
}

/* Legend Bar */
.legend-bar {
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  margin-top:16px;
  padding:12px 16px;
  background:#fff;
  border-radius:8px;
  border:1px solid #e3e3e3;
}
.legend-item {
  display:flex;
  align-items:center;
  gap:6px;
}
.legend-box {
  width:16px;
  height:16px;
  border-radius:3px;
  border:1px solid rgba(0,0,0,0.1);
}

/* Sidebar */
.sidebar {
  width:300px;
  flex-shrink:0;
}
@media (max-width: 900px) {
  .sidebar {
    width:100%;
  }
}

.month-card {
  width:100%;
  max-width:420px;
}
.month-title {
  display:flex;
  justify-content:space-between;
  margin-bottom:8px;
  font-weight:600;
  font-size:16px;
}
.small { font-size:11px; opacity:.75; }
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.calendar-table th,
.calendar-table td {
  border: 1px solid #e6e6e6;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1;
}
.calendar-table th {
  background: #b2e0d9;
  font-weight: 600;
  color: #333;
}
.calendar-table .kw-cell {
  background: #b2e0d9;
  font-weight: 600;
  color: #333;
  width: 40px;
}
.calendar-table .day {
  min-height: 40px;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.calendar-table .day:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1;
}
.calendar-table .day.selected {
  box-shadow: inset 0 0 0 3px #2271b1;
}
.day-number {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.day-events-bar {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2px;
  min-height: 8px;
}
.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2271b1;
}
.day-events-list {
  margin-top: 10px;
}
.day-event-item {
  padding: 10px;
  margin-bottom: 8px;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 3px solid #2271b1;
}
.day.outside {
  background:#f1f1f1;
  color:#aaa;
  border-color:#f1f1f1;
  cursor: default;
}
.day.outside:hover {
  transform: none;
  box-shadow: none;
}

/* Date Event Indicator */
.date-event-indicator {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #2271b1;
  border-radius: 50%;
}

/* Sidebar Events */
.events {
  background:#fff;
  border:1px solid #e3e3e3;
  border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,0.03);
  padding:14px 16px;
}
.events h3 {
  margin:0 0 8px;
  font-size:16px;
  font-weight:600;
}
.semester { margin-bottom:10px; }
.event-list { list-style:none; padding:0; margin:4px 0; }
.event-list li { display:flex; gap:12px; margin-bottom:6px; }
.event-date { flex:0 0 100px; font-weight:700; font-size:12px; }
.event-desc { flex:1; font-size:13px; }
.footer-note { margin-top:4px; font-size:12px; color:#555; }

/* Date Events Section */
.date-events-section {
  margin-top: 24px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.03);
  border: 1px solid #e3e3e3;
}
.date-events-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #1d2327;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}
.date-events-hint {
  text-align: center;
  color: #666;
  padding: 40px;
  font-style: italic;
}
.date-events-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.date-event-card {
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #2271b1;
}
.date-event-time {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}
.date-event-title {
  font-size: 16px;
  font-weight: 600;
  color: #1d2327;
  margin-bottom: 8px;
}
.date-event-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* fade transitions */
.fade-exit {
  opacity: 1;
}
.fade-exit-active {
  opacity: 0;
  transition: opacity .2s ease-out;
}
.fade-enter {
  opacity: 0;
}
.fade-enter-active {
  opacity: 1;
  transition: opacity .2s ease-in;
}

@media (max-width: 600px) {
  .page-title {
    font-size: 28px;
  }
  .calendar-container {
    padding: 10px;
  }
  .date-events-list {
    grid-template-columns: 1fr;
  }
}
