:root {
    --pd-blue: #0056d2;
    --pd-blue-light: #e8f0fe;
    --pd-border: #e8ecf1;
    --pd-bg: #f4f6f9;
    --pd-text: #1a1d21;
    --pd-muted: #6b7280;
    --pd-radius: 12px;
    --pd-sidebar-w: 88px;
}

body.pd-body {
    background: var(--pd-bg) !important;
}

.pd-shell {
    display: flex;
    min-height: calc(100vh - 72px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    gap: 1rem;
}

/* Inside standard user layout (shared header + sidebar) */
.user-main-content .pd-shell--in-layout {
    display: block;
    min-height: auto;
    max-width: none;
    margin: 0;
    padding: 0 0 1.5rem;
}

.user-main-content .pd-shell--in-layout .pd-main {
    width: 100%;
    min-width: 0;
}

.pd-sidebar {
    width: var(--pd-sidebar-w);
    flex-shrink: 0;
    background: #fff;
    border-radius: var(--pd-radius);
    border: 1px solid var(--pd-border);
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky;
    top: 80px;
    height: fit-content;
}

.pd-sidebar-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pd-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.pd-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.65rem 0.35rem;
    margin-bottom: 0.15rem;
    border-radius: 10px;
    color: var(--pd-muted);
    text-decoration: none;
    font-size: 0.65rem;
    text-align: center;
    line-height: 1.2;
    width: 100%;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.pd-nav-item i {
    font-size: 1.15rem;
}

.pd-nav-item:hover {
    background: var(--pd-blue-light);
    color: var(--pd-blue);
}

.pd-nav-item.active {
    background: var(--pd-blue-light);
    color: var(--pd-blue);
    border-left-color: var(--pd-blue);
    font-weight: 600;
}

.pd-nav-spacer {
    flex: 1;
}

.pd-main {
    flex: 1;
    min-width: 0;
}

.pd-header-card {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.pd-profile-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
    justify-content: space-between;
}

.pd-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pd-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pd-text);
    margin: 0;
}

.pd-verified {
    color: var(--pd-blue);
    font-size: 1rem;
}

.pd-meta {
    font-size: 0.8rem;
    color: var(--pd-muted);
}

/* Instagram-style followers / following */
.pd-follow-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-shrink: 0;
}

.pd-follow-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.5rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--pd-text);
    line-height: 1.2;
}

.pd-follow-stat:hover {
    opacity: 0.85;
}

.pd-follow-stat strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pd-text);
}

.pd-follow-stat span {
    font-size: 0.75rem;
    color: var(--pd-muted);
    font-weight: 500;
}

a.pd-follow-stat-link {
    text-decoration: none;
    color: inherit;
}

a.pd-follow-stat-link:hover strong {
    color: var(--pd-blue);
}

/* Channel tab */
.pd-channel-stat-card {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 0.85rem 1rem;
    text-align: center;
}

.pd-channel-stat-card .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pd-text);
}

.pd-channel-stat-card .label {
    font-size: 0.72rem;
    color: var(--pd-muted);
    margin-top: 0.15rem;
}

.pd-channel-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pd-channel-post {
    display: flex;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1rem;
    align-items: flex-start;
}

.pd-channel-post-media {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: var(--pd-bg);
}

.pd-channel-post-media img,
.pd-channel-post-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-channel-text-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--pd-muted);
}

.pd-channel-media-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

.pd-channel-media-badge.store {
    left: 6px;
    right: auto;
}

.pd-channel-post-body {
    flex: 1;
    min-width: 0;
}

.pd-channel-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pd-blue);
}

.pd-channel-excerpt {
    font-size: 0.875rem;
    color: var(--pd-text);
    margin: 0;
}

.pd-channel-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pd-muted);
}

.pd-channel-metrics i {
    margin-right: 0.2rem;
}

@media (max-width: 576px) {
    .pd-channel-post {
        flex-direction: column;
    }

    .pd-channel-post-media {
        width: 100%;
        height: 180px;
    }
}

.pd-follow-list-item:last-child {
    border-bottom: none !important;
}

.pd-follow-modal .modal-content {
    border-radius: var(--pd-radius);
    border: 1px solid var(--pd-border);
}

@media (max-width: 576px) {
    .pd-follow-stats {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.5rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .pd-follow-stat {
        min-width: 4rem;
    }
}

.pd-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pd-badge-level {
    background: var(--pd-blue-light);
    color: var(--pd-blue);
}

.pd-badge-member {
    background: #f3f4f6;
    color: #374151;
}

.pd-badge-gold {
    background: #fff7ed;
    color: #c2410c;
}

.pd-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.75rem;
}

.pd-stat-card {
    background: #fafbfc;
    border: 1px solid var(--pd-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    min-width: 0;
}

.pd-stat-card .label {
    font-size: 0.72rem;
    color: var(--pd-muted);
    margin-bottom: 0.15rem;
}

.pd-stat-card .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pd-text);
}

.pd-stat-card .sub {
    font-size: 0.68rem;
    color: var(--pd-muted);
}

.pd-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.pd-stat-icon.blue { background: #dbeafe; color: #2563eb; }
.pd-stat-icon.green { background: #dcfce7; color: #16a34a; }
.pd-stat-icon.orange { background: #ffedd5; color: #ea580c; }
.pd-stat-icon.purple { background: #ede9fe; color: #7c3aed; }

.pd-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid var(--pd-border);
    margin-bottom: 1rem;
    background: #fff;
    border-radius: var(--pd-radius) var(--pd-radius) 0 0;
    padding: 0.5rem 1rem 0;
    border: 1px solid var(--pd-border);
    border-bottom: none;
}

.pd-tab {
    padding: 0.65rem 0.6rem;
    font-size: 1rem;
    color: var(--pd-muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    font-weight: 500;
}

.pd-tab:hover {
    color: var(--pd-blue);
}

.pd-tab.active {
    color: var(--pd-blue);
    font-weight: 600;
    border-bottom-color: var(--pd-blue);
}

.pd-tab-panel {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: 0 0 var(--pd-radius) var(--pd-radius);
    padding: 1.25rem;
}

.pd-card {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1.15rem;
    height: 100%;
}

.pd-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pd-card-title a {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--pd-blue);
    text-decoration: none;
}

.pd-progress {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.pd-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pd-blue), #3b82f6);
    border-radius: 999px;
}

.pd-task-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}

.pd-task-item {
    border: 1px solid var(--pd-border);
    border-radius: 10px;
    padding: 0.65rem;
    font-size: 0.8rem;
}

.pd-task-item.done {
    border-color: #86efac;
    background: #f0fdf4;
}

.pd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.pd-kpi {
    border: 1px solid var(--pd-border);
    border-radius: 10px;
    padding: 0.85rem;
}

.pd-kpi .val {
    font-size: 1.15rem;
    font-weight: 700;
}

.pd-kpi .chg {
    font-size: 0.72rem;
    color: #16a34a;
}

.pd-table {
    width: 100%;
    font-size: 0.82rem;
}

.pd-table th {
    color: var(--pd-muted);
    font-weight: 500;
    padding: 0.5rem;
    border-bottom: 1px solid var(--pd-border);
}

.pd-table td {
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.pd-table tr.highlight {
    background: var(--pd-blue-light);
}

.pd-table tr.achieved td {
    opacity: 0.85;
}

.pd-status {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.pd-status.delivered { background: #dcfce7; color: #15803d; }
.pd-status.active { background: #dcfce7; color: #15803d; }
.pd-status.shipped { background: #dbeafe; color: #1d4ed8; }

.pd-milestone-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.pd-milestone-card {
    flex: 0 0 140px;
    border: 1px solid var(--pd-border);
    border-radius: 12px;
    padding: 0.85rem;
    text-align: center;
}

.pd-milestone-card.achieved {
    border-color: #86efac;
    background: #f0fdf4;
}

.pd-milestone-card.locked {
    opacity: 0.55;
}

.pd-banner {
    border-radius: var(--pd-radius);
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pd-banner.purple {
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
}

.pd-banner.blue {
    background: #e8f0fe;
    font-size: 0.85rem;
}

.pd-banner.orange {
    background: #fff7ed;
    font-size: 0.85rem;
}

.pd-membership-card {
    border-radius: var(--pd-radius);
    padding: 1.25rem;
    color: #fff;
    height: 100%;
}

.pd-membership-card.silver {
    background: linear-gradient(145deg, #1e40af, #3b82f6);
}

.pd-membership-card.gold {
    background: linear-gradient(145deg, #c2410c, #f59e0b);
}

.pd-network-col {
    max-height: 320px;
    overflow-y: auto;
}

.pd-member-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.82rem;
}

.pd-member-row img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.pd-footer-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--pd-muted);
    padding: 0.75rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--pd-border);
}

.pd-edit-btn {
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .pd-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .pd-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pd-sidebar {
        display: none;
    }
}

.pd-prestige-badge {
    border: 1px solid var(--pd-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    height: 100%;
}

.pd-prestige-badge.done {
    border-color: #86efac;
    background: #f0fdf4;
}

.pd-gauge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 6px solid var(--pd-blue-light);
    border-top-color: var(--pd-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--pd-blue);
}

.pd-milestone-icon {
    display: inline-block;
}

.text-purple {
    color: #7c3aed;
}

/* Referral + KYC action cards */
.pd-action-card {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1.15rem 1.25rem;
    height: 100%;
}
.pd-action-card-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}
.pd-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.pd-action-icon.purple { background: #ede9fe; color: #7c3aed; }
.pd-action-icon.green { background: #dcfce7; color: #16a34a; }
.pd-action-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.pd-action-sub {
    font-size: 0.82rem;
    color: var(--pd-muted);
    margin-bottom: 0.75rem;
}
.pd-referral-link-box {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #f8fafc;
    border: 1px solid var(--pd-border);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
}
.pd-referral-link-box input {
    border: 0;
    background: transparent;
    font-size: 0.78rem;
}
.pd-kyc-benefits li {
    margin-bottom: 0.25rem;
}
.pd-kyc-btn {
    font-weight: 600;
}

/* Benefit stat cards */
.pd-benefit-card {
    background: #fff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.pd-benefit-theme.pd-benefit-blue {
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 45%);
    border-color: #bfdbfe;
}
.pd-benefit-theme.pd-benefit-green {
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 45%);
    border-color: #bbf7d0;
}
.pd-benefit-theme.pd-benefit-orange {
    background: linear-gradient(180deg, #fff7ed 0%, #fff 45%);
    border-color: #fed7aa;
}
.pd-benefit-theme.pd-benefit-purple {
    background: linear-gradient(180deg, #f5f3ff 0%, #fff 45%);
    border-color: #ddd6fe;
}
.pd-benefit-info {
    font-size: 0.75rem;
    color: #9ca3af;
    cursor: help;
}
.pd-benefit-head {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.pd-benefit-label {
    font-size: 0.78rem;
    color: var(--pd-muted);
    font-weight: 600;
}
.pd-benefit-value {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--pd-text);
}
.pd-benefit-period {
    font-size: 0.72rem;
    color: var(--pd-muted);
}
.pd-benefit-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.65rem;
    margin-bottom: 0.65rem;
    min-height: 3rem;
}
.pd-benefit-breakdown-item {
    font-size: 0.68rem;
    color: var(--pd-muted);
    line-height: 1.3;
}
.pd-benefit-breakdown-item .lbl {
    display: block;
    font-weight: 600;
    color: #4b5563;
}
.pd-benefit-breakdown-item .val {
    display: block;
    font-weight: 700;
    color: var(--pd-text);
    font-size: 0.72rem;
}
.pd-benefit-more {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pd-blue);
    text-decoration: none;
    margin-top: auto;
}
.pd-benefit-split {
    margin-bottom: 0.65rem;
    line-height: 1.5;
}
.pd-benefit-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
}
.pd-benefit-footer.orange { background: #fff7ed; color: #c2410c; }
.pd-benefit-footer.purple { background: #f5f3ff; color: #6d28d9; }
.pd-membership-tier {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
}
.pd-membership-tier.gold {
    background: #fffbeb;
    border-color: #fde68a;
}
.pd-membership-tier .tier-name {
    font-weight: 800;
    font-size: 0.82rem;
}
.pd-membership-tier .tier-meta {
    color: var(--pd-muted);
}
.pd-membership-tier .tier-perks {
    color: #2563eb;
    font-weight: 600;
    margin: 0.15rem 0;
}
.pd-membership-tier .tier-worth {
    font-weight: 700;
}

/* Lifetime overview bar */
.pd-lifetime-bar {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: var(--pd-radius);
    padding: 0.85rem 1rem;
}
.pd-lifetime-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}
.pd-lifetime-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1d4ed8;
    white-space: nowrap;
}
.pd-lifetime-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.72rem;
    color: #374151;
}
.pd-lifetime-stats strong {
    color: #111827;
}

@media (max-width: 992px) {
    .pd-lifetime-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

@media (max-width: 576px) {
    .pd-stat-cards {
        grid-template-columns: 1fr;
    }
    .pd-task-grid {
        grid-template-columns: 1fr;
    }
}
