/* =========================================================
   ASG public live dashboard demo v1.0
   Public-safe aggregate fetched from AIG Admin.
========================================================= */

.asg-live-demo .asg-live-layout {
  align-items: start;
}

.asg-live-source-tabs,
.asg-live-window-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.asg-live-source-tabs button,
.asg-live-window-buttons button {
  min-height: 38px;
  border: 1px solid rgba(148, 169, 205, .46);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #20324f;
  padding: 0 14px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.asg-live-source-tabs button {
  min-height: 44px;
  border-radius: 14px;
}

.asg-live-source-tabs button i { margin-right: 7px; }
.asg-live-source-tabs button:hover,
.asg-live-window-buttons button:hover { transform: translateY(-1px); }
.asg-live-source-tabs button.active,
.asg-live-window-buttons button.active {
  border-color: #0a1a38;
  background: #0a1a38;
  color: #fff;
  box-shadow: 0 10px 20px rgba(7, 25, 58, .16);
}

.asg-live-safety-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(36, 168, 112, .24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(239,253,247,.96), rgba(255,255,255,.94));
}
.asg-live-safety-note i { color: #0e9b64; margin-top: 2px; }
.asg-live-safety-note span { display: grid; gap: 3px; }
.asg-live-safety-note strong { color: #113b2d; }
.asg-live-safety-note small { color: #537068; line-height: 1.45; }

.asg-live-demo-cockpit {
  position: relative;
  overflow: hidden;
}

.asg-live-demo-cockpit::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 95% 0%, rgba(25,99,255,.1), transparent 28rem);
}

.asg-live-demo-cockpit > * { position: relative; z-index: 1; }

.asg-live-health-grid article {
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.asg-live-health-grid article.is-ok {
  border-color: rgba(42, 186, 126, .34);
  background: linear-gradient(180deg, rgba(239,253,247,.96), rgba(255,255,255,.92));
}
.asg-live-health-grid article.is-warn {
  border-color: rgba(239, 161, 42, .38);
  background: linear-gradient(180deg, rgba(255,248,233,.98), rgba(255,255,255,.92));
}
.asg-live-health-grid article.is-ok strong { color: #0b8a58; }
.asg-live-health-grid article.is-warn strong { color: #b36708; }

.asg-live-demo-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.asg-live-demo-metrics article {
  min-height: 92px;
  display: grid;
  align-content: space-between;
  padding: 11px 12px;
  border: 1px solid rgba(148, 169, 205, .28);
  border-radius: 15px;
  background: rgba(255,255,255,.84);
}
.asg-live-demo-metrics article:nth-child(1) { background: linear-gradient(180deg,#eef5ff,#fff); }
.asg-live-demo-metrics article:nth-child(2) { background: linear-gradient(180deg,#eefcf8,#fff); }
.asg-live-demo-metrics article:nth-child(3) { background: linear-gradient(180deg,#f2fbf4,#fff); }
.asg-live-demo-metrics article:nth-child(4) { background: linear-gradient(180deg,#f7f2ff,#fff); }
.asg-live-demo-metrics article:nth-child(5) { background: linear-gradient(180deg,#fff8e8,#fff); }
.asg-live-demo-metrics article:nth-child(6) { background: linear-gradient(180deg,#fff1f2,#fff); }
.asg-live-demo-metrics span {
  color: #65748d;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 850;
}
.asg-live-demo-metrics strong {
  color: #071733;
  font-size: clamp(20px, 1.7vw, 32px);
  letter-spacing: -.045em;
}
.asg-live-demo-metrics small { color: #6c788d; font-size: 10.5px; }

.asg-live-demo-chart-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 169, 205, .28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248,251,255,.98), rgba(255,255,255,.94));
}
.asg-live-demo-chart {
  min-height: 190px;
  margin-top: 10px;
  border: 1px solid rgba(175, 194, 222, .42);
  border-radius: 15px;
  overflow: hidden;
  background:
    linear-gradient(rgba(44,79,130,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44,79,130,.055) 1px, transparent 1px),
    linear-gradient(180deg,#fbfdff,#f1f6ff);
  background-size: 32px 32px, 32px 32px, auto;
}
.asg-live-demo-chart svg { display: block; width: 100%; height: 190px; }
.asg-live-demo-chart .grid line { stroke: rgba(120,145,182,.34); stroke-width: .7; }
.asg-live-demo-chart .area { opacity: .15; }
.asg-live-demo-chart .line { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.asg-live-demo-chart .dot { stroke: #fff; stroke-width: 2; }
.asg-live-demo-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.asg-live-demo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(166, 187, 218, .52);
  border-radius: 999px;
  background: #fff;
  color: #34435e;
  font-size: 11px;
  font-weight: 800;
}
.asg-live-demo-legend i { width: 8px; height: 8px; border-radius: 50%; }

.asg-live-proof-grid-compact { gap: 8px; }
.asg-live-proof-grid-compact article { min-height: 102px; }

#asgLiveFeedRows { display: grid; gap: 8px; }
#asgLiveFeedRows article {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
#asgLiveFeedRows article > i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #edf4ff;
  color: #155cff;
  font-size: 12px;
}
#asgLiveFeedRows article span { display: grid; gap: 3px; }
#asgLiveFeedRows article small { color: #6a768a; line-height: 1.4; }

.asg-demo-skeleton {
  height: 100%;
  min-height: 190px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.76), transparent);
  animation: asgDemoShimmer 1.4s linear infinite;
}
@keyframes asgDemoShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.asg-live-demo.is-loading #asgLiveRefreshBtn i { animation: asgDemoSpin .8s linear infinite; }
@keyframes asgDemoSpin { to { transform: rotate(360deg); } }
.asg-live-demo.is-error .asg-live-badge { background: #fff4e6; color: #aa5b06; border-color: #f5c985; }

@media (max-width: 1180px) {
  .asg-live-demo-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .asg-live-demo-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .asg-live-source-tabs button { flex: 1 1 100%; }
}


/* =========================================================
   ASG public live dashboard demo v1.1
   Fills the left proof column, compacts the cockpit, and adds
   small analytics plus a scrollable public-safe signal list.
========================================================= */
.asg-live-demo .asg-live-layout {
  grid-template-columns: minmax(470px, 1.15fr) minmax(520px, 1fr);
  gap: 22px;
  align-items: stretch;
}

.asg-live-demo-cockpit {
  align-self: stretch;
  height: 100%;
}

.asg-live-copy {
  position: sticky;
  top: 92px;
}

.asg-live-left-analytics {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(112, 173, 227, .24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(48, 201, 167, .12), transparent 22rem),
    linear-gradient(180deg, rgba(9,34,68,.78), rgba(7,27,57,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.asg-live-left-analytics-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.asg-live-left-analytics-head span {
  color: #62d8c2;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.asg-live-left-analytics-head strong { color: #fff; font-size: 18px; }
.asg-live-left-analytics-head small { color: #a9bed9; line-height: 1.45; }

.asg-live-mini-analytics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.asg-live-mini-analytics article {
  min-height: 116px;
  display: grid;
  align-content: space-between;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(155, 191, 226, .18);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
}
.asg-live-mini-analytics article.tone-blue { background: linear-gradient(180deg, rgba(47,104,255,.18), rgba(255,255,255,.04)); }
.asg-live-mini-analytics article.tone-mint { background: linear-gradient(180deg, rgba(25,191,147,.16), rgba(255,255,255,.04)); }
.asg-live-mini-analytics article.tone-violet { background: linear-gradient(180deg, rgba(136,91,255,.16), rgba(255,255,255,.04)); }
.asg-live-mini-analytics article.tone-gold { background: linear-gradient(180deg, rgba(236,169,38,.16), rgba(255,255,255,.04)); }
.asg-live-mini-analytics span {
  color: #a8c1df;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.asg-live-mini-analytics strong { color: #fff; font-size: 22px; letter-spacing: -.04em; }
.asg-live-mini-analytics small { color: #9eb2cb; font-size: 10px; line-height: 1.35; }
.asg-mini-meter {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
}
.asg-mini-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2d78ff, #55d5ee);
  transition: width .35s ease;
}
.tone-mint .asg-mini-meter i { background: linear-gradient(90deg, #13a978, #64dfbd); }
.tone-violet .asg-mini-meter i { background: linear-gradient(90deg, #7548e8, #b28bff); }
.tone-gold .asg-mini-meter i { background: linear-gradient(90deg, #d98b10, #ffd16c); }

.asg-live-proof-explainer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.asg-live-proof-explainer article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(143,178,214,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}
.asg-live-proof-explainer i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(71,136,255,.14);
  color: #77aaff;
}
.asg-live-proof-explainer span { display: grid; gap: 2px; }
.asg-live-proof-explainer strong { color: #f5f9ff; font-size: 12px; }
.asg-live-proof-explainer small { color: #95abc6; font-size: 10px; line-height: 1.35; }

.asg-live-demo-cockpit {
  padding: 14px;
  border-radius: 24px;
}
.asg-live-demo-cockpit .asg-live-top { margin-bottom: 9px; }
.asg-live-demo-cockpit .asg-live-top strong { font-size: 13px; }
.asg-live-demo-cockpit .asg-live-top small { font-size: 10px; }
.asg-live-demo-cockpit .asg-live-badge { font-size: 9px; padding: 6px 9px; }

.asg-live-health-grid { gap: 7px; }
.asg-live-health-grid article {
  min-height: 78px;
  padding: 9px 10px;
  border-radius: 13px;
}
.asg-live-health-grid article i { width: 25px; height: 25px; font-size: 10px; }
.asg-live-health-grid article span { font-size: 8px; }
.asg-live-health-grid article strong { font-size: 13px; }
.asg-live-health-grid article small { font-size: 8.5px; }

.asg-live-demo-metrics {
  gap: 7px;
  margin-top: 9px;
}
.asg-live-demo-metrics article {
  min-height: 74px;
  padding: 9px 10px;
  border-radius: 13px;
}
.asg-live-demo-metrics span { font-size: 8px; }
.asg-live-demo-metrics strong { font-size: clamp(18px, 1.35vw, 25px); }
.asg-live-demo-metrics small { font-size: 9px; }

.asg-live-demo-chart-card {
  margin-top: 9px;
  padding: 11px;
  border-radius: 15px;
}
.asg-live-demo-chart {
  min-height: 142px;
  margin-top: 7px;
  border-radius: 12px;
  background-size: 28px 28px, 28px 28px, auto;
}
.asg-live-demo-chart svg { height: 142px; }
.asg-live-demo-legend { gap: 5px; margin-top: 7px; }
.asg-live-demo-legend span { padding: 5px 7px; font-size: 9px; }

.asg-live-window { margin-top: 9px; padding: 10px; border-radius: 15px; }
.asg-live-window-head span { font-size: 8px; }
.asg-live-window-head strong { font-size: 10px; }
.asg-live-proof-grid-compact {
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 7px;
  margin-top: 8px;
}
.asg-live-proof-grid-compact article {
  min-height: 82px;
  padding: 9px;
  border-radius: 13px;
  position: relative;
}
.asg-live-proof-grid-compact article i { width: 24px; height: 24px; font-size: 10px; }
.asg-live-proof-grid-compact article strong { font-size: 10px; }
.asg-live-proof-grid-compact article small { font-size: 8.5px; line-height: 1.3; }
.asg-live-proof-grid-compact article em {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(37, 104, 255, .08);
  color: #2b5ca7;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.asg-live-feed {
  margin-top: 9px;
  padding: 10px;
  border-radius: 15px;
}
.asg-live-feed-head { margin-bottom: 7px; }
.asg-live-feed-head span { font-size: 8px; }
.asg-live-feed-head strong { font-size: 10px; }
.asg-live-feed-scroll {
  max-height: 580px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 142, 199, .75) rgba(255,255,255,.06);
  padding-right: 4px;
}
.asg-live-feed-scroll::-webkit-scrollbar { width: 7px; }
.asg-live-feed-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 999px; }
.asg-live-feed-scroll::-webkit-scrollbar-thumb { background: rgba(102,142,199,.75); border-radius: 999px; }
#asgLiveFeedRows { gap: 6px; }
#asgLiveFeedRows article {
  grid-template-columns: 24px 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 11px;
}
#asgLiveFeedRows article > i { width: 24px; height: 24px; border-radius: 8px; font-size: 10px; }
#asgLiveFeedRows article strong { font-size: 10px; }
#asgLiveFeedRows article small { font-size: 8.5px; line-height: 1.3; }

@media (max-width: 1280px) {
  .asg-live-demo .asg-live-layout { grid-template-columns: 1fr; }
  .asg-live-copy { position: static; }
  .asg-live-left-analytics { max-width: none; }
}

@media (max-width: 720px) {
  .asg-live-mini-analytics { grid-template-columns: 1fr 1fr; }
  .asg-live-proof-grid-compact { grid-template-columns: 1fr 1fr; }
}
