/* ================================
   RESET & BASE
   ================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: #d9d9d9;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;

}

/* ================================
   MAIN DASHBOARD
   ================================ */

.dashboard {
    width: 100%;
    height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 25%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.03), transparent 20%),
        linear-gradient(145deg, #050505, #111111);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.05);

    box-shadow:
        0 60px 120px rgba(0, 0, 0, 0.8),
        0 20px 40px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);

    position: relative;
}

/* ================================
   MAIN CONTENT AREA
   ================================ */

.main {
    flex: 1;
    padding: 28px;
    overflow: auto;
}

/* ================================
   TOPBAR
   ================================ */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 30px;
}

.search-box {
    width: 430px;
    position: relative;
}

.search-box input {
    width: 100%;

    padding: 16px 18px 16px 50px;

    background: #171717;
    border: none;
    outline: none;

    border-radius: 16px;

    color: #fff;

    border: 1px solid rgba(255, 255, 255, 0.04);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 12px 24px rgba(0, 0, 0, 0.4);
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 18px;

    color: #777;
}

.top-icons {
    display: flex;
    gap: 14px;
}

.icon {
    width: 48px;
    height: 48px;

    border-radius: 15px;

    background: #171717;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #fff;

    cursor: pointer;

    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ================================
   OVERVIEW
   ================================ */

.overview {
    margin-bottom: 30px;
}

.overview small {
    color: #7b7b7b;
}

.overview h1 {
    color: #fff;
    font-size: 54px;
    margin-top: 8px;
}

.actions {
    margin-top: 22px;
    display: flex;
    gap: 14px;
}

.btn {
    border: none;

    padding: 14px 24px;

    border-radius: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.3s;
}

.btn-primary {
    background: #ff5b00;
    color: #fff;

    box-shadow:
        0 12px 25px rgba(255, 91, 0, 0.4);
}

.btn-dark {
    background: #1a1a1a;
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
}

/* ================================
   GRID LAYOUT
   ================================ */

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* ================================
   LEFT COLUMN
   ================================ */

.left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    padding: 24px;

    border-radius: 22px;

    background: linear-gradient(145deg, #181818, #101010);

    border: 1px solid rgba(255, 255, 255, 0.04);

    box-shadow:
        0 20px 35px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.stat-card i {
    color: #ff5b00;
    font-size: 22px;
    margin-bottom: 20px;
}

.stat-card h3 {
    color: #fff;
    font-size: 30px;
}

.stat-card p {
    color: #808080;
    margin-top: 8px;
}

.timeline-card{
 background: #000;
}
/* ================================
   GRAPH CARD
   ================================ */

.graph-card {
    height: 320px;
    margin-top: 40px;
    max-width: 1100px;
    width: 100%;
    border-radius: 24px;

    padding: 24px;

    background: #000000;

    border: 1px solid rgba(255, 255, 255, 0.04);

    position: relative;
    overflow: hidden;

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.graph-card h2 {
    color: #fff;
}

.graph-card svg {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 220px;
}

/* ================================
   TABLE CARD
   ================================ */

.table-card {
    padding: 24px;
    margin-top: 40px;

    border-radius: 24px;

    background: linear-gradient(145deg, #181818, #101010);

    border: 1px solid rgba(255, 255, 255, 0.04);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.table-card h2 {
    color: #fff;
    margin-bottom: 20px;
}

.table-card > .row,
.breakdown > .row {
    display: flex;
    justify-content: space-between;

    padding: 18px 0;

    border-bottom: 1px solid rgba(255, 255, 255, 0.04);

    color: #9a9a9a;
}

.table-card > .row strong,
.breakdown > .row strong {
    color: #fff;
}

/* ================================
   RIGHT COLUMN
   ================================ */

.right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ================================
   MODULE CARD
   ================================ */

.module-card {
    padding: 34px;
    margin-top: 30px;
    border-radius: 24px;
    background: linear-gradient(145deg, #181818, #101010);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.module-card h3 {
    color: #fff;
    margin-bottom: 20px;
}

.module-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 12px;

    color: #9a9a9a;

    padding: 12px;

    border-radius: 12px;

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

.module-item i {
    color: #ff5b00;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 1024px) {
    .dashboard {
        flex-direction: column;
        height: 100vh;
    }

    .main {
        padding-top: 98px; /* Offset fixed mobile header */
    }

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

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main {
        padding: 16px;
        padding-top: 86px; /* Offset fixed mobile header with smaller padding */
    }

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

    .search-box {
        width: 100%;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .top-icons {
        justify-content: center;
    }

    .actions {
        flex-direction: column;
        width: 100%;
    }

    .actions .btn {
        width: 100%;
        text-align: center;
    }

    .overview h1 {
        font-size: 38px;
    }
}
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #0b0b0f;
    color: #fff;
}



        /* MAIN CONTENT */
        /* .main layout managed by flex */

        .topbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .search input {
            width: 400px;
            padding: 12px;
            border-radius: 12px;
            border: none;
            background: #15151d;
            color: #fff;
        }

        .card {
            background: #15151d;
            padding: 20px;
            border-radius: 15px;
            border: 1px solid #1c1c25;
        }

        .card h3 {
            margin: 0;
            font-size: 14px;
            color: #aaa;
        }

        .card h2 {
            margin: 10px 0 0;
            font-size: 28px;
        }

        .highlight {
            color: #ff6a00;
        }

        /* TABLE */
        table {
            width: 100%;
            margin-top: 25px;
            border-collapse: collapse;
            background: #15151d;
            border-radius: 15px;
            overflow: hidden;
        }

        table th, table td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #1c1c25;
        }

        table th {
            color: #aaa;
            font-size: 13px;
        }

        .status {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
}

/* Active Investments Page Specific Styles */
.page-header h1 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 5px;
}
.page-header .subtitle {
    font-size: 14px;
    color: #aaa;
}
.quick-actions .btn {
    margin-right: 10px;
}
.grid.stats-6, .stats-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}
.stat-card {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(145deg, #181818, #101010);
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 12px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
    text-align: center;
}
.stat-card i {
    font-size: 24px;
    color: #ff5b00;
    margin-bottom: 10px;
    display: block;
}
.stat-card h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 5px;
}
.stat-.card {
    background: #15151d;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #1c1c25;
    margin-bottom: 20px; /* added spacing between cards */
}
.stat-card h2 {
    color: #fff;
    font-size: 24px;
}
.graph-card canvas {
    max-width: 100%;
    width: 100% !important;
    height: 100% !important;
}
.allocation {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 40px;
}
.allocation .card {
    flex: 1 1 calc(50% - 12px);
    margin-bottom: 20px; /* vertical spacing on wrap */
}

.allocation-list .ranking-list{
    display: flex;
    flex-direction: column;
    gap: 12px;
margin-left: 10px;
}



.timeline {
    list-style: none;
    padding: 0;
}
.timeline li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #fff;
}
.timeline li i {
    margin-right: 10px;
    color: #ff5b00;
}
.timeline .timestamp {
    margin-left: auto;
    font-size: 12px;
    color: #aaa;
}
.insights-card {
    background: #15151d;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #1c1c25;
    margin-top: 20px;
}
.insight-box {
    background: rgba(255,255,255,0.03);
    padding: 12px;
    border-radius: 12px;
    margin-top: 20px;
    color: #fff;
}
@media (max-width: 1024px) {
    .grid.stats-6, .stats-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    .allocation .card {
        flex: 1 1 100%;
    }
}
@media (max-width: 768px) {
    .grid.stats-6, .stats-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    .allocation {
        flex-direction: column;
    }
}

input:focus, button:focus {
    outline: none;
}

button {
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}
/* =========================
   BASE PAGE STRUCTURE
========================= */

.page-header {
    margin-bottom: 18px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #e5e7eb;
}

.page-header p {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* =========================
   GRID CARDS (TOP STATS)
========================= */

.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.grid-cards > .card {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    min-width: 0;
}

.grid-cards > .card h3 {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 8px;
}

.grid-cards > .card p {
    font-size: 20px;
    font-weight: 600;
    color: #e5e7eb;
}

/* =========================
   REFERRAL LINK BOX
========================= */

.referral-link-box {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.referral-link-box h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #e5e7eb;
}

.referral-link-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.referral-link-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: #0b1220;
    color: #e5e7eb;
    font-size: 13px;
    min-width: 0;
}

.referral-link-wrapper button {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

.referral-link-wrapper button:hover {
    background: linear-gradient(145deg, #bc4a08, #101010);
}

/* =========================
   TABLE SECTION
========================= */

.table-card {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    overflow-x: auto;
}

.table-card h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #e5e7eb;
}

.table-card table,
.card.black-card table,
.user-table,
.wallet-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px; /* prevents squishing */
}

.table-card thead th,
.card.black-card table thead th,
.user-table thead th,
.wallet-table thead th {
    text-align: left;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.table-card tbody td,
.card.black-card table tbody td,
.user-table tbody td,
.wallet-table tbody td {
    padding: 12px 10px;
    font-size: 13px;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.table-card tbody tr:hover,
.card.black-card table tbody tr:hover,
.user-table tbody tr:hover,
.wallet-table tbody tr:hover {
    background: linear-gradient(145deg, #bc4a08, #101010);
}

/* =========================
   STATUS COLORS
========================= */

.status-paid {
    color: #22c55e;
    font-weight: 500;
}

.status-pending {
    color: #f59e0b;
    font-weight: 500;
}

.status-failed {
    color: #ef4444;
    font-weight: 500;
}

/* =========================
   LIST SECTION (RULES)
========================= */

.card.black-card ul,
.grid-cards > .card ul {
    margin-top: 10px;
    padding-left: 18px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.7;
}

/* =========================
   RESPONSIVE FIXES
========================= */

@media (max-width: 1024px) {
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-cards {
        grid-template-columns: 1fr;
    }

    .referral-link-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .referral-link-wrapper button {
        width: 100%;
    }
}
/* =========================
   WALLET ACTION BUTTONS
========================= */

.wallet-btn {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
    color: #e5e7eb;
    background: #0b1220;
}

.wallet-btn:hover {
    transform: translateY(-1px);
}
/*
Variants
.wallet-btn.deposit {
    border-color: rgba(34, 197, 94, 0.4);
}

.wallet-btn.deposit:hover {
    background: linear-gradient(145deg, #bc4a08, #101010);
}

.wallet-btn.withdraw {
    border-color: rgba(239, 68, 68, 0.4);
}

.wallet-btn.withdraw:hover {
    background: linear-gradient(145deg, #bc4a08, #101010);
}

.wallet-btn.transfer {
    border-color: rgba(59, 130, 246, 0.4);
}

.wallet-btn.transfer:hover {
    background: linear-gradient(145deg, #bc4a08, #101010);
} */

/* =========================
   TABLE STATUS SAFETY FIX
========================= */

.status-paid {
    color: #22c55e;
}

.status-pending {
    color: #f59e0b;
}

.status-failed {
    color: #ef4444;
}

/* =========================
   PREVENT WALLET OVERFLOW ISSUES
========================= */

.table-card table {
    min-width: 700px;
}

@media (max-width: 768px) {
    .wallet-btn {
        width: 100%;
    }
}

/* =========================
   FILTER BAR
========================= */

.tx-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.tx-filters input,
.tx-filters select {
    background: #181818;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px 12px;
    border-radius: 10px;
    color: #ffffff;
    outline: none;
    font-size: 13px;
}

.tx-filters input::placeholder {
    color: #8A8A8A;
}

.btn-primary {
    background: #FF5500;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s ease;
}

.btn-primary:hover {
    background:     linear-gradient(145deg, #bc4a08, #101010);;
}

/* =========================
   TABLE STYLING
========================= */

.table-card {
    background: #181818;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

thead th {
    text-align: left;
    font-size: 12px;
    color: #8A8A8A;
    font-weight: 500;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

tbody td {
    padding: 14px 10px;
    font-size: 13px;
    color: #FFFFFF;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

tbody tr:hover {
    background:     linear-gradient(145deg, #bc4a08, #101010);
}

/* =========================
   AMOUNT COLORS
========================= */

.amount-positive {
    color: #FF6A00;
    font-weight: 500;
}

.amount-negative {
    color: #8A8A8A;
}

/* =========================
   STATUS BADGES
========================= */

.status-completed {
    color: #FFFFFF;
    background: rgba(255, 106, 0, 0.15);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(255, 106, 0, 0.3);
}

.status-pending {
    color: #8A8A8A;
    background: rgba(138, 138, 138, 0.1);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.status-failed {
    color: #ffffff;
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.25);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

/* =========================
   RESPONSIVE FIX
========================= */

@media (max-width: 1024px) {
    .tx-filters {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 650px;
    }
}

/* =========================
   NETWORK SELECTION GRID
========================= */

.network-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.network-card {
    background: #000000;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: 0.2s;
}

    .network-card:hover {
        border-color: rgba(255,85,0,0.4);
}

.network-card input {
    accent-color: #FF5500;
}

.network-card h4 {
    font-size: 14px;
    color: #ffffff;
}

.network-card span {
    font-size: 12px;
    color: #8A8A8A;
}

/* =========================
   GENERATE BUTTON
========================= */

.generate-btn {
    margin-top: 12px;
    background: #FF5500;
    border: none;
    padding: 12px 14px;
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

.generate-btn:hover {
    background:     linear-gradient(145deg, #bc4a08, #101010);
}

/* =========================
   WALLET DISPLAY BOX
========================= */

.wallet-box {
    margin-top: 16px;
    background: #000000;
    border: 1px solid rgba(176, 67, 12, 0.06);
    border-radius: 12px;
    padding: 16px;
}

.wallet-input {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.wallet-input input {
    flex: 1;
    background: #000000;
    border: 1px solid rgba(255,255,255,0.06);
    padding: 10px;
    border-radius: 10px;
    color: #fff;
}

.wallet-input button {
    background:     linear-gradient(145deg, #bc4a08, #101010);
    border: none;
    padding: 10px 12px;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
}

/* =========================
   TEXT HELPERS
========================= */

.muted-text {
    color: #8A8A8A;
    font-size: 13px;
    margin-top: 6px;
}

.warning {
    margin-top: 10px;
    font-size: 12px;
    color: #FF6A00;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .network-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   TRUE BLACK CARD SYSTEM
========================= */

.black-card {
    background: #000000;
    border: 1px solid rgba(255, 85, 0, 0.12);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.02);
}

/* =========================
   LIVE STATUS
========================= */

.status-live {
    color: #FF6A00;
    font-weight: 600;
    font-size: 14px;
}

/* =========================
   LIVE FEED
========================= */

.feed {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}

.feed-item:hover {
    border-color: linear-gradient(145deg, #bc4a08, #101010);;
}

.hash {
    color: #8A8A8A;
    font-size: 12px;
}

.type {
    color: #FFFFFF;
    font-size: 13px;
}

.amount {
    color: #FF6A00;
    font-size: 13px;
}

.confirm {
    color: #8A8A8A;
    font-size: 12px;
}

/* =========================
   GRID OVERRIDE SAFETY
========================= */

.card.black-card h3,
.grid-cards .card.black-card h3 {
    color: #FFFFFF;
    font-size: 13px;
    margin-bottom: 8px;
}

.card.black-card p,
.grid-cards .card.black-card p {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
}

/* =========================
   RESPONSIVE FIX
   ========================= */

@media (max-width: 900px) {
    .feed-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* ==================================================
   MOBILE RESPONSIVE TYPOGRAPHY & LEGIBILITY RULES
   ================================================== */
@media (max-width: 768px) {
    /* Improve general line heights for touch screen reading comfort */
    body, p, span, td, th, li, a, h1, h2, h3, h4, h5, h6 {
        line-height: 1.5 !important;
    }

    /* Boost readability of labels, table headers, and muted text on dark bg */
    .card h3,
    .table-card th,
    thead th,
    .muted-text,
    .muted,
    .subtitle {
        font-weight: 500 !important;
        color: #e5e7eb !important;
    }

    /* Avoid microscopic text on mobile layouts */
    .card h3,
    .table-card th,
    thead th,
    .muted-text,
    .muted,
    .confirm,
    .warning,
    .status {
        font-size: 13px !important;
    }

    /* Touch targets and input sizes */
    input, select, textarea, button {
        font-size: 15px !important;
    }
}
    /* Scope all styles under referral-dashboard to avoid style collision and overrides */
    .referral-dashboard {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        color: #ffffff !important;
        line-height: 1.5;
    }

    /* Apply 'Inter' font to all text elements, excluding Font Awesome icons */
    .referral-dashboard *:not(i):not([class*="fa-"]) {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    }

    .referral-dashboard * {
        box-sizing: border-box;
    }

    /* Set text colors to white globally for all text elements in the page */
    .referral-dashboard p,
    .referral-dashboard span:not(.badge-status):not(.rank-badge),
    .referral-dashboard div:not(.icon-wrapper),
    .referral-dashboard small,
    .referral-dashboard label,
    .referral-dashboard th,
    .referral-dashboard td,
    .referral-dashboard h1,
    .referral-dashboard h2,
    .referral-dashboard h3,
    .referral-dashboard h4,
    .referral-dashboard h5,
    .referral-dashboard h6,
    .referral-dashboard input,
    .referral-dashboard button span {
        color: #ffffff !important;
    }

    /* Override conflicting row properties in global style.css */
    .referral-dashboard .row {
        border-bottom: none !important;
        padding: 0 !important;
        margin-right: -12px !important;
        margin-left: -12px !important;
    }

    .referral-dashboard .row > * {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }

    /* Black Responsive Cards (#000 background) */
    .referral-dashboard .card-custom {
        background: #000000 !important;
        border: 1px solid rgba(255, 85, 0, 0.15) !important;
        border-radius: 12px !important;
        padding: 12px 14px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        height: auto;
        min-height: 0;
        position: relative;
        overflow: hidden;
        box-shadow: none;
    }

    .referral-dashboard .card-custom.card-stat {
        padding: 10px 12px;
    }

    .referral-dashboard .row-stats {
        align-items: flex-start !important;
    }

    .referral-dashboard .row-stats > [class*="col-"],
    .referral-dashboard .row-levels > [class*="col-"] {
        align-self: flex-start;
        height: auto;
    }

    .referral-dashboard .card-custom:hover {
        border-color: #FF5500 !important;
        box-shadow: none !important;
        transform: none;
    }

    /* Stat Cards Specifics */
    .referral-dashboard .card-value {
        font-size: 18px;
        font-weight: 700;
        margin: 4px 0 2px 0;
        line-height: 1.15;
    }

    .referral-dashboard .card-value-lg {
        font-size: 22px;
        font-weight: 700;
        line-height: 1.15;
    }

    .referral-dashboard .card-label {
        font-size: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .referral-dashboard .card-trend {
        font-size: 12px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 5px;
        line-height: 1.35;
    }

    /* Semantic icon and status text overrides to match white text while preserving badges/trends */
    .referral-dashboard .trend-up i {
        color: #22c55e !important;
    }

    .referral-dashboard .trend-down i {
        color: #ef4444 !important;
    }

    .referral-dashboard .trend-neutral i {
        color: #8A8A8A !important;
    }

    .referral-dashboard .icon-wrapper {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(255, 85, 0, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #FF5500;
        font-size: 15px;
        flex-shrink: 0;
        transition: background 0.25s, color 0.25s;
    }

    .referral-dashboard .icon-wrapper i {
        color: #FF5500 !important;
    }

    .referral-dashboard .card-custom:hover .icon-wrapper {
        background: #FF5500;
    }

    .referral-dashboard .card-custom:hover .icon-wrapper i {
        color: #ffffff !important;
    }

    /* Input Display Box */
    .referral-dashboard .input-wrapper {
        position: relative;
        width: 100%;
    }

    .referral-dashboard .referral-input-field {
        width: 100%;
        background: #000000 !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 12px;
        padding: 14px 16px 14px 46px;
        font-size: 15px;
        font-weight: 500;
        outline: none;
        transition: border-color 0.2s;
    }

    .referral-dashboard .referral-input-field:focus {
        border-color: #FF5500 !important;
    }

    .referral-dashboard .input-icon {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
    }

    .referral-dashboard .input-icon i {
        color: #ffffff !important;
    }

    /* Premium Buttons */
    .referral-dashboard .btn-primary-orange {
        background: #FF5500 !important;
        border: none !important;
        border-radius: 12px !important;
        font-weight: 600 !important;
        font-size: 15px !important;
        padding: 12px 24px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s;
        text-align: center;
        text-decoration: none;
    }

    .referral-dashboard .btn-primary-orange i,
    .referral-dashboard .btn-primary-orange span {
        color: #ffffff !important;
    }

    .referral-dashboard .btn-primary-orange:hover {
        background: #FF6A00 !important;
        transform: translateY(-1px);
    }

    .referral-dashboard .btn-primary-orange:active {
        transform: translateY(1px);
    }

    .referral-dashboard .btn-outline-dark {
        background: rgba(255, 255, 255, 0.03) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 12px !important;
        font-weight: 500 !important;
        font-size: 15px !important;
        padding: 12px 18px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        text-decoration: none;
    }

    .referral-dashboard .btn-outline-dark i {
        color: #ffffff !important;
    }

    .referral-dashboard .btn-outline-dark:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(255, 255, 255, 0.25) !important;
    }

    /* QR Container */
    .referral-dashboard .qr-container {
        background: #000000 !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 14px;
        padding: 12px 18px;
        display: flex;
        align-items: center;
        gap: 16px;
        width: 100%;
        max-width: 290px;
    }

    .referral-dashboard .qr-placeholder-wrapper {
        width: 52px;
        height: 52px;
        background: #ffffff;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
    }

    .referral-dashboard .qr-code-icon {
        font-size: 40px;
        color: #000000 !important;
    }

    /* Levels Layout */
    .referral-dashboard .row-levels {
        align-items: flex-start !important;
    }

    .referral-dashboard .level-card {
        background: #000000 !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 14px;
        padding: 14px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        height: auto;
        min-height: 0;
        transition: all 0.25s;
    }

    .referral-dashboard .level-card:hover {
        border-color: rgba(255, 85, 0, 0.25) !important;
        transform: translateY(-2px);
    }

    .referral-dashboard .level-badge {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 700;
        flex-shrink: 0;
    }

    .referral-dashboard .bg-orange-dim {
        background: rgba(255, 85, 0, 0.15) !important;
    }
    .referral-dashboard .bg-orange-dim span {
        color: #FF5500 !important;
    }

    .referral-dashboard .bg-warning-dim {
        background: rgba(245, 158, 11, 0.15) !important;
    }
    .referral-dashboard .bg-warning-dim span {
        color: #f59e0b !important;
    }

    .referral-dashboard .bg-info-dim {
        background: rgba(59, 130, 246, 0.15) !important;
    }
    .referral-dashboard .bg-info-dim span {
        color: #3b82f6 !important;
    }

    /* Table System Overrides for Clean Layout */
    .referral-dashboard .table-wrap-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .referral-dashboard .table-custom {
        width: 100%;
        border-collapse: collapse;
        text-align: left;
        min-width: 650px;
    }

    .referral-dashboard .table-custom th {
        background: #08080c !important;
        font-weight: 600;
        font-size: 11px;
        padding: 8px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }

    .referral-dashboard .table-custom td {
        padding: 8px 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        vertical-align: middle;
        background: #000000 !important;
        font-size: 12px;
    }

    .referral-dashboard .table-custom tbody tr:hover td {
        background: rgba(255, 85, 0, 0.02) !important;
    }

    .referral-dashboard .table-custom tbody tr:last-child td {
        border-bottom: none !important;
    }

    /* Badges (translucent bg + high contrast outline, white text) */
    .referral-dashboard .badge-status {
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
    }

    .referral-dashboard .badge-status.success {
        background: rgba(34, 197, 94, 0.15) !important;
        border: 1px solid #22c55e !important;
    }
    .referral-dashboard .badge-status.success span {
        color: #ffffff !important;
    }

    .referral-dashboard .badge-status.warning {
        background: rgba(245, 158, 11, 0.15) !important;
        border: 1px solid #f59e0b !important;
    }
    .referral-dashboard .badge-status.warning span {
        color: #ffffff !important;
    }

    .referral-dashboard .badge-status.danger {
        background: rgba(239, 68, 68, 0.15) !important;
        border: 1px solid #ef4444 !important;
    }
    .referral-dashboard .badge-status.danger span {
        color: #ffffff !important;
    }

    /* Analytics Chart */
    .referral-dashboard .chart-wrapper {
        position: relative;
        width: 100%;
        height: 160px;
    }

    .referral-dashboard .card-custom.card-chart {
        padding: 16px 18px;
    }

    .referral-dashboard .card-custom.card-chart h5 {
        font-size: 16px !important;
        margin-bottom: 2px !important;
    }

    .referral-dashboard .card-custom.card-table {
        padding: 16px 18px;
    }

    .referral-dashboard .card-custom.card-table h5 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    .referral-dashboard .card-custom.card-withdraw {
        padding: 16px 20px;
    }

    .referral-dashboard .card-custom.card-withdraw h2,
    .referral-dashboard .card-custom.card-withdraw .card-value-lg {
        font-size: 22px !important;
        line-height: 1.15;
    }

    .referral-dashboard .card-custom.card-link {
        padding: 16px 18px;
    }

    .referral-dashboard .card-custom.card-link h5 {
        font-size: 16px !important;
        margin-bottom: 6px !important;
    }

    .referral-dashboard .filter-btn-group {
        background: rgba(255, 255, 255, 0.02) !important;
        padding: 4px;
        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .referral-dashboard .filter-btn {
        background: transparent;
        border: none;
        border-radius: 8px;
        padding: 6px 14px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .referral-dashboard .filter-btn.active {
        background: #FF5500 !important;
        box-shadow: 0 4px 12px rgba(255, 85, 0, 0.25);
    }
    .referral-dashboard .filter-btn.active span {
        color: #ffffff !important;
    }

    /* Leaderboard Styling */
    .referral-dashboard .rank-badge {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 700;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .referral-dashboard .rank-badge span {
        color: #ffffff !important;
    }

    .referral-dashboard .rank-1 {
        background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    }
    .referral-dashboard .rank-1 span {
        color: #000000 !important;
    }

    .referral-dashboard .rank-2 {
        background: linear-gradient(135deg, #C0C0C0, #808080) !important;
    }
    .referral-dashboard .rank-2 span {
        color: #000000 !important;
    }

    .referral-dashboard .rank-3 {
        background: linear-gradient(135deg, #CD7F32, #8B4513) !important;
    }
    .referral-dashboard .rank-3 span {
        color: #ffffff !important;
    }

    .referral-dashboard .leaderboard-mobile-item {
        background: #000000 !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-radius: 14px;
        padding: 14px 16px;
        transition: border-color 0.2s;
    }

    .referral-dashboard .leaderboard-mobile-item:hover {
        border-color: rgba(255, 85, 0, 0.25) !important;
    }

    /* Mobile Responsive Optimizations */
    @media (max-width: 991px) {
        .referral-dashboard .qr-container {
            max-width: 100%;
        }
    }

    @media (max-width: 767px) {
        .referral-dashboard {
            padding: 4px;
        }

        .referral-dashboard .card-custom {
            padding: 14px 16px;
        }

        .referral-dashboard .card-value {
            font-size: 20px;
        }

        .referral-dashboard .chart-wrapper {
            height: 200px;
        }

        /* Enforce robust font sizing and contrast on mobile */
        .referral-dashboard p,
        .referral-dashboard span,
        .referral-dashboard td,
        .referral-dashboard div,
        .referral-dashboard input {
            font-size: 14px !important;
        }

        .referral-dashboard .font-size-sm {
            font-size: 13px !important;
        }

        .referral-dashboard .font-size-xs {
            font-size: 11px !important;
        }

        .referral-dashboard h5 {
            font-size: 16px !important;
        }

        .referral-dashboard h6 {
            font-size: 15px !important;
        }

        .referral-dashboard .btn-primary-orange,
        .referral-dashboard .btn-outline-dark {
            font-size: 15px !important;
            padding: 14px; /* Touch-friendly size */
        }

        .referral-dashboard .referral-input-field {
            font-size: 15px !important;
            padding: 14px 16px 14px 44px;
        }
    }
