/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #f97316;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-sm: 8px;
}
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ===== NAVBAR ===== */
.navbar { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.nav-brand i { font-size: 1.6rem; color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.nav-link { color: var(--text-muted); font-weight: 500; transition: color .2s; }
.nav-link:hover { color: var(--primary); }
.btn-nav { background: var(--primary); color: var(--white); padding: .5rem 1.2rem; border-radius: 50px; font-weight: 600; transition: background .2s, transform .1s; }
.btn-nav:hover { background: var(--primary-dark); transform: translateY(-1px); }
.hamburger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text); }
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); gap: 1rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
}

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%); color: var(--white); padding: 5rem 1.5rem; display: flex; align-items: center; justify-content: center; gap: 4rem; min-height: 90vh; }
.hero-content { max-width: 580px; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); padding: .4rem 1rem; border-radius: 50px; font-size: .85rem; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; margin-bottom: 1.2rem; }
.highlight { color: #fbbf24; }
.hero p { font-size: 1.1rem; opacity: .9; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.btn-primary { display: inline-flex; align-items: center; gap: .5rem; background: var(--secondary); color: var(--white); padding: .75rem 1.8rem; border-radius: 50px; font-weight: 700; font-size: 1rem; border: none; cursor: pointer; transition: background .2s, transform .1s; }
.btn-primary:hover { background: #ea6c00; transform: translateY(-2px); }
.btn-outline { display: inline-flex; align-items: center; gap: .5rem; background: transparent; color: var(--white); padding: .75rem 1.8rem; border-radius: 50px; font-weight: 600; border: 2px solid rgba(255,255,255,.5); cursor: pointer; transition: all .2s; }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.hero-stats { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-number { display: block; font-size: 1.6rem; font-weight: 800; }
.stat-label { font-size: .8rem; opacity: .8; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.3); }
.hero-image { flex-shrink: 0; }
.hero-card { background: rgba(255,255,255,.15); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.3); border-radius: var(--radius); padding: 2rem; max-width: 280px; text-align: center; }
.hero-card-icon { font-size: 3rem; color: #fbbf24; margin-bottom: 1rem; }
.hero-card p { margin-bottom: 1.5rem; font-size: .95rem; }
.hero-card-progress { background: rgba(255,255,255,.2); border-radius: 50px; height: 8px; margin-bottom: .5rem; overflow: hidden; }
.progress-bar-hero { height: 100%; width: 78%; background: #fbbf24; border-radius: 50px; }
.hero-card span { font-size: .85rem; opacity: .8; }
@media (max-width: 900px) { .hero { flex-direction: column; text-align: center; padding: 3rem 1.5rem; min-height: auto; } .hero-buttons { justify-content: center; } .hero-stats { justify-content: center; } .hero-image { display: none; } }

/* ===== SECTIONS ===== */
.section { padding: 5rem 1.5rem; }
.bg-light { background: var(--bg); }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

/* ===== FILTER BAR ===== */
.filter-bar { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.5rem; }
.filter-btn { padding: .5rem 1.2rem; border-radius: 50px; border: 2px solid var(--border); background: var(--white); color: var(--text-muted); font-weight: 600; cursor: pointer; transition: all .2s; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ===== CAMPAIGN CARDS ===== */
.campaigns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.campaign-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; cursor: pointer; }
.campaign-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.campaign-img { width: 100%; height: 200px; object-fit: cover; background: linear-gradient(135deg, #dbeafe, #bfdbfe); display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.campaign-body { padding: 1.25rem; }
.campaign-category { display: inline-block; padding: .25rem .75rem; border-radius: 50px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.cat-pendidikan { background: #dbeafe; color: #1d4ed8; }
.cat-kesehatan { background: #dcfce7; color: #15803d; }
.cat-bencana { background: #fee2e2; color: #b91c1c; }
.cat-sosial { background: #fef3c7; color: #92400e; }
.campaign-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.4; }
.campaign-card p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.progress-wrap { margin-bottom: .75rem; }
.progress-label { display: flex; justify-content: space-between; font-size: .8rem; margin-bottom: .4rem; }
.progress-label .pct { font-weight: 700; color: var(--primary); }
.progress-track { background: var(--border); border-radius: 50px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg, var(--primary), #60a5fa); transition: width .6s ease; }
.campaign-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-muted); margin-bottom: 1rem; }
.campaign-meta span { display: flex; align-items: center; gap: .3rem; }
.btn-donate { width: 100%; padding: .65rem; background: var(--primary); color: var(--white); border: none; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; transition: background .2s; }
.btn-donate:hover { background: var(--primary-dark); }

/* ===== HOW IT WORKS ===== */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }
.step-card { background: var(--white); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--shadow); position: relative; }
.step-number { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--white); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }
.step-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; }
.step-card h3 { font-weight: 700; margin-bottom: .5rem; }
.step-card p { color: var(--text-muted); font-size: .9rem; }

/* ===== DONORS TABLE ===== */
.donors-table-wrapper { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.donors-table { width: 100%; border-collapse: collapse; background: var(--white); }
.donors-table th { background: var(--primary); color: var(--white); padding: 1rem 1.25rem; text-align: left; font-weight: 700; font-size: .9rem; }
.donors-table td { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.donors-table tr:last-child td { border-bottom: none; }
.donors-table tr:hover td { background: var(--primary-light); }
.badge { display: inline-block; padding: .25rem .7rem; border-radius: 50px; font-size: .75rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-verified { background: #dbeafe; color: #1d4ed8; }

/* ===== FOOTER ===== */
.footer { background: #0f172a; color: #94a3b8; padding: 4rem 1.5rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2rem; margin-bottom: 3rem; }
.footer-brand .nav-brand { color: var(--white); margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; line-height: 1.7; margin-bottom: 1.5rem; }
.social-links { display: flex; gap: .75rem; }
.social-links a { width: 38px; height: 38px; background: rgba(255,255,255,.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--white); transition: background .2s; }
.social-links a:hover { background: var(--primary); }
.footer-links h4, .footer-contact h4 { color: var(--white); font-weight: 700; margin-bottom: 1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #94a3b8; transition: color .2s; font-size: .9rem; }
.footer-links a:hover { color: var(--white); }
.footer-contact p { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: .9rem; }
.footer-contact i { color: var(--primary); width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; text-align: center; font-size: .85rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== MODALS ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 520px; position: relative; max-height: 90vh; overflow-y: auto; animation: slideUp .3s ease; }
.modal-large { max-width: 720px; }
.modal-small { max-width: 420px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: var(--bg); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.modal-close:hover { background: var(--border); }
.modal-header { text-align: center; margin-bottom: 1.5rem; }
.modal-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: .75rem; display: block; }
.modal-header h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: .25rem; }
.modal-header p { color: var(--text-muted); font-size: .9rem; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: .7rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit; transition: border-color .2s; background: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.btn-full { width: 100%; justify-content: center; font-size: 1rem; padding: .85rem; border-radius: var(--radius-sm); }
.form-footer { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--text-muted); }
.form-footer a { color: var(--primary); font-weight: 600; }

/* Amount presets */
.amount-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .75rem; }
.amount-btn { padding: .5rem; border: 2px solid var(--border); background: var(--white); border-radius: var(--radius-sm); font-size: .8rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.amount-btn:hover, .amount-btn.selected { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Payment methods */
.payment-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.payment-option { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; border: 2px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .2s; font-size: .9rem; }
.payment-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.payment-option input { accent-color: var(--primary); }
.bank-info { background: var(--primary-light); border: 1px solid #bfdbfe; border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1.25rem; font-size: .9rem; }

/* Upload area */
.upload-area { border: 2px dashed var(--border); border-radius: var(--radius-sm); padding: 2rem; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area i { font-size: 2.5rem; color: var(--primary); margin-bottom: .5rem; display: block; }
.upload-area p { font-weight: 600; margin-bottom: .25rem; }
.upload-area span { font-size: .8rem; color: var(--text-muted); }
.file-preview { margin-top: 1rem; padding: .75rem; background: var(--bg); border-radius: var(--radius-sm); display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.file-preview img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.file-preview i { font-size: 2rem; color: var(--primary); }

/* Donation summary */
.donation-summary { background: var(--bg); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1.5rem; font-size: .9rem; }
.donation-summary .summary-row { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.donation-summary .summary-row:last-child { border-bottom: none; font-weight: 700; color: var(--primary); }

/* Success modal */
.success-content { text-align: center; padding: 1rem 0; }
.success-icon { font-size: 4rem; color: var(--success); margin-bottom: 1rem; }
.success-content h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: .5rem; }
.success-content p { color: var(--text-muted); margin-bottom: 1.5rem; }
.success-detail { background: var(--bg); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: 1.5rem; font-size: .9rem; text-align: left; }
.success-detail p { margin-bottom: .3rem; }

/* ===== TOAST ===== */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: #1e293b; color: var(--white); padding: .85rem 1.5rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; z-index: 9999; transform: translateY(100px); opacity: 0; transition: all .3s; max-width: 320px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ===== CAMPAIGN DETAIL MODAL ===== */
.campaign-detail-img { width: 100%; height: 260px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1.5rem; background: linear-gradient(135deg, #dbeafe, #bfdbfe); display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.campaign-detail h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: .75rem; }
.campaign-detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0; }
.detail-stat { background: var(--bg); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.detail-stat .value { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.detail-stat .label { font-size: .8rem; color: var(--text-muted); }
.campaign-detail p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; }
.campaign-detail .btn-primary { width: 100%; justify-content: center; }
