.agenda-page {
    background: #f4f6f9;
    min-height: 100vh;
}

.agenda-header-card {
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.agenda-sidebar-card {
    border-radius: 18px;
    background: #ffffff;
}

.agenda-grid {
    min-height: 220px;
}

.agenda-slot-card {
    border-radius: 18px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 150px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.agenda-slot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.10);
}

.agenda-slot-time {
    font-size: 14px;
    font-weight: 600;
    color: #1f2d3d;
    margin-bottom: 10px;
}

.agenda-slot-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
}

.agenda-slot-subtitle {
    font-size: 13px;
    color: #6b7280;
    min-height: 34px;
    margin-bottom: 12px;
}

.agenda-slot-footer {
    margin-top: auto;
}

.agenda-slot-libero {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 6px solid #10b981;
}

.agenda-slot-bloccato {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-left: 6px solid #f59e0b;
}

.agenda-slot-prenotato {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 6px solid #3b82f6;
}

.agenda-slot-domiciliare {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-left: 6px solid #8b5cf6;
}

.agenda-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.agenda-legend-box {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-block;
}

.agenda-libre {
    background: #10b981;
}

.agenda-locked {
    background: #f59e0b;
}

.agenda-booked {
    background: #3b82f6;
}

.agenda-home {
    background: #8b5cf6;
}

#domiciliariList .border,
#noteList .border {
    border-radius: 14px !important;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
    border: 1px solid #eef2f7 !important;
}

.agenda-autocomplete {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    z-index: 1055;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    max-height: 260px;
    overflow-y: auto;
}

.agenda-autocomplete-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.agenda-autocomplete-item:last-child {
    border-bottom: none;
}

.agenda-autocomplete-item:hover {
    background: #f8fafc;
}

.modal-content {
    border-radius: 18px;
}

.modal-header {
    border-bottom: 1px solid #eef2f7;
}

.modal-footer {
    border-top: 1px solid #eef2f7;
}

.modal-title {
    font-weight: 700;
    color: #1f2937;
}

.close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
}

.close:hover {
    color: #111827;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-control {
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    box-shadow: none !important;
}

.form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.15rem rgba(59, 130, 246, 0.15) !important;
}

.btn {
    border-radius: 12px;
    font-weight: 600;
}

.card {
    border-radius: 18px;
}

.card-header h5 {
    font-weight: 700;
    color: #1f2937;
}

.badge {
    border-radius: 10px;
    font-size: 11px;
    padding: 6px 10px;
}

@media (max-width: 991.98px) {
    .agenda-slot-card {
        min-height: 130px;
    }
}

@media (max-width: 767.98px) {
    .agenda-header-card .card-body {
        gap: 16px;
    }

    .agenda-slot-title {
        font-size: 16px;
    }

    .agenda-slot-subtitle {
        min-height: auto;
    }
}

/* aumenta altezza slot calendario */

.fc-time-grid .fc-slats td {
    height: 40px !important;
}

.fc-time-grid .fc-slats .fc-minor td {
    height: 40px !important;
}

.fc-agenda-slots td {
    height: 40px !important;
}

.fc-time-grid-event {
    font-size: 13px;
    padding: 40px;
}

/* spazio interno */
.fc-time-grid .fc-slats td > div {
    height: 40px !important;
}