/* =========================================================
   Generosity Room
   ========================================================= */

.app-nav {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--rule);
}
.nav-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.nav-tab:hover { color: var(--ink); }
.nav-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.app-main {
  padding: 40px 32px 96px;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.tab { display: none; animation: rise 0.4s ease-out both; }
.tab.active { display: block; }

/* THE POT - hero */
.hero-pot {
  text-align: center;
  padding: 56px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-pot > * { position: relative; z-index: 1; }

.balance-display {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  margin: 20px 0 10px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  letter-spacing: -0.04em;
}
.balance-currency {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--primary);
  margin-right: 4px;
}
.balance-amount {
  font-size: clamp(64px, 12vw, 112px);
  line-height: 1;
}

.balance-caption {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.balance-caption span {
  font-weight: 700;
  color: var(--ink);
}

.pot-actions { margin-top: 8px; }

.pledge-section {
  margin-top: 24px;
  text-align: center;
}
.pledge-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--ink-soft);
}
.admin-pledge-section {
  text-align: center;
  margin-top: 12px;
}

/* CONTRIBUTIONS LIST */
.contributions-section { margin-top: 56px; }
.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
}

.contributions-list { list-style: none; }
.contribution-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.contribution-item:last-child { border-bottom: none; }

.contrib-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid var(--rule);
}
.contrib-body strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}
.contrib-body .contrib-meta {
  font-size: 13px;
  color: var(--ink-soft);
}
.contrib-body .contrib-note {
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 3px;
}
.contrib-amount {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--emerald);
}

.contrib-right {
  text-align: right;
}
.contrib-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 4px;
}
.contrib-edit, .contrib-del {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.contrib-edit { color: var(--primary); }
.contrib-edit:hover { background: var(--primary-light); border-color: var(--primary); }
.contrib-del { color: var(--rose); }
.contrib-del:hover { background: rgba(239, 68, 68, 0.08); border-color: var(--rose); }

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* SUGGEST / VOTE / STORIES TABS */
.suggest-hero, .vote-hero, .stories-hero {
  text-align: center;
  padding: 36px 24px 40px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}
.tab-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin: 8px 0 10px;
  letter-spacing: -0.02em;
}
.tab-title em { color: var(--primary); }
.tab-sub {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.suggestions-section { margin-top: 8px; }

/* Suggestion / vote cards */
.suggestion-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
.suggestion-card:hover { box-shadow: var(--shadow-sm); }

.sg-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.sg-recipient {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}
.sg-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--emerald);
  white-space: nowrap;
}
.sg-story {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 10px;
}
.sg-scripture {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 12px;
}
.sg-meta {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 500;
}
.sg-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 10px;
}

/* Vote buttons */
.vote-btns {
  display: flex;
  gap: 8px;
}
.vote-btn {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1.5px solid var(--rule);
  background: transparent;
  transition: all 0.15s ease;
}
.vote-btn:hover { border-color: var(--primary); }
.vote-btn.voted {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.vote-btn-pass.voted {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
}

.vote-counts {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* Decision badge */
.sg-status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
}
.sg-status-badge.approved { color: var(--emerald); background: var(--emerald-light); }
.sg-status-badge.declined { color: var(--rose); background: rgba(239, 68, 68, 0.08); }
.sg-status-badge.open { color: var(--primary); background: var(--primary-light); }

.sg-decision-note {
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
}

/* Receptions / God stories */
.receptions-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.receptions-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 12px;
}
.reception-update {
  padding: 14px;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 10px;
}
.reception-img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}
.reception-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.reception-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
}

.decide-btn {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.decide-btn:hover { background: var(--primary); color: white; }

/* Stories timeline */
.story-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.story-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--emerald) 100%);
}
.story-card .sg-decision-note { margin-top: 12px; }

textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  resize: vertical;
  transition: all 0.15s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-error {
  color: var(--rose);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* PLACEHOLDER TABS */
.placeholder-stage {
  text-align: center;
  padding: 80px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--rule);
}
.placeholder-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin: 12px 0 10px;
}
.placeholder-text {
  color: var(--ink-soft);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}

/* AMOUNT INPUT */
.amount-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.amount-prefix {
  position: absolute;
  left: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  pointer-events: none;
}
.amount-input-wrap input {
  padding-left: 32px;
  width: 100%;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

/* MOBILE */
@media (max-width: 720px) {
  .app-nav { justify-content: center; flex-wrap: wrap; }
  .nav-tab { padding: 8px 12px; font-size: 12px; }
  .app-main { padding: 28px 16px 64px; }
  .hero-pot { padding: 40px 16px; }
  .contribution-item { grid-template-columns: 32px 1fr auto; gap: 10px; }
  .contrib-avatar { width: 32px; height: 32px; font-size: 16px; border-radius: 10px; }
}
