/* djinsight Analytics Dashboard */

/* ── Filter bar ── */
.dji-filters {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin: 20px 0 28px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.dji-filters .dji-filter-apply {
    margin-left: auto;
}

.dji-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dji-filter-group label {
    font-size: 11px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dji-filters select,
.dji-filters input[type="text"] {
    padding: 0 12px;
    border: 1px solid #d4d4d8;
    border-radius: 6px;
    font-size: 14px;
    height: 36px;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    min-width: 120px;
    transition: border-color 0.15s;
}

.dji-filters select:focus,
.dji-filters input[type="text"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

.dji-filters .button {
    height: 41px;
    line-height: 41px;
    padding: 0 24px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
}

.dji-filter-sep {
    width: 1px;
    height: 36px;
    background: #d4d4d8;
    align-self: flex-end;
}

.dji-muted {
    color: #999;
}

/* ── Summary cards ── */
.dji-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dji-stat {
    flex: 1;
    min-width: 140px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid #e9ecef;
}

.dji-stat .val {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    font-variant-numeric: tabular-nums;
}

.dji-stat .lbl {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* ── Chart ── */
.dji-chart-container {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.dji-chart-container h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* ── Bar chart cards (traffic sources, devices) ── */
.dji-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dji-card {
    flex: 1;
    min-width: 280px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.dji-card h3 {
    margin: 0 0 14px;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.dji-card small {
    color: #999;
    font-weight: normal;
}

.dji-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dji-bar-label {
    width: 70px;
    font-size: 13px;
    color: #555;
    text-transform: capitalize;
    font-weight: 500;
}

.dji-bar-track {
    flex: 1;
    height: 22px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.dji-bar-fill {
    height: 100%;
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.3s ease;
}

.dji-bar-val {
    width: 100px;
    text-align: right;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: #555;
}

/* ── Page views table ── */
.dji-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

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

.dji-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #dee2e6;
    font-size: 12px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dji-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.dji-table tbody tr:hover {
    background: #f8f9fa;
}

.dji-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.dji-table .meta {
    color: #888;
    font-size: 13px;
}

/* ── Pagination ── */
.dji-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding: 12px 0;
}

.dji-pagination a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.dji-pagination a:hover {
    text-decoration: underline;
}

.dji-page-info {
    color: #888;
    font-size: 13px;
}
