/* ============================================================
   One-Anothers — theme on top of Bootstrap 5.3
   Warm, calm, friendly. Edit the tokens below to re-skin.
   ============================================================ */
:root {
  --oa-primary: #0f766e;        /* deep teal */
  --oa-primary-rgb: 15, 118, 110;
  --oa-primary-dark: #0b5e58;
  --oa-primary-soft: #e6f4f2;
  --oa-accent: #d97706;         /* warm amber for "needs attention" */
  --oa-accent-soft: #fff4e0;
  --oa-ink: #1f2937;
  --oa-muted: #6b7280;
  --oa-line: #e5e7eb;
  --oa-bg: #f7f5f1;             /* warm off-white */
  --oa-card: #ffffff;
  --oa-radius: 14px;

  /* Bootstrap hooks */
  --bs-primary: var(--oa-primary);
  --bs-primary-rgb: var(--oa-primary-rgb);
  --bs-link-color: var(--oa-primary);
  --bs-link-color-rgb: var(--oa-primary-rgb);
  --bs-link-hover-color: var(--oa-primary-dark);
  --bs-link-hover-color-rgb: 11, 94, 88;
  --bs-body-bg: var(--oa-bg);
  --bs-body-color: var(--oa-ink);
  --bs-secondary-color: var(--oa-muted);
  --bs-border-color: var(--oa-line);
  --bs-border-radius: 10px;
  --bs-border-radius-lg: var(--oa-radius);
  --bs-body-font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.55;
}

body { font-family: var(--bs-body-font-family); background: var(--bs-body-bg); color: var(--bs-body-color); }
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5 { font-weight: 700; letter-spacing: -0.01em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.min-w-0 { min-width: 0; }

/* Page width: reading width by default, wider for management/admin */
.page-wrap { max-width: 900px; }
.page-wrap-wide { max-width: 1160px; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 10px; }
.btn-primary {
  --bs-btn-bg: var(--oa-primary); --bs-btn-border-color: var(--oa-primary);
  --bs-btn-hover-bg: var(--oa-primary-dark); --bs-btn-hover-border-color: var(--oa-primary-dark);
  --bs-btn-active-bg: var(--oa-primary-dark); --bs-btn-active-border-color: var(--oa-primary-dark);
  --bs-btn-disabled-bg: var(--oa-primary); --bs-btn-disabled-border-color: var(--oa-primary);
  --bs-btn-focus-shadow-rgb: var(--oa-primary-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--oa-primary); --bs-btn-border-color: var(--oa-primary);
  --bs-btn-hover-bg: var(--oa-primary); --bs-btn-hover-border-color: var(--oa-primary);
  --bs-btn-active-bg: var(--oa-primary-dark); --bs-btn-active-border-color: var(--oa-primary-dark);
  --bs-btn-focus-shadow-rgb: var(--oa-primary-rgb);
}
.btn-outline-secondary { --bs-btn-color: var(--oa-muted); --bs-btn-border-color: var(--oa-line);
  --bs-btn-hover-bg: #f3f4f6; --bs-btn-hover-color: var(--oa-ink); --bs-btn-hover-border-color: #d1d5db; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; margin-bottom: .3rem; }
.form-hint { font-weight: 400; color: var(--oa-muted); font-size: .85rem; }
.form-control, .form-select { border-radius: 10px; padding: .6rem .8rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--oa-primary); box-shadow: 0 0 0 .25rem rgba(var(--oa-primary-rgb), .18); }
.form-check-input:checked { background-color: var(--oa-primary); border-color: var(--oa-primary); }
.form-switch .form-check-input { cursor: pointer; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--oa-line); border-radius: var(--oa-radius); background: var(--oa-card);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card-body { padding: 1.35rem; }
.card-title, .card h2.h5, .card h3 { margin-bottom: .75rem; }
.card-header { background: transparent; border-bottom: 1px solid var(--oa-line); font-weight: 700; padding: 1rem 1.35rem; }

/* ---------- Header / navbar ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--oa-line); }
.site-header .navbar { padding: .55rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; color: var(--oa-ink); }
.navbar-brand:hover { text-decoration: none; color: var(--oa-primary); }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border-radius: 9px; background: var(--oa-primary); color: #fff; font-size: .95rem; }
.site-header .nav-link { color: var(--oa-ink); font-weight: 600; border-radius: 8px; padding: .45rem .8rem; }
.site-header .nav-link:hover, .site-header .nav-link.active { background: var(--oa-primary-soft); color: var(--oa-primary-dark); text-decoration: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--oa-primary-soft); color: var(--oa-primary-dark); font-weight: 800; font-size: .85rem; margin-right: .4rem; }
.dropdown-menu { border-radius: 12px; border-color: var(--oa-line); box-shadow: 0 8px 24px rgba(16,24,40,.10); }
.dropdown-item { padding: .5rem 1rem; }
.dropdown-item:active { background: var(--oa-primary); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--oa-line); background: #fff; }

/* ---------- Public project header + tabs ---------- */
.project-header { background: #fff; border-bottom: 1px solid var(--oa-line); }
.project-tabs { border-bottom: 0; gap: .25rem; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.project-tabs .nav-link { color: var(--oa-muted); font-weight: 600; border: 0; border-bottom: 3px solid transparent;
  border-radius: 0; padding: .6rem .9rem; white-space: nowrap; }
.project-tabs .nav-link:hover { color: var(--oa-ink); border-bottom-color: var(--oa-line); text-decoration: none; }
.project-tabs .nav-link.active { color: var(--oa-primary-dark); background: transparent; border-bottom-color: var(--oa-primary); }

/* ---------- Manage sidebar nav ---------- */
.manage-card .card-body { padding: 1rem 1.1rem; }
.manage-nav { display: flex; flex-direction: column; gap: 2px; }
.manage-nav-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--oa-muted);
  font-weight: 700; padding: .9rem .75rem .3rem; }
.manage-nav-link { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-radius: 9px;
  color: var(--oa-ink); font-weight: 600; }
.manage-nav-link i { width: 1.1rem; text-align: center; color: var(--oa-muted); }
.manage-nav-link:hover { background: #fff; text-decoration: none; }
.manage-nav-link.active { background: var(--oa-primary); color: #fff; }
.manage-nav-link.active i { color: #fff; }
@media (max-width: 991.98px) {
  .manage-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: .35rem; padding-bottom: .35rem; -webkit-overflow-scrolling: touch; }
  .manage-nav-heading { display: none; }
  .manage-nav-link { white-space: nowrap; background: #fff; border: 1px solid var(--oa-line); padding: .45rem .75rem; font-size: .92rem; }
}

/* ---------- Stats ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; }
.stat { background: #fff; border: 1px solid var(--oa-line); border-radius: 12px; padding: .9rem 1rem; }
.stat .n { font-size: 1.6rem; font-weight: 800; color: var(--oa-primary-dark); line-height: 1.1; }
.stat .l { font-size: .82rem; color: var(--oa-muted); }

/* ---------- Badges ---------- */
.badge-need { background: var(--oa-accent-soft); color: var(--oa-accent); }
.badge-ok { background: var(--oa-primary-soft); color: var(--oa-primary-dark); }

/* ---------- Day / task list (public + admin) ---------- */
.item-card { background: #fff; border: 1px solid var(--oa-line); border-radius: var(--oa-radius); padding: 1.1rem 1.25rem; margin-bottom: .9rem; }
.item-card.is-full { background: #fbfdfc; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.item-title { font-size: 1.1rem; font-weight: 700; }
.item-meta { color: var(--oa-muted); font-size: .92rem; }
.item-when { font-size: .8rem; font-weight: 700; color: var(--oa-primary-dark); text-transform: uppercase; letter-spacing: .04em; }

.slot-list { list-style: none; margin: .8rem 0 0; padding: 0; }
.slot-list li { display: flex; gap: .6rem; align-items: baseline; padding: .45rem 0; border-top: 1px dashed var(--oa-line); font-size: .97rem; overflow-wrap: anywhere; }
.slot-list li:first-child { border-top: 0; }
.slot-num { flex: 0 0 1.6rem; font-weight: 800; color: var(--oa-muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.slot-avail { color: var(--oa-accent); font-weight: 700; }

/* ---------- Updates feed ---------- */
.update { border-left: 3px solid var(--oa-primary); padding: .2rem 0 .2rem 1rem; margin-bottom: 1.25rem; }
.update:last-child { margin-bottom: 0; }
.update .when { font-size: .82rem; color: var(--oa-muted); }
.update h3 { font-size: 1.05rem; margin: .15rem 0 .35rem; }
.update .body { white-space: pre-wrap; }

/* ---------- Notice ---------- */
.notice { background: var(--oa-primary-soft); border: 1px solid #cfe5e0; border-radius: 12px; padding: .9rem 1rem; }
.notice-warm { background: var(--oa-accent-soft); border-color: #f5dcb3; }
.notice-alert { background: #fdecea; border: 1px solid #f1b8b2; border-left: 5px solid #c0392b; color: #7a1f14; font-size: 1.02rem; }
.notice-alert strong { color: #c0392b; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }

/* ---------- Intro split (public home) ---------- */
.intro-split { display: flex; gap: 1.25rem; align-items: flex-start; }
.intro-text { flex: 1 1 0; min-width: 0; white-space: pre-wrap; }
.intro-photo { flex: 0 0 42%; max-width: 42%; }
.intro-photo img { width: 100%; height: auto; border-radius: 12px; display: block; }
@media (max-width: 640px) {
  .intro-split { flex-direction: column; }
  .intro-photo { order: -1; flex: none; max-width: 100%; }
}

/* ---------- Tables ---------- */
.table { --bs-table-border-color: var(--oa-line); font-size: .95rem; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--oa-muted); font-weight: 700; }
.table td { vertical-align: top; }
.contact-links a { display: inline-block; margin-right: .6rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border: 1px solid var(--oa-line); border-radius: 10px; margin-bottom: .75rem; padding: .35rem .75rem; background: #fff; }
  .table-stack td { border: 0; padding: .3rem 0; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; color: var(--oa-muted); text-transform: uppercase; letter-spacing: .05em; }
}

/* Signup tables: one table for every day so columns line up; contact under the name */
.signup-table { table-layout: fixed; font-size: .93rem; }
.signup-table .col-name { width: 44%; }
.signup-table .col-num { width: 5.5rem; white-space: nowrap; }
.signup-table .col-act { width: 3.6rem; }
.signup-table th { padding: .55rem .9rem; }
.signup-table td { padding: .8rem .9rem; background: #f6f5f2; }
.signup-table .day-row td { background: #fff; border-top: 12px solid #fff; border-bottom: 1px solid var(--oa-line); padding: 1rem .9rem .6rem; }
.signup-table tbody tr:first-child.day-row td { border-top: 0; }
.signup-table .contact-links { margin-top: .15rem; }
.signup-table .day-row.is-past td { color: var(--oa-muted); }
.signup-table .day-row .item-when { font-size: .7rem; }
.signup-table .contact-links { display: flex; flex-wrap: nowrap; align-items: center; gap: .7rem; line-height: 1.4; min-width: 0; }
.signup-table .contact-links a { font-weight: 500; white-space: nowrap; }
.signup-table .contact-links a:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.signup-table td, .signup-table th { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  /* Stack: name + contact on top, then dish / count, remove button at the right */
  .signup-table, .signup-table tbody { display: block; }
  .signup-table thead { display: none; }
  .signup-table tr { display: grid; grid-template-columns: 1fr auto auto; column-gap: .6rem; padding: .75rem .8rem; border-bottom: 1px solid var(--oa-line); }
  .signup-table td { display: block; padding: 0 !important; border: 0; width: auto !important; background: transparent; box-shadow: none; }
  .signup-table tr:not(.day-row) { background: #f6f5f2; }
  .signup-table .contact-links { flex-wrap: wrap; gap: .3rem .7rem; }
  .signup-table tr:not(.day-row) td:nth-child(1) { grid-column: 1 / 3; grid-row: 1; margin-bottom: .2rem; }
  .signup-table tr:not(.day-row) td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .signup-table tr:not(.day-row) td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: right; }
  .signup-table tr:not(.day-row) td:nth-child(3)::before { content: "× "; color: var(--oa-muted); }
  .signup-table tr:not(.day-row) td:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; align-self: start; }
  .signup-table .day-row { grid-template-columns: 1fr auto; background: #fff; border-top: 3px solid var(--oa-line); }
  .signup-table .day-row td[colspan] { grid-column: 1; grid-row: 1; }
  .signup-table .day-row td:last-child { grid-column: 2; grid-row: 1; }
  .signup-table .contact-links a { white-space: normal; }
}

/* ---------- Repeater rows (add days / tasks) ---------- */
.repeat-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; border: 1px solid var(--oa-line);
  border-radius: 12px; padding: .75rem; margin-bottom: .6rem; background: #fafaf8; }
.repeat-row > div { flex: 1 1 140px; }
.repeat-row > .w-title { flex: 2 1 200px; }
.repeat-row > .w-sm { flex: 0 1 120px; }
.repeat-row > .w-btn { flex: 0 0 auto; }
.repeat-row > .w-date { flex: 0 1 160px; }
.repeat-row > .w-limit { flex: 0 1 180px; }
.repeat-row > .w-time { flex: 0 1 150px; }
.time-field .time-text { min-width: 4.5rem; }
.time-field .ampm-toggle { min-width: 3.2rem; font-weight: 700; }
.limit-num[readonly] { background: #f3f4f6; color: var(--oa-muted); }
.repeat-row .form-label { font-size: .8rem; margin-bottom: .2rem; }

/* ---------- Landing ---------- */
.scripture { font-style: italic; font-size: 1.1rem; color: var(--oa-primary-dark); max-width: 36rem; margin-bottom: 1rem; }
.scripture-ref { display: block; font-style: normal; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--oa-muted); margin-top: .25rem; }
.one-another { border-left: 3px solid var(--oa-primary); padding: .35rem 0 .35rem .9rem; }
.hero { padding: 3rem 0 2rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
.hero .lead { font-size: 1.15rem; color: var(--oa-muted); max-width: 40rem; }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--oa-primary-soft); color: var(--oa-primary-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: .75rem; }

/* ---------- Misc ---------- */
.member-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .8rem 0; border-top: 1px solid var(--oa-line); }
.member-row:first-child { border-top: 0; }
.log-ok { color: var(--oa-primary-dark); }
.log-fail { color: #b91c1c; }
.text-pre { white-space: pre-wrap; }
