/* WanTam - Youth Political Network
   Minimalistic white, modern, sleek, mobile-first */

:root {
  --primary: #0d9488;       /* Teal - fresh, energetic */
  --primary-dark: #0f766e;
  --primary-light: #ccfbf1;
  --accent: #f97316;        /* Orange - youth energy */
  --accent-dark: #ea580c;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #eab308;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-height: 60px;
  --header-height: 56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* ========== Layout ========== */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px; /* Mobile-first social feel */
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 640px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
}

.main-content {
  flex: 1;
  padding: 1rem;
  padding-bottom: calc(var(--nav-height) + 1.5rem);
  overflow-y: auto;
}

/* ========== Header ========== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.03em;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.9rem;
}

/* ========== Bottom Nav ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 768px) {
  .bottom-nav { max-width: 640px; }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-item.active, .nav-item:hover {
  color: var(--primary);
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-muted); color: var(--text); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.95rem 1.5rem; font-size: 1.05rem; }

/* ========== Forms ========== */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder { color: var(--text-muted); }

.input-with-toggle {
  position: relative;
}
.input-with-toggle .form-input { padding-right: 3rem; }
.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.3rem;
}

.select-wrapper {
  position: relative;
}
.select-wrapper select {
  appearance: none;
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  color: var(--text);
  cursor: pointer;
}
.select-wrapper select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

/* ========== Cards ========== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card-elevated {
  box-shadow: var(--shadow-md);
  border: none;
}

/* ========== Auth Pages ========== */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem;
  max-width: 420px;
  margin: 0 auto;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .logo {
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a { font-weight: 600; }

/* ========== Flash Messages ========== */
.flash {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-info { background: #e0f2fe; color: #075985; }

/* ========== Empty / Welcome States ========== */
.welcome-hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.welcome-hero h2 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-hero p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
  margin: 0 auto 1.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.feature-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.feature-card .icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.5rem;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
}

.feature-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.feature-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========== Goal Banner ========== */
.goal-banner {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #f97316 100%);
  color: white;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
  text-align: center;
}

.goal-banner h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.goal-banner p {
  font-size: 0.85rem;
  opacity: 0.9;
}

.goal-numbers {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.goal-num {
  text-align: center;
}
.goal-num strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
}
.goal-num span {
  font-size: 0.7rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== Utilities ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* PWA Install prompt */
.pwa-banner {
  position: fixed;
  bottom: calc(var(--nav-height) + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 400px;
  background: var(--text);
  color: white;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  font-size: 0.85rem;
}
.pwa-banner button {
  margin-left: auto;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* ===== Phase 2: Feed, Posts, Candidates ===== */
.composer-card { padding: 0.85rem; }
.composer-top { display: flex; gap: 0.75rem; align-items: flex-start; }
.composer-top textarea {
  flex: 1; border: none; resize: none; font-size: 0.95rem;
  background: transparent; outline: none; min-height: 60px;
  font-family: inherit; color: var(--text);
}
.composer-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border);
}
.char-count { font-size: 0.75rem; }

.post-card { padding: 0.9rem 1rem; margin-bottom: 0.65rem; }
.post-header { margin-bottom: 0.6rem; }
.post-author { display: flex; gap: 0.65rem; align-items: center; text-decoration: none; color: inherit; }
.author-info { display: flex; flex-direction: column; }
.author-name { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.3rem; }
.post-meta { font-size: 0.75rem; color: var(--text-muted); }
.post-body p { font-size: 0.95rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.post-media { margin-top: 0.6rem; border-radius: var(--radius); overflow: hidden; }
.post-media img { width: 100%; display: block; max-height: 320px; object-fit: cover; }

.post-actions {
  display: flex; gap: 1.25rem; margin-top: 0.75rem;
  padding-top: 0.6rem; border-top: 1px solid var(--border);
}
.action-btn {
  background: none; border: none; display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.85rem; color: var(--text-secondary); cursor: pointer; padding: 0.2rem 0;
}
.action-btn.liked { color: #e11d48; }
.action-btn .count { font-size: 0.8rem; }

.badge-verified {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; background: var(--primary); color: white;
  border-radius: 50%; font-size: 0.65rem; font-weight: 700;
}

/* Candidates */
.page-header { margin-bottom: 0.75rem; }
.page-header h1 { font-size: 1.35rem; margin: 0; }
.filter-row { display: flex; gap: 0.5rem; }
.filter-row select { flex: 1; }

.candidate-card { padding: 1rem; margin-bottom: 0.65rem; }
.cand-top { display: flex; gap: 0.75rem; }
.cand-info { flex: 1; min-width: 0; }
.cand-name { font-weight: 600; font-size: 1rem; text-decoration: none; color: inherit; display: flex; align-items: center; gap: 0.3rem; }
.cand-seat { font-size: 0.85rem; color: var(--primary); font-weight: 500; margin-top: 0.15rem; }
.cand-loc { font-size: 0.75rem; margin-top: 0.1rem; }
.cand-slogan { font-size: 0.85rem; font-style: italic; color: var(--text-secondary); margin-top: 0.35rem; }
.cand-stats { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); margin: 0.6rem 0; }
.cand-actions { display: flex; gap: 0.5rem; }

/* Support / Donation */
.donation-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.amount-btn {
  padding: 0.75rem; border: 1.5px solid var(--border); border-radius: var(--radius);
  background: white; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: all 0.15s;
}
.amount-btn.active, .amount-btn:hover {
  border-color: var(--primary); background: rgba(13, 148, 136, 0.08); color: var(--primary);
}

.pay-summary { background: var(--bg-secondary); border-radius: var(--radius); padding: 0.85rem; }
.pay-row { display: flex; justify-content: space-between; padding: 0.35rem 0; font-size: 0.9rem; }
.pay-row + .pay-row { border-top: 1px solid var(--border); }

.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.form-control-sm { padding: 0.45rem 0.65rem; font-size: 0.85rem; }

/* ===== Phase 3: Media, Comments, Payments ===== */

.media-upload-btn {
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.media-upload-btn:hover { background: var(--bg-secondary); }

.media-preview {
  margin: 0.5rem 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 200px;
}
.media-preview img,
.media-preview video {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}
.media-preview .remove-media {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
}

.post-media {
  margin-top: 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.post-media img,
.post-media video {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

/* Comments Drawer */
.comments-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.comments-drawer.open {
  pointer-events: auto;
  visibility: visible;
}
.comments-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.25s;
}
.comments-drawer.open .comments-drawer-backdrop { opacity: 1; }

.comments-drawer-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 75vh;
  background: white;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
}
.comments-drawer.open .comments-drawer-panel { transform: translateY(0); }

.comments-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.comments-drawer-header h3 { margin: 0; font-size: 1rem; }
.comments-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  -webkit-overflow-scrolling: touch;
}
.comment-item {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.comment-item .avatar { flex-shrink: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-author { font-weight: 600; font-size: 0.85rem; }
.comment-text { font-size: 0.9rem; margin: 0.15rem 0; word-break: break-word; }
.comment-meta { font-size: 0.7rem; color: var(--text-muted); }

.comment-replies {
  margin-left: 2.5rem;
  margin-top: 0.5rem;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
}

.comments-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: white;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.comments-form .form-control { flex: 1; }

/* Spinner already exists; ensure small version works */
.btn .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.35rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Phase 4: Admin, Live, Notifications ===== */

.admin-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.admin-tabs a {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}
.admin-tabs a.active {
  background: var(--primary);
  color: white;
}

.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  text-align: center;
}
.stat-card strong {
  display: block;
  font-size: 1.25rem;
  color: var(--primary);
}
.stat-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-paid, .badge-verified, .badge-completed { background: #d1fae5; color: #065f46; }
.badge-rejected, .badge-failed { background: #fee2e2; color: #991b1b; }

.notif-unread {
  border-left: 3px solid var(--primary);
  background: rgba(13, 148, 136, 0.04);
}

.live-video-wrap {
  position: relative;
  background: #0a0a0a;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 9/16;
  max-height: 70vh;
}
.live-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-local {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 28%;
  max-width: 120px;
  border-radius: 8px;
  border: 2px solid white;
  z-index: 2;
}
.live-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

/* ===== Phase 5: Search ===== */
.search-form { padding: 0.75rem; }
.search-input-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.search-input-wrap .form-control { flex: 1; }
.search-section {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.search-hit { transition: border-color 0.15s; }
.search-hit:hover { border-color: var(--primary); }

/* ===== Phase 6 production polish ===== */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: contain; }

.app-shell {
  min-height: 100dvh;
  min-height: 100vh;
}

.main-content {
  padding-bottom: calc(var(--nav-height, 64px) + 1.25rem + env(safe-area-inset-bottom, 0px));
}

.bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.auth-page {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
  max-width: 420px;
  margin: 0 auto;
}

.form-control, .btn, select, textarea, input {
  font-size: 16px; /* prevent iOS zoom */
}

@media (min-width: 768px) {
  .app-shell { max-width: 560px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .admin-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 380px) {
  .bottom-nav .nav-item { font-size: 0.65rem; }
  .donation-amounts { grid-template-columns: 1fr 1fr; }
}
