/* ── Calendar ──────────────────────────────────────────────────── */
#win-cal { width: 460px; height: 540px; top: 60px; left: 60px; }

.cal-top {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cal-month {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.cal-filters { display: flex; gap: 4px; }
.cal-filter {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 9px;
  border: 1px solid var(--border2);
  background: var(--surface3);
  color: var(--text3);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.cal-filter:hover { color: var(--text); }
.cal-filter.active-f { font-weight: 700; }
.cal-filter.f-all.active-f  { border-color: var(--text2);  color: var(--text);   background: var(--surface2); }
.cal-filter.f-work.active-f { border-color: var(--purple); color: var(--purple); background: var(--purple-dim); }
.cal-filter.f-free.active-f { border-color: var(--green);  color: var(--green);  background: var(--green-dim); }

.cal-legend { display: flex; gap: 10px; }
.leg {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--text3);
}
.leg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

/* ── Calendar grid ── */
.cal-grid { padding: 12px 12px 8px; }

.day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.day-name {
  font-size: 9px;
  color: var(--text3);
  text-align: center;
  padding: 3px 0;
  text-transform: uppercase;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 10px;
  color: var(--text3);
  cursor: pointer;
  position: relative;
  transition: background .1s;
  padding-bottom: 6px;
}
.cal-day:hover { background: var(--surface2); }
.cal-day.today {
  background: var(--surface3);
  color: var(--text);
  font-weight: 700;
  border: 1px solid var(--border2);
}
.cal-day.conflict-day {
  background: rgba(248, 113, 113, .1);
  border: 1px solid rgba(248, 113, 113, .25);
}

/* ── Day dots ── */
.day-dots {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  align-items: center;
}
.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.w { background: var(--purple); }
.dot.f { background: var(--green); }
.dot.c { background: var(--amber); }

/* ── Filter visibility ── */
.cal-days.hide-work .dot.w { display: none; }
.cal-days.hide-free .dot.f { display: none; }

/* ── Events section ── */
.cal-events-section {
  padding: 0 12px 10px;
  border-top: 1px solid var(--border);
}
.evt-day-label {
  font-size: 9px;
  color: var(--text3);
  margin: 8px 0 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.cal-event {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 5px 8px;
  border-radius: 5px;
  margin-bottom: 3px;
  border-left: 3px solid;
}
.cal-event.work     { border-color: var(--purple); background: var(--purple-dim); }
.cal-event.free     { border-color: var(--green);  background: var(--green-dim); }
.cal-event.conflict { border-color: var(--red);    background: var(--red-dim); }

.evt-time {
  font-size: 9px;
  color: var(--text3);
  white-space: nowrap;
  margin-top: 1px;
  min-width: 36px;
}
.evt-title {
  font-size: 10px;
  color: var(--text2);
  line-height: 1.4;
}

.conflict-alert {
  font-size: 9px;
  color: var(--red);
  margin-top: 6px;
  padding: 5px 8px;
  background: var(--red-dim);
  border-radius: 4px;
  border: 1px solid rgba(248, 113, 113, .3);
  line-height: 1.4;
}
.cal-hint {
  font-size: 9px;
  color: var(--text3);
  margin-top: 6px;
  padding: 4px 6px;
  background: var(--surface3);
  border-radius: 4px;
}
