/* ==========================================================
   RaFi Community Dashboard
   Works on both front-end Dashboard page and WP admin fallback.
   ========================================================== */


/* Keep the front-end dashboard close to the RaFi Bhai header.
   These rules apply only when the dashboard page is present. */
body:has(.rafi-front-dashboard) #main,
body:has(.rafi-front-dashboard) #main-container,
body:has(.rafi-front-dashboard) #main-container .ct-container,
body:has(.rafi-front-dashboard) #content,
body:has(.rafi-front-dashboard) .site-content,
body:has(.rafi-front-dashboard) .content-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.rafi-front-dashboard {
    width: min(1180px, calc(100% - 32px));
    margin: 10px auto 60px;
    padding: 0;
    box-sizing: border-box;
}

.rafi-front-dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px 26px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
}

.rafi-front-dashboard__eyebrow {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #64748b;
}

.rafi-front-dashboard h1 {
    margin: 0 0 5px;
    color: #17213d;
    font-size: 30px;
    line-height: 1.15;
}

.rafi-front-dashboard__header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.rafi-front-dashboard__back {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #17213d !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
}

.rafi-front-dashboard__back:hover {
    background: #e2e8f0;
}

.rafi-admin-dashboard__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.rafi-stat-card {
    min-height: 112px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .05);
}

.rafi-stat-card__icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #f1f5f9;
    font-size: 28px;
    line-height: 1;
}

.rafi-stat-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 7px;
}

.rafi-stat-card strong {
    display: block;
    color: #17213d;
    font-size: 29px;
    line-height: 1.05;
}

.rafi-dashboard-denied {
    width: min(760px, calc(100% - 32px));
    margin: 40px auto;
    padding: 22px;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 14px;
    color: #991b1b;
    text-align: center;
    font-weight: 700;
}

/* WordPress admin fallback */
.wrap.rafi-admin-dashboard {
    max-width: 1100px;
    margin-top: 28px;
}

.wrap.rafi-admin-dashboard h1 {
    margin-bottom: 6px;
}

.rafi-admin-dashboard__intro {
    color: #646970;
    margin-top: 0;
}

@media (max-width: 1000px) {
    .rafi-admin-dashboard__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .rafi-front-dashboard {
        width: min(100% - 20px, 1180px);
        margin-top: 18px;
    }

    .rafi-front-dashboard__header {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
        border-radius: 15px;
    }

    .rafi-front-dashboard h1 {
        font-size: 25px;
    }
}

@media (max-width: 600px) {
    .rafi-admin-dashboard__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .rafi-stat-card {
        min-height: 96px;
        padding: 18px;
    }
}
/* ==========================================================
   FRONT DASHBOARD - REMOVE THEME TOP GAP ONLY
   ========================================================== */

body:has(.rafi-front-dashboard) {
    --theme-content-vertical-spacing: 0px !important;
}

body:has(.rafi-front-dashboard) #main,
body:has(.rafi-front-dashboard) #main-container,
body:has(.rafi-front-dashboard) .site-main,
body:has(.rafi-front-dashboard) .site-content,
body:has(.rafi-front-dashboard) .content-area {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body:has(.rafi-front-dashboard) #main-container .ct-container {
    padding-top: 0 !important;
}
/* ==========================================================
   RaFi Bhai Community Dashboard
   Colorful Premium Theme
   ========================================================== */

/* ---------- Main Dashboard Header ---------- */

.rafi-front-dashboard__header {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            120deg,
            #20aee5 0%,
            #536ee8 38%,
            #9b4de3 68%,
            #f36a9f 100%
        ) !important;

    border: 0 !important;
    color: #ffffff !important;

    box-shadow:
        0 12px 30px rgba(75, 85, 200, 0.20) !important;
}

/* Decorative soft circles */

.rafi-front-dashboard__header::before {
    content: "";
    position: absolute;

    width: 180px;
    height: 180px;

    right: 90px;
    top: -90px;

    border-radius: 50%;

    background: rgba(255,255,255,0.10);
}

.rafi-front-dashboard__header::after {
    content: "";
    position: absolute;

    width: 140px;
    height: 140px;

    left: -60px;
    bottom: -80px;

    border-radius: 50%;

    background: rgba(255,255,255,0.10);
}

/* Keep header content above decoration */

.rafi-front-dashboard__header > * {
    position: relative;
    z-index: 2;
}

.rafi-front-dashboard__eyebrow {
    color: rgba(255,255,255,0.88) !important;
}

.rafi-front-dashboard h1 {
    color: #ffffff !important;
}

.rafi-front-dashboard__header p {
    color: rgba(255,255,255,0.90) !important;
}

/* Back button */

.rafi-front-dashboard__back {
    background: rgba(255,255,255,0.92) !important;
    color: #17213d !important;

    box-shadow:
        0 5px 15px rgba(0,0,0,0.12);
}

.rafi-front-dashboard__back:hover {
    background: #ffffff !important;
}


/* ==========================================================
   STAT CARDS
   ========================================================== */

.rafi-stat-card {
    position: relative;
    overflow: hidden;

    background: #ffffff !important;

    box-shadow:
        0 8px 24px rgba(15,23,42,0.07) !important;

    transition:
        transform .20s ease,
        box-shadow .20s ease;
}

.rafi-stat-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 14px 30px rgba(15,23,42,0.12) !important;
}


/* ---------- Members ---------- */

.rafi-stat-card:nth-child(1) {
    border-top: 4px solid #7c3aed !important;
}

.rafi-stat-card:nth-child(1) .rafi-stat-card__icon {
    background: #f1eaff !important;
}


/* ---------- Posts ---------- */

.rafi-stat-card:nth-child(2) {
    border-top: 4px solid #f43f5e !important;
}

.rafi-stat-card:nth-child(2) .rafi-stat-card__icon {
    background: #ffe8ee !important;
}


/* ---------- Articles ---------- */

.rafi-stat-card:nth-child(3) {
    border-top: 4px solid #2196f3 !important;
}

.rafi-stat-card:nth-child(3) .rafi-stat-card__icon {
    background: #e5f2ff !important;
}


/* ---------- Jobs ---------- */

.rafi-stat-card:nth-child(4) {
    border-top: 4px solid #16a765 !important;
}

.rafi-stat-card:nth-child(4) .rafi-stat-card__icon {
    background: #e5f8ed !important;
}


/* ---------- Marketplace ---------- */

.rafi-stat-card:nth-child(5) {
    border-top: 4px solid #f59e0b !important;
}

.rafi-stat-card:nth-child(5) .rafi-stat-card__icon {
    background: #fff4d9 !important;
}


/* ==========================================================
   NUMBER EMPHASIS
   ========================================================== */

.rafi-stat-card strong {
    color: #17213d !important;
}


/* ==========================================================
   SOFT COLOR EFFECT AT CARD BOTTOM
   ========================================================== */

.rafi-stat-card::after {
    content: "";

    position: absolute;

    width: 150px;
    height: 70px;

    right: -25px;
    bottom: -35px;

    border-radius: 50%;

    opacity: .45;

    pointer-events: none;
}


/* Purple */

.rafi-stat-card:nth-child(1)::after {
    background: #ddd0ff;
}


/* Pink */

.rafi-stat-card:nth-child(2)::after {
    background: #ffd1dd;
}


/* Blue */

.rafi-stat-card:nth-child(3)::after {
    background: #cfe5ff;
}


/* Green */

.rafi-stat-card:nth-child(4)::after {
    background: #ccefdc;
}


/* Orange */

.rafi-stat-card:nth-child(5)::after {
    background: #ffe5ae;
}
@media(max-width:700px){.rafi-article-moderation{padding:16px}}
