/* ──────────────────────────────────────────────────────────────────
   BRUNO APP — Shared component library for the UI kit
   Mobile-first React components matching the production app.
   ────────────────────────────────────────────────────────────────── */

const ACCENT = '#F97316';
const ACCENT_2 = '#EA580C';

/* ── ICONS — inline SVG (Lucide-style, stroke 2px) ────────────── */
const I = ({ d, w = 18, ...rest }) => (
  <svg xmlns="http://www.w3.org/2000/svg" width={w} height={w} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...rest}>
    {d}
  </svg>
);
const Icon = {
  Menu: (p) => <I d={<><path d="M3 6h18M3 12h18M3 18h18"/></>} {...p}/>,
  Send: (p) => <I d={<><line x1="22" y1="2" x2="11" y2="13"/><polygon points="22 2 15 22 11 13 2 9 22 2"/></>} {...p}/>,
  Refresh: (p) => <I d={<><path d="M21 12a9 9 0 1 1-3-6.7L21 8"/><path d="M21 3v5h-5"/></>} {...p}/>,
  ChevronL: (p) => <I d={<polyline points="15 18 9 12 15 6"/>} {...p}/>,
  ChevronR: (p) => <I d={<polyline points="9 18 15 12 9 6"/>} {...p}/>,
  ChevronD: (p) => <I d={<polyline points="6 9 12 15 18 9"/>} {...p}/>,
  Calendar: (p) => <I d={<><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></>} {...p}/>,
  Users: (p) => <I d={<><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"/></>} {...p}/>,
  Truck: (p) => <I d={<><path d="M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2"/><path d="M15 18H9M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14"/><circle cx="17" cy="18" r="2"/><circle cx="7" cy="18" r="2"/></>} {...p}/>,
  Building: (p) => <I d={<><path d="M3 21h18M5 21V7l8-4v18M19 21V11l-6-4"/></>} {...p}/>,
  MapPin: (p) => <I d={<><path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"/><circle cx="12" cy="10" r="3"/></>} {...p}/>,
  Star: (p) => <I d={<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>} {...p}/>,
  Search: (p) => <I d={<><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></>} {...p}/>,
  Plus: (p) => <I d={<><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></>} {...p}/>,
  Trash: (p) => <I d={<><polyline points="3 6 5 6 21 6"/><path d="M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></>} {...p}/>,
  Check: (p) => <I d={<polyline points="20 6 9 17 4 12"/>} {...p}/>,
  Clock: (p) => <I d={<><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></>} {...p}/>,
  Umbrella: (p) => <I d={<><path d="M22 12a10 10 0 0 0-20 0"/><path d="M12 12v8a2 2 0 0 0 4 0"/><line x1="12" y1="2" x2="12" y2="3"/></>} {...p}/>,
  Wallet: (p) => <I d={<><path d="M20 12V8H6a2 2 0 0 1 0-4h12v4"/><path d="M20 12v4H6a2 2 0 0 0 0 4h14v-4"/><circle cx="16" cy="14" r="1.5"/></>} {...p}/>,
  Card: (p) => <I d={<><rect x="2" y="5" width="20" height="14" rx="2"/><line x1="2" y1="10" x2="22" y2="10"/></>} {...p}/>,
  Download: (p) => <I d={<><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"/></>} {...p}/>,
  File: (p) => <I d={<><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></>} {...p}/>,
  Warn: (p) => <I d={<><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4M12 17h.01"/></>} {...p}/>,
  Bell: (p) => <I d={<><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/><path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/></>} {...p}/>,
  Settings: (p) => <I d={<><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33h0a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51h0a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82v0a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></>} {...p}/>,
  Cloud: (p) => <I d={<path d="M17.5 19a4.5 4.5 0 1 0 0-9 6 6 0 1 0-11.42 2A4.5 4.5 0 0 0 6.5 19z"/>} {...p}/>,
};

/* ── Top app bar ────────────────────────────────────────────── */
function AppHeader({ tenantLogo, view = 'Settimana', onView, badge }) {
  return (
    <div style={{display:'flex',alignItems:'center',gap:6,padding:'10px 10px',background:'#fff',borderBottom:'1px solid #E2E8F0'}}>
      <button style={btnIcon('ghost')}><Icon.Menu w={20}/></button>
      <div style={{width:34,height:34,display:'flex',alignItems:'center',justifyContent:'center',flexShrink:0}}>
        {tenantLogo ? <img src={tenantLogo} alt="" style={{maxWidth:'100%',maxHeight:'100%',objectFit:'contain'}}/> : <img src="/assets/icon-192.png" alt="" style={{maxWidth:'100%',maxHeight:'100%'}}/>}
      </div>
      <div style={{display:'flex',background:'#F1F5F9',borderRadius:10,padding:2,gap:0,flexShrink:0}}>
        {['Settimana','Mese'].map(v => (
          <button key={v} onClick={() => onView && onView(v)} style={{
            border:'none', background: view===v?ACCENT:'transparent', color: view===v?'#fff':'#475569',
            padding:'6px 10px', borderRadius:8, fontWeight:600, fontSize:12.5, fontFamily:'inherit', cursor:'pointer',
            display:'flex',alignItems:'center',gap:5, transition:'all .15s'
          }}>
            {view===v && <Icon.Calendar w={12}/>} {v}
          </button>
        ))}
      </div>
      <div style={{flex:1}}/>
      <button style={btnIcon('ghost', '#F1F5F9')} title="Invia WhatsApp">
        <Icon.Send w={14}/>
      </button>
      <button style={btnIcon('ghost', '#ECFDF5', '#059669')} title="Invia settimana">
        <Icon.Send w={14}/>
      </button>
      <button style={btnIcon('ghost')}><Icon.Refresh w={16}/></button>
    </div>
  );
}

function btnIcon(variant, bg, color) {
  const base = {
    display:'flex',alignItems:'center',gap:5,
    border:'none', background: bg || 'transparent', color: color || '#475569',
    padding:'7px 9px', borderRadius:8, cursor:'pointer', fontFamily:'inherit'
  };
  return base;
}

/* ── Day strip (LUN MAR MER...) ──────────────────────────────── */
function DayStrip({ days, selectedIdx, onSelect, weekLabel }) {
  return (
    <div style={{display:'flex',alignItems:'center',gap:6,padding:'10px 8px',background:'#fff',borderBottom:'1px solid #E2E8F0'}}>
      <button style={{...btnIcon('ghost'),border:'1px solid #E2E8F0',padding:'8px 9px',borderRadius:10}}><Icon.ChevronL w={16}/></button>
      <div style={{flex:1,display:'flex',justifyContent:'space-around',gap:2}}>
        {days.map((d, i) => (
          <button key={i} onClick={() => onSelect && onSelect(i)} style={{
            display:'flex',flexDirection:'column',alignItems:'center',gap:2,
            border:'none',background:'transparent',cursor:'pointer',padding:'4px 6px',fontFamily:'inherit',
            color: i===selectedIdx ? '#0F172A' : '#64748B'
          }}>
            <span style={{fontSize:10,fontWeight:600,letterSpacing:.4}}>{d.dow}</span>
            <span style={{fontFamily:'DM Sans, sans-serif',fontWeight:700,fontSize:22,lineHeight:1,letterSpacing:'-.01em',fontVariantNumeric:'tabular-nums'}}>{d.day}</span>
            <span style={{width:6,height:6,borderRadius:'50%',background:i===selectedIdx?ACCENT:'transparent'}}/>
          </button>
        ))}
      </div>
      <button style={{...btnIcon('ghost'),border:'1px solid #E2E8F0',padding:'8px 9px',borderRadius:10}}><Icon.ChevronR w={16}/></button>
      <button style={{background:'#FFF7ED',border:'none',color:ACCENT_2,padding:'7px 13px',borderRadius:10,fontWeight:700,fontSize:13,fontFamily:'inherit',cursor:'pointer'}}>Oggi</button>
    </div>
  );
}

/* ── Program header (Programma Domenica 03 Mag + Invia/cestino) */
function ProgramHeader({ label, counts }) {
  return (
    <div style={{padding:'14px 16px 10px',background:'#F8FAFC'}}>
      <div style={{display:'flex',alignItems:'center',gap:7,marginBottom:10}}>
        <Icon.Calendar w={16} color={ACCENT}/>
        <span style={{fontFamily:"'Syne',sans-serif",fontWeight:700,fontSize:18,color:'#0F172A'}}>{label}</span>
      </div>
      <div style={{display:'flex',gap:8,marginBottom:12}}>
        <button style={{display:'flex',alignItems:'center',gap:6,background:'#10B981',color:'#fff',border:'none',padding:'9px 16px',borderRadius:10,fontWeight:700,fontSize:14,fontFamily:'inherit',cursor:'pointer',minHeight:38}}>
          <Icon.Send w={14}/> Invia
        </button>
        <button style={{display:'flex',alignItems:'center',gap:6,background:'#FEF2F2',color:'#DC2626',border:'1px solid #FECACA',padding:'9px 12px',borderRadius:10,fontWeight:600,fontSize:13,fontFamily:'inherit',cursor:'pointer'}}>
          <Icon.Trash w={14}/>
        </button>
      </div>
      <div style={{display:'flex',flexWrap:'wrap',gap:6}}>
        {counts.map((c, i) => (
          <span key={i} style={{display:'inline-flex',alignItems:'center',gap:5,background:c.bg,color:c.fg,padding:'4px 10px',borderRadius:999,fontSize:12,fontWeight:500}}>
            {c.icon && <span style={{fontSize:13}}>{c.icon}</span>}
            <span><b style={{fontWeight:700}}>{c.n}</b> {c.label}</span>
          </span>
        ))}
      </div>
    </div>
  );
}

/* ── SiteCard ─────────────────────────────────────────────────── */
function SiteCard({ site }) {
  const statusColors = {
    'Attivo': {bg:'#ECFDF5',fg:'#059669',accent:'#22c55e'},
    'Sospeso': {bg:'#FFF7ED',fg:'#D97706',accent:'#F59E0B'},
    'Fermo': {bg:'#FEF2F2',fg:'#DC2626',accent:'#DC2626'},
  };
  const sc = statusColors[site.stato || 'Attivo'];
  return (
    <div style={{background:'#fff',borderRadius:14,border:'1px solid #E5E7EB',overflow:'hidden',boxShadow:'0 1px 3px rgba(0,0,0,.05)',marginBottom:10}}>
      <div style={{height:3,background:`linear-gradient(90deg,${sc.accent},${sc.accent}88)`}}/>
      <div style={{display:'flex',alignItems:'flex-start',justifyContent:'space-between',padding:'12px 16px 10px'}}>
        <div style={{flex:1,minWidth:0}}>
          <div style={{display:'flex',alignItems:'center',gap:7,marginBottom:4,flexWrap:'wrap'}}>
            <div style={{width:8,height:8,borderRadius:2,background:site.clr || '#6366F1'}}/>
            <span style={{fontWeight:700,color:'#0f172a',fontSize:15,fontFamily:"'Syne',sans-serif",letterSpacing:'-.2px'}}>{site.name}</span>
            <span style={{fontSize:10,padding:'2px 9px',borderRadius:20,background:sc.bg,color:sc.fg,fontWeight:600,letterSpacing:'.3px'}}>{site.stato || 'Attivo'}</span>
          </div>
          {site.address && <div style={{display:'flex',alignItems:'center',gap:4,color:'#94a3b8',fontSize:11.5,paddingLeft:15}}><Icon.MapPin w={10}/>{site.address}</div>}
        </div>
        <div style={{display:'flex',gap:4,flexShrink:0,marginLeft:10}}>
          <button style={{background:'#F0FDF4',border:'none',borderRadius:7,padding:'5px 8px',cursor:'pointer',color:'#22c55e',display:'flex'}}><Icon.Send w={13}/></button>
          <button style={{background:'#FEF2F2',border:'none',borderRadius:7,padding:'5px 8px',cursor:'pointer',color:'#ef4444',display:'flex'}}><Icon.Trash w={13}/></button>
        </div>
      </div>
      <div style={{display:'flex',gap:6,padding:'0 14px 8px',flexWrap:'wrap'}}>
        <span style={{background:'#EEF2FF',color:ACCENT,fontSize:11,padding:'3px 10px',borderRadius:20,fontWeight:500,display:'flex',alignItems:'center',gap:4}}><Icon.Users w={10}/>{site.team.length} op.</span>
        {site.caposquadra && (
          <span style={{background:'#FEF3C7',color:'#92400E',fontSize:11,padding:'3px 10px',borderRadius:20,fontWeight:600,display:'inline-flex',alignItems:'center',gap:5}}>
            <Icon.Star w={9} color="#D97706" fill="#D97706"/>{site.caposquadra}
          </span>
        )}
        {site.meteo && <span style={{background:'#F3F4F6',color:'#374151',fontSize:11,padding:'3px 10px',borderRadius:20,display:'inline-flex',alignItems:'center',gap:4}}><Icon.Cloud w={10}/>{site.meteo}</span>}
        {site.attivita && <span style={{background:'#F3F4F6',color:'#374151',fontSize:11,padding:'3px 10px',borderRadius:20,maxWidth:180,overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'}}>{site.attivita}</span>}
      </div>
      {site.vehicles && site.vehicles.length > 0 && (
        <div style={{margin:'0 12px 8px',background:'#F9FAFB',borderRadius:10,padding:'7px 12px',display:'flex',flexDirection:'column',gap:5}}>
          {site.vehicles.map((v, i) => (
            <div key={i} style={{display:'flex',alignItems:'center',gap:8}}>
              <Icon.Truck w={12} color="#6B7280"/>
              <span style={{flex:1,color:'#374151',fontSize:11}}>{v.name} ({v.seats}p)</span>
              <span style={{background:'#E0E7FF',color:ACCENT,fontSize:10,padding:'2px 6px',borderRadius:20}}>{v.type}</span>
              <span style={{fontSize:10,color:'#374151',background:'#F3F4F6',borderRadius:20,padding:'2px 7px'}}>{v.driver}</span>
            </div>
          ))}
        </div>
      )}
      {site.team.length > 0 && (
        <div style={{margin:'0 12px 12px',background:'#F9FAFB',borderRadius:10,padding:'7px 12px'}}>
          <div style={{fontSize:10,fontWeight:700,color:'#9CA3AF',textTransform:'uppercase',letterSpacing:.5,marginBottom:5,display:'flex',alignItems:'center',gap:4}}><Icon.Users w={9}/>Squadra ({site.team.length})</div>
          <div style={{display:'flex',flexWrap:'wrap',gap:5}}>
            {site.team.map((p, i) => (
              <div key={i} style={{display:'flex',alignItems:'center',gap:4,background:'#fff',borderRadius:20,padding:'3px 9px',border:'1px solid #E5E7EB'}}>
                <div style={{width:18,height:18,borderRadius:'50%',background:p.preposto?'#EEF2FF':'#F3F4F6',display:'flex',alignItems:'center',justifyContent:'center',fontSize:7,fontWeight:700,color:p.preposto?ACCENT:'#6B7280'}}>{p.ini}</div>
                <span style={{fontSize:11,color:'#374151',fontWeight:p.preposto?600:400}}>{p.name}</span>
                {p.preposto && <Icon.Star w={8} color={ACCENT} fill={ACCENT}/>}
              </div>
            ))}
          </div>
        </div>
      )}
    </div>
  );
}

/* ── Person row (Non assegnati) ───────────────────────────────── */
function PersonRow({ name, role, ini, color = '#FFF7ED', textColor = '#C2410C' }) {
  return (
    <div style={{display:'flex',alignItems:'center',gap:10,padding:'10px 14px',borderBottom:'1px solid #F1F5F9'}}>
      <div style={{width:32,height:32,borderRadius:'50%',background:color,color:textColor,display:'flex',alignItems:'center',justifyContent:'center',fontFamily:"'Syne',sans-serif",fontWeight:700,fontSize:11}}>{ini}</div>
      <div style={{flex:1}}>
        <div style={{fontSize:14,fontWeight:600,color:'#1E293B',lineHeight:1.2}}>{name}</div>
        <div style={{fontSize:11.5,color:'#64748B'}}>{role}</div>
      </div>
    </div>
  );
}

/* ── Floating action button ──────────────────────────────────── */
function FAB({ onClick }) {
  return (
    <button onClick={onClick} style={{
      position:'absolute',right:18,bottom:24,width:56,height:56,borderRadius:'50%',
      background: `linear-gradient(135deg,${ACCENT},${ACCENT_2})`,
      color:'#fff',border:'none',cursor:'pointer',
      boxShadow:'0 8px 24px rgba(249,115,22,.35)',
      display:'flex',alignItems:'center',justifyContent:'center',
    }}>
      <Icon.Plus w={26}/>
    </button>
  );
}

/* ── Section card (Bacheca pattern) ──────────────────────────── */
function SectionCard({ icon, title, rightHint, children }) {
  return (
    <div style={{background:'#fff',border:'1px solid #E2E8F0',borderRadius:16,marginBottom:12,boxShadow:'0 1px 3px rgba(15,23,42,0.04)',overflow:'hidden'}}>
      <div style={{padding:'12px 14px',display:'flex',alignItems:'center',gap:8,borderBottom:'1px solid #F1F5F9'}}>
        <span style={{fontSize:20}}>{icon}</span>
        <span style={{fontSize:15,fontWeight:700,color:'#0F172A',flex:1}}>{title}</span>
        {rightHint && <span style={{fontSize:12,color:'#64748B'}}>{rightHint}</span>}
      </div>
      <div style={{padding:'12px 14px'}}>{children}</div>
    </div>
  );
}

/* ── Hero KPI Card ──────────────────────────────────────────── */
function HeroKPI({ icon, label, source, blocks }) {
  return (
    <div style={{position:'relative',background:'#0F172A',color:'#fff',borderRadius:18,padding:'18px 16px',marginBottom:14,boxShadow:'0 4px 24px rgba(15,23,42,0.18)',overflow:'hidden'}}>
      <div style={{position:'absolute',top:'-40%',right:'-10%',width:220,height:220,background:'radial-gradient(circle, rgba(249,115,22,.35), transparent 65%)',pointerEvents:'none'}}/>
      <div style={{display:'flex',alignItems:'center',gap:8,marginBottom:14,position:'relative'}}>
        <span style={{fontSize:18}}>{icon}</span>
        <span style={{fontSize:12.5,fontWeight:600,textTransform:'uppercase',letterSpacing:.5,color:ACCENT}}>{label}</span>
        {source && <span style={{fontSize:11,color:'#94A3B8',marginLeft:'auto'}}>{source}</span>}
      </div>
      <div style={{display:'grid',gridTemplateColumns:`repeat(${blocks.length}, 1fr)`,gap:8,position:'relative'}}>
        {blocks.map((b, i) => (
          <div key={i} style={{textAlign:'center'}}>
            <div style={{fontFamily:"'DM Sans',sans-serif",fontWeight:700,fontSize:34,lineHeight:1,letterSpacing:'-.02em',fontVariantNumeric:'tabular-nums',color:'#fff'}}>
              {b.value}<span style={{fontSize:17,color:ACCENT,fontWeight:600,marginLeft:1}}>{b.unit}</span>
            </div>
            <div style={{fontSize:11.5,color:'#CBD5E1',marginTop:6,fontWeight:500}}>{b.sub}</div>
          </div>
        ))}
      </div>
    </div>
  );
}

/* ── Toast ───────────────────────────────────────────────────── */
function Toast({ kind = 'success', text, action }) {
  const map = {
    success: { bg:'#0F172A', fg:'#fff' },
    warning: { bg:'#F59E0B', fg:'#0F172A' },
    error:   { bg:'#EF4444', fg:'#fff' },
  };
  const c = map[kind];
  return (
    <div style={{position:'absolute',bottom:90,left:14,right:14,background:c.bg,color:c.fg,padding:'12px 16px',borderRadius:12,boxShadow:'0 4px 24px rgba(0,0,0,0.18)',display:'flex',alignItems:'center',gap:10,fontSize:14}}>
      <span style={{flex:1,fontWeight:500}}>{text}</span>
      {action && <button style={{background:'transparent',border:'none',color:'inherit',fontWeight:700,cursor:'pointer',fontSize:13,fontFamily:'inherit'}}>{action}</button>}
    </div>
  );
}

/* ── Bottom nav ──────────────────────────────────────────────── */
function BottomNav({ active = 'planner' }) {
  const tabs = [
    { id: 'planner',  label: 'Cantieri', icon: <Icon.Calendar w={20}/> },
    { id: 'bacheca',  label: 'Bacheca',  icon: <Icon.Umbrella w={20}/> },
    { id: 'spese',    label: 'Spese',    icon: <Icon.Card w={20}/> },
    { id: 'admin',    label: 'Admin',    icon: <Icon.Settings w={20}/> },
  ];
  return (
    <div style={{display:'flex',background:'#fff',borderTop:'1px solid #E2E8F0',padding:'6px 8px 4px'}}>
      {tabs.map(t => (
        <div key={t.id} style={{flex:1,display:'flex',flexDirection:'column',alignItems:'center',gap:2,padding:'6px 0',color:t.id===active?ACCENT:'#94A3B8',cursor:'pointer'}}>
          {t.icon}
          <span style={{fontSize:10,fontWeight:600}}>{t.label}</span>
        </div>
      ))}
    </div>
  );
}

/* ── Expose to other Babel script files ──────────────────────── */
Object.assign(window, {
  ACCENT, ACCENT_2, Icon,
  AppHeader, DayStrip, ProgramHeader, SiteCard, PersonRow, FAB,
  SectionCard, HeroKPI, Toast, BottomNav,
});
