/* Budget Calendar Styles */
.calendar-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

.calendar-header {
    background: white;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-header h1 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    color: #333;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-month {
    margin: 0 1rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: #333;
    min-width: 200px;
    text-align: center;
}

/* Calendar Grid */
.calendar-grid {
    flex: 1;
    padding: 1.5rem;
    overflow: auto;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border: 1px solid #dee2e6;
    margin-bottom: 1px;
}

.weekday {
    background: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: #495057;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
    border: 1px solid #dee2e6;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.other-month {
    background-color: #fafafa;
}

.calendar-day.other-month .day-number {
    color: #adb5bd;
}

.calendar-day.today {
    background-color: #e7f3ff;
}

.calendar-day.today .day-number {
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Calendar Items */
.day-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-item {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: transform 0.2s;
}

.calendar-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.item-time {
    font-weight: 600;
    margin-right: 4px;
}

.item-title {
    opacity: 0.95;
}

.more-items {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 4px;
    font-weight: 500;
}

/* Day Details Panel */
.day-details {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    background: white;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.day-details-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-details-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.day-details-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.detail-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.item-time-detail {
    font-weight: 600;
    color: #495057;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-not-started {
    background: #6c757d;
    color: white;
}

.status-completed {
    background: #28a745;
    color: white;
}

.status-partial {
    background: #ffc107;
    color: #212529;
}

.status-in-progress {
    background: #007bff;
    color: white;
}

.status-attention {
    background: #ff6b6b;
    color: white;
}

.status-stopped {
    background: #dc3545;
    color: white;
}

.detail-item h4 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
}

.department-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    margin-bottom: 0.5rem;
}

.item-description {
    color: #6c757d;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: #007bff;
}

/* Calendar Legend */
.calendar-legend {
    background: white;
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

.calendar-legend h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #495057;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .calendar-day {
        min-height: 100px;
    }
    
    .day-details {
        width: 350px;
    }
}

@media (max-width: 768px) {
    .calendar-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .calendar-month {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 0.25rem;
    }
    
    .calendar-item {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .day-details {
        width: 100%;
    }
    
    .legend-items {
        gap: 0.5rem;
    }
    
    .legend-item {
        font-size: 0.875rem;
    }
}