/* ── Library Page ── */
.dg-pdf-library {
    padding: 10px 0;
}
.dg-pdf-filters {
    margin-bottom: 20px;
}
.dg-pdf-filter-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.dg-pdf-filter-form select,
.dg-pdf-filter-form input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #c4a05a;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #3a2a0a;
}
.dg-pdf-filter-form select {
    min-width: 180px;
}
.dg-pdf-filter-form input[type="text"] {
    flex: 1;
    min-width: 160px;
}
.dg-pdf-filter-form button {
    padding: 8px 20px;
    background: #c4a05a;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.dg-pdf-filter-form button:hover {
    background: #8b7d3c;
}
.dg-pdf-count {
    color: #888;
    font-size: 13px;
    margin-top: 8px;
}
.dg-pdf-empty {
    text-align: center;
    color: #888;
    padding: 40px 0;
}

/* ── PDF Grid ── */
.dg-pdf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.dg-pdf-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e8dcc8;
    border-radius: 8px;
    background: #fdfbf7;
    transition: border-color 0.2s;
}
.dg-pdf-card:hover {
    border-color: #c4a05a;
}
.dg-pdf-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}
.dg-pdf-card-info {
    flex: 1;
    min-width: 0;
}
.dg-pdf-card-info h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.3;
}
.dg-pdf-card-info h3 a {
    color: #3a2a0a;
    text-decoration: none;
}
.dg-pdf-card-info h3 a:hover {
    color: #c4a05a;
}
.dg-pdf-cat {
    display: inline-block;
    background: #E2C080;
    color: #3a2a0a;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
}
.dg-pdf-desc {
    color: #666;
    font-size: 13px;
    margin: 4px 0;
    line-height: 1.4;
}
.dg-pdf-meta {
    display: flex;
    gap: 16px;
    color: #888;
    font-size: 12px;
    margin-top: 6px;
}

/* ── File Type Badges ── */
.dg-pdf-card-icon {
    position: relative;
}
.dg-pdf-type-badge {
    display: block;
    text-align: center;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
.dg-pdf-file-icon {
    position: relative;
}
.dg-pdf-type-badge-lg {
    display: block;
    text-align: center;
    margin-top: 6px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}
.dg-listing-type {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}

/* ── Pagination ── */
.dg-pdf-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}
.dg-pdf-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #c4a05a;
    border-radius: 6px;
    color: #3a2a0a;
    text-decoration: none;
    font-size: 14px;
}
.dg-pdf-page:hover {
    background: #E2C080;
    color: #3a2a0a;
}
.dg-pdf-page.current {
    background: #c4a05a;
    color: #fff;
    border-color: #c4a05a;
}

/* ── Countdown / Download Page ── */
.dg-pdf-download-page {
    max-width: 600px;
    margin: 0 auto;
}
.dg-pdf-file-info {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fdfbf7;
    border: 1px solid #e8dcc8;
    border-radius: 10px;
    margin-bottom: 24px;
}
.dg-pdf-file-icon {
    flex-shrink: 0;
}
.dg-pdf-file-detail h2 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #3a2a0a;
}
.dg-pdf-file-detail p {
    color: #555;
    font-size: 14px;
    margin: 0 0 10px;
    line-height: 1.5;
}
.dg-pdf-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #888;
}

/* ── Countdown Circle ── */
.dg-pdf-countdown-section {
    text-align: center;
    padding: 20px 0;
}
.dg-pdf-countdown-wrapper {
    margin-bottom: 16px;
}
.dg-pdf-countdown-circle {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 120px;
}
.dg-pdf-countdown-num {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    font-weight: 700;
    color: #c4a05a;
}
.dg-pdf-countdown-text {
    color: #888;
    font-size: 14px;
    margin-top: 10px;
}

/* ── Download Button ── */
.dg-pdf-btn-download {
    display: inline-block;
    padding: 14px 40px;
    background: #c4a05a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.dg-pdf-btn-download:hover {
    background: #8b7d3c;
}
.dg-pdf-btn-download:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ── Register Form ── */
.dg-pdf-register-notice {
    background: #fff8e8;
    border: 1px solid #E2C080;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    color: #3a2a0a;
    font-size: 14px;
    line-height: 1.6;
}
.dg-pdf-register-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.dg-pdf-register-form input[type="email"] {
    padding: 12px 16px;
    border: 1px solid #c4a05a;
    border-radius: 8px;
    font-size: 15px;
    width: 280px;
    max-width: 100%;
}
.dg-pdf-btn-register {
    padding: 12px 24px;
    background: #c4a05a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.dg-pdf-btn-register:hover {
    background: #8b7d3c;
}
.dg-pdf-btn-register:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.dg-pdf-register-msg {
    width: 100%;
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
}
.dg-pdf-register-msg.success {
    color: #2e7d32;
}
.dg-pdf-register-msg.error {
    color: #c62828;
}

/* ── Captcha ── */
.dg-pdf-captcha {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
}
.dg-pdf-captcha-q {
    background: #f5edd8;
    color: #3a2a0a;
    font-size: 16px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}
.dg-pdf-captcha input[type="number"] {
    width: 70px;
    padding: 10px 8px;
    border: 1px solid #c4a05a;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    -moz-appearance: textfield;
}
.dg-pdf-captcha input[type="number"]::-webkit-outer-spin-button,
.dg-pdf-captcha input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ── Donate CTA (on countdown page) ── */
.dg-pdf-donate-cta {
    margin-top: 24px;
    padding: 20px 24px;
    background: #fdfbf7;
    border: 1px solid #E2C080;
    border-radius: 10px;
    text-align: center;
}
.dg-pdf-donate-cta p {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 14px;
}
.dg-pdf-btn-donate {
    display: inline-block;
    padding: 12px 32px;
    background: #c4a05a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.dg-pdf-btn-donate:hover {
    background: #8b7d3c;
    color: #fff;
}

/* ══════════════════════════════════
   Donate Page  /ung-ho/
   ══════════════════════════════════ */
.dg-donate-page {
    max-width: 620px;
    margin: 0 auto;
}

/* Thank you banner */
.dg-donate-thankyou {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    color: #2e7d32;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Intro text */
.dg-donate-intro {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: center;
}

/* Tabs */
.dg-donate-tabs {
    display: flex;
    border-bottom: 2px solid #e8dcc8;
    margin-bottom: 0;
}
.dg-donate-tab {
    flex: 1;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 16px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}
.dg-donate-tab:hover {
    color: #3a2a0a;
}
.dg-donate-tab.active {
    color: #c4a05a;
    border-bottom-color: #c4a05a;
}

/* Panels */
.dg-donate-panel {
    display: none;
    padding: 24px 0;
}
.dg-donate-panel.active {
    display: block;
}

/* ── PayPal Tiers ── */
.dg-donate-tiers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.dg-donate-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fdfbf7;
    border: 1px solid #e8dcc8;
    border-radius: 10px;
    transition: border-color 0.2s;
}
.dg-donate-tier:hover {
    border-color: #c4a05a;
}
.dg-donate-tier-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.dg-donate-tier-amount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 6px 12px;
    background: #E2C080;
    color: #3a2a0a;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.dg-donate-tier-desc {
    color: #3a2a0a;
    font-size: 14px;
    line-height: 1.4;
}
.dg-donate-tier-btn {
    padding: 10px 24px;
    background: #0070ba;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}
.dg-donate-tier-btn:hover {
    background: #005ea6;
}

/* Custom amount */
.dg-donate-custom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #e8dcc8;
}
.dg-donate-custom p {
    color: #888;
    font-size: 13px;
    margin: 0 0 10px;
}
.dg-donate-custom-form {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.dg-donate-dollar {
    font-size: 18px;
    font-weight: 700;
    color: #3a2a0a;
}
.dg-donate-custom-input {
    width: 110px;
    padding: 10px 14px;
    border: 1px solid #c4a05a;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
}
.dg-donate-custom-btn {
    padding: 10px 22px;
    background: #c4a05a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.dg-donate-custom-btn:hover {
    background: #8b7d3c;
}

/* ── QR / Bank Panel ── */
.dg-donate-qr-wrap {
    text-align: center;
    margin-bottom: 20px;
}
.dg-donate-qr-wrap img {
    max-width: 280px;
    border-radius: 10px;
    border: 1px solid #e8dcc8;
}
.dg-donate-bank-info {
    background: #fdfbf7;
    border: 1px solid #e8dcc8;
    border-radius: 10px;
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.8;
    color: #3a2a0a;
}

/* ── Back Link ── */
.dg-pdf-back {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e8dcc8;
}
.dg-pdf-back a {
    color: #c4a05a;
    text-decoration: none;
    font-size: 14px;
}
.dg-pdf-back a:hover {
    color: #8b7d3c;
}

/* ══════════════════════════════════
   Listing Page  /pdf-daogiao/
   ══════════════════════════════════ */
/* Search */
.dg-listing-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}
.dg-listing-search select {
    padding: 9px 12px;
    border: 1px solid #c4a05a;
    border-radius: 6px;
    font-size: 14px;
    color: #3a2a0a;
    background: #fff;
    min-width: 160px;
}
.dg-listing-search input[type="text"] {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid #c4a05a;
    border-radius: 6px;
    font-size: 14px;
    color: #3a2a0a;
    background: #fff;
    min-width: 140px;
}
.dg-listing-search button {
    padding: 9px 20px;
    background: #c4a05a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.dg-listing-search button:hover {
    background: #8b7d3c;
}
.dg-listing-clear {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    white-space: nowrap;
}
.dg-listing-clear:hover {
    color: #c62828;
}

.dg-listing-count {
    color: #888;
    font-size: 13px;
    margin-bottom: 16px;
}
.dg-listing-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e8dcc8;
    border-radius: 8px;
    overflow: hidden;
}
.dg-listing-table thead {
    background: #E2C080;
}
.dg-listing-table th {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #3a2a0a;
    text-align: left;
    border-bottom: 2px solid #c4a05a;
}
.dg-listing-table td {
    padding: 10px 14px;
    font-size: 14px;
    color: #3a2a0a;
    border-bottom: 1px solid #f0e8d8;
}
.dg-listing-table tbody tr:hover {
    background: #fdfbf7;
}
.dg-listing-table tbody tr:last-child td {
    border-bottom: none;
}
.dg-col-stt {
    width: 50px;
    text-align: center;
    color: #888;
    font-weight: 600;
}
.dg-col-count {
    width: 80px;
    text-align: center;
    color: #888;
    font-size: 13px;
}
.dg-col-dl {
    width: 90px;
    text-align: center;
}
.dg-listing-cat {
    display: inline-block;
    background: #f5edd8;
    color: #8b7d3c;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 8px;
    margin-left: 6px;
    vertical-align: middle;
}
.dg-listing-btn {
    display: inline-block;
    padding: 6px 14px;
    background: #c4a05a;
    color: #fff;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}
.dg-listing-btn:hover {
    background: #8b7d3c;
    color: #fff;
}

/* Pagination */
.dg-listing-paging {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e8dcc8;
}
.dg-listing-info {
    color: #888;
    font-size: 14px;
}
.dg-listing-prev,
.dg-listing-next {
    display: inline-block;
    padding: 9px 22px;
    border: 1px solid #c4a05a;
    border-radius: 6px;
    color: #3a2a0a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}
.dg-listing-next {
    background: #c4a05a;
    color: #fff;
}
.dg-listing-prev:hover {
    background: #E2C080;
}
.dg-listing-next:hover {
    background: #8b7d3c;
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .dg-pdf-file-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .dg-pdf-file-meta {
        justify-content: center;
    }
    .dg-pdf-register-form input[type="email"] {
        width: 100%;
    }
    .dg-pdf-filter-form {
        flex-direction: column;
    }
    .dg-pdf-filter-form select,
    .dg-pdf-filter-form input[type="text"] {
        width: 100%;
    }
    .dg-pdf-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .dg-pdf-meta {
        justify-content: center;
    }
    .dg-donate-tier {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .dg-donate-tier-info {
        flex-direction: column;
        gap: 6px;
    }
    .dg-donate-tier-btn {
        margin-left: 0;
        width: 100%;
    }
    .dg-donate-custom-form {
        flex-wrap: wrap;
    }
    .dg-listing-table th,
    .dg-listing-table td {
        padding: 8px 8px;
        font-size: 13px;
    }
    .dg-col-stt { width: 36px; }
    .dg-col-count { width: 50px; font-size: 11px; }
    .dg-col-dl { width: 70px; }
    .dg-listing-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    .dg-listing-cat { display: none; }
    .dg-listing-search {
        flex-wrap: wrap;
    }
    .dg-listing-search select,
    .dg-listing-search input[type="text"] {
        width: 100%;
    }
}
