/* App pages — uses theme.css design tokens (--navy, --gold, --cream, --warm-gray, --light-warm) */

.app-nav {
  background: var(--navy);
  padding: 1rem 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(15,32,64,0.25);
}
.app-nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.app-nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.nav-link {
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  color: rgba(250,248,245,0.7);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover, .nav-link.active {
  background: rgba(200,149,43,0.15);
  color: var(--gold);
}
.nav-link-muted { opacity: 0.6; }
.nav-link-muted:hover { opacity: 1; }

.app-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* Page headers */
.page-header {
  margin-bottom: 2.5rem;
}
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.page-subtitle {
  color: var(--warm-gray);
  font-size: 1rem;
}

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--light-warm);
  border-radius: 4px;
  padding: 1.4rem 1.2rem;
  border-top: 3px solid var(--gold);
}
.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--warm-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Section */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

/* Recent activity table */
.activity-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--light-warm);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 2rem;
}
.activity-table th {
  background: var(--navy);
  color: var(--cream);
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.85rem 1rem;
  text-align: left;
}
.activity-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(107,97,88,0.12);
  font-size: 0.92rem;
  color: var(--navy);
}
.activity-table tr:last-child td { border-bottom: none; }
.activity-table tr:hover td { background: rgba(200,149,43,0.06); }

.service-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 2px;
  font-family: 'Lora', serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.badge-worship { background: rgba(15,32,64,0.12); color: var(--navy); }
.badge-bible_study { background: rgba(200,149,43,0.18); color: #7a5a10; }

/* Forms */
.form-card {
  background: var(--light-warm);
  border-radius: 4px;
  padding: 2rem;
  border-top: 3px solid var(--gold);
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.2rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid rgba(107,97,88,0.3);
  border-radius: 3px;
  background: var(--cream);
  color: var(--navy);
  font-family: 'Lora', serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
}
.form-input::placeholder { color: rgba(107,97,88,0.5); }

/* Buttons */
.btn {
  display: inline-block;
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  padding: 0.65rem 1.4rem;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  font-weight: 500;
}
.btn-primary:hover { background: #b07e1e; }
.btn-secondary {
  background: rgba(15,32,64,0.08);
  color: var(--navy);
}
.btn-secondary:hover { background: rgba(15,32,64,0.15); }
.btn-danger {
  background: rgba(160,40,40,0.12);
  color: #8b1a1a;
}
.btn-danger:hover { background: rgba(160,40,40,0.2); }

/* Members table */
.members-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--light-warm);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.members-table th {
  background: var(--navy);
  color: var(--cream);
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.85rem 1rem;
  text-align: left;
}
.members-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(107,97,88,0.12);
  font-size: 0.92rem;
  color: var(--navy);
}
.members-table tr:last-child td { border-bottom: none; }
.members-table tr:hover td { background: rgba(200,149,43,0.06); }
.members-table .actions { display: flex; gap: 0.5rem; }

/* Two-column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--light-warm);
  border-radius: 4px;
  color: var(--warm-gray);
  font-style: italic;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.8rem 1.2rem;
  border-radius: 3px;
  font-family: 'Lora', serif;
  font-size: 0.9rem;
  color: var(--cream);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}
.toast.show { opacity: 1; }
.toast-success { background: #2d6a4f; }
.toast-error { background: #8b1a1a; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,32,64,0.55);
  z-index: 150;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--cream);
  border-radius: 4px;
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  border-top: 3px solid var(--gold);
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.2rem;
}

/* Responsive */
@media (max-width: 700px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .app-nav-links { flex-wrap: wrap; }
  .members-table { font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}