/* ============================================================================
   app.css — application shell of the DokuFlow admin console
   Location: DokuFlow.Web/DokuFlow.Web/wwwroot/app.css
   Replaces the template file of the same name COMPLETELY.

   Order of the stylesheets in Components/App.razor (mandatory):
     1. carelogic/phosphor/duotone/style.css  icon font Phosphor Duotone (unchanged copy, W6)
     2. carelogic/carelogic-tokens.css        style guide tokens and Open Sans (unchanged copy)
     3. carelogic/carelogic-controls.css      style guide controls, shared part (unchanged copy, W5)
     4. carelogic/carelogic-app.css           style guide, app variant (unchanged copy, W5)
     5. app.css                               this file (W12: the alias layer css/tokens.css is gone;
                                              the project reads --cl-* directly)

   The style guide files come first, so that this file can ADD to a control where it has to
   (rule 5) but never has to fight it. Its controls hang on cl- classes without the project infix
   (cl-btn, cl-card, cl-pill …); the blocks of this file carry cl-df- and are not touched by them
   (StyleguideCollisionTests). The base rules of the guide hang on body.cl-app, set in App.razor
   since W9 (font, color, ground, focus ring, link decoration of the whole page).

   No vendor theme any more (slice 1e): until then blazing-berry brought a whole
   Bootstrap 5 underneath this file. What of it the UI relied on now lives in
   section 2 (BASICS). There is no CSS isolation either — no .razor.css, so no
   scoped bundle to load.

   Rule for every extension of this file: no fixed color, radius or
   shadow values in rule bodies. If a value is missing, it becomes a token in
   section 1 — nowhere else. A project token never merely passes a --cl-* on: use the
   --cl-* itself (CarelogicTokenRulesTests, TheProjectHasNoTokenThatOnlyPassesOnAStyleGuideToken).
   ============================================================================ */

/* The four files above are linked in App.razor BEFORE this file — that way all are fingerprinted
   and the extra request of an @import goes away. */

/* ============================================================================
   1. SUPPLEMENTARY TOKENS
   Tokens of the project that the style guide (--cl-*) has no counterpart for. Literals appear
   only here. What the guide has is read as --cl-* directly (W12 dissolved the alias layer).
   ============================================================================ */
:root {
  /* Border: in dark mode --cl-stroke reaches only 1.49:1 against --cl-surface.
     Instead of doubling every rule, there is ONE border token. */
  --border: var(--cl-stroke);

  /* --r-s has no counterpart in the style guide: the small radius inside a card (8px; the label
     radius of the guide is 4px). */
  --r-s: 8px;

  /* Scrim behind a dialog. */
  --scrim: rgba(16, 20, 24, .20);

  /* Focus ring of the base rule (section 2); the colour is --cl-brand (6.13:1 on white, 6.59:1 on the
     dark surface). */
  --focus-width:  3px;
  --focus-offset: 2px;

  /* Loading states (Docs/Loading-Konzept.md): below the delay nothing is shown. */
  --load-delay:      400ms;
  --skeleton-hl:     var(--cl-surface);

  /* Shade over the sign-in photo instead of the guide's blue tint (12.6b): neutral, only at the top
     (app mark) and the bottom (claim, points), so the photo keeps its own colours in between. */
  --sign-in-photo-shade:
    linear-gradient(to bottom, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(to top, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .3) 38%, rgba(0, 0, 0, 0) 60%);


  /* Dimensions */
  --ctrl-h-sm:     40px;
  --pad-menu:       8px;
  --ctrl-h-s:      36px;   /* Filter field */
  --btn-h-sm:      32px;
  /* Shell (W9, ADR 0002, 10.3). The window is the guide's fixed .cl-shell; the page has no width cap any
     more (the former 1480 px of the main) and its padding is that of .cl-scroll. */
  --rail-w:            220px;  /* the rail beside the page (cl-df-rail) */
  --page-end-room:         46px;  /* spacer after the content of a page: the guide's toasts stand 26 px above the
                                  window edge and ~50 px high; with the 26 px of .cl-scroll (22 px below 820 px)
                                  that is the 72 px the former main kept free at the bottom */
  --search-w:          clamp(220px, 27vw, 340px);  /* Lookup in the app bar (P3: about 340 px, narrower between 1181 and ~1260 px so the four areas and the
                                  tenant pill still fit); folds into its icon up to and including 1180 px and opens to this width */
  --search-popover-w:  min(480px, calc(100vw - 24px));  /* The lookup's panel: the chips and a hit row need more than the field */
  --appbar-h-compact:   52px;  /* the guide's bar height below 820 px (carelogic-app.css, A17); only the lookup's
                                  panel needs it for its fixed position */
  --tab-h:             48px;   /* Tab of a tab bar */

  /* Lists (section 18). Since W7e the row and the head are those of the guide's table.cl-grid:
     13px text with 10px above and below, 10.5px capitals with 9px — the tokens follow them for the
     height cap of the frame and the skeleton, they size nothing of the table itself. A row with an
     avatar is taller (--row-h-avatar); the skeleton of such a list takes that height, the cap then
     shows a few rows fewer. */
  --row-h:              38px;   /* Row of the guide's table, without its line */
  --table-header-h:     33px;   /* Head of the guide's table, with its line */
  --dash-devices-min-h: calc(6 * (var(--row-h) + 1px) + var(--table-header-h) + 120px);   /* Overview device card at least: head, six rows, pager (section 19.4) */
  --compact-input-h:    30px;   /* Compact control of a table row: the guide's .cl-btn.cl-sm beside it */
  --row-h-avatar:       calc(var(--row-avatar) + 20px);   /* Row with an avatar: the guide's 10px cell padding above and below */
  /* Horizontal padding in cell, pager, tab bar and form footer: since W7d the padding of the
     guide's card head and body (.cl-card-h, .cl-card-b: 15px), so that a column, a tab and the
     card title stand on one line. */
  --card-pad-x:        15px;
  --column-max:         280px;  /* beyond this a single-line cell truncates with an ellipsis */
  /* Quicklinks (section 26). --ql-tile-min is the narrowest tile: below twice that
     value only one column remains. --ql-main-min says from which width the text block of a
     manage row stays beside its buttons. */
  --ql-tile-min:      200px;  /* narrowest tile of the overview */
  --ql-tile-h:         64px;  /* minimum height of a tile, including the placeholder */
  --ql-main-min:      240px;  /* text block of a manage row */

  --row-avatar:       36px;   /* Avatar in a list row */
  --detail-avatar:    48px;   /* Avatar in the header of a detail page */
  --timeline-marker:  30px;   /* Round marker of a timeline entry */
  --tile-preview-h:   150px;  /* Preview area of a document tile */
  --tile-plate:        96px;  /* Type-coloured plate inside that preview area */
  --tile-icon:         56px;  /* The symbol on the plate */
  --tile-doc-min:     220px;  /* Narrowest document tile: "Beschreibung" and a date side by side in its facts table */
  --skeleton-bar:     10px;   /* Height of a placeholder bar in the table skeleton */
  --skeleton-row:     34px;   /* Height of a placeholder row in the lookup's panel (a hit: two lines of text) */
  --tracking-caps:    .06em;  /* Uppercase labels in the table header */
  --tracking-title:   .08em;  /* Group titles of the sub navigation */
  --opacity-muted: .45;   /* disabled compact controls, rows being reloaded */

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 6px;  --sp-3: 9px;  --sp-4: 11px;
  --sp-5: 14px; --sp-6: 18px; --sp-7: 22px; --sp-8: 26px;

  /* Hit list of the header search. Off the spacing scale on purpose: the horizontal padding of a
     hit also sets the indent of its group heading, so both have to come from ONE value - and the
     two gaps sit below --sp-1, because rows of a result list stand closer than page elements. */
  --pad-hit-x:     10px;
  --gap-hit:        2px;
  --gap-hit-line:   1px;

  /* Radii below the Rd scale */
  --r-item: 8px;   /* Menu item, sub item, avatar square */
  --r-avatar: 10px; /* Avatar in a list row */

  /* Font sizes the style guide has no token for. --fs-body stays 14px: the guide's app base is 14px
     (body.cl-app in carelogic-controls.css, a literal); --cl-fs-text (15px) is its running text on
     pages outside the app and would enlarge every page beyond the guide's own controls. --fs-h3
     (15px, card and empty state titles) stays on purpose: it equals the card title of the guide
     (.cl-card-h h2, 15px literal); --cl-fs-h3 (18px) is the dialog and toolbar title. */
  --fs-body:      14px;
  --fs-chip:      12.5px;
  --fs-tile-title: 12px;
  --fs-label:     11px;
  --fs-caption:   10.5px;
  --fs-badge:     10px;
  --fs-h2:        19px;
  --fs-h3:        15px;   /* Title of the empty state */
  --fs-brand:     16px;
  --fs-nav:       13.5px;
  --fs-avatar:    11.5px;

  /* Motion */
  --duration-fast: 150ms;
  --duration-medium:  180ms;

  /* Layers */
  --z-popup:      40;
  --z-error-ui:   2100;   /* #blazor-error-ui above the guide's toast stack (.cl-toasts, z-index 2000) */
  --z-skip-link:     100;

  color-scheme: light;
}

/* Dark: the class cl-dark on <html>, set by carelogic-theme.js. Only what has no dark value in the
   style guide; every --cl-* follows .cl-dark of carelogic-tokens.css by itself. */
:root.cl-dark {
  --scrim:         rgba(0, 0, 0, .45);
  --skeleton-hl:   var(--cl-stroke-2);
  --border:        var(--cl-stroke-2);
  color-scheme: dark;
}

/* The ONE gap of a page head with a tool row (section 7): title - search - chips - content. It is the top padding of
   the guide's .cl-scroll (18 px; 14 px up to 820 px, set in section 16), the one gap the head cannot change; the
   others are brought to it. */
:root { --pagehead-gap: var(--sp-6); }

/* ============================================================================
   2. BASICS
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }

/* Focus ring. First in the rules on purpose (it used to stand in tokens.css, loaded before this file):
   at equal weight the deviations below win. Not on the field control of the style guide (W7c): .cl-inp
   brings its focus itself (frame and glow on the field surface). :where keeps the weight of a bare
   :focus-visible (0,1,0), so that the rules that adjust or drop the ring (h1:focus, .cl-df-…:focus-visible)
   still win. */
:focus-visible:where(:not(.cl-inp)) {
  outline: var(--focus-width) solid var(--cl-brand);
  outline-offset: var(--focus-offset);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

html { -webkit-text-size-adjust: 100%; height: 100%; }

/* The fixed window of W9 fills the body, and the body fills the window: .cl-shell is height: 100%. dvh
   and not vh: on iPad Safari 100vh includes the address bar, and the tab bar at the bottom would
   reach below the visible edge. 100% first, for a browser without dvh. Font, color and ground of the
   page come from body.cl-app of the guide (carelogic-controls.css, section 1); the pages without a
   shell (EmptyLayout: sign-in, error pages) hold their page in a .cl-shell of their own since W10; no
   overflow is set here - .cl-shell clips itself. */
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  /* Without it, iPad Safari lays a grey flash over every tapped link and button. */
  -webkit-tap-highlight-color: transparent;
}

/* What Bootstrap's Reboot (inside the blazing-berry theme) supplied until slice 1e and the UI
   relied on. Found by rendering pages with and without the theme and comparing the computed
   styles of every element; the rest of Reboot either matched the rules of this section already
   or had no visible effect (zero-width table borders, appearance of styled buttons). */

/* A hidden element stays hidden even where a class of ours sets display — the account tabs
   are hidden that way instead of being removed (AccountForm). */
[hidden] { display: none !important; }

/* Every enabled button shows the hand, also when it carries .cl-df-table-text (cursor: text). A button locked only by aria-disabled (it stays focusable to read
   out why) keeps the cursor of .cl-btn.cl-off; :not() with a list keeps the former weight. */
button:not(:disabled, [aria-disabled="true"]), [type="button"]:not(:disabled, [aria-disabled="true"]),
[type="reset"]:not(:disabled, [aria-disabled="true"]), [type="submit"]:not(:disabled, [aria-disabled="true"]),
[role="button"]:not([aria-disabled="true"]) { cursor: pointer; }

/* The header search keeps its own look instead of the browser's search field. */
[type="search"] { -webkit-appearance: textfield; appearance: textfield; outline-offset: -2px; }
::-webkit-search-decoration { -webkit-appearance: none; }

/* The button inside a file input (cover sheet, template file) speaks the page's font. */
::file-selector-button { font: inherit; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; }

ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

a { color: var(--cl-brand); text-decoration: none; }
/* Only the running-text link is underlined on hover: an anchor WITHOUT a class. Every class names a block
   that decides its look itself - the guide's links (.cl-appbrand, .cl-iconbtn, .cl-btn, .cl-dtile) set
   text-decoration: none, and a rule here that outweighed them would restyle the guide's controls (rule 5).
   "No class" is not enough on its own: some blocks of the guide style the links INSIDE them, and those
   links carry no class (an inactive area in .cl-nav and .cl-tabbar, an entry of .cl-usermenu-list). At
   (0,2,1) this rule outweighed their text-decoration: none and underlined icon and label on hover, where
   the guide gives a background and never a line. So the anchors of exactly those blocks are left out -
   the list is the guide's, StylesheetTests reads it from the copies. The rule therefore stays "these" and
   not "all but these": running text, plus the two project links that have a class and were underlined on
   purpose (the target of a table row, the title of a manage row). */
a:not([class]):not(:is(.cl-nav, .cl-tabbar, .cl-usermenu-list, .cl-seg, .cl-auth-brandfoot) a):hover,
a.cl-df-table-target:hover,
a.cl-df-quicklink-row-title:hover { text-decoration: underline; }

/* margin: 0 — Safari gives buttons and fields a 2px margin of its own. */
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }

/* The open list of a native select. Chromium paints it in the select's background, and where that is
   transparent it paints white, whatever the color-scheme says. The guide's field is transparent (its
   surface is the <label> around it, .cl-field .cl-inp), and the text keeps the select's colour: in dark
   mode --cl-ink on white, unreadable (assignee switch, 18.11.2026). So the options carry the surface
   themselves - the one the field takes on focus. The text stays inherited, so a disabled option keeps
   the browser's muted colour. Firefox honours the same rule; Safari draws its own menu in the
   color-scheme. Belongs in the guide (a Merge Request for select.cl-inp); until then it lives here. */
option { background-color: var(--cl-surface); }

img, svg, video { max-width: 100%; }

/* Images sit in the middle of their line, like the icons. */
img { vertical-align: middle; }

/* Icons (W6): Phosphor Duotone as a font, <i class="ph-duotone ph-… cl-df-icon"> from
   Ui/Icons/Icon.razor. app.css never styles the font's own classes (rule 5); it sizes the icons
   through the project class cl-df-icon. carelogic-controls.css gives every .ph-duotone 17px and
   vertical-align -.14em; until the controls of the guide take over (W7), our icons keep the size
   and line position of the former inline SVGs (24 viewBox at 15px -> font-size 15px). The blocks
   below set their own size; the controls of the guide (.cl-btn .ph-duotone, 0,2,0) outweigh this
   rule (0,1,0). Icon class rules of blocks must stand after this one (equal weight). */
.cl-df-icon { vertical-align: middle; font-size: 15px; }

code, kbd, pre, samp { font-family: var(--cl-mono); }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-3) 0; }

/* Focus. The base rule stands at the top of this section (:focus-visible, 3px --cl-brand).
   Only what deviates from it on colored surfaces goes here. */
:focus:not(:focus-visible) { outline: none; }
h1:focus, [tabindex="-1"]:focus { outline: none; }

/* Scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--cl-stroke-2); border-radius: var(--r-item); }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-color: var(--cl-stroke-2) transparent; scrollbar-width: thin; }

/* Visible to assistive technology only */
.cl-df-sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Numbers in fixed-width type (order, customer, aid numbers): digits line up and 0/O, 1/l differ.
   Merge-Request-Kandidat Styleguide: .cl-mono is taken twice there (controls: the fixed-width type,
   app: the monogram tile of the overview), so neither can be used for this. Until the guide
   separates them, this class. Only created in P2a; the existing places follow in P2b. */
.cl-df-num { font-family: var(--cl-mono); font-size: var(--fs-chip); letter-spacing: .02em; }

/* Skip link. Not present in the mockups, mandatory here. */
.cl-df-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-skip-link);
  background: var(--cl-surface); color: var(--cl-ink);
  padding: 10px 16px; border-radius: var(--cl-r-ctrl);
  box-shadow: var(--cl-sh-pop); font-weight: 600; text-decoration: none;
}
.cl-df-skip-link:focus { left: 12px; top: 12px; }

/* ============================================================================
   3. WORK AREA
   The fixed window (W9, ADR 0002, 10.3) is the guide's: .cl-shell > .cl-appbar + .cl-view + .cl-tabbar,
   only .cl-scroll rolls. These are the project's parts inside .cl-view: the work area, a grid that the
   rail and what the page brings (tool bar, scroll area) share, the target of the skip link and the
   spacer behind the page.

   No rule of this file acts on .cl-scroll (StyleguideCollisionTests): page head and scroll area are not
   placed by a rule but by the ORDER in which they arrive. Only the rail gets a position; page head and
   scroll area fill the cells that remain, and the number of rows says whether there is a page head.
   ============================================================================ */
.cl-df-work-area {
  flex: 1; min-width: 0; min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* A page without a page head (loading and error states, the 404 page): the scroll area alone. */
  grid-template-rows: minmax(0, 1fr);
}
/* The usual page: the page head takes its own height, the scroll area the rest and rolls inside it.
   The page head is only the CONDITION here; the rule acts on the work area. */
.cl-df-work-area:has(> .cl-df-pagehead) { grid-template-rows: auto minmax(0, 1fr); }

/* With a rail the first column is the rail, spanning every row; the others take column two by order.
   Below 820 px section 16 turns it into a strip. */
.cl-df-work-area.cl-df-has-rail { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.cl-df-has-rail > .cl-df-rail { grid-column: 1; grid-row: 1 / -1; }

/* Target of the skip link and of the focus after the last toast. Not a cell of the grid: absolutely
   positioned children take no part in the placement (AppShell.razor says why it is a span of its own). */
.cl-df-content-start { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Room after the content of a page for a toast, see --page-end-room. */
.cl-df-scroll-end { height: var(--page-end-room); }

/* ============================================================================
   4. RAIL (SUB NAVIGATION)
   The sub navigation of the active area beside the page: groups with an uppercase title, entries,
   count of the active entry (outlet), footer with the version. ADR 0002, 10.4: H1 = U1, the mockup's
   column (docs/mockups/wm). Not in the style guide (merge request candidate): the app variant has no
   column beside the content. Below 820 px a strip under the tool bar - section 16.
   ============================================================================ */
.cl-df-rail {
  display: flex; flex-direction: column;
  padding: var(--sp-6) 12px var(--sp-5);
  overflow-y: auto;
  background: var(--cl-rail);
  border-right: 1px solid var(--border);
}

.cl-df-rail-group { margin-bottom: var(--sp-6); }
/* minmax(0, 1fr): a long entry (category name) must not widen the track beyond the column — it is
   cut with an ellipsis instead, and the count and the frame of the active entry stay visible. */
.cl-df-rail-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }

.cl-df-rail-label {
  padding: 0 10px var(--sp-2);
  font-size: var(--fs-label); font-weight: 700;
  letter-spacing: var(--tracking-title); text-transform: uppercase;
  color: var(--cl-ink-2);
}

.cl-df-rail-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: var(--ctrl-h-sm); padding: 0 10px;
  border: 0; border-radius: var(--cl-r-ctrl);
  background: transparent; text-align: left;
  color: var(--cl-ink-2); font-size: var(--cl-fs-small); font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.cl-df-rail-item:hover { background: var(--cl-fill); text-decoration: none; }
.cl-df-rail-item:focus-visible { outline-offset: calc(var(--focus-offset) * -1); }
.cl-df-rail-item > .cl-df-icon { font-size: 16px; color: var(--cl-ink-3); }
.cl-df-rail-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Active like an area in the bar (.cl-nav a.cl-on): soft brand ground and brand ink, icon and count
   with it. The ground is a second cue besides the ink (the former surface-frame-shadow is gone, the
   guide's bar uses none of the three); aria-current="page" carries the state for assistive technology. */
.cl-df-rail-item.cl-on { background: var(--cl-brand-soft); color: var(--cl-brand); }
.cl-df-rail-item.cl-on > .cl-df-icon,
.cl-df-rail-item.cl-on .cl-df-rail-count { color: var(--cl-brand); }

.cl-df-rail-count {
  margin-left: auto; flex: none;
  font-size: var(--fs-tile-title); font-weight: 600; color: var(--cl-ink-2);
  font-variant-numeric: tabular-nums;
}

.cl-df-rail-footer {
  margin-top: auto; padding: 12px 10px 0;
  font-size: var(--fs-caption); line-height: 1.6; color: var(--cl-ink-2);
}
.cl-df-rail-footer span { display: block; }

/* ============================================================================
   5. ACCOUNT MENU
   Gone with W9: the account menu is the guide's .cl-usermenu with button.cl-av, .cl-usermenu-list and
   .cl-menucatch (carelogic-controls.css, section 4; carelogic-app.css, A2). The project adds nothing
   to it. See UserMenu.razor.
   ============================================================================ */

/* ============================================================================
   6. APP BAR
   The bar itself is the guide's: .cl-appbar > .cl-appbrand, .cl-appsep, .cl-nav, .cl-appact (A2), its
   links and the account menu included. What follows belongs to what the project puts into .cl-appact:
   the account menu as tenant pill (D14, section 6.1) and the lookup.
   ============================================================================ */

/* --- 6.1 Tenant pill (P3, D14) --------------------------------------------------
   The trigger of the account menu in the guide's tenant pill: user name over company name on the left,
   the user's initials in the circle (.cl-av) on the right. A 1:1 copy of the guide's .cl-tenant rules, with
   the same tokens - the guide keeps them only in carelogic-intern.css, which the app variant does not load.
   Merge-Request-Kandidat Styleguide: `.cl-tenant` aus intern in controls verschieben, damit app und intern
   sie teilen. Then these rules go and the block name changes.
   Long names are cut with an ellipsis. Below 1180 px only the circle remains (section 16); the name stays
   in the aria-label and the title. */
.cl-df-tenant {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding: 4px 5px 4px 12px;
  border: 1px solid var(--cl-stroke); border-radius: var(--cl-r-pill);
  background: var(--cl-fill);
  font-family: var(--cl-font); text-align: left; cursor: pointer;
  min-width: 0; max-width: 60vw;
}
.cl-df-tenant:hover { border-color: var(--cl-stroke-2); }
.cl-df-tenant > span:first-child { min-width: 0; }
.cl-df-tenant .cl-tn {
  display: block; font: 700 12.5px/1.25 var(--cl-font); color: var(--cl-ink);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.cl-df-tenant .cl-tk {
  display: block; font: 400 10.5px var(--cl-font); color: var(--cl-ink-3);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}

/* --- 6.2 The lookup (W9 form, back with the withdrawal of H3; the guide's .cl-search since P3) --------
   The field is the guide's .cl-search (border, radius, and the focus ring on the whole label via
   :focus-within); the project adds only what it has no counterpart for: the width, and the folding below
   1180 px (section 16). The input carries NO border, background or outline of its own - the guide switches
   its focus outline off for the input of a .cl-search; a rule of ours that gave the input a frame would
   bring back the second ring inside the first (StyleguideFieldTests.TheLookupHasOneFocusRingOnTheOuterField). */
.cl-df-header-search { flex: none; width: var(--search-w); min-width: 0; cursor: text; }
/* --cl-ink-2 and not --cl-ink-3: the placeholder says what the field looks up, and --cl-ink-3 is
   decoration only. The two classes outweigh the guide's .cl-search input::placeholder. */
.cl-df-header-search .cl-df-header-search-input::placeholder { color: var(--cl-ink-2); opacity: 1; }

/* The X of the browser's own search field differs per browser and sits next to our clear button. */
.cl-df-header-search-input::-webkit-search-cancel-button { display: none; }

.cl-df-header-search-clear {
  display: grid; place-items: center;
  width: 18px; height: 18px; flex: none;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--cl-ink-3); cursor: pointer;
}
.cl-df-header-search-clear:hover { background: var(--cl-fill-2); color: var(--cl-ink); }

/* The key hint: the shortcut as the visitor's system writes it. */
.cl-df-kbd {
  flex: none; padding: 1px var(--sp-2);
  border: 1px solid var(--border); border-radius: var(--cl-r-label);
  background: var(--cl-fill);
  font-size: var(--fs-label); font-weight: 600; font-family: var(--cl-font); color: var(--cl-ink-3); white-space: nowrap;
}

/* --- 6.2b Lookup popover -------------------------------------------------- */
.cl-df-header-search-area { position: relative; flex: none; }

.cl-df-header-search-popover {
  position: absolute; top: calc(100% + var(--sp-2)); right: 0;
  width: var(--search-popover-w);
  max-height: 60vh; overflow-y: auto;
  background: var(--cl-surface);
  border: 1px solid var(--border);
  border-radius: var(--cl-r-card);
  box-shadow: var(--cl-sh-pop);
  padding: var(--pad-menu);
  z-index: var(--z-popup);
}

/* The chips are the guide's, untouched (.cl-chiprow with .cl-chip inside, which the guide spaces and sizes
   itself); this block only holds the row in the panel. */
.cl-df-header-search-targets { display: block; }

.cl-df-header-search-extra { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.cl-df-header-search-extra-label { font-size: var(--fs-chip); font-weight: 600; color: var(--cl-ink-2); flex: none; }
.cl-df-header-search-extra-field {
  width: 90px; height: var(--ctrl-h-s); padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-s);
  background: var(--cl-surface); color: var(--cl-ink); font-size: var(--cl-fs-small);
}


.cl-df-header-search-result { margin-top: var(--sp-3); }

.cl-df-header-search-hint { margin: 0; font-size: var(--fs-chip); color: var(--cl-ink-2); }
.cl-df-header-search-hint.cl-error { color: var(--cl-red); }

/* Amber and not red: an area that did not answer is an incomplete result, not a defect — the
   hits that are there remain usable. Same colour meaning as the amber banner (.cl-banner.cl-amber). */
.cl-df-header-search-hint.cl-warn { color: var(--cl-amber); margin-top: var(--sp-2); }

/* The area above a group of hits: icon, name and the number of its hits. One field asks all areas at
   once, so an order "4711" and an address "4711" can stand next to each other — without the heading the
   rows are indistinguishable. */
.cl-df-header-search-grouphead {
  display: flex; align-items: center; gap: var(--sp-2);
  /* The left indent keeps the heading on one line with the text of the hits below it -
     .cl-df-header-search-hit carries the same padding. */
  margin: var(--sp-3) 0 var(--sp-1) var(--pad-hit-x);
}
/* The first group sits directly under the result line and needs no extra gap. */
.cl-df-header-search-grouphead:first-child { margin-top: 0; }
.cl-df-header-search-group {
  display: flex; align-items: center; gap: var(--sp-2); margin: 0;
  font-size: var(--fs-chip); font-weight: 600; color: var(--cl-ink-2);
  text-transform: uppercase; letter-spacing: var(--tracking-caps);
}
.cl-df-header-search-count { margin-left: auto; margin-right: var(--pad-hit-x); }

/* :empty keeps the line at zero height while there is nothing to report — otherwise the
   popover jumps on every keystroke. */
.cl-df-header-search-result:empty { display: none; }

.cl-df-header-search-hits { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap-hit); }

.cl-df-header-search-hit {
  display: grid; gap: var(--gap-hit-line);
  padding: var(--sp-2) var(--pad-hit-x);
  border-radius: var(--r-item);
  color: var(--cl-ink); text-decoration: none;
}
.cl-df-header-search-hit:hover,
.cl-df-header-search-hit:focus-visible { background: var(--cl-fill); text-decoration: none; }
/* The hit Down / Up has marked (the focus stays in the field). Same look as a mouse hover, in the tile
   colour of the guide so that both can be told apart when the pointer rests on another row. */
.cl-df-header-search-hit.cl-on { background: var(--cl-brand-soft); }
.cl-df-header-search-hit:focus-visible {
  outline: var(--focus-width) solid var(--cl-brand);
  outline-offset: calc(var(--focus-offset) * -1);
}
.cl-df-header-search-hit-name { font-size: var(--cl-fs-small); font-weight: 600; }
.cl-df-header-search-hit-detail { font-size: var(--fs-chip); color: var(--cl-ink-2); }

/* The keys, once there is a list to use them on. */
.cl-df-header-search-legend {
  display: flex; flex-wrap: wrap; gap: var(--sp-5); margin: var(--sp-3) 0 0; padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-label); color: var(--cl-ink-3);
}

/* Loading: the rows to come, in the guide's .cl-skel. */
.cl-df-header-search-skeleton { display: grid; gap: var(--sp-3); padding: var(--sp-2) var(--pad-hit-x); }
.cl-df-header-search-skeleton-row { display: block; height: var(--skeleton-row); }

/* ============================================================================
   7. PAGE HEAD
   The page head is the guide's .cl-phead, as in the Kundencenter (until then the tool bar of the app
   variant, .cl-toolbar, W8): .cl-iconbtn.cl-outline (way back), the tile .cl-phic with the icon of the
   menu entry, h1 and .cl-psub, the actions in .cl-pact, and the search in a .cl-toolrow of its own -
   written by PageHeader and PageSearch (Ui) - and the content of the page in .cl-scroll (PageBody). Head,
   tile, title, icon button, search and scroll area are styled by carelogic-controls.css and
   carelogic-app.css alone; no rule of this file restyles them. What follows are the gaps: the block
   around the head, the avatar and the clear button are the project's own. Where head and scroll area
   sit is section 3.
   ============================================================================ */

/* The block around the head: it stands fixed above the scroll area and takes over the scroll area's side
   padding (the guide's .cl-scroll: 18px 20px, 14px on the phone), so title, search and content share one
   left edge. No ground and no line of its own: the head stands on the page like in the Kundencenter. The
   guide's head and tool row bring their gaps below themselves. */
.cl-df-pagehead { padding: 18px 20px 0; }

/* One gap between the lines of a head with a tool row (--pagehead-gap; the user's screenshot of 12.11.2026 showed
   14, 8 and 41 px): the tool row (.cl-df-pagehead-tools, the second class of the guide's .cl-toolrow) stands that far
   under the title - its margin and the 14 px the guide's head brings below itself meet and the larger counts -, and
   the head gives back the 12 px the guide's tool row brings below itself, so the content begins after the top padding
   of .cl-scroll alone. The chips of a list take the same gap to the controls above them (.cl-df-colfilter-chipline,
   section 20). Up to 820 px the strip of the sub navigation follows the head; there the head keeps the gap below
   itself (section 16). */
.cl-df-pagehead-tools { margin-top: var(--pagehead-gap); }
.cl-df-pagehead:has(> .cl-df-pagehead-tools) { margin-bottom: -12px; }

/* The guide centres its head on one line when the tile is there (.cl-phead:has(> .cl-phic)). The avatar of a
   detail page stands in the tile's place, so the head with it is centred the same way - way back, avatar,
   title and actions on one middle line. */
.cl-df-pagehead-row:has(> .cl-df-toolbar-avatar) { align-items: center; }

/* The title next to the tile: may shrink, so a long name of a detail page wraps instead of pushing the
   actions out of the head. */
.cl-df-pagehead-title { min-width: 0; }

/* Detail head (mockup): the initials of the person or organization left of the title, in the place of the
   tile. The name keeps "toolbar" from W8; it is also the avatar of the customer's head card. */
.cl-df-toolbar-avatar {
  width: var(--detail-avatar); height: var(--detail-avatar); flex: none;
  display: grid; place-items: center; border-radius: var(--cl-r-card);
  background: var(--cl-brand-soft); color: var(--cl-brand);
  font-size: var(--fs-brand); font-weight: 700;
}
.cl-df-toolbar-avatar.cl-organization { background: var(--cl-purple-soft); color: var(--cl-purple); }

/* The browser's own X of a search field differs per browser and would sit next to our clear button. */
.cl-df-search-input::-webkit-search-cancel-button { display: none; }

/* The clear button inside the guide's search: the guide has none (merge request candidate). */
.cl-df-search-clear {
  display: grid; place-items: center;
  width: 22px; height: 22px; flex: none;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--cl-ink-2); cursor: pointer;
}
.cl-df-search-clear:hover { background: var(--cl-fill-2); color: var(--cl-ink); }
.cl-df-search-clear .cl-df-icon { font-size: 14px; }

/* ============================================================================
   8. BUTTONS
   Since W7a the buttons are the control of the style guide: .cl-btn with its kind as second class
   (.cl-primary, .cl-ghost, .cl-danger, .cl-danger-quiet, .cl-off) and .cl-sm/.cl-wide, styled by
   carelogic-controls.css and carelogic-app.css alone, the icon size included (.cl-btn .ph-duotone).
   No rule of this file acts on .cl-btn (StyleguideButtonTests). Where a block of this file places a
   button, it does so through its own class (.cl-df-tile-action,
   .cl-df-table-text) and only with layout, never with color, size, padding, radius or font.
   ============================================================================ */

/* --- 8.1 Icon button of ActionButton (P2a) ----------------------------------
   The style guide has the plain and the outlined icon button (.cl-iconbtn, .cl-iconbtn.cl-outline),
   but no red one and no locked one. Both are anchored on a project class.

   Merge-Request-Kandidat Styleguide: .cl-iconbtn.cl-df-danger, the delete symbol in rows and lists
   (D6: always red, with a ConfirmPrompt behind it). On hover the red area of the guide's
   .cl-btn.cl-danger-quiet (--cl-red-soft), at rest the same with the red ink. */
.cl-iconbtn.cl-df-danger { background: var(--cl-red-soft); color: var(--cl-red); }
.cl-iconbtn.cl-df-danger:hover:not(:disabled) { background: var(--cl-red-soft); color: var(--cl-red); border-color: var(--cl-red); }

/* Locked or busy icon button: the guide has cl-off only for .cl-btn. A locked link (no href) cannot be
   disabled and says aria-disabled instead. */
.cl-iconbtn.cl-df-icon-action:disabled,
.cl-iconbtn.cl-df-icon-action[aria-disabled="true"] { opacity: var(--opacity-muted); cursor: not-allowed; }

/* The close button of a toast (ToastArea). The guide's toast has none - a click on the card closes it - so
   the plain icon button stood in it as it stands on a page: 36 px tall beside a text line of 18 (the guide
   aligns the toast's content at the top, so the button hung below the text), with the area of the page
   theme on a toast that is always dark, and with its × in the tone of the kind: the guide colours every
   duotone icon inside a toast (.cl-toast.cl-ok .ph-duotone), not just the symbol of the kind. Here, as
   .cl-df-dismiss (the button that dismisses a message on its dark card): no area, the ink of the card,
   dimmed until pointed at or focused, centred on the first line without making the card taller. The
   rule acts on the button only; the toast itself stays the guide's. The icon rule has the guide's
   specificity (0,3,0) and comes later, so the × takes the ink.
   Merge-Request-Kandidat Styleguide: the tone on .cl-toast .cl-ico instead of on every .ph-duotone. */
.cl-iconbtn.cl-df-dismiss { width: 28px; height: 28px; margin: -5px -9px -5px 2px; background: transparent; color: inherit; opacity: var(--opacity-muted); }
.cl-iconbtn.cl-df-dismiss:hover,
.cl-iconbtn.cl-df-dismiss:focus-visible { background: transparent; color: inherit; opacity: 1; }
.cl-iconbtn.cl-df-dismiss .cl-df-icon { margin-top: 0; font-size: 16px; color: inherit; }

/* The spinner of a busy button: the Phosphor glyph "spinner", turned. */
.cl-df-spin { animation: spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .cl-df-spin { animation: none; }
}

/* ============================================================================
   9. CARD
   Since W7d the card is the control of the style guide: .cl-card > .cl-card-h (icon, h2, side text
   .cl-hs, actions) + .cl-card-b, written by the building blocks Card, CardHeader and CardBody
   (Ui/Layout) and styled by carelogic-controls.css alone — surface, border, radius, shadow, the
   12px between stacked cards. No rule of this file acts on the card or its parts
   (StyleguideCardTests). Where content of this file touches the edge of a card, the content's own
   block takes the card's rounding (section 18: table view and table frame; section 23: form footer).
   ============================================================================ */

/* --- 9.1 Section header (SectionHeader, P2a) --------------------------------
   .cl-subh of the guide carries the look (small capitals, ink-3, icon 15px) on the container; the
   heading inside only gives up the browser's own margins and type so that it takes that look over.
   The actions stand to the right. */
.cl-df-section-header-title { margin: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; overflow-wrap: normal; }
/* The side column breaks long VALUES anywhere (9.2); a title must not be broken inside a word ("ZUSATZFELD / ER").
   Where the title and the actions do not fit side by side, the actions wrap below it. */
.cl-df-section-header { flex-wrap: wrap; }
.cl-df-section-header-actions { display: flex; align-items: center; gap: var(--sp-3); margin-left: auto; text-transform: none; letter-spacing: normal; }

/* --- 9.2 Detail layout (DetailLayout, P4) -----------------------------------
   The columns, the sticky head and the two breakpoints (1180 / 820) are the guide's .cl-detail
   (carelogic-app.css, A11 and A17); no rule here acts on .cl-detail, .cl-sticky or .cl-detailside
   (StyleguideCollisionTests, DetailLayoutStylesheetTests). What the guide does not have follows.

   Long text (a remark without a space, an address, a file name) breaks inside its column instead of
   pushing the grid wider: the cards grow, the layout does not. min-width: 0 lets a grid cell shrink
   below its content at all. */
.cl-df-detail-main,
.cl-df-detail-head,
.cl-df-detail-side { min-width: 0; overflow-wrap: anywhere; }

/* The tab view has no grid: the head stands above the card, like the page of before. */
.cl-df-detail-tabs > .cl-df-detail-head { margin-bottom: var(--sp-4); }

/* The head card: eyebrow, number, state, facts. In the tab view it is wide, so the facts line up
   beside each other and wrap; in the narrow column they stand one below the other. */
.cl-df-headcard { display: grid; justify-items: start; gap: var(--sp-2); }
.cl-df-eyebrow { font-size: var(--fs-caption); font-weight: 700; letter-spacing: var(--tracking-title); text-transform: uppercase; color: var(--cl-ink-3); }
.cl-df-bignr { font-family: var(--cl-mono); font-size: var(--fs-brand); font-weight: 700; color: var(--cl-brand); overflow-wrap: anywhere; }
.cl-df-headname { font-size: var(--fs-brand); font-weight: 700; color: var(--cl-ink); overflow-wrap: anywhere; }
/* Under the head card, not alone: the list reset of section 2 (ul[class] — an element plus an attribute)
   outweighs a single class, and .cl-df-facts by itself lost its margin and padding to it — the state pill
   then sat right on the line and the first fact right under it. */
.cl-df-headcard > .cl-df-facts { justify-self: stretch; list-style: none; margin: var(--sp-4) 0 0; padding: var(--sp-4) 0 0; border-top: 1px solid var(--cl-stroke); display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-8); }
.cl-df-facts > li { display: flex; align-items: flex-start; gap: var(--sp-3); min-width: 0; font-size: var(--fs-body); color: var(--cl-ink); }
.cl-df-facts .cl-df-icon { color: var(--cl-ink-3); }
.cl-df-facts small { display: block; font-size: var(--fs-tile-title); color: var(--cl-ink-3); }
.cl-df-detail-column .cl-df-facts { flex-direction: column; }

/* The interventions below the head card (the page's wrapper cl-df-detail-actions, which it also marks cl-df-no-print): a gap to the card;
   in the narrow column one button below the other, each as wide as the column. The assigned user is no
   longer among them: it is the last fact of the card (OrderAssignee, section 9.x below). */
.cl-df-detail-actions { margin-top: var(--sp-4); }
.cl-df-detail-column .cl-df-interventions-buttons { flex-direction: column; align-items: stretch; }

/* Buttons of a whole section (add a row, edit the data), above its content: the tab view's place for
   DetailSection.Actions - there the section has no head to put them in. On one page they stand in the
   section header (cl-df-section-header-actions, 9.1). */
.cl-df-section-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-3); margin-bottom: var(--sp-4); }
/* The form footer inside a section: the card body already pads it, so no bar of its own (no side padding, no
   fill), and the buttons may wrap in the 248 px of the side column. Counter-rule to the footer in 23. */
.cl-df-detail-form .cl-df-form-actions { padding: var(--sp-4) 0 0; background: none; }
.cl-df-detail-form .cl-df-form-actions-buttons { flex-wrap: wrap; }
/* The tab view has no grid and the panel spans the card: without a limit a field would run as wide as the
   window. The side column and the one-page view need none (248 px; the column of the middle is a list). */
.cl-df-detail-tabs .cl-df-detail-form { max-width: 640px; }

/* --- 9.3 Property list (PropertyList / Property, D15) -------------------------
   The markup is the guide's (.cl-propgroup > .cl-props > .cl-prop > .cl-k + b); the project adds two
   classes on the SAME elements instead of rules on the guide's: cl-df-twocol on the grid, cl-df-prop on
   the row. Two columns as far as the room goes (auto-fit, no breakpoint), a narrower label column
   than the guide's 210 px so that label and value stay together.
   The grid sits inside the card body, which has its own padding: the guide's own side padding of the
   grid (made for a grid directly in the card) is taken back, and so is that of the group head. */
.cl-df-twocol { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); column-gap: 32px; padding-left: 0; padding-right: 0; }
.cl-df-prop { grid-template-columns: minmax(0, 130px) minmax(0, 1fr); }
.cl-df-prop-title { padding-left: 0; padding-right: 0; }
/* Two classes on purpose: the guide's ".cl-prop > b" (0,1,1) would otherwise win over a single class and
   show "nicht hinterlegt" bold in full ink, like a real value. */
.cl-df-prop > .cl-df-prop-empty { font-weight: 400; color: var(--cl-ink-3); }
.cl-df-prop > .cl-df-prop-multiline { white-space: pre-wrap; font-weight: 400; }
/* The side column is 248 px wide: the label stands over the value there instead of beside it. */
.cl-df-detail-side .cl-df-prop { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-1); }
.cl-df-detail-side .cl-df-prop-hint { grid-column: 1; }
.cl-df-prop-hint { grid-column: 2; color: var(--cl-ink-3); font-size: var(--fs-tile-title); }
.cl-df-detail-tab-section + .cl-df-detail-tab-section { margin-top: var(--sp-6); }

/* ============================================================================
   10. FIELD (form)
   Since W7c the form field is the control of the style guide: .cl-fld > label.cl-field > .cl-fl +
   .cl-inp, the error .cl-field-error, the hint .cl-hint, the password toggle .cl-inpwrap +
   .cl-inpbtn, the read-only state [readonly] and the error state .cl-invalid — styled by
   carelogic-controls.css alone. The building blocks are Field and ReadOnlyField (Ui/Fields); no
   rule of this file acts on the field (StyleguideFieldTests). What stays here is the native file
   input and the project's form grid around the fields. Checkboxes are the guide's label.cl-check
   since W7g (StyleguideSelectionTests).
   ============================================================================ */

/* A file input has no field surface: the label stands above it (.cl-fld > label of the guide), the
   browser's button takes the look of a secondary button — in a field and elsewhere (cover sheet). */
input[type="file"] { display: block; font-size: var(--cl-fs-small); color: var(--cl-ink-2); }
input[type="file"]::file-selector-button {
  height: var(--btn-h-sm); margin-right: var(--sp-3); padding: 0 12px;
  border: 1px solid var(--cl-stroke-2); border-radius: var(--cl-r-ctrl);
  background: var(--cl-surface); color: var(--cl-ink);
  font-weight: 600; cursor: pointer;
}
input[type="file"]:hover:not(:disabled)::file-selector-button { background: var(--cl-fill); }
input[type="file"]:disabled::file-selector-button { background: var(--cl-fill-2); color: var(--cl-ink-2); cursor: not-allowed; }

/* --- Form grid and groups (form-grid, fgroup in the mockup) ----------------
   Three columns, two with .cl-two; spans for wide fields. A group carries an
   uppercase title. Breakpoints of their own: they follow the width of the
   content, not of the shell (section 16). */
.cl-df-form-group { margin-bottom: var(--sp-8); }
.cl-df-form-group:last-child { margin-bottom: 0; }
.cl-df-form-group-title {
  margin: 0 0 12px;
  font-size: var(--fs-label); font-weight: 700;
  letter-spacing: var(--tracking-title); text-transform: uppercase;
  color: var(--cl-ink-2);
}

/* A link next to a group title (zum Kundendatensatz) reads as a link, not as part of the label. */
.cl-df-form-group-title a { text-transform: none; letter-spacing: normal; font-weight: 600; }

/* No row gap: every field brings its own space below (.cl-fld of the guide, 12 px), and the grid
   must not add a second one. */
.cl-df-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.cl-df-form-grid.cl-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cl-df-form-grid-span-2 { grid-column: span 2; }
.cl-df-form-grid-span-3 { grid-column: span 3; }
.cl-df-form-grid.cl-two > .cl-df-form-grid-span-3 { grid-column: span 2; }

@media (max-width: 1180px) {
  .cl-df-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-df-form-grid-span-3 { grid-column: span 2; }
  /* An empty cell keeps rows of three in line — with two columns it would only leave a hole. */
  .cl-df-form-grid-gap { display: none; }
}
@media (max-width: 640px) {
  .cl-df-form-grid, .cl-df-form-grid.cl-two { grid-template-columns: minmax(0, 1fr); }
  .cl-df-form-grid-span-2, .cl-df-form-grid-span-3,
  .cl-df-form-grid.cl-two > .cl-df-form-grid-span-3 { grid-column: span 1; }
}

/* --- 10.1 Tag input (TagInput, P2a) -----------------------------------------
   The frame looks like the guide's field (.cl-inp: fill, ctrl radius, focus ring in accent) and holds
   chips and the bare input in one flow. The input inside has no frame of its own - the frame shows
   the focus (:focus-within). */
.cl-df-taginput {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2);
  min-height: 46px; padding: 7px 10px;
  border: 1px solid transparent; border-radius: var(--cl-r-ctrl); background: var(--cl-fill);
  cursor: text;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.cl-df-taginput:focus-within { background: var(--cl-surface); border-color: var(--cl-accent); box-shadow: 0 0 0 var(--focus-width) var(--cl-accent-soft); }
.cl-df-taginput.cl-off { opacity: var(--opacity-muted); cursor: not-allowed; }

.cl-df-tagchip {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px;
  border-radius: var(--cl-r-pill); background: var(--cl-brand-soft); color: var(--cl-brand);
  font: 600 var(--fs-chip) var(--cl-font);
  /* A long entry wraps instead of widening its container (P7a, in a table cell). */
  min-width: 0; max-width: 100%; overflow-wrap: anywhere;
}
/* A refused duplicate flashes the chip it equals. */
.cl-df-tagchip.cl-dup { background: var(--cl-amber-soft); color: var(--cl-amber); }
.cl-df-tagchip button {
  display: grid; place-items: center; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: var(--cl-r-pill); background: transparent; color: inherit; cursor: pointer;
}
.cl-df-tagchip button:hover { background: var(--cl-surface); }
.cl-df-tagchip button .cl-df-icon { font-size: var(--fs-label); }

.cl-df-taginput input {
  flex: 1; min-width: 150px; padding: 4px 2px;
  border: 0; outline: 0; background: transparent;
  font: 400 var(--fs-body) var(--cl-font); color: var(--cl-ink);
}
/* In a table cell (P7a): many chips flow into several lines; the column keeps a width in which
   the bare input still fits. */
td > .cl-df-taginput { min-width: 16rem; }

.cl-df-taginput input:focus-visible { outline: none; }
.cl-df-taginput input::placeholder { color: var(--cl-ink-3); }

/* --- 10.2 Access list (UserEditDialog) -------------------------------------
   The colleagues whose orders a user may read: the guide's selection rows (.cl-lrow, chosen cl-on) with
   the guide's checkbox, in a frame of their own that scrolls - an account of fifty users must not push
   the dialog's footer away. A long address wraps instead of widening the sheet. */
.cl-df-access-list {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 18rem; overflow-y: auto; margin-top: var(--sp-3); padding: var(--sp-1);
  border: 1px solid var(--cl-stroke); border-radius: var(--cl-r-ctrl);
}
.cl-df-access-list-text { min-width: 0; overflow-wrap: anywhere; }

/* Under the frame; empty it takes no room. */
.cl-df-taginput-message { margin: 0; font: 400 var(--fs-chip) var(--cl-font); color: var(--cl-ink-3); }
.cl-df-taginput-message:not(:empty) { margin-top: var(--sp-2); }
.cl-df-taginput-message.cl-err { color: var(--cl-red); font-weight: 600; }

/* ============================================================================
   11. PILL (status chip)
   Since W5 the pill is styled by carelogic-controls.css alone (.cl-pill, .cl-pill.<tone>,
   .cl-pill .cl-dot). The tone classes come from StatusTone.CssClass() (Ui/Styleguide). No rule of
   this file acts on .cl-pill (StatusToneMappingTests).
   ============================================================================ */

/* ============================================================================
   12. STATES
   Since W7b the notice and the empty state are controls of the style guide: Banner renders
   .cl-banner, EmptyState renders .cl-empty, both styled by carelogic-controls.css alone. No rule
   of this file acts on them (StyleguideBannerTests). The single pages (12.6) only place the card.
   ============================================================================ */
/* --- 12.2 Skeleton --------------------------------------------------------- */
.cl-df-skeleton {
  display: block; border-radius: var(--r-item);
  background: var(--cl-fill-2);
  background-image: linear-gradient(90deg, var(--cl-fill-2) 0%, var(--skeleton-hl) 50%, var(--cl-fill-2) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.cl-df-skeleton.cl-title   { height: 20px; width: 40%; margin-bottom: var(--sp-5); }
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* --- 12.2a Card skeleton (CardSkeleton, P2a) ---------------------------------
   The cards themselves are the guide's (.cl-card); the placeholders are its .cl-skel. What is ours is
   the shape: a title bar and label/value rows (record) or full-width bars (list). The width of the
   value bars changes every third row so that the block does not look stamped. Reduced motion is the
   guide's own rule (.cl-skel, carelogic-app.css). */
.cl-df-skeleton-card-stack { display: block; }
/* Two skeletons one after the other (record, then list) stand apart like stacked cards (the guide's 12px;
   its .cl-card + .cl-card does not reach across the wrappers). */
.cl-df-skeleton-card-stack + .cl-df-skeleton-card-stack { margin-top: var(--sp-4); }
.cl-df-skeleton-card-title { display: block; width: 28%; height: var(--skeleton-bar); margin-bottom: var(--sp-6); }
.cl-df-skeleton-card-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-5) 32px; }
.cl-df-skeleton-card-prop { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: var(--sp-6); }
.cl-df-skeleton-card-key,
.cl-df-skeleton-card-value { display: block; height: var(--skeleton-bar); }
.cl-df-skeleton-card-key { width: 80%; }
.cl-df-skeleton-card-value { width: 75%; }
.cl-df-skeleton-card-prop:nth-child(3n+2) .cl-df-skeleton-card-value { width: 55%; }
.cl-df-skeleton-card-prop:nth-child(3n) .cl-df-skeleton-card-value { width: 40%; }
.cl-df-skeleton-card-lines { display: grid; gap: var(--sp-4); }
.cl-df-skeleton-card-line { display: block; height: var(--row-h); }

/* --- 12.3 Loader and loading overlay --------------------------------------- */
.cl-df-loader {
  width: 20px; height: 20px; flex: none;
  border: 2.5px solid var(--cl-stroke-2);
  border-top-color: var(--cl-brand);
  border-radius: 50%;
  animation: loader-spin .7s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }

.cl-df-loading-overlay {
  position: absolute; inset: 0; z-index: var(--z-popup);
  display: grid; place-items: center; gap: var(--sp-3);
  background: var(--scrim);
  border-radius: inherit;
}

/* --- 12.6 Single pages and notices (W10, ADR 0002, 10.4: H5 mixed) ------------

   Warum nicht im Styleguide: carelogic-intern kennt .cl-panel und .cl-standalone-wrap (Einzelseite auf
   dem Wellenmotiv); die Ausprägung app hat beides nicht. Karte (.cl-card) und Leerzustand (.cl-empty)
   bleiben unverändert, ErrorCard setzt sie nur an einen von zwei Plätzen:

   .cl-df-notice      a notice IN the frame (404, no access): a narrow, centered column in the scroll
                      area, the card inside. The navigation stays usable.
   .cl-df-standalone  a page WITHOUT the frame (ended session, unexpected error): the app mark on top, the
                      card in the middle. It stands in .cl-shell (EmptyLayout) and takes the window's
                      height; where the content is longer it rolls by itself.
   .cl-df-panel       the card of the standalone page: as wide as a form, not as the window.        */
.cl-df-notice { max-width: 520px; margin: 6vh auto 0; }

.cl-df-standalone {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  gap: var(--sp-8); padding: var(--sp-8) var(--sp-5);
  overflow-y: auto;
}

/* Holds the guide's .cl-appbrand, whose height: 100% would otherwise fill the standalone column. */
.cl-df-standalone-brand { flex: none; }

.cl-df-panel { width: 100%; max-width: 460px; }

/* The h1 around the title of the card (EmptyState.TitleAsHeading) carries no look: the guide's
   .cl-empty b does. Only the browser's 2em would stretch the line, so the size is the title's. */
.cl-df-notice h1, .cl-df-panel h1 { font-size: var(--fs-h3); }


/* --- 12.6b Sign-in photo without the brand tint --------------------------------

   DELIBERATE DEVIATION from the style guide, decided by the user on 02.11.2026: the guide lays a blue
   gradient over the whole photo (.cl-auth-brand.cl-photo::before); DokuFlow shows the photo in its own
   colours. Only a neutral shade at the top and the bottom stays, so the white mark, claim and points
   remain readable on a light photo. The one rule of app.css on the sign-in's brand side; a merge request
   to the guide (a variant without tint) would make it unnecessary. */
.cl-auth-brand.cl-df-photo-natural::before { background: var(--sign-in-photo-shade); }

/* --- 12.7 Crash surface of the ErrorBoundary ------------------------------- */
.blazor-error-boundary {
  background: var(--cl-red-soft); color: var(--cl-ink);
  border: 1px solid var(--cl-red); border-radius: var(--cl-r-tile);
  padding: var(--sp-5) var(--sp-6); margin: var(--sp-6) 0;
  font-size: var(--cl-fs-small);
}
.blazor-error-boundary::after { content: "Dieser Bereich konnte nicht geladen werden."; }

/* --- 12.8 Unhandled error (blazor-error-ui) -------------------------------- */
#blazor-error-ui {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-error-ui);
  display: none;
  box-sizing: border-box;
  padding: 12px var(--sp-7);
  background: var(--cl-amber-soft); color: var(--cl-ink);
  border-top: 1px solid var(--cl-amber);
  box-shadow: var(--cl-sh-pop);
  font-size: var(--cl-fs-small);
}
#blazor-error-ui .reload { margin-left: var(--sp-3); font-weight: 600; color: var(--cl-brand); }
#blazor-error-ui .dismiss {
  position: absolute; right: var(--sp-5); top: 10px;
  border: 0; background: transparent; cursor: pointer; color: var(--cl-ink-2);
}

/* ============================================================================
   13. (gone with W12: the base form of a dialog had no caller; Dialog.razor uses the guide's cl-dialog)
   ============================================================================ */

/* ============================================================================
   14. RECONNECT (framework dialog; the ids are dictated by the framework)
   ============================================================================ */
/* Since W10 the dialog is only the frame the browser needs (top layer, backdrop, closing); what the user
   sees is the guide's card with an empty state inside (H5: "Server nicht erreichbar" as a card). The
   dialog therefore draws no surface and no padding of its own. */
#components-reconnect-modal {
  width: 24rem; max-width: 92vw; margin: 20vh auto;
  border: 0; padding: 0;
  background: transparent; color: var(--cl-ink);
}
#components-reconnect-modal::backdrop { background: var(--scrim); }

/* Which message shows depends on the state class that blazor.web.js and
   ReconnectModal.razor.js set on the dialog. These rules lived in the template's
   ReconnectModal.razor.css; without CSS isolation they belong here — without them the
   dialog showed all five messages and both buttons at once. */
.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation { display: none; }

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible { display: block; }
.components-rejoining-animation { position: relative; width: 56px; height: 56px; margin-bottom: var(--sp-3); }
.components-rejoining-animation div {
  position: absolute; inset: 0;
  border: 3px solid var(--cl-brand); border-radius: 50%;
  animation: reconnect-wave 1.5s cubic-bezier(0, .2, .8, 1) infinite;
}
.components-rejoining-animation div:nth-child(2) { animation-delay: -.5s; }
@keyframes reconnect-wave {
  0%   { transform: scale(0);  opacity: 1; }
  100% { transform: scale(1);  opacity: 0; }
}

/* ============================================================================
   15. SIGN-IN PAGE
   Gone with W10: the page is the style guide's A13 (.cl-shell > .cl-auth, photo variant) and needs
   no rule of the project. Its pieces are written by Components/Pages/SignIn.razor.
   ============================================================================ */

/* ============================================================================
   16. BREAKPOINTS
   All breakpoints of the shell. Since W9 only the values of the guide's A17 (carelogic-app.css):
   1180 / 980 / 960 / 820 / 520 - those of them the shell needs. Media queries cannot read tokens,
   hence the pixel values. C# knows no window width; the only JavaScript of the shell (subnav.js)
   knows none either.

   The guide itself switches at 820 px: the nav leaves the bar and the tab bar appears (A17), so that
   is not repeated here.
   ============================================================================ */

/* 1180: the areas, the tenant pill, the lookup and the menu do not fit next to each other at 1000 px (found in
   the mockup: "Verwaltung" ran out of the bar). The project part of the bar gives way, and the guide's own
   mechanism for the rest stays (.cl-nav scrolls sideways when it must):
   - the tenant pill keeps only its circle; the name stays in its aria-label, the title shows it
     (with the number) to the mouse.
   - the lookup folds into its icon and opens while it has the focus - pure CSS. It stays an icon on
     narrow windows as well: otherwise the lookup would be missing on an iPad held upright. */
@media (max-width: 1180px) {
  .cl-df-tenant { padding: 3px; }
  .cl-df-tenant > span:first-child { display: none; }
  .cl-df-header-search { width: var(--ctrl-h-sm); padding: 0; justify-content: center; cursor: pointer; }
  .cl-df-header-search-input { flex: 0; width: 0; }
  .cl-df-header-search-clear, .cl-df-header-search .cl-df-kbd { display: none; }
  /* On the whole AREA, not on the field: a Tab into the hits panel (a sibling of the field) moves the focus
     out of the field and would fold it shut under the open panel. */
  .cl-df-header-search-area:focus-within .cl-df-header-search { width: var(--search-w); padding: 0 12px; justify-content: flex-start; cursor: text; }
  .cl-df-header-search-area:focus-within .cl-df-header-search-input { flex: 1; width: 100%; }
  .cl-df-header-search-area:focus-within .cl-df-header-search-clear { display: grid; }
  .cl-df-header-search-area:focus-within .cl-df-header-search .cl-df-kbd { display: inline-block; }
}

/* 820: the rail becomes a strip under the tool bar. In the orders area it runs far beyond the edge;
   subnav.js scrolls the active entry into view. The rows are fixed (auto / auto / the rest): without
   them the grid shared the window height left over by a short page between strip and content, and the
   strip grew by half of it (StylesheetTests). Without a tool bar (loading state) the strip comes
   first. The lookup's panel leaves its field and hangs from the bar's lower edge. */
@media (max-width: 820px) {
  .cl-df-work-area.cl-df-has-rail { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .cl-df-work-area.cl-df-has-rail:has(> .cl-df-pagehead) { grid-template-rows: auto auto minmax(0, 1fr); }
  .cl-df-has-rail > .cl-df-rail { grid-column: 1; grid-row: 1; }
  .cl-df-has-rail:has(> .cl-df-pagehead) > .cl-df-rail { grid-row: 2; }
  /* The side padding of the guide's .cl-scroll on the phone (A17), so head and content keep one edge. */
  .cl-df-pagehead { padding: 14px 14px 0; }
  /* ... and its top padding is the one gap of the head here (section 1). The strip of the sub navigation follows the
     head: the head keeps that gap below itself instead of giving it to the scroll area (section 7). */
  :root { --pagehead-gap: var(--sp-5); }
  .cl-df-has-rail > .cl-df-pagehead:has(> .cl-df-pagehead-tools) { margin-bottom: calc(var(--pagehead-gap) - 12px); }
  .cl-df-rail {
    flex-direction: row; flex-wrap: nowrap; align-items: center; gap: var(--sp-2);
    overflow-x: auto; overflow-y: hidden;
    padding: 8px 14px;
    border-right: 0; border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  .cl-df-rail::-webkit-scrollbar { display: none; }
  .cl-df-rail-nav { display: flex; align-items: center; gap: var(--sp-1); }
  .cl-df-rail-group { display: flex; align-items: center; gap: var(--sp-1); margin: 0; flex: none; }
  .cl-df-rail-group + .cl-df-rail-group { border-left: 1px solid var(--cl-stroke-2); padding-left: 10px; margin-left: var(--sp-1); }
  .cl-df-rail-list { display: flex; gap: var(--sp-1); }
  .cl-df-rail-label { padding: 0 var(--sp-1) 0 0; white-space: nowrap; }
  .cl-df-rail-item { width: auto; white-space: nowrap; }
  .cl-df-rail-footer { display: none; }

  .cl-df-notice { margin-top: 2vh; }

  /* The lookup's panel leaves its field and hangs from the bar's lower edge: the bar is narrow, and the
     panel must not be cut off. */
  .cl-df-header-search-popover {
    position: fixed; top: calc(var(--appbar-h-compact) + var(--sp-2)); right: 12px;
    width: var(--search-popover-w);
  }
}

/* 520: the guide already hides the tool bar's subtitle, the segments and the chip text here. For the
   lookup on a phone: while it is open its field is narrower (the tenant pill is only its circle by now). */
@media (max-width: 520px) {
  .cl-df-header-search-area:focus-within .cl-df-header-search { width: 140px; }
}

/* ============================================================================
   17. PRINT
   A fixed window prints only what it shows - the rolling content would be cut at the window's lower
   edge (W0 e). The window is lifted: nothing is fixed and nothing rolls, the whole page flows onto
   as many sheets as it needs. App bar, tab bar, rail, skip link and toasts do not print
   (.cl-df-no-print); the tool bar with the title does.
   ============================================================================ */
@media print {
  .cl-df-skip-link, .cl-df-no-print, .cl-df-scroll-end { display: none !important; }

  html, body { height: auto; }
  .cl-shell, .cl-view, .cl-df-work-area { display: block; height: auto; overflow: visible; }
  .cl-scroll { overflow: visible; }

  /* The frame of a table caps its height and rolls inside (section 18) - on paper it would print the
     first 25 rows and nothing of the rest. */
  .cl-df-table-frame { max-height: none; overflow: visible; }
}

/* ============================================================================
   18  Data table and pager
   Since W7e the table is the style guide control table.cl-grid (Web · Tabellen), written by
   DataTable (TableView renders through it); the bar below it is the guide's foot .cl-lfoot
   (Pager, CountBar); a list that is the whole content of its page sits in the guide's .cl-tblwrap
   (TableWrap). Head, cells, row lines, hover, numbers (.cl-num), actions (td.cl-act), clickable
   and selected rows (tr.cl-clickable, tr.cl-on) and the sort mark (.cl-sortmark) are styled by
   carelogic-controls.css alone — no rule of this file names a class of the guide's table, and
   none acts on a table element beyond the one addition listed in StyleguideTableTests (the
   sticky head).

   What stays here is our own: the scroll frame, the parts INSIDE the cells (text carrier, row
   link, name, number, detail, avatar), the sort button, the compact control of a table row and
   the parts of the pager the guide does not have. As everywhere in this file: tokens only.
   ============================================================================ */

/* --- The frame ---------------------------------------------------------------
   Around every table (DataTable). It solves two things at once:

   1. Wide tables scroll horizontally in their own box — never the page (what the guide's
      .cl-tblscroll does, sideways only).
   2. Long tables get a capped height. At page size 500 an uncapped list would be an endlessly
      scrolling wall, and the pager would land screens below the header.

   The cap only applies when it is needed: ten rows stay untouched, only beyond that does a scroll
   area appear. The pager sits outside the frame and therefore stays visible while the rows
   scroll. The cap is 25 rows whatever the page size (no page sets a row count of its own), and it
   stops at the viewport, otherwise the pager would be screens away at 500 rows. Calculated with
   the tokens of the guide's row and head height (section 1): --row-h per row plus the divider
   below it, plus --table-header-h.

   scroll-padding-top keeps a row that receives the focus (Tab through the row links) below the
   sticky head instead of under it (WCAG 2.4.11, focus not obscured). */
.cl-df-table-frame {
  overflow: auto;
  overscroll-behavior: contain;
  max-height: min(calc(25 * (var(--row-h) + 1px) + var(--table-header-h)), 78vh);
  scroll-padding-top: var(--table-header-h);
}

/* A card rounds its corners, the scroll area inside it does not: the header row and the scrollbar
   would run past the rounding. The guide's card does not clip, and this file gives it no rule
   (section 9). So the frame takes the rounding of the card where it touches the card's edge: as its
   first part at the top, as its last at the bottom. Inside a table view, a card body or the guide's
   .cl-tblwrap (which clips itself) the parent has no radius to inherit or it does not matter. */
.cl-df-table-frame:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.cl-df-table-frame:last-child  { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

/* ADDITION 1 — the head stays in view while the capped rows scroll. The guide has no sticky head
   (merge request: a sticky head for .cl-tblscroll). It looks exactly as the guide's: the cell
   surface is the table's own surface, and the line under it is the guide's line, drawn as a shadow
   because with border-collapse the browser draws borders on the table, not on the cell — it would
   wander away under the head while scrolling. */
.cl-df-table-frame thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--cl-surface);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 var(--cl-stroke);
}

/* ----------------------------------------------------------------------------
   Row as target

   A click anywhere in the row should open the detail view. An @onclick on the <tr> would be the
   shortest way and the worst: a table row is not a control (not focusable, not announced, no
   new tab by middle click). So the <a href> in the identifier column remains the ONLY control of
   the row, and row-link.js forwards a click on the free part of the row to it (P5a): keyboard,
   screen reader, middle click and context menu still see exactly one link, and without the script
   the link works as ever. The guide's tr.cl-clickable is taken for its look only (the pointer and
   the hover of the row): the guide leaves the click to a script on the row, this project to the link.

   TEXT SELECTION. Until P5a the link was stretched over the whole row by an overlay, which swallowed
   selecting; only the text carrier was lifted above it. There is no overlay any more, so every glyph
   of the row can be selected and copied, and a click that ends a selection does not navigate (the
   script checks for selected text). The carrier below only shows the text cursor.
   ---------------------------------------------------------------------------- */

/* The link of a row: bold, and underlined while the pointer is anywhere on its row. */
.cl-df-table-target { font-weight: 600; }

.cl-df-table-frame tr:hover .cl-df-table-target { text-decoration: underline; }

/* The mark "opens in a new tab" inside a link to an order (D27, NewTabHint): the icon of the
   mockup, faint until the row (or the link) is hovered or focused. Not part of the link text for
   the eye, but of its name for screen readers. */
.cl-df-newtab-hint {
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  color: var(--cl-ink-3);
  font-size: 16px;
  line-height: 1;
  opacity: .45;
}

.cl-df-table-frame tr:hover .cl-df-newtab-hint,
a:hover > .cl-df-newtab-hint,
a:focus-visible > .cl-df-newtab-hint { opacity: 1; color: var(--cl-brand); }

/* Carrier for selectable text: shows with the cursor that this is for selecting and copying, not
   only for clicking. Buttons carry it too (the rule of section 2 keeps their pointer). */
.cl-df-table-text { cursor: text; }

/* --- Cell content ------------------------------------------------------------
   Single line with ellipsis; the full text is in the title (CellText.SingleLine). As a block with
   a max width inside the cell: max-width does not work reliably on table cells, but on a block
   inside one it does — and thereby also caps how wide the column wants to become. The guide's
   td.cl-trunc does the same on the cell with a fixed 220px; the span keeps the text carrier. */
.cl-df-table-single-line {
  display: block;
  max-width: var(--column-max);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Customer numbers and other identifiers: monospace font, so that numbers of equal length line up
   and 0 and O, 1 and l cannot be confused. On the text inside the cell (CellText, the order link),
   not on the cell. Not the guide's .cl-mono: carelogic-app.css gives that name to the monogram
   tile (merge request). As the target of a row (orders) the number keeps this look instead of the
   link's — the whole row is clickable and the hover underlines it. */
.cl-df-table-number {
  font-family: var(--cl-mono);
  font-size: var(--cl-fs-small);
  font-weight: 400;
  color: var(--cl-ink-2);
  font-variant-numeric: tabular-nums;
}

/* The main text of a row without an avatar (the customer of an order): bold like the name next to
   an avatar, so that the eye finds the row's subject first. */
.cl-df-table-name { font-weight: 600; color: var(--cl-ink); }

/* A second line under a value (the user id under a name, the error under a status). */
.cl-df-table-detail {
  display: block;
  font-size: 12px;
  color: var(--cl-ink-2);
  margin-top: 2px;
}
/* An error under a status pill (dispatch log): red, as the pill it explains. */
.cl-df-table-detail.cl-error { color: var(--cl-red); }

/* Several pills in one cell, such as mail and post. */
.cl-df-pill-group { display: inline-flex; flex-wrap: wrap; gap: var(--sp-1); }

/* --- Avatar with name --------------------------------------------------------
   Initials on a brand-colored tile, next to it the name in bold and below it a detail (such as the
   date of birth). The round shape (.cl-av of the account menu) is reserved for the signed-in user — a
   customer in the list is not "me". A block of its own, because a later row view needs it just as
   much as the table. */
.cl-df-avatar-name {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-width: 0;
}

.cl-df-avatar-name-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--row-avatar);
  height: var(--row-avatar);
  border-radius: var(--r-avatar);
  background: var(--cl-brand-soft);
  color: var(--cl-brand);
  font-size: var(--fs-tile-title);
  font-weight: 700;
}

/* An organization (payer, practice, supplier) instead of a person: purple like .avatar.org in the
   v2 mockup, so that an address list does not read like a second customer list. */
.cl-df-avatar-name-avatar.cl-organization { background: var(--cl-purple-soft); color: var(--cl-purple); }

/* min-width: 0 lets the text block become narrower than its content — only then does the ellipsis
   on the name take effect. */
.cl-df-avatar-name-text { min-width: 0; }

.cl-df-avatar-name-name,
.cl-df-avatar-name-detail {
  display: block;
  max-width: var(--column-max);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The name is the target of the row, but not a brand-blue link: the whole row is clickable, and on
   hover the frame underlines it. */
.cl-df-avatar-name-name { color: var(--cl-ink); font-weight: 600; }

.cl-df-avatar-name-detail { font-size: var(--cl-fs-small); color: var(--cl-ink-2); }

/* --- Sortable column header ------------------------------------------------
   The button fills the cell so that the whole header is the target — not just the few letters. It
   inherits everything from the guide's <th> (font, capitals, spacing, colour, alignment — also the
   right alignment of th.cl-num), so it looks like the head and behaves like a button. Pointer and
   the lighter text on hover are what the guide gives th[data-cl-sort]; that hook is not set
   (SortHeader), the button brings both itself. The sort mark (.cl-sortmark) is the guide's. */
.cl-df-sort-button {
  display: block;
  width: 100%;
  margin: 0; padding: 0;
  border: 0; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit; text-align: inherit;
  cursor: pointer;
}

.cl-df-sort-button:hover { color: var(--cl-ink-2); }

.cl-df-sort-button:focus-visible {
  outline: var(--focus-width) solid var(--cl-brand);
  outline-offset: 2px;
  border-radius: var(--r-s);
}

/* --- Compact control ---------------------------------------------------------
   The inputs and selects of a table row (check items, rules, additional fields, the device name)
   and the page size of the pager. The guide's .cl-inp is a form field (14.5px, 41px high, on
   --fill) and has no compact variant; in a row it would be taller than the row and vanish on a
   selected row's surface. So this one stays ours, in the height of the guide's small button
   (.cl-btn.cl-sm, 30px) that stands next to it. It fills its cell. */
.cl-df-compact-input {
  width: 100%;
  height: var(--compact-input-h);
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--cl-r-ctrl);
  background: var(--cl-surface);
  color: var(--cl-ink);
  font: inherit;
  font-size: 13px;
}

.cl-df-compact-input:focus-visible {
  outline: var(--focus-width) solid var(--cl-brand);
  outline-offset: var(--focus-offset);
}

/* While saving, the device name is readonly instead of disabled — disabled would take its focus
   away. The muted surface shows that nothing can be done here right now. */
.cl-df-compact-input[readonly] { background: var(--cl-fill); color: var(--cl-ink-2); }

.cl-df-compact-input:disabled { opacity: var(--opacity-muted); cursor: not-allowed; }

/* A number of a few digits (the sequence of a check item). */
.cl-df-compact-input.cl-narrow { width: 5em; font-variant-numeric: tabular-nums; }

/* In a table the percentage width counts for nothing when the columns share out the space, and a
   wider neighbour squeezes the input down to a few letters (the additional fields beside their tag
   input). These keep the column readable; if the row no longer fits, the table frame scrolls. */
.cl-df-compact-input.cl-wide { min-width: 11rem; }
.cl-df-compact-input.cl-mid { min-width: 7.5rem; }

/* --- Row actions --------------------------------------------------------------
   Two buttons in the action cell of a row (td.cl-act): edit and delete, save and cancel - side by
   side. The guide's icon button is a box of its own (.cl-iconbtn is display: grid), so two of them
   in one cell stood one above the other (found 20.11.2026 on the check items). The wrapper lines
   them up; inline, so that the cell's text-align: right still puts the pair at its end. The gap is
   the one between the buttons of a quick link row. */
.cl-df-row-actions { display: inline-flex; align-items: center; gap: var(--sp-2); }

/* --- Pager --------------------------------------------------------------------
   The guide has no pager. The bar is its foot .cl-lfoot (range on the left, the rest on the
   right), the page buttons are its buttons; these are the parts it does not have. */

/* "Zeige 26–50 von 22.018": figures of equal width, so that the text does not jitter while paging. */
.cl-df-page-range { font-variant-numeric: tabular-nums; }

/* The page size sits in the line of text, as wide as its numbers. */
.cl-df-page-size { width: auto; font-variant-numeric: tabular-nums; }

/* Back, page numbers, next — a navigation labeled "Seiten". The foot does not wrap; in a narrow
   window the navigation wraps its buttons instead of pushing the bar past the frame. */
.cl-df-page-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--sp-1);
}

.cl-df-page-gap { padding: 0 var(--sp-1); }

/* The frame of the count bar (CountBar). As the last part of a card the guide's foot would paint
   its surface over the card's rounded bottom corners — the card does not clip (section 9). Like the
   table frame, this box takes the card's rounding where it is its last part and clips the foot to
   it; the foot itself gets no rule (rule 5). */
.cl-df-table-foot { overflow: hidden; }
.cl-df-table-foot:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

/* The icon catalog only knows the right arrow — back rotates it (the previous-page button of the pager). */
.cl-df-page-back { transform: rotate(180deg); }

/* --- Table view --------------------------------------------------------------
   The paged list from a ListState: skeleton, table or empty state, with the pager below. It clips
   itself, with the rounding of the card where it touches the card's edge — for the same reason as
   the table frame above: the header row and the scrollbar would otherwise run past the rounding. */
.cl-df-table-view { overflow: hidden; }
.cl-df-table-view:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.cl-df-table-view:last-child  { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

/* First render: the skeleton, but only after --load-delay. If the server answers faster,
   there is no intermediate image — a skeleton that flashes up for 80 ms feels like a stutter.
   Pure CSS: the element is there from the start (screen readers hear "Wird geladen"
   immediately) and only transparent until the delay has elapsed. Anyone who has turned off
   motion gets it after the same delay without fading in (the reduced-motion rule at the top of section 2 only shortens the
   duration). */
.cl-df-table-view-skeleton {
  animation: appear var(--duration-medium) ease-out var(--load-delay) both;
}

/* The same for every fetched page (DataState): nothing within --load-delay, then the skeleton. */
.cl-df-data-state-loading { animation: appear var(--duration-medium) ease-out var(--load-delay) both; }

@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* At the row height of the guide's table, so that the switch to the real table does not jump. The
   bars need a height of their own here: the table skeleton only sets their width. */
.cl-df-table-view-skeleton .cl-df-table-skeleton { padding: 0 var(--card-pad-x); }
.cl-df-table-view-skeleton .cl-df-table-skeleton-row   { height: var(--row-h); padding-block: 0; }
.cl-df-table-view-skeleton .cl-df-skeleton         { height: var(--skeleton-bar); }

/* A list whose first column carries the avatar (customers, inquiries, addresses, users): its rows
   are as tall as the avatar plus the guide's cell padding, and so is the skeleton — in a table view
   and outside one. Stands after the rule above at the same weight. */
.cl-df-table-skeleton-row.cl-avatar { height: var(--row-h-avatar); padding-block: 0; }

/* Reloading: what was there stays in place and is dimmed — this too only after --load-delay,
   for the same reason as with the skeleton. Going back happens immediately: the delay is only
   on the "loading" state, not on the transition back. The hook is aria-busy, so that
   appearance and announcement cannot drift apart. */
.cl-df-table-view-content { transition: opacity var(--duration-fast) ease; }

.cl-df-table-view-content[aria-busy="true"] {
  opacity: var(--opacity-muted);
  transition-delay: var(--load-delay);
}

/* ============================================================================
   19  Table skeleton
   Mimics the real structure instead of grey blocks: anyone who recognizes the
   row count and column widths perceives the switch as a continuation.
   ============================================================================ */

.cl-df-table-skeleton { padding: var(--sp-4) var(--sp-5); }

.cl-df-table-skeleton-row {
  display: flex;
  gap: var(--sp-5);
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.cl-df-table-skeleton-row:last-child { border-bottom: 0; }

/* ============================================================================
   20  Filter bar (stage 3)
   The filter bar sits at the top of a card: the chips of a list (DispatchLog) or the segments of a
   view (Templates). Since W7g the chip and the segment are the style guide's (.cl-chip with .cl-n,
   .cl-seg > button, chosen .cl-on) — styled by carelogic-controls.css and carelogic-app.css alone
   (StyleguideSelectionTests). What stays here is the bar and the group around the chips; the
   guide's own bar (.cl-filterbar, app) has no padding of its own and belongs to the toolbar of
   the page (W8).
   ============================================================================ */
.cl-df-filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: var(--sp-5) var(--card-pad-x);
  border-bottom: 1px solid var(--border);
}
.cl-df-filter-bar-spacer { flex: 1; }

.cl-df-chip-group { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* --- Column filters (ListFilterBar, P5b1, P5b4) --------------------------------
   Laid out as in the Kundencenter (Variante A, 11.11.2026): the selects and periods stand in the guide's tool row of
   the page head next to the search - every one as high as the search (--ctrl-h-s), in its frame, radius and surface -,
   "Zurücksetzen" is the guide's link button after them, and a choice is a line of the guide's chips of its own at the
   end of that row, still in the fixed head. Tool row, search, chips and link button are styled by the copies alone;
   what follows are the controls the guide does not have. Nothing of the bar floats over the content, so this file
   has no rule for .cl-tblwrap (a test keeps it that way). */

/* A select of the tool row: as high as the search beside it, its frame and surface. */
.cl-df-colfilter-select {
  flex: none; min-width: 11rem;
  height: var(--ctrl-h-s); padding: 0 var(--sp-3);
  border: 1px solid var(--cl-stroke); border-radius: var(--cl-r-ctrl);
  background: var(--cl-surface); color: var(--cl-ink);
  font: inherit; font-size: 13.5px;
}
.cl-df-colfilter-select:focus-visible { outline: var(--focus-width) solid var(--cl-brand); outline-offset: var(--focus-offset); }

/* A period: ONE field of the tool row - "[calendar] Geändert [von] – [bis] ×" - in the frame of the search. The two date
   inputs have no frame of their own; the field shows the focus of the one being typed in, as the search does (the
   guide's .cl-search:focus-within), and the error colour while it shows a start after the end. The hint hangs under
   the field and pushes nothing: the tool row keeps its height. */
.cl-df-colfilter-period {
  position: relative; flex: none;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: var(--ctrl-h-s); padding: 0 var(--sp-2) 0 var(--sp-3);
  border: 1px solid var(--cl-stroke); border-radius: var(--cl-r-ctrl);
  background: var(--cl-surface);
}
.cl-df-colfilter-period:focus-within { border-color: var(--cl-accent); box-shadow: 0 0 0 3px var(--cl-accent-soft); }
.cl-df-colfilter-period:has([aria-invalid="true"]) { border-color: var(--cl-red); }
.cl-df-colfilter-period > .cl-df-icon { font-size: 17px; color: var(--cl-ink-3); }
.cl-df-colfilter-prefix { font-size: var(--fs-chip); font-weight: 600; color: var(--cl-ink-2); }
.cl-df-colfilter-side { display: contents; }
/* A date as wide as "TT.MM.JJJJ" and the browser's calendar button behind it (until 12.11.2026 8.5 rem, a gap before
   the button). Without a day its "tt.mm.jjjj" is a placeholder and looks like one (cl-blank, set by ListFilterBar -
   no :placeholder-shown for a date input); while it is being typed in it takes the colour of the text. The button is
   quiet until the pointer is on it, like the new-tab hint of a row: the dates are what the field is about. */
.cl-df-colfilter-date {
  width: 6.6rem; padding: 0; border: 0; background: transparent;
  color: var(--cl-ink); font: inherit; font-size: 13.5px;
}
.cl-df-colfilter-date.cl-blank:not(:focus) { color: var(--cl-ink-3); }
.cl-df-colfilter-date::-webkit-calendar-picker-indicator { margin-inline-start: var(--sp-1); opacity: .55; cursor: pointer; }
.cl-df-colfilter-date::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.cl-df-colfilter-date:focus-visible { outline: none; }
.cl-df-colfilter-dash { color: var(--cl-ink-2); }
.cl-df-colfilter-hint {
  position: absolute; top: calc(100% + var(--sp-1)); left: 0;
  white-space: nowrap; font-size: var(--fs-label); color: var(--cl-red);
}

/* The × of a period: the form of the clear button of the page search (section 7). */
.cl-df-colfilter-clear {
  display: grid; place-items: center;
  width: 22px; height: 22px; flex: none;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--cl-ink-2); cursor: pointer;
}
.cl-df-colfilter-clear:hover { background: var(--cl-fill-2); color: var(--cl-ink); }
.cl-df-colfilter-clear .cl-df-icon { font-size: 14px; }

/* "Zurücksetzen": the guide's link button, kept on one line at the end of the tool row. */
.cl-df-colfilter-reset { flex: none; white-space: nowrap; }

/* 520: on a phone the period is wider than the tool row (it ran out of the window, cut off). Every control takes a
   line of its own, as wide as the search above it; the dates share what is left beside the name of the column, and
   the calendar - which only decorates - steps aside for them. */
@media (max-width: 520px) {
  .cl-df-colfilter-select,
  .cl-df-colfilter-period { flex: 1 1 100%; width: auto; min-width: 0; }
  .cl-df-colfilter-period > .cl-df-icon { display: none; }
  .cl-df-colfilter-date { flex: 1 1 0; width: auto; min-width: 0; }
}

/* The line of a choice: it takes the whole width of the tool row, so it breaks under the controls, and may shrink and
   roll sideways instead of widening the page. No filter bar of the guide around it (until 12.11.2026): its line and
   the 10 px above it made the gaps of the head uneven, and the table below has a frame of its own. The line stands
   --pagehead-gap under the controls (the guide's tool row puts 8 px between its lines); a little room above and below
   keeps the focus ring of a chip from being cut by the rolling, and is taken back by the margins. */
.cl-df-colfilter-chipline {
  flex: 1 1 100%; min-width: 0; overflow-x: auto;
  padding-block: var(--sp-1);
  margin-block: calc(var(--pagehead-gap) - 8px - var(--sp-1)) calc(-1 * var(--sp-1));
}

/* The chips of a choice: one line with the gap of the guide's filter bar (it rolls sideways). */
.cl-df-colfilter-toggles { display: flex; align-items: center; gap: 7px; flex: none; }

/* The icon of an option in the tone of its pill while the chip is not pressed (ListFilterBar leaves the tone
   out on a pressed chip: there the icon takes the white of the text). The size is the guide's icon in a chip. */
.cl-df-colfilter-toggle-icon.cl-grey   { color: var(--cl-ink-3); }
.cl-df-colfilter-toggle-icon.cl-blue   { color: var(--cl-blue); }
.cl-df-colfilter-toggle-icon.cl-amber  { color: var(--cl-amber); }
.cl-df-colfilter-toggle-icon.cl-red    { color: var(--cl-red); }
.cl-df-colfilter-toggle-icon.cl-green  { color: var(--cl-green); }
.cl-df-colfilter-toggle-icon.cl-purple { color: var(--cl-purple); }
.cl-df-colfilter-toggle-icon.cl-brand  { color: var(--cl-brand); }

/* ============================================================================
   21  (dissolved in W7e: the page size of the pager is the compact control of section 18)
   ============================================================================ */

/* ============================================================================
   22  Detail view: tabs, field list, timeline, notes, document tiles
   ============================================================================ */

/* Tabs (DfTabs): 48 px, underline in brand ink. The baseline is an inset
   shadow, not a border: a border would need the tabs to overlap it by -1px,
   and overflow-x would clip that overlap or add a vertical scrollbar. */
.cl-df-tab-bar {
  display: flex; gap: var(--sp-8);
  /* Always the top of a card (every TabBar sits in one): the padding of the card's head, and the
     panel below brings its own gap (CardBody Headless). */
  padding: 0 var(--card-pad-x);
  box-shadow: inset 0 -1px 0 var(--border);
  overflow-x: auto;
}

.cl-df-tab-bar-tab {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  height: var(--tab-h); padding: 0 2px;
  border: 0; border-bottom: 2.5px solid transparent;
  background: none; color: var(--cl-ink-2);
  font-size: var(--fs-body); font-weight: 600; white-space: nowrap;
  cursor: pointer;
}
.cl-df-tab-bar-tab:hover { color: var(--cl-ink); }
.cl-df-tab-bar-tab.cl-on { color: var(--cl-brand); border-bottom-color: var(--cl-brand); }
.cl-df-tab-bar-tab:focus-visible { outline-offset: calc(var(--focus-offset) * -1); }

/* The number next to a tab label, such as the number of documents. */
.cl-df-tab-bar-count {
  padding: 1px 7px; border-radius: var(--cl-r-pill);
  background: var(--cl-fill-2); color: var(--cl-ink-2);
  font-size: var(--fs-badge); font-variant-numeric: tabular-nums;
}
.cl-df-tab-bar-tab.cl-on .cl-df-tab-bar-count { background: var(--cl-brand-soft); color: var(--cl-brand); }

.cl-df-field-list { margin: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--cl-r-tile); overflow: hidden; }

.cl-df-field-list-row { display: grid; grid-template-columns: minmax(160px, 22%) 1fr; background: var(--cl-surface); }

.cl-df-field-list-label { padding: 11px 14px; font-size: var(--fs-body); font-weight: 600; color: var(--cl-ink-2); background: var(--cl-surface); margin: 0; }

.cl-df-field-list-value { padding: 11px 14px; font-size: var(--fs-body); color: var(--cl-ink); margin: 0; overflow-wrap: anywhere; }

.cl-df-field-list-value.cl-blank { color: var(--cl-ink-2); }

.cl-df-field-list-row.cl-tall .cl-df-field-list-value { min-height: 72px; }

/* A row that spans both columns — for notes and long texts. */
.cl-df-field-list-row.cl-wide { grid-column: 1 / -1; }

/* A heading inside the field list. Separates sections without opening a second card
   for it. */
/* Marked up as <h3>, so that the sections show up in the heading structure — a <div>
   in capital letters is just text to a screen reader. The font size of the heading is
   deliberately overridden here: the band should look like a label, not like a
   subheading. */
.cl-df-field-list-section {
  margin: 0;
  grid-column: 1 / -1;
  padding: var(--sp-4) var(--sp-5);
  background: var(--cl-fill-2);
  font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--cl-ink-2);
}

@media (max-width: 720px) {
  .cl-df-field-list-row { grid-template-columns: 1fr; }
  .cl-df-field-list-label { padding-bottom: 0; background: var(--cl-surface); }
}

/* Timeline (activities): one marker per entry — color and symbol from the event type
   (OrderEventTones / OrderEventTexts.Icon) — and a line down to the next one. */
.cl-df-timeline { list-style: none; margin: 0; padding: 0; }

.cl-df-timeline-item { position: relative; display: flex; gap: var(--sp-5); padding-bottom: var(--sp-7); }
.cl-df-timeline-item:last-child { padding-bottom: 0; }

/* The line runs under the middle of the marker, from just below it to the next entry. */
.cl-df-timeline-item::before {
  content: ""; position: absolute;
  left: calc(var(--timeline-marker) / 2 - 1px);
  top: calc(var(--timeline-marker) + 3px); bottom: 0;
  width: 2px; background: var(--border);
}
.cl-df-timeline-item:last-child::before { display: none; }

.cl-df-timeline-marker {
  position: relative; z-index: 1; flex: none;
  width: var(--timeline-marker); height: var(--timeline-marker);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--cl-fill-2); color: var(--cl-ink-2);
}
.cl-df-timeline-marker .cl-df-icon { font-size: 14px; }
.cl-df-timeline-marker.cl-blue  { background: var(--cl-blue-soft);  color: var(--cl-blue); }
.cl-df-timeline-marker.cl-green { background: var(--cl-green-soft); color: var(--cl-green); }
.cl-df-timeline-marker.cl-amber { background: var(--cl-amber-soft); color: var(--cl-amber); }
.cl-df-timeline-marker.cl-red   { background: var(--cl-red-soft);   color: var(--cl-red); }

.cl-df-timeline-body { flex: 1; min-width: 0; padding-top: var(--sp-1); }
.cl-df-timeline-text { margin: 0; font-size: var(--fs-body); color: var(--cl-ink); }
.cl-df-timeline-time { margin: var(--sp-1) 0 0; font-size: var(--fs-tile-title); color: var(--cl-ink-2); font-variant-numeric: tabular-nums; }

/* Order notes (P12): ruled entries instead of tiles, the field for a new note above them. */
.cl-df-notes { list-style: none; margin: 0; padding: 0; }

.cl-df-notes-item { padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.cl-df-notes-item:first-child { padding-top: 0; }
.cl-df-notes-item:last-child { border-bottom: 0; padding-bottom: 0; }

.cl-df-notes-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-2); }
.cl-df-notes-author { font-size: var(--fs-chip); font-weight: 600; color: var(--cl-ink); }
.cl-df-notes-time { font-size: var(--fs-chip); color: var(--cl-ink-2); }
.cl-df-notes-confirmed { margin-left: auto; }

.cl-df-notes-text { margin: 0; font-size: var(--fs-body); white-space: pre-wrap; }

.cl-df-notes-form { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); padding-bottom: var(--sp-5); border-bottom: 1px solid var(--border); }
.cl-df-notes-form:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.cl-df-notes-form-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }

/* Document tiles (doc-card): the preview fills the top edge to edge, title and
   detail below it. The padding sits on the children, so the preview can reach
   the frame. */
.cl-df-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.cl-df-tile {
  display: grid; align-content: start; gap: 2px;
  padding: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--cl-r-tile);
  background: var(--cl-surface);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
}
.cl-df-tile > :not(.cl-df-tile-preview) { padding-inline: 12px; }

.cl-df-tile:hover { border-color: var(--cl-stroke-2); box-shadow: var(--cl-sh); transform: translateY(-1px); }

.cl-df-tile.cl-on { border-color: var(--cl-brand); box-shadow: inset 0 0 0 1px var(--cl-brand); }

.cl-df-tile:focus-visible { outline: var(--focus-width) solid var(--cl-brand); outline-offset: var(--focus-offset); }

.cl-df-tile.cl-skeleton { cursor: default; padding-top: 12px; }
.cl-df-tile.cl-skeleton:hover { transform: none; box-shadow: none; border-color: var(--border); }

/* A skeleton that brings a preview area of its own needs no inset at the top: the
   area runs to the edge, exactly as it does on the finished tile. The 12px above
   are part of the jump in height the document grid made when the tiles arrived.
   Skeletons without a preview area (the template tiles) keep them — without the
   inset their bar would be glued to the frame. */
.cl-df-tile.cl-skeleton:has(> .cl-df-tile-preview) { padding-top: 0; }

.cl-df-tile-preview {
  display: grid;
  place-items: center;
  height: var(--tile-preview-h);
  margin-bottom: var(--sp-2);
  background: var(--cl-fill);
  border-bottom: 1px solid var(--border);
  color: var(--cl-ink-3);
}
.cl-df-tile-preview .cl-df-icon { font-size: 34px; }

/* The preview area of the skeleton: filled instead of centred, and without the
   grey of the finished area — the shimmering surface inside it is the statement. */
.cl-df-tile-preview.cl-skeleton { place-items: stretch; background: none; }
.cl-df-skeleton.cl-fill { width: 100%; height: 100%; border-radius: 0; }

/* The text lines of the skeleton as high as title and subtitle (or a row of the facts
   table) of the tile, so both are the same height and the grid does not jump when the
   documents arrive. The height is CALCULATED from the font sizes: if they change, the
   skeleton goes along instead of staying behind with a number of its own. */
.cl-df-tile-lines { display: grid; gap: 2px; }
.cl-df-tile-line { display: flex; align-items: center; }
.cl-df-tile-line.cl-title { height: calc(var(--cl-fs-small) * 1.45); }
.cl-df-tile-line.cl-subtitle { height: calc(var(--fs-tile-title) * 1.45); }
.cl-df-skeleton.cl-bar { height: var(--skeleton-bar); width: 80%; }
.cl-df-skeleton.cl-bar-short { width: 45%; }

/* The symbol plate: the type of a document at a glance, in its colour. It stands
   on the preview area where no thumbnail can come or where one failed to load.

   The rule for the symbol comes AFTER .cl-df-tile-preview .cl-df-icon deliberately: both
   selectors weigh the same, so order decides — without it the symbol would stay
   at its 34px, which other tiles still use. */
.cl-df-tile-plate {
  display: grid;
  place-items: center;
  width: var(--tile-plate);
  height: var(--tile-plate);
  border-radius: var(--cl-r-card);
  background: var(--cl-surface);
  border: 1px solid var(--border);
  box-shadow: var(--cl-sh);
  color: var(--cl-ink-2);
}
.cl-df-tile-plate .cl-df-icon { font-size: var(--tile-icon); }

.cl-df-tile-plate.cl-pdf   { background: var(--cl-red-soft);    color: var(--cl-red); }
.cl-df-tile-plate.cl-image { background: var(--cl-purple-soft); color: var(--cl-purple); }

.cl-df-tile-title,
.cl-df-tile-subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-df-tile-title { font-size: var(--cl-fs-small); font-weight: 600; color: var(--cl-ink); }
.cl-df-tile-subtitle { font-size: var(--fs-tile-title); color: var(--cl-ink-2); }

/* The state on the document tile: a pill on the preview, top right (doc-pill in the
   mockup); in the reading order it follows the title. Only the place — the pill inside
   is the style guide's and keeps its form and tone (rule 5). */
.cl-df-tile { position: relative; }
.cl-df-tile > .cl-df-tile-state { position: absolute; top: var(--sp-3); right: var(--sp-3); }

/* The facts of a document tile as a small table below the title: label left, value
   right, one row each (DocumentTile). Spans on a grid — a button holds phrasing content
   only, no <table>, no <dl>. The row height is the skeleton's line (1.45 × the font
   size); minmax(0, 1fr) lets a long description end in its ellipsis instead of
   widening the tile. */
.cl-df-tile-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px var(--sp-3);
  min-width: 0;
  font-size: var(--fs-tile-title);
  line-height: 1.45;
}
/* The document grid (DocumentTiles) is wider at its narrowest than the template tiles: at 190px
   the label column ("Beschreibung", 77px) left a date 90 of the 101px it needs. */
.cl-df-tile-grid.cl-documents { grid-template-columns: repeat(auto-fill, minmax(var(--tile-doc-min), 1fr)); }

.cl-df-tile-fact-label { color: var(--cl-ink-3); }
.cl-df-tile-fact-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cl-ink-2); }

/* ----------------------------------------------------------------------------
   Tile view of the templates

   The grid carries <li> elements instead of the tiles directly: the action (delete)
   lies NEXT TO the link and not inside it — a button in an <a> is invalid
   markup, and a second target in the same link would be a trap for keyboard and
   screen reader users. The <li> is the positioning frame for it.
   ---------------------------------------------------------------------------- */
.cl-df-tile-grid.cl-templates { list-style: none; margin: 0; padding: 0; }

.cl-df-tile-grid.cl-templates > li { position: relative; }

.cl-df-tile.cl-link {
  height: 100%;
  color: inherit;
  text-decoration: none;
  align-content: start;
}

/* Until W4 the general a:hover outweighed the single variant class and underlined the whole tile;
   two classes would now win against it. Kept as it was (W4 changes nothing visible). */
.cl-df-tile.cl-link:hover { text-decoration: underline; }
.cl-df-tile.cl-link:hover .cl-df-tile-title { text-decoration: underline; }

/* Fixed height on the image as on the placeholder: the grid must not jerk when the
   preview images arrive — they come in one by one. Templates and documents alike. */
.cl-df-tile-image {
  max-width: 100%;
  max-height: var(--tile-preview-h);
  object-fit: contain;
}

.cl-df-tile-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }

/* The action lies ABOVE the tile, otherwise the link would catch the click. */
.cl-df-tile-action { position: absolute; top: var(--sp-3); right: var(--sp-3); z-index: 1; }

/* ----------------------------------------------------------------------------
   Switcher between list and tiles
   ---------------------------------------------------------------------------- */
/* A panel of the account settings. The inactive ones stay in the tree and are only
   hidden, so that typed input survives switching tabs.

   The hiding is stated explicitly here: [hidden] already works via the browser's
   stylesheet, but any display rule of our own at the same place would beat it
   — and then all four panels would stand one below the other, without anyone
   noticing when reading the markup. */
/* Admin interventions on the order: a narrow bar below the page header. */
.cl-df-interventions {
	display: flex;
	flex-direction: column;
	gap: var(--sp-2);
	margin-bottom: var(--sp-4);
}

.cl-df-interventions-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
}

.cl-df-interventions-reset {
	display: flex;
	flex-direction: column;
	gap: var(--sp-2);
}

.cl-df-interventions-message:empty { display: none; }

.cl-df-interventions-message,
.cl-df-preview-message { font-size: var(--cl-fs-small); }

.cl-df-preview-message:empty { display: none; }

/* The assigned user of the order and the switch (OrderAssignee, P11): the last fact of the head card
   (OrderHead, cl-df-headcard-assignee). Name and label like the other facts, the pencil at the end of
   the line - centred on the two lines of name and label; the choice and the prompt open below. */
.cl-df-assignee { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.cl-df-assignee-line { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-width: 0; }
.cl-df-assignee-name { overflow-wrap: anywhere; }
.cl-df-assignee-actions { display: flex; flex-direction: column; gap: var(--sp-2); align-items: stretch; }
.cl-df-assignee-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cl-df-assignee-message:empty { display: none; }
.cl-df-assignee-message { font-size: var(--cl-fs-small); }

.cl-df-preview-intervention { padding: var(--sp-3) 0 0; }

/* Cover sheet: one row per type, with status, actions and feedback stacked below each other. */
.cl-df-cover-sheet {
	display: flex;
	flex-direction: column;
	gap: var(--sp-2);
	padding: var(--sp-4) 0;
	border-bottom: 1px solid var(--border);
}

.cl-df-cover-sheet:last-of-type { border-bottom: 0; }

.cl-df-cover-sheet-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--sp-3);
}

.cl-df-cover-sheet-name { font-weight: 600; }

.cl-df-cover-sheet-status {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-1);
	color: var(--cl-ink-2);
	font-size: var(--cl-fs-small);
}

.cl-df-cover-sheet-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sp-2);
}

.cl-df-cover-sheet-message {
	min-height: 1.25rem;
	color: var(--cl-ink-2);
	font-size: var(--cl-fs-small);
}

/* Footer below a table: the button that adds a row. */
.cl-df-table-footer { padding: var(--sp-4) 0 0; }

.cl-df-account-panel[hidden] { display: none; }

/* Account settings (stage 4d): one card. A grid of fields below a row of checkboxes keeps
   its distance; the parts with a save path of their own (additional fields, cover sheet)
   start below the account's save bar with a line of their own. */
.cl-df-account-panel-after-toggles { margin-top: var(--sp-5); }
.cl-df-account-panel.cl-own-path { border-top: 1px solid var(--border); }


.cl-df-preview { margin-top: var(--sp-6); border: 1px solid var(--border); border-radius: var(--cl-r-tile); overflow: hidden; }

/* The embedded file. Fixed height, because an <object> without dimensions collapses to
   150px — the browser default for replaced elements without a size of their own. */
.cl-df-preview-pdf { display: block; width: 100%; height: min(70vh, 800px); border: 0; }

/* An image, on the other hand, gets its natural height, only capped: a prescription in
   portrait format should not be squeezed to postage-stamp size. */
.cl-df-preview-image {
  display: block; max-width: 100%; max-height: min(70vh, 800px);
  margin: 0 auto; background: var(--cl-fill);
}

.cl-df-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--cl-fill);
  border-bottom: 1px solid var(--border);
}

.cl-df-preview-title { font-size: 14px; font-weight: 600; }
.cl-df-preview-content { padding: var(--sp-5); }

/* Template editor (TemplateEditor): the details on the left, the stored file on the
   right on the --fill surface of the mockup (doc-edit, E4). Each column carries a card head and
   body (CardHeader, CardBody), so both heads stand on one line. Below
   1180 px the file moves under the details — the form grid inside would otherwise
   get less than 200 px per field. */
.cl-df-template-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cl-df-template-editor-details { min-width: 0; border-right: 1px solid var(--border); }
.cl-df-template-editor-file {
  min-width: 0;
  background: var(--cl-fill);
  border-bottom-right-radius: var(--cl-r-card);
}
.cl-df-template-editor-file .cl-df-preview { background: var(--cl-surface); box-shadow: var(--cl-sh); }
/* "> * >": the preview sits in the column's card body; this file names no part of the card (section 9). */
.cl-df-template-editor-file > * > .cl-df-preview:first-child { margin-top: 0; }
/* The live region for "keine Datei" stands before the preview permanently (TemplateEditor). While it
   is empty the preview is still the first thing in the column. */
.cl-df-template-editor-file > * > .cl-df-template-editor-status:empty:first-child + .cl-df-preview { margin-top: 0; }
/* The checkboxes of a template (ToggleRow), below the fields — in the editor and in the new form.
   A plain container: the boxes are the guide's .cl-fld > label.cl-check. */
.cl-df-template-flags { margin-top: var(--sp-5); }

@media (max-width: 1180px) {
  .cl-df-template-editor { grid-template-columns: minmax(0, 1fr); }
  .cl-df-template-editor-details { border-right: 0; border-bottom: 1px solid var(--border); }
  .cl-df-template-editor-file { border-bottom-left-radius: var(--cl-r-card); }
}



/* ============================================================================
   23  Editing forms

   What EDITABLE forms need beside the field of the style guide (section 10): form footer and
   confirmation prompt. The setting row (ToggleRow) is the guide's checkbox since W7g.
   As everywhere in this file: no fixed color, radius or shadow values.
   ============================================================================ */

/* --- Form footer -----------------------------------------------------------
   Inside a detail section the footer has a counter-rule: .cl-df-detail-form in 9.2.
   Message on the left, buttons on the right. Stacked on narrow windows, so that
   the buttons do not shrink — they are the target of a finger. */
.cl-df-form-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5); flex-wrap: wrap;
  padding: var(--sp-5) var(--card-pad-x);
  border-top: 1px solid var(--border);
  background: var(--cl-fill);
}

/* Idle: only the (empty) live region remains; no bar, no height. */
.cl-df-form-actions.cl-idle { padding: 0; border-top: 0; background: none; }
.cl-df-form-actions.cl-idle .cl-df-form-actions-message { min-height: 0; }

.cl-df-form-actions-message { min-height: 20px; font-size: var(--cl-fs-small); }
.cl-df-form-actions-message > span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.cl-df-form-actions-message .cl-df-icon { font-size: 16px; flex: none; }

.cl-df-form-actions-error { color: var(--cl-red); font-weight: 600; }
.cl-df-form-actions-pending  { color: var(--cl-ink-2); }
.cl-df-form-actions-busy { color: var(--cl-ink-2); }

.cl-df-form-actions-spinner {
  width: 13px; height: 13px; flex: none; border-radius: 50%;
  /* In the colour of its button (W7a: it now sits on the primary fill, where --brand vanished). */
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Anyone who has turned off motion still gets feedback: the spinner stops,
   and the text "Wird gespeichert" carries the message on its own anyway. */
@media (prefers-reduced-motion: reduce) {
  .cl-df-form-actions-spinner { animation: none; }
}

.cl-df-form-actions-buttons { display: flex; gap: var(--sp-3); margin-left: auto; }

/* At the foot of a card the bar follows its rounded corners (profile, account settings) —
   instead of overflow:hidden on the card, which would also clip focus rings. Only while
   nothing visible follows the form: on the account settings a part with a save path of its
   own can come below it.

   The radius is inherited from the card down through the form (since W7d this file names no part
   of the card, section 9). A form whose parent has no radius — in a card body, in a list row —
   passes on 0, and the bar keeps its square corners there. */
form:not(:has(~ :not([hidden]))):has(> .cl-df-form-actions:last-child) {
  border-bottom-left-radius: inherit; border-bottom-right-radius: inherit;
}
form:not(:has(~ :not([hidden]))) > .cl-df-form-actions:last-child {
  border-bottom-left-radius: inherit; border-bottom-right-radius: inherit;
}

/* --- Confirmation prompt --------------------------------------------------- */
.cl-df-confirm-prompt {
  display: grid; gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--cl-red-soft);
  border-radius: var(--cl-r-tile);
  background: var(--cl-red-soft);
}

.cl-df-confirm-prompt-text  { margin: 0; font-size: var(--fs-nav); font-weight: 600; color: var(--cl-ink); }
.cl-df-confirm-prompt-consequence { margin: 0; font-size: var(--fs-avatar); color: var(--cl-ink-2); }
.cl-df-confirm-prompt-buttons { display: flex; gap: var(--sp-3); }

/* The confirming button is filled (.cl-btn.cl-danger, the style guide's kind for the main action
   of a confirmation): the quiet kind would disappear on the soft surface of the prompt. */


/* --- Form section ---------------------------------------------------------- */
/* No row gap, as in the form grid: the fields bring their space below. */
.cl-df-form-fields { display: grid; }

/* Two columns as long as there is room — first name/last name and postal code/city
   belong side by side, not one below the other. */
.cl-df-form-fields.cl-pair {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 var(--sp-5);
}


/* ============================================================================
   24  Editing IN the table row

   Added for the device list: the name there is no longer changed in an
   expanding extra row, but in place — pencil, check mark, cross. As
   everywhere in this file: tokens only, no color, radius or shadow
   values.
   ============================================================================ */

/* --- Icon-only button -------------------------------------------------------
   Since W7a a .cl-btn of the style guide with nothing but an icon (Buttons, "Nur Symbol"): kind,
   size and icon size come from carelogic-controls.css. What CSS cannot do here and still belongs to
   it: without a label such a button is mute for a screen reader. Every icon-only button needs an
   aria-label that names the action AND its target ("Namen von iPad Pro bearbeiten") — the icon
   itself stays aria-hidden, otherwise it is announced twice. The Icon component sets aria-hidden
   on its own. */

/* The spinner in the check mark while saving. The same tokens as in the form footer
   (--border/--brand). */
.cl-df-save-spinner {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  /* In the colour of its button (W7a: it now sits on the primary fill, where --brand vanished). */
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin .7s linear infinite;
}

/* Anyone who has turned off motion gets the message from the text "Wird
   gespeichert …" next to it — just like in the form footer. */
@media (prefers-reduced-motion: reduce) {
  .cl-df-save-spinner { animation: none; }
}

/* --- The name cell ---------------------------------------------------------
   Text and pencil at rest, input field with check mark and cross while
   editing — both in the SAME cell. The button sits on the right so that it is
   in the same spot in all rows and does not wander with the length of the name.

   No position/z-index (removed 09.11.2026): a leftover of the row overlay (P5a). Lifted to
   z-index 2 the cell slid over the sticky table head (z-index 1, section 8) while the rows scrolled
   - the overview's device card showed name and pencil on top of the head. */
.cl-df-name-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.cl-df-name-cell-text { min-width: 0; overflow-wrap: anywhere; }

/* The input is the compact control of a table row (section 18); here it takes the width the two
   buttons leave. */
.cl-df-name-cell > .cl-df-compact-input { flex: 1 1 auto; min-width: 0; }

/* The row message: "Wird gespeichert …" or the error text. It is always in
   the DOM while editing — even when empty, so that the role="status" is
   already there when the text appears. Without text it therefore carries no
   spacing either, otherwise it would tear a gap into every row being edited. */
.cl-df-name-cell-message {
  margin: 0;
  font-size: var(--fs-avatar);
  color: var(--cl-ink-2);
}

.cl-df-name-cell-message:not(:empty) { margin-top: 5px; }

.cl-df-name-cell-message.cl-error { color: var(--cl-red); font-weight: 600; }


/* ============================================================================
   25  (gone: the documents of an inquiry are tiles now, as those of an order — section 22.
       The sentence in the card header that stays after saving lived here until W7d; it is
       an error banner of the style guide below the head now, CardHeader.ErrorMessage)
   ============================================================================ */


/* ============================================================================
   26  Quicklinks (slice 1, hyperlinks only)

   Two appearances of the same data: the TILE on the overview
   (.cl-df-quicklink) and the ROW on the manage page (.cl-df-quicklink-row). The
   tile is a link across its whole area, the row carries link, marker
   and buttons side by side.

   As everywhere in this file: no fixed color, radius or
   shadow values, tokens only. The four measures of its own are in section 1.
   Source of the rules: docs/webui/mockups/quicklinks.html, PART 3.
   ============================================================================ */

/* --- Tiles (overview) ----------------------------------------------------
   auto-fill instead of auto-fit: with two tiles, two columns should arise and
   not two tiles grow to half the window width.
   The single-column variant of the draft is NOT here: it belonged
   to the header bar menu of variant C, which was not built. A rule without
   a caller is a claim about an element that does not exist. */
.cl-df-quicklinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ql-tile-min), 1fr)); gap: var(--sp-4); }
.cl-df-quicklinks-item { min-width: 0; }
.cl-df-quicklinks-group + .cl-df-quicklinks-group { margin-top: var(--sp-6); }
.cl-df-quicklinks-group-title { margin: 0 0 var(--sp-4); font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--tracking-title); text-transform: uppercase; color: var(--cl-ink-2); }
.cl-df-quicklinks-more { margin-top: var(--sp-5); font-size: var(--cl-fs-small); font-weight: 600; }

/* The placeholder has the height of a tile: the card does not jump when the data
   arrives. .cl-df-skeleton brings the delay with it. */
.cl-df-quicklinks-skeleton { display: block; height: var(--ql-tile-h); border-radius: var(--cl-r-tile); }

/* Empty state of the CARD - one line, no big empty card: the overview
   should not grow by 200 px just because there is nothing. */
.cl-df-quicklinks-empty { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-5); }
.cl-df-quicklinks-empty-text { flex: 1 1 var(--ql-main-min); min-width: 0; }
.cl-df-quicklinks-empty-title { margin: 0; font-weight: 700; color: var(--cl-ink); }
.cl-df-quicklinks-empty-detail { margin: 0; font-size: var(--cl-fs-small); color: var(--cl-ink-2); }

.cl-df-quicklink { display: flex; align-items: center; gap: var(--sp-4); height: 100%; min-height: var(--ql-tile-h); padding: var(--sp-4) var(--sp-5); background: var(--cl-fill); border: 1px solid var(--border); border-radius: var(--cl-r-tile); color: inherit; text-decoration: none; transition: background var(--duration-fast), border-color var(--duration-fast); }
.cl-df-quicklink:hover { background: var(--cl-fill-2); border-color: var(--cl-stroke-2); text-decoration: none; }
.cl-df-quicklink:hover .cl-df-quicklink-title { text-decoration: underline; }
.cl-df-quicklink-icon,
.cl-df-quicklink-row-icon { width: var(--row-avatar); height: var(--row-avatar); flex: none; display: grid; place-items: center; border-radius: var(--r-avatar); background: var(--cl-brand-soft); color: var(--cl-brand); }
.cl-df-quicklink-icon .cl-df-icon,
.cl-df-quicklink-row-icon .cl-df-icon { font-size: 16px; }
.cl-df-quicklink-text { flex: 1; min-width: 0; display: grid; }

/* Cut off after two lines: a very long label should not pull the tile
   up in height. It stands in full on the manage page. */
.cl-df-quicklink-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.3; font-weight: 600; color: var(--cl-ink); }
.cl-df-quicklink-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-tile-title); color: var(--cl-ink-2); }
.cl-df-quicklink-external { flex: none; color: var(--cl-ink-3); }
.cl-df-quicklink-external .cl-df-icon { font-size: 14px; }

/* --- Manage page: group card and rows ----------------------------------- */
/* Directly below the card head (CardHeader), in the head's horizontal padding. */
.cl-df-quicklink-group-description { margin: 0; padding: 0 var(--card-pad-x) var(--sp-4); font-size: var(--cl-fs-small); font-weight: 400; color: var(--cl-ink-2); }
.cl-df-quicklink-group-actions { display: flex; gap: var(--sp-2); flex: none; }
.cl-df-quicklink-group-empty { margin: 0; padding: var(--sp-5) var(--card-pad-x); font-size: var(--cl-fs-small); color: var(--cl-ink-2); }
.cl-df-quicklink-group-notice { padding: var(--sp-5) var(--card-pad-x); border-bottom: 1px solid var(--border); }
/* Divider line below the group head (P6); the head itself is the guide's .cl-card-h in CardHeader. */
.cl-df-quicklink-group-head { border-bottom: 1px solid var(--border); }
/* The inline form of a new link, standing in its group like the row being edited. */
.cl-df-quicklink-inline { background: var(--cl-fill); border-bottom: 1px solid var(--border); }
.cl-df-quicklink-inline .cl-df-form-actions { background: var(--cl-fill-2); }

.cl-df-quicklink-list { margin: 0; padding: 0; list-style: none; }
.cl-df-quicklink-list > li + li { border-top: 1px solid var(--border); }
.cl-df-quicklink-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); padding: var(--sp-5) var(--card-pad-x); }
.cl-df-quicklink-row-main { flex: 1 1 var(--ql-main-min); min-width: 0; display: grid; gap: var(--sp-1); }
.cl-df-quicklink-row-title { justify-self: start; max-width: 100%; overflow-wrap: anywhere; font-weight: 600; }
.cl-df-quicklink-row-description { margin: 0; font-size: var(--cl-fs-small); color: var(--cl-ink-2); }
.cl-df-quicklink-row-url { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--cl-mono); font-size: var(--fs-tile-title); color: var(--cl-ink-2); }
.cl-df-quicklink-row-actions { display: flex; gap: var(--sp-2); flex: none; }

/* The confirmation prompt takes a row of its own so that it is not squeezed in between the marker
   and the buttons. */
.cl-df-quicklink-row-confirm { flex: 1 1 100%; }

/* The row being edited right now carries the form - it is then
   no longer a flex strip but a block. */
.cl-df-quicklink-row.cl-editing { padding: 0; display: block; background: var(--cl-fill); }
/* The heading of the row being edited: a heading inside the group card, not a card head (h3 below the
   card's h2). Spaced like the guide's head, so that the form's body follows it in the same way. */
.cl-df-quicklink-row-heading { margin: 0; padding: var(--sp-5) var(--card-pad-x) var(--sp-3); font-size: var(--fs-h3); font-weight: 700; color: var(--cl-ink); }
.cl-df-quicklink-row.cl-editing .cl-df-form-actions { background: var(--cl-fill-2); }

/* --- Icon choice in the form ---------------------------------------------
   Radio buttons that look like tiles: the radio button lies invisibly over the
   icon so that keyboard and screen reader find a real selection group
   to work with. */
/* The space below like a field of the guide (.cl-fld): the form grid has no row gap (section 10). */
.cl-df-quicklink-iconpicker { min-width: 0; margin: 0 0 var(--sp-5); padding: 0; border: 0; }
.cl-df-quicklink-iconpicker-legend { padding: 0; margin-bottom: var(--sp-2); font-size: var(--fs-label); font-weight: 600; letter-spacing: .03em; color: var(--cl-ink-2); }
.cl-df-quicklink-iconpicker-options { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cl-df-quicklink-iconpicker-option { position: relative; display: block; }
.cl-df-quicklink-iconpicker-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cl-df-quicklink-iconpicker-face { display: grid; place-items: center; width: var(--ctrl-h-sm); height: var(--ctrl-h-sm); border: 1px solid var(--border); border-radius: var(--cl-r-ctrl); background: var(--cl-fill); color: var(--cl-ink-2); }
.cl-df-quicklink-iconpicker-face .cl-df-icon { font-size: 18px; }
.cl-df-quicklink-iconpicker-option:hover .cl-df-quicklink-iconpicker-face { border-color: var(--cl-stroke-2); color: var(--cl-ink); }
.cl-df-quicklink-iconpicker-input:checked + .cl-df-quicklink-iconpicker-face { background: var(--cl-brand-soft); color: var(--cl-brand); border-color: var(--cl-brand); box-shadow: 0 0 0 1px var(--cl-brand); }
.cl-df-quicklink-iconpicker-input:focus-visible + .cl-df-quicklink-iconpicker-face { outline: var(--focus-width) solid var(--cl-brand); outline-offset: var(--focus-offset); }

/* ============================================================================
   19. OVERVIEW (W11, ADR 0002, 10.4, H4)
   The overview is the guide's A7 without its hero (the search is in the app bar only, section 6.2):
   .cl-dashgrid, whose cells are plain
   divs with cards stacked in them (the guide's 12 px between .cl-card + .cl-card), tiles .cl-dtile in
   .cl-tilegrid, the third cell .cl-dashspan. None of these is restyled here. What the guide lacks:
   - the line of the attention card: bar, name, one explaining sentence, count, arrow (19.2). The
     guide's .cl-markrow has no sentence; a candidate for the style guide (merge request);
   - the number of a tile while it loads (19.3);
   - horizontal bars in a card, every bar a link (19.5). The guide's chart cards (15b) draw time series
     with a chart script; a short distribution needs none.
   ============================================================================ */

/* --- 19.2 Line of the attention card (CauseRow) ---------------------------- */
/* The mark colour comes as --cl-mark from the guide's .cl-mk-* classes (carelogic-app.css); the bar
   only reads it. Anchor and button alike: the name and the count are text, so the colour never
   carries the meaning alone. */
.cl-df-cause {
  display: grid; grid-template-columns: 4px minmax(0, 1fr) auto auto; align-items: center;
  gap: var(--sp-4);
  width: 100%; padding: var(--sp-4) var(--card-pad-x);
  border-bottom: 1px solid var(--cl-stroke);
  color: var(--cl-ink);
  transition: background-color var(--duration-fast);
}
.cl-df-cause:last-child { border-bottom: 0; }
.cl-df-cause:hover { background: var(--cl-fill); }
.cl-df-cause:focus-visible {
  outline: var(--focus-width) solid var(--cl-brand);
  outline-offset: calc(var(--focus-offset) * -1);
}
.cl-df-cause-bar { align-self: stretch; min-height: 30px; border-radius: var(--cl-r-pill); background: var(--cl-mark, var(--cl-brand)); }
.cl-df-cause-title { display: block; font-size: var(--fs-body); font-weight: 600; line-height: 1.25; }
.cl-df-cause-text { display: block; margin-top: 2px; font-size: var(--fs-chip); line-height: 1.4; color: var(--cl-ink-2); }
.cl-df-cause-n { font-size: var(--fs-h2); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-df-cause-atleast { font-size: var(--fs-chip); font-weight: 600; color: var(--cl-ink-2); }
.cl-df-cause .cl-df-icon { font-size: 16px; color: var(--cl-ink-3); }

/* --- 19.3 Tile: the number while it loads ----------------------------------- */
.cl-df-tile-placeholder { display: inline-block; width: 40px; height: 12px; vertical-align: middle; }

/* --- 19.4 The device card ends with its neighbours -------------------------- */
/* The guide's grid lets every column be as tall as its content (align-items: start), and the
   compact device list shows up to 25 rows: the middle column ran far below the other two. From two
   columns on (the guide's single column starts below 820 px) the column stretches to the row, and
   the device card takes what is left of it - size containment keeps its rows out of the row
   height, so the tallest neighbour decides. Inside, the table frame scrolls (head and pager stay);
   below a few rows it does not shrink. On one column nothing changes. */
@media (min-width: 821px) {
  .cl-df-dash-fill { align-self: stretch; display: flex; flex-direction: column; }
  .cl-df-dash-fill > .cl-df-dash-devices {
    flex: 1 1 0; min-height: var(--dash-devices-min-h);
    contain: size; display: flex; flex-direction: column;
  }
  .cl-df-dash-devices .cl-df-table-view,
  .cl-df-dash-devices .cl-df-table-view-content { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
  .cl-df-dash-devices .cl-df-table-frame { flex: 1 1 0; min-height: 0; max-height: none; }
}

/* --- 19.5 Bars in a card (BarList) ------------------------------------------- */
/* One data series per group in --cl-viz-1, as the guide's charts (15b). A line is a link: name, track, count,
   arrow - the name and the count are text, the bar is decoration. The length comes as an inline width (data);
   a small count keeps a sliver of a bar, a zero gets none (BarList leaves the fill out). */
.cl-df-bars { list-style: none; margin: 0; padding: 0 0 var(--sp-3); }
.cl-df-bars-caption {
  margin: 0; padding: var(--sp-4) var(--card-pad-x) var(--sp-2);
  font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--cl-ink-3);
}
.cl-df-bars + .cl-df-bars-caption { border-top: 1px solid var(--cl-stroke); }
.cl-df-bar {
  display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 3.2em 16px; align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--card-pad-x);
  color: var(--cl-ink);
  transition: background-color var(--duration-fast);
}
.cl-df-bar:hover { background: var(--cl-fill); }
.cl-df-bar:focus-visible {
  outline: var(--focus-width) solid var(--cl-brand);
  outline-offset: calc(var(--focus-offset) * -1);
}
.cl-df-bar-label { font-size: var(--fs-chip); color: var(--cl-ink-2); white-space: nowrap; }
.cl-df-bar-track { position: relative; height: 10px; border-radius: var(--cl-r-pill); background: var(--cl-fill-2); }
.cl-df-bar-fill { position: absolute; inset: 0 auto 0 0; min-width: 3px; border-radius: inherit; background: var(--cl-viz-1); }
.cl-df-bar-n { text-align: right; font-size: var(--fs-body); font-weight: 700; font-variant-numeric: tabular-nums; }
.cl-df-bar .cl-df-icon { font-size: 14px; color: var(--cl-ink-3); }

/* ============================================================================
   20. COVER SHEET EDITOR (P7c, D50 in docs/webui/redesign-v3-briefs.md)
   The page of Components/CoverEditor/ is the ONLY one that loads DevExpress (theme Fluent,
   ApplyToPageElements off; written by EditorTheme/EditorScripts for this route only). Everything here is
   therefore inert on every other page.
   Recolouring goes through the vendor's accent variables --dxbl-accent-color-NN and nothing else: the
   theme reads them as `--dxds-primary-NN: var(--dxbl-accent-color-NN, <blue>)` AT :root, so they have to
   be set at :root too (on a wrapper they would come too late). The ramp: 90 is the brand colour, 10-80
   mix it towards white, 100-140 towards black. In dark mode --cl-brand is the lightened one, so the ramp
   follows the scheme. A value that merely passes var(--cl-brand) on would count as an alias
   (CarelogicTokenRulesTests); a mix does not.
   ============================================================================ */
:root {
  --dxbl-accent-color-10:  color-mix(in srgb, var(--cl-brand) 10%, white);
  --dxbl-accent-color-20:  color-mix(in srgb, var(--cl-brand) 20%, white);
  --dxbl-accent-color-30:  color-mix(in srgb, var(--cl-brand) 30%, white);
  --dxbl-accent-color-40:  color-mix(in srgb, var(--cl-brand) 40%, white);
  --dxbl-accent-color-50:  color-mix(in srgb, var(--cl-brand) 55%, white);
  --dxbl-accent-color-60:  color-mix(in srgb, var(--cl-brand) 70%, white);
  --dxbl-accent-color-70:  color-mix(in srgb, var(--cl-brand) 85%, white);
  --dxbl-accent-color-80:  color-mix(in srgb, var(--cl-brand) 95%, white);
  --dxbl-accent-color-90:  color-mix(in srgb, var(--cl-brand) 100%, white);
  --dxbl-accent-color-100: color-mix(in srgb, var(--cl-brand) 88%, black);
  --dxbl-accent-color-110: color-mix(in srgb, var(--cl-brand) 75%, black);
  --dxbl-accent-color-120: color-mix(in srgb, var(--cl-brand) 60%, black);
  --dxbl-accent-color-130: color-mix(in srgb, var(--cl-brand) 45%, black);
  --dxbl-accent-color-140: color-mix(in srgb, var(--cl-brand) 30%, black);
}

/* The editor's own layout has no shell: a window of its own, two thin bars, then the notes, then the editor, which
   takes everything that is left - the full width included. */
.cl-df-cover-editor { display: flex; flex-direction: column; height: 100%; height: 100dvh; background: var(--cl-bg); color: var(--cl-ink); }
.cl-df-cover-editor-bar { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); background: var(--cl-surface); }
.cl-df-cover-editor-title { margin: 0; font-size: var(--fs-h2); font-weight: 700; }
.cl-df-cover-editor-state { font-size: var(--fs-chip); font-weight: 600; color: var(--cl-ink-2); }
.cl-df-cover-editor-spacer { flex: 1 1 auto; }
.cl-df-cover-editor-notes { flex: 0 1 auto; min-height: 0; max-height: 40%; overflow-y: auto; padding: 0 var(--sp-4); }
.cl-df-cover-editor-stage { flex: 1 1 auto; min-height: 0; display: flex; }
.cl-df-cover-editor-surface { flex: 1 1 100%; width: 100%; min-width: 0; height: 100%; }

/* The general rule `img, svg, video { max-width: 100% }` (section 2) shrinks the editor's icons to width 0: the ribbon of DevExpress
   lays out adaptively and its SVGs sit in boxes of no fixed width, so "100% of nothing" is nothing and the ribbon falls back to
   text. Popups and dialogs of the editor are appended to <body>, outside the stage, so the selector hangs on the body that
   holds the editor page - and on nothing else. No DevExpress class is named. */
body:has(.cl-df-cover-editor) svg { max-width: none; }
