/* Usage Statistics Page Specific Styles */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.page-title-section {
    flex: 1;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-icon {
    font-size: 28px;
    color: #ff8c42;
}

.page-subtitle {
    font-size: 16px;
    color: #888;
}

/* Date Filter */
.date-filter {
    margin-left: 20px;
}

.custom-select {
    position: relative;
    min-width: 120px;
}

.select-trigger {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.select-trigger:hover {
    border-color: #ff8c42;
}

.select-trigger.active {
    border-color: #ff8c42;
    box-shadow: 0 0 0 2px rgba(255, 140, 66, 0.1);
}

.select-text {
    flex: 1;
}

.select-arrow {
    font-size: 12px;
    color: #888;
    transition: transform 0.3s ease;
}

.select-trigger.active .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 4px;
}

.select-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.select-option:hover {
    background: #f8f8f8;
}

.select-option:hover:first-child {
    border-radius: 8px 8px 0 0;
}

.select-option:hover:last-child {
    border-radius: 0 0 8px 8px;
}

.select-option:hover:only-child {
    border-radius: 8px;
}

.select-option.selected {
    background: #ff8c42;
    color: white;
}

.select-option.selected:first-child {
    border-radius: 8px 8px 0 0;
    margin: -1px -1px 0 -1px;
    padding: 11px 17px 10px 17px;
}

.select-option.selected:last-child {
    border-radius: 0 0 8px 8px;
    margin: 0 -1px -1px -1px;
    padding: 10px 17px 11px 17px;
}

.select-option.selected:only-child {
    border-radius: 8px;
    margin: -1px;
    padding: 11px 17px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.summary-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.summary-card .card-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin: 0;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.card-date,
.card-subtitle {
    font-size: 14px;
    color: #888;
}

/* Chart Section */
.chart-section {
    margin-bottom: 40px;
}

.chart-card {
    padding: 0;
    overflow: hidden;
}

.chart-card .card-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.chart-title-section {
    flex: 1;
}

.chart-card .card-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.chart-card .card-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 0;
}

/* Chart Container */
.chart-container {
    padding: 24px;
}

.chart-table-wrapper {
    margin-bottom: 20px;
    overflow-x: auto;
}

.chart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.chart-table th {
    background: #f8f8f8;
    color: #333;
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.chart-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.chart-table tbody tr:hover {
    background: #f8f8f8;
}

.chart-row {
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-row:hover {
    background: #f8f8f8;
    transform: translateX(2px);
}

.date-header,
.date-cell {
    width: 50px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.value-header {
    width: 50px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.value-cell {
    width: 50px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.bar-header,
.bar-cell {
    width: auto;
    min-width: 200px;
}

.bar-container {
    background: #f0f0f0;
    border-radius: 4px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    background: linear-gradient(90deg, #ff8c42 0%, #e67e22 100%);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.chart-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
}

.chart-subtitle {
    font-size: 14px;
    color: #888;
}

.chart-highlight {
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-label {
    font-size: 14px;
    color: #888;
}

.highlight-value {
    font-size: 16px;
    font-weight: 600;
    color: #ff8c42;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .date-filter {
        margin-left: 0;
        align-self: flex-start;
    }

    .page-title {
        font-size: 24px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-table-wrapper {
        overflow-x: scroll;
    }

    .chart-table {
        min-width: 400px;
    }

    .bar-cell {
        width: auto;
        min-width: 120px;
    }

    .chart-info {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 16px;
    }

    .chart-table {
        min-width: 350px;
    }

    .bar-cell {
        width: auto;
        min-width: 100px;
    }

    .chart-table th,
    .chart-table td {
        padding: 12px 8px;
    }

    .card-value {
        font-size: 24px;
    }
}