/* Стили для календаря заказов */

/* Блок статистики месяца */
.month-stats-block {
    padding: 10px 0;
    border-bottom: 2px solid #e0e0e0;
}

.stat-item {
    padding: 5px 15px;
    border-radius: 6px;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Стили для кликабельных элементов статистики */
.stat-item a {
    text-decoration: none;
    color: inherit;
}

.stat-item a:hover {
    text-decoration: none;
    color: inherit;
}

.stat-item .stat-label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 1px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item .stat-label-small {
    font-size: 9px;
    font-weight: 400;
    margin-top: -5px;
    margin-bottom: 1px;
    color: inherit;
    line-height: 1.2;
}

.stat-item .stat-value {
    font-size: 20px;
    font-weight: bold;
}

/* Цвета для разных типов статистики */
.stat-orders {
    background-color: #f5f5f5;
    border-left: 4px solid #757575;
}

.stat-orders .stat-label {
    color: #757575;
}

.stat-orders .stat-value {
    color: #424242;
}

.stat-orders .stat-label-small {
    color: #757575;
}

.stat-revenue {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.stat-revenue .stat-label {
    color: #2e7d32;
}

.stat-revenue .stat-value {
    color: #1b5e20;
}

.stat-revenue .stat-label-small {
    color: #2e7d32;
}

.stat-profit {
    background-color: #fce4ec;
    border-left: 4px solid #8b0000;
}

.stat-profit .stat-label {
    color: #8b0000;
}

.stat-profit .stat-value {
    color: #8b0000;
}

.stat-profit .stat-label-small {
    color: #8b0000;
}

.order-calendar {
    width: 100%;
    margin: 0 auto;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 2px;
    background-color: #3c8dbc;
    border-radius: 4px 4px 0 0;
}

.calendar-day-name {
    padding: 6px;
    text-align: center;
    font-weight: bold;
    color: white;
    background-color: #3c8dbc;
    font-size: 12px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background-color: #e0e0e0;
    border-radius: 0 0 4px 4px;
}

.calendar-day-cell {
    background-color: white;
    height: 65px;
    padding: 5px;
    border: 1px solid #e0e0e0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: all 0.2s ease;
    overflow: hidden;
}

.calendar-day-cell.empty {
    background-color: #f9f9f9;
}

.calendar-day-cell.no-orders {
    background-color: white;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.calendar-day-cell.no-orders:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Дни из других месяцев */
.calendar-day-cell.other-month {
    background-color: #f5f5f5;
}

.calendar-day-cell.other-month .day-number {
    color: #999;
    font-weight: normal;
}

.calendar-day-cell.other-month.no-orders:hover {
    background-color: #ececec;
}

.calendar-day-cell.other-month.with-orders {
    background-color: #fefbf0;
}

.calendar-day-cell.other-month.with-orders:hover {
    background-color: #fdf7e3;
}

.calendar-day-cell.other-month.with-orders .day-number {
    color: #7a9fb3;
}

/* Выделение сегодняшнего дня */
.calendar-day-cell.today {
    border: 4px solid #3c8dbc !important;
    box-shadow: 0 0 10px rgba(60, 141, 188, 0.4);
    position: relative;
}

.calendar-day-cell.today .day-number {
    color: #3c8dbc !important;
    font-weight: 900 !important;
    font-size: 16px !important;
}

.calendar-day-cell.today:hover {
    box-shadow: 0 0 14px rgba(60, 141, 188, 0.6);
    border-color: #2c6c94 !important;
}

/* Альтернативный яркий вариант (закомментирован)
.calendar-day-cell.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: 3px solid #5568d3 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.6);
}

.calendar-day-cell.today .day-number {
    color: white !important;
    font-weight: 900 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.calendar-day-cell.today .stat-label,
.calendar-day-cell.today .stat-value {
    color: white !important;
}
*/

/* Вариант с меткой "Сегодня" (закомментирован)
.calendar-day-cell.today::after {
    content: 'СЕГОДНЯ';
    position: absolute;
    top: 2px;
    right: 2px;
    background: #2196F3;
    color: white;
    font-size: 7px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
*/

.calendar-day-cell.with-orders {
    background-color: #fff9e6;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.calendar-day-cell.with-orders:hover {
    background-color: #fff3d1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #3c8dbc;
}

.day-number {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
    text-align: left;
    flex-shrink: 0;
    line-height: 1;
    align-self: flex-start;
}

.calendar-day-cell.with-orders .day-number {
    color: #3c8dbc;
}

.order-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background-color: #f8f9fa;
    border-radius: 3px;
    padding: 3px 4px;
    min-height: 0;
    font-size: 9px;
    overflow: hidden;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
    min-height: 14px;
}

.stat-label {
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
    margin-right: 3px;
    font-size: 8px;
}

.stat-value {
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 2px;
    font-size: 9px;
    min-width: 14px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}

.stat-value.total {
    background-color: #d4e9f7;
    color: #3c8dbc;
}

.stat-value.pending {
    background-color: #ffe0b2;
    color: #f57c00;
}

.stat-value.approved {
    background-color: #c8e6c9;
    color: #388e3c;
}

.stat-value.closed {
    background-color: #e0e0e0;
    color: #616161;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 992px) {
    .calendar-day-cell {
        height: 60px;
        padding: 5px;
    }
    
    .day-number {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .order-stats {
        font-size: 9px;
        gap: 2px;
    }
    
    .stat-item .stat-value {
        font-size: 18px;
    }
    
    .stat-item .stat-label {
        font-size: 11px;
    }
    
    .stat-item .stat-label-small {
        font-size: 8px;
    }
}

@media (max-width: 768px) {
    .calendar-day-cell {
        height: 55px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 13px;
        margin-bottom: 1px;
    }
    
    .calendar-day-name {
        padding: 6px;
        font-size: 11px;
    }
    
    .order-stats {
        font-size: 8px;
        gap: 2px;
    }
    
    .stat-label {
        font-size: 8px;
    }
    
    .stat-value {
        padding: 1px 3px;
        font-size: 8px;
        min-width: 18px;
    }
    
    .stat-item .stat-label {
        font-size: 10px;
    }
    
    .stat-item .stat-label-small {
        font-size: 7px;
    }
    
    .stat-item .stat-value {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .calendar-day-cell {
        height: 50px;
        padding: 3px;
    }
    
    .day-number {
        font-size: 11px;
        margin-bottom: 1px;
    }
    
    .calendar-day-name {
        padding: 5px 3px;
        font-size: 10px;
    }
    
    .order-stats {
        font-size: 7px;
        gap: 1px;
    }
    
    .stat-label {
        font-size: 7px;
    }
    
    .stat-value {
        padding: 1px 2px;
        font-size: 7px;
        min-width: 16px;
    }
    
    .stat-item .stat-label {
        font-size: 9px;
    }
    
    .stat-item .stat-label-small {
        font-size: 7px;
    }
    
    .stat-item .stat-value {
        font-size: 14px;
    }
}

/* Стили для навигации по месяцам */
.mb-4 {
    margin-bottom: 1.5rem;
}

/* Отступ для календаря */
.calendar-top-row {
    margin-bottom: 15px !important;
}

/* Стили для кнопок навигации календаря */
.btn-outline-primary {
    border-color: #3c8dbc !important;
    color: #3c8dbc !important;
}

.btn-outline-primary:hover {
    background-color: #3c8dbc !important;
    border-color: #3c8dbc !important;
    color: white !important;
}

/* Стили для заголовка календаря (месяц и год) */
.calendar-title {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #3c8dbc !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0 20px;
}

/* Стили для ссылки статистики заказов */
.stat-orders-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

/* Стили для полей ввода даты */
.date-input {
    width: 114%;
}

.date-button {
    padding: 6px 12px;
}

/* Стили для кнопок аналитики */
.btn-info-white {
    color: white;
}

/* Стили для аналитических карточек */
.analytics-small-text {
    font-size: 0.85em;
}

.analytics-small-number {
    font-size: 0.75em;
}

.analytics-category-text {
    font-size: 0.95em;
}

.analytics-category-name {
    font-size: 0.85em;
}

.analytics-category-views {
    font-size: 0.75em;
    color: #999;
}

.analytics-cake-card {
    display: flex;
    align-items: center;
}

.analytics-cake-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.analytics-cake-text {
    font-size: 0.95em;
}

.analytics-cake-name {
    font-size: 0.85em;
}

.analytics-cake-views {
    font-size: 0.75em;
    color: #999;
}

