.schedule-calendar {
    min-width: 0;
}

.schedule-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.schedule-calendar-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.schedule-calendar-navigation .btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
}

.schedule-calendar-today {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 12px;
}

.schedule-calendar-scroll {
    overflow: hidden;
}

.schedule-calendar-header h3 {
    margin-bottom: 4px;
    font-size: 14px;
}

.schedule-calendar-header p {
    color: var(--text-muted);
    font-size: 12px;
}

.schedule-calendar-weekdays,
.schedule-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.schedule-calendar-weekdays {
    gap: 4px;
    margin-bottom: 4px;
}

.schedule-calendar-weekdays span {
    padding: 5px 2px;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.schedule-calendar-weekdays span.is-weekend {
    color: var(--danger);
}

.schedule-calendar-grid {
    gap: 4px;
}

.schedule-calendar-day {
    position: relative;
    min-height: 38px;
    padding: 5px 3px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-color);
    overflow: hidden;
    color: var(--text-main);
    font-family: inherit;
    text-align: center;
    cursor: pointer;
}

.schedule-calendar-day.is-weekend {
    background: rgba(220, 38, 38, 0.04);
    border-color: rgba(220, 38, 38, 0.16);
}

.schedule-calendar-day.is-weekend .schedule-calendar-day-number {
    color: var(--danger);
}

.schedule-calendar-day.is-empty {
    opacity: 0.45;
    background: transparent;
    cursor: default;
}

.schedule-calendar-day-number {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
}

.schedule-calendar-day.has-schedule {
    border-color: rgba(30, 58, 138, 0.24);
    background: var(--primary-light);
}

.schedule-calendar-day.has-schedule::after {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    content: '';
    transform: translateX(-50%);
}

.schedule-calendar-day.is-selected {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.schedule-calendar-events {
    display: none;
}

.schedule-calendar-event {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 6px;
    width: 100%;
    padding: 5px 6px;
    border: 1px solid rgba(30, 58, 138, 0.18);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.schedule-calendar-event:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.schedule-calendar-event-title {
    grid-column: 1 / -1;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-calendar-event-meta,
.schedule-calendar-event-pic {
    font-size: 10px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-calendar-event-pic {
    max-width: 64px;
}

.schedule-calendar-more {
    width: 100%;
    padding: 3px 5px;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.schedule-calendar-more:hover {
    text-decoration: underline;
}

.schedule-calendar-empty {
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0.75;
}

.schedule-calendar-selected-day {
    display: grid;
    gap: 6px;
    min-height: 76px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
}

.schedule-calendar-selected-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
    font-size: 11px;
}

.schedule-calendar-selected-item {
    padding: 7px 8px;
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    background: var(--bg-color);
}

.schedule-calendar-selected-item strong,
.schedule-calendar-selected-item span {
    display: block;
}

.schedule-calendar-selected-item strong {
    color: var(--text-main);
    font-size: 11px;
}

.schedule-calendar-selected-item span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 10px;
}

@media (max-width: 900px) {
    .team-insight-content {
        grid-template-columns: 1fr;
    }

    .schedule-calendar-weekdays span,
    .schedule-calendar-event-title,
    .schedule-calendar-event-meta,
    .schedule-calendar-event-pic {
        font-size: 10px;
    }
}

@media (max-width: 640px) {
    .schedule-calendar-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .schedule-calendar-navigation {
        width: 100%;
        justify-content: space-between;
    }

    .schedule-calendar-today {
        flex: 1;
    }
}
