:root {
  --cream: #f7f3e8;
  --paper: #fffdf7;
  --evergreen: #173f35;
  --evergreen-2: #24584a;
  --coral: #b64231;
  --coral-dark: #8f2f24;
  --gold: #e5ad3d;
  --ink: #21332e;
  --muted: #64736e;
  --line: #dcded6;
  --soft-green: #e7efe8;
  --soft-coral: #f9e5de;
  --shadow: 0 18px 50px rgba(28, 59, 49, .1);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}
.skip-link { position: fixed; z-index: 1100; top: .5rem; left: .5rem; padding: .65rem 1rem; border-radius: .5rem; color: #fff; background: var(--evergreen); transform: translateY(-150%); }
.skip-link:focus { color: #fff; transform: translateY(0); }
a { color: var(--evergreen-2); }
a:hover { color: var(--coral-dark); }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.08; }
h1 { font-weight: 750; }
h2, h3 { font-weight: 700; }

.site-header { background: var(--evergreen); }
.navbar { min-height: 74px; padding: .75rem 0; }
.navbar-brand { color: #fff !important; font-size: 1.2rem; font-weight: 750; letter-spacing: -.02em; }
.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50% 50% 48% 52%;
  color: var(--evergreen);
  background: var(--gold);
  font-family: Georgia, serif;
}
.navbar-dark .navbar-nav .nav-link { color: rgba(255,255,255,.8); font-weight: 600; }
.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus { color: #fff; }
.account-label { color: rgba(255,255,255,.75); font-size: .875rem; }

.dashboard-hero { padding: 2rem 0 1rem; background: var(--evergreen); }
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, .8fr);
  gap: 2rem;
  padding: clamp(1.75rem, 4vw, 3.75rem);
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16,45,39,.96) 0%, rgba(16,45,39,.84) 52%, rgba(16,45,39,.7) 100%),
    url("../images/potluck-table.png") center / cover no-repeat;
  box-shadow: 0 24px 70px rgba(4, 24, 19, .28);
}
.hero-copy { max-width: 680px; }
.hero-copy h1 { max-width: 620px; margin: .55rem 0 1rem; font-size: clamp(2.35rem, 6vw, 4.8rem); }
.hero-copy p { max-width: 580px; margin-bottom: 1.75rem; color: rgba(255,255,255,.8); font-size: 1.1rem; }
.eyebrow { display: block; color: var(--coral); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero-panel .eyebrow, .event-detail-hero .eyebrow { color: #ffd47a; }
.hero-stats { align-self: end; display: grid; gap: .75rem; }
.hero-stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.hero-stats strong { font-size: 1.9rem; }
.hero-stats span { color: rgba(255,255,255,.7); text-align: right; }

.btn { border-radius: 999px; font-weight: 700; padding-inline: 1.15rem; }
.btn-coral { color: #fff; border-color: var(--coral); background: var(--coral); }
.btn-coral:hover, .btn-coral:focus { color: #fff; border-color: var(--coral-dark); background: var(--coral-dark); }
.btn-outline-evergreen { color: var(--evergreen); border-color: var(--evergreen); }
.btn-outline-evergreen:hover { color: #fff; background: var(--evergreen); }

.content-section { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading h2 { margin: .35rem 0 0; font-size: clamp(1.8rem, 4vw, 2.55rem); }
.section-heading.compact { margin-bottom: 1.15rem; }
.section-heading.compact h2 { font-size: 1.55rem; }

.event-card { display: grid; grid-template-columns: 92px 1fr; overflow: hidden; border: 1px solid rgba(23,63,53,.08); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.event-card:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(28,59,49,.15); }
.event-date { display: flex; flex-direction: column; align-items: center; padding: 1.5rem .75rem; color: #fff; background: var(--coral); text-transform: uppercase; }
.event-date span { font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.event-date strong { font-size: 2.5rem; line-height: 1; }
.event-card-body { position: relative; padding: 1.5rem; }
.event-card h3 { margin: .25rem 0 0; font-size: 1.45rem; }
.event-card h3 a { color: var(--ink); text-decoration: none; }
.event-time { margin: 0; color: var(--coral-dark); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.event-description, .event-location { color: var(--muted); }
.event-description { margin: 1rem 0 .6rem; }
.event-location { margin: 0 0 1.1rem; font-size: .92rem; }
.event-metrics { display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; margin-bottom: .9rem; font-size: .88rem; }
.progress-label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; color: var(--muted); font-size: .78rem; }
.progress { height: 7px; border-radius: 99px; background: #e6e6df; }
.progress-bar { background: var(--gold); }
.stretched-link-label { display: inline-flex; gap: .4rem; margin-top: 1.15rem; font-weight: 750; text-decoration: none; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: .28rem .62rem; font-size: .7rem; font-weight: 800; letter-spacing: .03em; white-space: nowrap; }
.status-upcoming, .status-fulfilled { color: #17533f; background: #dceee3; }
.status-partial { color: #725513; background: #f7e7b7; }
.status-needed { color: #8e382d; background: var(--soft-coral); }
.past-events summary { cursor: pointer; color: var(--evergreen); font-weight: 750; }

.event-detail-hero { padding: 2.25rem 0 3rem; color: #fff; background: linear-gradient(120deg, var(--evergreen), #24584a); }
.event-detail-hero h1 { margin: .45rem 0 .8rem; font-size: clamp(2.3rem, 6vw, 4.4rem); }
.event-detail-hero .lead { max-width: 700px; color: rgba(255,255,255,.8); }
.back-link { color: inherit; font-weight: 700; text-decoration: none; opacity: .8; }
.back-link:hover { color: inherit; opacity: 1; }
.event-facts { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; color: rgba(255,255,255,.78); }
.hero-actions { display: flex; justify-content: flex-end; gap: .75rem; }
.content-card { min-width: 0; padding: clamp(1.35rem, 3vw, 2rem); border: 1px solid rgba(23,63,53,.1); border-radius: 22px; background: var(--paper); box-shadow: 0 14px 40px rgba(28,59,49,.07); }
.content-card > h2 { margin: .4rem 0 1rem; font-size: 1.65rem; }
.menu-list { display: grid; gap: 1rem; }
.menu-item { padding: 1.15rem 0 1.3rem; border-bottom: 1px solid var(--line); }
.menu-item:last-child { padding-bottom: 0; border-bottom: 0; }
.menu-item-top { display: flex; justify-content: space-between; gap: 1rem; }
.menu-item h3 { margin: .55rem 0 .2rem; font-size: 1.25rem; }
.menu-item h3 a { color: var(--ink); text-decoration: none; }
.menu-item h3 a:hover { color: var(--coral-dark); }
.menu-item p { margin: 0 0 .8rem; color: var(--muted); font-size: .92rem; }
.quantity-block { min-width: 92px; text-align: right; }
.quantity-block strong { display: block; font-size: 1.55rem; }
.quantity-block span { display: block; color: var(--muted); font-size: .72rem; }
.progress-fulfilled { background: var(--evergreen-2); }
.progress-partial { background: var(--gold); }
.progress-needed { background: var(--coral); }
.pledge-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.pledge-list span { padding: .3rem .6rem; border-radius: 999px; color: var(--evergreen); background: var(--soft-green); font-size: .76rem; }
.menu-item-actions { display: flex; gap: 1rem; margin-top: .85rem; font-size: .82rem; font-weight: 750; }
.menu-item-actions a { text-decoration: none; }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1rem; }
.summary-grid div { padding: 1rem; border-radius: 15px; background: var(--soft-green); }
.summary-grid strong, .summary-grid span { display: block; }
.summary-grid strong { font-size: 1.6rem; }
.summary-grid span { color: var(--muted); font-size: .76rem; }
.guest-list { display: grid; gap: .9rem; }
.guest-row { display: flex; align-items: center; gap: .75rem; }
.guest-row strong, .guest-row small { display: block; }
.guest-row small { color: var(--muted); }
.avatar { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: #fff; background: var(--evergreen-2); font-weight: 800; }

.empty-state { padding: clamp(2rem, 6vw, 4rem); border: 1px dashed #b8c0b9; border-radius: 22px; text-align: center; background: rgba(255,255,255,.48); }
.empty-state.compact { padding: 2rem; }
.empty-state h1, .empty-state h3 { margin: .5rem 0; }
.auth-shell { display: grid; min-height: calc(100vh - 144px); place-items: center; padding-block: 3rem; }
.auth-card { width: min(100%, 520px); padding: clamp(1.5rem, 5vw, 3rem); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
.auth-card h1 { margin: .55rem 0 1rem; font-size: clamp(2rem, 5vw, 3.15rem); }
.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-provider { display: flex; justify-content: space-between; align-items: center; padding-block: .75rem; border: 1px solid var(--line); color: var(--ink); background: #fff; }
.btn-provider small { color: var(--muted); font-size: .68rem; }
.auth-register { margin: 1rem 0 0; text-align: center; font-size: .9rem; }
.form-control, .form-select { min-height: 48px; border-color: #bdc6c0; border-radius: 12px; }
.form-control:focus, .form-select:focus, .btn:focus-visible, a:focus-visible { border-color: var(--coral); box-shadow: 0 0 0 .25rem rgba(223,91,67,.2); outline: 0; }
.site-footer { padding: 1.5rem 0; color: rgba(255,255,255,.65); background: #102d27; font-size: .82rem; }

.narrow-page { max-width: 880px; }
.page-heading { margin: 1.5rem 0 2rem; }
.page-heading h1, .section-heading h1, .detail-header h1, .profile-header h1 { margin: .4rem 0 .55rem; font-size: clamp(2.15rem, 5vw, 3.6rem); }
.page-heading p, .section-intro, .detail-header p, .profile-header p { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: 1.02rem; }
.form-card { padding: clamp(1.4rem, 4vw, 2.6rem); }
.form-label { margin-bottom: .38rem; font-weight: 700; }
.form-text { color: var(--muted); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.danger-link { color: #a7392b; font-weight: 700; text-decoration: none; }
.danger-link:hover { color: #7f251a; text-decoration: underline; }
.danger-card { border-color: rgba(167,57,43,.25); }
.danger-card h1 { margin: .55rem 0 1rem; font-size: clamp(2rem, 5vw, 3.2rem); }
.count-badge { flex: 0 0 auto; padding: .45rem .85rem; border-radius: 999px; color: var(--evergreen); background: var(--soft-green); font-size: .82rem; font-weight: 800; }

.directory-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.person-card { display: flex; min-width: 0; align-items: center; gap: 1rem; padding: 1.25rem; overflow: hidden; border: 1px solid rgba(23,63,53,.1); border-radius: 18px; background: var(--paper); box-shadow: 0 10px 30px rgba(28,59,49,.06); }
.person-card-main { min-width: 0; flex: 1; }
.person-card h2 { margin: 0 0 .22rem; font-size: 1.2rem; }
.person-card h2 a { color: var(--ink); text-decoration: none; }
.person-card p { overflow: hidden; margin: 0; color: var(--muted); font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.person-stats { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .55rem; color: var(--muted); font-size: .75rem; }
.card-arrow { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--evergreen); background: var(--soft-green); font-weight: 800; text-decoration: none; }
.avatar-lg { flex-basis: 54px; width: 54px; height: 54px; font-size: 1.15rem; }
.avatar-xl { flex-basis: 76px; width: 76px; height: 76px; font-size: 1.65rem; }
.profile-header, .detail-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; }
.detail-header { align-items: end; justify-content: space-between; }
.detail-list { margin: 1.2rem 0 0; }
.detail-list div { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.detail-list dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.simple-list { display: grid; }
.simple-list a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.simple-list a:last-child { border-bottom: 0; }
.simple-list strong, .simple-list small { display: block; }
.simple-list small { color: var(--muted); }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1.5rem; }
.metric-strip > div { padding: 1rem; border-radius: 15px; background: var(--soft-green); }
.metric-strip strong, .metric-strip span { display: block; }
.metric-strip strong { font-size: 1.45rem; }
.metric-strip span { color: var(--muted); font-size: .74rem; }
.progress-lg { height: 12px; }

.manage-list { display: grid; }
.manage-row { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.manage-row:last-child { border-bottom: 0; }
.manage-person { display: flex; min-width: 0; align-items: center; gap: .75rem; }
.manage-person strong, .manage-person small { display: block; }
.manage-person small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.inline-controls { display: flex; align-items: center; gap: .65rem; }
.inline-controls .form-select { min-height: 38px; width: auto; }
.quantity-input { width: 165px; }
.sticky-card { position: sticky; top: 1.5rem; }
.stacked-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.small-action { font-size: .8rem; font-weight: 800; text-decoration: none; }
.status-muted { color: #59625f; background: #e8e9e6; }
.admin-table { margin-bottom: 0; }
.table-responsive { max-width: 100%; overflow-x: auto; }
.admin-table > :not(caption) > * > * { padding: .9rem .65rem; border-bottom-color: var(--line); background: transparent; }
.admin-table thead th { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 767.98px) {
  .account-label { display: none; }
  .hero-panel { grid-template-columns: 1fr; border-radius: 20px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .hero-stats > div { display: block; padding: .75rem; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); }
  .hero-stats strong, .hero-stats span { display: block; text-align: left; }
  .hero-stats span { font-size: .7rem; }
  .event-card { grid-template-columns: 68px 1fr; }
  .event-date strong { font-size: 2rem; }
  .event-card-body { padding: 1.15rem; }
  .event-card-body > .d-flex { display: block !important; }
  .status-upcoming { margin-top: .5rem; }
  .hero-actions { justify-content: flex-start; }
  .menu-item-top { display: block; }
  .quantity-block { margin-bottom: .75rem; text-align: left; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .directory-grid { grid-template-columns: 1fr; }
  .profile-header, .detail-header { align-items: flex-start; flex-direction: column; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .manage-row { grid-template-columns: 1fr; gap: .7rem; }
  .inline-controls { flex-wrap: wrap; }
  .sticky-card { position: static; }
  .form-actions.justify-content-between { align-items: stretch; flex-direction: column-reverse; }
}

@media (max-width: 359.98px) {
  .person-card { gap: .65rem; padding: .9rem; }
  .avatar-lg { flex-basis: 44px; width: 44px; height: 44px; }
  .card-arrow { flex-basis: 32px; width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
