:root {
  --bg: #f5efe4;
  --bg-deep: #eee4d2;
  --surface: rgba(255, 252, 247, 0.94);
  --surface-strong: #fffaf2;
  --surface-soft: #f8f1e7;
  --ink: #1f2730;
  --muted: #6a726f;
  --navy: #223c5c;
  --navy-deep: #172c44;
  --red: #7f2430;
  --red-deep: #651d27;
  --gold: #c39249;
  --gold-soft: #e5d3b0;
  --line: rgba(104, 85, 54, 0.15);
  --shadow: 0 18px 50px rgba(34, 60, 92, 0.10);
  --shadow-soft: 0 12px 28px rgba(34, 60, 92, 0.07);
  --radius: 24px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(195,146,73,.14), transparent 28%),
    linear-gradient(180deg, #fbf8f1, var(--bg));
}
a { color: inherit; text-decoration: none; }
strong, h1, h2, h3 { font-family: "Libre Baskerville", Georgia, serif; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 56px; }
.main-shell { padding-top: 30px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy-deep);
  color: white;
  box-shadow: var(--shadow);
}
.nav-shell {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}
.brand strong { display: block; font-size: 1.25rem; color: white; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  position: relative;
  z-index: 5;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 999px;
  color: white;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  font-weight: 600;
  font-size: .64rem;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.18); }

.hero,
.panel,
.hero-aside-card,
.entry-card,
.photo-card,
.goal-ring-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.hero-polished {
  display: grid;
  grid-template-columns: 1.35fr .8fr;
  gap: 22px;
  padding: 34px;
  margin-bottom: 22px;
  background:
    radial-gradient(circle at top right, rgba(195,146,73,.12), transparent 30%),
    linear-gradient(180deg, rgba(255,250,242,.96), rgba(248,241,231,.96));
}
.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.08;
  color: var(--navy-deep);
}
.hero-copy .lead {
  margin: 0 0 12px;
  font-size: 1.08rem;
  line-height: 1.75;
}
.hero-note {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
}
.hero-aside {
  display: grid;
  gap: 16px;
}
.hero-aside-card {
  padding: 22px;
}
.hero-aside-card strong {
  display: block;
  margin: 8px 0;
  font-size: 1.3rem;
}
.tone-navy {
  background: linear-gradient(180deg, rgba(34,60,92,.98), rgba(23,44,68,.98));
  color: #f6f7fb;
}
.tone-navy .mini-label,
.tone-navy p { color: rgba(255,255,255,.82); }
.tone-cream { background: var(--surface-strong); }

.eyebrow,
.mini-label {
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--red);
  font-size: .75rem;
  font-weight: 700;
}
.muted,
.section-head p,
.hero-aside-card p,
.goal-ring-card p,
.photo-card figcaption { color: var(--muted); }
.section-head { margin-bottom: 16px; }
.section-head h2,
.section-head h1 { margin: 0 0 8px; color: var(--navy-deep); }
.centered { text-align: center; }
.split-soft {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  border: 1px solid rgba(34,60,92,.15);
  background: white;
  color: var(--navy-deep);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.button.primary {
  background: linear-gradient(135deg, var(--navy), var(--red));
  color: white;
  border-color: transparent;
}
.button.soft {
  background: var(--surface-soft);
  color: var(--navy);
}

.goal-panel { padding: 28px; margin-bottom: 22px; }
.compact-goal-panel {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.goal-ring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  justify-content: center;
  gap: 22px;
}
.goal-ring-card {
  padding: 22px;
  text-align: center;
}
.goal-ring-card h3 {
  margin: 0 0 8px;
  color: var(--navy-deep);
}
.goal-ring-wrap {
  position: relative;
  width: min(100%, 250px);
  margin: 0 auto 18px;
}
.goal-ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.goal-ring-center span {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 2.3rem;
  color: var(--navy-deep);
}
.goal-ring-center small {
  color: var(--muted);
  font-size: .92rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
  padding: 24px;
}
.polished-layout { align-items: start; }
.chart-shell {
  padding: 18px;
  background: var(--surface-strong);
  border-radius: var(--radius-sm);
}
.entry-list,
.photo-grid { display: grid; gap: 14px; }
.entry-card,
.photo-card { padding: 18px; }
.entry-card.elevated { background: var(--surface-strong); }
.photo-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.polished-photo-grid { gap: 16px; }
.polished-photo-card {
  overflow: hidden;
  padding: 0;
}
.polished-photo-card img,
.thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.polished-photo-card figcaption {
  padding: 14px 16px 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid label,
.temple-grid label { display: grid; gap: 6px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(34,60,92,.16);
  background: #fff;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(34,60,92,.45);
  box-shadow: 0 0 0 4px rgba(34,60,92,.08);
}
.full-width { grid-column: 1 / -1; }
.temple-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
  grid-column: 1 / -1;
}
.checkbox-row {
  display: flex !important;
  gap: 10px;
  align-items: center;
  font-weight: 500 !important;
}
.hidden-field { position: absolute; left: -9999px; }

.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
}
.flash.success {
  background: #ebf5ec;
  color: #25543c;
  border-color: rgba(37,84,60,.14);
}
.flash.error {
  background: #fbeceb;
  color: #7b1f28;
  border-color: rgba(123,31,40,.14);
}

.narrow { max-width: 560px; margin: 24px auto; }
.prose {
  padding: 28px;
  line-height: 1.8;
}
.split {
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
}
.notification-admin { display: grid; gap: 18px; }
.recipient-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.recipient-form label {
  flex: 1 1 320px;
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.recipient-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.compact-hero { padding: 28px; }
.clean-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}
.form-panel,
.polished-form-panel,
.newsletter-hero,
.polished-login-card,
.photo-panel { padding: 28px; }
.polished-form-grid { gap: 18px; }
.polished-subpanel {
  padding: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.card-check {
  padding: 14px 16px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.card-check input { width: auto; }
.admin-hero { margin-bottom: 18px; }
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.mini-stat-card {
  padding: 18px;
  text-align: left;
}
.mini-stat-card h2 {
  margin: 8px 0 0;
  color: var(--navy-deep);
}
.moderation-card .thumb {
  border-radius: 14px;
  margin-bottom: 12px;
}
.mini-note {
  margin: 0;
  font-size: .92rem;
  color: var(--red-deep);
}
.newsletter-list { gap: 16px; }
.newsletter-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.share-panel {
  padding: 24px 28px;
  margin-bottom: 22px;
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.share-link-input {
  flex: 1 1 320px;
  min-width: 0;
  background: var(--surface-strong);
}
.slideshow-shell {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #d8d1c4;
}
.slideshow-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity .55s ease;
  pointer-events: none;
}
.slideshow-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.slideshow-slide img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #d8d1c4;
}
.slideshow-slide figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(23,44,68,.64);
  color: white;
}
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.gallery-card {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.gallery-card img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #efe7d8;
}
.gallery-card figcaption {
  padding: 14px 16px 18px;
}
.newsletter-feature {
  display: grid;
  gap: 18px;
}
.newsletter-viewer {
  width: 100%;
}
.resume-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.resume-control {
  border: 1px solid rgba(34,60,92,.22);
  background: rgba(34,60,92,.08);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.resume-control:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.resume-status {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.resume-canvas-wrap {
  width: 100%;
  height: auto;
  border-radius: 12px;
  overflow: visible;
  border: 1px solid var(--line);
  background: #f7f4ee;
  box-shadow: 0 10px 22px rgba(7, 24, 43, 0.14);
  padding: 0.6rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.resume-canvas {
  display: block;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(7, 24, 43, 0.18);
  max-width: 100%;
}
.resume-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
}
.resume-note a {
  color: var(--navy);
  font-weight: 700;
}
.resume-error {
  color: var(--red-deep);
  font-weight: 600;
}
.top-gap {
  margin-top: 28px;
}

@media (max-width: 900px) {
  .hero-polished,
  .two-col,
  .form-grid,
  .temple-grid {
    grid-template-columns: 1fr;
  }
  .goal-ring-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
  .nav-shell {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 3px;
  }
  .split-soft,
  .split,
  .recipient-card,
  .newsletter-card,
  .share-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .goal-ring-grid {
    grid-template-columns: repeat(2, minmax(145px, 1fr));
    gap: 12px;
  }
  .goal-ring-card {
    padding: 14px;
  }
  .goal-ring-wrap {
    width: min(100%, 165px);
  }
  .goal-ring-center span {
    font-size: 1.7rem;
  }
  .goal-ring-card h3 {
    font-size: 1rem;
  }
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-filter-panel,
.analytics-panel { padding: 24px 28px; margin-bottom: 22px; }
.analytics-filter-form {
  display: flex;
  justify-content: flex-end;
}
.analytics-filter-form label {
  min-width: 220px;
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.analytics-stats-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.analytics-grid-two {
  align-items: start;
}
.analytics-chart-shell {
  min-height: 320px;
}
.tall-chart-shell {
  min-height: 380px;
}
.analytics-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}
.analytics-list-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}
.analytics-list-row span {
  color: var(--muted);
}

@media (max-width: 1080px) {
  .analytics-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Admin Submissions Table */
.submissions-table-wrapper {
  overflow-x: auto;
  background: var(--surface-strong);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-top: 16px;
}
.submissions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.submissions-table th,
.submissions-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.submissions-table th {
  background: var(--surface-soft);
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  color: var(--navy-deep);
}
.submissions-table tr:last-child td {
  border-bottom: none;
}
.submissions-table tr:hover {
  background: rgba(34, 60, 92, 0.02);
}
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge.approved {
  background: #ebf5ec;
  color: #25543c;
}
.badge.pending {
  background: #fdf5e6;
  color: #b25e00;
}
.badge.rejected {
  background: #fbeceb;
  color: #7b1f28;
}
.badge.hidden {
  background: #e2e8f0;
  color: #4a5568;
}
.button.danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(127, 36, 48, 0.25);
}
.button.danger:hover {
  background: #fbeceb;
  border-color: var(--red);
}

/* Upload Overlay & Progress Bar Styles */
.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(23, 44, 68, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.upload-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}
.upload-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 30px 70px rgba(23, 44, 68, 0.25);
  text-align: center;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.upload-overlay.is-active .upload-card {
  transform: translateY(0) scale(1);
}
.upload-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}
.upload-icon-spinner {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.upload-icon-spinner .spinner-bg {
  stroke: var(--bg-deep);
}
.upload-icon-spinner .spinner-value {
  stroke: var(--gold);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s ease;
}
.upload-icon-arrow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  animation: bounceSlow 2s infinite ease-in-out;
}
.upload-icon-arrow svg {
  width: 32px;
  height: 32px;
}
@keyframes bounceSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.upload-card h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: var(--navy-deep);
  font-family: "Libre Baskerville", Georgia, serif;
}
.upload-status {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--muted);
}
.progress-bar-wrap {
  background: var(--bg-deep);
  border-radius: 999px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}
.progress-bar-value {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 999px;
  width: 0%;
  transition: width 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(195, 146, 73, 0.4);
}
.upload-percent {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy-deep);
}
