body.login-page {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: #f4f8fb;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  background: white;
  padding: 2rem;
  border-radius: 6px;
  box-shadow: 0 2px 20px rgba(26, 43, 58, 0.08);
  width: 320px;
}
.login-card h1 { margin-top: 0; color: #2c6ea5; font-family: Georgia, serif; }
.login-card label { display: block; margin-bottom: 0.75rem; font-size: 0.9rem; }
.login-card input { width: 100%; padding: 0.5rem; border: 1px solid #cdd7e0; border-radius: 4px; box-sizing: border-box; margin-top: 3px; }
.login-card button { background: #2c6ea5; color: white; border: 0; padding: 0.6rem 1.2rem; border-radius: 4px; cursor: pointer; font-size: 0.95rem; width: 100%; }
.banner-error { background: #fdebe8; color: #8a2a20; border: 1px solid #c0392b; padding: 0.5rem 0.75rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.88rem; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  margin: 0;
  background: #f4f8fb;
  color: #1a2b3a;
}
.top-bar { background: #1a2b3a; color: white; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 1rem; font-size: 0.9rem; position: sticky; top: 0; z-index: 20; }
.top-bar .brand { color: white; text-decoration: none; font-weight: 600; margin-right: auto; }
.top-bar .who { opacity: 0.85; }
.top-bar .logout-form { margin: 0; }
.top-bar .logout-button { background: transparent; color: white; border: 0; opacity: 0.6; cursor: pointer; font-size: 0.88rem; }
.top-bar .logout-button:hover { opacity: 1; }
.breadcrumb { background: #e4edf3; padding: 0.5rem 1rem; font-size: 0.85rem; border-bottom: 1px solid #cdd7e0; display: flex; align-items: center; position: sticky; top: 2.5rem; z-index: 10; }
.breadcrumb a { color: #2c6ea5; text-decoration: none; }
.breadcrumb .sep { color: #cdd7e0; margin: 0 0.4rem; }
.breadcrumb .breadcrumb-back {
    display: inline-block;
    background: #2c6ea5;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    margin-right: 0.75rem;
    font-weight: 500;
}
.breadcrumb .breadcrumb-back:hover { background: #1f4d73; }

.help-box {
    background: #f4f8fb;
    border-left: 3px solid #2c6ea5;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    border-radius: 0 4px 4px 0;
}
.help-box p { margin: 0.25rem 0; }
.help-box code {
    background: #e4edf3;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.88em;
}
.help-box a { color: #2c6ea5; }
.hint { color: #6b7d8e; font-weight: 400; font-size: 0.85em; font-style: italic; }
.container { max-width: 72rem; margin: 0 auto; padding: 1.25rem; }

/* Banners (sit at top of a page's content area) */
.banner {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    border: 1px solid;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.banner strong { font-weight: 600; }
.banner-error { background: #fdebe8; color: #8a2a20; border-color: #c0392b; }
.banner-warning { background: #faf6ee; color: #8a5a2e; border-color: #c67c4e; }
.banner-success { background: #eaf5ec; color: #1e5630; border-color: #2d7a3a; }
.banner-info { background: #e4edf3; color: #1a2b3a; border-color: #2c6ea5; }

/* Toasts (float bottom-right, auto-dismiss) */
.toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    background: white;
    box-shadow: 0 4px 16px rgba(26, 43, 58, 0.2);
    border-left: 4px solid #2d7a3a;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.88rem;
    animation: toast-appear 0.2s ease-out, toast-fade 0.4s ease-in 2.6s forwards;
    z-index: 100;
}
.toast-success { border-left-color: #2d7a3a; }
.toast-warning { border-left-color: #c67c4e; }
.toast-error { border-left-color: #c0392b; }
.toast-icon { font-size: 1.1rem; }

@keyframes toast-appear {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes toast-fade {
    to { opacity: 0; transform: translateY(8px); }
}

/* Dashboard */
.dashboard-header { padding-bottom: 0.5rem; border-bottom: 1px solid #cdd7e0; margin-bottom: 1.5rem; }
.dashboard-header h1 { font-family: Georgia, serif; color: #1a2b3a; margin: 0 0 0.2rem; }
.dashboard-header .build-status { color: #6a7a8a; font-size: 0.88rem; }
.dashboard-header .ok { color: #2d7a3a; }
.dashboard-header .bad { color: #c0392b; }

.section-label { font-size: 0.72rem; color: #6a7a8a; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.tiles-small { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.tile {
    background: white;
    border: 1px solid #cdd7e0;
    border-radius: 6px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: box-shadow 0.15s;
}
.tile:hover { box-shadow: 0 2px 10px rgba(26, 43, 58, 0.1); }
.tiles-small .tile { padding: 0.8rem; }
.tile-featured { border-color: #2d7a3a; border-width: 2px; box-shadow: 0 0 0 3px rgba(45, 122, 58, 0.08); }
.tile-icon { font-size: 1.5rem; }
.tile-title { font-weight: 600; color: #1a2b3a; }
.tile-subtitle { font-size: 0.78rem; color: #6a7a8a; }

.widgets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }

.widget {
    background: white;
    border: 1px solid #cdd7e0;
    border-left-width: 3px;
    border-radius: 4px;
    padding: 0.9rem 1rem;
}
.widget-blue { border-left-color: #2c6ea5; }
.widget-amber { border-left-color: #c67c4e; }
.widget-label { font-size: 0.72rem; color: #6a7a8a; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.widget-headline { font-weight: 600; font-family: Georgia, serif; color: #1a2b3a; font-size: 1rem; }
.widget-subtext { font-size: 0.8rem; color: #6a7a8a; margin-top: 3px; }
.widget-links { margin-top: 0.5rem; display: flex; gap: 0.8rem; font-size: 0.78rem; }
.widget-links a { color: #2c6ea5; text-decoration: none; }

.recent-activity .activity-card { background: white; border: 1px solid #cdd7e0; border-radius: 4px; padding: 0.7rem 0.9rem; }
.activity-row { font-size: 0.82rem; line-height: 1.65; color: #1a2b3a; }
.activity-when, .activity-who { color: #6a7a8a; }

/* Page list */
.subtitle { color: #6a7a8a; font-size: 0.9rem; margin-top: -0.5rem; }
.page-list { display: flex; flex-direction: column; gap: 0.4rem; }
.page-list-row {
    background: white;
    border: 1px solid #cdd7e0;
    border-radius: 4px;
    padding: 0.7rem 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.page-list-row:hover { border-color: #2c6ea5; }
.page-list-main { flex: 1; }
.page-list-title { font-weight: 600; color: #1a2b3a; }
.page-list-desc { font-size: 0.8rem; color: #6a7a8a; margin-top: 2px; }
.page-list-slug { font-family: monospace; font-size: 0.78rem; color: #6a7a8a; }

/* Page editor */
.page-editor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #cdd7e0;
    margin-bottom: 1.25rem;
    position: sticky;
    top: 2.5rem;
    background: #f4f8fb;
    z-index: 5;
}
.page-editor-title { font-family: Georgia, serif; font-weight: 600; color: #1a2b3a; font-size: 1.2rem; }
.page-editor-dirty-count { flex: 1; color: #c0392b; font-size: 0.88rem; font-weight: 500; }
.page-editor-dirty-count[data-count="0"] { visibility: hidden; }

.btn-primary {
    background: #2c6ea5;
    color: white;
    border: 0;
    padding: 0.5rem 1.1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary:disabled { background: #a0b0c0; cursor: not-allowed; }

.section-card {
    background: white;
    border: 1px solid #cdd7e0;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.section-card.dirty {
    border: 2px solid #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.section-card-header {
    padding: 0.5rem 0.8rem;
    background: #f0f4f7;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a2b3a;
}
.section-card.dirty .section-card-header { background: #fdebe8; color: #8a2a20; }
.section-card-status { font-size: 0.75rem; font-weight: 500; }

.section-heading-row {
    padding: 0.5rem 0.8rem;
    background: #fafafa;
    border-bottom: 1px solid #e4edf3;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.section-heading-row label { font-size: 0.75rem; color: #6a7a8a; font-weight: 500; min-width: 60px; }
.section-heading-level { padding: 0.3rem 0.5rem; font-size: 0.82rem; border: 1px solid #cdd7e0; border-radius: 3px; }
.section-heading-text {
    flex: 1;
    padding: 0.35rem 0.55rem;
    font-size: 0.95rem;
    font-family: Georgia, serif;
    border: 1px solid #cdd7e0;
    border-radius: 3px;
}

.section-body {
    width: 100%;
    border: 0;
    padding: 0.8rem 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
    background: white;
    height: calc((100vh - 16rem) / var(--section-count, 1));
    min-height: 240px;
}
.section-card.dirty .section-body { background: #fffaf9; }

/* Section headers on CRUD list pages */
.section-header { display: flex; align-items: center; margin-bottom: 1.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid #cdd7e0; }
.section-header > div:first-child { flex: 1; }
.section-header h1 { font-family: Georgia, serif; color: #1a2b3a; margin: 0; font-size: 1.4rem; }

.empty { color: #6a7a8a; font-style: italic; padding: 0.5rem; }

/* Event rows */
.event-row {
    background: white;
    border: 1px solid #cdd7e0;
    border-radius: 4px;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.4rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.event-row:hover { border-color: #2c6ea5; }
.event-date { width: 48px; text-align: center; }
.event-date-month { font-size: 0.68rem; color: #c0392b; font-weight: 600; text-transform: uppercase; }
.event-date-day { font-size: 1.25rem; font-weight: 600; font-family: Georgia, serif; color: #1a2b3a; line-height: 1; }
.event-row-main { flex: 1; }
.event-row-title { font-weight: 600; color: #1a2b3a; text-decoration: none; }
.event-row-title:hover { color: #2c6ea5; }
.event-row-meta { font-size: 0.78rem; color: #6a7a8a; margin-top: 2px; }
.event-row-tag { font-size: 0.78rem; color: #6a7a8a; }
.event-date-link { text-decoration: none; color: inherit; }
.event-row-actions { display: flex; gap: 0.75rem; align-items: center; }
.event-row-actions .inline-form { margin: 0; display: inline; }
.event-row-actions button { background: none; border: 0; padding: 0; cursor: pointer; font-size: 0.9rem; }
.btn-link-danger { color: #c0392b !important; }
.btn-link-danger:hover { color: #8a2a20 !important; }

.past-events { margin-top: 1.25rem; }
.past-events summary { cursor: pointer; color: #6a7a8a; font-size: 0.82rem; padding: 0.4rem; }

/* CRUD forms (shared across events, site config, newsletter upload) */
.crud-form { background: white; border: 1px solid #cdd7e0; border-radius: 4px; padding: 1.25rem 1.5rem; max-width: 640px; }
.crud-form label { display: block; font-size: 0.82rem; font-weight: 500; color: #1a2b3a; margin-bottom: 0.75rem; }
.crud-form label input, .crud-form label textarea, .crud-form label select {
    display: block;
    width: 100%;
    padding: 0.45rem 0.55rem;
    font-size: 0.9rem;
    border: 1px solid #cdd7e0;
    border-radius: 3px;
    box-sizing: border-box;
    font-family: inherit;
    margin-top: 3px;
}
.crud-form label textarea { min-height: 80px; resize: vertical; }
.crud-form .row { display: grid; gap: 0.6rem; }
.crud-form .row-2 { grid-template-columns: 1fr 1fr; }
.crud-form .row-3 { grid-template-columns: 2fr 1fr 1fr; }

.form-actions { display: flex; gap: 0.5rem; align-items: center; padding-top: 0.8rem; border-top: 1px solid #e4edf3; margin-top: 0.5rem; }

.members-sticky-head { position: sticky; top: 4.8rem; z-index: 5; background: #f4f8fb; padding-top: 0.25rem; padding-bottom: 0.5rem; box-shadow: 0 4px 6px -4px rgba(26, 43, 58, 0.15); }

.confirm-dialog { max-width: 460px; }
.confirm-dialog-body { padding: 1.25rem 1.5rem; min-width: 340px; }
.confirm-dialog-body h2 { font-size: 1.05rem; margin: 0 0 0.6rem; color: #1a2b3a; }
.confirm-dialog-body p { margin: 0 0 1rem; color: #1a2b3a; font-size: 0.95rem; line-height: 1.4; }

dialog { border: 1px solid #cdd7e0; border-radius: 6px; padding: 0; max-width: 420px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
dialog::backdrop { background: rgba(26, 43, 58, 0.4); }
dialog form { padding: 1.25rem 1.5rem; min-width: 320px; }
dialog h2 { font-size: 1.05rem; margin: 0 0 1rem; color: #1a2b3a; }
dialog label { display: block; font-size: 0.82rem; font-weight: 500; color: #1a2b3a; margin-bottom: 0.75rem; }
dialog label input { display: block; width: 100%; margin-top: 0.3rem; padding: 0.45rem 0.55rem; border: 1px solid #cdd7e0; border-radius: 4px; font-size: 0.95rem; box-sizing: border-box; }

.btn-link { color: #6a7a8a; text-decoration: none; font-size: 0.9rem; }
.btn-link:hover { color: #1a2b3a; }
.btn-danger {
    background: white;
    color: #c0392b;
    border: 1px solid #c0392b;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.88rem;
    cursor: pointer;
    margin-left: auto;
}
.btn-danger:hover { background: #fdebe8; }

/* Newsletters list */
.year-heading { font-family: Georgia, serif; color: #1a2b3a; font-size: 1.05rem; margin: 1.2rem 0 0.4rem; font-weight: 600; }
.newsletter-group { background: white; border: 1px solid #cdd7e0; border-radius: 4px; margin-bottom: 0.75rem; overflow: hidden; }
.newsletter-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.9rem; border-bottom: 1px solid #e4edf3; }
.newsletter-row:last-child { border-bottom: 0; }
.newsletter-icon { color: #c0392b; font-size: 1.1rem; }
.newsletter-main { flex: 1; }
.newsletter-title { font-weight: 500; color: #1a2b3a; }
.newsletter-meta { font-size: 0.75rem; color: #6a7a8a; margin-top: 1px; }
.inline-form { display: inline; margin: 0; }
.btn-danger-sm {
    background: white; border: 1px solid #c0392b; color: #c0392b;
    padding: 0.25rem 0.7rem; border-radius: 3px; font-size: 0.78rem; cursor: pointer;
}
.btn-danger-sm:hover { background: #fdebe8; }

/* Build status */
.build-block { background: #1a2b3a; color: #e4edf3; padding: 0.75rem 1rem; border-radius: 4px; font-family: monospace; font-size: 0.82rem; overflow: auto; max-height: 320px; white-space: pre-wrap; word-break: break-word; }
.build-block-err { background: #3b1414; color: #ffd7d0; }

/* Meetings */
.meetings-list { display: flex; flex-direction: column; gap: 0.4rem; }
.meeting-row {
    background: white; border: 1px solid #cdd7e0; border-radius: 4px;
    padding: 0.7rem 0.9rem; display: flex; gap: 1rem; align-items: center;
}
.meeting-row.canceled { background: #fdebe8; border-color: #c0392b; opacity: 0.85; }
.meeting-row.canceled .meeting-title { text-decoration: line-through; }
.meeting-row.moved { border-color: #c67c4e; }
.meeting-row.special { border-color: #2d7a3a; }
.meeting-date { width: 48px; text-align: center; }
.meeting-date-month { font-size: 0.68rem; color: #2c6ea5; font-weight: 600; text-transform: uppercase; }
.meeting-date-day { font-size: 1.25rem; font-weight: 600; font-family: Georgia, serif; color: #1a2b3a; line-height: 1; }
.meeting-main { flex: 1; }
.meeting-title { font-weight: 600; color: #1a2b3a; display: flex; gap: 0.5rem; align-items: center; }
.meeting-meta { font-size: 0.78rem; color: #6a7a8a; margin-top: 2px; }
.tag { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; padding: 0.1rem 0.45rem; border-radius: 2px; }
.tag-err { background: #fdebe8; color: #8a2a20; }
.tag-info { background: #e4edf3; color: #1a2b3a; }
.tag-ok { background: #eaf5ec; color: #1e5630; }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.media-tile { background: white; border: 1px solid #cdd7e0; border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.media-tile img { width: 100%; height: 130px; object-fit: cover; display: block; background: #e4edf3; }
.media-tile-footer { padding: 0.5rem; font-size: 0.78rem; }
.media-tile-name { font-weight: 500; color: #1a2b3a; word-break: break-all; }
.media-tile-meta { color: #6a7a8a; margin: 2px 0 0.4rem; }

/* Media picker (event image browse) */
.input-with-button { display: flex; gap: 0.4rem; align-items: stretch; }
.input-with-button input { flex: 1; min-width: 0; }
dialog.media-picker-dialog { width: min(760px, calc(100vw - 3rem)); max-width: none; max-height: calc(100vh - 4rem); padding: 0; overflow: hidden; }
.media-picker-inner { display: flex; flex-direction: column; max-height: calc(100vh - 4rem); }
.media-picker-header { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.25rem; border-bottom: 1px solid #e4edf3; flex: 0 0 auto; }
.media-picker-header h2 { margin: 0; font-size: 1.02rem; color: #1a2b3a; }
.media-picker-header .btn-link { font-size: 1rem; padding: 0 0.25rem; line-height: 1; }
.media-picker-empty { padding: 1.5rem 1.5rem 2rem; color: #4a5a6a; font-size: 0.92rem; }
.media-picker-empty p { margin: 0 0 0.6rem; }
.media-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 180px)); gap: 0.6rem; padding: 1rem 1.25rem 1.25rem; overflow-y: auto; flex: 1 1 auto; justify-content: start; align-content: start; }
.media-picker-tile { background: white; border: 1px solid #cdd7e0; border-radius: 4px; overflow: hidden; padding: 0; cursor: pointer; display: flex; flex-direction: column; text-align: left; font: inherit; width: 100%; }
.media-picker-tile:hover { border-color: #2c6ea5; box-shadow: 0 2px 6px rgba(44,110,165,0.15); }
.media-picker-tile img { width: 100%; height: 110px; object-fit: cover; display: block; background: #e4edf3; }
.media-picker-tile-name { font-size: 0.74rem; color: #1a2b3a; padding: 0.35rem 0.45rem; word-break: break-all; line-height: 1.25; }
.section-body-toolbar { display: flex; justify-content: flex-end; margin: 0.25rem 0 0.15rem; }
.section-body-toolbar .btn-link { font-size: 0.8rem; padding: 0.15rem 0.35rem; }

/* Members */
.section-header-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.filter-bar { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.filter-bar input[type="search"] { flex: 1; padding: 0.4rem 0.55rem; font-size: 0.9rem; border: 1px solid #cdd7e0; border-radius: 3px; }
.filter-bar select { padding: 0.4rem 0.55rem; border: 1px solid #cdd7e0; border-radius: 3px; }
.members-table { width: 100%; border-collapse: collapse; background: white; border: 1px solid #cdd7e0; border-radius: 4px; overflow: hidden; }
.members-table th, .members-table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid #e4edf3; font-size: 0.88rem; }
.members-table th { background: #f0f4f7; font-weight: 600; color: #1a2b3a; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.members-table tr:last-child td { border-bottom: 0; }
.members-table tr.unpaid { background: #fff8ee; }
.members-table tr.unpaid td:first-child { border-left: 3px solid #c67c4e; }
.members-table a { color: #2c6ea5; text-decoration: none; }
.members-table a:hover { text-decoration: underline; }
