/* GiveSentry — Zero-Fee Fundraising */
:root {
    --green: #2d6a4f;
    --green-dark: #1b4332;
    --green-light: #40916c;
    --gold: #d4a017;
    --gold-light: #e8c547;
    --cream: #faf8f5;
    --white: #fff;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --border: #e5e5e5;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --radius: 10px;
    --radius-sm: 6px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', system-ui, sans-serif; color: var(--text); background: var(--cream); line-height: 1.6; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Typography */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-bottom: .75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 24px; background: var(--green); color: #fff; border: 2px solid var(--green); border-radius: var(--radius-sm); font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: .95rem; cursor: pointer; transition: all .15s; text-decoration: none; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-white { background: #fff; color: var(--green); border-color: #fff; }
.btn-white:hover { background: var(--cream); }
.btn-sm { padding: 6px 16px; font-size: .85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .9rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert p { margin: 0; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem; background: #fff; transition: border-color .15s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,106,79,.1); }
.form-group input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 150px; }
.flex-1 { flex: 1 !important; }
.flex-2 { flex: 2 !important; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.form-toggles { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; }
.checkbox-label input { width: auto; accent-color: var(--green); }
.filter-bar { margin-bottom: 16px; }
.filter-bar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .9rem; }

/* --- MARKETING PAGE --- */
.marketing-nav { background: #fff; border-bottom: 1px solid var(--border); padding: 12px 0; position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--green); }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { font-weight: 500; color: var(--text); font-size: .95rem; }
.nav-links a:hover { color: var(--green); text-decoration: none; }

.hero { background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-light) 100%); color: #fff; padding: 100px 0 80px; text-align: center; }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; color: #fff; }
.hero-sub { font-size: 1.2rem; max-width: 640px; margin: 0 auto 32px; opacity: .92; line-height: 1.7; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.hero-note { font-size: .85rem; opacity: .75; }

.features-section, .pricing-section { padding: 80px 0; }
.pricing-section { background: #fff; }
.section-sub { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 48px; text-align: center; }
.features-section h2, .pricing-section h2 { text-align: center; margin-bottom: 8px; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.feature-card { background: #fff; padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: .9rem; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 960px; margin: 0 auto; }
.price-card { background: var(--cream); padding: 36px 28px; border-radius: var(--radius); border: 2px solid var(--border); text-align: center; transition: transform .15s; }
.price-card.featured { border-color: var(--green); transform: scale(1.04); background: #fff; box-shadow: var(--shadow-md); }
.price-badge { display: inline-block; padding: 4px 14px; background: var(--green); color: #fff; border-radius: 20px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; }
.price-amount { font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 700; color: var(--text); }
.price-amount span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.price-desc { color: var(--text-muted); font-size: .9rem; margin: 8px 0 24px; }
.price-features { list-style: none; text-align: left; margin-bottom: 28px; }
.price-features li { padding: 6px 0; font-size: .9rem; border-bottom: 1px solid var(--border); }
.price-features li::before { content: "✓ "; color: var(--green); font-weight: 700; }

.cta-section { background: var(--green); color: #fff; text-align: center; padding: 80px 0; }
.cta-section h2 { color: #fff; font-size: 2.5rem; margin-bottom: 12px; }
.cta-section p { font-size: 1.1rem; margin-bottom: 28px; opacity: .9; }

/* --- TENANT PAGES --- */
.tenant-header { background: var(--green); color: #fff; padding: 48px 0 36px; text-align: center; }
.tenant-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.tenant-logo { max-width: 400px; height: auto; border-radius: 0; object-fit: contain; border: none; }
.tenant-header h1 { color: #fff; font-size: 2rem; }
.tenant-desc { opacity: .85; font-size: 1rem; margin-top: 4px; }

/* Campaigns grid */
.campaigns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; padding: 48px 0; }
.campaign-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; text-decoration: none; color: var(--text); display: block; }
.campaign-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.card-image { height: 200px; background-size: cover; background-position: center; background-color: var(--cream); }
.card-image-placeholder { display: flex; align-items: center; justify-content: center; color: var(--green); opacity: .3; }
.card-body { padding: 20px; }
.card-category { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--green); margin-bottom: 6px; }
.card-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card-body p { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; }
.card-stats { display: flex; justify-content: space-between; font-size: .85rem; margin-top: 8px; }
.raised { font-weight: 700; color: var(--green); }
.goal { color: var(--text-muted); }
.card-meta { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* Progress bar */
.progress-bar { background: #e5e7eb; border-radius: 20px; height: 8px; overflow: hidden; width: 100%; }
.progress-lg { height: 12px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--green-light)); border-radius: 20px; transition: width .5s ease; }

/* --- CAMPAIGN PAGE --- */
.campaign-hero { height: 360px; background-size: cover; background-position: center; position: relative; }
.campaign-hero-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0,0,0,.7)); display: flex; align-items: flex-end; padding-bottom: 40px; }
.campaign-hero-plain { background: var(--green); padding: 60px 0 40px; color: #fff; }
.campaign-hero-plain h1, .campaign-hero-overlay h1 { color: #fff; font-size: 2.5rem; }
.campaign-category { display: inline-block; background: var(--gold); color: #fff; padding: 4px 12px; border-radius: 4px; font-size: .75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.campaign-org { opacity: .8; font-size: 1rem; }
.campaign-hero-overlay .campaign-org { color: #fff; }

.campaign-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; padding: 48px 0; align-items: start; }
.campaign-story { min-width: 0; }
.campaign-desc { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }
.story-content { font-size: 1rem; line-height: 1.8; color: #333; }
.section-title { margin-top: 48px; margin-bottom: 16px; padding-top: 24px; border-top: 1px solid var(--border); }

.update-card { background: #fff; padding: 20px; border-radius: var(--radius-sm); margin-bottom: 12px; border-left: 3px solid var(--gold); }
.update-card h4 { margin-bottom: 4px; }
.update-card time { font-size: .8rem; color: var(--text-muted); }

/* Donor wall */
.donor-wall { display: flex; flex-direction: column; gap: 12px; }
.donor-entry { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: #fff; border-radius: var(--radius-sm); }
.donor-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.donor-info { flex: 1; }
.donor-info strong { display: block; font-size: .95rem; }
.donor-amount { color: var(--green); font-weight: 600; font-size: .85rem; margin-left: 8px; }
.donor-msg { font-size: .85rem; color: var(--text-muted); margin: 4px 0 2px; }
.donor-info time { font-size: .75rem; color: var(--text-muted); }

/* Donate sidebar */
.campaign-sidebar { position: sticky; top: 24px; }
.donate-box { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-md); }
.raised-amount { font-family: 'Playfair Display', serif; font-size: 2.5rem; font-weight: 700; color: var(--green); }
.goal-text { color: var(--text-muted); margin-bottom: 12px; }
.donate-stats { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-muted); margin: 12px 0 24px; }

.amount-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.amount-option { position: relative; }
.amount-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.amount-option span { display: block; text-align: center; padding: 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: all .15s; }
.amount-option input:checked + span { border-color: var(--green); background: var(--green); color: #fff; }
.amount-option span:hover { border-color: var(--green-light); }
.custom-amount-wrap { display: flex; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; }
.currency-prefix { padding: 10px 0 10px 14px; font-weight: 600; color: var(--text-muted); }
.custom-amount-wrap input { border: none; padding: 10px; flex: 1; font-size: 1rem; outline: none; }
.recurring-toggle { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin-bottom: 16px; cursor: pointer; }
.recurring-toggle input { accent-color: var(--green); }
.donate-note { font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: 12px; }
.campaign-ended { text-align: center; color: var(--text-muted); font-style: italic; padding: 16px 0; }

.share-box { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; }
.share-label { font-weight: 600; font-size: .85rem; margin-bottom: 10px; }
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .8rem; font-weight: 600; cursor: pointer; background: #fff; color: var(--text); font-family: inherit; text-decoration: none; }
.share-btn:hover { border-color: var(--green); color: var(--green); text-decoration: none; }

/* --- DONATE PAGE --- */
.donate-page { padding: 48px 0; }
.back-link { display: inline-block; margin-bottom: 20px; font-size: .9rem; color: var(--text-muted); }
.back-link:hover { color: var(--green); }
.donate-card { max-width: 560px; margin: 0 auto; background: #fff; padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.donate-card-header { text-align: center; margin-bottom: 28px; }
.donate-card-header h1 { font-size: 1.6rem; margin-bottom: 6px; }
.donate-card-header p { color: var(--text-muted); }
.donate-info-form .form-group { margin-bottom: 20px; }

/* --- THANK YOU --- */
.thankyou-page { padding: 80px 0; text-align: center; }
.thankyou-card { max-width: 520px; margin: 0 auto; background: #fff; padding: 48px 40px; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.thankyou-icon { margin-bottom: 20px; }
.thankyou-amount { font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 700; color: var(--green); margin: 16px 0 8px; }
.thankyou-receipt { font-size: .85rem; color: var(--text-muted); margin: 16px 0 24px; }
.thankyou-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- LOGIN --- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 400px; background: #fff; padding: 40px 32px; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand h1 { font-size: 1.3rem; margin-top: 12px; }
.login-footer { text-align: center; margin-top: 20px; font-size: .85rem; }

/* --- ADMIN --- */
.admin-body { display: flex; min-height: 100vh; background: #f3f4f6; }
.admin-sidebar { width: 240px; background: var(--green-dark); color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 200; }
.sidebar-brand { padding: 20px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-nav a { display: block; padding: 10px 20px; color: rgba(255,255,255,.75); font-size: .9rem; font-weight: 500; transition: all .1s; text-decoration: none; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; gap: 16px; }
.sidebar-footer a { color: rgba(255,255,255,.6); font-size: .8rem; text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }

.admin-main { margin-left: 240px; flex: 1; padding: 24px 32px; min-width: 0; }
.admin-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header-bar h1 { font-size: 1.6rem; }
.admin-page-title { font-size: 1.6rem; margin-bottom: 24px; }

.mobile-menu-btn { display: none; position: fixed; top: 12px; left: 12px; z-index: 300; background: var(--green); color: #fff; border: none; padding: 8px 14px; border-radius: var(--radius-sm); font-size: .9rem; cursor: pointer; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-label { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--green); margin-top: 4px; }

/* Admin panels */
.panel { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.panel h2 { font-size: 1.2rem; margin-bottom: 16px; }
.admin-panels { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.admin-table .text-right { text-align: right; }
.admin-table .text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: .8rem; }
.text-danger { color: #991b1b; }
.action-link { font-size: .85rem; font-weight: 500; margin-right: 8px; }

.mini-campaign { padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.mini-campaign:last-child { border-bottom: none; }
.mini-campaign-top { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .9rem; }
.mini-campaign-meta { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.badge-active, .badge-completed { background: #d1fae5; color: #065f46; }
.badge-paused { background: #fef3c7; color: #92400e; }
.badge-draft { background: #e5e7eb; color: #374151; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-failed, .badge-refunded { background: #fee2e2; color: #991b1b; }

.empty-state { color: var(--text-muted); padding: 32px 0; text-align: center; }

/* Footer */
.site-footer { padding: 32px 0; text-align: center; font-size: .85rem; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 40px; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    .hero h1 { font-size: 2.2rem; }
    .hero-sub { font-size: 1rem; }
    .campaign-layout { grid-template-columns: 1fr; }
    .campaign-sidebar { position: static; }
    .campaigns-grid { grid-template-columns: 1fr; }
    .admin-sidebar { transform: translateX(-100%); transition: transform .2s; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; padding: 60px 16px 24px; }
    .mobile-menu-btn { display: block; }
    .admin-panels { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .price-card.featured { transform: none; }
    .form-row { flex-direction: column; gap: 0; }
    .nav-links { gap: 12px; }
}
