@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

.donor-module-page {
    max-width: 1200px;
    margin-inline: auto;
    display: grid;
    gap: 0.75rem;
}

.module-head {
    background: #fff;
    border: 1px solid #ead7e8;
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 10px 25px rgba(73, 20, 52, 0.04);
}

.module-head h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    line-height: 1.1;
}

.module-head p {
    color: #665772;
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

.module-card {
    background: #fff;
    border: 1px solid #ead7e8;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(73, 20, 52, 0.04);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.summary-item {
    background: #fcf8fc;
    border: 1px solid #eddce9;
    border-radius: 10px;
    padding: 0.62rem;
}

.summary-item small {
    display: block;
    color: #7a6a84;
    font-weight: 700;
    margin-bottom: 0.15rem;
    font-size: 0.78rem;
}

.summary-item strong {
    font-size: 0.95rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.56rem;
    font-weight: 800;
    font-size: 0.76rem;
}

.status-submitted {
    background: #fef3c7;
    color: #92400e;
}

.status-received,
.status-validated,
.status-processing {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.action-row {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.note-box {
    margin-top: 0.7rem;
    border-left: 4px solid #cf2f84;
    background: #fff3fa;
    border-radius: 8px;
    padding: 0.62rem;
    color: #614f68;
    font-size: 0.88rem;
}

.tracking-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.tracking-tools input {
    border: 1px solid #e7d5e5;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    width: min(400px, 80vw);
    font: inherit;
    background: #fafafa;
    transition: all 0.2s ease;
}

.tracking-tools input:focus {
    outline: none;
    border-color: #bc2f79;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(188, 47, 121, 0.05);
}

.table-wrap {
    overflow-x: auto;
}

.tracking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.tracking-table th,
.tracking-table td {
    text-align: left;
    padding: 0.66rem 0.52rem;
}

.tracking-table th {
    font-size: 0.82rem;
    color: #6c5e75;
}

.tracking-table tbody tr:nth-child(odd) {
    background: #fdf6fb;
}

.tracking-table tbody tr:nth-child(even) {
    background: #fff;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #cf2f84;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.action-link:hover {
    background-color: rgba(207, 47, 132, 0.1);
}

.timeline {
    list-style: none;
    margin-top: 0.4rem;
    display: grid;
    gap: 0.45rem;
}

.timeline li {
    border: 1px solid #ebd9e8;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.25rem;
    margin-bottom: 0.6rem;
}

.timeline-meta {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.timeline-meta strong {
    color: #3b2e43;
    font-size: 0.95rem;
}

.timeline-meta time,
.timeline-meta small {
    color: #796a83;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-desc {
    color: #5d4f66;
    font-size: 0.88rem;
    line-height: 1.4;
    max-width: 100%;
}

.empty-state {
    text-align: center;
    color: #6f607a;
    padding: 1rem;
    border: 1px dashed #e3d1e1;
    border-radius: 12px;
    background: #fff;
}

.certificate-shell {
    background: #fffafa;
    border: 1px solid #f0e6ed;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(207, 47, 132, 0.05);
}

.certificate-paper {
    background: linear-gradient(to bottom right, #ffffff, #fffcfd);
    border: 10px solid #cf2f84;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 16px 40px rgba(207, 47, 132, 0.1);
    position: relative;
    color: #4f4258;
}

.certificate-inner {
    border: 1px solid #f08dbc;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    background: url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><circle cx="20" cy="20" r="1.5" fill="%23f08dbc" opacity="0.1"/></svg>');
}

.cert-header {
    margin-bottom: 2rem;
}

.cert-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cert-logo-main {
    height: 60px;
    width: auto;
}

.cert-logo-sufc {
    height: 70px;
    width: auto;
    border-radius: 4px;
}

.certificate-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    color: #bc2f79;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
}

.certificate-subtitle {
    font-family: 'Outfit', sans-serif;
    color: #796a83;
    margin-top: 1rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.certificate-name {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3.2rem, 6.5vw, 4.8rem);
    color: #cf2f84;
    font-weight: 400;
    margin: 1.2rem 0;
    line-height: 1.1;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.05);
}

.cert-body {
    margin: 0 auto 2.5rem;
    max-width: 650px;
}

.certificate-copy {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: #5f4565;
}

.certificate-copy-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #7a6a84;
    margin-top: 0.8rem;
    line-height: 1.6;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.cert-meta-wrap {
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #7a6a84;
    line-height: 1.8;
}

.cert-meta-wrap p {
    margin-bottom: 0.2rem;
}

.cert-meta-wrap strong {
    color: #5f4565;
}

.right-meta {
    text-align: right;
}

.cert-signature {
    text-align: center;
    margin: 0 auto;
}

.signature-line {
    width: 220px;
    height: 1px;
    background: #f08dbc;
    margin: 0 auto 0.6rem;
}

.cert-signature p {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #5f4565;
    font-weight: 700;
    margin: 0;
}

.cert-signature span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    color: #7a6a84;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.demo-row {
    margin-top: 0.65rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

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

@media print {
    .dash-header,
    .module-head,
    .action-row,
    .note-box,
    .demo-row {
        display: none !important;
    }

    .donor-module-page,
    .module-card,
    .certificate-shell,
    .certificate-paper {
        box-shadow: none;
        border-color: #cf2f84;
    }
    
    .certificate-shell {
        border: none;
        padding: 0;
        width: 100%;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .certificate-paper {
        width: 100%;
        max-width: 1050px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}


.stage-row > .stage { flex: 1; overflow: hidden; }

/* Loading State Utilities */
.loading-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.reveal-after-load {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* File Preview Styles (ported from staff-module) */
.file-thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #fdf7fb;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: grid;
    place-items: center;
    position: relative;
    text-decoration: none;
}

.file-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(155, 47, 105, 0.15);
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-thumbnail .preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.8rem;
    font-weight: 700;
}

.file-thumbnail:hover .preview-overlay {
    opacity: 1;
}

.donor-module-page { max-width: 1200px !important; margin-inline: auto; }
.module-card { margin-bottom: 0.5rem !important; }

/* Premium Upload Styles (Compact Version) */
.upload-section-premium {
    margin: 1.5rem 0;
}

.upload-label-main {
    display: block;
    font-weight: 800;
    color: #4a3452;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.upload-box-premium {
    border: 2px dashed #ead7e8;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #fdfafd 0%, #fff 100%);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-align: center;
    overflow: hidden;
}

.upload-box-premium:hover, .upload-box-premium.on-drag {
    border-color: #cf2f84;
    background: #fff3fa;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(207, 47, 132, 0.06);
}

.upload-init-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.icon-sphere {
    width: 56px;
    height: 56px;
    background: #fff;
    border: 1.5px solid #f2eef2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ad246d;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.upload-box-premium:hover .icon-sphere {
    transform: scale(1.05) rotate(-5deg);
    border-color: #cf2f84;
    background: #cf2f84;
    color: #fff;
}

.upload-instructions h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #3b2e43;
    margin-bottom: 0.25rem;
}

.upload-instructions p {
    color: #8c7d91;
    font-weight: 500;
    font-size: 0.88rem;
}

.file-types {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: #fdf2f8;
    color: #ad246d;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

/* Success State */
.upload-success-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    animation: slideUp 0.4s ease forwards;
}

.preview-bubble {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    transform: rotate(-3deg);
}

.preview-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.success-details {
    text-align: left;
}

.file-main-info {
    margin-bottom: 0.75rem;
}

.file-main-info strong {
    display: block;
    font-size: 1rem;
    color: #3b2e43;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-main-info span {
    font-size: 0.8rem;
    color: #8c7d91;
    font-weight: 600;
}

.change-file-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #f5f3f7;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4a3452;
    cursor: pointer;
    transition: all 0.2s ease;
}

.change-file-btn:hover {
    background: #ead7e8;
    color: #ad246d;
}

.success-mark {
    font-size: 2.2rem;
    color: #10b981;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.2));
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .upload-success-state {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }
    .success-details {
        text-align: center;
    }
    .success-mark {
        display: none;
    }
}

/* Ultra-Compact Premium Action Bars */
.upload-section-mini {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.upload-box-mini {
    border: 2px dashed #ead7e8;
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    background: #fdfafd;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the content */
    width: 100%;
}

.upload-box-mini:hover {
    border-color: #cf2f84;
    background: #fff3fa;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(207, 47, 132, 0.06);
}

.upload-mini-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.upload-mini-content i {
    font-size: 1.6rem;
    color: #ad246d;
    background: #fff;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #f2eef2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.upload-mini-content span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #4a3452;
}

.mini-add-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #fdf2f8;
    color: #ad246d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: none;
    transition: all 0.2s ease;
}

.upload-box-mini:hover .mini-add-btn {
    background: #cf2f84;
    color: #fff;
}

/* Success State for Mini Upload */
.upload-mini-success {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    animation: fadeInCompact 0.3s ease;
}

.mini-preview {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mini-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.mini-details strong {
    font-size: 0.85rem;
    color: #3b2e43;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-details button {
    background: none;
    border: none;
    color: #ad246d;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0;
    text-align: left;
    cursor: pointer;
    margin-top: 0.1rem;
}

.mini-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mini-file-tag {
    background: #fff;
    border: 1px solid #ead7e8;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a3452;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.mini-file-tag button {
    background: #fdf2f8;
    color: #ad246d;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
}

.mini-file-tag button:hover {
    background: #ef4444;
    color: #fff;
}

@keyframes fadeInCompact {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
