:root {
  color-scheme: light;
  --bg: #f5f2ec;
  --ink: #1b1f24;
  --muted: #667085;
  --line: #d7d7d2;
  --panel: #fffdf8;
  --green: #2f7d5c;
  --green-dark: #1d5f44;
  --blue: #295b87;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 28px clamp(18px, 4vw, 56px);
  background: #18392d;
  color: white;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
}

h2 {
  font-size: 21px;
  margin-bottom: 18px;
}

.eyebrow {
  margin-bottom: 6px;
  color: #c6d8cd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.layout {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 56px;
  display: grid;
  gap: 18px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stats article,
.panel,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(30, 35, 28, .08);
}

.stats article {
  padding: 18px;
}

.stats span {
  display: block;
  color: var(--green-dark);
  font-size: 34px;
  font-weight: 850;
}

small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.panel {
  padding: 22px;
}

.whatsapp {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

#qr {
  width: 220px;
  max-width: 45vw;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.full {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c9c9c3;
  border-radius: 6px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 11px 15px;
  background: var(--green);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  opacity: .65;
  cursor: wait;
}

.ghost {
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color: inherit;
}

.panel .ghost {
  border-color: var(--line);
  color: var(--blue);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.danger {
  background: #fff1f0;
  color: var(--red);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.action-row.left {
  justify-content: flex-start;
  align-items: center;
}

.admin-home {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: stretch;
}

.admin-home.is-hidden {
  display: none;
}

.admin-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.choice-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid #d6e0d2;
  border-radius: 8px;
  background: #fffefa;
  color: #18392d;
  text-align: left;
}

.choice-card strong {
  font-size: 19px;
}

.choice-card span {
  color: #5e6a61;
  line-height: 1.45;
}

.choice-card:hover,
.choice-card.is-active {
  border-color: #2f7d5c;
  background: #edf7f1;
}

.admin-tabs {
  display: none;
  position: sticky;
  top: 0;
  z-index: 3;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,253,248,.96);
  box-shadow: 0 10px 24px rgba(30,35,28,.08);
}

.admin-tabs.is-visible {
  display: flex;
  flex-wrap: wrap;
}

.admin-tabs button {
  background: transparent;
  color: #25483a;
  border: 1px solid var(--line);
}

.admin-tabs button.is-active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

[hidden] {
  display: none !important;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.broadcasts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.broadcasts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.care-list {
  display: grid;
  gap: 12px;
}

.care-item {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefa;
}

.care-item p {
  margin: 0;
  color: #47564d;
  line-height: 1.5;
}

.care-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 10px;
  background: #eaf5ef;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.badge-muted {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 10px;
  background: #f1f1ed;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.soft-action {
  min-height: 34px;
  padding: 0 10px;
  background: #f1f1ed;
  color: var(--blue);
  font-size: 13px;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 20px;
  background: #18392d;
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
}

.login-panel .eyebrow {
  color: var(--green);
}

.login-panel form {
  display: grid;
  gap: 14px;
}

.error {
  margin: 14px 0 0;
  color: var(--red);
  font-weight: 750;
}

.form-status {
  align-self: center;
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 750;
}

.site-page {
  background:
    linear-gradient(180deg, #fbfaf5 0%, #f4f7f1 52%, #fbfaf5 100%);
}

.site-nav {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(255,253,248,.96);
  border-bottom: 1px solid #d7dfd3;
  box-shadow: 0 10px 30px rgba(25, 55, 42, .07);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #173d30;
  text-decoration: none;
}

.site-brand img {
  width: 156px;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.site-brand span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.site-brand small {
  color: #66735f;
}

.site-nav nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.site-nav a {
  color: #25483a;
  font-weight: 800;
  text-decoration: none;
}

.nav-action,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 900;
}

.nav-action,
.primary-link {
  background: #2f7d5c;
  color: white;
}

.secondary-link {
  border: 1px solid #b8c9bd;
  color: #245743;
  background: white;
}

.secondary-link.dark {
  border-color: rgba(255,255,255,.36);
  color: white;
  background: transparent;
}

.site-hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: clamp(58px, 8vw, 92px) clamp(18px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(18, 58, 45, .98), rgba(30, 82, 67, .96)),
    radial-gradient(circle at 85% 18%, rgba(190, 207, 179, .22), transparent 32%);
  color: white;
  overflow: hidden;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-copy h1 {
  max-width: 820px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  margin-bottom: 20px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: #eef7f1;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-arch {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(255,253,248,.96);
  box-shadow: 0 26px 60px rgba(7, 29, 22, .24);
}

.hero-logo-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 230px;
  display: grid;
  place-items: center;
  padding: 28px;
  border-radius: 8px;
  background: #fffdf8;
}

.hero-logo-frame img {
  width: min(300px, 100%);
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.hero-panel {
  display: grid;
  gap: 10px;
  position: relative;
  padding: 22px;
  border: 1px solid rgba(24,57,45,.16);
  border-radius: 8px;
  background: rgba(255,253,248,.86);
  box-shadow: 0 14px 30px rgba(24,57,45,.08);
}

.hero-panel span {
  color: #2f7d5c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-panel strong {
  color: #173d30;
  font-size: 26px;
}

.hero-panel p {
  color: #4d6155;
}

.hero-panel a {
  color: #1d5f44;
  font-weight: 900;
}

.site-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(44px, 7vw, 82px) 0;
}

.arched-section {
  position: relative;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid #d6e0d2;
  border-radius: 8px;
  background: rgba(255,253,248,.7);
}

.section-kicker {
  margin-bottom: 10px;
  color: #2f7d5c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-section h2 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.02;
}

.site-section p {
  max-width: 820px;
  color: #48534b;
  font-size: 18px;
  line-height: 1.7;
}

.schedule-section {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.schedule-grid article {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 20px;
  border: 1px solid #ded8ca;
  border-radius: 8px;
  background: #fffdf8;
}

.schedule-grid strong {
  color: #18392d;
  font-size: 20px;
}

.schedule-grid span {
  color: #667085;
}

.events-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.welcome-section {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.care-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.care-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #d6e0d2;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 12px 30px rgba(30,35,28,.06);
}

.care-card span {
  color: #18392d;
  font-size: 22px;
  font-weight: 900;
}

.event-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid #ded8ca;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 12px 30px rgba(30,35,28,.07);
}

.event-card span {
  color: #2f7d5c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.event-card strong {
  color: #18392d;
  font-size: 24px;
  line-height: 1.1;
}

.event-card p {
  margin-bottom: 6px;
  color: #5e6a61;
  font-size: 16px;
  line-height: 1.5;
}

.event-card a {
  color: #2f7d5c;
  font-weight: 900;
}

.location-section {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  width: 100%;
  padding-inline: clamp(18px, 5vw, 64px);
  background: #18392d;
  color: white;
}

.location-section p {
  color: #e4efe9;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(18px, 5vw, 64px);
  color: #4f5c53;
  background: #fffdf8;
}

.site-footer a {
  color: #2f7d5c;
  font-weight: 800;
}

.chat-page {
  min-height: 100vh;
  background: #edf4ef;
}

.chat-shell {
  width: min(760px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #f8f7f2;
  box-shadow: 0 0 0 1px rgba(24,57,45,.08), 0 22px 80px rgba(24,57,45,.18);
}

.chat-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px clamp(16px, 4vw, 28px);
  background: #204f3f;
  color: white;
}

.chat-header h1 {
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1.05;
}

.chat-status {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  padding: 7px 10px;
  color: #e5f3ec;
  font-size: 12px;
  font-weight: 800;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px clamp(14px, 4vw, 28px) 18px;
  overflow-y: auto;
}

.chat-row {
  display: flex;
}

.chat-row.bot {
  justify-content: flex-start;
}

.chat-row.user {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: min(88%, 540px);
  border-radius: 8px;
  padding: 13px 15px;
  color: #1b1f24;
  line-height: 1.45;
  box-shadow: 0 8px 20px rgba(31,42,35,.08);
}

.chat-row.bot .chat-bubble {
  background: white;
  border: 1px solid #e2e0d9;
}

.chat-row.user .chat-bubble {
  background: #2f7d5c;
  color: white;
}

.chat-invite-image {
  width: min(420px, 84vw);
  border-radius: 8px;
  border: 1px solid #e2e0d9;
  box-shadow: 0 12px 34px rgba(31,42,35,.16);
}

.chat-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 12px clamp(12px, 3vw, 20px) 16px;
  border-top: 1px solid #ddd8ce;
  background: rgba(248,247,242,.96);
}

.chat-composer form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-composer input {
  min-height: 48px;
  border-radius: 999px;
  padding-inline: 18px;
}

.chat-composer button {
  min-height: 48px;
  border-radius: 999px;
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-replies button {
  border: 1px solid #bdd2c6;
  background: white;
  color: #245743;
  border-radius: 999px;
  padding: 8px 12px;
}

.event-details {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #d4e3d9;
  border-radius: 8px;
  background: #f3faf6;
}

.event-details.compact p,
.event-details p {
  margin: 0;
}

@media (max-width: 760px) {
  .admin-home,
  .admin-choices {
    grid-template-columns: 1fr;
  }

  .site-nav {
    grid-template-columns: 1fr;
  }

  .site-nav nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .site-hero,
  .schedule-section {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    align-self: auto;
  }

  .hero-arch {
    min-height: auto;
    padding: 24px;
    border-radius: 8px;
  }

  .hero-logo-frame {
    min-height: 190px;
    padding: 22px;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .events-section,
  .location-section,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .events-section {
    grid-template-columns: 1fr;
  }

  .topbar,
  .whatsapp,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stats,
  .grid-form {
    grid-template-columns: 1fr;
  }

  .welcome-section,
  .care-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  .chat-shell {
    box-shadow: none;
  }

  .chat-status {
    display: none;
  }

  .chat-composer form {
    grid-template-columns: 1fr;
  }
}
