/* Стили для детализации продаж */

.sales-details-content {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 1rem;
}

.sales-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sales-summary h4 {
    color: #212529;
    margin-bottom: 1rem;
    font-weight: 600;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.stat-label {
    font-weight: 500;
    color: #6c757d;
}

.stat-value {
    font-weight: 600;
    color: #212529;
}

.day-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-header:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
}

.day-title h5 {
    margin: 0;
    color: #212529;
    font-weight: 600;
}

.day-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.day-stat {
    font-size: 0.9rem;
    color: #6c757d;
}

.day-stat strong {
    color: #007bff;
}

.toggle-icon {
    color: #6c757d;
    transition: transform 0.3s ease;
}

.day-header:hover .toggle-icon {
    color: #007bff;
}

.day-content {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.sales-category {
    margin-bottom: 1.5rem;
}

.sales-category:last-child {
    margin-bottom: 0;
}

.sales-category h6 {
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.sales-table thead {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.sales-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.sales-table th.text-center {
    text-align: center;
}

.sales-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.sales-table tbody tr:hover {
    background-color: #f8f9fa;
}

.sales-table tbody tr:last-child {
    border-bottom: none;
}

.sales-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
}

.sales-table td.text-center {
    text-align: center;
}

/* Стили для номенклатуры */
.nomenclature-name {
    font-weight: 500;
    color: #212529;
}

.nomenclature-quantity {
    color: #28a745;
    font-weight: 600;
}

.nomenclature-revenue {
    color: #007bff;
    font-weight: 600;
}

.nomenclature-coefficient {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .day-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sales-table {
        font-size: 0.8rem;
    }
    
    .sales-table th,
    .sales-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .sales-details-content {
        padding: 0.5rem;
    }
    
    .sales-summary {
        padding: 1rem;
    }
    
    .day-header {
        padding: 0.75rem 1rem;
    }
    
    .day-content {
        padding: 1rem;
    }
    
    .sales-table {
        font-size: 0.75rem;
    }
    
    .sales-table th,
    .sales-table td {
        padding: 0.4rem;
    }
}

/* Анимации */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.day-content {
    animation: slideDown 0.3s ease;
}

/* Стили для состояний загрузки и ошибок */
.loading-sales {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.loading-sales i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #007bff;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    text-align: center;
    margin: 1rem 0;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* Стили для градиентов и цветовых акцентов */
.sales-category h6 {
    position: relative;
}

.sales-category h6::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

/* Стили для таблиц с полосами */
.sales-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.sales-table tbody tr:nth-child(even):hover {
    background-color: #e9ecef;
}

/* Стили для кнопок действий */
.sales-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.sales-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sales-action-btn.primary {
    background: #007bff;
    color: white;
}

.sales-action-btn.primary:hover {
    background: #0056b3;
}

.sales-action-btn.secondary {
    background: #6c757d;
    color: white;
}

.sales-action-btn.secondary:hover {
    background: #545b62;
} 