/* ══════════════════════════════════════
   shared.css — Design tokens + all shared styles
   Edit this file to change colours, fonts, layout
   that affects BOTH tabs.
══════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --navy:    #1A2744;
  --navy2:   #2A3F7A;
  --sun:     #FFD84D;
  --sky:     #4FC3F7;
  --grass:   #66BB6A;
  --coral:   #FF7043;
  --purple:  #9C6FDE;
  --teal:    #26C6DA;
  --pink:    #F48FB1;
  --amber:   #FFB300;
  --indigo:  #5C6BC0;
  --page-bg: #F0F7FF;
  --card-bg: #FFFFFF;
  --border:  #E4EDF8;
  --muted:   #7A8BAD;
  --green:   #4ADE80;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--page-bg);
  color: var(--navy);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  padding: 16px 24px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
  position: relative; overflow: hidden;
}
.site-header::before {
  content: '⛪🌟✝️🎉🌈';
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 20px; letter-spacing: 6px; opacity: .12; pointer-events: none;
}
.site-title { font-family: 'Fredoka One', cursive; font-size: clamp(1.2rem,3vw,1.9rem); color: var(--sun); line-height: 1.1; }
.site-sub   { color: #A8C4E8; font-size: .78rem; margin-top: 3px; }
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(74,222,128,.15); border: 1px solid rgba(74,222,128,.3);
  color: var(--green); font-size: .65rem; font-weight: 800; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 99px;
}
.live-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.2} }

.ts { color: #A8C4E8; font-size: .7rem; white-space: nowrap; }
.btn-refresh {
  background: var(--sun); border: none; color: var(--navy);
  font-family: 'Nunito', sans-serif; font-size: .78rem; font-weight: 800;
  padding: 6px 14px; border-radius: 99px; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn-refresh:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(255,216,77,.4); }

/* ── Tab Bar ── */
.tab-bar {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; padding: 0 24px; gap: 4px; overflow-x: auto;
}
.tab-btn {
  background: none; border: none; border-bottom: 3px solid transparent;
  color: #A8C4E8; font-family: 'Nunito', sans-serif; font-size: .85rem; font-weight: 700;
  padding: 12px 18px; cursor: pointer; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover  { color: #E2EAF4; }
.tab-btn.active { color: var(--sun); border-bottom-color: var(--sun); }

/* ── Panels ── */
.panel { display: none; background: var(--page-bg); }
.panel.active { display: block; }

/* ── Layout ── */
.page  { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.span2 { grid-column: 1 / -1; }

/* ── Stat Cards ── */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-row.five { grid-template-columns: repeat(5, 1fr); }
.stat-card {
  background: var(--card-bg); border-radius: 18px;
  padding: 20px 16px; text-align: center;
  box-shadow: 0 4px 18px rgba(26,39,68,.07);
  border-top: 4px solid var(--sky);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-3px); }
.sc-coral  { border-top-color: var(--coral)  !important; }
.sc-grass  { border-top-color: var(--grass)  !important; }
.sc-purple { border-top-color: var(--purple) !important; }
.sc-amber  { border-top-color: var(--amber)  !important; }
.sc-indigo { border-top-color: var(--indigo) !important; }
.sc-teal   { border-top-color: var(--teal)   !important; }
.stat-n { font-family:'Fredoka One',cursive; font-size:clamp(1.8rem,5vw,2.6rem); line-height:1; color:var(--navy); }
.stat-l { font-size:.72rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.8px; margin-top:5px; }
.stat-e { font-size:1.3rem; margin-bottom:6px; }

/* ── Card ── */
.card { background: var(--card-bg); border-radius: 18px; padding: 20px; box-shadow: 0 4px 18px rgba(26,39,68,.07); }
.card-title {
  font-family: 'Fredoka One', cursive; font-size: 1.2rem;
  color: var(--navy); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Bar Chart Rows ── */
.bar-row   { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.bar-lbl   { font-weight:700; font-size:.82rem; width:110px; color:var(--navy); flex-shrink:0; }
.bar-track { flex:1; background:#EEF3FB; border-radius:30px; height:24px; overflow:hidden; }
.bar-fill  { height:100%; border-radius:30px; display:flex; align-items:center; padding-left:8px; font-size:.72rem; font-weight:800; color:white; min-width:32px; transition:width 1s ease; }
.bar-n     { font-family:'Fredoka One',cursive; font-size:1rem; color:var(--navy); width:24px; text-align:right; flex-shrink:0; }

/* ── Donut ── */
.donut-wrap { display:flex; align-items:center; justify-content:center; gap:20px; padding:8px 0; }
.legend     { display:flex; flex-direction:column; gap:9px; }
.legend-row { display:flex; align-items:center; gap:7px; font-weight:700; font-size:.85rem; }
.legend-dot { width:12px; height:12px; border-radius:50%; }

/* ── Person Cards (families + volunteers) ── */
.person-list { display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.person-card { border:2px solid var(--border); border-radius:14px; padding:14px 16px; }

.fam-row   { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.fam-name  { font-weight:800; font-size:.9rem; }
.fam-sub   { font-size:.74rem; color:var(--muted); margin-top:2px; }
.fam-count { background:var(--navy); color:var(--sun); font-family:'Fredoka One',cursive; font-size:1rem; padding:5px 12px; border-radius:30px; white-space:nowrap; }

.vol-top   { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.vol-name  { font-weight:800; font-size:.9rem; color:var(--navy); }
.vol-email { font-size:.72rem; color:var(--muted); margin-top:2px; }
.vol-ts    { font-size:.66rem; color:#94a3b8; margin-top:2px; font-family: monospace; }

.badge   { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:99px; font-size:.68rem; font-weight:800; flex-shrink:0; }
.b-lead  { background:rgba(255,179,0,.12);  color:#b45309; border:1px solid rgba(255,179,0,.35); }
.b-asst  { background:rgba(79,195,247,.12); color:#0369a1; border:1px solid rgba(79,195,247,.35); }
.b-tbd   { background:rgba(156,111,222,.12);color:var(--purple); border:1px solid rgba(156,111,222,.3); }
.b-new   { background:rgba(74,222,128,.15); color:#15803d; border:1px solid rgba(74,222,128,.4); }

.person-card-new { border-color: rgba(74,222,128,.5); background: #F0FDF4; }

.tag-row { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
.tag     { display:inline-block; background:#F0F7FF; border:1px solid var(--border); border-radius:8px; padding:2px 8px; font-size:.68rem; font-weight:700; color:var(--navy); }
.vol-foot { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.vol-loc  { font-size:.68rem; color:var(--muted); }
.age-chip { font-size:.68rem; font-weight:700; padding:2px 9px; border-radius:99px; background:#EEF3FB; color:var(--navy); border:1px solid var(--border); }

/* ── Pills ── */
.pill-section-lbl { font-size:.7rem; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px; }
.pill-row { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; }
.pill     { display:inline-flex; align-items:center; gap:5px; background:var(--card-bg); border:2px solid var(--border); border-radius:99px; padding:5px 12px; font-size:.78rem; font-weight:700; color:var(--navy); }
.pill-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.pill-ct  { color:var(--muted); font-size:.7rem; }

/* ── Day Boxes ── */
.day-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.day-box  { background:var(--page-bg); border:2px solid var(--border); border-radius:14px; padding:14px 12px; text-align:center; }
.day-lbl  { font-size:.65rem; font-weight:800; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); }
.day-date { font-size:.74rem; color:var(--navy); margin:4px 0 8px; font-weight:700; }
.day-num  { font-family:'Fredoka One',cursive; font-size:2rem; line-height:1; }
.day-names{ font-size:.64rem; color:var(--muted); margin-top:6px; line-height:1.65; word-break:break-word; font-weight:600; }

/* ── Table ── */
.tbl-wrap  { overflow-x:auto; }
.tbl       { width:100%; border-collapse:collapse; font-size:.84rem; }
.tbl thead tr { background:var(--navy); color:white; }
.tbl th    { padding:9px 12px; text-align:left; font-weight:800; font-size:.72rem; text-transform:uppercase; letter-spacing:.4px; }
.tbl th:first-child { border-radius:10px 0 0 10px; }
.tbl th:last-child  { border-radius:0 10px 10px 0; }
.tbl tbody tr { border-bottom:1px solid var(--border); transition:background .12s; }
.tbl tbody tr:hover { background:#F5F9FF; }
.tbl td    { padding:9px 12px; vertical-align:middle; }
.chip   { display:inline-block; padding:2px 9px; border-radius:20px; font-size:.7rem; font-weight:700; color:white; }
.chip-m { background:#DBEAFE; color:#1E40AF; display:inline-block; padding:2px 8px; border-radius:20px; font-size:.7rem; font-weight:700; }
.chip-f { background:#FCE7F3; color:#9D174D; display:inline-block; padding:2px 8px; border-radius:20px; font-size:.7rem; font-weight:700; }

/* ── Search Bar ── */
.search-bar  { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.search-wrap { position:relative; flex:1; min-width:200px; }
.search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:.95rem; pointer-events:none; }
.search-input {
  width:100%; padding:9px 36px 9px 36px;
  border:2px solid var(--border); border-radius:99px;
  font-family:'Nunito',sans-serif; font-size:.85rem; font-weight:600;
  color:var(--navy); background:var(--page-bg);
  outline:none; transition:border-color .15s, box-shadow .15s;
}
.search-input:focus { border-color:var(--sky); box-shadow:0 0 0 3px rgba(79,195,247,.15); }
.search-input::placeholder { color:var(--muted); font-weight:600; }
.btn-clear {
  position:absolute; right:12px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; font-size:.85rem;
  color:var(--muted); display:none; line-height:1; padding:2px 4px;
  border-radius:50%; transition:color .15s;
}
.btn-clear:hover { color:var(--coral); }
.btn-clear.vis   { display:block; }
.search-count         { font-size:.78rem; font-weight:700; color:var(--muted); white-space:nowrap; flex-shrink:0; }
.search-count strong  { color:var(--navy); font-family:'Fredoka One',cursive; font-size:.95rem; }
.no-results           { text-align:center; padding:32px 20px; color:var(--muted); font-weight:700; font-size:.9rem; }
.no-results .nr-icon  { font-size:2rem; margin-bottom:8px; }
mark { background:#FFF3CD; border-radius:3px; padding:0 2px; font-style:normal; }

/* ── T-Shirt Accordion ── */
.ts-accordion { background:var(--card-bg); border-radius:18px; box-shadow:0 4px 18px rgba(26,39,68,.07); margin-bottom:18px; overflow:hidden; }
.ts-header    { display:flex; align-items:center; justify-content:space-between; padding:18px 22px; cursor:pointer; user-select:none; transition:background .15s; }
.ts-header:hover { background:#F5F9FF; }
.ts-header-left { display:flex; align-items:center; gap:10px; }
.ts-title     { font-family:'Fredoka One',cursive; font-size:1.2rem; color:var(--navy); }
.ts-chevron   { font-size:.85rem; color:var(--muted); transition:transform .3s ease; display:inline-block; }
.ts-chevron.open { transform:rotate(180deg); }
.ts-body      { max-height:0; overflow:hidden; transition:max-height .4s ease, padding .3s ease; padding:0 22px; }
.ts-body.open { max-height:4000px; padding:0 22px 22px; }

.tshirt-total-badge { display:inline-flex; align-items:center; gap:5px; background:rgba(79,195,247,.12); border:1px solid rgba(79,195,247,.3); color:#0369a1; border-radius:99px; padding:4px 12px; font-size:.72rem; font-weight:800; }
.tshirt-summary     { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-bottom:4px; }
.tshirt-group-title { font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.7px; color:var(--muted); margin-bottom:12px; display:flex; align-items:center; gap:7px; }
.tshirt-group-badge { border-radius:99px; padding:2px 9px; font-size:.65rem; font-weight:800; }
.tshirt-size-row    { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.tshirt-size-lbl    { font-weight:800; font-size:.72rem; color:var(--navy); min-width:110px; width:auto; flex-shrink:0; text-align:center; background:var(--page-bg); border:2px solid var(--border); border-radius:8px; padding:3px 8px; white-space:nowrap; }
.tshirt-bar-track   { flex:1; background:#EEF3FB; border-radius:30px; height:26px; overflow:hidden; }
.tshirt-bar-fill    { height:100%; border-radius:30px; display:flex; align-items:center; padding-left:10px; font-size:.72rem; font-weight:800; color:white; min-width:60px; transition:width 1s ease; }
.tshirt-bar-n       { font-family:'Fredoka One',cursive; font-size:1rem; color:var(--navy); width:22px; text-align:right; flex-shrink:0; }
.tshirt-divider     { border:none; border-top:2px dashed var(--border); margin:16px 0; }
.tshirt-grand       { display:flex; flex-wrap:wrap; gap:10px; margin-top:4px; }
.tshirt-grand-chip  { display:flex; flex-direction:column; align-items:center; background:var(--navy); border-radius:14px; padding:10px 16px; min-width:68px; flex:1; }
.gc-size    { font-size:.65rem; font-weight:800; color:#A8C4E8; text-transform:uppercase; letter-spacing:.5px; }
.gc-n       { font-family:'Fredoka One',cursive; font-size:1.7rem; color:var(--sun); line-height:1.1; }
.gc-sub     { font-size:.6rem; color:#A8C4E8; margin-top:2px; font-weight:700; }
.tshirt-waiting { text-align:center; padding:16px; color:var(--muted); font-size:.8rem; font-weight:700; }

/* ── Loading / Error ── */
.spin { animation:spin 1s linear infinite; display:inline-block; }
@keyframes spin { to { transform:rotate(360deg); } }
.loading-box { text-align:center; padding:40px; color:var(--muted); font-weight:700; }
.err-box     { background:#FFF0ED; border:2px solid var(--coral); border-radius:14px; padding:20px; color:var(--coral); font-weight:700; text-align:center; }

/* ── Responsive ── */
@media(max-width:860px){
  .stat-row      { grid-template-columns:repeat(2,1fr); }
  .stat-row.five { grid-template-columns:repeat(3,1fr); }
  .grid2         { grid-template-columns:1fr; }
  .span2         { grid-column:auto; }
}
@media(max-width:520px){
  .site-header   { padding:12px 14px; }
  .tab-bar       { padding:0 10px; }
  .tab-btn       { padding:10px 12px; font-size:.78rem; }
  .stat-row      { grid-template-columns:repeat(2,1fr); }
  .stat-row.five { grid-template-columns:repeat(2,1fr); }
  .stat-row.five .stat-card:last-child { grid-column:1/-1; }
  .day-grid      { grid-template-columns:1fr; gap:8px; }
  .day-box       { display:flex; align-items:center; gap:12px; text-align:left; padding:12px 14px; }
  .day-num       { font-size:1.6rem; min-width:36px; }
  .page          { padding:14px 12px 36px; }
  .card          { padding:16px 14px; }
}

/* ══════════════════════════════════════
   TEAM ROSTER SECTION
══════════════════════════════════════ */

/* Servant Leaders banner */
.servant-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #2A3F7A 100%);
  border-radius: 18px; padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.servant-left   { display: flex; align-items: center; gap: 12px; }
.servant-crown  { font-size: 1.8rem; }
.servant-label  { font-size: .65rem; font-weight: 800; text-transform: uppercase;
                  letter-spacing: .7px; color: #A8C4E8; margin-bottom: 3px; }
.servant-names  { font-family: 'Fredoka One', cursive; font-size: 1.05rem; color: var(--sun); }
.servant-title  { font-size: .7rem; color: #A8C4E8; margin-top: 2px; font-weight: 600; font-style: italic; }

/* Team grid — 3 col desktop, 1 col mobile */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }

/* ── NEW Teams Panel 2.0 ── */
.teams-panel-wrap { padding: 20px 24px 28px; }
.teams-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 22px;
}
.teams-panel-title {
  font-family: 'Fredoka One', cursive; font-size: 1.5rem; color: var(--navy); line-height: 1.1;
}
.teams-panel-sub { font-size: .77rem; color: var(--muted); font-weight: 600; margin-top: 3px; }

.team-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.team-card2 {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 2px 12px rgba(26,39,68,.06);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.team-card2:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26,39,68,.14);
}

.tc-banner {
  padding: 18px 18px 14px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; min-height: 72px;
}
.tc-avatar {
  width: 44px; height: 44px; border-radius: 14px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka One', cursive; font-size: 1.05rem; color: #fff;
  letter-spacing: .02em;
}
.tc-big-count {
  font-family: 'Fredoka One', cursive; font-size: 2.4rem; color: rgba(255,255,255,.9);
  line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.tc-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.tc-name {
  font-family: 'Fredoka One', cursive; font-size: 1.0rem; color: var(--navy); line-height: 1.2;
}

.tc-stats-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-stat {
  font-size: .68rem; font-weight: 800; padding: 3px 10px;
  border-radius: 99px; white-space: nowrap;
}
.tc-stat-in  { background: #DCFCE7; color: #166534; }
.tc-stat-out { background: #F1F5F9; color: #64748B; }

.tc-bar-wrap {
  height: 6px; background: #F1F5F9; border-radius: 99px; overflow: hidden;
}
.tc-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width .6s cubic-bezier(.34,1.2,.64,1);
}

.tc-bar-label { font-size: .64rem; font-weight: 700; color: var(--muted); }

@media(max-width: 600px) {
  .team-grid2 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tc-big-count { font-size: 2rem; }
  .tc-banner { min-height: 60px; padding: 14px 14px 12px; }
  .tc-avatar { width: 38px; height: 38px; font-size: .9rem; }
}
@media(max-width: 380px) {
  .team-grid2 { grid-template-columns: 1fr; }
}

.team-card {
  background: var(--card-bg); border-radius: 16px;
  border: 2px solid var(--border);
  cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  overflow: hidden; display: flex; flex-direction: column;
}
.team-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,39,68,.12); }
.team-card.active { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(79,195,247,.2); }

.team-card-header {
  padding: 14px 16px 10px; flex: 1;
  display: flex; align-items: flex-start; gap: 10px;
}
.team-icon  { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.team-name  { font-family: 'Fredoka One', cursive; font-size: .92rem; color: var(--navy); line-height: 1.2; }
.team-leads { font-size: .67rem; color: var(--muted); margin-top: 3px; font-weight: 700; }

.team-count-pill {
  font-size: .68rem; font-weight: 800; padding: 2px 9px;
  border-radius: 99px; background: var(--page-bg);
  border: 1.5px solid; white-space: nowrap;
}
.team-view-btn {
  font-size: .68rem; font-weight: 800; color: var(--sky);
  letter-spacing: .3px; white-space: nowrap;
}

/* Mobile: horizontal row cards — icon + info left, pill+bar right */
@media(max-width: 600px) {
  .team-grid { grid-template-columns: 1fr; gap: 10px; }

  .team-card {
    flex-direction: row; align-items: center;
    border-radius: 14px; padding: 12px 14px; gap: 12px;
  }
  .team-card-header {
    padding: 0; flex: 1; align-items: center; gap: 10px;
  }
  .team-icon { font-size: 1.6rem; margin-top: 0; }
  .team-name { font-size: .88rem; }

  /* right side: pill + bar stacked */
  .team-card-right {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 6px; flex-shrink: 0; min-width: 80px;
  }
  .team-view-btn { display: none; } /* cleaner without it on mobile */
}

/* ── Team Modal Overlay ── */
.team-modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(26,39,68,.55);
  backdrop-filter: blur(3px);
  align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .18s ease;
}
.team-modal-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.team-modal {
  background: var(--card-bg);
  border-radius: 22px;
  width: 100%; max-width: 680px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(26,39,68,.25);
  animation: slideUp .22s ease;
  overflow: hidden;
}
@keyframes slideUp { from { transform: translateY(24px); opacity:0; } to { transform: translateY(0); opacity:1; } }

/* ── Banner header ── */
.team-modal-banner {
  position: relative;
  padding: 22px 22px 18px;
  display: flex; flex-direction: column; gap: 14px;
  flex-shrink: 0;
}
.team-modal-close--banner {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,.18); border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: .9rem; color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  z-index: 1;
}
.team-modal-close--banner:hover { background: rgba(255,255,255,.32); }
.tmb-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka One', cursive; font-size: 1.3rem;
  flex-shrink: 0;
}
.tmb-info { display: flex; flex-direction: column; gap: 2px; }
.team-modal-title {
  font-family: 'Fredoka One', cursive; font-size: 1.4rem;
  color: #fff;
}
.team-modal-meta { font-size: .75rem; color: rgba(255,255,255,.7); font-weight: 700; }
.tmb-stats {
  display: flex; align-items: center; gap: 0;
  background: rgba(0,0,0,.18); border-radius: 12px;
  padding: 10px 0; width: 100%;
}
.tmb-stat { flex: 1; text-align: center; }
.tmb-stat-val { font-family: 'Fredoka One', cursive; font-size: 1.25rem; color: #fff; line-height: 1; }
.tmb-stat-lbl { font-size: .62rem; color: rgba(255,255,255,.65); font-weight: 700; margin-top: 3px; text-transform: uppercase; letter-spacing: .05em; }
.tmb-stat-div { width: 1px; background: rgba(255,255,255,.2); align-self: stretch; }

/* Keep old close for non-banner usage */
.team-modal-close {
  background: var(--page-bg); border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 1rem; color: var(--muted); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.team-modal-close:hover { background: #FFE8E0; color: var(--coral); }

.team-modal-body {
  overflow-y: auto; padding: 18px 22px 22px;
  flex: 1;
}

/* Member cards inside modal */
.team-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.team-member-card {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--border); border-radius: 14px;
  padding: 12px 14px; transition: background .12s, border-color .12s;
  background: #fff;
}
.team-member-card:hover { background: #F5F9FF; }
.team-member-card.tmc--in { border-color: #86EFAC; background: #F0FDF4; }
.team-member-card.tmc--in:hover { background: #DCFCE7; }
.tmc-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .78rem; flex-shrink: 0;
}
.tmc-info { min-width: 0; flex: 1; }
.tmc-name { font-size: .85rem; font-weight: 700; color: #1A2744; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmc-badge {
  display: inline-block;
  font-size: .64rem; font-weight: 800; border-radius: 99px; padding: 2px 9px;
}
.tmc-badge--in  { background: #DCFCE7; color: #15803D; }
.tmc-badge--out { background: #F1F5F9; color: #94A3B8; }
.tmc-badges-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.tmc-day-tag {
  display: inline-block; font-size: .6rem; font-weight: 800; border-radius: 99px;
  padding: 2px 7px; background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE;
}
.tm-name   { font-weight: 800; font-size: .88rem; color: var(--navy); }
.tm-email  { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.tm-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* Whole-team note */
.whole-team-note {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,112,67,.1); border: 1px solid rgba(255,112,67,.3);
  color: #b45309; border-radius: 99px; padding: 3px 12px;
  font-size: .68rem; font-weight: 800; margin-bottom: 14px;
}

/* Empty state inside modal */
.team-modal-empty {
  text-align: center; padding: 32px 16px;
  color: var(--muted); font-weight: 700; font-size: .88rem;
}
.team-modal-empty .nr-icon { font-size: 2rem; margin-bottom: 8px; }

/* All Volunteers accordion */
.vol-accordion { background: var(--card-bg); border-radius: 18px; box-shadow: 0 4px 18px rgba(26,39,68,.07); overflow: hidden; }
.vol-acc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; cursor: pointer; user-select: none; transition: background .15s;
}
.vol-acc-header:hover { background: #F5F9FF; }
.vol-acc-left  { display: flex; align-items: center; gap: 10px; }
.vol-acc-title { font-family: 'Fredoka One', cursive; font-size: 1.2rem; color: var(--navy); }
.vol-acc-chev  { font-size: .85rem; color: var(--muted); transition: transform .3s ease; display: inline-block; }
.vol-acc-chev.open { transform: rotate(180deg); }
.vol-acc-body  { max-height: 0; overflow: hidden; transition: max-height .4s ease; padding: 0 22px; }
.vol-acc-body.open { max-height: 4000px; padding: 0 22px 22px; }

@media(max-width: 860px) {
  .team-modal { max-height: 92vh; border-radius: 18px; }
}
@media(max-width: 600px) {
  .servant-banner { flex-direction: column; align-items: flex-start; }
  .team-member-grid { grid-template-columns: 1fr; }
  .team-modal-banner { padding: 18px 16px 14px; }
  .team-modal-body { padding: 14px 16px 18px; }
  .team-modal { border-radius: 22px 22px 0 0; align-self: flex-end; max-height: 82vh; }
  .team-modal-overlay { align-items: flex-end; padding: 0; }
  .tmb-stat-val { font-size: 1.1rem; }
}
/* ── Display Mode Toggle ── */
.display-mode-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card-bg); border: 2px solid var(--border);
  border-radius: 99px; padding: 5px 14px; cursor: pointer;
  font-family: 'Nunito', sans-serif; font-size: .75rem; font-weight: 700;
  color: var(--muted); transition: border-color .15s, box-shadow .15s;
  user-select: none;
}
.display-mode-toggle:hover { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(79,195,247,.1); }
.dm-opt  { transition: color .15s; }
.dm-active { color: var(--navy); font-weight: 800; }
.dm-sep  { color: var(--border); }

/* ── Class Chips (shared across dashboard + checkin) ── */
.class-chip {
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 14px 10px; text-align: center;
  transition: all .18s; cursor: pointer;
  box-shadow: 0 2px 8px rgba(26,39,68,.05);
}
.class-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,39,68,.1); }
.class-chip.has-kids {
  border-color: var(--sky); background: #EFF8FF;
  box-shadow: 0 2px 12px rgba(79,195,247,.15);
}
.class-chip.has-kids:hover { box-shadow: 0 6px 20px rgba(79,195,247,.25); }
.cc-emoji { font-size: 1.4rem; margin-bottom: 4px; }
.cc-name  {
  font-size: .65rem; font-weight: 800; color: var(--muted);
  margin: 3px 0; text-transform: uppercase; letter-spacing: .4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-nums  { display: flex; justify-content: center; gap: 6px; margin-top: 5px; }
.cc-in    { font-size: .75rem; font-weight: 800; color: #16A34A; cursor: pointer; }
.cc-out   { font-size: .75rem; font-weight: 800; color: #D97706; cursor: pointer; }
.cc-rem   { font-size: .75rem; font-weight: 800; color: #4F46E5; cursor: pointer; }
.cc-in:hover, .cc-out:hover, .cc-rem:hover { text-decoration: underline; }
/* ── Portal panels (Check-In / Check-Out) ── */
.portal-wrap {
  min-height: 60vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px;
}
.portal-org-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; border: 1px solid #E7E5E4;
  border-radius: 100px; padding: 5px 16px;
  font-size: .72rem; font-weight: 600; color: #78716C;
  letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.portal-hero { text-align: center; margin-bottom: 40px; }
.portal-eyebrow {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 10px;
}
.portal-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.05;
  color: #1C1917; letter-spacing: -.02em;
}
.portal-sub { margin-top: 10px; font-size: .92rem; color: #78716C; font-weight: 500; }
.portal-card {
  position: relative; overflow: hidden;
  background: white; border: 1.5px solid #E7E5E4;
  border-radius: 22px; padding: 28px 24px 22px;
  text-decoration: none; color: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform .25s cubic-bezier(.34,1.3,.64,1), box-shadow .25s, border-color .2s;
  display: flex; flex-direction: column;
}
.portal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  border-radius: 22px 22px 0 0; opacity: 0; transition: opacity .2s;
}
.portal-card:hover { transform: translateY(-5px) scale(1.01); border-color: transparent; }
.portal-card-ci::before  { background: linear-gradient(90deg, #22C55E, #4ADE80); }
.portal-card-co::before  { background: linear-gradient(90deg, #F97316, #F59E0B); }
.portal-card-ci:hover { box-shadow: 0 16px 36px rgba(34,197,94,.18); }
.portal-card-co:hover { box-shadow: 0 16px 36px rgba(249,115,22,.18); }
.portal-card:hover::before { opacity: 1; }
.portal-card-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 16px;
  transition: transform .2s;
}
.portal-card:hover .portal-card-icon { transform: scale(1.1) rotate(-4deg); }
.portal-card-ci .portal-card-icon { background: #DCFCE7; }
.portal-card-co .portal-card-icon { background: #FEF3C7; }
.portal-card-lbl {
  font-size: .6rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 5px;
}
.portal-card-ci .portal-card-lbl { color: #22C55E; }
.portal-card-co .portal-card-lbl { color: #F97316; }
.portal-card-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.45rem; font-weight: 700; color: #1C1917;
  margin-bottom: 8px; line-height: 1.15;
}
.portal-card-desc { font-size: .8rem; color: #78716C; line-height: 1.6; font-weight: 500; flex: 1; }
.portal-features { display: flex; flex-direction: column; gap: 5px; margin: 10px 0 0; }
.portal-feature { display: flex; align-items: center; gap: 7px; font-size: .75rem; color: #78716C; font-weight: 500; }
.portal-feature-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.portal-card-footer {
  margin-top: 20px; padding-top: 14px; border-top: 1px solid #E7E5E4;
  display: flex; align-items: center; justify-content: space-between;
}
.portal-card-who { font-size: .68rem; font-weight: 600; color: #78716C; text-transform: uppercase; letter-spacing: .06em; }
.portal-card-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; transition: transform .2s;
}
.portal-card:hover .portal-card-arrow { transform: translateX(3px); }
/* ── Info Button & Modal ── */
.info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 1.5px solid rgba(255,255,255,.45);
  color: white; font-size: .85rem; font-weight: 900; cursor: pointer;
  font-family: 'Nunito', sans-serif; line-height: 1; flex-shrink: 0;
  transition: background .18s, transform .15s; user-select: none;
}
.info-btn:hover { background: rgba(255,255,255,.35); transform: scale(1.1); }

.info-overlay {
  position: fixed; inset: 0; background: rgba(10,20,50,.55);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(3px);
  animation: infoFadeIn .18s ease;
}
@keyframes infoFadeIn { from { opacity: 0; } to { opacity: 1; } }

.info-modal {
  background: white; border-radius: 20px; max-width: 420px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.22); overflow: hidden;
  animation: infoSlideUp .2s ease;
}
@keyframes infoSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.info-modal-header {
  padding: 20px 22px 14px; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
}
.info-modal-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.info-modal-title { font-family: 'Fredoka One', cursive; font-size: 1.25rem; color: #1A2744; line-height: 1.2; margin-top: 2px; }
.info-modal-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: #F1F5F9; color: #7A8BAD; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-weight: 900; transition: background .15s;
}
.info-modal-close:hover { background: #E2E8F0; color: #1A2744; }
.info-modal-body { padding: 0 22px 22px; }
.info-modal-desc { font-size: .88rem; color: #4A5568; line-height: 1.6; margin-bottom: 14px; }
.info-modal-steps { display: flex; flex-direction: column; gap: 9px; }
.info-step {
  display: flex; gap: 10px; align-items: flex-start;
  background: #F8FAFF; border-radius: 10px; padding: 9px 12px;
}
.info-step-num {
  min-width: 22px; height: 22px; border-radius: 50%;
  background: #1A2744; color: white; font-size: .72rem;
  font-weight: 900; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.info-step-text { font-size: .82rem; color: #2D3748; line-height: 1.5; font-weight: 600; }
.info-modal-tip {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: #FFFBEB; border: 1px solid #FCD34D;
  font-size: .78rem; color: #92400E; font-weight: 600; line-height: 1.5;
}