/* Evangelism Builder — shared brand shell.
   Light studio body with the original dark-navy header retained. */
:root {
  --navy: #16223b;
  --navy-deep: #0f1930;
  --navy-soft: #f4efe1;
  --paper: #faf7ee;
  --card: #ffffff;
  --border: #e6ddc7;
  --border-soft: #ddd0ae;
  --gold: #c9a96b;
  --gold-bright: #e0c491;
  --gold-ink: #96702e;
  --cream: #f6f1e4;
  --muted: #5b6275;
  --faint: #8891a6;
  --danger: #b23b30;
  --font-ui: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--gold-ink); }
a:hover { color: var(--navy); }

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(0, 0, 0, .18);
}
.topbar .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.topbar .name {
  font-weight: 700; font-size: 14px; letter-spacing: .04em;
  color: var(--cream);
}
.topbar .spacer { flex: 1; }
.topbar nav a {
  margin-left: 18px; font-size: 14px; text-decoration: none;
  color: var(--gold-bright);
}
.topbar nav a:hover { color: var(--cream); }
.topbar .muted { color: #9aa4c2; }

.wrap { max-width: 960px; margin: 0 auto; padding: 40px 24px 80px; }
.wrap.narrow { max-width: 420px; }

h1 { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 32px 0 12px; }
.sub { color: var(--muted); margin: 0 0 28px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px;
}

label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 6px; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-ui); font-size: 15px;
  color: var(--navy); background: var(--navy-soft);
  border: 1.5px solid var(--border-soft); border-radius: 6px;
  padding: 11px 13px;
}
input[type="checkbox"], input[type="radio"] {
  width: auto; padding: 0; border: none; accent-color: var(--gold);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
::placeholder { color: var(--faint); }
select option { background: var(--card); }

button {
  font-family: var(--font-ui); font-size: 15px; font-weight: 600;
  color: var(--navy); background: var(--gold);
  border: none; border-radius: 6px; padding: 12px 22px; cursor: pointer;
}
button:hover { background: var(--gold-bright); }
button:disabled { opacity: .6; cursor: default; }
button.ghost {
  background: transparent; color: var(--gold-ink);
  border: 1.5px solid var(--border-soft);
}
button.ghost:hover { border-color: var(--gold); background: transparent; }
button.small { font-size: 13px; padding: 7px 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 4px; font-size: 17px; font-family: var(--font-display); font-weight: 600; }
.card .meta { color: var(--muted); font-size: 13px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.pill {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border-soft); color: var(--muted);
}
.pill.published, .pill.active { color: #3f7a3f; background: #e8f3e3; border-color: #bfe0b3; }
.pill.draft { color: var(--gold-ink); background: #faf1de; border-color: #eddcb0; }

.choice {
  display: block; text-align: left; width: 100%;
  background: var(--navy-soft); border: 1.5px solid var(--border-soft);
  border-radius: 8px; padding: 14px; cursor: pointer; color: var(--navy);
  font-weight: 400;
}
.choice:hover { background: var(--card); border-color: var(--gold); }
/* Selected state is blue, not gold: gold is the hover colour and the brand
   accent everywhere else, so a gold selection barely reads as chosen. */
.choice { position: relative; }
.choice[aria-pressed="true"],
.choice[aria-pressed="true"]:hover {
  border-color: #2563eb; background: #e8f0fe; box-shadow: 0 0 0 1.5px #2563eb;
}
.choice[aria-pressed="true"] strong { color: #1d4ed8; }
.choice[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%; background: #2563eb; color: #fff;
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.choice strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.choice span { color: var(--muted); font-size: 13px; }

.notice { padding: 12px 14px; border-radius: 6px; margin: 16px 0; font-size: 14px; }
.notice.error { background: rgba(224, 138, 125, .12); color: var(--danger); border: 1px solid rgba(224, 138, 125, .3); }
.notice.info { background: rgba(201, 169, 107, .1); color: var(--gold-ink); border: 1px solid rgba(201, 169, 107, .25); }

.empty { color: var(--faint); padding: 30px 0; text-align: center; }
.muted { color: var(--muted); }
.hint { color: var(--faint); font-size: 12px; margin-top: 6px; }

button.danger { color: var(--danger); background: transparent; border: 1.5px solid rgba(178, 59, 48, .35); }
button.danger:hover { background: rgba(178, 59, 48, .08); border-color: var(--danger); }

.section { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 28px; }
.section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head h2 { margin: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid.tight > label:first-child,
.form-grid.tight > label:nth-child(2) { margin-top: 0; }

.meeting-row {
  background: var(--navy-soft); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 14px; margin-bottom: 10px;
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
}
.meeting-row .num { color: var(--faint); font-size: 13px; font-weight: 600; padding-top: 12px; }
.meeting-row select, .meeting-row input { margin: 0 0 8px; }
.meeting-row .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.back-link { display: inline-block; margin-bottom: 18px; font-size: 13px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--navy); }

@media (max-width: 640px) {
  .form-grid, .meeting-row .fields { grid-template-columns: 1fr; }
}

/* ---- Church app shell: fixed dark sidebar injected by app-shell.js into
   #app-bar on every /app/* page, collapsing to a top bar + slide-out panel
   below 760px. Mirrors axiom-study's app shell pattern (fixed sidebar,
   body margin, JS-toggled drawer) rather than the admin panel's — this one
   needs a dynamic per-user event list and an account footer, so it's a
   shared script rather than markup repeated per page. */
:root {
  --navy-soft-dark: #1c2b48;
  --muted-on-dark: #a9b2c4;
  --faint-on-dark: #6c7794;
  --app-sidebar-width: 240px;
}

body.has-app-shell { margin-left: var(--app-sidebar-width); }

.app-sidebar {
  position: fixed; top: 0; left: 0; width: var(--app-sidebar-width); height: 100vh; z-index: 40;
  background: var(--navy-deep); display: flex; flex-direction: column;
  padding: 0 0 16px; box-sizing: border-box; overflow-y: auto; overflow-x: hidden;
  transition: transform .2s ease;
}

.app-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); margin-bottom: 14px; text-decoration: none; flex-shrink: 0; }
.app-sidebar-brand .mark { width: 26px; height: 26px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.app-sidebar-brand-name { font-weight: 700; font-size: 13px; letter-spacing: .04em; color: var(--cream); line-height: 1.3; }

.app-nav-group-label { flex: none; margin: 16px 20px 6px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint-on-dark); }
.app-sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }

.app-nav-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; margin: 0 0 0 8px;
  border-radius: 8px; border-left: 3px solid transparent;
  color: var(--muted-on-dark); font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  text-decoration: none; line-height: 1.35;
}
.app-nav-item svg { flex-shrink: 0; margin-top: 1px; }
.app-nav-item:hover { background: var(--navy-soft-dark); color: var(--cream); }
.app-nav-item.active { background: var(--navy-soft-dark); border-left-color: var(--gold); margin-left: 5px; color: var(--cream); }
.app-nav-item.active svg { stroke: var(--gold-bright); }
.app-nav-item.app-nav-add { color: var(--faint-on-dark); font-weight: 600; }
.app-nav-item.app-nav-add:hover { color: var(--cream); }

.app-nav-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 7px; background: var(--faint-on-dark); }
.app-nav-dot.published { background: #79c17a; }

.app-sidebar-footer {
  margin-top: auto; flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 0; border-top: 1px solid rgba(255, 255, 255, .08);
}
.app-sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--navy-soft-dark); color: var(--cream);
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex-shrink: 0;
}
.app-sidebar-namewrap { display: flex; flex-direction: column; min-width: 0; }
.app-sidebar-name { font-size: 13px; font-weight: 600; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar-church { font-size: 11.5px; color: var(--faint-on-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-sidebar-settings { margin-left: auto; color: var(--faint-on-dark); display: flex; flex-shrink: 0; }
.app-sidebar-settings:hover { color: var(--gold-bright); }

.app-mobile-bar { display: none; }
.app-scrim { display: none; }

@media (max-width: 760px) {
  body.has-app-shell { margin-left: 0; padding-top: 56px; }
  .app-sidebar { transform: translateX(-100%); box-shadow: 0 0 24px rgba(0,0,0,.25); }
  .app-sidebar.is-open { transform: translateX(0); }
  .app-mobile-bar {
    display: flex; align-items: center; gap: 14px; position: fixed; top: 0; left: 0; right: 0; height: 56px;
    padding: 0 18px; background: var(--navy-deep); z-index: 41; box-sizing: border-box;
  }
  .app-mobile-bar button { all: unset; cursor: pointer; color: var(--cream); display: flex; align-items: center; }
  .app-scrim.is-open { display: block; position: fixed; inset: 0; background: rgba(15, 25, 48, .5); z-index: 39; }
}
