/* Dashboard Styles */
.dashboard-container {
    padding: 20px;
    max-width: 100%;
}

/* Filters Section */
.dashboard-filters {
    background-color: transparent;
    border: none;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    min-width: auto;
}

.filter-group label {
    display: none;
}

.filter-group select,
.filter-group input[type="date"] {
    width: auto;
    min-width: 180px;
    padding: 10px 15px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #f0f0f0;
    border-radius: 8px;
    font-size: 13px;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: #3a3a3a;
    background-color: #2a2a2a;
}

.btn-refresh {
    background-color: transparent;
    color: #f0f0f0;
    border: 1px solid #2a2a2a;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: normal;
    border-radius: 8px;
    font-size: 13px;
    min-width: auto;
    transition: all 0.3s;
}

.btn-refresh:hover {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    transform: none;
}

.btn-refresh i {
    margin-right: 5px;
}

/* Statistics Blocks */
.stats-blocks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-block {
    background-color: #1a1a1a;
    border: 2px solid #ff3b3b;
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.3s;
}

.stat-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 59, 59, 0.3);
}

.stat-block .stat-label {
    font-size: 12px;
    color: #999;
    font-weight: normal;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-block .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #f0f0f0;
}

.stat-block.clicks { border-color: #3b7fff; }
.stat-block.unique { border-color: #a855f7; }
.stat-block.leads { border-color: #f59e0b; }
.stat-block.deposits { border-color: #10b981; }

/* Chart Container */
.chart-container {
    background-color: #1a1a1a;
    border: 2px solid #ff3b3b;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.chart-title {
    color: #ff3b3b;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#statisticsChart {
    max-height: 400px;
}

/* Statistics Tables */
.stats-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stats-table-container {
    background-color: #1a1a1a;
    border: 2px solid #ff3b3b;
    border-radius: 10px;
    padding: 20px;
}

.stats-table-title {
    color: #ff3b3b;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background-color: #2a2a2a;
}

.stats-table th {
    padding: 12px 8px;
    text-align: left;
    color: #ff3b3b;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 2px solid #ff3b3b;
}

.stats-table td {
    padding: 10px 8px;
    color: #f0f0f0;
    font-size: 13px;
    border-bottom: 1px solid #2a2a2a;
}

.stats-table tbody tr:hover {
    background-color: #2a2a2a;
}

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

.stats-table .stat-number {
    font-weight: bold;
}

/* Clicks Table - Full Width */
.clicks-table-container {
    background-color: #1a1a1a;
    border: 2px solid #ff3b3b;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.clicks-table-wrapper {
    overflow-x: auto;
}

.clicks-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.clicks-table thead {
    background-color: #2a2a2a;
}

.clicks-table th {
    padding: 12px 10px;
    text-align: left;
    color: #ff3b3b;
    font-weight: bold;
    font-size: 13px;
    border-bottom: 2px solid #ff3b3b;
    white-space: nowrap;
}

.clicks-table td {
    padding: 10px;
    color: #f0f0f0;
    font-size: 13px;
    border-bottom: 1px solid #2a2a2a;
}

.clicks-table tbody tr:hover {
    background-color: #2a2a2a;
}

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

.clicks-table .table-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .stats-blocks {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-tables {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }

    .stats-blocks {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
        min-width: 100%;
    }

    .btn-refresh {
        width: 100%;
    }

    .chart-container {
        padding: 15px;
    }

    #statisticsChart {
        max-height: 300px;
    }

    .stats-tables {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stats-table-container,
    .clicks-table-container {
        padding: 15px;
    }

    .stats-table th,
    .stats-table td,
    .clicks-table th,
    .clicks-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .stat-block {
        padding: 20px 15px;
    }

    .stat-block .stat-icon {
        font-size: 28px;
    }

    .stat-block .stat-value {
        font-size: 24px;
    }

    .stat-block .stat-label {
        font-size: 12px;
    }

    .chart-title,
    .stats-table-title {
        font-size: 14px;
    }

    .stats-table th,
    .stats-table td,
    .clicks-table th,
    .clicks-table td {
        font-size: 11px;
        padding: 6px 4px;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #ff3b3b;
    font-size: 18px;
}

.loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    font-style: italic;
}

/* Period Selector Custom Styles */
.period-custom-dates {
    display: none;
    gap: 10px;
}

.period-custom-dates.active {
    display: flex;
}
