/* ============================================================
   20. PAGE — CAMPAIGN DETAIL
   Tambahkan ke bagian paling bawah app.css
   ============================================================ */

/* ── Layout & Base ── */
.cd-page {
    background: var(--bg-body);
    min-height: 100vh;
}

.cd-hero {
    position: relative;
    padding-top: calc(var(--navbar-height) + 1.5rem);
    padding-bottom: 0;
    overflow: hidden;
    background: var(--bg-body);
}
.cd-hero__deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.cd-hero__circle {
    position: absolute;
    border-radius: 50%;
    opacity: var(--bg-circle-opacity);
}
.cd-hero__circle--1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary-500);
    right: -180px;
    top: -160px;
}
.cd-hero__circle--2 {
    width: 320px;
    height: 320px;
    background: var(--color-accent-400);
    left: -80px;
    bottom: -80px;
}
.cd-hero__inner {
    position: relative;
    z-index: 1;
}

/* ── Breadcrumb ── */
.cd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.cd-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-base);
}
.cd-breadcrumb a:hover {
    color: var(--color-primary-500);
}
.cd-breadcrumb__sep {
    font-size: 12px;
    color: var(--color-primary-500) !important;
}
.cd-breadcrumb__current {
    color: var(--text-secondary);
    font-weight: 600;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Two-Column Layout ── */
.cd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 2rem;
    padding-bottom: 5rem;
}

.cd-main {
    min-height: 65vh;
    min-width: 0;
}

/* ── Thumbnail ── */
.cd-thumb-wrap {
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    background: var(--bg-surface-2);
}
.cd-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.cd-thumb-wrap:hover .cd-thumb {
    transform: scale(1.02);
}
.cd-badges-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.cd-badge-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-soft-bg);
    color: var(--color-primary-400);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cd-badge-featured {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(239, 159, 39, 0.15);
    color: #d97706;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
}

.cd-badge-locked {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(128, 128, 128, 0.15);
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
}

/* ── Title & Meta ── */
.cd-title {
    font-size: clamp(1.35rem, 2.8vw, 1.875rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.cd-meta-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}
.cd-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
}
.cd-meta-item i {
    color: var(--color-primary-500);
    font-size: 13px;
}

/* ── Tab Navigation (Dengan Horizontal Scroll Buttons) ── */
.cd-tabs-scroll-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
}

.cd-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0; /* Dinolkan karena sudah di-handle oleh wrapper */
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding-right: 20px;
    flex: 1; /* Penting: Agar tab mengisi sisa lebar container */
}
.cd-tabs::-webkit-scrollbar {
    display: none;
}

/* Navigasi Kanan Kiri Tabs Detail Campaign */
.cd-tabs-edge {
    position: absolute;
    top: 0;
    bottom: 1px; /* Sisa 1px untuk memperlihatkan garis bawah border-bottom */
    width: 60px;
    display: flex;
    align-items: center;
    pointer-events: none; /* Area bayangan bisa ditembus klik */
    z-index: 10;
}

/* Menggunakan var(--bg-body) agar menyatu dengan background halaman */
.cd-tabs-edge--left {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(to right, var(--bg-body) 35%, transparent);
}
.cd-tabs-edge--right {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(to left, var(--bg-body) 35%, transparent);
}

.cd-tabs-nav-btn {
    pointer-events: auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    margin: 0 4px;
}

.cd-tabs-nav-btn:hover {
    background: var(--color-primary-500);
    color: #fff;
    border-color: var(--color-primary-500);
    transform: scale(1.08);
}

.cd-tabs-wrapper {
    visibility: hidden;
}

.cd-tabs-wrapper.is-ready {
    visibility: visible;
}

.cd-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-base);
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 0;
    transition:
        color var(--transition-base),
        background var(--transition-base),
        border-color var(--transition-base);
}
.cd-tab-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-surface-2);
}
.cd-tab-btn:focus-visible {
    outline: none;
    background: var(--bg-surface-2);
    box-shadow: inset 0 0 0 2px var(--color-primary-400);
}
.cd-tab-btn.active {
    color: var(--color-primary-500);
    border-bottom-color: var(--color-primary-500);
    background: var(--primary-soft-bg);
}
[data-theme="dark"] .cd-tab-btn.active {
    color: var(--color-primary-400);
    border-bottom-color: var(--color-primary-400);
    background: rgba(15, 110, 86, 0.08);
}
.cd-tab-btn i {
    font-size: 13px;
}
.cd-tab-count {
    font-size: 10px;
    font-weight: 700;
    background: var(--primary-soft-bg);
    color: var(--color-primary-500);
    padding: 1px 7px;
    border-radius: var(--border-radius-pill);
    transition:
        background var(--transition-base),
        color var(--transition-base);
}
.cd-tab-btn.active .cd-tab-count {
    background: var(--color-primary-500);
    color: #fff;
}

/* ── Tab Panels ── */
.cd-tab-panel {
    display: none;
    animation: cd-fade-in 0.35s ease both;
}
.cd-tab-panel.active {
    display: block;
}

@keyframes cd-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cd-story {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.85;
    width: 100%;
}

.cd-story * {
    max-width: 100%;
    white-space: normal !important;
}

/* media */
.cd-story img,
.cd-story iframe,
.cd-story video {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
}

.cd-story p {
    margin-bottom: 1rem;
}

.cd-story ul,
.cd-story ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.cd-story li {
    margin-bottom: 0.5rem;
}

@media (max-width: 575.98px) {
    .cd-story {
        font-size: 14.5px;
        line-height: 1.7;
    }
}

/* ── Donation Stages ── */
.cd-stages {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cd-stage {
    min-width: 0;
    display: flex;
    gap: 1rem;
    position: relative;
}
.cd-stage:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 40px;
    bottom: -8px;
    width: 0.5px;
    background: var(--border-color);
    z-index: 0;
}
.cd-stage--completed:not(:last-child)::before {
    background: var(--color-primary-500);
}

.cd-stage__connector {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
    z-index: 1;
}
.cd-stage__dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: all var(--transition-base);
}
.cd-stage__dot--done {
    background: var(--color-primary-500);
    color: #fff;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 4px rgba(15, 110, 86, 0.12);
}
.cd-stage__dot--active {
    background: var(--bg-surface);
    color: var(--color-primary-500);
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 4px rgba(15, 110, 86, 0.15);
    animation: cd-pulse-ring 2.5s ease infinite;
}
.cd-stage__dot--pending {
    background: var(--bg-surface-2);
    color: var(--text-muted);
    border-color: var(--border-color);
}

@keyframes cd-pulse-ring {
    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(15, 110, 86, 0.15);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(15, 110, 86, 0.06);
    }
}

.cd-stage__card {
    min-width: 0;
    flex: 1;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    transition:
        box-shadow var(--transition-base),
        border-color var(--transition-base);
}
.cd-stage__card:hover {
    box-shadow: var(--shadow-sm);
}
.cd-stage__card--active {
    border-color: var(--color-primary-400);
    background: var(--primary-soft-bg);
}
[data-theme="dark"] .cd-stage__card--active {
    background: rgba(15, 110, 86, 0.08);
    border-color: var(--color-primary-500);
}
.cd-stage__card--done {
    opacity: 0.82;
}

.cd-stage__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.cd-stage__name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: break-word;
}
.cd-stage__card--active .cd-stage__name {
    color: var(--color-primary-600);
}
[data-theme="dark"] .cd-stage__card--active .cd-stage__name {
    color: var(--color-primary-400);
}

.cd-stage__badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--border-radius-pill);
    white-space: nowrap;
    flex-shrink: 0;
}
.cd-stage__badge--done {
    background: var(--color-success-bg);
    color: var(--color-success);
}
.cd-stage__badge--active {
    background: var(--color-primary-500);
    color: #fff;
}
.cd-stage__badge--pending {
    background: var(--bg-surface-2);
    color: var(--text-muted);
}

.cd-stage__card--active .cd-stage__desc {
    color: var(--color-primary);
}

.cd-stage__card--active .cd-stage__footer {
    color: var(--text-secondary);
}

.cd-stage__card--active .cd-stage__footer strong {
    color: var(--color-primary-400);
}

.cd-stage__desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
    word-break: break-word;
    overflow-wrap: break-word;
}
.cd-stage__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    gap: 8px;
    margin-bottom: 8px;
}
.cd-stage__collected {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary-500);
}

[data-theme="dark"] .cd-stage__collected {
    color: var(--color-primary-400);
}

/* ── Stage Transparency Feeds ── */
.cd-stage-feeds {
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px dashed var(--border-color);
}

.cd-stage-feeds__head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cd-stage-feeds__head i {
    color: var(--color-primary-500);
    font-size: 12px;
}

.cd-stage-feeds__count {
    font-size: 10px;
    font-weight: 700;
    background: var(--primary-soft-bg);
    color: var(--color-primary-500);
    padding: 1px 7px;
    border-radius: var(--border-radius-pill);
    margin-left: auto;
}

.cd-stage-feeds__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cd-stage-feed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    /* padding: 0.35rem 0.625rem; */
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    transition: background var(--transition-base);
}

.cd-stage-feed-row:hover {
    /* background: var(--bg-surface-2); */
}

.cd-stage-feed-row__left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.cd-stage-feed-row__left i {
    font-size: 11px;
    color: var(--color-warning);
    flex-shrink: 0;
}

.cd-stage-feed-row__left .bi-megaphone-fill {
    color: var(--color-info);
}

.cd-stage-feed-row__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cd-stage-feed-row__amount {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-warning);
    flex-shrink: 0;
}

@media (max-width: 459.98px) {
    /* Sembunyikan timeline stage */
    .cd-stage:not(:last-child)::before {
        display: none;
    }

    .cd-stage__connector {
        display: none;
    }

    .cd-stage {
        padding-left: 0;
    }
}

/* ── Gallery ── */
.cd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 160px;
    gap: 10px;
}
.cd-gallery-grid__item {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    background: var(--bg-surface-2);
}
.cd-gallery-grid__item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}
.cd-gallery-grid__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
.cd-gallery-grid__item:hover .cd-gallery-grid__img {
    transform: scale(1.07);
}
.cd-gallery-grid__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}
.cd-gallery-grid__item:hover .cd-gallery-grid__overlay {
    background: rgba(0, 0, 0, 0.32);
}
.cd-gallery-grid__overlay i {
    font-size: 24px;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition:
        opacity var(--transition-base),
        transform var(--transition-base);
}
.cd-gallery-grid__item:hover .cd-gallery-grid__overlay i {
    opacity: 1;
    transform: scale(1);
}

/* Lightbox */
.cd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}
.cd-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}
.cd-lightbox__img {
    max-width: min(88vw, 960px);
    max-height: 82vh;
    object-fit: contain;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    display: block;
}
.cd-lightbox__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-base);
    z-index: 1;
}
.cd-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}
.cd-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-base);
    z-index: 1;
}
.cd-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.22);
}
.cd-lightbox__prev {
    left: 18px;
}
.cd-lightbox__next {
    right: 18px;
}
.cd-lightbox__caption {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 14px;
    border-radius: var(--border-radius-pill);
    white-space: nowrap;
    backdrop-filter: blur(6px);
}

/* ── Transparency Feed ── */
.cd-feed-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 1.75rem;
    padding: 1.25rem;
    padding-bottom: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}
.cd-feed-stat {
    text-align: center;
}
.cd-feed-stat__val {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 3px;
}
.cd-feed-stat__label {
    font-size: 10.5px;
    color: var(--text-secondary);
    font-weight: 500;
}
.cd-feed-stat__val--income {
    color: var(--color-primary-500);
}
.cd-feed-stat__val--expense {
    color: var(--color-warning);
}

.cd-feed-timeline {
    position: relative;
    padding-left: 0;
}
.cd-feed-timeline:not(.empty)::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 8px;
    bottom: 8px;
    width: 0.5px;
    background: var(--border-color);
    z-index: 0;
}

.cd-feed-entry {
    min-width: 0;
    display: flex;
    gap: 1rem;
    padding-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}
.cd-feed-entry:last-child {
    padding-bottom: 0;
}

.cd-feed-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    background: var(--bg-surface);
    border: 2px solid var(--color-primary-500);
    color: var(--color-primary-500);
    z-index: 1;
    margin-top: 2px;
}
.cd-feed-dot--buy {
    border-color: var(--color-accent-400);
    color: var(--color-accent-400);
}
.cd-feed-dot--report {
    border-color: var(--color-info);
    color: var(--color-info);
}
.cd-feed-dot--done {
    border-color: var(--color-success);
    color: var(--color-success);
    background: var(--color-success-bg);
}

.cd-feed-content {
    min-width: 0;
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.25rem;
    transition: box-shadow var(--transition-base);
}
.cd-feed-content:hover {
    box-shadow: var(--shadow-sm);
}

.cd-feed-date {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cd-feed-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.35;
}
.cd-feed-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0;
}

.cd-feed-desc p {
    margin-bottom: 5px;
}

.cd-feed-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--border-radius-pill);
    margin-top: 8px;
}
.cd-feed-pill--income {
    background: var(--color-success-bg);
    color: var(--color-success);
}
.cd-feed-pill--expense {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}
.cd-feed-pill--receipt {
    background: var(--bg-body);
    color: var(--color-primary-500);
    border: 1.5px solid var(--color-primary-500);
    text-decoration: none;
    transition: all var(--transition-base);
}
.cd-feed-pill--receipt:hover {
    background: var(--color-primary-500);
    color: #fff;
}

/* Feed Items (rincian pengeluaran per feed) */
.cd-feed-items {
    border-top: 1px solid var(--border-color);
    padding-top: 0.625rem;
    margin-top: 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.cd-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 0.4rem 0.625rem;
    padding-left: 12px;
    border-radius: var(--border-radius-md);
    background: var(--bg-surface-2);
    transition: background var(--transition-base);
}

.cd-feed-item__desc {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.cd-feed-item__desc i {
    color: var(--color-warning);
    margin-right: 4px;
}

.cd-feed-item__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cd-feed-item__amount {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-warning);
}

.cd-feed-item__receipt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    width: auto;
    height: 20px;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    background: var(--bg-body);
    color: var(--color-primary-500);
    font-size: 12px;
    text-decoration: none;
    border: 1px solid var(--color-primary-500);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.cd-feed-item__receipt:hover {
    background: var(--color-primary-600);
    color: #fff;
}

.cd-feed-item__receipt-label {
    font-size: 11px;
    font-weight: 600;
}

.cd-feed-stage {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--color-primary-500);
    background: var(--primary-soft-bg);
    padding: 3px 10px;
    border-radius: var(--border-radius-pill);
    margin-top: 8px;
}

.cd-feed-stage i {
    font-size: 10px;
}

/* Mobile: hapus garis timeline */
@media (max-width: 459.98px) {
    .cd-feed-timeline:not(.empty)::before {
        display: none;
    }

    .cd-feed-dot {
        display: none;
    }

    .cd-feed-item__desc .bi-dot {
        display: none;
    }

    .cd-feed-entry {
        padding-left: 0;
    }

    /* item: stack vertikal harga ke bawah */
    .cd-feed-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .cd-feed-item__right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ── Comments ── */
.cd-comment-form {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.cd-comment-form__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cd-comment-form__title i {
    color: var(--color-primary-500);
}

.cd-comment-textarea {
    width: 100%;
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-family: var(--font-base);
    font-size: 13.5px;
    padding: 10px 14px;
    resize: vertical;
    min-height: 88px;
    outline: none;
    caret-color: var(--color-primary-500);
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        background var(--transition-base);
}
.cd-comment-textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.1);
    background: var(--bg-surface);
}
.cd-comment-textarea::placeholder {
    color: var(--text-muted);
}

.cd-comment-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-base);
    color: #fff;
    background: var(--color-primary-500);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition:
        background var(--transition-base),
        transform 0.1s;
}
.cd-comment-submit:hover {
    background: var(--color-primary-600);
    transform: translateY(-1px);
}

.cd-comment-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.cd-comment-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.cd-comment-count span {
    font-size: 10.5px;
    font-weight: 700;
    background: var(--primary-soft-bg);
    color: var(--color-primary-500);
    padding: 2px 8px;
    border-radius: var(--border-radius-pill);
}
.cd-comment-sort {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-family: var(--font-base);
    font-size: 12.5px;
    padding: 5px 10px;
    cursor: pointer;
    outline: none;
}

.cd-comment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cd-comment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    transition: box-shadow var(--transition-base);
}
.cd-comment:hover {
    box-shadow: var(--shadow-sm);
}

.cd-comment__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-primary-500);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cd-comment__avatar--anon {
    background: var(--primary-soft-bg);
    color: var(--color-primary-400);
}

.cd-comment__body {
    flex: 1;
    min-width: 0;
}
.cd-comment__header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 0;
    flex-wrap: nowrap;
}
.cd-comment__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.cd-comment__donor-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    background: var(--color-success-bg);
    color: var(--color-success);
    padding: 2px 8px;
    border-radius: var(--border-radius-pill);
}
.cd-comment__time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: auto;
    /* Properti untuk Text Truncate */
    min-width: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.cd-comment__text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0;
}
.cd-comment__actions {
    display: flex;
    gap: 12px;
}
.cd-comment__action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-base);
    transition: color var(--transition-base);
}
.cd-comment__action:hover {
    color: var(--color-primary-500);
}

@media (max-width: 459.98px) {
    .cd-comment__avatar {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
}

/* ── SIDEBAR ── */
.cd-sidebar {
    position: sticky;
    top: calc(var(--navbar-height) + 1rem);

    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cd-sidebar::-webkit-scrollbar {
    display: none;
}

/* PENTING: Mencegah kartu di dalam sidebar menyusut/squished saat layar pendek */
.cd-sidebar > div {
    flex-shrink: 0;
}

/* Donate Card */
.cd-donate-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    /* box-shadow: var(--shadow-sm); */
    overflow: hidden;
}
.cd-donate-card__top {
    background: linear-gradient(
        140deg,
        var(--color-primary-600) 0%,
        var(--color-primary-400) 100%
    );
    padding: 1.5rem 1.5rem 1.25rem;
    position: relative;
    overflow: hidden;
}
.cd-donate-card__top::before,
.cd-donate-card__top::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}
.cd-donate-card__top::before {
    width: 180px;
    height: 180px;
    right: -50px;
    top: -60px;
}
.cd-donate-card__top::after {
    width: 120px;
    height: 120px;
    left: -30px;
    bottom: -50px;
}

.cd-donate-card__label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}
.cd-donate-card__amount {
    font-size: 2.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -1.5px;
    position: relative;
    z-index: 1;
}
.cd-donate-card__target {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 5px;
    position: relative;
    z-index: 1;
}
.cd-donate-card__target--open {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.75);
    margin-top: 15px;
}

/* Progress bar */
.cd-progress-wrap {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}
.cd-progress-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-pill);
    height: 8px;
    overflow: hidden;
    margin-bottom: 5px;
}
.cd-progress-fill {
    height: 100%;
    border-radius: var(--border-radius-pill);
    background: #fff;
    transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.cd-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: cd-shimmer 2.2s ease infinite;
}
@keyframes cd-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(250%);
    }
}
.cd-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
}
.cd-progress-pct {
    font-weight: 800;
    color: #fff;
    font-size: 12px;
}

.cd-donate-card__body {
    padding: 1.25rem;
}

/* Stats 2x2 grid */
.cd-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 1.1rem;
}
.cd-stat-box {
    background: var(--bg-surface-2);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: background var(--transition-base);
}
.cd-stat-box:hover {
    background: var(--primary-soft-bg);
}
.cd-stat-box__icon {
    font-size: 14px;
    color: var(--color-primary-500);
    margin-bottom: 2px;
}
[data-theme="dark"] .cd-stat-box__icon {
    color: var(--color-primary-400);
}
.cd-stat-box__val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.cd-stat-box__label {
    font-size: 10.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Deadline strip */
.cd-deadline {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-warning-bg);
    border: 1px solid rgba(186, 117, 23, 0.2);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    margin-bottom: 1.1rem;
    font-size: 12.5px;
    color: var(--color-warning);
    font-weight: 500;
}
.cd-deadline i {
    font-size: 14px;
    flex-shrink: 0;
}
.cd-deadline strong {
    font-weight: 800;
}

/* CTA buttons */
.cd-btn-donate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-base);
    color: #fff;
    background: var(--color-primary-500);
    border: none;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 8px;
    box-shadow: 0 4px 16px rgba(15, 110, 86, 0.3);
    transition:
        background var(--transition-base),
        transform 0.15s,
        box-shadow var(--transition-base);
}
.cd-btn-donate:hover {
    background: var(--color-primary-600);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(15, 110, 86, 0.4);
}
/* Styling ketika tombol donasi di-lock/disable */
.cd-btn-donate:disabled {
    background: var(--bg-surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none; /* Mencegah efek hover jalan */
    transform: none;
}

.cd-btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 42px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-base);
    color: var(--text-secondary);
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}
.cd-btn-share:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
    border-color: var(--bg-surface-2);
}

/* Recent donors card */
.cd-donors-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    /* box-shadow: var(--shadow-sm); */
}
.cd-donors-card__head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.cd-donors-card__head i {
    color: var(--color-primary-500);
}

.cd-donor {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 1.25rem;
    transition: background var(--transition-base);
}
.cd-donor:hover {
    background: var(--bg-surface-2);
}
.cd-donor__av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary-500);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cd-donor__av--anon {
    background: var(--primary-soft-bg);
    color: var(--color-primary-400);
}
.cd-donor__info {
    flex: 1;
    min-width: 0;
}
.cd-donor__name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cd-donor__time {
    font-size: 11px;
    color: var(--text-secondary);
}
.cd-donor__amount {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--color-primary-500);
    white-space: nowrap;
}

/* Clickable indicator untuk .cd-donor */
.cd-donor.clickable {
    cursor: pointer;
    position: relative;
}

.cd-donor.clickable::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary-500);
    border-radius: 0 3px 3px 0;
    transform: scaleY(0);
    transition: transform 0.18s ease;
}

.cd-donor.clickable:hover::before {
    transform: scaleY(1);
}

.cd-donor.clickable:hover .cd-donor__chevron {
    transform: translateX(3px);
    color: var(--color-primary-500);
}

.cd-donor__chevron {
    flex-shrink: 0;
    color: var(--border-color);
    font-size: 12px;
    transition: transform 0.18s ease, color 0.18s ease;
    margin-left: 2px;
}

[data-theme="dark"] .cd-donor__chevron {
    color: var(--color-gray-600);
}

[data-theme="dark"] .cd-donor__amount {
    color: var(--color-primary-400);
}

/* ── Mobile Donate Bar (fixed bottom) ── */
.cd-mobile-bar {
    display: none;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    height: 65px;
    min-height: 65px;
    max-height: 65px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.cd-mobile-bar__inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cd-mobile-bar__info {
    flex: 1;
    min-width: 0;
}
.cd-mobile-bar__collected {
    font-size: 14px;
    font-weight: 800;
    color: var(--color-primary-500);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}
[data-theme="dark"] .cd-mobile-bar__collected {
    color: var(--color-primary-400);
}
.cd-mobile-bar__pct {
    font-size: 11px;
    margin-top: 4px;
    color: var(--text-secondary);
}
.cd-mobile-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-base);
    color: #fff;
    background: var(--color-primary-500);
    border: none;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(15, 110, 86, 0.35);
    transition: background var(--transition-base);
}
.cd-mobile-bar__btn:hover {
    background: var(--color-primary-600);
    color: #fff;
    text-decoration: none;
}
.cd-mobile-bar__share {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-base);
}
.cd-mobile-bar__share:hover {
    background: var(--primary-soft-bg);
    color: var(--color-primary-500);
}

/* ── Related Articles Section ── */
.cd-related {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0 4rem;
}
.cd-related__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.cd-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* ── Responsive ── */
@media (max-width: 1199.98px) {
    .cd-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 1.5rem;
    }
}

@media (max-width: 991.98px) {
    .cd-layout {
        grid-template-columns: 1fr;
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
    .cd-sidebar {
        position: static;
        top: auto;
    }
    .cd-mobile-bar {
        display: block;
    }
    /* Sembunyikan donate card di mobile, pakai fixed bar */
    .cd-btn-donate,
    .cd-btn-share {
        display: none;
    }

    .cd-deadline {
        margin-bottom: 0;
    }
    .cd-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .cd-hero {
        padding-top: calc(var(--navbar-height) + 1rem);
    }
    .cd-title {
        font-size: 1.35rem;
    }
    .cd-meta-row {
        gap: 0.75rem;
    }
    .cd-tab-btn {
        padding: 9px 12px;
        font-size: 12.5px;
    }
    .cd-feed-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .cd-gallery-grid {
        grid-auto-rows: 120px;
    }
    .cd-gallery-grid__item:first-child {
        grid-column: span 2;
    }
}

@media (max-width: 575.98px) {
    .cd-layout {
        gap: 2.5rem;
    }
    .cd-thumb-wrap {
        border-radius: var(--border-radius-lg);
        margin-bottom: 1.25rem;
    }
    .cd-title {
        font-size: 1.2rem;
        letter-spacing: -0.3px;
    }
    .cd-meta-row {
        gap: 0.6rem;
        padding-bottom: 1rem;
        margin-bottom: 0;
    }
    .cd-meta-item {
        font-size: 11.5px;
    }
    .cd-tabs {
        /* margin-bottom: 1.25rem; */
    }
    .cd-tab-btn {
        padding: 8px 10px;
        font-size: 12px;
        gap: 4px;
    }
    .cd-story {
        font-size: 14px;
    }
    .cd-stage__card {
        padding: 1rem;
    }
    .cd-stage__name {
        font-size: 13px;
    }
    .cd-gallery-grid {
        gap: 7px;
        grid-auto-rows: 100px;
    }
    .cd-lightbox__prev {
        left: 10px;
    }
    .cd-lightbox__next {
        right: 10px;
    }
    .cd-lightbox__nav {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
    .cd-feed-summary {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
    }
    .cd-comment {
        padding: 0.875rem 1rem;
    }
    .cd-related {
        padding: 2.5rem 0 3rem;
    }
    .cd-related__grid {
        grid-template-columns: 1fr;
    }
    /* Donors card masih tampil di mobile (bawah konten) */
    .cd-donors-card {
        margin-top: 0;
    }
    /* Recent donors card tetap visible */
    .cd-mobile-bar__btn {
        padding: 0 16px;
        font-size: 13.5px;
    }
}


/* ─── Empty State ─────────────────────────────────────────── */
.don-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.don-empty__icon {
    font-size: 2.5rem;
    color: var(--border-color);
    margin-bottom: 0.75rem;
    line-height: 1;
}

.don-empty__title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.don-empty__sub {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin: 0;
}

/* ─── Donation List ───────────────────────────────────────── */
.don-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.don-item {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

/* Avatar */
.don-item__avatar {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--color-primary-500);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1;
}

.don-item__avatar--anon {
    background: var(--primary-soft-bg);
    color: var(--color-primary-500);
}

/* Info block */
.don-item__info {
    min-width: 0;
    flex: 1;
}

.don-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0;
}

.don-item__name {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.don-item__name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.don-item__anon-badge {
    font-size: var(--font-size-xs);
    font-weight: 500;
    background: var(--bg-surface-2);
    color: var(--text-muted);
    padding: 0.1em 0.45em;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}

.don-item__amount {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.don-item__amount strong {
    font-weight: 700;
    color: var(--color-primary-500);
}

[data-theme="dark"] .don-item__amount strong {
    color: var(--color-primary-400);
}

.don-item__bottom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

/* Source badge */
.don-item__source {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15em 0.5em;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    line-height: 1.6;
}

.don-item__source--online {
    background: var(--primary-soft-bg);
    color: var(--color-primary-400);
}

.don-item__source--offline {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.don-item__time {
    margin-left: auto;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    min-width: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Message */
.don-item__message {
    margin: 0.4rem 0 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-style: italic;
    display: flex;
    gap: 0.3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.don-item__message .bi {
    flex-shrink: 0;
    margin-top: 0.1em;
    opacity: 0.5;
    font-style: normal;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .don-item__top {
        flex-wrap: wrap;
    }

    .don-item__avatar {
        /* width: 2rem;
        height: 2rem;
        font-size: 0.75rem; */
        display: none;
    }
}

/* ─── Donations: Pagination ───────────────────────────────── */
.don-pagination {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.cd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.cd-pagination__pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cd-pagination__btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface, #fff);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-family: var(--font-base);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1;
}

.cd-pagination__btn:hover:not(:disabled) {
    background: var(--bg-surface-2);
    border-color: var(--color-primary-400, #1d9e75);
    color: var(--text-primary);
}

.cd-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cd-pagination__btn--active {
    background: var(--color-primary-500, #0f6e56);
    border-color: var(--color-primary-500, #0f6e56);
    color: #fff;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}

[data-theme="dark"] .cd-pagination__btn--active {
    background: var(--primary-soft-color);
    border-color: var(--primary-soft-color);
    color: #0d1117;
}

.cd-pagination__ellipsis {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ── Viewport protection < 320px ── */
@media (max-width: 319.98px) {

    /* Pastikan page tidak overflow horizontal */
    .cd-page,
    .cd-hero,
    .cd-layout,
    .cd-main,
    .cd-sidebar {
        min-width: 0;
        overflow-x: hidden;
    }

    /* Hero padding minimal */
    .cd-hero {
        padding-top: calc(var(--navbar-height) + 0.75rem);
    }

    /* Tab btn lebih kecil & scrollable */
    .cd-tab-btn {
        padding: 7px 8px;
        font-size: 11px;
        gap: 3px;
    }

    /* Don item: stack avatar hilang, info full width */
    .don-item {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .don-item__avatar {
        display: none;
    }

    .don-item__top {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* Feed summary: 1 kolom */
    .cd-feed-summary {
        grid-template-columns: repeat(2, 1fr);
        padding: 0.75rem;
        gap: 8px;
    }

    /* Stats grid: 1 kolom */
    .cd-stats-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery: 2 kolom */
    .cd-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 90px;
    }

    .cd-gallery-grid__item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }

    /* Mobile bar lebih compact */
    .cd-mobile-bar__btn {
        padding: 0 12px;
        font-size: 12px;
    }
}
