.calendar {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.week-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 12px 0;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.month-cell {
  height: 118px;
  border-bottom: 1px solid #edf1f5;
  border-right: 1px solid #edf1f5;
  padding: 7px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.month-cell:nth-child(7n) {
  border-right: 0;
}
.month-cell.selected {
  background: #f5f2fc;
  box-shadow: inset 0 0 0 1px #c9b9eb;
}
.month-cell.outside {
  color: #b5bac3;
  background: #fafbfc;
}
.day-number {
  min-height: 28px;
  width: 28px;
  border: 0;
  border-radius: 50%;
  padding: 4px;
  background: transparent;
  font-weight: 500;
}
.day-number.is-today {
  background: var(--primary);
  color: white;
}
.day-count {
  display: none;
}
.event {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  min-height: 22px;
  width: 100%;
  padding: 3px 4px;
  text-align: left;
  line-height: 1.25;
  border: 0;
  border-left: 2px solid var(--regular);
  border-radius: 3px;
  background: #eee8fa;
  color: #4b2394;
  white-space: nowrap;
  overflow: hidden;
  margin-top: 3px;
}
.event span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.event.urgent {
  background: #fff0e5;
  border-color: var(--urgent);
  color: #a34f18;
}
.event.check {
  background: #e4f4f1;
  border-color: var(--check);
  color: #166e63;
}
.done {
  opacity: 0.58;
}
.event.done span:last-child {
  text-decoration: line-through;
}
.day-dots {
  display: none;
}
.day-panel {
  margin-top: 24px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel-title small {
  font-weight: 400;
  color: var(--primary);
}
.task-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.task-card {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: white;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--regular);
}
.task-card.urgent {
  border-left-color: var(--urgent);
}
.task-card.check {
  border-left-color: var(--check);
}
.task-card small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
.time-block {
  font-weight: 600;
  min-width: 45px;
}
.time-block small {
  font-weight: 400;
}
.badge {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f1f3f6;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.badge.overdue {
  color: #b94826;
  background: #fff0e5;
}
.empty {
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
}
.empty p {
  font-size: 12px;
}
.empty button {
  margin: 15px;
}
.agenda {
  padding: 10px 22px 24px;
}
.agenda section {
  margin-top: 20px;
}
.agenda h3 {
  color: var(--primary);
  font-size: 14px;
}
.agenda h3 small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}

.task-card > div:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}
.task-card .badge {
  flex-shrink: 0;
}
