/* Illustrated UI in the client's "Social widgets" style (Figma: Dialog - Brand > Social Widgets).
   White cards with a hairline border, a navy "dark" card, mint/aqua accents and small filled status pills. */
.wg-stage{--wg-line:#e6e8f2;--wg-r:14px;--mt:64px;--hp:200px;position:relative;display:flow-root;padding:0 18px 24px 0;font-family:var(--body);color:var(--ink)}
.wg{position:relative;background:#fff;border:1px solid var(--wg-line);border-radius:var(--wg-r);padding:22px 24px;
  box-shadow:0 1px 2px rgba(0,0,102,.04),0 26px 50px -30px rgba(0,0,102,.32)}
.wg-main{z-index:1;margin-top:var(--mt)}
.wg-main .wg-head{flex-direction:column;align-items:flex-start;gap:8px;padding-right:min(var(--hp),42%)}
.wg-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:16px}
.wg-title{display:block;font:700 1.02rem/1.3 var(--display);color:var(--ink);letter-spacing:-.01em}
.wg-sub{display:block;margin-top:.15rem;font:400 .76rem var(--body);color:var(--muted)}
.wg-badge{flex:none;display:inline-flex;align-items:center;gap:.35rem;padding:.26rem .55rem;border-radius:6px;background:var(--mint);color:var(--teal-dk);font:600 .7rem var(--body);white-space:nowrap}
.wg-badge i{width:6px;height:6px;border-radius:50%;background:var(--teal-dk);animation:pulse 1.8s ease-out infinite}

/* rows (agents, numbers) */
.wg-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #f0f2f7;font-size:.92rem;transition:background-color .4s}
.wg-row:last-of-type{border-bottom:0}
.wg-row.pop{animation:rowPop .7s ease}
.wg-name{flex:1;min-width:0;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wg-name .timer{margin-left:.35rem;font:500 .76rem var(--mono);color:var(--muted)}
.wg-av{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#eef0f8;color:var(--navy)}
.wg-av svg{width:18px;height:18px}
.wg-sq{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:var(--mint);color:var(--teal-dk);font:700 .8rem var(--mono)}
.wg-sq svg{width:16px;height:16px}

/* status pills: small filled tags, as in the Agent Status widget */
.wg .pill{flex:none;border-radius:6px;padding:.28rem .62rem;font:600 .72rem var(--body);font-style:normal;letter-spacing:0;transition:background-color .35s,color .35s}
.wg .pill.ok{background:var(--navy);color:#fff}
.wg .pill.warn{background:#fff3d6;color:var(--navy)}
.wg .pill.idle{background:#eef0f5;color:var(--slate)}
.wg-health .pill.ok{background:var(--teal-dk)}
.wg-row[data-state="ringing"] .pill{animation:ring 1.1s ease-in-out infinite}
.wg-row.is-warn .pill{animation:warnPulse 1.6s ease-in-out infinite}
.wg .eq{display:inline-flex;align-items:flex-end;gap:2px;height:16px;opacity:0;transition:opacity .3s}
.wg .eq u{width:3px;height:100%;border-radius:2px;background:var(--teal);transform-origin:bottom;animation:eq 1s ease-in-out infinite}
.wg .eq u:nth-child(2){animation-duration:.8s;animation-delay:-.3s}.wg .eq u:nth-child(3){animation-duration:1.15s;animation-delay:-.6s}.wg .eq u:nth-child(4){animation-duration:.9s;animation-delay:-.15s}
.wg-row[data-state="connected"] .eq{opacity:1}
.wg-foot{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding-top:12px;border-top:1px dashed var(--wg-line);font-size:.8rem;color:var(--muted)}
.wg .qdots i{background:var(--teal)}

/* navy card (Stat Dark, Call Card, Progress) */
.wg-dark{background:var(--navy);border-color:var(--navy);color:#fff}
.wg-dark .wg-title{color:#fff}
.wg-stat small{display:block;font:500 .76rem var(--body);color:rgba(255,255,255,.72)}
.wg-stat strong{display:block;font:900 2.4rem/1.05 var(--display);letter-spacing:-.02em;margin:.2rem 0 .7rem}
.wg-chip{white-space:nowrap;display:inline-flex;align-items:center;gap:.35rem;padding:.3rem .6rem;border-radius:6px;background:var(--teal);color:var(--navy);font:600 .72rem var(--body)}
.wg-chip svg{width:12px;height:12px}

/* floating companions */
.wg-float{position:absolute;z-index:2}
.wg-f1{top:0;right:0;animation:floatA 6s ease-in-out infinite}
.wg-f2{bottom:0;left:28px;animation:floatB 7s ease-in-out infinite}
.wg-dialing .wg-f1{width:210px;padding:18px 20px}
.wg-note{display:flex;align-items:center;gap:12px}
.wg-note b{display:block;font:600 .86rem var(--body);color:var(--ink)}
.wg-note small{display:block;font-size:.72rem;color:var(--muted)}
.wg-note em{margin-left:auto;padding-left:14px;font:500 .72rem var(--body);font-style:normal;color:var(--muted)}
.wg-inset{margin-top:14px;padding:10px 12px;border:1px solid #eef0f5;border-radius:10px;background:#f7f8fb;animation:wgToast 6s ease-in-out infinite}
.wg-inset .wg-ic{width:30px;height:30px}
@keyframes wgToast{0%,8%{opacity:0;transform:translateY(6px)}14%,86%{opacity:1;transform:none}94%,100%{opacity:0;transform:translateY(6px)}}
.wg-ic{flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:var(--navy);color:#fff}
.wg-ic svg{width:17px;height:17px}
.wg-live{display:inline-flex;align-items:center;gap:.3rem;color:var(--teal-dk)!important;font-weight:600!important}
.wg-live i{width:7px;height:7px;border-radius:50%;background:var(--teal-dk);animation:pulse 1.8s ease-out infinite}
.wg-dialing{--mt:64px}
.wg-campaigns{--mt:96px;--hp:210px}
.wg-health{--mt:52px;--hp:210px}

/* bar chart (Calls this week) */
.wg-bars{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;align-items:end;height:190px;padding-top:6px}
.wg-bar{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:8px}
.wg-bar u{display:block;width:100%;height:var(--h);border-radius:4px 4px 0 0;background:var(--mint);transform-origin:bottom;animation:wgGrow 1s cubic-bezier(.2,.8,.2,1) var(--d) both}
.wg-bar.is-peak u{background:var(--navy)}
.wg-bar small{font-size:.7rem;color:var(--muted)}
@keyframes wgGrow{from{transform:scaleY(.15)}to{transform:none}}

/* progress (Example campaign) */
.wg-progress{width:236px;padding:16px 18px}
.wg-progress .wg-title{font-size:.9rem;margin-bottom:12px}
.wg-prog{margin-top:10px}.wg-prog small{display:block;font-size:.7rem;color:rgba(255,255,255,.72);margin-bottom:.35rem}
.wg-track{display:block;height:6px;border-radius:6px;background:rgba(255,255,255,.14);overflow:hidden}
.wg-track u{display:block;height:100%;width:var(--w);border-radius:6px;background:var(--teal);animation:wgFill 4.5s ease-in-out var(--d) infinite alternate}
.wg-track u.white{background:#fff}.wg-track u.slate{background:#8f99ab}
@keyframes wgFill{from{width:calc(var(--w) * .55)}to{width:var(--w)}}

/* donut (ASR rate) */
.wg-donut{display:grid;grid-template-columns:64px 1fr;column-gap:14px;align-items:center;width:230px;padding:14px 16px}
.wg-donut svg{grid-row:span 2;width:64px;height:64px;display:block;transform:rotate(-90deg)}
.wg-donut circle{fill:none;stroke-width:16}
.wg-donut .trk{stroke:var(--mint)}
.wg-donut .arc{stroke:var(--navy);stroke-linecap:butt;stroke-dasharray:302;stroke-dashoffset:84;animation:wgArc 5s ease-in-out infinite alternate}
.wg-donut .wg-title{font-size:.9rem}
@keyframes wgArc{from{stroke-dashoffset:130}to{stroke-dashoffset:70}}

/* number health scan */
.wg-scan{overflow:hidden}
.wg-scan .scan-line{position:absolute;left:0;right:0;top:0;height:46px;background:linear-gradient(180deg,transparent,rgba(46,196,182,.16),transparent);animation:scan 4.5s ease-in-out infinite;pointer-events:none}

/* flow diagram */
.wg-flowgrid{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,.8fr) 20px minmax(0,1fr);align-items:center;gap:0 4px;padding:6px 0}
.wg-col{padding:12px;display:flex;flex-direction:column;gap:8px}
.wg-kicker{font:700 .62rem var(--body);letter-spacing:.08em;text-transform:uppercase;color:var(--teal-dk);margin-bottom:2px}
.wg-col i{display:flex;align-items:center;gap:8px;font-style:normal;font-size:.74rem;font-weight:600;color:var(--ink);line-height:1.3}
.wg-col .wg-sq{width:24px;height:24px;border-radius:6px;font-size:.7rem}.wg-col .wg-sq svg{width:13px;height:13px}
.wg-core{display:flex;flex-direction:column;align-items:center;text-align:center;padding:18px 8px;gap:5px;min-width:0}
.wg-core b{font:700 .84rem var(--display);overflow-wrap:anywhere}
.wg-core small{font-size:.66rem;color:rgba(255,255,255,.75);line-height:1.35}
.wg-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--teal);color:var(--navy);margin-bottom:4px}
.wg-avatar svg{width:23px;height:23px}
.wg-arrow{position:relative;display:block;height:2px;background:repeating-linear-gradient(90deg,#d5d9e1 0 6px,transparent 6px 10px)}
.wg-arrow u{position:absolute;left:0;top:-4px;width:10px;height:10px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 4px rgba(46,196,182,.18);animation:packet 1.8s ease-in-out infinite}
.wg-flowgrid .wg-arrow:nth-of-type(2) u{animation-delay:.9s}
.wg-stage.wg-flow{padding:6px 0}
.wg-flowgrid + .flow-cap{margin:.6rem 0 0}

/* small screens: companions sit in the flow under the main card */
@media (max-width:900px){
  .wg-stage{padding:0 0 18px;--mt:0px;--hp:0px}
  .wg-f1{position:relative;top:auto;right:auto;margin:-18px 8px 0 auto;width:max-content;max-width:85%}
}
@media (max-width:600px){
  .wg{padding:16px}
  .wg-bars{height:140px;gap:6px}
  .wg-flowgrid{grid-template-columns:1fr;gap:8px}
  .wg-arrow{justify-self:center;width:2px;height:28px;background:repeating-linear-gradient(180deg,#d5d9e1 0 6px,transparent 6px 10px)}
  .wg-arrow u{animation-name:packetV}
  .wg-name .timer{display:none}
}
@media (prefers-reduced-motion:reduce){
  html:not(.motion-always) .wg *,html:not(.motion-always) .wg{animation:none!important}
  html:not(.motion-always) .wg-row[data-state="connected"] .eq{opacity:1}
}
