/* AkcanPOS v3 Web Panel - Bölge İstatistikleri CSS */
/* Mobil uygulama ile birebir uyumlu bölge istatistik sistemi tasarımı */

/* Ana Container */
.region-statistics-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.region-statistics-header {
    margin-bottom: 30px;
    text-align: center;
}

.region-statistics-header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.region-statistics-header h1 i {
    color: #e67e22;
    margin-right: 10px;
}

.region-statistics-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin: 0;
}

/* Filtreler Bölümü - Staff Statistics CSS'ini kullan */
.filters-section {
    margin-bottom: 30px;
}

.filter-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e8ecef;
}

.filter-header {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.filter-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.filter-header i {
    margin-right: 10px;
    color: #fff;
}

.filter-content {
    padding: 25px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

/* Bölge Dropdown */
.region-dropdown {
    position: relative;
    margin-bottom: 20px;
}

.region-select {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 2px solid #e8ecef;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    color: #2c3e50;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-select:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.dropdown-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.region-select:focus+.dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Zaman Dilimi Butonları */
.time-period-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.period-btn {
    padding: 12px 20px;
    border: 2px solid #e8ecef;
    border-radius: 25px;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    min-width: 100px;
    text-align: center;
}

.period-btn:hover {
    border-color: #e67e22;
    background: #ecf0f1;
    transform: translateY(-2px);
}

.period-btn.active {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border-color: #e67e22;
    box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

/* Özel Tarih Aralığı */
.custom-date-range {
    display: flex;
    gap: 20px;
    align-items: end;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e8ecef;
}

.date-input-group {
    flex: 1;
}

.date-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.date-input-group input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.date-input-group input[type="date"]:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

/* İstatistikleri Hesapla Butonu */
.calculate-button-container {
    text-align: center;
    margin-top: 25px;
}

.calculate-btn {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
    min-width: 200px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn i {
    margin-right: 10px;
}

/* İstatistik Sonuçları */
.region-statistics-results {
    margin-top: 30px;
}

/* Özet Kartları */
.region-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8ecef;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.summary-card.total-regions .summary-icon {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.summary-card.total-orders .summary-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.summary-card.total-revenue .summary-icon {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.summary-card.avg-order .summary-icon {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.summary-info {
    flex: 1;
}

.summary-info h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
    line-height: 1;
}

/* Bölge Detayları */
.region-details {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8ecef;
    margin-bottom: 30px;
}

.region-details h4 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.region-details h4 i {
    color: #e67e22;
    margin-right: 10px;
}

.region-performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.region-performance-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.region-performance-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.region-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.region-card-header h5 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.region-card-header h5 i {
    color: #e67e22;
    margin-right: 8px;
}

.region-success-rate {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.region-success-rate.excellent {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.region-success-rate.good {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.region-success-rate.average {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.region-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.region-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.region-stat:last-child {
    border-bottom: none;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

/* En İyi Performans Gösteren Bölgeler */
.top-regions-section {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8ecef;
}

.top-regions-section h4 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.top-regions-section h4 i {
    color: #f39c12;
    margin-right: 10px;
}

.top-regions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.top-region-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.top-region-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.region-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.region-rank.gold {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

.region-rank.silver {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.region-rank.bronze {
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
}

.region-rank:not(.gold):not(.silver):not(.bronze) {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
}

.region-info {
    flex: 1;
}

.region-info h6 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.region-info p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.region-orders {
    text-align: right;
}

.region-orders span {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

/* Durumlar - Veri Yok, Hata, Yükleniyor */
.no-data-message,
.error-message {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8ecef;
}

.no-data-message i,
.error-message i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
    display: block;
}

.error-message i {
    color: #e74c3c;
}

.no-data-message h3,
.error-message h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.no-data-message p,
.error-message p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin: 0 0 20px 0;
}

/* Yükleniyor Durumu */
.loading-container {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e8ecef;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #e67e22;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-text p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .region-statistics-container {
        padding: 15px;
    }

    .region-statistics-header h1 {
        font-size: 1.8rem;
    }

    .filter-content {
        padding: 20px;
    }

    .time-period-buttons {
        justify-content: center;
    }

    .period-btn {
        flex: 1;
        min-width: auto;
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .custom-date-range {
        flex-direction: column;
        gap: 15px;
    }

    .region-summary-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .summary-card {
        padding: 20px;
        gap: 15px;
    }

    .summary-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .summary-value {
        font-size: 1.6rem;
    }

    .region-performance-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .region-details {
        padding: 20px;
    }

    .top-regions-section {
        padding: 20px;
    }

    .region-card-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .region-statistics-header h1 {
        font-size: 1.5rem;
    }

    .region-statistics-header p {
        font-size: 1rem;
    }

    .filter-content {
        padding: 15px;
    }

    .calculate-btn {
        width: 100%;
        font-size: 1rem;
        padding: 12px 20px;
    }

    .period-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .top-region-item {
        gap: 15px;
        padding: 12px;
    }

    .region-rank {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}