/* Demo world (app demoworld): the bar «Demo · <Branche> · <Firma> – Branche wechseln» on top of every page while a
   fictitious demo company is shown, the industry list on the login page and the pages «Branche wählen» and
   «Demo-Daten laden». CI v2: existing tokens only (warn colours as the prototype banner), no new colours. */
:root { --demo-bar-h: 2.1rem; }
.demo-bar { position: sticky; top: 0; z-index: 40; box-sizing: border-box; height: var(--demo-bar-h);
  display: flex; align-items: center; gap: .25rem; padding: 0 16px; background: var(--warn-bg); color: var(--warn);
  border-bottom: 1px solid var(--warn-line); font-size: .85rem; white-space: nowrap; }
.demo-bar-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.demo-bar-switch { flex: none; }
.demo-bar a { color: inherit; font-weight: 650; }
.demo-bar-note { margin-left: auto; padding-left: 1rem; flex: none; }
.demo-bar-form { flex: 0 1 auto; min-width: 0; margin: 0 0 0 .5rem; display: flex; gap: .35rem; align-items: center; }
.demo-bar-form select { max-width: 22rem; min-width: 0; height: 1.6rem; padding: 0 .4rem; font-size: .8rem;
  color: var(--ink); background: var(--card); border: 1px solid var(--warn-line); border-radius: 6px; }
.has-demo-bar .sidebar { top: var(--demo-bar-h); height: calc(100vh - var(--demo-bar-h)); }
.spend-cockpit-page.has-demo-bar .shell-main { height: auto; min-height: calc(100vh - var(--demo-bar-h)); }   /* U36: one scroll area */
@media (max-width: 760px) { .demo-bar-note { display: none; } .demo-bar-form select { max-width: 11rem; } }
/* T14 (C4, Prüfer U 06.10.2026): on a phone the bar never cuts the company name with «…» («Pharma & Life Scienc…») –
   it wraps to a second line; its height (--demo-bar-h, used by the menu below it) follows the bar (_bar.html) */
@media (max-width: 760px) {
  .demo-bar { height: auto; min-height: var(--demo-bar-h); flex-wrap: wrap; white-space: normal; padding: .25rem 12px;
    line-height: 1.3; row-gap: .1rem; }
  .demo-bar-text { overflow: visible; text-overflow: clip; }
}
@media print { .demo-bar { position: static; } }

/* Login page: which industries the demo shows (no data, no numbers) */
.demo-industries { margin-top: 1.25rem; }
.demo-industries h2 { font-size: 1rem; margin: 0 0 .25rem; }
.demo-industries ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .45rem; }
.demo-industries li { display: grid; gap: .05rem; border-top: 1px solid var(--line); padding-top: .4rem; font-size: .85rem; }
.demo-industries .demo-ind { font-weight: 650; color: var(--ink); }

/* «Branche wählen» */
.demo-tiles .suite-tile { gap: .55rem; }
.demo-tile-head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.demo-tile-head h2 { font-size: 1.05rem; margin: 0; }
.demo-tile .demo-firm { font-weight: 650; margin: 0; }
.demo-tile .demo-mods { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.demo-tile .demo-mods li { font-size: .78rem; padding: .1rem .5rem; border-radius: 99px; border: 1px solid var(--line); }
.demo-tile .demo-mods li.is-locked { color: var(--muted); border-style: dashed; }
.demo-tile .demo-hints { margin: 0; padding-left: 1rem; font-size: .8rem; color: var(--muted); }
.demo-tile form { margin-top: auto; }
.demo-tile.is-current { box-shadow: inset 0 0 0 2px var(--brand); }

/* «Demo-Daten laden» */
.demo-load-state.is-busy { color: var(--warn); }
.demo-load-state.is-error { color: var(--bad); }
.demo-load-state.is-done { color: var(--ok); }

/* Nachtrag 05.10.2026 Teil 5 (R7): public page «Demo: diese Branchen können Sie anschauen» next to the login hero */
.demo-public h2 { font-size: 1.15rem; margin: 0 0 .35rem; }
.demo-public-list { list-style: none; margin: .25rem 0 .75rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr;
  gap: .35rem .9rem; }
.demo-public-list li { display: grid; gap: .05rem; border-top: 1px solid var(--line); padding-top: .35rem; font-size: .82rem;
  min-width: 0; }
.demo-public-list .demo-ind { font-weight: 650; color: var(--ink); }
.demo-public-list .demo-co { color: var(--muted); }
.demo-public-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 .75rem; }
@media (max-width: 480px) { .demo-public-list { grid-template-columns: 1fr; } }

/* Teil 11 Punkt 6 (B35, R8): «Beispiel durchspielen» – the paths as tiles, the guide bar at the bottom */
.demo-example-steps { list-style: none; margin: .25rem 0 .75rem; padding: 0; display: grid; gap: .45rem; counter-reset: step; }
.demo-example-steps li { display: grid; gap: .1rem; padding-left: .75rem; border-left: 3px solid var(--line); }
.demo-example-steps li.mod-spend { border-left-color: var(--pv-mod-spend-600); }
.demo-example-steps li.mod-source { border-left-color: var(--pv-mod-source-600); }
.demo-example-steps li.mod-contract { border-left-color: var(--pv-mod-contract-600); }
.demo-example-steps li.mod-margin { border-left-color: var(--pv-mod-margin-600); }
.demo-guide { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; flex-wrap: wrap; align-items: center;
  gap: .4rem .9rem; padding: .5rem 16px; background: var(--card); border-top: 2px solid var(--warn-line);
  box-shadow: 0 -6px 18px color-mix(in srgb, var(--pv-ink-900) 12%, transparent); font-size: .85rem; }
.demo-guide-head { flex: 1 1 100%; }
.demo-guide-steps { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.demo-guide-steps a { display: inline-block; padding: .15rem .55rem; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); }
.demo-guide-steps .is-current a { border-color: var(--warn-line); background: var(--warn-bg); font-weight: 650; }
.demo-guide-steps .is-done a { color: var(--muted); }
.demo-guide-text { flex: 1 1 18rem; min-width: 0; color: var(--muted); }
.demo-guide-nav { display: flex; gap: .35rem; flex-wrap: wrap; }
.has-demo-guide { padding-bottom: 7.5rem; }
@media (max-width: 640px) {   /* phones: the steps in one row (scrolls sideways), the text at most two lines */
  .has-demo-guide { padding-bottom: 10rem; }
  .demo-guide { gap: .35rem .5rem; }
  .demo-guide-steps { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .demo-guide-steps a { white-space: nowrap; }
  .demo-guide-text { flex-basis: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; }
}
@media print { .demo-guide { display: none; } }


/* K-L9 (Klicktest 04.10.2026 «noch kompakter»; C2b 06.10.2026: always ONE line per company, 12 companies fit 1366×768):
   industry | company · place | module chips | Mehr | button; «Mehr» opens a box under the row (no row grows). */
.demo-choose { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); }
.demo-row { position: relative; display: grid; grid-template-columns: minmax(9rem, 15rem) minmax(8rem, 1fr) auto auto 6.2rem;
  gap: 0 .9rem; align-items: center; padding: .3rem .85rem; min-height: 2.6rem; border-top: 1px solid var(--line); }
.demo-row:first-child { border-top: 0; }
.demo-row.is-current { box-shadow: inset 3px 0 0 var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.demo-row-ind, .demo-row-firm { min-width: 0; line-height: 1.25; }   /* T14/K-L9: names wrap, never «…» */
.demo-row-ind { font-size: .92rem; }
.demo-row-firm { font-size: .88rem; }
.demo-row-place { color: var(--muted); font-size: .8rem; }
.demo-row .demo-mods { display: flex; flex-wrap: nowrap; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.demo-row .demo-mods li { font-size: max(var(--pv-text-min), .74rem); padding: .05rem .45rem; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.demo-row .demo-mods li.is-locked, .demo-row .demo-mods li.is-empty { color: var(--muted); border-style: dashed; }
.demo-row-go { justify-self: end; }
.demo-row-go form { margin: 0; }
.demo-row-more { font-size: .82rem; }
.demo-row-more > summary { cursor: pointer; color: var(--muted); white-space: nowrap; min-height: 24px; display: flex; align-items: center; }
.demo-row-pop { position: absolute; z-index: 20; left: .85rem; right: .85rem; top: 100%; padding: .5rem .75rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.demo-row-pop p, .demo-row-pop ul { margin: .2rem 0; }
@media (max-width: 1100px) { .demo-row-place { display: none; } }
@media (max-width: 760px) {
  .demo-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ind go" "firm go" "mods more";
    gap: .15rem .6rem; padding: .45rem .75rem; }
  .demo-row-ind { grid-area: ind; } .demo-row-firm { grid-area: firm; }
  .demo-row-go { grid-area: go; }
  .demo-row .demo-mods { grid-area: mods; flex-wrap: wrap; }
  .demo-row .demo-mods:empty { display: none; }
  .demo-row-more { grid-area: more; justify-self: end; align-self: end; }
}

/* K-07 (F-1 Daniel): «Rolle wählen» for Rheinvalor admins and «Zurück als Rheinvalor-Admin» in the bar */
.demo-bar-role select { max-width: 11rem; }
.demo-bar-role, .demo-bar-back { flex: none; }   /* only the company name gives way («…») */
.demo-bar-back .btn { height: 1.6rem; min-height: 0; padding: 0 .55rem; font-size: .8rem; white-space: nowrap; }
.demo-bar-as { white-space: nowrap; }
/* touch devices (tablet, phone): lists and buttons have 44 px (app.css, pointer coarse) - the bar grows with them
   (its height is measured by _bar.html) */
@media (pointer: coarse) {
  .demo-bar { height: auto; min-height: var(--demo-bar-h); flex-wrap: wrap; white-space: normal; row-gap: .15rem;
    padding-top: .2rem; padding-bottom: .2rem; }
  .demo-bar-form select, .demo-bar-back .btn { min-height: 44px; height: auto; }
}

/* K-01 (F-1/F-12 Daniel): no uploads and imports in the demo companies - menu note and switched-off file fields */
.side-demo-off { display: block; font-size: max(var(--pv-text-min), .72rem); font-weight: 400; line-height: 1.2; color: var(--pv-muted-dark);
  white-space: normal; }
.side-nav a:has(.side-demo-off) { flex-wrap: wrap; row-gap: 0; }
.side-nav a .side-demo-off { flex-basis: 100%; padding-left: 1.7rem; }
.side-foot-links .side-link:has(.side-demo-off) { flex-wrap: wrap; }
.side-foot-links .side-demo-off { flex-basis: 100%; }
.side-collapsed .side-demo-off { display: none; }
.is-demo-off, .is-demo-off * { cursor: not-allowed; }
.pv-file.is-demo-off, input.is-demo-off, button.is-demo-off, .dropzone.is-demo-off > :not(.demo-off-note) { opacity: .55; }
.demo-off-note { margin: .25rem 0 .5rem; }
/* K-07: with «Rolle wählen» or «Zurück als Rheinvalor-Admin» the note «Demo – alle Daten fiktiv» (also in the tooltip
   of the bar) makes room on narrower screens instead of covering the button */
@media (max-width: 1280px) { .demo-bar:has(.demo-bar-role, .demo-bar-back) .demo-bar-note { display: none; } }
