/* ═══════════════════════════════════════════════════
   CAMPAIGN DETAIL PAGE — v2
═══════════════════════════════════════════════════ */

@keyframes rh-fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
@keyframes rh-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

/* ── Breadcrumb ── */
.cd-breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: #9CA3AF;
    margin-bottom: 1.2rem;
    /* Một dòng: tên chiến dịch dài tự cắt "..." thay vì rơi xuống hàng 2 (vỡ trên mobile/WebView app). */
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}
.cd-breadcrumb a {
    color: #6B7280;
    transition: color .15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.cd-breadcrumb a:hover { color: #F97316; }
.cd-breadcrumb .sep { color: #D1D5DB; flex-shrink: 0; }
.cd-breadcrumb span:last-child {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ── Page layout ── */
.cd-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}
@media (min-width: 901px) {
    .cd-layout {
        grid-template-columns: 1fr 390px;
        gap: 1.2rem;
    }
}
/* Màn rộng: nới thêm cho form đăng ký livestream (radio 2 cột + input giờ) đỡ chật. */
@media (min-width: 1400px) {
    .cd-layout {
        grid-template-columns: 1fr 430px;
    }
}

/* ── Hero card ── */
.cd-hero {
    background: #fff;
    border: 1.5px solid var(--border, #E5E7EB);
    border-radius: 1.25rem;
    overflow: hidden;
    animation: rh-fadeUp .3s ease;
    max-width: 100%;
}
@media (max-width: 540px) {
    .cd-hero {
        border-radius: 1rem;
    }
}
.cd-hero-thumb {
    aspect-ratio: 2 / 1;
    position: relative;
    overflow: hidden;
}
.cd-hero-thumb-bg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem;
}
.cd-hero-thumb-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.42) 0%, transparent 55%);
}
.cd-hero-thumb-bottom {
    position: absolute; bottom: .9rem; left: 1rem; right: 1rem;
    display: flex; align-items: center; justify-content: space-between;
}
.cd-org-chip {
    background: rgba(255,255,255,.92);
    border-radius: .55rem;
    padding: .3rem .75rem;
    font-size: .78rem; font-weight: 800; color: #111827;
    backdrop-filter: blur(4px);
    display: flex; align-items: center; gap: .35rem;
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── Title area ── */
.cd-body { padding: 1.2rem 1.3rem; }
.cd-title {
    font-weight: 900;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.25;
    color: #111827;
    margin-bottom: .6rem;
    letter-spacing: -.3px;
}
.cd-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.cd-tag {
    display: inline-flex; align-items: center; gap: .28rem;
    background: #FFF7ED; color: #C2410C;
    border-radius: 99px; font-size: .72rem; font-weight: 700;
    padding: .2rem .65rem;
}
.cd-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .65rem;
    margin-bottom: 1.1rem;
}
@media (max-width: 540px) {
    .cd-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
    }
}
@media (max-width: 359px) {
    .cd-info-grid {
        grid-template-columns: 1fr;
    }
}
.cd-info-cell {
    background: #F9FAFB;
    border: 1px solid #F3F4F6;
    border-radius: .65rem;
    padding: .65rem .8rem;
    min-width: 0; /* Prevent overflow */
    overflow: hidden;
}
.cd-info-cell .lbl {
    font-size: .67rem; font-weight: 800; color: #9CA3AF;
    text-transform: uppercase; letter-spacing: .6px; margin-bottom: .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cd-info-cell .val {
    font-size: .88rem; font-weight: 700; color: #111827;
    word-break: break-word;
}
.cd-info-cell .val.accent { color: #F97316; font-size: 1rem; }
@media (max-width: 540px) {
    .cd-info-cell {
        padding: .55rem .65rem;
    }
    .cd-info-cell .lbl {
        font-size: .64rem;
        letter-spacing: .4px;
    }
    .cd-info-cell .val {
        font-size: .82rem;
    }
    .cd-info-cell .val.accent {
        font-size: .92rem;
    }
}

/* ── Progress bar ── */
.cd-prog-section { margin-bottom: 1.1rem; }
.cd-prog-top {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .35rem; font-size: .8rem;
}
.cd-prog-top .pct { font-weight: 800; }
.cd-prog-bar {
    height: 7px; background: #F3F4F6; border-radius: 99px; overflow: hidden;
}
.cd-prog-fill {
    height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, #F97316, #F59E0B);
    transition: width .6s ease;
}

/* ── Unlimited campaign: dual-stat + completion bar ── */
.cd-prog-unlimited { margin-bottom: 1.1rem; }
.cd-prog-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem;
}
.cd-prog-stat {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: .4rem;
    padding: .65rem .45rem;
    background: #FFFFFF;
    border: 1px solid #F3F4F6;
    border-radius: .7rem;
}
.cd-prog-stat-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.cd-prog-stat-num { font-size: 1.35rem; font-weight: 800; line-height: 1.1; color: #111827; }
.cd-prog-stat-label { font-size: .78rem; color: #6B7280; margin-top: .05rem; }
.cd-prog-unlimited-caption {
    margin-top: .55rem; font-size: .78rem; color: #9CA3AF;
}

/* ── Brief link ── */
.cd-brief-link {
    display: inline-flex; align-items: center; gap: .4rem;
    background: #EEF2FF; color: #4338CA;
    border: 1px solid #C7D2FE;
    border-radius: .55rem;
    padding: .45rem .9rem;
    font-size: .82rem; font-weight: 700;
    transition: all .15s;
    text-decoration: none;
    margin-bottom: 1.1rem;
}
.cd-brief-link:hover { background: #E0E7FF; color: #3730A3; }

/* SKU sản phẩm (camp livestream) */
.cd-sku-box {
    background: #FFF7ED; border: 1px solid #FED7AA;
    border-radius: .7rem; padding: .7rem .9rem; margin-bottom: 1rem;
}
.cd-sku-label {
    font-size: .7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .4px; color: #C2410C;
}
.cd-sku-head {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    justify-content: space-between; margin-bottom: .4rem;
}
.cd-sku-count {
    background: #FFEDD5; color: #9A3412; border-radius: 999px;
    padding: .05rem .4rem; font-size: .65rem; font-weight: 700;
}
/* Mỗi SKU/link một dòng: dán vào giỏ live phải giữ nguyên xuống dòng mới nhận đủ. */
.cd-sku-list { display: flex; flex-direction: column; gap: .3rem; }
.cd-sku-line {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8rem; font-weight: 600; color: #111827;
    background: #fff; border: 1px solid #FFE3C2; border-radius: .4rem;
    padding: .25rem .45rem; word-break: break-all; user-select: all;
}
.cd-sku-copy {
    background: #fff; color: #C2410C; border: 1px solid #FDBA74;
    border-radius: .45rem; padding: .25rem .65rem; font-size: .75rem; font-weight: 700;
}
.cd-sku-copy:hover { background: #FFEDD5; }

/* Login hint for guests - premium card design */
.cd-login-hint {
    background: linear-gradient(145deg, #FEFCE8 0%, #FEF3C7 50%, #FFF7ED 100%);
    border: 1.5px solid #FDE68A;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cd-login-hint::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(251,191,36,.08) 0%, transparent 50%);
    pointer-events: none;
}
.cd-login-hint-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(245,158,11,.25);
    position: relative;
}
.cd-login-hint-icon i {
    font-size: 1.6rem;
    color: #fff;
}
.cd-login-hint-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px dashed #FCD34D;
    border-radius: 50%;
    opacity: .5;
}
.cd-login-hint-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #92400E;
    margin-bottom: .5rem;
    letter-spacing: -.2px;
}
.cd-login-hint-desc {
    font-size: .88rem;
    color: #A16207;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.cd-login-hint-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: #fff;
    border: none;
    border-radius: .65rem;
    padding: .7rem 1.5rem;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(249,115,22,.3);
    transition: all .2s ease;
}
.cd-login-hint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(249,115,22,.4);
    color: #fff;
}
.cd-login-hint-btn i {
    font-size: 1rem;
}
.cd-login-hint-note {
    font-size: .75rem;
    color: #B45309;
    margin-top: 1rem;
    opacity: .8;
}
.cd-login-hint-note i {
    margin-right: .25rem;
}

/* ── Tabs ── */
.cd-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1.5px solid #E5E7EB;
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.cd-tabs::-webkit-scrollbar { display: none; }
.cd-tab {
    padding: .6rem 1.1rem;
    font-size: .84rem;
    font-weight: 700;
    color: #6B7280;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    transition: color .15s, border-color .15s;
    display: flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.cd-tab:hover { color: #F97316; }
.cd-tab.active { color: #F97316; border-bottom-color: #F97316; }
.cd-tab-pane {
    display: none;
    padding: 1rem;
    border: 1.5px solid #E5E7EB;
    border-top: none;
    border-radius: 0 0 .8rem .8rem;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}
.cd-tab-pane.active { display: block; animation: rh-fadeUp .22s ease; }
@media (max-width: 540px) {
    .cd-tab {
        padding: .55rem .85rem;
        font-size: .8rem;
        min-height: 44px;
    }
    .cd-tab-pane {
        padding: .85rem;
    }
}

/* Description content */
.cd-desc-content {
    font-size: .9rem;
    line-height: 1.7;
    color: #374151;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}
.cd-desc-content p { margin-bottom: .65rem; }
.cd-desc-content p.rh-empty-paragraph { margin: 0; padding: 0; line-height: 1; }
.cd-desc-content img {
    max-width: 100%;
    border-radius: .5rem;
    margin: .5rem 0;
}
.cd-desc-content h1, .cd-desc-content h2, .cd-desc-content h3 {
    margin-top: 1rem;
    margin-bottom: .5rem;
    font-weight: 700;
    color: #111827;
}
.cd-desc-content ul, .cd-desc-content ol {
    padding-left: 1.5rem;
    margin-bottom: .75rem;
}
.cd-desc-content a {
    color: #F97316;
    text-decoration: underline;
    overflow-wrap: break-word;
    word-break: break-all;
}

/* Tab content */
.cd-req-list { list-style: none; padding: 0; margin: 0; }
.cd-req-list li {
    display: flex; align-items: flex-start; gap: .55rem;
    padding: .5rem 0; border-bottom: 1px solid #F3F4F6;
    font-size: .87rem; color: #4B5563; line-height: 1.6;
}
.cd-req-list li:last-child { border-bottom: none; }
.cd-req-list li .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #F97316; flex-shrink: 0; margin-top: 7px;
}
.cd-flow-step {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    margin-bottom: .85rem;
}
.cd-flow-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #F97316;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .74rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.cd-flow-content {
    min-width: 0;
    flex: 1;
}
.cd-flow-content strong {
    font-size: .86rem;
    display: block;
    margin-bottom: .18rem;
    color: #F97316;
    word-break: break-word;
}
.cd-flow-content p {
    font-size: .8rem;
    color: #6B7280;
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
}
.cd-flow-line {
    width: 1px;
    background: #FED7AA;
    margin: 0 12px;
    height: 14px;
}
.cd-support-box {
    background: #FFF7ED;
    border: 1.5px solid #FED7AA;
    border-radius: .75rem;
    padding: 1rem 1.1rem;
    font-size: .87rem; color: #92400E; line-height: 1.7;
    overflow-wrap: break-word;
    word-break: break-word;
}
.cd-support-box strong { color: #7C2D12; display: block; margin-bottom: .5rem; }
.cd-support-box a { color: #F97316; font-weight: 700; word-break: break-all; }

/* ── Sticky sidebar ── */
.cd-sidebar {
    position: static;
    width: 100%;
}
@media (min-width: 901px) {
    .cd-sidebar {
        position: sticky;
        top: 80px;
    }
}
.cd-action-card {
    background: #fff;
    border: 1.5px solid var(--border, #E5E7EB);
    border-radius: 1.1rem;
    overflow: hidden;
    animation: rh-fadeUp .35s ease both .1s;
}
.cd-action-head {
    background: linear-gradient(135deg, #1E2D6B, #2D3A8C);
    padding: 1.1rem 1.2rem;
}
.cd-action-head h5 {
    font-weight: 900;
    color: #fff;
    font-size: .98rem;
    margin-bottom: .3rem;
}
.cd-action-head p {
    font-size: .78rem;
    color: rgba(255,255,255,.65);
    margin: 0;
}
.cd-action-body {
    padding: 1.1rem 1.2rem;
}
@media (max-width: 540px) {
    .cd-action-head {
        padding: .95rem 1rem;
    }
    .cd-action-head h5 {
        font-size: .92rem;
    }
    .cd-action-body {
        padding: .5rem;
    }
}
.cd-reward-display {
    text-align: center;
    padding: .9rem;
    background: #FFF7ED;
    border-radius: .75rem;
    margin-bottom: 1rem;
}
.cd-reward-display .rnum {
    font-size: 1.6rem; font-weight: 900; color: #F97316;
    line-height: 1; display: block;
}
.cd-reward-display .rlbl { font-size: .72rem; color: #9CA3AF; margin-top: .2rem; font-weight: 600; }
/* Livestream hiện KHOẢNG giá ("10.000 đ – 20.000 đ") — dài gấp đôi số đơn, hạ cỡ chữ cho khỏi tràn. */
.cd-reward-display.is-range .rnum { font-size: 1.15rem; }
.cd-action-metas {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
}
.cd-action-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .83rem;
    gap: .5rem;
    flex-wrap: wrap;
}
.cd-action-meta-row .al {
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
}
.cd-action-meta-row .ar {
    font-weight: 700;
    color: #111827;
    text-align: right;
    word-break: break-word;
    min-width: 0;
}
@media (max-width: 540px) {
    .cd-action-meta-row {
        font-size: .8rem;
    }
}
.btn-apply {
    width: 100%;
    background: #F97316;
    color: #fff;
    border: none;
    border-radius: .75rem;
    padding: .85rem;
    font-size: .95rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all .18s;
    box-shadow: 0 4px 16px rgba(249,115,22,.3);
    display: flex; align-items: center; justify-content: center; gap: .45rem;
}
.btn-apply:hover { background: #EA580C; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(249,115,22,.4); }
.btn-apply:disabled { background: #D1D5DB; box-shadow: none; transform: none; cursor: not-allowed; color: #6B7280; }
.cd-login-note {
    background: #EEF2FF; color: #4338CA;
    border-radius: .65rem; padding: .8rem 1rem;
    font-size: .82rem; font-weight: 600;
    display: flex; align-items: center; gap: .5rem;
    text-decoration: none; transition: background .15s;
    width: 100%; justify-content: center;
}
.cd-login-note:hover { background: #E0E7FF; color: #3730A3; }
.cd-apply-note {
    font-size: .74rem; color: #9CA3AF; text-align: center; margin-top: .65rem;
    display: flex; align-items: center; justify-content: center; gap: .3rem;
}

/* ── Onboarding gate ── */
.cd-onboard-gate {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFFBEB 100%);
    border: 1.5px solid #FED7AA;
    border-radius: .85rem;
    padding: 1rem 1.1rem;
    text-align: center;
    animation: rh-fadeUp .25s ease;
}
.cd-onboard-gate-icon {
    font-size: 1.8rem;
    margin-bottom: .4rem;
}
.cd-onboard-gate-title {
    font-weight: 800;
    font-size: .92rem;
    color: #92400E;
    margin-bottom: .6rem;
}
.cd-onboard-gate-progress {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .6rem;
}
.cd-onboard-gate-progress span {
    font-size: .75rem;
    font-weight: 700;
    color: #B45309;
    white-space: nowrap;
}
.cd-onboard-gate-bar {
    flex: 1;
    height: 6px;
    background: #FDE68A;
    border-radius: 99px;
    overflow: hidden;
}
.cd-onboard-gate-fill {
    height: 100%;
    background: linear-gradient(90deg, #F97316, #F59E0B);
    border-radius: 99px;
    transition: width .4s ease;
}
.cd-onboard-gate-next {
    font-size: .8rem;
    color: #78350F;
    margin-bottom: .75rem;
}
.cd-onboard-gate-next strong {
    color: #92400E;
}
.cd-onboard-gate-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #F97316;
    color: #fff;
    border-radius: .6rem;
    padding: .55rem 1.1rem;
    font-size: .85rem;
    font-weight: 800;
    text-decoration: none;
    transition: all .15s;
}
.cd-onboard-gate-btn:hover {
    background: #EA580C;
    color: #fff;
    transform: translateY(-1px);
}
@media (max-width: 540px) {
    .cd-onboard-gate {
        padding: .85rem;
    }
    .cd-onboard-gate-icon {
        font-size: 1.5rem;
    }
    .cd-onboard-gate-title {
        font-size: .85rem;
    }
    .cd-onboard-gate-next {
        font-size: .76rem;
    }
    .cd-onboard-gate-btn {
        font-size: .8rem;
        padding: .5rem .95rem;
    }
}

/* ── Success alert ── */
.cd-success {
    background: #D1FAE5; border: 1.5px solid #6EE7B7;
    border-radius: .75rem; padding: .9rem 1rem;
    color: #065F46; font-size: .88rem; font-weight: 600;
    display: flex; align-items: flex-start; gap: .6rem;
    animation: rh-fadeUp .25s ease;
}
.cd-success a { color: #059669; font-weight: 700; }
.cd-error {
    background: #FEE2E2; border: 1.5px solid #FECACA;
    border-radius: .75rem; padding: .75rem 1rem;
    color: #991B1B; font-size: .85rem; font-weight: 600;
    display: flex; align-items: center; gap: .5rem;
    animation: rh-fadeUp .25s ease;
}

/* ── Registered status ── */
.cd-registered {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border: 1.5px solid #34D399;
    border-radius: .85rem;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    animation: rh-fadeUp .25s ease;
}
.cd-registered-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #059669;
    color: #fff;
    border-radius: 99px;
    padding: .35rem .9rem;
    font-size: .82rem;
    font-weight: 800;
    align-self: flex-start;
}
.cd-registered-badge i { font-size: .95rem; }
/* Màu khung + badge theo trạng thái đơn (RioApplicationStatus tone); green giữ mặc định ở trên */
.cd-registered--blue   { background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%); border-color: #60A5FA; }
.cd-registered--blue .cd-registered-badge   { background: #2563EB; }
.cd-registered--orange { background: linear-gradient(135deg, #FFF7ED 0%, #FED7AA 100%); border-color: #FB923C; }
.cd-registered--orange .cd-registered-badge { background: #F97316; }
.cd-registered--red    { background: linear-gradient(135deg, #FEF2F2 0%, #FECACA 100%); border-color: #F87171; }
.cd-registered--red .cd-registered-badge    { background: #DC2626; }
.cd-registered--gray   { background: linear-gradient(135deg, #F9FAFB 0%, #E5E7EB 100%); border-color: #9CA3AF; }
.cd-registered--gray .cd-registered-badge   { background: #4B5563; }
.cd-registered-info {
    font-size: .88rem;
    color: #065F46;
    font-weight: 600;
}
.cd-registered-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    color: #059669;
    border: 1.5px solid #34D399;
    border-radius: .55rem;
    padding: .5rem .9rem;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .15s;
    align-self: flex-start;
}
.cd-registered-link:hover {
    background: #ECFDF5;
    color: #047857;
}

/* ── Skeleton ── */
.rh-skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #EBEBEB 50%, #F3F4F6 75%);
    background-size: 1200px 100%;
    animation: rh-shimmer 1.4s infinite;
    border-radius: .5rem;
}

/* ═══════════════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES
═══════════════════════════════════════════════════ */

/* Hero card mobile */
@media (max-width: 540px) {
    .cd-hero-thumb-bg {
        font-size: 3.5rem;
    }
    .cd-hero-thumb-bottom {
        bottom: .7rem;
        left: .75rem;
        right: .75rem;
        flex-wrap: wrap;
        gap: .4rem;
    }
    .cd-org-chip {
        padding: .25rem .6rem;
        font-size: .72rem;
        max-width: 150px;
    }
    .cd-body {
        padding: 0.5rem;
    }
    .cd-title {
        font-size: 1.1rem;
        margin-bottom: .5rem;
    }
    .cd-tags {
        gap: .3rem;
        margin-bottom: .7rem;
    }
    .cd-tag {
        font-size: .68rem;
        padding: .18rem .55rem;
    }
}

/* Very small phones */
@media (max-width: 359px) {
    .cd-hero-thumb-bg {
        font-size: 2.8rem;
    }
    .cd-body {
        padding: .85rem;
    }
    .cd-title {
        font-size: 1rem;
    }
    .cd-org-chip {
        max-width: 120px;
        font-size: .68rem;
    }
}

/* Breadcrumb mobile */
@media (max-width: 540px) {
    .cd-breadcrumb {
        font-size: .75rem;
        margin-bottom: 1rem;
    }
    /* Chỉ giữ icon loa ở mục cha, nhường chỗ cho tên chiến dịch. */
    .cd-breadcrumb .crumb-label { display: none; }
    .cd-breadcrumb a .bi { margin-right: 0 !important; }
}

/* Support box mobile */
@media (max-width: 540px) {
    .cd-support-box {
        padding: .85rem;
        font-size: .82rem;
    }
}

/* Brief link mobile */
@media (max-width: 540px) {
    .cd-brief-link {
        font-size: .78rem;
        padding: .4rem .75rem;
    }
}

/* Registered status mobile */
@media (max-width: 540px) {
    .cd-registered {
        padding: .85rem;
    }
    .cd-registered-badge {
        font-size: .78rem;
        padding: .3rem .75rem;
    }
    .cd-registered-info {
        font-size: .82rem;
    }
    .cd-registered-link {
        font-size: .78rem;
        padding: .45rem .75rem;
    }
}

/* Progress section mobile */
@media (max-width: 540px) {
    .cd-prog-top {
        font-size: .75rem;
    }
    .cd-prog-stats { gap: .4rem; }
    .cd-prog-stat { padding: .55rem .3rem; gap: .3rem; }
    .cd-prog-stat-icon { width: 30px; height: 30px; font-size: .9rem; }
    .cd-prog-stat-num { font-size: 1.05rem; }
    .cd-prog-stat-label { font-size: .66rem; line-height: 1.2; }
}

/* Button mobile */
@media (max-width: 540px) {
    .btn-apply {
        padding: .75rem;
        font-size: .9rem;
        min-height: 48px;
    }
}

/* Reward display mobile */
@media (max-width: 540px) {
    .cd-reward-display {
        padding: .75rem;
    }
    .cd-reward-display .rnum {
        font-size: 1.4rem;
    }
}

/* Flow steps mobile */
@media (max-width: 540px) {
    .cd-flow-step {
        gap: .65rem;
    }
    .cd-flow-num {
        width: 24px;
        height: 24px;
        font-size: .7rem;
    }
    .cd-flow-content strong {
        font-size: .82rem;
    }
    .cd-flow-content p {
        font-size: .76rem;
    }
}

/* Requirements list mobile */
@media (max-width: 540px) {
    .cd-req-list li {
        font-size: .82rem;
        padding: .4rem 0;
    }
}

/* Skeleton layout mobile */
@media (max-width: 900px) {
    #skeleton-layout {
        grid-template-columns: 1fr !important;
    }
    #skeleton-layout > div:last-child {
        display: none;
    }
}
@media (max-width: 540px) {
    #skeleton-layout .rh-skeleton[style*="height:220px"] {
        height: 180px !important;
    }
    #skeleton-layout .d-flex.gap-2 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: .5rem !important;
    }
    #skeleton-layout .d-flex.gap-2 .rh-skeleton {
        height: 50px !important;
    }
}

/* ── Suggested campaigns section ── */
.cd-sug-wrap {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1.5px solid #F3F4F6;
}
.cd-sug-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 1rem;
}
.cd-sug-title i { color: #F97316; }

/* ════════════════════════════════════════════════════════════════════
   Mobile ≤575.98px — thang chuẩn phase 02.
   Đặt Ở CUỐI FILE có chủ ý: file này đã có 15 block @media 540px rải rác,
   chen thêm vào giữa là chắc chắn sửa chồng chéo. Cuối file cũng bảo đảm
   thắng cascade mà không phải nống specificity.
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
    /* 3 ô số liệu ở 390px chỉ còn 119px/ô, trong khi nhãn dài nhất là
       "Số lượng mục tiêu" (17 ký tự) ⇒ vỡ 3 dòng. Hạ 2 cột, ô cuối span
       hết hàng để không lẻ nửa hàng (cùng cách xử lý như .ch-stats). */
    .cd-prog-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .cd-prog-stat:last-child {
        grid-column: span 2;
    }

    /* `1fr` mặc định là `minmax(auto, 1fr)`, và `auto` ở đây = min-content của nội
       dung ⇒ track PHỒNG TO HƠN khung chứa khi bên trong có chuỗi không ngắt được
       (tên công ty dài, mã đơn). Đo 11/09 @390px: khung 374px nhưng track 386.9px
       ⇒ 4 phần tử lồng nhau thò ra 5px. `minmax(0, 1fr)` cho track co lại được.
       Cùng họ với bug đã biết ở /admin/organizations. */
    .cd-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Sàn cỡ chữ: đo 11/09 @390px các nhãn dưới đây rơi 10.2–11.5px.
       `--fs-xs` (≈12.5px) là sàn cố ý của dự án (riohub-theme.css:600).
       Đây là nhãn "Thù lao / Hạn đăng ký / Số bài" — thông tin người ta mở
       trang này để đọc, không phải chữ trang trí. */
    .cd-tag,
    .cd-flow-num,
    .cd-info-cell .lbl,
    .cd-prog-stat-label,
    .cd-reward-display .rlbl,
    .cd-apply-note,
    /* Tên brand + huy hiệu trạng thái nằm ĐÈ LÊN ẢNH bìa — nền nhiễu nên chữ nhỏ
       ở đây khó đọc hơn chữ nhỏ trên nền trắng. */
    .cd-org-chip,
    #cd-status-badge {
        font-size: var(--fs-xs);
    }
}

/* Span bên trong huy hiệu trạng thái do JS sinh kèm INLINE style
   `font-size:.72rem` (campaign-detail-page.js → statusBadge()). Inline thắng mọi
   selector không có !important, nên đây là chỗ bắt buộc dùng — cùng lý do phase 06
   phải dùng cho control có style="width:auto". Plan cấm sửa JS ở phase này. */
@media (max-width: 575.98px) {
    #cd-status-badge span {
        font-size: var(--fs-xs) !important;
    }
}
