/* === Base Reset & Typography === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #faf8f5;
  color: #2d3a2e;
  line-height: 1.6;
}

/* === Layout === */
.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* === Sidebar === */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: #1b2a4a;
  color: #c8d0e0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar-top {
  padding: 1.25rem 1rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-ward {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: block;
}
.sidebar-ward:hover { color: #e0e6f0; }

.sidebar-nav {
  flex: 1;
  padding: .5rem 0;
}

.sidebar-section {
  padding: .5rem 0;
}

.sidebar-heading {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7a8a9c;
  font-weight: 600;
  padding: .4rem 1rem .2rem;
}

.sidebar-link {
  display: block;
  padding: .45rem 1rem .45rem 1.25rem;
  color: #c8d0e0;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.sidebar-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-left-color: #5b9bd5;
}

.sidebar-bottom {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: auto;
}

.sidebar-user {
  font-size: .8rem;
  color: #8a96a8;
  margin-bottom: .4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  font-size: .8rem;
  color: #8a96a8;
  text-decoration: none;
  font-weight: 500;
}
.sidebar-logout:hover { color: #fff; }

/* Main content with sidebar */
body.has-sidebar main {
  margin-left: 220px;
  padding: 2rem 2rem;
  max-width: 1100px;
}

/* No sidebar (login/register) */
main.main-no-sidebar {
  padding: 2rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

/* Mobile hamburger toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 1100;
  background: #1b2a4a;
  border: none;
  border-radius: 6px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.sidebar-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
.sidebar-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sidebar-toggle.open span:nth-child(2) { opacity: 0; }
.sidebar-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 999;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: flex;
  }
  .sidebar-overlay.open {
    display: block;
  }
  body.has-sidebar main {
    margin-left: 0;
    padding: 3.5rem 1rem 2rem;
  }
}

/* === Flash Messages === */
.flash { padding: .75rem 1rem; margin-bottom: 1.25rem; border-radius: 8px; font-size: .9rem; }
.flash.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.flash.danger  { background: #fce4ec; color: #b71c1c; border: 1px solid #f8bbd0; }

/* === Headings === */
h1 { font-size: 1.75rem; font-weight: 700; color: #2d3a2e; margin-bottom: .25rem; }
h2 { font-size: 1.25rem; font-weight: 600; color: #2d3a2e; margin-bottom: 1rem; }
.subtitle { font-size: 1rem; color: #7a8a7c; font-weight: 400; margin-bottom: 2rem; }

/* === App Cards Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 700px) {
  .card-grid { grid-template-columns: 1fr; }
}

.app-card {
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: box-shadow .2s, transform .15s;
}
.app-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
  transform: translateY(-2px);
}
.app-card .card-icon { font-size: 2rem; }
.app-card .card-title { font-size: 1.1rem; font-weight: 600; color: #2d3a2e; }
.app-card .card-desc { font-size: .875rem; color: #6b7c6e; flex: 1; }

.btn-primary {
  display: inline-block;
  background: #2d5a3d;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .5rem 1.25rem;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s;
}
.btn-primary:hover { background: #1e3d29; }

/* === Admin Section === */
.admin-section {
  border-top: 1px solid #e5e0d8;
  padding-top: 1.5rem;
  margin-top: 1rem;
}
.admin-section h2 { font-size: 1rem; color: #7a8a7c; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.admin-links { display: flex; gap: 1rem; margin-top: .75rem; }
.admin-links a {
  color: #2d5a3d;
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  padding: .4rem .75rem;
  border: 1px solid #d5cfc7;
  border-radius: 6px;
  transition: background .15s;
}
.admin-links a:hover { background: #eee9e1; }

/* === Super Admin Message === */
.super-message {
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: #6b7c6e;
}
.super-message a { color: #2d5a3d; font-weight: 600; }

/* === Tables === */
table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid #e5e0d8; font-size: .9rem; }
th { background: #f5f2ed; font-weight: 600; color: #4a5a4c; }
tr:hover { background: #faf8f5; }

/* === Forms === */
form label { display: block; margin: .5rem 0; }
input, select, textarea { font: inherit; padding: .5rem .75rem; border: 1px solid #d5cfc7; border-radius: 6px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #2d5a3d; box-shadow: 0 0 0 2px rgba(45,90,61,.15); }

/* === Buttons (generic) === */
button {
  font: inherit;
  padding: .4rem .8rem;
  cursor: pointer;
  background: #2d5a3d;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .85rem;
  transition: background .15s;
}
button:hover { background: #1e3d29; }

/* === Badge === */
.badge { background: #ffc107; color: #333; padding: .15rem .5rem; border-radius: 4px; font-size: .75em; font-weight: 600; }
.confidence-badge { padding: .15rem .5rem; border-radius: 4px; font-size: .65em; font-weight: 600; vertical-align: middle; }
.confidence-manual { background: #d4edda; color: #155724; }
.confidence-confirmed { background: #cce5ff; color: #004085; }
.confidence-suggested { background: #fff3cd; color: #856404; }

/* === Families Page === */
.families-header { display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1rem; }
.families-count { font-size: 1rem; color: #7a8a7c; font-weight: 400; }

.filter-bar { display: flex; gap: .5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-btn {
  padding: .4rem .9rem;
  border: 1px solid #d5cfc7;
  border-radius: 6px;
  background: #fff;
  color: #4a5a4c;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.filter-btn:hover { background: #eee9e1; }
.filter-btn.active { background: #2d5a3d; color: #fff; border-color: #2d5a3d; }

.families-table { cursor: pointer; }
.families-table td { vertical-align: middle; }
.ministers-cell { color: #6b7c6e; font-size: .85rem; }

/* Needs tag badges */
.needs-tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
  margin-right: .4rem;
  white-space: nowrap;
}
.needs-tag.tag-single { background: #7b1fa2; }
.needs-tag.tag-senior { background: #1976d2; }
.needs-tag.tag-no-contact { background: #e65100; }
.needs-tag.tag-high-need { background: #c62828; }

/* Minister tag badges */
.minister-tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.minister-tag.mtag-couple { background: #388e3c; }
.minister-tag.mtag-companionship { background: #1976d2; }
.minister-tag.mtag-solo { background: #9e9e9e; }
.minister-tag.mtag-high-capacity { background: #7b1fa2; }
.minister-tag.mtag-na { background: #bdbdbd; }

/* Tag controls in slideout */
.tag-controls { margin-top: .5rem; }
.tag-checkbox { font-size: .85rem; cursor: pointer; display: flex; align-items: center; gap: .3rem; }
.btn-clear-tag { background: #757575; }
.btn-clear-tag:hover { background: #616161; }
.partner-info { font-size: .85rem; color: #4a5a4c; margin: .3rem 0; }
.minister-tag-status { font-size: .8rem; color: #7a8a7c; margin-left: .5rem; }
.minister-tag-status.saved { color: #4caf50; }
.minister-tag-status.error { color: #f44336; }

/* === Slideout Panel === */
.slideout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 900;
}
.slideout-overlay.open { opacity: 1; pointer-events: auto; }

.slideout-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
  transform: translateX(100%);
  transition: transform .25s ease;
  z-index: 950;
  overflow-y: auto;
}
.slideout-panel.open { transform: translateX(0); }

.slideout-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7c6e;
  cursor: pointer;
  line-height: 1;
  padding: .25rem;
}
.slideout-close:hover { color: #2d3a2e; background: none; }

.slideout-body { padding: 1.5rem; }
.slideout-body h2 { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem; }
.slideout-body h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #7a8a7c;
  font-weight: 600;
  margin-bottom: .5rem;
}
.slideout-section { margin-bottom: 1.25rem; }
.slideout-section ul { list-style: none; }
.slideout-section li { padding: .3rem 0; font-size: .9rem; color: #2d3a2e; }
.slideout-section .empty { color: #aaa; font-size: .85rem; font-style: italic; }
.member-age { color: #7a8a7c; font-size: .85rem; }
.role-badge { display: inline-block; background: #f0f0f0; color: #666; border-radius: 4px; padding: 0 5px; font-size: .75rem; margin-left: 4px; vertical-align: middle; }

.slideout-loading { color: #7a8a7c; text-align: center; padding: 2rem 0; }

/* Needs tag status in slideout */
.needs-status { font-size: .85rem; color: #7a8a7c; display: block; margin-top: .3rem; }
.needs-status.saved { color: #4caf50; }
.needs-status.error { color: #f44336; }

@media (max-width: 600px) {
  .slideout-panel { width: 100%; }
}

/* === Members Page === */
.members-header { display: flex; align-items: baseline; gap: .75rem; margin-bottom: 1rem; }
.members-count { font-size: 1rem; color: #7a8a7c; font-weight: 400; }

.members-search { margin-bottom: .75rem; }
.members-search input {
  width: 100%;
  padding: .6rem 1rem;
  font-size: .95rem;
  border: 1px solid #d5cfc7;
  border-radius: 8px;
  background: #fff;
}
.members-search input:focus {
  outline: none;
  border-color: #2d5a3d;
  box-shadow: 0 0 0 2px rgba(45,90,61,.15);
}

.members-table td { vertical-align: middle; }

.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: #2d5a3d; }
.sort-arrow { font-size: .75rem; }
.sort-active { color: #2d5a3d; }

.btn-manage {
  padding: .35rem .9rem;
  border: none;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: opacity .15s;
}
.btn-manage:hover { opacity: .85; }
.btn-manage-registered { background: #2d5a3d; }
.btn-manage-unregistered { background: #d4a017; color: #333; }

/* Members slideout */
.members-slideout { width: 420px; }
@media (max-width: 600px) {
  .members-slideout { width: 100%; }
}

.detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .3rem .75rem;
  font-size: .9rem;
  margin-bottom: .5rem;
}
.detail-label { color: #7a8a7c; font-weight: 500; }
.detail-value { color: #2d3a2e; }
.detail-value a { color: #2d5a3d; text-decoration: none; }
.detail-value a:hover { text-decoration: underline; }
.detail-family-name { font-weight: 600; margin-bottom: .4rem; }

/* (minister tag styles are defined above with tag badges) */

.access-grid { display: flex; flex-direction: column; gap: .5rem; }
.access-row { display: flex; align-items: center; gap: .5rem; font-size: .9rem; flex-wrap: wrap; }
.access-app { font-weight: 600; min-width: 5.5rem; }
.access-role { min-width: 3rem; }
.access-granted { color: #2d5a3d; font-weight: 500; }
.access-none { color: #aaa; }

.btn-sm {
  padding: .3rem .7rem;
  border: none;
  border-radius: 5px;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  background: #2d5a3d;
  color: #fff;
  transition: background .15s;
}
.btn-sm:hover { background: #1e3d29; }

.btn-mark-reviewed { background: #2d5a3d; color: #fff; }
.btn-mark-reviewed:hover { background: #1e3d29; }

.btn-xs {
  padding: .2rem .5rem;
  border: none;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
  background: #2d5a3d;
  color: #fff;
  transition: background .15s;
}
.btn-xs:hover { background: #1e3d29; }
.btn-revoke { background: #b71c1c; }
.btn-revoke:hover { background: #8b1515; }

.notes-section { margin-top: .75rem; }
.notes-section textarea {
  width: 100%;
  font: inherit;
  font-size: .9rem;
  padding: .5rem .65rem;
  border: 1px solid #d5cfc7;
  border-radius: 6px;
  resize: vertical;
  margin-top: .3rem;
}
.notes-section textarea:focus {
  outline: none;
  border-color: #2d5a3d;
  box-shadow: 0 0 0 2px rgba(45,90,61,.15);
}
.notes-status { font-size: .8rem; color: #7a8a7c; }
.notes-status.saved { color: #4caf50; }
.notes-status.error { color: #f44336; }

/* Sticky search + filters */
@supports (position: sticky) {
  .members-search, .filter-bar {
    position: sticky;
    background: #faf8f5;
    z-index: 10;
  }
  .members-search { top: 0; padding-top: .5rem; padding-bottom: .25rem; }
  .filter-bar { top: 3.2rem; padding-bottom: .5rem; }
}

/* Clickable member name */
.member-name-link {
  color: #2d5a3d;
  text-decoration: none;
  font-weight: 500;
}
.member-name-link:hover { text-decoration: underline; }

/* Checkbox column */
.col-check { width: 2rem; text-align: center; }
.col-check input { cursor: pointer; }

/* Bulk action bar */
.bulk-bar {
  position: sticky;
  bottom: 0;
  background: #2d3a2e;
  color: #fff;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-radius: 8px 8px 0 0;
  z-index: 20;
  box-shadow: 0 -2px 10px rgba(0,0,0,.15);
}
.bulk-count { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.bulk-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.btn-bulk {
  padding: .3rem .7rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 5px;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: #fff;
  transition: background .15s;
}
.btn-bulk:hover { background: rgba(255,255,255,.15); }
.bulk-status { font-size: .8rem; margin-left: auto; }

/* Family edit in slideout */
.family-edit {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.family-edit select {
  flex: 1;
  padding: .35rem .5rem;
  border: 1px solid #d5cfc7;
  border-radius: 6px;
  font: inherit;
  font-size: .85rem;
}
.family-edit select:focus {
  outline: none;
  border-color: #2d5a3d;
  box-shadow: 0 0 0 2px rgba(45,90,61,.15);
}
.family-status { font-size: .8rem; color: #7a8a7c; }
.family-status.saved { color: #4caf50; }
.family-status.error { color: #f44336; }

/* === Import Page === */
.import-card {
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.import-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #2d3a2e;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.import-card p {
  font-size: .9rem;
  color: #6b7c6e;
  margin-bottom: .75rem;
  line-height: 1.5;
}
.import-card ul {
  list-style: none;
  margin-bottom: 1rem;
}
.import-card ul li {
  font-size: .875rem;
  color: #6b7c6e;
  padding: .2rem 0;
}
.import-card ul li::before {
  content: "\2022";
  margin-right: .5rem;
  color: #2d5a3d;
}
.import-card ul li a {
  color: #2d5a3d;
  text-decoration: none;
  font-weight: 500;
}
.import-card ul li a:hover { text-decoration: underline; }
.import-card textarea {
  width: 100%;
  min-height: 180px;
  font: inherit;
  font-size: .9rem;
  padding: .75rem;
  border: 1px solid #d5cfc7;
  border-radius: 8px;
  resize: vertical;
  margin-bottom: .75rem;
}
.import-card textarea:focus {
  outline: none;
  border-color: #2d5a3d;
  box-shadow: 0 0 0 2px rgba(45,90,61,.15);
}

.import-error {
  background: #fce4ec;
  color: #b71c1c;
  border: 1px solid #f8bbd0;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .9rem;
  margin-bottom: 1rem;
}

/* Import history table */
.history-table { font-size: .85rem; }
.history-table th { font-size: .8rem; }
.history-empty {
  text-align: center;
  padding: 2rem;
  color: #7a8a7c;
  font-size: .9rem;
}
.error-count {
  color: #f44336;
  font-weight: 600;
  cursor: pointer;
}
.error-count:hover { text-decoration: underline; }
.error-details {
  display: none;
  background: #fce4ec;
  padding: .5rem .75rem;
  border-radius: 6px;
  font-size: .8rem;
  color: #b71c1c;
  margin-top: .3rem;
}
.error-details.open { display: block; }

.family-assign-select {
  font: inherit;
  font-size: .85rem;
  padding: .3rem .5rem;
  border: 1px solid #d5cfc7;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  min-width: 180px;
}
.family-assign-select:focus {
  outline: none;
  border-color: #2d5a3d;
  box-shadow: 0 0 0 2px rgba(45,90,61,.15);
}
.family-assign-select:disabled {
  opacity: .5;
  cursor: default;
}
.all-matched {
  color: #2d5a3d;
  font-weight: 600;
  text-align: center;
  padding: 1.5rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Ministering Page === */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 600px) {
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
}
.summary-card {
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}
.summary-number { font-size: 1.75rem; font-weight: 700; color: #2d3a2e; }
.summary-label { font-size: .8rem; color: #7a8a7c; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* Import preview summary card */
.import-summary-card {
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.summary-item { text-align: center; }
.summary-number.warning { color: #b45309; }

.ministering-section { margin-bottom: 2rem; }
.ministering-section h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.ministering-table { width: 100%; border-collapse: collapse; }
.ministering-table th, .ministering-table td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid #e5e0d8; font-size: .85rem; }
.ministering-table th { background: #f5f2ed; font-weight: 600; color: #4a5a4c; font-size: .8rem; }

.roster-group { margin-bottom: 1.25rem; }
.roster-group h3 { font-size: .9rem; font-weight: 600; color: #4a5a4c; margin-bottom: .5rem; }
.roster-toggle { cursor: pointer; user-select: none; }
.roster-toggle:hover { color: #2d5a3d; }
.toggle-arrow { font-size: .7rem; margin-right: .3rem; }
.roster-hidden { display: none; }

.btn-assign {
  display: inline-block;
  padding: .3rem .7rem;
  background: #2d5a3d;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 500;
}
.btn-assign:hover { background: #1e3d29; }

/* === Secondary Button === */
.btn-secondary {
  display: inline-block;
  background: #fff;
  color: #2d5a3d;
  border: 1px solid #d5cfc7;
  border-radius: 8px;
  padding: .5rem 1.25rem;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s;
}
.btn-secondary:hover { background: #eee9e1; }

/* === Summary Table === */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.summary-table tr {
  border-bottom: 1px solid #e5e0d8;
}
.summary-table td {
  padding: 0.5rem 0.75rem;
}
.summary-table td:last-child {
  text-align: right;
  min-width: 60px;
}

/* === EQ Meeting Cards === */
.meeting-card {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  gap: 1.25rem;
}
.meeting-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
  transform: translateY(-1px);
}
.meeting-card.meeting-past {
  opacity: .6;
}
.meeting-card.meeting-today {
  border-left: 4px solid #2d5a3d;
}

.meeting-date-block {
  text-align: center;
  min-width: 50px;
}
.meeting-month {
  font-size: .7rem;
  font-weight: 700;
  color: #7a8a7c;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.meeting-day {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2d3a2e;
  line-height: 1;
}

.meeting-center {
  flex: 1;
  min-width: 0;
}
.meeting-teachers {
  font-weight: 600;
  font-size: .9rem;
  color: #2d3a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meeting-talks {
  font-size: .8rem;
  color: #7a8a7c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .15rem;
}

.meeting-right {
  text-align: right;
  white-space: nowrap;
}
.meeting-sunday-label {
  font-size: .8rem;
  color: #7a8a7c;
  font-weight: 500;
}
.meeting-indicator {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 4px;
  font-size: .7rem;
  font-weight: 600;
  margin-top: .25rem;
}
.meeting-indicator.today {
  background: #e8f5e9;
  color: #1b5e20;
}
.meeting-indicator.past {
  background: #f5f2ed;
  color: #7a8a7c;
}

/* Disabled nav link */
.sidebar-link.disabled {
  opacity: .4;
  pointer-events: none;
  cursor: default;
}

/* Tab stat bar — shared across EQ tabs */
.tab-stat-bar {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}
.tab-stat-card {
  background: white;
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: block;
}
.tab-stat-card:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.tab-stat-card.active {
  border-color: #2d6a4f;
}
.tab-stat-number {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}
.tab-stat-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
