/* AkcanPOS v3 Web Panel - Ürün İstatistikleri Stilleri */

/* Service Tabs */
.service-tabs-container {
    margin-bottom: 24px;
}

.service-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.service-tab {
    padding: 16px 20px;
    background: white;
    border: 2px solid #9CA3AF;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-tab:hover {
    border-color: #4B5563;
    background: #F9FAFB;
}

.service-tab.active {
    background: #E5E7EB;
    border-color: #4B5563;
    color: #000;
}

/* Date Filter */
.date-filter-container {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.filter-header h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
}

.period-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.period-btn {
    padding: 12px 16px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    background: #E2E8F0;
}

.period-btn.active {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    border-color: #1E40AF;
    color: white;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    color: #9CA3AF;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #6B7280;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    color: #9CA3AF;
    margin: 0;
    max-width: 400px;
}

/* Statistics Content */
.statistics-content>* {
    margin-bottom: 24px;
}

.statistics-content>*:last-child {
    margin-bottom: 0;
}

.statistics-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-icon {
    background: rgba(59, 130, 246, 0.1);
    padding: 12px;
    border-radius: 50%;
    font-size: 24px;
    color: #3B82F6;
}

.header-info h2 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: bold;
    color: #3B82F6;
}

.header-info p {
    margin: 0;
    font-size: 14px;
    color: #6B7280;
}

/* Charts Container */
.charts-container {
    display: grid;
    gap: 24px;
}

.chart-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pie-chart-container {
    position: relative;
    height: 320px;
    width: 320px;
    margin: 0 auto 32px auto;
}

.top-products-section h3 {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin: 0 0 16px 0;
    text-align: center;
}

/* Top Products List */
.top-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.product-count {
    font-size: 14px;
    color: #6B7280;
}

.product-percentage {
    font-size: 16px;
    font-weight: bold;
}

/* Remaining Products */
.remaining-products-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.remaining-products-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 16px 0;
}

.remaining-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.remaining-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #F3F4F6;
}

.remaining-product-item:last-child {
    border-bottom: none;
}

.remaining-product-item .product-name {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    margin-bottom: 2px;
}

.remaining-product-item .product-count {
    font-size: 12px;
    color: #6B7280;
}

.product-percentage-badge {
    background: rgba(107, 114, 128, 0.1);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-tabs {
        grid-template-columns: 1fr;
    }

    .period-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .pie-chart-container {
        height: 280px;
        width: 280px;
    }

    .statistics-header {
        flex-direction: column;
        text-align: center;
    }

    .header-icon {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .service-tab {
        padding: 12px 16px;
        font-size: 12px;
    }

    .period-btn {
        padding: 10px 12px;
        font-size: 11px;
    }

    .pie-chart-container {
        height: 240px;
        width: 240px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-percentage {
        font-size: 14px;
    }
}

/* Loading state */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E7EB;
    border-top: 4px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animation effects */
.product-item,
.remaining-product-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-item:hover,
.remaining-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service-tab,
.period-btn {
    transition: all 0.2s ease;
}

.charts-container>* {
    animation: fade-in 0.3s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Date Filter Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fade-in 0.3s ease-out;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6B7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #F3F4F6;
    color: #374151;
}

.modal-body {
    padding: 24px;
}

.date-selector-section,
.custom-date-section {
    margin-bottom: 24px;
}

.date-selector-section h4,
.custom-date-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.quick-date-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quick-date-btn {
    padding: 12px 16px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-date-btn:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.quick-date-btn.active {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    border-color: #1E40AF;
    color: white;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
}

.date-input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 6px;
}

.date-input-group input {
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.2s ease;
}

.date-input-group input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #E5E7EB;
}

.modal-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .btn-secondary {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    color: #374151;
}

.modal-footer .btn-secondary:hover {
    background: #F3F4F6;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    border: 1px solid #1E40AF;
    color: white;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .modal-container {
        width: 95%;
        margin: 20px;
    }

    .quick-date-buttons {
        grid-template-columns: 1fr;
    }

    .date-inputs {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}