/* ==========================================================
   Kigango cha Mt. Yohane Jumbi — mtindo wa website
   Rangi: navy ya Bahari ya Hindi, dhahabu ya liturujia, nyeupe
   ========================================================== */

:root {
  --navy: #13294b;
  --navy-2: #1d3a66;
  --ink: #1c2b44;
  --muted: #5a6a82;
  --line: #d9e0ea;
  --mist: #eef2f7;
  --paper: #ffffff;
  --gold: #b4862a;
  --gold-ink: #8a6516;
  --gold-soft: #f6eedc;

  /* rangi za liturujia */
  --lit-kijani: #2f6b45;
  --lit-zambarau: #5b3a7a;
  --lit-nyekundu: #a3262a;
  --lit-nyeupe: #c9a54a;
  --lit-waridi: #c76b8e;

  --ok: #2f6b45;
  --ok-soft: #e3efe7;
  --warn: #9a6a00;
  --warn-soft: #fbf1d8;
  --bad: #a3262a;
  --bad-soft: #f8e4e4;

  --font-display: "Alegreya", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: #fff; border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.brand-sub { display: block; font-size: .78rem; color: #c9d4e5; font-family: var(--font-body); font-weight: 400; }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: #e6ecf5; text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm); font-size: .95rem; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.nav .nav-cta { background: var(--gold); color: var(--navy); font-weight: 600; margin-left: 6px; }
.nav .nav-cta:hover { background: #c99a3c; color: var(--navy); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--r-sm); padding: 8px 12px; font: inherit; cursor: pointer; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; border-bottom: 3px solid var(--gold); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Hero: mlango wa Zanzibar ---------- */
.hero { padding: 40px 0 56px; background: linear-gradient(var(--mist), var(--mist)) bottom / 100% 45% no-repeat; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: stretch; }
.arch {
  position: relative;
  background: var(--navy);
  color: #fff;
  border-radius: 46% 46% 0 0 / 30% 30% 0 0;
  padding: 92px 40px 40px;
  min-height: 420px;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  background-size: cover; background-position: center;
}
.arch::before {
  /* fremu ya ndani ya dhahabu — kama nakshi ya mlango */
  content: ""; position: absolute; inset: 14px 14px 0 14px;
  border: 1.5px solid rgba(180,134,42,.75); border-bottom: 0;
  border-radius: 46% 46% 0 0 / 30% 30% 0 0;
  pointer-events: none;
}
.arch.has-photo { background-image: linear-gradient(180deg, rgba(19,41,75,.15) 0%, rgba(19,41,75,.92) 70%), var(--hero-photo); }
.arch h1 { color: #fff; margin-bottom: .3em; }
.arch .motto { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: #e9d7ae; margin: 0 0 1.4em; }
.arch .where { color: #c9d4e5; margin: 0 0 1.4em; }
.arch .studs { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; }
.arch .studs span { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); opacity: .9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.sunday {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px 24px 22px 30px;
  position: relative;
}
.sunday::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--lit, var(--lit-kijani)); }
.sunday .kicker { font-size: .9rem; color: var(--muted); margin: 0 0 .25em; }
.sunday h2 { font-size: 1.5rem; margin-bottom: .6em; }
.ref-list { list-style: none; margin: 0 0 1em; padding: 0; }
.ref-list li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.ref-list li:first-child { border-top: 0; }
.ref-list .k { color: var(--muted); font-size: .9rem; }
.ref-list .v { font-weight: 600; }
.lit-chip { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.lit-chip i { width: 12px; height: 12px; border-radius: 50%; background: var(--lit, var(--lit-kijani)); display: inline-block; border: 1px solid rgba(0,0,0,.12); }

.mass-times { margin-top: 18px; }
.mass-times h3 { font-size: 1.1rem; margin-bottom: .4em; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .arch { min-height: 340px; padding: 80px 24px 28px; }
  .hero { background: var(--mist); }
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem/1 var(--font-body);
  padding: 12px 18px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--navy); color: #fff;
}
.btn:hover { background: var(--navy-2); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #c99a3c; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--mist); color: var(--navy); }
.arch .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.arch .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-danger { background: var(--paper); color: var(--bad); border-color: #e7b9b9; }
.btn-danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn-sm { padding: 8px 12px; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy); }
.field { margin-bottom: 16px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(29,58,102,.15); }
textarea { min-height: 110px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: auto; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-mist { background: var(--mist); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.page-head { background: var(--navy); color: #fff; padding: 44px 0 36px; border-bottom: 3px solid var(--gold); }
.page-head h1 { color: #fff; margin-bottom: .2em; }
.page-head p { color: #c9d4e5; margin: 0; max-width: 62ch; }

/* Matangazo */
.ann-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.ann { display: grid; grid-template-columns: 7rem 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ann-date { color: var(--muted); font-size: .9rem; }
.ann-date strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--navy); line-height: 1; }
.ann h3 { font-size: 1.2rem; margin-bottom: .3em; }
.ann .body { white-space: pre-line; }
.ann.pinned { background: var(--gold-soft); padding-left: 14px; padding-right: 14px; border-left: 4px solid var(--gold); }
.tag { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--mist); color: var(--navy-2); margin-right: 6px; }
.ann.pinned .tag { background: #fff; }
@media (max-width: 560px) { .ann { grid-template-columns: 1fr; gap: 4px; } .ann-date strong { display: inline; font-size: 1.1rem; margin-right: 6px; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button { font: inherit; font-size: .9rem; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Ratiba ya misa */
.mass-table { width: 100%; border-collapse: collapse; }
.mass-table td { padding: 9px 0; border-top: 1px solid var(--line); vertical-align: top; }
.mass-table tr:first-child td { border-top: 0; }
.mass-table td:first-child { font-weight: 600; padding-right: 12px; }
.mass-table .note { color: var(--muted); font-size: .88rem; }

/* Matukio */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.event { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.event .cover { aspect-ratio: 4 / 3; background: var(--navy) center / cover; position: relative; }
.event .cover.empty { display: grid; place-items: center; }
.event .cover.empty img { width: 64px; opacity: .55; }
.event .meta { padding: 16px 18px 18px; }
.event .when { color: var(--gold-ink); font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.event h3 { font-size: 1.2rem; margin-bottom: .3em; }
.event button.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--r-sm); }
.gallery figcaption { font-size: .82rem; color: var(--muted); margin-top: 4px; }

dialog { border: 0; border-radius: var(--r-md); padding: 0; max-width: min(860px, calc(100vw - 32px)); width: 100%; }
dialog::backdrop { background: rgba(19,41,75,.6); }
.dialog-body { padding: 24px; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }

/* Masomo */
.reading-day { border: 1px solid var(--line); border-radius: var(--r-md); padding: 24px 26px 8px 32px; position: relative; margin-bottom: 22px; background: #fff; }
.reading-day::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--lit, var(--lit-kijani)); }
.reading-day .date { color: var(--muted); margin-bottom: .2em; }
.reading-block { padding: 14px 0; border-top: 1px solid var(--line); }
.reading-block h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; color: var(--gold-ink); margin-bottom: .35em; }
.reading-block .text { white-space: pre-line; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.7; max-width: 68ch; }
.reflection { background: var(--gold-soft); border-radius: var(--r-sm); padding: 16px 18px; margin: 4px 0 18px; }
details.older summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--navy); }

/* Kuhusu */
.prose { max-width: 68ch; }
.prose p { font-size: 1.06rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin-top: 24px; }
.facts div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); }
.jumuiya-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.jumuiya-list li { border: 1.5px solid var(--gold); color: var(--navy); padding: 8px 16px; border-radius: 999px; font-weight: 600; background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c9d4e5; padding: 40px 0 24px; margin-top: 0; border-top: 3px solid var(--gold); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h3 { color: #fff; font-size: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 28px; padding-top: 16px; font-size: .85rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 71px); display: grid; place-items: center; padding: 40px 16px; background: var(--mist); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 32px 28px; }
.auth-card .crest { width: 56px; margin-bottom: 14px; }
.auth-card h1 { font-size: 1.9rem; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: .92rem; }

/* ---------- Alerts / notices ---------- */
.notice { border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 16px; font-size: .94rem; border: 1px solid; }
.notice-info { background: #e8eef7; border-color: #c5d3e8; color: var(--navy); }
.notice-ok { background: var(--ok-soft); border-color: #b9d6c2; color: var(--ok); }
.notice-bad { background: var(--bad-soft); border-color: #e7b9b9; color: var(--bad); }
.notice-warn { background: var(--warn-soft); border-color: #ecd59a; color: #6d4b00; }
.demo-bar { background: var(--gold-soft); color: #6d4b00; font-size: .88rem; text-align: center; padding: 8px 16px; border-bottom: 1px solid #ecd59a; }
.empty { color: var(--muted); padding: 22px 0; }
.hidden { display: none !important; }

/* ---------- Portal ya waumini ---------- */
.portal-head { background: var(--navy); color: #fff; padding: 30px 0 26px; border-bottom: 3px solid var(--gold); }
.portal-head h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: .15em; }
.portal-head .who { color: #c9d4e5; }
.portal-head .row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.year-picker { display: flex; align-items: center; gap: 8px; }
.year-picker select { width: auto; padding: 8px 12px; }
.portal-head .year-picker label { color: #c9d4e5; margin: 0; }

.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; margin: 28px 0; }
.totals div { padding: 18px 20px; border-left: 1px solid var(--line); }
.totals div:first-child { border-left: 0; }
.totals dt { color: var(--muted); font-size: .88rem; }
.totals dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.totals dd small { font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
@media (max-width: 760px) { .totals { grid-template-columns: 1fr 1fr; } .totals div:nth-child(3) { border-left: 0; } .totals div:nth-child(n+3) { border-top: 1px solid var(--line); } }

.progress { height: 10px; background: var(--mist); border-radius: 999px; overflow: hidden; margin: -10px 0 30px; }
.progress span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }

/* Kalenda ya miezi 12 */
.months { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 860px) { .months { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .months { grid-template-columns: repeat(3, 1fr); } }
.month { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 12px 12px 10px; background: #fff; position: relative; overflow: hidden; }
.month .m { font-weight: 700; color: var(--navy); font-size: .95rem; }
.month .a { font-variant-numeric: tabular-nums; font-size: .9rem; margin-top: 2px; }
.month .s { font-size: .78rem; margin-top: 6px; color: var(--muted); }
.month.paid { border-color: var(--ok); background: var(--ok-soft); }
.month.paid .s { color: var(--ok); font-weight: 600; }
.month.partial { border-color: #d9b45a; background: linear-gradient(to top, var(--warn-soft) var(--fill, 50%), #fff var(--fill, 50%)); }
.month.partial .s { color: #6d4b00; font-weight: 600; }
.month.unpaid .s { color: var(--bad); }
.month.future { opacity: .7; border-style: dashed; }
.month.future .s { color: var(--muted); }
.month.waived { border-color: var(--line); background: var(--mist); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid; }
.legend .l-paid::before { background: var(--ok-soft); border-color: var(--ok); }
.legend .l-partial::before { background: var(--warn-soft); border-color: #d9b45a; }
.legend .l-unpaid::before { background: #fff; border-color: var(--line); }

table.data { width: 100%; border-collapse: collapse; font-size: .94rem; background: #fff; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); font-size: .84rem; padding: 10px 12px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--mist); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.table-wrap table.data td:first-child, .table-wrap table.data th:first-child { padding-left: 16px; }

.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.pill-paid { background: var(--ok-soft); color: var(--ok); }
.pill-partial { background: var(--warn-soft); color: #6d4b00; }
.pill-unpaid { background: var(--bad-soft); color: var(--bad); }
.pill-muted { background: var(--mist); color: var(--muted); }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 71px); }
.admin-side { background: var(--mist); border-right: 1px solid var(--line); padding: 22px 12px; }
.admin-side .who { padding: 0 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; font-size: .88rem; color: var(--muted); }
.admin-side .who strong { display: block; color: var(--navy); font-size: .95rem; word-break: break-all; }
.tabs { display: flex; flex-direction: column; gap: 2px; }
.tabs button { text-align: left; font: inherit; font-size: .95rem; background: none; border: 0; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); cursor: pointer; }
.tabs button:hover { background: #e2e8f1; }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
.admin-main { padding: 28px 28px 60px; min-width: 0; }
.admin-main h2 { margin-bottom: .2em; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; margin-bottom: 22px; }
.panel h3 { margin-bottom: .6em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 16px 0; }
.toolbar .field { margin: 0; }
.toolbar input[type="search"] { min-width: 240px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .tabs { flex-direction: row; overflow-x: auto; }
  .tabs button { white-space: nowrap; }
  .admin-main { padding: 20px 16px 48px; }
}
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; margin: 18px 0 22px; }
.kpis div { padding: 16px 18px; border-left: 1px solid var(--line); }
.kpis div:first-child { border-left: 0; }
.kpis dt { font-size: .85rem; color: var(--muted); }
.kpis dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .kpis div:nth-child(3) { border-left: 0; } .kpis div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); z-index: 100; border-left: 4px solid var(--gold); max-width: calc(100vw - 32px); }
.toast.bad { border-left-color: #e57373; }
.member-panel-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: start; }

@media (prefers-reduced-motion: no-preference) {
  .arch .studs span { animation: glow 2.4s ease-in-out 1; animation-delay: calc(var(--i) * 120ms); }
  @keyframes glow { 0% { opacity: .2; } 60% { opacity: 1; } 100% { opacity: .9; } }
}

@media print {
  .site-header, .site-footer, .admin-side, .no-print, .demo-bar { display: none !important; }
  .admin-shell { display: block; }
  body { font-size: 11pt; }
}
