/* ==========================================================================
   MINERVA PRODUCT MOCKUPS
   In-page renderings of the Minerva app, built on the actual app design
   tokens: Inter, dark bg #252c39, surface #2d3748, chrome #404354,
   accent #1583f6. Framed in a browser/phone shell.
   ========================================================================== */

:root {
  --app-bg: #252c39;
  --app-surface: #2d3748;
  --app-chrome: #404354;
  --app-border: rgba(203, 210, 217, 0.14);
  --app-fg: #e2e8f0;
  --app-mute: #a0aec0;
  --app-faint: #718096;
  --app-ok: #2ea35a;
  --app-warn: #f7630c;
  --app-gold: #f5a524;
  --app-bad: #d93a20;
}

/* ---------- browser shell ---------- */
.shot {
  background: var(--app-chrome);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0,0,0,0.2);
  font-family: var(--font-app);
  text-align: left;
}
.shot * { box-sizing: border-box; }
.shot-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px; background: #353948;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
.shot-dots { display: flex; gap: 7px; }
.shot-dots i { width: 11px; height: 11px; border-radius: 50%; }
.shot-dots i:nth-child(1) { background: #f56565; }
.shot-dots i:nth-child(2) { background: #f5a524; }
.shot-dots i:nth-child(3) { background: #2ea35a; }
.shot-url {
  flex: 1; max-width: 380px; margin: 0 auto;
  background: rgba(0, 0, 0, 0.28); border-radius: 7px;
  font-family: var(--font-mono); font-size: 11px; color: var(--app-mute);
  padding: 6px 14px; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  white-space: nowrap; overflow: hidden;
}
.shot-url svg { width: 10px; height: 10px; stroke: var(--app-ok); flex: none; }

/* ---------- app layout ---------- */
.app { display: flex; background: var(--app-bg); min-height: 460px; }
.app-side {
  width: 190px; flex: none; background: var(--app-chrome);
  padding: 16px 10px; display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid rgba(0,0,0,0.2);
}
.app-logo { display: flex; align-items: center; gap: 9px; padding: 4px 10px 16px; }
.app-logo img { width: 20px; height: auto; }
.app-logo b { font-size: 13.5px; font-weight: 600; color: #fff; letter-spacing: 0.01em; }
.app-nav-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; color: var(--app-mute);
  padding: 8px 10px; border-radius: 6px;
}
.app-nav-item svg { width: 14px; height: 14px; stroke: currentColor; flex: none; }
.app-nav-item.on { background: rgba(21, 131, 246, 0.16); color: #fff; }
.app-nav-item.on svg { stroke: var(--blue-soft); }
.app-nav-sep { font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--app-faint); padding: 14px 10px 6px; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-top {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; background: var(--app-chrome);
  border-bottom: 1px solid rgba(0,0,0,0.2);
}
.app-top h5 { margin: 0; font-size: 13.5px; font-weight: 600; color: #fff; font-family: var(--font-app); }
.app-top .crumb { font-size: 11px; color: var(--app-faint); }
.app-top .spacer { flex: 1; }
.app-pill {
  font-size: 10px; font-weight: 600; padding: 4px 10px; border-radius: 100px;
  background: rgba(21,131,246,0.18); color: var(--blue-soft); letter-spacing: 0.04em;
}
.app-pill.ok { background: rgba(46,163,90,0.18); color: #58c982; }
.app-pill.warn { background: rgba(247,99,12,0.16); color: #ff9c5c; }
.app-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #1583f6, #003174); display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.app-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; flex: 1; }

/* ---------- KPI cards ---------- */
.m-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.m-kpi { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 8px; padding: 13px 14px; }
.m-kpi .k { font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--app-faint); margin-bottom: 7px; }
.m-kpi .v { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1; }
.m-kpi .d { font-size: 10px; margin-top: 6px; color: var(--app-mute); }
.m-kpi .d.up { color: #58c982; }
.m-kpi .d.warn { color: #ff9c5c; }

/* ---------- panels ---------- */
.m-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; flex: 1; min-height: 0; }
.m-panel { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; }
.m-panel-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.m-panel-h b { font-size: 11.5px; font-weight: 600; color: var(--app-fg); }
.m-panel-h span { font-size: 9.5px; color: var(--app-faint); font-family: var(--font-mono); }

/* ---------- bar chart (turnout) ---------- */
.m-chart { display: flex; align-items: flex-end; gap: 7px; height: 130px; padding-top: 6px; }
.m-chart .bar-g { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; height: 100%; }
.m-chart .bar { border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #1583f6, #0d5cb0); transform-origin: bottom; transform: scaleY(0); transition: transform 1s cubic-bezier(0.22,1,0.36,1); }
.m-chart .bar.alt { background: linear-gradient(180deg, #4a5568, #3a4356); }
.in .m-chart .bar, .always .m-chart .bar { transform: scaleY(1); }
.m-chart .bar:nth-child(1) { transition-delay: 0.1s; }
.m-chart .xl { font-size: 8.5px; color: var(--app-faint); text-align: center; margin-top: 5px; font-family: var(--font-mono); }
.m-legend { display: flex; gap: 16px; margin-top: 10px; }
.m-legend i { font-style: normal; font-size: 9.5px; color: var(--app-mute); display: flex; align-items: center; gap: 6px; }
.m-legend i::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--blue); }
.m-legend i.alt::before { background: #4a5568; }

/* ---------- activity feed ---------- */
.m-feed { display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.m-feed-item {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 0;
  border-bottom: 1px solid rgba(203,210,217,0.07); font-size: 11px; color: var(--app-mute);
}
.m-feed-item:last-child { border-bottom: 0; }
.m-feed-item .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--blue); }
.m-feed-item .dot.ok { background: var(--app-ok); }
.m-feed-item .dot.gold { background: var(--app-gold); }
.m-feed-item .dot.warn { background: var(--app-warn); }
.m-feed-item b { color: var(--app-fg); font-weight: 600; }
.m-feed-item .t { margin-left: auto; font-family: var(--font-mono); font-size: 9px; color: var(--app-faint); flex: none; }
.feed-live .m-feed-item { animation: feedIn 0.5s ease both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- data table ---------- */
.m-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.m-table th {
  text-align: left; font-size: 9px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--app-faint); padding: 7px 10px;
  border-bottom: 1px solid var(--app-border);
}
.m-table td { padding: 8px 10px; color: var(--app-mute); border-bottom: 1px solid rgba(203,210,217,0.06); white-space: nowrap; }
.m-table td.b { color: var(--app-fg); font-weight: 500; }
.m-table tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
.m-badge { display: inline-block; font-size: 9px; font-weight: 600; padding: 2.5px 8px; border-radius: 100px; letter-spacing: 0.03em; }
.m-badge.ok { background: rgba(46,163,90,0.16); color: #58c982; }
.m-badge.warn { background: rgba(247,99,12,0.16); color: #ff9c5c; }
.m-badge.info { background: rgba(21,131,246,0.16); color: #6cb2ff; }
.m-badge.gold { background: rgba(245,165,36,0.16); color: #f5c46a; }
.m-badge.bad { background: rgba(217,58,32,0.16); color: #f08a76; }
.m-badge.mute { background: rgba(160,174,192,0.13); color: var(--app-mute); }

/* score bar in tables */
.m-score { display: flex; align-items: center; gap: 8px; }
.m-score .tr { width: 54px; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.09); overflow: hidden; }
.m-score .tr i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #0d5cb0, #1583f6); transform-origin: left; transform: scaleX(0); transition: transform 1.1s 0.3s cubic-bezier(0.22,1,0.36,1); }
.in .m-score .tr i, .always .m-score .tr i { transform: scaleX(1); }
.m-score em { font-style: normal; font-family: var(--font-mono); font-size: 9.5px; color: var(--app-mute); }

/* ---------- progress ring + bars ---------- */
.m-prog { margin: 6px 0 12px; }
.m-prog .pl { display: flex; justify-content: space-between; font-size: 10px; color: var(--app-mute); margin-bottom: 6px; }
.m-prog .pl b { color: var(--app-fg); }
.m-prog .tr { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.m-prog .tr i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #0d5cb0, #1583f6); transform-origin: left; transform: scaleX(0); transition: transform 1.2s 0.2s cubic-bezier(0.22,1,0.36,1); }
.m-prog .tr i.ok { background: linear-gradient(90deg, #1d7a42, #2ea35a); }
.m-prog .tr i.gold { background: linear-gradient(90deg, #c97f12, #f5a524); }
.in .m-prog .tr i, .always .m-prog .tr i { transform: scaleX(1); }

/* ---------- turf map ---------- */
.m-map { position: relative; flex: 1; min-height: 200px; border-radius: 8px; overflow: hidden; background: #1d2330; border: 1px solid var(--app-border); }
.m-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-map .streets path { stroke: rgba(160,174,192,0.16); stroke-width: 1.4; fill: none; }
.m-map .streets path.major { stroke: rgba(160,174,192,0.28); stroke-width: 2.4; }
.m-map .turf { fill: rgba(21,131,246,0.13); stroke: #1583f6; stroke-width: 1.6; stroke-dasharray: 6 4; }
.m-map .turf.alt { fill: rgba(245,165,36,0.1); stroke: #f5a524; }
.m-pin { position: absolute; width: 12px; height: 12px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--blue); border: 1.5px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.m-pin.ok { background: var(--app-ok); }
.m-pin.gold { background: var(--app-gold); }
.m-pin.pulse::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--blue); animation: pinPulse 2s infinite; }
@keyframes pinPulse { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.m-map-key { position: absolute; bottom: 10px; left: 10px; background: rgba(29,35,48,0.92); border: 1px solid var(--app-border); border-radius: 6px; padding: 8px 12px; display: flex; flex-direction: column; gap: 5px; }
.m-map-key i { font-style: normal; font-size: 9px; color: var(--app-mute); display: flex; align-items: center; gap: 7px; }
.m-map-key i::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.m-map-key i.ok::before { background: var(--app-ok); }
.m-map-key i.gold::before { background: var(--app-gold); }

/* ---------- network graph ---------- */
.m-net { position: relative; flex: 1; min-height: 240px; }
.m-net svg { width: 100%; height: 100%; }
.m-net .edge { stroke: rgba(108,178,255,0.22); stroke-width: 1.2; }
.m-net .edge.hot { stroke: rgba(245,165,36,0.45); stroke-width: 1.6; }
.m-net .node { fill: #2d3748; stroke: #1583f6; stroke-width: 1.6; }
.m-net .node.org { stroke: #f5a524; }
.m-net .node.hub { fill: rgba(21,131,246,0.25); stroke: #6cb2ff; stroke-width: 2; }
.m-net text { font-family: var(--font-app); font-size: 8.5px; fill: var(--app-mute); }
.m-net text.hub-label { font-size: 9.5px; font-weight: 600; fill: #fff; }
.m-net .edge { stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset 1.6s ease; }
.in .m-net .edge, .always .m-net .edge { stroke-dashoffset: 0; }

/* ---------- phone shell ---------- */
.phone {
  width: 270px; background: #14181f; border-radius: 34px; padding: 11px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 36px 80px rgba(0,0,0,0.6);
  font-family: var(--font-app); text-align: left;
}
.phone-screen { background: var(--app-bg); border-radius: 25px; overflow: hidden; }
.phone-notch { height: 26px; display: flex; align-items: center; justify-content: center; background: var(--app-chrome); }
.phone-notch i { width: 70px; height: 17px; background: #14181f; border-radius: 100px; }
.phone-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 420px; }
.ph-head { display: flex; align-items: center; justify-content: space-between; }
.ph-head b { font-size: 13px; color: #fff; font-weight: 600; }
.ph-head span { font-family: var(--font-mono); font-size: 9px; color: var(--app-faint); }
.ph-card { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 11px; padding: 12px 13px; }
.ph-card .nm { font-size: 12.5px; font-weight: 600; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.ph-card .ad { font-size: 10.5px; color: var(--app-mute); margin-top: 3px; }
.ph-card .meta { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.ph-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; margin-top: 10px; }
.ph-actions button { font-family: var(--font-app); font-size: 10px; font-weight: 600; border: 0; border-radius: 7px; padding: 9px 4px; cursor: default; }
.ph-actions .a1 { background: var(--blue); color: #fff; }
.ph-actions .a2 { background: rgba(255,255,255,0.08); color: var(--app-mute); }
.ph-prog { font-family: var(--font-mono); font-size: 9px; color: var(--app-faint); text-align: center; }

/* ---------- floating shot composition ---------- */
.shot-stage { position: relative; }
.shot-stage .shot { animation: floaty 7s ease-in-out infinite; }
.shot-stage .phone { position: absolute; right: -26px; bottom: -44px; z-index: 2; animation: floaty 7s 0.8s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (max-width: 1100px) {
  .shot-stage .phone { display: none; }
}

/* glow behind shots */
.shot-glow { position: relative; }
.shot-glow::before {
  content: ""; position: absolute; inset: -8% -6%;
  background: radial-gradient(ellipse at 50% 55%, rgba(21,131,246,0.22) 0%, transparent 62%);
  pointer-events: none;
}
.shot-glow > * { position: relative; }

/* ---------- showcase tabs (minerva page) ---------- */
.show-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 44px; }
.show-tabs button {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  background: transparent; color: var(--t-mute); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 100px; padding: 11px 22px; cursor: pointer; transition: all 0.2s;
}
.show-tabs button:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.show-tabs button.on { color: #fff; background: rgba(21,131,246,0.18); border-color: var(--blue); }
.show-pane { display: none; }
.show-pane.on { display: block; animation: paneIn 0.5s cubic-bezier(0.22,1,0.36,1); }
@keyframes paneIn { from { opacity: 0; transform: translateY(16px) scale(0.99); } to { opacity: 1; transform: none; } }
.show-cap { display: flex; gap: 14px; align-items: flex-start; max-width: 760px; margin: 28px auto 0; justify-content: center; text-align: center; }
.show-cap p { font-size: 15px; color: var(--t-mute); line-height: 1.6; }
.show-cap p b { color: #fff; }

/* mini inline shot (persona pages) */
.shot.mini .app { min-height: 380px; }
.shot.mini .app-side { width: 165px; }

@media (max-width: 760px) {
  .m-kpis { grid-template-columns: repeat(2, 1fr); }
  .m-cols { grid-template-columns: 1fr; }
  .app-side { display: none; }
}
