/* =============================================================================
   Camp Nageela Parent Portal — Stylesheet
   Themed to match campnageela.org
   ============================================================================= */

:root {
  --navy: #1a3a5c;
  --navy-dark: #122840;
  --blue: #2e6da4;
  --blue-light: #4a90c4;
  --green: #4a8c3f;
  --green-light: #5ba350;
  --gold: #e8a020;
  --gold-dark: #c8841a;
  --cream: #f8f6f0;
  --warm-white: #ffffff;
  --charcoal: #1a1a1a;
  --mid: #555;
  --light: #999;
  --border: #dde4ec;
  --danger: #c0392b;
  --success: #27ae60;
  --shadow: 0 2px 16px rgba(26,58,92,0.12);
  --radius: 8px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ── */
.navbar {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}
.nav-brand:hover { text-decoration: none; color: var(--gold); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--gold); text-decoration: none; }
.nav-active { color: var(--gold) !important; }
.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  padding: 0;
}
.btn-link:hover { color: var(--gold); }

/* ── Hero banner ── */
.portal-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: white;
  padding: 32px 24px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}
.portal-hero h1 { font-size: 2rem; margin-bottom: 6px; }
.portal-hero p { opacity: 0.85; font-size: 0.95rem; }

/* ── Main ── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  flex: 1;
  width: 100%;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.page-header h2 { font-size: 2rem; color: var(--navy); }
.subtitle { color: var(--light); font-size: 0.9rem; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-dark); text-decoration: none; color: white; }
.btn-secondary { background: white; color: var(--navy); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--cream); text-decoration: none; color: var(--navy); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: 0.85; text-decoration: none; color: white; }
.btn-gold { background: var(--gold); color: white; }
.btn-gold:hover { background: var(--gold-dark); text-decoration: none; color: white; }
.btn-full { width: 100%; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ── Login ── */
.login-page {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 48px 24px;
}
.login-container { width: 100%; max-width: 420px; }
.login-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  padding: 36px 32px;
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-header .login-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}
.login-header h1 { font-size: 1.4rem; color: var(--navy); margin-bottom: 4px; }
.login-header p { color: var(--light); font-size: 0.9rem; }
.login-divider {
  width: 40px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto;
  border-radius: 2px;
}
.login-form { display: flex; flex-direction: column; gap: 20px; }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--mid); }
.form-group input:not([type="checkbox"]):not([type="radio"]), .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  background: white;
  transition: border-color 0.15s;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):focus, .form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46,109,164,0.1);
}
.form-group small { color: var(--light); font-size: 0.8rem; }
.form-check label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.admin-form { max-width: 560px; display: flex; flex-direction: column; gap: 20px; }
.camper-checkboxes { display: flex; flex-direction: column; gap: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.9rem; }

/* ── Reply option card ── */
.reply-option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s;
  margin-top: 4px;
}
.reply-option-label:has(input:checked) {
  border-color: var(--blue);
  background: #eff6ff;
}
.reply-option-label input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}
.reply-option-label:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.reply-option-text { display: flex; flex-direction: column; gap: 3px; }
.reply-option-title { font-weight: 500; font-size: 0.9rem; color: var(--charcoal); }
.reply-option-credit { color: var(--mid); font-weight: 400; font-size: 0.85rem; }
.reply-option-desc { font-size: 0.8rem; color: var(--light); line-height: 1.4; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c6c6; }
.alert-success { background: #eafaf1; color: var(--success); border: 1px solid #c3e6cb; }

/* ── Photo grid ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--border);
  position: relative;
  cursor: pointer;
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,58,92,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.photo-card:hover .photo-overlay { opacity: 1; }
.photo-card:hover img { transform: scale(1.03); }
.zoom-icon { color: white; font-size: 1.5rem; }

/* ── Albums ── */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.album-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  color: var(--charcoal);
  border-top: 3px solid var(--navy);
}
.album-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,58,92,0.18); text-decoration: none; }
.album-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.album-placeholder { width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--navy), var(--blue)); }
.album-info { padding: 16px; }
.album-info h3 { font-size: 1rem; color: var(--navy); margin-bottom: 4px; }
.album-info p { color: var(--light); font-size: 0.85rem; }
.album-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-boys { background: #dbeafe; color: #1e40af; }
.badge-girls { background: #fce7f3; color: #9d174d; }
.badge-untagged { background: #f3f4f6; color: #6b7280; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  color: var(--mid);
}

/* ── Admin ── */
.admin-grid { display: flex; flex-direction: column; gap: 40px; }
.admin-section { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-top: 3px solid var(--navy); }
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.admin-section-header h3 { font-size: 1.1rem; color: var(--navy); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 24px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--navy); font-weight: 600; background: #f0f4f8; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }
.table-actions { display: flex; gap: 8px; }
.division-select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--light);
}

/* ── Error page ── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
  text-align: center;
  padding: 24px;
}
.error-page h1 { font-size: 3rem; color: var(--navy); }

/* ── Footer ── */
.footer {
  background: var(--navy);
  border-top: 3px solid var(--gold);
  padding: 20px 24px;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}
.footer a { color: var(--gold); }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-actions { display: flex; gap: 12px; }

/* ── Camper cards ── */
.camper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.camper-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--charcoal);
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  border-top: 3px solid var(--gold);
}
.camper-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,58,92,0.18); text-decoration: none; }
.camper-cover { width: 100%; aspect-ratio: 1; background: var(--border); overflow: hidden; }
.camper-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camper-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
}
.camper-info { padding: 14px 16px; }
.camper-info h3 { font-size: 1rem; color: var(--navy); }

/* ── Home portal cards ── */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: white;
  padding: 48px 24px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}
.home-hero h1 { font-size: 2rem; margin-bottom: 6px; }
.home-hero p { opacity: 0.85; font-size: 0.95rem; }
.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 760px;
  margin: 60px auto;
  padding: 0 24px;
}
.portal-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 48px 32px;
  text-align: center;
  display: block;
  color: var(--charcoal);
  border-top: 4px solid var(--navy);
  transition: transform 0.15s, box-shadow 0.15s;
}
.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,58,92,0.2);
  text-decoration: none;
}
.portal-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 12px;
}
.portal-card h2 { font-size: 1.75rem; color: var(--navy); margin-bottom: 10px; }
.portal-card p { color: var(--mid); font-size: 0.9rem; line-height: 1.5; }

/* ── Camp Mail ── */
.cm-dash {}
.cm-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.cm-dash-header h2 { font-size: 2rem; color: var(--navy); }
.cm-dash-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cm-balance-chip {
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: var(--navy);
  color: white;
  border-radius: 20px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background 0.15s;
}
.cm-balance-chip:hover { background: var(--navy-dark); text-decoration: none; color: white; }
.cm-balance-num { font-size: 1.2rem; font-weight: 700; font-family: 'DM Sans', sans-serif; }
.cm-balance-label { font-size: 0.8rem; opacity: 0.8; }
.cm-credits-notice {
  background: #f0f4f8;
  border-left: 3px solid var(--blue);
  padding: 10px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.9rem;
  color: var(--mid);
  margin-bottom: 24px;
}
.cm-write-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 760px;
}
.cm-message-layout { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.cm-letter-card, .cm-reply-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cm-letter-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: #f0f4f8;
  font-size: 0.85rem;
  color: var(--mid);
  border-bottom: 1px solid var(--border);
}
.post-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--charcoal);
}
.post-body p { margin: 0 0 0.3em; }
.post-body p:last-child { margin-bottom: 0; }
.post-body h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin: 1em 0 0.3em; }
.post-body h3 { font-size: 1rem; font-weight: 600; color: var(--navy); margin: 0.8em 0 0.3em; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin-bottom: 0.6em; }
.post-body li { margin-bottom: 0.2em; }
.post-body a { color: var(--navy); text-decoration: underline; }
.post-body strong { font-weight: 600; }

.cm-letter-body {
  padding: 24px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--charcoal);
}
.cm-letter-body p { margin-bottom: 0.4em; }
.cm-letter-body p:last-child { margin-bottom: 0; }
.cm-reply-card h3 { padding: 14px 24px; font-size: 1rem; color: var(--navy); border-bottom: 1px solid var(--border); background: #f0f4f8; }
.cm-reply-meta { padding: 10px 24px 0; font-size: 0.85rem; color: var(--light); }
.cm-reply-body { padding: 16px 24px; font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; }
.cm-reply-waiting { padding: 16px 24px; color: var(--light); font-size: 0.9rem; font-style: italic; }
.cm-credits-layout { max-width: 760px; }
.cm-balance-display {
  padding: 32px;
  text-align: center;
}
.cm-balance-big {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: var(--navy);
  line-height: 1;
}
.cm-balance-unit { font-size: 1.1rem; color: var(--mid); margin-left: 4px; }
.cm-balance-display p { color: var(--light); font-size: 0.9rem; margin-top: 8px; }

/* ── Inline reply (dashboard) ── */
.cm-reply-inline {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}
.cm-reply-inline:last-child { border-bottom: none; }
.cm-reply-inline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--mid);
  margin-bottom: 10px;
}
.cm-reply-inline-meta strong { color: var(--navy); font-size: 0.95rem; }
.cm-reply-inline-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--charcoal);
  white-space: pre-wrap;
  background: #f8f9fa;
  border-left: 3px solid var(--green);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ── Status badges ── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-printed { background: #dcfce7; color: #166534; }
.status-pending { background: #fef9c3; color: #854d0e; }
.status-replied { background: #dbeafe; color: #1e40af; }
.status-awaiting { background: #f3f4f6; color: #6b7280; }

/* ── Reply page (public) ── */
.reply-page {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  min-height: 100vh;
  padding: 40px 24px;
}
.reply-container { max-width: 860px; margin: 0 auto; }
.reply-header {
  text-align: center;
  margin-bottom: 32px;
  color: white;
}
.reply-header h1 { font-size: 1.6rem; }
.reply-header p { opacity: 0.8; margin-top: 4px; }
.reply-header .login-divider { background: rgba(255,255,255,0.4); }
.reply-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  padding: 32px;
}
.reply-done { text-align: center; padding: 48px 32px; }
.reply-done-icon {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: 12px;
}
.reply-done h2 { color: var(--navy); margin-bottom: 8px; }
.reply-done p { color: var(--mid); }
.reply-from { font-size: 0.9rem; color: var(--mid); margin-bottom: 16px; }
.reply-original {
  background: #f8f9fa;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 24px;
  max-height: 300px;
  overflow-y: auto;
}
.reply-divider {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--light);
  margin-bottom: 16px;
}

/* ── Hamburger (hidden on desktop) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 1px;
}

/* ── Name grid (registration) ── */
.reg-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Write form actions row ── */
.cm-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  /* Navbar → hamburger */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a,
  .nav-links .btn-link { padding: 12px 24px; font-size: 0.95rem; width: 100%; text-align: left; }
  .nav-links form { display: block; }
  .navbar { position: relative; }

  /* Content spacing */
  .main-content { padding: 24px 16px; }
  .portal-hero { padding: 20px 16px; }
  .portal-hero h1 { font-size: 1.5rem; }
  .home-hero { padding: 32px 16px; }
  .home-hero h1 { font-size: 1.5rem; }
  .page-header h2 { font-size: 1.5rem; }
  .page-header { flex-direction: column; gap: 8px; }

  /* Portal home cards — force single column */
  .portal-cards { grid-template-columns: 1fr; gap: 16px; margin: 32px auto; padding: 0 16px; }
  .portal-card { padding: 32px 20px; }
  .portal-card h2 { font-size: 1.4rem; }

  /* Tables — horizontal scroll */
  .admin-section { overflow-x: auto; }
  .admin-table th, .admin-table td { padding: 10px 12px; white-space: nowrap; }

  /* Campmail dashboard */
  .cm-dash-header { flex-direction: column; gap: 12px; }
  .cm-dash-actions { flex-wrap: wrap; }
  .cm-balance-big { font-size: 2.5rem; }
  .cm-write-card { padding: 20px; overflow-x: hidden; }

  /* Write form */
  .cm-form-actions { flex-direction: column; }
  .cm-form-actions .btn { width: 100%; text-align: center; }
  .checkbox-label { align-items: flex-start; }
  .ql-toolbar.ql-snow { flex-wrap: wrap !important; }
  #quill-editor { min-width: 0; }

  /* Registration name grid → stack on mobile */
  .reg-name-grid { grid-template-columns: 1fr; }

  /* Photos */
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

  /* Login / register */
  .login-card { padding: 28px 20px; }
  .login-page { padding: 32px 16px; }

  /* Reply page */
  .reply-page { padding: 24px 16px; }
  .reply-card { padding: 24px 20px; }

  /* Admin form */
  .admin-form { max-width: 100%; }
  .admin-section-header { flex-wrap: wrap; gap: 8px; }
  .hide-mobile { display: none; }
  .hide-mobile-block { display: none !important; }
  .show-mobile-block { display: block !important; }
}

.show-mobile-block { display: none; }

.cm-chevron { color: var(--text-muted); transition: transform 0.2s; display: inline-block; flex-shrink: 0; }

.cm-letter-cards { padding: 8px 0; }
.cm-letter-list-item {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}
.cm-letter-list-item:last-child { border-bottom: none; }
.cm-letter-list-item:hover { background: #f8fafc; }
.cm-letter-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.cm-letter-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
