/* Invoice chasing: after Waida's Virion. Soft lavender ground with a white glow, a floating white
   nav pill, navy pill buttons, Inter at a refined size, one indigo accent, white dashboard cards. */
.demo--invoice-chasing {
  --bg: #eeedf7; --panel: #ffffff; --soft: #f5f5fb; --ink: #17153a; --muted: #5d5b76; --line: #e4e3ef;
  --blue: #5a4fe6; --blue-2: #4337c9; --blue-soft: #eeecff; --navy: #1c1a3d; --green: #0f7a55; --amber: #9a5700; --red: #b42318;
  --shadow: 0 1px 2px rgba(23,21,58,.04), 0 14px 34px -20px rgba(23,21,58,.22);
  background: var(--bg); color: var(--ink); font: 400 15px/1.55 Inter, system-ui, sans-serif;
}
.ng-wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.demo--invoice-chasing :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.demo--invoice-chasing a { color: inherit; }

/* ---- nav ---- */
.ng-top { position: relative; z-index: 5; padding-top: 22px;
  background: radial-gradient(60% 90% at 50% 0%, #fdfdff 0%, rgba(253,253,255,0) 70%), var(--bg); }
.ng-nav { max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 20px; background: rgba(255,255,255,.92);
  border: 1px solid #fff; border-radius: 18px; padding: 10px 10px 10px 18px; box-shadow: 0 18px 40px -22px rgba(28,26,61,.35), 0 2px 6px rgba(28,26,61,.05); }
.ng-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.ng-logo svg { width: 28px; height: 28px; }
.ng-logo rect { fill: var(--navy); }
.ng-logo path { fill: none; stroke: #c9c4ff; stroke-width: 2.2; stroke-linejoin: round; }
.ng-nav__links { display: flex; gap: 6px; margin: 0 auto; }
.ng-nav__links a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); text-decoration: none; }
.ng-nav__links a:hover { color: var(--ink); background: var(--soft); }
@media (max-width: 720px) { .ng-nav__links { display: none; } .ng-nav { justify-content: space-between; } }

/* ---- hero ---- */
.ng-hero { text-align: center; padding: clamp(56px, 7vw, 92px) 0 clamp(56px, 7vw, 96px);
  background: radial-gradient(46% 42% at 50% 22%, #ffffff 0%, rgba(255,255,255,0) 100%), var(--bg); }
.ng-hero__in { display: flex; flex-direction: column; align-items: center; }
.ng-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; }
.ng-eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.ng-h1 { margin-top: 22px; max-width: 880px; font-weight: 600; font-size: clamp(2.35rem, 5.2vw, 4.4rem); line-height: 1.04; letter-spacing: -.045em; }
.ng-lede { margin-top: 20px; max-width: 54ch; color: var(--muted); font-size: clamp(1rem, 1.25vw, 1.08rem); }
.ng-hero__cta { margin-top: 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.ng-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; background: var(--navy); color: #fff !important; font-weight: 500; font-size: 15px; padding: 13px 22px; text-decoration: none;
  box-shadow: 0 14px 28px -12px rgba(28,26,61,.55), inset 0 1px 0 rgba(255,255,255,.16); transition: background .2s; }
.ng-btn:hover:not(:disabled) { background: #2c2961; }
.ng-btn--nav { padding: 10px 18px; font-size: 14px; border-radius: 12px; }
.ng-btn--sm { font-size: 13.5px; padding: 8px 14px; border-radius: 10px; background: var(--blue); box-shadow: none; }
.ng-btn--sm:hover:not(:disabled) { background: var(--blue-2); }
.ng-btn--ghost { background: var(--panel); color: var(--ink) !important; border: 1px solid var(--line); box-shadow: 0 6px 16px -12px rgba(28,26,61,.3); }
.ng-btn--ghost:hover:not(:disabled) { background: var(--soft); }
.ng-btn:disabled { opacity: .45; cursor: default; }

/* hero photo in a frame, with floating dashboard cards */
.ng-shot { position: relative; margin: clamp(48px, 6vw, 72px) auto 0; max-width: 1180px; padding: 10px; background: rgba(255,255,255,.7); border: 1px solid #fff; border-radius: 26px;
  box-shadow: 0 40px 90px -50px rgba(28,26,61,.5); text-align: left; }
.ng-shot__img { width: 100%; max-width: none; height: clamp(300px, 44vw, 560px); object-fit: cover; object-position: 50% 45%; border-radius: 18px; }
.ng-float { position: absolute; background: #fff; border-radius: 16px; box-shadow: 0 24px 50px -24px rgba(28,26,61,.45), 0 2px 6px rgba(28,26,61,.06); padding: 16px 18px; }
.ng-float--a { left: -28px; top: 18%; width: 220px; }
.ng-float__k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ng-float__v { font-size: 28px; font-weight: 600; letter-spacing: -.035em; margin-top: 2px; }
.ng-float__bars { display: flex; align-items: flex-end; gap: 5px; height: 44px; margin: 10px 0 8px; }
.ng-float__bars i { flex: 1; border-radius: 4px; background: #dcd8ff; }
.ng-float__bars i:nth-child(1) { height: 90%; } .ng-float__bars i:nth-child(2) { height: 100%; } .ng-float__bars i:nth-child(3) { height: 78%; }
.ng-float__bars i:nth-child(4) { height: 70%; } .ng-float__bars i:nth-child(5) { height: 52%; } .ng-float__bars i:nth-child(6) { height: 40%; }
.ng-float__bars i:nth-child(7) { height: 30%; background: var(--blue); }
.ng-float__s { font-size: 12.5px; color: var(--muted); }
.ng-float--b { right: -30px; top: 12%; display: flex; gap: 12px; align-items: center; padding: 14px 18px 14px 14px; }
.ng-float__ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #e3f5ec; color: var(--green); font-weight: 700; }
.ng-float__t { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.ng-float--c { right: 36px; bottom: 36px; max-width: 300px; font-size: 14.5px; line-height: 1.45; background: var(--navy); color: #fff; }
.ng-float--c a { display: inline-block; margin-top: 6px; color: #c9c4ff; font-weight: 600; text-decoration: none; }
.ng-float--c a:hover { text-decoration: underline; }
@media (max-width: 1260px) { .ng-float--a { left: 24px; } .ng-float--b { right: 24px; } }
@media (max-width: 720px) {
  .ng-shot { padding: 6px; border-radius: 20px; }
  .ng-shot__img { height: 300px; border-radius: 15px; }
  .ng-float--a { display: none; }
  .ng-float--b { right: auto; left: 16px; top: 16px; padding: 10px 14px 10px 10px; }
  .ng-float--c { position: relative; right: auto; bottom: auto; max-width: none; margin-top: 6px; border-radius: 15px; }
}

/* section heads */
.ng-sechead { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 4vw, 48px); display: flex; flex-direction: column; align-items: center; }
.ng-sechead--left { text-align: left; max-width: none; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.ng-sechead--left > div { max-width: 620px; }
.ng-sechead--left .ng-sub { max-width: 380px; margin: 0; }
.ng-label { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--muted); font-weight: 500; }
.ng-label svg { width: 15px; height: 15px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ng-h2 { margin-top: 12px; font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
.ng-sub { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 58ch; }

/* ---- app shell ---- */
.ng-stage { padding: clamp(24px, 4vw, 48px) 0 clamp(64px, 8vw, 110px); }
.ng-app { display: grid; grid-template-columns: 220px minmax(0, 1fr); background: var(--soft); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 40px 90px -50px rgba(28,26,61,.45); outline: 10px solid rgba(255,255,255,.6); overflow: hidden; }
@media (max-width: 1060px) { .ng-app { grid-template-columns: 1fr; } .ng-side { display: none; } }
.ng-side { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 16px; font-size: 14px; }
.ng-side__logo { font-weight: 700; font-size: 16px; letter-spacing: -.02em; display: flex; gap: 8px; align-items: center; }
.ng-side__logo span { color: var(--blue); }
.ng-side ul { font-size: 14px; }
.ng-side ul { margin-top: 22px; display: flex; flex-direction: column; gap: 2px; }
.ng-side li { padding: 8px 10px; border-radius: 10px; color: var(--muted); display: flex; gap: 10px; }
.ng-side li.is-on { background: var(--navy); color: #fff; box-shadow: 0 8px 18px -10px rgba(28,26,61,.7); }
.ng-rules { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 16px; }
.ng-rules__h { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ng-rules ol { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.ng-rules b { color: var(--ink); font-weight: 600; }
.ng-main { padding: clamp(14px, 2vw, 22px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.ng-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.ng-toolbar__k { font-size: 12px; color: var(--muted); font-weight: 500; }
.ng-toolbar__date { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.ng-ff { display: flex; flex-wrap: wrap; gap: 8px; }

.ng-kpis { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .ng-kpis { grid-template-columns: 1fr 1fr; } }
.ng-kpis div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.ng-kpis dt { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ng-kpis dd { margin: 4px 0 2px; font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ng-kpis small { font-size: 12px; color: var(--muted); }
.ng-kpis .is-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.ng-kpis .is-blue dt, .ng-kpis .is-blue small { color: rgba(255,255,255,.85); }

.ng-row { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ng-row--b { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 900px) { .ng-row, .ng-row--b { grid-template-columns: 1fr; } }
.ng-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ng-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.ng-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ng-h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.ng-pill { font-size: 12px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.ng-count { min-width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--soft); color: var(--muted); padding: 0 6px; }
.ng-count.is-on { background: #fdecea; color: var(--red); }

/* chart */
.ng-chart__svg { width: 100%; height: 190px; display: block; overflow: visible; }
.ng-grid-lines path { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; fill: none; vector-effect: non-scaling-stroke; }
.ng-area { fill: url(#ngArea); }
.ng-line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ng-pt { fill: #fff; stroke: var(--blue); stroke-width: 3; vector-effect: non-scaling-stroke; }
.ng-chart__axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.ng-bars { display: flex; flex-direction: column; gap: 12px; }
.ng-bars li { font-size: 13px; }
.ng-bars__top { display: flex; justify-content: space-between; gap: 8px; }
.ng-bars__top b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ng-bar { margin-top: 5px; height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.ng-bar i { display: block; height: 100%; border-radius: 999px; background: var(--blue); transition: width .5s ease; }
.ng-bars li:nth-child(2) .ng-bar i { background: #9d95ff; }
.ng-bars li:nth-child(3) .ng-bar i { background: #f0a53b; }
.ng-bars li:nth-child(4) .ng-bar i { background: #e0533f; }

/* table */
.ng-table { font-size: 14px; }
.ng-tr { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, .6fr) minmax(0, 1.5fr); gap: 10px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.ng-tr--head { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .03em; padding-top: 0; }
button.ng-tr { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 10px; font-size: 14px; transition: background .2s; }
button.ng-tr:hover { background: var(--soft); }
button.ng-tr[aria-pressed="true"] { background: var(--blue-soft); }
.ng-cust b { display: block; font-weight: 600; }
.ng-cust small { color: var(--muted); font-size: 12px; }
.ng-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.ng-age { font-variant-numeric: tabular-nums; }
.ng-age.is-late { color: var(--red); font-weight: 600; }
.ng-st { justify-self: start; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--soft); color: var(--muted); line-height: 1.35; }
.ng-st--blue { background: var(--blue-soft); color: var(--blue-2); }
.ng-st--green { background: #e3f5ec; color: var(--green); }
.ng-st--amber { background: #fff1dc; color: var(--amber); }
.ng-st--red { background: #fdecea; color: var(--red); }
.ng-tr.is-paid .ng-cust b, .ng-tr.is-paid .ng-num { color: var(--muted); }
.ng-tr.is-flash { animation: ngFlash 1.2s ease; }
@media (max-width: 640px) {
  .ng-tr--head { display: none; }
  .ng-tr { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .ng-tr .ng-cust { grid-column: 1; }
  .ng-tr .ng-num { grid-column: 2; grid-row: 1; text-align: right; }
  .ng-tr .ng-due, .ng-tr .ng-age { font-size: 12.5px; color: var(--muted); }
  .ng-tr .ng-age.is-late { color: var(--red); }
  .ng-tr .ng-st { grid-column: 1 / -1; }
}

/* preview */
.ng-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ng-tab { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); line-height: 1.25; text-align: left; }
.ng-tab small { display: block; font-size: 11px; font-weight: 500; }
.ng-tab:hover { background: var(--soft); }
.ng-tab[aria-selected="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-2); }
.ng-tab.is-sent small { color: var(--green); }
.ng-tab.is-skip small { color: var(--muted); }
.ng-mail { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ng-mail__head { background: var(--soft); padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.ng-mail__head span { color: var(--muted); }
.ng-mail__head b { font-weight: 600; color: var(--ink); }
.ng-mail__body { padding: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.ng-mail__pay { align-self: flex-start; background: var(--blue); color: #fff; border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 13px; }
.ng-mail__meta { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.ng-mail--internal { border-style: dashed; }
.ng-mail--empty { padding: 20px; color: var(--muted); text-align: center; }

/* needs Mark */
.ng-needs__list { display: flex; flex-direction: column; gap: 10px; }
.ng-needs__empty { color: var(--muted); font-size: 14px; }
.ng-need { border: 1px solid #f3c9c3; background: #fff7f5; border-radius: 12px; padding: 12px; font-size: 13.5px; animation: ngIn .35s ease both; }
.ng-need.is-done { border-color: var(--line); background: var(--soft); }
.ng-need__h { font-weight: 600; font-size: 14px; }
.ng-need p { margin-top: 4px; }
.ng-need__q { margin-top: 6px; background: #fff; border-left: 3px solid #e0533f; padding: 6px 10px; border-radius: 6px; color: var(--ink); }
.ng-need__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ng-need__acts button { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.ng-need__acts button:first-child { background: var(--navy); border-color: var(--navy); color: #fff; }
.ng-need__acts button:hover { filter: brightness(.96); }

/* log */
.ng-logbody { max-height: 360px; overflow-y: auto; scrollbar-width: thin; }
.rf-log { display: flex; flex-direction: column; }
.rf-log__empty { color: var(--muted); font-size: 14px; padding: 6px 0; }
.rf-log__item { display: grid; grid-template-columns: 50px 1fr; gap: 2px 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px;
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.rf-log__item.is-in { opacity: 1; transform: none; }
.rf-log__time { font: 500 11.5px/1.9 'JetBrains Mono', monospace; color: var(--muted); }
.rf-log__tag { grid-column: 2; justify-self: start; margin-top: 3px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: var(--blue-soft); color: var(--blue-2); }
.rf-log__item.is-done .rf-log__text::before { content: "✓ "; color: var(--green); font-weight: 700; }
.rf-log__item.is-hot .rf-log__text { color: var(--red); font-weight: 600; }

/* ---- projects ---- */
.ng-projects { padding: 0 0 clamp(64px, 8vw, 110px); }
.ng-panel { background: var(--panel); border-radius: 28px; padding: clamp(28px, 4.5vw, 64px); box-shadow: var(--shadow); }
.ng-proj { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ng-proj li { position: relative; border-radius: 18px; overflow: hidden; background: var(--soft); }
.ng-proj img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.ng-proj p { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(255,255,255,.94); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--muted); }
.ng-proj b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
@media (max-width: 960px) { .ng-proj { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ng-proj { grid-template-columns: 1fr; } .ng-proj img { aspect-ratio: 4 / 3; } }

/* ---- how ---- */
.ng-how { padding: clamp(64px, 8vw, 110px) 0; background: var(--panel); }
.ng-how__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ng-how__grid li { padding: 28px 28px 32px; border-left: 1px solid var(--line); }
.ng-how__grid li:first-child { border-left: 0; }
.ng-how__n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-2); font-weight: 600; font-size: 14px; }
.ng-how__grid h3 { margin-top: 18px; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.ng-how__grid p { margin-top: 8px; color: var(--muted); font-size: 15px; }
@media (max-width: 820px) { .ng-how__grid { grid-template-columns: 1fr; } .ng-how__grid li { border-left: 0; border-top: 1px solid var(--line); padding: 24px 4px; } .ng-how__grid li:first-child { border-top: 0; } }
.ng-tools { margin-top: clamp(40px, 5vw, 64px); text-align: center; }
.ng-tools p { font-size: 13.5px; color: var(--muted); }
.ng-tools ul { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px clamp(24px, 4vw, 56px); }
.ng-tools li { font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -.03em; color: #a6a4bd; }

@keyframes ngIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes ngFlash { 0% { background: var(--blue-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .demo--invoice-chasing *, .demo--invoice-chasing *::before { animation: none !important; transition: none !important; }
}
@media (max-width: 900px) {
  .ng-row--b { display: flex; flex-direction: column; }
  .ng-row--b > .ng-col { display: contents; }
  .ng-needs { order: -1; }
}
.ng-logo, .ng-btn--nav { white-space: nowrap; }
@media (max-width: 420px) { .ng-nav { padding: 8px 8px 8px 12px; gap: 10px; } .ng-logo { font-size: 15.5px; } .ng-btn--nav { padding: 9px 13px; font-size: 13.5px; } .ng-app { outline-width: 6px; } }
