/* assets/campaign.css */

/* --- public/campaign.php & public/donasi.php --- */
.campaign-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
    color: #fff;
    padding: 80px 20px 60px;
    text-align: center;
}

.campaign-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.campaign-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.5;
    text-align: left;
}

.runners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.runner-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.runner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.runner-photo {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #f1f5f9;
}

.runner-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.runner-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.progress-block {
    margin-bottom: 16px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--muted);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.8s ease;
    filter: brightness(1.1);
}

.progress-fill.fill-green {
    background: #10b981;
}

.btn-donate-card {
    margin-top: auto;
    display: block;
    text-align: center;
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.runner-card:hover .btn-donate-card {
    background: #1e3a8a;
}

.btn-share-action {
    background: #e2e8f0;
    border: none;
    padding: 0 24px;
    min-width: 64px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.2s;
}

.btn-share-action:hover {
    background: #cbd5e1;
    color: var(--primary);
}

/* public/donasi.php specifics */
.donation-header {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
    color: #fff;
    padding: 40px 20px 80px;
    text-align: center;
}

.main-content {
    max-width: 800px;
    margin: -60px auto 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.runner-profile {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.runner-profile img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.runner-profile h1 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.fill-blue {
    background: var(--primary);
}

.donation-form {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input[type="file"] {
    padding: 10px;
    background: #fff;
}

.amount-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.amount-btn {
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
}

.amount-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    border-radius: 8px;
    background: #10b981;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit:hover {
    background: #059669;
}

@media (max-width: 600px) {
    .runner-profile {
        flex-direction: column;
        text-align: center;
    }

    .main-content {
        padding: 24px;
        margin-top: -40px;
        border-radius: 16px 16px 0 0;
    }
}

/* --- Admin Pages --- */
.admin-main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 40px 18px;
    background: radial-gradient(circle at top left, #f1faf9 0, #f5f7fa 32%, #f9fbff 100%);
}

.admin-container {
    width: 100%;
    max-width: 1100px;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.list-table th,
.list-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.list-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #444;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    box-sizing: border-box;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.photo-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pending {
    background: #fef08a;
    color: #854d0e;
}

.badge-verified {
    background: #bbf7d0;
    color: #166534;
}

.badge-rejected {
    background: #fecaca;
    color: #991b1b;
}

.btn-success {
    background: #22c55e;
    color: white;
    border: none;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
}

.preview-img {
    max-width: 100px;
    max-height: 100px;
    cursor: pointer;
    border: 1px solid #ccc;
}

.img-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.img-modal.open {
    display: flex;
}

.img-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    font-weight: bold;
}

/* Story Poster Template (Hidden by default) */
#story-poster-template {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1080px;
    height: 1920px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: white;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 100px 80px;
    z-index: -10;
}

#story-poster-template .poster-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 80px;
}

#story-poster-template .poster-brand img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

#story-poster-template .poster-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

#story-poster-template .poster-photo {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
    border: 15px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 60px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background-color: transparent;
}

#story-poster-template .poster-name {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.2;
}

#story-poster-template .poster-motivation {
    font-size: 2rem;
    font-style: italic;
    color: #cbd5e1;
    text-align: center;
    margin-bottom: 80px;
    padding: 0 40px;
}

#story-poster-template .poster-stats {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    padding: 60px;
    margin-bottom: 80px;
}

#story-poster-template .stat-item {
    margin-bottom: 40px;
}

#story-poster-template .stat-item:last-child {
    margin-bottom: 0;
}

#story-poster-template .stat-label {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 20px;
}

#story-poster-template .stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    color: #10b981;
}

#story-poster-template .stat-value.donasi {
    color: #38bdf8;
}

#story-poster-template .poster-footer {
    margin-top: auto;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    background: #10b981;
    padding: 30px 60px;
    border-radius: 100px;
    color: white;
    min-height: 120px;
    width: 80%;
}