:root {
  color-scheme: light;
  --ink: #233b35;
  --muted: #74817b;
  --green: #193c36;
  --green-mid: #397566;
  --green-light: #e8f0eb;
  --paper: #f5f6f1;
  --white: #fff;
  --line: #e7e9e3;
  --gold: #d5a34f;
  --gold-pale: #f8f0df;
  --coral: #c6745b;
  --coral-pale: #f8ece7;
  --blue: #638da0;
  --blue-pale: #eaf1f4;
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 254px; padding: 27px 17px 17px; color: #e6eee9; background: var(--green); }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 8px 31px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #83a293; border-radius: 50%; color: #f2c86c; font: 700 23px Georgia, serif; }
.brand-mark img { width: 100%; height: 100%; border-radius: inherit; object-fit: contain; }
.brand strong { display: block; font: 600 22px Georgia, serif; letter-spacing: .2px; }
.brand small { display: block; margin-top: 2px; color: #a8bcb2; font-size: 10px; }
.church-switcher { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border: 1px solid #42635b; border-radius: 6px; background: #244941; }
.church-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 5px; color: #27473e; background: #efd99f; font-size: 11px; font-weight: 700; }
.church-switcher strong, .church-switcher small { display: block; }
.church-switcher strong { font-size: 11px; font-weight: 600; }
.church-switcher small { margin-top: 4px; color: #a7bdb2; font-size: 10px; }
.switch-caret { margin-left: auto; color: #a7bdb2; }
.primary-nav { flex: 1; min-height: 0; margin-top: 30px; overflow-y: auto; overscroll-behavior: contain; }
.nav-label { margin: 0 10px 11px; color: #86a195; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.nav-label-spaced { margin-top: 27px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 11px; border: 0; border-radius: 5px; color: #cedbd4; background: transparent; text-align: left; font-size: 12px; cursor: pointer; }
.nav-item:hover, .nav-item.active { color: #fff; background: #31594f; }
.nav-item.active { box-shadow: inset 2px 0 #e0b55f; }
.nav-icon { display: inline-grid; place-items: center; width: 17px; color: #c2d2c8; font-size: 18px; }
.nav-count { margin-left: auto; color: #adc5b8; font-size: 10px; }
.sidebar-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 13px 6px 2px; border-top: 1px solid #37594f; color: #a9bdb3; font-size: 9px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #8bc69e; }
.help-button { margin-left: auto; width: 18px; height: 18px; border: 1px solid #769286; border-radius: 50%; color: inherit; background: none; font-size: 10px; cursor: pointer; }
.main-area { min-height: 100vh; margin-left: 254px; }
.topbar { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 39px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #87918c; font-size: 11px; }
.breadcrumb strong { color: #384d45; font-weight: 600; }
.crumb-slash { color: #c7cdc8; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.today-label { color: #87918c; font-size: 10px; text-transform: capitalize; }
.avatar-button { width: 31px; height: 31px; border: 1px solid #d9e3dc; border-radius: 50%; color: var(--green); background: var(--green-light); font-size: 9px; font-weight: 700; cursor: pointer; }
.mobile-menu { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; }
.content-wrap { width: min(100%, 1240px); margin: 0 auto; padding: 34px 39px 24px; }
.view { display: none; animation: appear .26s ease-out; }
.view.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; color: #829089; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; color: #213b34; font: 500 30px Georgia, "Times New Roman", serif; }
.heading-copy { margin: 0; color: #849089; font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: 5px; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: #29574c; }
.button-quiet { border-color: #dfe5df; color: #476158; background: white; }
.button-quiet:hover { background: #f7faf7; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card { position: relative; min-height: 113px; padding: 17px 18px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.stat-card::after { position: absolute; right: -18px; bottom: -36px; width: 83px; height: 83px; border: 1px solid #edf0eb; border-radius: 50%; content: ""; }
.stat-label { color: #7b8881; font-size: 10px; }
.stat-value { margin: 11px 0 5px; color: #25463d; font: 500 27px Georgia, serif; }
.stat-foot { color: #a0aaa4; font-size: 9px; }
.stat-icon { position: absolute; top: 14px; right: 15px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 5px; color: var(--green-mid); background: var(--green-light); font-size: 14px; }
.stat-card:nth-child(2) .stat-icon { color: var(--coral); background: var(--coral-pale); }
.stat-card:nth-child(3) .stat-icon { color: #ad8438; background: var(--gold-pale); }
.stat-card:nth-child(4) .stat-icon { color: var(--blue); background: var(--blue-pale); }
.dashboard-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.birthday-panel, .care-panel, .finance-panel, .activity-panel { padding: 19px 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading .eyebrow { margin-bottom: 6px; }
h2 { margin-bottom: 0; color: #2b453d; font: 500 17px Georgia, "Times New Roman", serif; }
.text-link { padding: 3px 0; border: 0; color: #628174; background: none; font-size: 10px; cursor: pointer; }
.text-link span { padding-left: 3px; }
.birthday-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.birthday-item { display: flex; align-items: center; min-width: 0; gap: 9px; padding: 9px; border-radius: 5px; background: #fafaf7; }
.date-tile { display: grid; flex: 0 0 35px; place-items: center; height: 39px; border: 1px solid #efe4ca; border-radius: 4px; color: #9a783d; background: #fcf6e9; }
.date-tile strong { font-size: 12px; line-height: 1; }
.date-tile small { margin-top: -1px; font-size: 7px; text-transform: uppercase; }
.birthday-meta { min-width: 0; }
.birthday-meta strong, .birthday-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.birthday-meta strong { color: #41554c; font-size: 10px; font-weight: 600; }
.birthday-meta small { margin-top: 4px; color: #97a19b; font-size: 9px; }
.care-list { display: grid; gap: 8px; }
.care-item { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-bottom: 1px solid #f0f1ed; }
.care-item:last-child { border-bottom: 0; }
.care-avatar { display: grid; flex: 0 0 31px; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #8e6458; background: var(--coral-pale); font: 12px Georgia, serif; }
.care-meta { min-width: 0; flex: 1; }
.care-meta strong, .care-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.care-meta strong { font-size: 10px; font-weight: 600; }
.care-meta small { margin-top: 4px; color: #8b9690; font-size: 9px; }
.tag { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 3px; color: #9b614f; background: var(--coral-pale); font-size: 8px; white-space: nowrap; }
.tag.green { color: #47715d; background: #eaf3ec; }
.tag.gold { color: #997540; background: #fbf3e2; }
.finance-panel { grid-column: 1; }
.finance-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.finance-total strong { color: #2a5144; font: 500 26px Georgia, serif; }
.finance-total span { color: #8f9c94; font-size: 9px; }
.finance-bars { display: grid; gap: 11px; }
.finance-row { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 9px; color: #76837b; font-size: 9px; }
.bar-track { height: 5px; overflow: hidden; border-radius: 4px; background: #edf0eb; }
.bar-fill { height: 100%; border-radius: inherit; background: #6d9b82; }
.finance-row:nth-child(2) .bar-fill { background: #d7ae5e; }
.finance-row:nth-child(3) .bar-fill { background: #cb8b72; }
.finance-row strong { color: #51645a; font-size: 9px; font-weight: 600; }
.activity-mark { color: #c5a252; font-size: 10px; }
.community-note { max-width: 350px; margin: 5px 0 18px; color: #7f8b83; font: 14px/1.55 Georgia, serif; }
.page-footer { padding-top: 22px; color: #a0aaa3; font-size: 9px; }
.page-footer span { padding: 0 4px; color: #cfb16e; }
.records-heading { margin-bottom: 23px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(100%, 320px); height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: #93a098; background: white; }
.search-box span { font-size: 18px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.result-count { color: #929d96; font-size: 10px; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 12px 14px; border-bottom: 1px solid var(--line); color: #8b9790; background: #fbfcf9; font-size: 8px; font-weight: 700; letter-spacing: .65px; text-transform: uppercase; }
td { padding: 12px 14px; border-bottom: 1px solid #f0f1ed; color: #607168; font-size: 10px; }
tr:last-child td { border-bottom: 0; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-initial { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #497360; background: #e8f0e8; font-size: 9px; font-weight: 700; }
.person-cell strong { color: #344d43; font-size: 10px; font-weight: 600; }
.row-actions { display: flex; gap: 5px; }
.icon-action { min-width: 26px; height: 25px; padding: 0 6px; border: 1px solid #e7ebe6; border-radius: 4px; color: #648073; background: white; font-size: 10px; cursor: pointer; }
.icon-action:hover { border-color: #b9cbbf; background: #f5f8f4; }
.icon-action.delete { color: #aa6858; }
.empty-state { padding: 35px; color: #929d96; text-align: center; font-size: 11px; }
.hidden { display: none !important; }
.message-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 14px; }
.message-compose, .recipient-panel { padding: 20px; }
.whatsapp-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: white; background: #5a9874; font: 700 16px Georgia, serif; }
.field-label { display: block; margin: 17px 0 7px; color: #65776d; font-size: 10px; font-weight: 600; }
textarea, .form-control { width: 100%; border: 1px solid #e1e7e1; border-radius: 5px; outline: none; color: #394f45; background: #fff; font-size: 11px; }
textarea { min-height: 125px; padding: 10px; resize: vertical; }
textarea:focus, .form-control:focus { border-color: #80a18d; box-shadow: 0 0 0 2px #e8f0eb; }
.compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: #89968f; font-size: 9px; }
.form-note { margin: 13px 0 0; color: #97a19a; font-size: 9px; line-height: 1.5; }
.select-all { display: flex; align-items: center; gap: 5px; color: #7b8981; font-size: 9px; }
.select-all input, .contact-check { accent-color: var(--green-mid); }
.contact-list { display: grid; max-height: 390px; overflow-y: auto; }
.contact-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f0f1ed; }
.contact-row:last-child { border-bottom: 0; }
.contact-row .person-initial { flex: 0 0 27px; }
.contact-meta { min-width: 0; flex: 1; }
.contact-meta strong, .contact-meta small { display: block; }
.contact-meta strong { color: #3c554a; font-size: 10px; font-weight: 600; }
.contact-meta small { margin-top: 3px; color: #9aa49e; font-size: 9px; }
.queue-status { margin-top: 13px; padding: 10px; border-radius: 4px; color: #4a6f5d; background: #eef5ef; font-size: 10px; line-height: 1.5; }
.record-dialog { width: min(540px, calc(100% - 28px)); max-height: min(85vh, 720px); padding: 0; overflow: auto; border: 1px solid #e4e9e3; border-radius: 7px; color: var(--ink); background: white; box-shadow: 0 18px 60px #1d352c2b; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); align-items: start; gap: 14px; }
.settings-form-panel, .settings-logo-panel, .audit-panel { padding: 20px; }
.settings-subheading { margin: 23px 0 14px; padding-top: 19px; border-top: 1px solid #edf0eb; }
.settings-subheading .eyebrow { margin-bottom: 6px; }
.settings-subheading h2 { font-size: 15px; }
.settings-save-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 21px; padding-top: 15px; border-top: 1px solid #edf0eb; }
.settings-save-row > span { color: #929d96; font-size: 9px; }
.settings-side-column { display: grid; gap: 14px; }
.backup-panel { padding: 20px; }
.mobile-install-panel { padding: 20px; }
.install-app-button { width: 100%; }
.backup-copy { margin: -3px 0 13px; color: #7f8b83; font: 13px/1.5 Georgia, serif; }
.backup-button { display: flex; width: 100%; }
.backup-panel > .text-link { margin-top: 11px; }
.backup-panel .form-note { margin-top: 13px; }
.logo-preview { display: grid; place-items: center; height: 145px; margin: 0 0 13px; overflow: hidden; border: 1px dashed #d9e2da; border-radius: 5px; background: #f7f9f5; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview .brand-mark { width: 56px; height: 56px; color: #d8b66d; border-color: #b5c8b9; font-size: 30px; }
.logo-upload-button { display: flex; width: 100%; }
.logo-remove-button { display: block; margin-top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.audit-list { display: grid; max-height: 350px; overflow-y: auto; }
.audit-entry { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid #f0f1ed; }
.audit-entry:last-child { border-bottom: 0; }
.audit-dot { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #76a287; }
.audit-entry strong { color: #465e52; font-size: 10px; font-weight: 600; }
.audit-entry p { margin: 4px 0; color: #7d8981; font-size: 9px; line-height: 1.4; }
.audit-entry small, .audit-empty { color: #a0aaa3; font-size: 8px; }
.audit-empty { margin: 4px 0; line-height: 1.6; }
.record-dialog::backdrop { background: #142b2580; backdrop-filter: blur(2px); }
.record-dialog form { padding: 22px; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.dialog-heading h2 { font-size: 21px; }
.dialog-close { width: 27px; height: 27px; border: 1px solid #e7ebe6; border-radius: 4px; color: #6d7d74; background: white; font-size: 18px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; }
.form-field { min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field > label { display: block; margin-bottom: 6px; color: #68796f; font-size: 9px; font-weight: 600; }
.form-control { min-height: 36px; padding: 8px 9px; }
.checkbox-field { display: flex; align-items: center; gap: 7px; min-height: 36px; color: #62766a; font-size: 10px; }
.checkbox-field input { accent-color: var(--green-mid); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; padding-top: 15px; border-top: 1px solid #edf0eb; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 20px; max-width: calc(100% - 44px); padding: 11px 15px; border-radius: 5px; color: white; background: #244c40; box-shadow: 0 5px 18px #142b2528; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1050px) {
  .sidebar { width: 220px; }
  .main-area { margin-left: 220px; }
  .topbar { padding: 0 25px; }
  .content-wrap { padding: 29px 25px 22px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { width: 254px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 25px #142b2520; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .topbar { height: 55px; padding: 0 16px; }
  .mobile-menu { display: inline-grid; place-items: center; width: 28px; height: 30px; color: #52665c; }
  .breadcrumb { margin-right: auto; margin-left: 10px; gap: 6px; font-size: 10px; }
  .topbar-actions { gap: 8px; }
  .today-label { display: none; }
  .content-wrap { padding: 25px 16px 20px; }
  .page-heading { align-items: flex-start; margin-bottom: 20px; }
  h1 { font-size: 27px; }
  .page-heading > .button { align-self: center; flex: 0 0 auto; padding: 0 9px; font-size: 10px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .finance-panel { grid-column: auto; }
  .message-layout { grid-template-columns: 1fr; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side-column { grid-template-columns: 1fr 1fr; }
  .birthday-panel, .care-panel, .finance-panel, .activity-panel { padding: 16px; }
}
@media (max-width: 460px) {
  .stats-grid { gap: 8px; }
  .stat-card { min-height: 101px; padding: 13px; }
  .stat-value { font-size: 24px; }
  .stat-icon { top: 10px; right: 10px; width: 22px; height: 22px; }
  .birthday-list { grid-template-columns: 1fr; }
  .panel-heading { gap: 7px; }
  .panel-heading h2 { font-size: 16px; }
  .text-link { font-size: 9px; }
  .page-heading { gap: 8px; }
  .page-heading > .button { min-height: 33px; }
  .page-heading > .button span { display: none; }
  .heading-copy { max-width: 220px; font-size: 11px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .record-dialog form { padding: 17px; }
  .compose-footer { align-items: flex-start; flex-direction: column; }
  .settings-side-column { grid-template-columns: 1fr; }
  .settings-save-row { align-items: flex-start; flex-direction: column; }
}
