:root {
  --bg: #f7f6f3;
  --card-bg: #ffffff;
  --text: #2a2a2a;
  --muted: #6b6b6b;
  --accent: #1f7a5c;
  --accent-dark: #155c44;
  --border: #e7e4de;
  --danger: #b3413b;
  --radius: 14px;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span.dot { color: var(--accent); }

nav.site-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform .05s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(31,122,92,0.08); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
}

.hero {
  padding: 48px 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: 2.1rem;
  margin-bottom: 6px;
}
.hero .tagline {
  color: var(--accent-dark);
  font-weight: 600;
  font-style: italic;
  font-size: 1rem;
  margin: 0 0 12px;
}
.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0;
}

.search-input {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  min-width: 240px;
  font-size: 0.95rem;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--muted);
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.badge {
  align-self: flex-start;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef6f1;
  color: var(--accent-dark);
  font-weight: 600;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}
.card p.summary {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  flex-grow: 1;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}
.progress-bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}
.progress-meta strong { color: var(--text); }

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

/* Story detail page */
.story-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  margin: 32px 0 60px;
  align-items: start;
}
@media (max-width: 800px) {
  .story-layout { grid-template-columns: 1fr; }
}

.story-main h1 { margin-top: 0; }
.story-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.story-description {
  white-space: pre-wrap;
  margin-top: 20px;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.donation-list {
  margin-top: 24px;
}
.donation-item {
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 0.9rem;
}
.donation-item:last-child { border-bottom: none; }
.donation-item .amount { font-weight: 700; color: var(--accent-dark); }

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
}
.form-group textarea { resize: vertical; }
.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.section-divider {
  border-top: 1px solid var(--border);
  margin: 24px 0 16px;
  padding-top: 16px;
}
.section-divider strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.requisite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.requisite-row:last-child { border-bottom: none; }
.requisite-row .label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.requisite-row .value {
  font-weight: 600;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.copy-btn {
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--accent-dark);
  white-space: nowrap;
}
.copy-btn:hover { background: #eef6f1; }

.safety-note {
  background: #fff8e6;
  border: 1px solid #f0dca0;
  color: #7a5b00;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  margin: 14px 0;
}

.amount-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.amount-options button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-weight: 600;
}
.amount-options button.active {
  border-color: var(--accent);
  background: #eef6f1;
  color: var(--accent-dark);
}

.mock-banner {
  background: #fff8e6;
  border: 1px solid #f0dca0;
  color: #7a5b00;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-success { background: #eaf7ee; color: #1f6b3a; border: 1px solid #bfe6cc; }
.alert-error { background: #fbeceb; color: var(--danger); border: 1px solid #f3c9c6; }
.alert-info { background: #eaf1fb; color: #1a4d8f; border: 1px solid #c6dcf5; }

footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 30px 20px 50px;
}

/* Admin */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: top;
}
.admin-table th { background: #faf9f6; }

.status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-pending { background: #fff3d9; color: #8a6400; }
.status-verified { background: #e3f5e8; color: #1f7a3d; }
.status-rejected { background: #fbe4e2; color: var(--danger); }

.admin-login {
  max-width: 360px;
  margin: 80px auto;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 360px;
  text-align: center;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
