
.stats-section {
    background: rgba(20, 25, 45, 0.6);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(74, 158, 255, 0.1);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.section-title .icon {
    font-size: 20px;
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.stat-card {
    background: rgba(10, 14, 39, 0.8);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid rgba(74, 158, 255, 0.08);
}

.stat-label {
    font-size: 9px;
    color: #8a8fa3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}


.gifts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}


.gifts-list::-webkit-scrollbar {
    width: 3px;
}

.gifts-list::-webkit-scrollbar-track {
    background: rgba(10, 14, 39, 0.4);
    border-radius: 2px;
}

.gifts-list::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 2px;
}

.gifts-list::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.5);
}

.gift-card {
    background: rgba(10, 14, 39, 0.6);
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(74, 158, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.gift-card:active {
    background: rgba(10, 14, 39, 0.8);
    transform: scale(0.98);
}

.gift-user {
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gift-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.gift-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 35px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.gift-stat:active {
    transform: scale(0.95);
    background: rgba(74, 158, 255, 0.1);
}

.gift-stat-label {
    font-size: 8px;
    color: #8a8fa3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.gift-stat-value {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.gift-stat-value.nft {
    color: #4a9eff;
}

.gift-stat-value.sent {
    color: #2ecc71;
}

.gift-stat-value.error {
    color: #e74c3c;
}


.sales-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sales-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.sales-summary-card {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(74, 158, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.sales-summary-icon {
    font-size: 24px;
    line-height: 1;
}

.sales-summary-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sales-summary-label {
    font-size: 9px;
    color: #8a8fa3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.sales-summary-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--tg-theme-text-color);
    line-height: 1.2;
}

.sales-summary-amount {
    font-size: 11px;
    font-weight: 600;
    color: #4CAF50;
    line-height: 1.2;
}

.sales-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}


.sales-cards::-webkit-scrollbar {
    width: 3px;
}

.sales-cards::-webkit-scrollbar-track {
    background: rgba(10, 14, 39, 0.4);
    border-radius: 2px;
}

.sales-cards::-webkit-scrollbar-thumb {
    background: rgba(74, 158, 255, 0.3);
    border-radius: 2px;
}

.sales-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 158, 255, 0.5);
}

.sale-card {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(74, 158, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sale-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.sale-gift-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tg-theme-text-color);
    flex: 1;
    word-break: break-word;
}

.sale-status {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.sale-date {
    font-size: 11px;
    color: #8a8fa3;
}

.sale-amounts {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sale-amount {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sale-label {
    font-size: 9px;
    color: #8a8fa3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.sale-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--tg-theme-text-color);
    line-height: 1.2;
}

.sale-amount.worker .sale-value {
    color: #4CAF50;
}

.sale-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sale-link:active {
    transform: scale(0.96);
}

.empty-sales {
    text-align: center;
    padding: 40px 20px;
    color: var(--tg-theme-hint-color);
}

.empty-sales-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-sales-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color);
}

.empty-sales-subtitle {
    font-size: 14px;
    opacity: 0.7;
}


@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .stat-card {
        padding: 10px 6px;
    }

    .stat-value {
        font-size: 16px;
    }

    .stat-label {
        font-size: 8px;
    }

    .gift-card {
        padding: 8px 10px;
        gap: 10px;
    }

    .gift-user {
        font-size: 12px;
    }

    .gift-stats {
        gap: 8px;
    }

    .gift-stat {
        min-width: 32px;
        padding: 2px 5px;
    }

    .gift-stat-label {
        font-size: 7px;
    }

    .gift-stat-value {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .stats-section {
        padding: 14px;
        margin-bottom: 14px;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .sales-summary {
        gap: 6px;
    }

    .sales-summary-card {
        padding: 9px;
        gap: 7px;
    }

    .sales-summary-icon {
        font-size: 22px;
    }

    .sales-summary-label {
        font-size: 8px;
    }

    .sales-summary-value {
        font-size: 14px;
    }

    .sales-summary-amount {
        font-size: 10px;
    }

    .sales-cards {
        max-height: 280px;
    }

    .sale-card {
        padding: 9px 10px;
        gap: 7px;
    }

    .sale-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .sale-gift-name {
        font-size: 13px;
    }

    .sale-status {
        font-size: 10px;
    }

    .sale-date {
        font-size: 10px;
    }

    .sale-amounts {
        gap: 10px;
    }

    .sale-label {
        font-size: 8px;
    }

    .sale-value {
        font-size: 14px;
    }

    .sale-link {
        padding: 7px 10px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .stats-section {
        padding: 12px;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .sales-summary {
        gap: 5px;
    }

    .sales-summary-card {
        padding: 8px;
        gap: 6px;
    }

    .sales-summary-icon {
        font-size: 20px;
    }

    .sales-summary-label {
        font-size: 7px;
    }

    .sales-summary-value {
        font-size: 13px;
    }

    .sales-summary-amount {
        font-size: 9px;
    }

    .sales-cards {
        max-height: 250px;
    }

    .stats-grid {
        gap: 6px;
    }

    .stat-card {
        padding: 8px 4px;
    }

    .stat-value {
        font-size: 15px;
    }

    .gift-card {
        padding: 7px 9px;
        gap: 8px;
    }

    .gift-user {
        font-size: 11px;
    }

    .gift-stats {
        gap: 7px;
    }

    .gift-stat {
        min-width: 30px;
        padding: 2px 4px;
    }

    .gift-stat-label {
        font-size: 7px;
    }

    .gift-stat-value {
        font-size: 13px;
    }

    .sale-card {
        padding: 8px 9px;
        gap: 6px;
    }

    .sale-gift-name {
        font-size: 12px;
    }

    .sale-status {
        font-size: 9px;
    }

    .sale-date {
        font-size: 9px;
    }

    .sale-amounts {
        gap: 8px;
    }

    .sale-label {
        font-size: 7px;
    }

    .sale-value {
        font-size: 13px;
    }

    .sale-link {
        padding: 6px 10px;
        font-size: 10px;
    }

    .empty-sales-icon {
        font-size: 40px;
    }

    .empty-sales-title {
        font-size: 15px;
    }

    .empty-sales-subtitle {
        font-size: 13px;
    }


    .time-stats-grid {
        gap: 6px;
    }

    .time-stat-card {
        padding: 10px 8px;
    }

    .time-stat-label {
        font-size: 10px;
    }

    .time-stat-count {
        font-size: 12px;
    }

    .time-stat-amount {
        font-size: 14px;
    }
}




.time-stats-section {
    margin-bottom: 16px;
}

.time-stats-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.time-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.time-stat-card {
    background: rgba(10, 14, 39, 0.8);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(74, 158, 255, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.time-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.2);
}

.time-stat-card.today {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(10, 14, 39, 0.8) 100%);
    border-color: rgba(76, 175, 80, 0.3);
}

.time-stat-card.week {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(10, 14, 39, 0.8) 100%);
    border-color: rgba(33, 150, 243, 0.3);
}

.time-stat-card.total {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(10, 14, 39, 0.8) 100%);
    border-color: rgba(255, 193, 7, 0.3);
}

.time-stat-label {
    font-size: 11px;
    color: #8a8fa3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.time-stat-count {
    font-size: 13px;
    color: #b0b5c5;
    margin-bottom: 2px;
}

.time-stat-amount {
    font-size: 16px;
    font-weight: 700;
    color: #4CAF50;
}

.time-stat-card.week .time-stat-amount {
    color: #2196F3;
}

.time-stat-card.total .time-stat-amount {
    color: #FFC107;
}




.status-counts-section {
    margin-bottom: 16px;
}

.status-counts-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-count-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 14, 39, 0.6);
    border-radius: 10px;
    padding: 10px 12px;
}

.status-count-icon {
    font-size: 16px;
}

.status-count-label {
    flex: 1;
    font-size: 13px;
    color: #b0b5c5;
}

.status-count-value {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}




.sales-list-title {
    font-size: 14px;
    font-weight: 600;
    color: #8a8fa3;
    margin-bottom: 12px;
    margin-top: 8px;
}

