/* ===================== */
/* Dashboard Page Styles  */
/* ===================== */

/* Stat Card View Button */
.db-stat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.db-stat-footer-text {
    font-size: 12px;
    color: #7F7F7F;
}

.db-stat-footer-text.alert {
    color: #FF4747;
    font-weight: 600;
}

.db-stat-view-btn {
    padding: 4px 16px;
    background: #2E77AE;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: background 0.2s;
}

.db-stat-view-btn:hover {
    background: #245F8B;
}

.db-stat-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.db-stat-change.up {
    background: #DEF8EE;
    color: #4AA785;
}

.db-stat-change.down {
    background: #FFE5E5;
    color: #FF4747;
}

/* ===================== */
/* Section Cards          */
/* ===================== */

.db-section-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    padding: 24px;
    margin-bottom: 24px;
}

.db-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.db-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2E77AE;
}

.db-section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-refresh-btn {
    background: none;
    border: none;
    color: #2E77AE;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.3s ease;
}

.db-refresh-btn:hover {
    transform: rotate(180deg);
}

.db-view-all-btn {
    padding: 5px 16px;
    border: 1px solid #2E77AE;
    background: #fff;
    color: #2E77AE;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

.db-view-all-btn:hover {
    background: #2E77AE;
    color: #fff;
}

/* ===================== */
/* Dashboard Table        */
/* ===================== */

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

.db-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #7F7F7F;
    padding: 10px 12px;
    border-bottom: 1px solid #e8ecf1;
    white-space: nowrap;
}

.db-table tbody tr {
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.15s;
}

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

.db-table tbody tr:hover {
    background: #f8fafd;
}

.db-table tbody td {
    padding: 12px 12px;
    font-size: 13px;
    color: #7F7F7F;
    vertical-align: middle;
    white-space: nowrap;
}

/* User Cell */
.db-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-user-cell img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.db-user-cell span {
    font-weight: 500;
    color: #1a1a2e;
}

/* Status Badges */
.db-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.db-status-badge.done {
    background: #DEF8EE;
    color: #4AA785;
}

.db-status-badge.claimed {
    background: #E8F1F7;
    color: #2E77AE;
}

.db-status-badge.pending {
    background: #fff3e6;
    color: #FF8E2B;
}

.db-status-badge.rejected {
    background: #FFE5E5;
    color: #FF4747;
}

/* Approve Button */
.db-approve-btn {
    padding: 4px 14px;
    background: #5EBA41;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: background 0.2s;
}

.db-approve-btn:hover {
    background: #4A9633;
}

/* Reject Button */
.db-reject-btn {
    padding: 4px 14px;
    background: #FF4747;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: background 0.2s;
}

.db-reject-btn:hover {
    background: #D63030;
}

/* Points text */
.db-points-text {
    color: #2E77AE;
    font-weight: 600;
}

/* Mode Badge */
.db-mode-badge {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #7F7F7F;
    margin-left: 10px;
    vertical-align: middle;
}

/* ===================== */
/* Bottom Grid            */
/* ===================== */

.db-bottom-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* ===================== */
/* Leaderboard Widget     */
/* ===================== */

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

.db-lb-table thead th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #7F7F7F;
    padding: 10px 8px;
    border-bottom: 1px solid #e8ecf1;
    white-space: nowrap;
}

.db-lb-table tbody tr {
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.15s;
}

.db-lb-table tbody tr:last-child {
    border-bottom: none;
}

.db-lb-table tbody tr:hover {
    background: #f8fafd;
}

.db-lb-table tbody td {
    padding: 12px 8px;
    font-size: 13px;
    color: #7F7F7F;
    vertical-align: middle;
    white-space: nowrap;
}

.db-lb-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-lb-user img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.db-lb-user span {
    font-weight: 500;
    color: #1a1a2e;
}

.db-lb-rank {
    font-weight: 700;
    color: #1a1a2e;
}

.db-lb-points {
    font-weight: 700;
    color: #2E77AE;
}

/* ===================== */
/* Responsive             */
/* ===================== */

@media (max-width: 1200px) {
    .db-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .db-table-container {
        overflow-x: auto;
    }
}
