/* ══════════════════════════════════════════════════
   GMCT CHURCH ANNOUNCEMENT APP – stylesheet
   ══════════════════════════════════════════════════ */

:root {
  --primary:       #1a237e;
  --primary-light: #3949ab;
  --primary-dark:  #0d1757;
  --gold:          #FFB300;
  --gold-light:    #FFCA28;
  --green:         #2e7d32;
  --purple:        #6a1b9a;
  --red:           #c62828;
  --white:         #ffffff;
  --gray-50:       #fafafa;
  --gray-100:      #f5f5f5;
  --gray-200:      #eeeeee;
  --gray-300:      #e0e0e0;
  --gray-500:      #9e9e9e;
  --gray-700:      #616161;
  --gray-900:      #212121;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.14);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.20);
  --radius:    12px;
  --radius-sm:  8px;
  --font: 'Poppins','Segoe UI',sans-serif;
  --serif: 'Playfair Display',Georgia,serif;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { height: 100%; overflow: hidden; }
body { font-family:var(--font); color:var(--gray-900); }

/* ══════════════════════════════════════════════════
   PUBLIC DISPLAY PAGE
   ══════════════════════════════════════════════════ */
.display-body {
  background: #07091e;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  filter: brightness(var(--display-brightness, 1));
  transition: filter .45s ease;
}

/* Header */
.display-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 8px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--gold);
  flex-shrink: 0;
}
.hd-left .cross-icon {
  font-size: 2.6rem;
  color: var(--gold);
  filter: drop-shadow(0 0 10px rgba(255,179,0,.7));
}
.hd-left .church-logo {
  max-height: 52px;
  max-width: 130px;
  object-fit: contain;
  filter: none;
  opacity: 1;
}
.hd-left, .hd-right { flex-shrink: 0; flex-basis: 160px; }
.hd-center { text-align: center; flex: 1; padding: 0 12px; min-width: 0; overflow: hidden; }

.church-name {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.9vw, 2rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  text-shadow: 0 3px 12px rgba(0,0,0,.5);
  white-space: normal;
  word-break: break-word;
}
.church-tagline {
  font-size: clamp(0.72rem, 0.9vw, 1rem);
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 1.5px;
  margin-top: 3px;
}
.hd-right { text-align: right; min-width: 180px; }
.live-time {
  font-size: clamp(1.1rem, 1.7vw, 1.9rem);
  font-weight: 700;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.live-date {
  font-size: clamp(0.7rem, 0.85vw, 0.95rem);
  color: var(--gold-light);
  margin-top: 2px;
}

/* Main grid */
.display-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 8px 2px;
  overflow: hidden;
  position: relative;
}

.theme-year-overlay {
  position: absolute;
  inset: 0;
  z-index: 25;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: var(--shadow-lg);
}

.theme-year-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.weekly-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  border: 0;
  box-shadow: none;
}

.weekly-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.weekly-video-title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #fff;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
}

/* Panels */
.display-panel {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.panel-header {
  background: linear-gradient(135deg,rgba(13,23,87,.9),rgba(57,73,171,.7));
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--gold);
  flex-shrink: 0;
}
.panel-header > span {
  font-size: 0.95rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}
.panel-header h2 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.panel-body {
  flex: 1;
  padding: 4px 8px 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* Programs panel: 2 cards per page, full-height rows */
#programs-list {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: stretch;
}

#programs-list .prog-card {
  height: 100%;
  align-self: stretch;
}

#programs-list .no-content {
  grid-row: 1 / -1;
  align-self: center;
}

#social-list {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-content: stretch;
}

#social-list .evt-card {
  height: 100%;
  min-height: 0;
}

#social-list .no-content {
  grid-row: 1 / -1;
  align-self: center;
}

/* ── Card Transition Keyframes ────────────────────────────────── */
/* 1. Fade */
@keyframes tx-fade-out  { to   { opacity: 0; transform: scale(.97); } }
@keyframes tx-fade-in   { from { opacity: 0; transform: scale(1.03); } }
/* 2. Fly In (slide right→left) */
@keyframes tx-fly-out   { to   { opacity: 0; transform: translateX(-6%); } }
@keyframes tx-fly-in    { from { opacity: 0; transform: translateX(7%); } }
/* 3. Zoom */
@keyframes tx-zoom-out  { to   { opacity: 0; transform: scale(.8); } }
@keyframes tx-zoom-in   { from { opacity: 0; transform: scale(1.16); } }
/* 4. Flip 3D */
@keyframes tx-flip-out  { to   { opacity: 0; transform: perspective(700px) rotateY(90deg); } }
@keyframes tx-flip-in   { from { opacity: 0; transform: perspective(700px) rotateY(-90deg); } }
/* 5. Wipe (vertical) */
@keyframes tx-wipe-out  { to   { opacity: 0; transform: translateY(-7%); } }
@keyframes tx-wipe-in   { from { opacity: 0; transform: translateY(7%); } }
/* 6. Morph (blur dissolve) */
@keyframes tx-morph-out { to   { opacity: 0; transform: scale(1.05); filter: blur(14px); } }
@keyframes tx-morph-in  { from { opacity: 0; transform: scale(.95); filter: blur(14px); } }
/* 7. Glitch */
@keyframes tx-glitch-out {
  0%   { opacity: 1;  transform: skewX(0);     clip-path: inset(0 0 0 0); }
  25%  { opacity: .8; transform: skewX(-3deg); clip-path: inset(10% 0 60% 0); }
  55%  { opacity: .5; transform: skewX(3deg);  clip-path: inset(50% 0 10% 0); }
  100% { opacity: 0;  transform: skewX(0);     clip-path: inset(50% 0 50% 0); }
}
@keyframes tx-glitch-in {
  0%   { opacity: 0; transform: skewX(-3deg); clip-path: inset(50% 0 50% 0); }
  30%  { opacity: .5; transform: skewX(3deg);  clip-path: inset(10% 0 60% 0); }
  65%  { opacity: .9; transform: skewX(-1deg); clip-path: inset(0 0 10% 0); }
  100% { opacity: 1; transform: skewX(0);      clip-path: inset(0 0 0 0); }
}

/* EXIT animations */
.panel-body.roll-exit[data-transition="fade"]   { animation: tx-fade-out  .28s ease forwards; }
.panel-body.roll-exit[data-transition="fly"]    { animation: tx-fly-out   .28s ease forwards; }
.panel-body.roll-exit[data-transition="zoom"]   { animation: tx-zoom-out  .28s ease forwards; }
.panel-body.roll-exit[data-transition="flip"]   { animation: tx-flip-out  .30s ease forwards; }
.panel-body.roll-exit[data-transition="wipe"]   { animation: tx-wipe-out  .28s ease forwards; }
.panel-body.roll-exit[data-transition="morph"]  { animation: tx-morph-out .30s ease forwards; }
.panel-body.roll-exit[data-transition="glitch"] { animation: tx-glitch-out .32s ease forwards; }

/* ENTER animations */
.panel-body.roll-enter[data-transition="fade"]   { animation: tx-fade-in  .38s ease forwards; }
.panel-body.roll-enter[data-transition="fly"]    { animation: tx-fly-in   .36s ease forwards; }
.panel-body.roll-enter[data-transition="zoom"]   { animation: tx-zoom-in  .36s ease forwards; }
.panel-body.roll-enter[data-transition="flip"]   { animation: tx-flip-in  .36s ease forwards; }
.panel-body.roll-enter[data-transition="wipe"]   { animation: tx-wipe-in  .36s ease forwards; }
.panel-body.roll-enter[data-transition="morph"]  { animation: tx-morph-in .38s ease forwards; }
.panel-body.roll-enter[data-transition="glitch"] { animation: tx-glitch-in .40s ease forwards; }

/* ── Transition Picker (admin settings) ──────────────────────── */
.tx-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tx-opt {
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #c5cae9;
  background: #fff;
  color: #3949ab;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .12s;
  letter-spacing: .02em;
}
.tx-opt:hover {
  border-color: #3949ab;
  background: #e8eaf6;
  transform: translateY(-1px);
}
.tx-opt.active {
  background: #1a237e;
  border-color: #1a237e;
  color: #ffb300;
  box-shadow: 0 2px 10px rgba(26,35,126,.3);
}

/* Program cards */
.prog-card {
  background: linear-gradient(135deg,rgba(26,35,126,.55),rgba(57,73,171,.35));
  border: 1px solid rgba(255,179,0,.3);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  column-gap: 14px;
  row-gap: 8px;
  transition: border-color .2s, transform .2s;
}
.prog-card:hover { border-color: var(--gold); transform: translateX(4px); }
.prog-card .p-title {
  width: 100%;
  flex: 0 0 100%;
  color: #ffffff !important;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.18;
  min-width: 0;
  display: block;
  max-height: 2.5em;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.prog-time-badge {
  order: 2;
  background: var(--gold);
  color: var(--primary-dark);
  border-radius: 9px;
  padding: 10px 14px 12px;
  text-align: center;
  min-width: 108px;
  justify-self: end;
  align-self: start;
  flex-shrink: 0;
}
.prog-time-badge .lbl {
  display: block;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.prog-time-badge .t { display: block; font-size: 1.55rem; font-weight: 800; line-height: 1.1; }
.prog-time-badge .ap { font-size: .9rem; font-weight: 700; text-transform: uppercase; }
.prog-info {
  order: 1;
  min-width: 0;
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
}
.prog-info .p-date { color: #d6dcff; font-size: 1.05rem; margin-top: 5px; }
.prog-info .p-venue { color: var(--gold-light); font-size: 1.05rem; margin-top: 6px; }
.prog-info .p-venue::before { content: '📍 '; }
.prog-info .p-cat {
  display: inline-block;
  background: rgba(255,179,0,.18);
  color: var(--gold-light);
  font-size: .85rem;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 8px;
}
.prog-info .p-time-range { color: rgba(255,255,255,.7); font-size: 1rem; margin-top: 5px; }

.prog-card.compact {
  padding: 16px 18px;
  row-gap: 6px;
}
.prog-card.compact .p-title {
  font-size: 1.24rem;
  max-height: calc(1.18em * 2);
}
.prog-card.compact .prog-time-badge {
  min-width: 96px;
  padding: 8px 10px 10px;
}
.prog-card.compact .prog-time-badge .t { font-size: 1.35rem; }
.prog-card.compact .prog-time-badge .ap { font-size: .78rem; }
.prog-card.compact .prog-info .p-date,
.prog-card.compact .prog-info .p-venue,
.prog-card.compact .prog-info .p-time-range { font-size: .95rem; }

.prog-card.dense {
  padding: 14px 16px;
  row-gap: 4px;
}
.prog-card.dense .p-title {
  font-size: 1.1rem;
  max-height: calc(1.18em * 2);
}
.prog-card.dense .prog-time-badge {
  min-width: 86px;
  padding: 6px 8px 8px;
}
.prog-card.dense .prog-time-badge .lbl { font-size: .5rem; }
.prog-card.dense .prog-time-badge .t { font-size: 1.2rem; }
.prog-card.dense .prog-time-badge .ap { font-size: .72rem; }
.prog-card.dense .prog-info .p-date,
.prog-card.dense .prog-info .p-venue,
.prog-card.dense .prog-info .p-time-range { font-size: .88rem; }
.prog-card.dense .prog-info .p-cat { font-size: .74rem; padding: 3px 8px; margin-top: 6px; }

/* Event cards */
.evt-card {
  background: linear-gradient(135deg,rgba(74,20,140,.3),rgba(106,27,154,.4));
  border: 1px solid rgba(255,179,0,.25);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'title title'
    'date countdown'
    'time time'
    'venue venue'
    'desc desc';
  align-content: start;
  column-gap: 14px;
  row-gap: 6px;
  min-height: 0;
  transition: transform .2s;
}
.evt-card.featured { border-color: var(--gold); background: linear-gradient(135deg,rgba(74,20,140,.5),rgba(106,27,154,.6)); }
.evt-card:hover { transform: translateY(-2px); }
.evt-card .feat-badge {
  position: absolute; top: -10px; right: 14px;
  background: var(--gold); color: var(--primary-dark);
  font-size: .9rem; font-weight: 700; padding: 4px 14px;
  border-radius: 12px; text-transform: uppercase;
}
.evt-card .countdown {
  grid-area: countdown;
  position: static;
  background: rgba(255,179,0,.15); border: 1px solid rgba(255,179,0,.4);
  color: var(--gold-light); font-size: 1rem;
  padding: 4px 12px; border-radius: 20px; font-weight: 600;
  justify-self: end;
  align-self: start;
  white-space: nowrap;
}
.evt-card .e-title {
  grid-area: title;
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2px;
  line-height: 1.18;
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.evt-card .e-date  {
  grid-area: date;
  color: var(--gold-light);
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 0;
}
.evt-card .e-date::before  { content: '📅 '; }
.evt-card .e-time  { grid-area: time; color: rgba(255,255,255,.82); font-size: 1.05rem; margin-top: 2px; }
.evt-card .e-time::before  { content: '⏰ '; }
.evt-card .e-venue { grid-area: venue; color: rgba(255,255,255,.82); font-size: 1.05rem; margin-top: 2px; }
.evt-card .e-venue::before { content: '📍 '; }
.evt-card .e-desc  {
  grid-area: desc;
  color: rgba(255,255,255,.65);
  font-size: .95rem;
  margin-top: 4px;
  line-height: 1.55;
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.evt-card.compact {
  padding: 16px 18px;
  row-gap: 4px;
}
.evt-card.compact .e-title {
  font-size: 1.22rem;
  margin-bottom: 0;
}
.evt-card.compact .countdown { font-size: .92rem; padding: 3px 10px; }
.evt-card.compact .e-date,
.evt-card.compact .e-time,
.evt-card.compact .e-venue { font-size: .96rem; }
.evt-card.compact .e-desc {
  font-size: .88rem;
  line-clamp: 3;
  -webkit-line-clamp: 3;
}

.evt-card.dense {
  padding: 14px 16px;
  row-gap: 3px;
}
.evt-card.dense .e-title {
  font-size: 1.06rem;
  margin-bottom: 0;
}
.evt-card.dense .countdown { font-size: .84rem; padding: 2px 8px; }
.evt-card.dense .e-date,
.evt-card.dense .e-time,
.evt-card.dense .e-venue { font-size: .86rem; }
.evt-card.dense .e-desc {
  font-size: .8rem;
  line-height: 1.45;
  line-clamp: 2;
  -webkit-line-clamp: 2;
}

/* Hall of Fame / Leader Cards */
.leader-card {
  background: linear-gradient(135deg,rgba(106,27,154,.4),rgba(74,20,140,.3));
  border: 1px solid rgba(255,179,0,.28);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items:center;
  transition: transform .2s, border-color .2s;
  min-height: 220px;
}
.leader-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.leader-photo {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid rgba(255,179,0,.4);
  background: rgba(0,0,0,.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leader-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.leader-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.leader-group-page {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.leader-group-title {
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-left: 3px solid rgba(255,179,0,.55);
  background: rgba(255,179,0,.08);
  border-radius: 6px;
}
.leader-group-grid {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.leader-name {
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.leader-title {
  color: var(--gold-light);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.leader-years {
  color: #d6dcff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.leader-order {
  color: rgba(255,255,255,.86);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 3px 10px;
  width: fit-content;
}
.leader-bio {
  color: rgba(255,255,255,.72);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 4px;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.leader-status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  width: fit-content;
  margin-top: 6px;
}
.leader-status.current {
  background: rgba(46,125,50,.25);
  border: 1px solid rgba(46,125,50,.6);
  color: #a5d6a7;
}
.leader-status.former {
  background: rgba(158,158,158,.15);
  border: 1px solid rgba(158,158,158,.4);
  color: rgba(255,255,255,.7);
}

.leader-group-grid.count-2 .leader-card {
  min-height: 0;
  padding: 16px 18px;
  gap: 14px;
}
.leader-group-grid.count-2 .leader-photo {
  width: 106px;
  height: 106px;
  border-width: 2px;
}
.leader-group-grid.count-2 .leader-name { font-size: 1.24rem; }
.leader-group-grid.count-2 .leader-title { font-size: 1rem; }
.leader-group-grid.count-2 .leader-years { font-size: .9rem; }
.leader-group-grid.count-2 .leader-order { font-size: .76rem; padding: 2px 8px; }
.leader-group-grid.count-2 .leader-bio {
  font-size: .9rem;
  line-clamp: 2;
  -webkit-line-clamp: 2;
}

.leader-group-grid.count-3 .leader-card {
  min-height: 0;
  padding: 12px 14px;
  gap: 10px;
}
.leader-group-grid.count-3 .leader-photo {
  width: 76px;
  height: 76px;
  border-width: 2px;
}
.leader-group-grid.count-3 .leader-name { font-size: 1rem; }
.leader-group-grid.count-3 .leader-title { font-size: .85rem; }
.leader-group-grid.count-3 .leader-years { font-size: .78rem; }
.leader-group-grid.count-3 .leader-order { font-size: .68rem; padding: 2px 7px; }
.leader-group-grid.count-3 .leader-bio {
  font-size: .78rem;
  line-height: 1.4;
  margin-top: 0;
  line-clamp: 1;
  -webkit-line-clamp: 1;
}
.leader-group-grid.count-3 .leader-status {
  font-size: .72rem;
  padding: 2px 8px;
  margin-top: 2px;
}

/* Responsive leader card for smaller screens */
.leader-card.compact {
  padding: 18px 20px;
  gap: 16px;
  min-height: 180px;
}
.leader-card.compact .leader-photo {
  width: 110px;
  height: 110px;
  border-width: 2px;
}
.leader-card.compact .leader-name {
  font-size: 1.35rem;
}
.leader-card.compact .leader-title {
  font-size: 1.05rem;
}
.leader-card.compact .leader-years {
  font-size: .9rem;
}
.leader-card.compact .leader-bio {
  font-size: .95rem;
  line-clamp: 2;
  -webkit-line-clamp: 2;
}
.leader-card.compact .leader-status {
  font-size: .8rem;
  padding: 4px 10px;
}

.leader-card.dense {
  padding: 14px 16px;
  gap: 12px;
  min-height: 140px;
}
.leader-card.dense .leader-photo {
  width: 85px;
  height: 85px;
  border-width: 2px;
}
.leader-card.dense .leader-name {
  font-size: 1.1rem;
}
.leader-card.dense .leader-title {
  font-size: .93rem;
}
.leader-card.dense .leader-years {
  font-size: .82rem;
}
.leader-card.dense .leader-bio {
  font-size: .88rem;
  line-clamp: 1;
  -webkit-line-clamp: 1;
}
.leader-card.dense .leader-status {
  font-size: .75rem;
  padding: 3px 8px;
  margin-top: 4px;
}

/* Panel flyers */
.panel-flyer-slide {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,179,0,.35);
  overflow: hidden;
  background: rgba(3, 6, 25, .78);
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-flyer-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0,0,0,.35);
  filter: brightness(1.08) contrast(1.12) saturate(1.08);
  image-rendering: -webkit-optimize-contrast;
}
.panel-flyer-meta {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 5px 10px;
  padding: 10px 14px 20px;
  background: linear-gradient(to bottom, rgba(0,0,0,.78) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.panel-flyer-chip {
  background: rgba(0,0,0,.58);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 5px 12px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-flyer-chip.from-chip {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
  justify-self: end;
}
.panel-flyer-chip-spacer {
  grid-column: 1;
  grid-row: 2;
}
.panel-flyer-chip.to-chip {
  grid-column: 2;
  grid-row: 2;
  text-align: right;
  justify-self: end;
}
.panel-flyer-chip.date {
  color: #ffe0c2;
  border-color: rgba(255,200,150,.35);
  background: rgba(0,0,0,.65);
}

.no-content {
  color: rgba(255,255,255,.3);
  text-align: center;
  padding: 40px 20px;
  font-size: 1.35rem;
  font-style: italic;
}

/* Ticker – ANNOUNCEMENT SECTION */
.display-footer {
  background: linear-gradient(90deg, var(--red) 0%, #d32f2f 50%, var(--red) 100%);
  border-top: 1px solid rgba(255,255,255,.14);
  border-bottom: 0;
  height: 58px;
  display: flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ticker-badge {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #eef3ff;
  height: 100%;
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 8px rgba(0, 0, 0, 0.28), 2px 0 10px rgba(0, 0, 0, 0.2);
  text-shadow: 0 2px 3px rgba(0,0,0,.45);
  position: relative;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.ticker-text {
  display: inline-block;
  white-space: nowrap;
  color: #ffd8bf;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1px;
  animation: ticker linear infinite;
  animation-duration: 60s;
  will-change: transform;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

.ticker-sep {
  display: inline-block;
  margin: 0 12px;
  color: #ffb300;
  font-weight: 900;
  text-shadow: none;
}

.ticker-msg {
  display: inline;
}

@keyframes ticker {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}

.donor-note {
  color: var(--gold-light);
  opacity: .95;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2px;
  white-space: normal;
  width: 128px;
  text-align: center;
  flex-shrink: 0;
  background: rgba(13, 23, 87, 0.42);
  border-left: 1px solid rgba(255,255,255,.26);
}

.admin-link {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.35);
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 1rem;
  text-decoration: none;
  transition: all .2s;
  flex-shrink: 0;
}
.admin-link:hover { background: rgba(255,255,255,.18); color: var(--white); }

.tv-control-btn {
  background: rgba(255,179,0,.12);
  color: rgba(255,179,0,.7);
  border: 1px solid rgba(255,179,0,.3);
  padding: 0 14px;
  height: 100%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
  display: none;
}
.tv-control-btn:hover {
  background: rgba(255,179,0,.22);
  color: var(--gold);
  border-color: rgba(255,179,0,.6);
}

/* TV Mode - Slightly larger fonts */
body.tv-mode {
  --clamp-scale: 1;
}
body.tv-mode .church-name {
  font-size: clamp(1.15rem, 1.75vw, 1.8rem);
}
body.tv-mode .church-tagline {
  font-size: clamp(0.68rem, 0.85vw, 0.95rem);
}
body.tv-mode .panel-header {
  padding: 6px 12px;
  gap: 6px;
  border-bottom: 1px solid var(--gold);
}
body.tv-mode .panel-header > span {
  font-size: 0.8rem;
}
body.tv-mode .panel-header h2 {
  font-size: 0.9rem;
  letter-spacing: 1px;
}
body.tv-mode .prog-card,
body.tv-mode .evt-card {
  font-size: 0.9em;
}

/* ══════════════════════════════════════════════════
   ADMIN LOGIN
   ══════════════════════════════════════════════════ */
.login-overlay {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
}
.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  text-align: center;
}
.login-logo   { font-size: 3rem; color: var(--primary); margin-bottom: 14px; }
.login-title  { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.login-sub    { color: var(--gray-500); font-size: .85rem; margin-bottom: 28px; }
.back-link    { display: inline-block; margin-top: 16px; color: var(--primary-light); text-decoration: none; font-size: .82rem; }
.back-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════
   ADMIN LAYOUT
   ══════════════════════════════════════════════════ */
.admin-body { background: var(--gray-100); min-height: 100vh; }
.admin-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
  width: 230px;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.sidebar-logo {
  padding: 18px 20px;
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: var(--primary-dark);
  flex-shrink: 0;
}
.sidebar-logo .cross-icon { color: var(--gold); font-size: 1.4rem; }
.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  border-right: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.09); color: var(--white); }
.nav-item.active { background: rgba(255,179,0,.12); color: var(--gold-light); border-right-color: var(--gold); }
.ni { font-size: 1rem; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.1); padding: 8px 0; flex-shrink: 0; }
.logout-btn { color: rgba(255,120,120,.8) !important; }
.logout-btn:hover { background: rgba(255,50,50,.1) !important; color: #ff8080 !important; }

/* Admin main area */
.admin-main {
  flex: 1;
  margin-left: 230px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.admin-topbar {
  background: var(--white);
  padding: 15px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar h2 { font-size: 1.25rem; font-weight: 600; color: var(--primary); }
.admin-time { font-size: .82rem; color: var(--gray-500); }

/* Tab content */
.tab-content { padding: 24px 28px; flex: 1; }
.tab-content.active { display: block; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid transparent;
}
.stat-card.blue   { border-left-color: var(--primary); }
.stat-card.gold   { border-left-color: var(--gold); }
.stat-card.green  { border-left-color: var(--green); }
.stat-card.purple { border-left-color: var(--purple); }
.stat-icon { font-size: 1.8rem; }
.stat-num  { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-lbl  { font-size: .75rem; color: var(--gray-500); font-weight: 500; margin-top: 2px; }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.dash-card h3 {
  font-size: .9rem; font-weight: 600; color: var(--primary);
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}
.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: .83rem;
}
.dash-row:last-child { border-bottom: none; }
.dr-title { color: var(--gray-900); font-weight: 500; }
.dr-meta  { color: var(--gray-500); font-size: .76rem; }

/* Section toolbar */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-toolbar h3 { font-size: 1rem; font-weight: 600; color: var(--primary); }

/* Table */
.table-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table thead { background: var(--primary); color: var(--white); }
.data-table th { padding: 12px 14px; text-align: left; font-weight: 600; font-size: .76rem; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.data-table tbody tr:hover { background: var(--gray-50); }
.empty-row { text-align: center !important; color: var(--gray-500) !important; padding: 36px !important; font-style: italic; }

/* Category badges */
.cat-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .68rem; font-weight: 600; text-transform: uppercase; }
.cat-service    { background:#e3f2fd; color:#1565c0; }
.cat-meeting    { background:#f3e5f5; color:#6a1b9a; }
.cat-fellowship { background:#e8f5e9; color:#2e7d32; }
.cat-prayer     { background:#fff3e0; color:#e65100; }
.cat-youth      { background:#fce4ec; color:#880e4f; }
.cat-other      { background:var(--gray-200); color:var(--gray-700); }

.flyer-preview-cell { width: 118px; }
.flyer-thumb {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: #000;
  display: block;
}
.flyer-side-badge,
.flyer-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.flyer-side-programs { background: #e8eaf6; color: #1a237e; }
.flyer-side-social   { background: #f3e5f5; color: #6a1b9a; }
.flyer-status-live     { background: #e8f5e9; color: #1b5e20; }
.flyer-status-upcoming { background: #e3f2fd; color: #0d47a1; }
.flyer-status-expired  { background: #f5f5f5; color: #616161; }
.flyer-status-inactive { background: #ffebee; color: #b71c1c; }

.flyer-admin-preview {
  width: 100%;
  max-width: 360px;
  height: 220px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: #060a2d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.flyer-admin-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.action-group { display: flex; gap: 6px; }

/* Settings form */
.settings-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}
.settings-form h3 {
  font-size: .95rem; font-weight: 600; color: var(--primary);
  margin-bottom: 18px; padding-bottom: 9px;
  border-bottom: 1px solid var(--gray-200);
}

/* ══════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .83rem; font-weight: 600; color: var(--gray-700); margin-bottom: 5px; }
.form-input {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,35,126,.1); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { cursor: pointer; }
.form-range { width: 100%; accent-color: var(--primary); margin-top: 4px; }
.form-grid { display: grid; gap: 0 20px; }
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
.form-group.full-width { grid-column: 1 / -1; }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 400 !important; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
.btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .18s;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,35,126,.3); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-danger  { background: var(--red); color: var(--white); }
.btn-danger:hover  { background: #b71c1c; }
.btn-sm   { padding: 5px 12px; font-size: .76rem; }
.btn-full { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.52);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-card {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}
.modal-sm { max-width: 480px; }
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0;
  background: var(--white);
  z-index: 1;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.modal-close {
  background: var(--gray-100); border: none;
  width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer;
  font-size: .85rem; display: flex;
  align-items: center; justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 22px 24px; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky; bottom: 0;
  background: var(--white);
}

/* ══════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: opacity .3s;
}
.toast-success { background: var(--green); color: var(--white); }
.toast-error   { background: var(--red);   color: var(--white); }
.toast-info    { background: var(--primary); color: var(--white); }

/* ══════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════ */
.hidden { display: none !important; }
.error-msg  { color: var(--red);   font-size: .8rem;  margin-top: 8px; }
.info-msg   { color: var(--green); font-size: .875rem; margin-top: 12px; padding: 10px 14px; background: #e8f5e9; border-radius: var(--radius-sm); }
.dash-empty { color: var(--gray-500); font-size: .83rem; padding: 12px 0; font-style: italic; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .dash-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .display-main { grid-template-columns: 1fr; }
  .church-name  { font-size: 1.5rem; }
  .live-time    { font-size: 1.3rem; }
  .panel-header { padding: 14px 20px; }
  .panel-header > span { font-size: 1.5rem; }
  .panel-header h2 { font-size: 1.7rem; letter-spacing: 1.3px; }
}
@media (max-width: 768px) {
  .admin-sidebar { width: 56px; }
  .nl, .sidebar-logo span:last-child { display: none; }
  .admin-main { margin-left: 56px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid.two-col { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: auto; }
  .panel-header { padding: 12px 16px; gap: 10px; }
  .panel-header > span { font-size: 1.35rem; }
  .panel-header h2 { font-size: 1.5rem; letter-spacing: 1px; }
  .ticker-badge { padding: 0 9px; font-size: 0.84rem; letter-spacing: 0.7px; }
  .donor-note { font-size: 0.52rem; width: 116px; padding: 0 5px; }
}
