body {
    background-color: #f8f9fa;
}

.card {
    border-radius: 12px;
}

.table td,
.table th {
    vertical-align: middle;
}

.card-counter {
    border-left: 5px solid #0d6efd;
}

.calendar-wrapper {
    overflow-x: auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(180px, 1fr));
}

.calendar-cell {
    border: 1px solid #dcdcdc;
}

.header-cell {
    background: #8c8c8c;
    color: #fff;
    font-weight: 500;
    text-align: center;
    padding: 10px 8px;
    min-height: auto;
}

.day-cell {
    background: #fff;
    min-height: 180px;
    padding: 8px;
    position: relative;
    vertical-align: top;
}

.day-cell.other-month {
    background: #f1f1f1;
}

.day-cell.today {
    background: #eef6ff;
}

.day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.day-number {
    font-size: 30px;
    line-height: 1;
    color: #777;
    font-weight: 300;
}

.btn-add-day {
    padding: 2px 8px;
    line-height: 1;
    border: 1px solid #ddd;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-event {
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
    color: #212529;
    border-left: 5px solid transparent;
    background: #f8f9fa;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    text-align: left;
    width: 100%;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
}

.calendar-event .event-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.calendar-event .event-profissional,
.calendar-event .event-local {
    color: #555;
    font-size: 11px;
}

.status-planejado {
    background: #f1f3f5;
}

.status-andamento {
    background: #e7f1ff;
}

.status-concluido {
    background: #e9f7ef;
}

.status-cancelado {
    background: #fdecec;
}

.legend-item {
    font-size: 14px;
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.estab-color-1 { border-left-color: #e74c3c !important; }
.estab-color-2 { border-left-color: #3498db !important; }
.estab-color-3 { border-left-color: #2ecc71 !important; }
.estab-color-4 { border-left-color: #f1c40f !important; }
.estab-color-5 { border-left-color: #9b59b6 !important; }
.estab-color-6 { border-left-color: #1abc9c !important; }
.estab-color-7 { border-left-color: #e67e22 !important; }
.estab-color-8 { border-left-color: #34495e !important; }
.estab-color-9 { border-left-color: #ff6b81 !important; }
.estab-color-10 { border-left-color: #6c5ce7 !important; }

.legend-color.estab-color-1 { background: #e74c3c; }
.legend-color.estab-color-2 { background: #3498db; }
.legend-color.estab-color-3 { background: #2ecc71; }
.legend-color.estab-color-4 { background: #f1c40f; }
.legend-color.estab-color-5 { background: #9b59b6; }
.legend-color.estab-color-6 { background: #1abc9c; }
.legend-color.estab-color-7 { background: #e67e22; }
.legend-color.estab-color-8 { background: #34495e; }
.legend-color.estab-color-9 { background: #ff6b81; }
.legend-color.estab-color-10 { background: #6c5ce7; }

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(7, minmax(160px, 1fr));
    }

    .day-cell {
        min-height: 160px;
    }

    .day-number {
        font-size: 24px;
    }
}