/* Pipewise CRM demo: a fictional CRM, not a real product. Coordinates are
   stage pixels (1200x675). Palette: navy #14213d / #0f1a30 chrome, ink
   #131313, grey canvas #f0f0f0, indigo accent #4f46e5, system typeface. */
html, body { margin: 0; height: 100%; background: #fff; }
.ud-frame { height: 100%; }
.ud-stage { --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f7f5f0; font-family: var(--font); color: #131313; }
.ud-cursor__ring { border-color: #4f46e5; }
.ud-stage .hidden { display: none; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic--fill { fill: currentColor; stroke: none; }
.ic--accent { color: #4f46e5; }
.caret { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #131313; margin-left: 4px; }
.caret--light { border-top-color: #fff; }

/* Captions: 1 and 6 are opening/closing titles centred over the stage. The
   middle ones are coach-mark cards that float over the UI near whatever the
   cursor is doing, so the eye doesn't have to leave the action to read them.
   z-index 40 clears every in-app layer and sits under the cursor (50). */
.caption { position: absolute; z-index: 40; text-align: center; font: 600 28px/1.2 var(--font); color: #131313; opacity: 0; }
.caption .dot { color: #4f46e5; }
.caption--title { left: 0; right: 0; top: 22px; }
/* Solid indigo card with white text: a white card on the app's white UI
   reads as a rendering glitch rather than a callout. Deepened from the
   #4f46e5 used elsewhere so white text clears AA (4.5:1).
   Each card straddles an app edge, bleeding ~40px onto the stage backdrop, so
   it reads as an overlay on the demo rather than a panel inside the product.
   The bleed side gets extra padding so text clears the app boundary. */
.caption--card { text-align: left; font: 500 19px/1.35 var(--font); color: #fff;
  box-sizing: border-box; padding: 16px 18px; border-radius: 10px; background: #3730a3;
  box-shadow: 0 18px 44px rgba(55, 48, 163, 0.40); }
/* App edges are x60 and x1140; bleed cards overhang by 40 and pad that side. */
.caption--left  { left: 20px;  padding-left: 58px; }
.caption--right { right: 20px; padding-right: 58px; text-align: right; }
/* 2: the pipeline tab is clicked high at 889,109, so the card hugs the left
   edge low, below the deal cards it describes. */
.caption--pipeline { top: 470px; width: 360px; }
/* 3: the assistant panel occupies x780..1140 and is clicked at 1015,599, so the
   card hugs the left edge, clear of the panel entirely. */
.caption--assistant { top: 250px; width: 360px; }
/* 4: Marketing clicks land at 1061,171 and 1011,366 on the right, so the
   card hugs the left edge low. */
.caption--marketing { top: 440px; width: 380px; }
/* 5: the ads scene clicks at 275,213 and 698,514 on the left and middle, so
   the card hugs the right edge high. */
.caption--ads { top: 180px; width: 350px; }

/* App window: 60,80 → 1140,635 */
.app { position: absolute; left: 60px; top: 80px; width: 1080px; height: 555px; border-radius: 12px; background: #f0f0f0; overflow: hidden; opacity: 0;
  box-shadow: 0 30px 60px rgba(20, 33, 61, 0.22), 0 0 0 1px rgba(20, 33, 61, 0.08); }

/* Top bar, height 48 */
.top { position: absolute; left: 0; top: 0; right: 0; height: 48px; background: linear-gradient(90deg, #14213d, #1b2a4a); color: #fff; }
.logo { position: absolute; left: 16px; top: 0; height: 48px; display: flex; align-items: center; gap: 8px; font: 700 15px/1 var(--font); letter-spacing: -0.02em; color: #fff; }
.logo i { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: inset 0 0 0 3px #1b2a4a, inset 0 0 0 5px #a5b4fc; }
.top__search { position: absolute; left: 122px; top: 9px; width: 300px; height: 30px; box-sizing: border-box; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 6px; background: #22315a; border: 1px solid #34477a; font: 400 13px/1 var(--font); color: #c7d0e6; }
.top__search .ic { width: 15px; height: 15px; }
.top__plus { position: absolute; left: 434px; top: 9px; width: 30px; height: 30px; box-sizing: border-box; border-radius: 6px; border: 1px solid #34477a; text-align: center; font: 300 20px/26px var(--font); color: #fff; }
.top__icons { position: absolute; right: 336px; top: 15px; display: flex; gap: 18px; color: #d6dcf0; }
.top__assist { position: absolute; right: 200px; top: 9px; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-left: 1px solid #34477a; border-right: 1px solid #34477a; border-radius: 0; font: 500 13px/1 var(--font); color: #fff; }
.top__user { position: absolute; right: 14px; top: 9px; display: flex; align-items: center; gap: 8px; height: 30px; font: 500 13px/1 var(--font); }

/* Icon rail, width 60 */
.rail { position: absolute; left: 0; top: 48px; width: 60px; bottom: 0; background: #0f1a30; padding-top: 10px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail i { display: flex; align-items: center; justify-content: center; width: 36px; height: 34px; border-radius: 6px; color: #c7d0e6; opacity: 0; }
.rail hr { width: 28px; border: 0; border-top: 1px solid #2a3d66; margin: 4px 0; }
.rail__active { background: #2a3d66; color: #fff !important; }
.rail__bottom { position: absolute; bottom: 8px; }

/* Page header (white), 60..1080, y 48..150 */
.head { position: absolute; left: 60px; top: 48px; right: 0; height: 102px; background: #fff; border-bottom: 1px solid #e3e3e3; }
.head__title { position: absolute; left: 32px; top: 24px; display: flex; align-items: center; gap: 10px; font: 500 20px/1 var(--font); }
.head__sep { width: 1px; height: 22px; background: #cfcfcf; }
.tabs { position: absolute; left: 32px; bottom: 0; display: flex; gap: 40px; font: 400 15px/1 var(--font); }
.tabs span { padding: 0 6px 14px; }
.tabs__active { font-weight: 500; box-shadow: inset 0 -3px 0 #131313; }

/* Board: columns 300 wide at app x 84 / 400 / 716, top 168 */
.board { position: absolute; left: 84px; top: 168px; right: 24px; bottom: 0; }
.col { position: absolute; top: 0; width: 300px; height: 368px; border-radius: 8px; background: #e6e6e6; opacity: 0; }
.col:nth-child(1) { left: 0; } .col:nth-child(2) { left: 316px; z-index: 2; } .col:nth-child(3) { left: 632px; }
.col__head { padding: 12px 16px; font: 400 12px/1.4 var(--font); color: #555; }
.col__head b { display: block; font: 500 14px/1.4 var(--font); color: #131313; }
.card { position: absolute; left: 12px; width: 276px; height: 92px; box-sizing: border-box; padding: 12px 14px; border-radius: 8px; background: #fff; border: 1px solid #dcdcdc; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); opacity: 0; }
.card:nth-of-type(2) { top: 58px; } .card:nth-of-type(3) { top: 162px; }
.card__name { font: 500 14px/1.3 var(--font); color: #0b2a2a; margin-bottom: 6px; }
.card__row { font: 400 12px/1.5 var(--font); color: #555; }
.card__row b { font-weight: 500; color: #131313; }
.card__avatar { position: absolute; right: 12px; bottom: 12px; width: 24px; height: 24px; border-radius: 50%; background: #4f46e5; color: #fff; font: 600 9px/24px var(--font); text-align: center; }
.card__avatar.a2 { background: #0b2a2a; } .card__avatar.a3 { background: #14213d; }
.card--acme { z-index: 5; }
.drop { position: absolute; left: 12px; top: 162px; width: 276px; height: 92px; box-sizing: border-box; border: 2px dashed #4f46e5; border-radius: 8px; background: rgba(79, 70, 229, 0.06); opacity: 0; }

/* Assistant panel: app-relative 720..1080, top 48 */
.panel { position: absolute; left: 720px; top: 48px; width: 360px; height: 507px; box-sizing: border-box; padding: 64px 20px 20px; background: #fff; border-left: 1px solid #e3e3e3; box-shadow: -12px 0 30px rgba(0, 0, 0, 0.12); opacity: 0; z-index: 10; }
.panel__head { position: absolute; left: 0; top: 0; right: 0; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 20px; border-bottom: 1px solid #e3e3e3; font: 500 15px/1 var(--font); }
.panel__x { margin-left: auto; font: 300 22px/1 var(--font); color: #555; }
.bubble { border-radius: 12px; padding: 10px 14px; font: 400 13px/1.5 var(--font); opacity: 0; }
.bubble--user { margin-left: 60px; background: #f0f0f0; border-bottom-right-radius: 4px; min-height: 20px; }
.thinking { display: flex; gap: 5px; margin: 14px 0 0 4px; opacity: 0; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: #4f46e5; }
.thinking i:nth-child(2) { opacity: 0.6; } .thinking i:nth-child(3) { opacity: 0.3; }
.bubble--ai { position: absolute; left: 20px; right: 20px; top: 138px; padding: 0; }
.reply__label { font: 400 13px/1.5 var(--font); color: #131313; margin-bottom: 10px; }
.draft { box-sizing: border-box; padding: 12px 14px; border: 1px solid #dcdcdc; border-radius: 8px; background: #fbf8f4; height: 250px; }
.draft__meta { font: 400 12px/1.6 var(--font); color: #555; }
.draft__subject { color: #131313; border-bottom: 1px solid #e3e3e3; padding-bottom: 6px; margin-bottom: 8px; }
.draft__body { font: 400 13px/1.5 var(--font); color: #131313; white-space: pre-wrap; }
.panel__actions { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; gap: 10px; opacity: 0; }
.btn { flex: 1; height: 40px; border: 0; border-radius: 6px; font: 500 14px/1 var(--font); box-sizing: border-box; }
.btn--ghost { background: #fff; border: 1px solid #cfcfcf; color: #131313; flex: 0 0 90px; }
.btn--dark { background: #131313; color: #fff; }

.toast { position: absolute; left: 84px; bottom: 20px; padding: 12px 18px; border-radius: 8px; background: #0b2a2a; color: #fff; font: 500 14px/1 var(--font); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); opacity: 0; }

/* ---- Scenes ------------------------------------------------------------- */
.scene { position: absolute; left: 0; top: 48px; right: 0; bottom: 0; }
.scene--hidden { opacity: 0; }
.scene .head { top: 0; }
.scene .board { top: 120px; }
.scene .panel { top: 0; }
.head__cta { position: absolute; right: 24px; top: 22px; width: auto; height: 36px; padding: 0 16px; flex: none; opacity: 0; }
.btn--accent { background: #4f46e5; color: #fff; }
.tabs [data-tab="ads"] { position: relative; }

/* Marketing: email analytics */
.mkt { position: absolute; left: 84px; top: 120px; right: 24px; bottom: 0; }
.wcard { position: absolute; box-sizing: border-box; padding: 18px 20px; border-radius: 8px; background: #fff; border: 1px solid #dcdcdc; opacity: 0; }
.wcard--main { left: 0; top: 0; width: 640px; height: 367px; }
.wcard--side { left: 656px; top: 0; width: 316px; height: 367px; }
.wcard__title { display: flex; align-items: center; gap: 10px; font: 500 16px/1.3 var(--font); }
.wcard__sub { margin-top: 4px; font: 400 12px/1.4 var(--font); color: #555; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font: 500 11px/1 var(--font); }
.pill--sent { background: #e0f2e9; color: #0a6b3f; } .pill--sched { background: #e3f2f9; color: #0b5c7a; }
.pill--draft { background: #eee; color: #555; } .pill--auto { background: #e7e5fb; color: #3730a3; }
.stats { display: flex; gap: 12px; margin-top: 18px; }
.stat { flex: 1; padding: 12px 14px; border-radius: 8px; background: #f7f7f7; opacity: 0; }
.stat small { display: block; font: 400 11px/1 var(--font); color: #555; margin-bottom: 8px; }
.stat b { font: 500 22px/1 var(--font); color: #131313; }
.chart__label { margin: 18px 0 8px; font: 500 12px/1 var(--font); color: #555; }
.chart { position: relative; height: 132px; display: flex; align-items: flex-end; gap: 22px; padding: 0 6px; border-bottom: 1px solid #e3e3e3; }
.bar { position: relative; flex: 1; height: var(--h); background: #4f46e5; border-radius: 4px 4px 0 0; transform: scaleY(0); transform-origin: bottom; }
.bar:nth-child(n+6) { background: #c7c4f6; }
.bar span { position: absolute; left: 0; right: 0; bottom: -20px; text-align: center; font: 400 11px/1 var(--font); color: #555; transform: scaleY(1); }
.row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid #eee; font: 400 13px/1.3 var(--font); opacity: 0; }
.wcard__title + .row { margin-top: 12px; }
.popover { position: absolute; right: 0; top: -2px; width: 340px; box-sizing: border-box; padding: 16px 18px; border-radius: 10px; background: #fff; border: 1px solid #dcdcdc; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18); opacity: 0; z-index: 8; }
.popover__head { display: flex; align-items: center; gap: 8px; font: 500 13px/1 var(--font); }
.popover__text { margin: 12px 0 14px; padding: 12px 14px; border-radius: 8px; background: #fbf8f4; font: 400 14px/1.4 var(--font); }
.popover__actions { display: flex; gap: 10px; }
.popover .btn { height: 36px; }
.popover .btn--ghost { flex: 0 0 110px; }

/* Marketing: ads dashboard */
.ads { position: absolute; left: 84px; top: 120px; right: 24px; bottom: 0; opacity: 0; }
.tile { position: absolute; top: 0; width: 228px; height: 86px; box-sizing: border-box; padding: 14px 16px; border-radius: 8px; background: #fff; border: 1px solid #dcdcdc; opacity: 0; }
.tile:nth-child(1) { left: 0; } .tile:nth-child(2) { left: 248px; } .tile:nth-child(3) { left: 496px; } .tile:nth-child(4) { left: 744px; }
.tile small { display: block; font: 400 11px/1 var(--font); color: #555; }
.tile b { display: block; margin-top: 8px; font: 500 22px/1 var(--font); }
.tile em { display: block; margin-top: 6px; font: 400 11px/1 var(--font); font-style: normal; color: #555; }
/* Green only where the caption really is a positive change. */
.tile em.up { color: #0a6b3f; }
.wcard--table { left: 0; top: 104px; width: 972px; height: 188px; padding: 6px 0; }
.trow { display: grid; grid-template-columns: 130px 1fr 130px 100px 100px 90px; align-items: center; height: 46px; padding: 0 20px; border-top: 1px solid #eee; font: 400 13px/1 var(--font); opacity: 0; }
.trow--head { border-top: 0; font: 500 11px/1 var(--font); color: #555; text-transform: uppercase; letter-spacing: 0.04em; height: 38px; opacity: 1; }
.trow > span { display: flex; align-items: center; gap: 8px; }
.trow em { font-style: normal; }
.net { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font: 600 11px/1 var(--font); color: #fff; }
.net--g { background: #4285f4; } .net--fb { background: #1877f2; } .net--li { background: #0a66c2; }
.toggle { position: relative; width: 34px; height: 20px; border-radius: 10px; background: #cfcfcf; flex: none; }
.toggle b { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.toggle--on { background: #0a6b3f; } .toggle--on b { transform: translateX(14px); }
