/* summary-styles.css */
#summaryScreen {
	overflow-y: auto;
    padding: 1px;
    padding-bottom: 80px;
    
    .month-navigation {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #1e293b;
        padding: 16px;
        border-radius: var(--border-radius);
        margin-bottom: 20px;
        border: 2px solid #334155;
        
        .nav-btn {
            background: #3b82f6;
            border: none;
            border-radius: 8px;
            padding: 10px 14px;
            color: white;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.3);
            
            &:hover:not(:disabled) {
                background: #2563eb;
                transform: translateY(-1px);
                box-shadow: 0 4px 8px rgba(0,0,0,0.4);
            }
            
            &:disabled {
                background: #64748b;
                cursor: not-allowed;
                transform: none;
                box-shadow: none;
            }
        }
        
        .current-month {
            font-weight: 700;
            font-size: 1.2rem;
            color: #f8fafc;
            text-align: center;
            flex: 1;
            margin: 0 16px;
            text-shadow: 0 1px 2px rgba(0,0,0,0.5);
        }
    }
    
    .stats-summary {
        background: linear-gradient(135deg, #1e293b, #0f172a);
        border-radius: var(--border-radius);
        padding: 24px 20px;
        margin-bottom: 20px;
        box-shadow: var(--shadow);
        border: 2px solid #334155;
        
        .total-amount {
            font-size: 2.2rem;
            font-weight: 800;
            color: #10b981;
            text-align: center;
            margin-bottom: 8px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }
        
        .stats-details {
            display: flex;
            justify-content: space-around;
            align-items: center;
            margin-top: 16px;
            
            .stat-item {
                text-align: center;
                padding: 0 10px;
                
                .stat-value {
                    font-size: 1.3rem;
                    font-weight: 700;
                    color: #f8fafc;
                    margin-bottom: 4px;
                }
                
                .stat-label {
                    font-size: 0.875rem;
                    color: #94a3b8;
                    font-weight: 500;
                }
            }
        }
    }
    
    .groups-list {
        background: #1e293b;
        border-radius: var(--border-radius);
        overflow: hidden;
        box-shadow: var(--shadow);
        border: 2px solid #334155;
        
        .no-data {
            text-align: center;
            padding: 40px 20px;
            color: #94a3b8;
            font-style: italic;
            background: #1e293b;
        }
        
        .group-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 20px;
            border-bottom: 2px solid #334155;
            transition: all 0.2s ease;
            
            &:last-child {
                border-bottom: none;
            }
            
            &:hover {
                background-color: #2d3748;
            }
            
            &.product-group {
                background: #0f172a;
                font-weight: 700;
                font-size: 17px;
                border-left: 4px solid #3b82f6;
                
                .group-name {
                    color: #f8fafc;
                    font-weight: 700;
                }
                
                .group-amount {
                    color: #10b981;
                    font-weight: 700;
                    font-size: 17px;
                }
            }
            
            &.blank-group {
                background: #1a2536;
                padding-left: 30px;
                font-weight: 600;
                border-left: 4px solid #f59e0b;
                
                .group-name {
                    color: #f8fafc;
                    font-size: 16px;
                    font-weight: 600;
                }
                
                .group-amount {
                    color: #f59e0b;
                    font-weight: 700;
                    font-size: 16px;
                }
            }
            
            &.operation-group {
                background: #1e293b;
                padding-left: 50px;
                font-size: 15px;
                border-left: 4px solid #10b981;
                
                .group-name {
                    color: #e2e8f0;
                    flex: 1;
                    font-weight: 500;
                }
                
                .group-details {
                    display: flex;
                    gap: 16px;
                    align-items: center;
                    
                    .operation-quantity {
                        color: #94a3b8;
                        font-size: 14px;
                        white-space: nowrap;
                        background: #334155;
                        padding: 4px 8px;
                        border-radius: 6px;
                        font-weight: 500;
                    }
                    
                    .operation-amount {
                        color: #10b981;
                        font-weight: 700;
                        min-width: 90px;
                        text-align: right;
                        white-space: nowrap;
                        font-size: 15px;
                    }
                }
            }
            
            .group-name {
                flex: 1;
            }
            
            .group-amount {
                font-weight: 700;
                white-space: nowrap;
            }
        }
    }
}

/* Адаптивность для мобильных */
@media (max-width: 380px) {
    #summaryScreen {
        padding: 12px;
        padding-bottom: 80px;
        
        .month-navigation {
            padding: 14px;
            
            .nav-btn {
                padding: 8px 12px;
                font-size: 14px;
            }
            
            .current-month {
                font-size: 1.1rem;
                margin: 0 12px;
            }
        }
        
        .stats-summary {
            padding: 20px 16px;
            
            .total-amount {
                font-size: 1.9rem;
            }
            
            .stats-details {
                .stat-item {
                    .stat-value {
                        font-size: 1.2rem;
                    }
                    
                    .stat-label {
                        font-size: 0.8rem;
                    }
                }
            }
        }
        
        .groups-list {
            .group-item {
                padding: 16px;
                
                &.blank-group {
                    padding-left: 25px;
                }
                
                &.operation-group {
                    padding-left: 40px;
                    
                    .group-details {
                        gap: 8px;
                        flex-direction: column;
                        align-items: flex-end;
                        
                        .operation-quantity {
                            font-size: 13px;
                            padding: 3px 6px;
                        }
                        
                        .operation-amount {
                            min-width: 80px;
                            font-size: 14px;
                        }
                    }
                }
            }
        }
    }
}

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

#summaryScreen.active {
    animation: fadeIn 0.3s ease-out;
}

.groups-list .group-item {
    animation: fadeIn 0.4s ease-out backwards;
    
    &.product-group {
        animation-delay: 0.1s;
    }
    
    &.blank-group {
        animation-delay: 0.2s;
    }
    
    &.operation-group {
        animation-delay: 0.3s;
    }
}

/* Улучшенная читаемость */
.group-item {
    .group-name {
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }
}

.stats-summary .total-amount {
    letter-spacing: 0.5px;
}