/* Own classes on top of Tabler for every theme (prefix av-). Only what Tabler does not provide.
   All colors come from variables: --tblr-* (Tabler or the theme) and --av-* (the theme). No color values in this
   file. The defaults below derive the --av-* variables from Tabler, so the classes also work without a theme;
   a theme file is loaded after this one and overrides them. */

:root {
  --av-gap: .75rem;  /* gap between the fields of a filter bar and of a form grid, in both directions */
  --av-brand: var(--tblr-primary);
  --av-brand-text: var(--tblr-link-color);
  --av-brand-text-hover: var(--tblr-link-hover-color);
  --av-brand-soft: var(--tblr-primary-lt);
  --av-brand-border: color-mix(in oklab, var(--tblr-primary) 30%, var(--tblr-bg-surface));
  --av-header-bg: var(--tblr-dark);
  --av-header-text: var(--tblr-white);
  --av-header-text-muted: color-mix(in oklab, var(--tblr-white) 78%, var(--tblr-dark));
  --av-header-link-hover-bg: color-mix(in oklab, var(--tblr-white) 8%, var(--tblr-dark));
  --av-header-link-active-bg: color-mix(in oklab, var(--tblr-white) 14%, var(--tblr-dark));
  --av-header-border: color-mix(in oklab, var(--tblr-white) 20%, transparent);
  --av-deco-1: color-mix(in oklab, var(--av-brand) 30%, var(--tblr-dark));
  --av-deco-2: color-mix(in oklab, var(--av-brand) 55%, var(--tblr-dark));
  --av-deco-3: color-mix(in oklab, var(--av-brand) 40%, var(--tblr-dark));
  --av-tile-bg: var(--tblr-bg-surface-secondary);
  --av-tile-icon-bg: var(--tblr-bg-surface);
  --av-avatar-bg: var(--av-brand-text);
  --av-avatar-text: var(--tblr-white);
  --av-logo-on-light: var(--av-brand);
  --av-logo-on-dark: var(--tblr-white);
  --av-overlay: color-mix(in oklab, var(--tblr-dark) 55%, transparent);
  --av-toast-bg: var(--tblr-dark);
  --av-toast-text: var(--tblr-white);
  --av-success-soft: var(--tblr-success-lt);
  --av-success-border: color-mix(in oklab, var(--tblr-success) 30%, var(--tblr-bg-surface));
  --av-notice-bg: var(--av-brand-text);
  --av-notice-text: var(--tblr-white);
  --av-success-text: var(--tblr-success);
  --av-result-yes-bg: var(--tblr-danger);
  --av-result-open-bg: var(--tblr-warning);
  --av-result-no-bg: var(--tblr-success);
  --av-result-text: var(--tblr-white);
  --av-logo-height: 22px;
  --av-header-height: 3.75rem;
}

.hidden { display: none !important; }

/* ------------------------------------------------------------ Logo */
.logo { display: block; height: var(--av-logo-height); width: auto; flex: none; }
.logo path { fill: var(--av-logo-on-light); }
.av-header .logo path, .av-auth-side .logo path { fill: var(--av-logo-on-dark); }

/* ------------------------------------------------------------ Header (dark bar) */
.navbar.av-header {
  --tblr-navbar-bg: var(--av-header-bg);
  --tblr-navbar-color: var(--av-header-text-muted);
  --tblr-navbar-hover-color: var(--av-header-text);
  --tblr-navbar-active-color: var(--av-header-text);
  --tblr-navbar-active-bg: var(--av-header-link-active-bg);
  --tblr-navbar-brand-color: var(--av-header-text);
  --tblr-navbar-border-color: transparent;
  background: var(--av-header-bg);
  color: var(--av-header-text);
  min-height: var(--av-header-height);
  position: sticky;
  top: 0;
  z-index: 1030;
  flex-wrap: nowrap;
}
.av-header .container-xl { flex-wrap: nowrap; gap: 1rem; min-width: 0; }
.av-header .navbar-brand { padding: 0; margin: 0; flex: none; }
.av-header nav { min-width: 0; flex: 0 1 auto; }
.av-header .av-nav { display: flex; flex-direction: row; gap: .25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; margin: 0; padding: 0; list-style: none; }
.av-header .av-nav::-webkit-scrollbar { display: none; }
.av-header .av-nav .nav-link {
  color: var(--av-header-text-muted); border-radius: var(--tblr-border-radius); padding: .45rem .75rem;
  white-space: nowrap; font-size: .875rem; position: relative;
}
.av-header .av-nav .nav-link:hover { color: var(--av-header-text); background: var(--av-header-link-hover-bg); }
.av-header .av-nav .nav-link.active { color: var(--av-header-text); background: var(--av-header-link-active-bg); font-weight: var(--tblr-font-weight-medium); }
/* Active navigation: marker in the original brand color (decision 0017) */
.av-header .av-nav .nav-link.active::after {
  content: ""; position: absolute; left: .75rem; right: .75rem; bottom: .15rem; height: 2px;
  border-radius: 1px; background: var(--av-brand);
}
.av-header .av-nav .av-short { display: none; }
.av-header .av-user { margin-left: auto; display: flex; align-items: center; gap: .625rem; flex: none; }
.av-header .av-who { color: var(--av-header-text-muted); font-size: .8125rem; line-height: 1.25; text-align: right; max-width: 280px; }
.av-header .av-who b { color: var(--av-header-text); font-weight: var(--tblr-font-weight-medium); }
.av-header .av-who span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-header .av-avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--av-avatar-bg); color: var(--av-avatar-text); font-weight: 700; font-size: .875rem;
  border: 2px solid var(--av-header-border); display: inline-flex; align-items: center; justify-content: center;
}
.av-header .av-icon-btn {
  background: none; border: 0; color: var(--av-header-text-muted); padding: .375rem; border-radius: var(--tblr-border-radius);
  display: inline-flex; font-size: 1.25rem; line-height: 1;
}
.av-header .av-icon-btn:hover { color: var(--av-header-text); background: var(--av-header-link-hover-bg); }
.av-header :focus-visible { outline: 2px solid var(--av-brand); outline-offset: 2px; }
.av-header .dropdown-menu { min-width: 13rem; }
.av-header .dropdown-menu form { margin: 0; }
.av-header .dropdown-header b { display: block; color: var(--tblr-body-color); font-size: .875rem; }
@media (max-width: 767.98px) {
  .av-header .av-who { display: none; }
  .av-header .av-wide { display: none; }
}
@media (max-width: 575.98px) {
  .av-header .container-xl { gap: .5rem; padding-left: 1rem; padding-right: 1rem; }
  .av-header .av-nav .nav-link { padding: .4rem .55rem; }
  .av-header .av-nav .av-long.has-short { display: none; }
  .av-header .av-nav .av-short { display: inline; }
  .av-header .logo { height: 18px; }
}

/* "Als Partner ansehen" (read only) notice above the header */
.av-impersonation {
  background: var(--av-notice-bg); color: var(--av-notice-text);
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .375rem .875rem;
  padding: .5rem 1.25rem; font-size: .875rem; text-align: center;
}
.av-impersonation form { margin: 0; }
.av-impersonation .btn { --tblr-btn-padding-y: .2rem; }
.av-sticky-top { position: sticky; top: 0; z-index: 1031; }
.av-sticky-top .navbar.av-header { position: static; }

/* ------------------------------------------------------------ Page and context header */
.av-page { flex: 1 0 auto; }
/* One content width for all pages: header, content and footer share --av-content-width (theme), so logo and
   navigation are flush with the content. Exceptions only with a reason, see docs/ui-tabler.md. */
.av-header > .container-xl, .av-page > .container-xl, .av-footer > .container-xl { max-width: var(--av-content-width); }
/* Phones: the header uses 1rem at the sides (see above), content and footer follow so the edges stay flush */
@media (max-width: 575.98px) {
  .av-page > .container-xl, .av-footer > .container-xl { padding-left: 1rem; padding-right: 1rem; }
}
.av-page .container-xl { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.av-context { margin-bottom: 1.5rem; }
.av-context .breadcrumb { margin-bottom: .375rem; font-size: .8125rem; }
.av-context h1 { font-size: 1.625rem; margin: 0 0 .25rem; }
.av-context .av-sub { color: var(--tblr-secondary); margin: 0; }
.av-figure { color: var(--av-brand); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Welcome band on the start page: dark with the circles from the mockup (decorative) */
.av-welcome {
  position: relative; overflow: hidden; background: var(--av-header-bg); color: var(--av-header-text);
  border-radius: var(--tblr-border-radius-lg); padding: 1.75rem 2rem; margin-bottom: 1.5rem;
}
.av-welcome h1 { color: var(--av-header-text); font-size: 1.625rem; margin: 0 0 .25rem; position: relative; z-index: 1; }
.av-welcome p { color: var(--av-header-text-muted); margin: 0; position: relative; z-index: 1; max-width: 36rem; }
.av-welcome::before, .av-welcome::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.av-welcome::before { right: -60px; top: -90px; width: 260px; height: 260px; border: 38px solid var(--av-deco-1); opacity: .55; }
.av-welcome::after { right: 30px; top: -40px; width: 140px; height: 140px; border: 22px solid var(--av-deco-2); opacity: .45; }
@media (max-width: 575.98px) {
  .av-welcome { padding: 1.25rem; }
  .av-welcome::before { right: -120px; }
  .av-welcome::after { display: none; }
}

/* ------------------------------------------------------------ Tiles (start page) */
.av-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.av-tile {
  display: flex; gap: .875rem; align-items: flex-start; min-width: 0;
  background: var(--av-tile-bg); border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius-lg);
  padding: 1.125rem; color: var(--tblr-body-color); text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
.av-tile:hover { border-color: var(--av-brand-border); background: var(--av-brand-soft); color: var(--tblr-body-color); text-decoration: none; }
.av-tile:focus-visible { outline: 2px solid var(--av-brand); outline-offset: 2px; }
.av-tile-icon {
  flex: none; width: 46px; height: 46px; border-radius: 10px; overflow: hidden;
  background: var(--av-tile-icon-bg); border: 1px solid var(--av-brand-border);
  display: flex; align-items: center; justify-content: center; color: var(--av-brand); font-size: 1.5rem;
}
.av-tile-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.av-tile-text { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.av-tile-text b { font-size: 1rem; }
.av-tile-text span { color: var(--tblr-secondary); font-size: .84375rem; }
.av-tile-text .av-go { color: var(--av-brand-text); font-weight: 700; margin-top: .375rem; }
.av-tile-text .av-go::after { content: " \2192"; }

/* Definition list in the side cards */
.av-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .375rem .625rem; font-size: .84375rem; margin: 0; }
.av-dl dt { color: var(--tblr-secondary); font-weight: 400; }
.av-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Round list logo (lists of later modules) */
.av-listlogo { display: block; width: 72px; height: auto; border-radius: var(--tblr-border-radius); }

/* Tables that become cards on small screens (admin start page) */
@media (max-width: 767.98px) {
  .av-table-cards thead { display: none; }
  .av-table-cards, .av-table-cards tbody, .av-table-cards tr, .av-table-cards td { display: block; width: 100%; }
  .av-table-cards tr { border-bottom: 1px solid var(--tblr-border-color); padding: .75rem 0; }
  .av-table-cards td { border: 0 !important; padding: .125rem 1rem !important; }
  .av-table-cards td[data-label]::before { content: attr(data-label) ": "; color: var(--tblr-secondary); }
}
.av-actions { display: flex; flex-wrap: wrap; gap: .375rem; justify-content: flex-end; }
@media (max-width: 767.98px) { .av-actions { justify-content: flex-start; padding-top: .375rem; } }
/* Wide tables (admin: partners, access): cards already below 992 px, the columns do not fit a tablet */
@media (max-width: 991.98px) {
  .av-table-cards-lg thead { display: none; }
  .av-table-cards-lg, .av-table-cards-lg tbody, .av-table-cards-lg tr, .av-table-cards-lg td { display: block; width: 100%; }
  .av-table-cards-lg tr { border-bottom: 1px solid var(--tblr-border-color); padding: .75rem 0; }
  .av-table-cards-lg td { border: 0 !important; padding: .125rem 1rem !important; }
  .av-table-cards-lg td[data-label]::before { content: attr(data-label) ": "; color: var(--tblr-secondary); }
  .av-table-cards-lg .av-actions { justify-content: flex-start; padding-top: .375rem; }
}

/* Mobile action bar: below 768 px it sticks to the bottom of the screen (spike report, compromises) */
.av-actionbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 767.98px) {
  .av-actionbar {
    position: sticky; bottom: env(safe-area-inset-bottom, 0px); z-index: 1020; padding: .75rem; gap: .5rem;
    background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius-lg); box-shadow: var(--tblr-shadow-dropdown);
  }
  .av-actionbar .btn { flex: 1 1 8rem; min-width: 0; white-space: normal; }
}

/* ------------------------------------------------------------ Footer */
.av-footer { font-size: .8125rem; color: var(--tblr-secondary); padding: 1rem 0; border-top: 1px solid var(--tblr-border-color); }
.av-footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; }
.av-footer a { color: var(--tblr-secondary); }
.av-footer a:hover { color: var(--tblr-body-color); }
.av-footer .av-legal { margin-left: auto; }
/* Build line (version, build date; commit for admins) next to the copyright */
.av-footer .av-build { font-variant-numeric: tabular-nums; }
.av-auth-main .av-footer { border-top: 0; padding: 1.25rem 0 0; width: 100%; max-width: 26.25rem; }
.av-auth-main .av-footer-inner { padding: 0; }

/* ------------------------------------------------------------ Login and first setup */
.av-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.av-auth-side {
  background: var(--av-header-bg); color: var(--av-header-text); padding: 3rem; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.av-auth-side .logo { height: 30px; align-self: flex-start; position: relative; z-index: 1; }
.av-auth-side h2 { color: var(--av-header-text); font-size: 1.875rem; margin: auto 0 .625rem; max-width: 420px; position: relative; z-index: 1; }
.av-auth-side p { color: var(--av-header-text-muted); max-width: 420px; margin: 0; position: relative; z-index: 1; }
.av-auth-side .av-c1, .av-auth-side .av-c2, .av-auth-side .av-c3 { position: absolute; border-radius: 50%; pointer-events: none; }
.av-auth-side .av-c1 { right: -120px; bottom: -140px; width: 460px; height: 460px; border: 70px solid var(--av-deco-1); }
.av-auth-side .av-c2 { right: 20px; bottom: 10px; width: 220px; height: 220px; border: 40px solid var(--av-deco-2); }
.av-auth-side .av-c3 { left: -80px; top: 40%; width: 180px; height: 180px; background: var(--av-deco-3); opacity: .5; }
.av-auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem; position: relative; }
.av-auth-box { width: 100%; max-width: 26.25rem; }
.av-auth-box h1 { font-size: 1.5rem; margin: 0 0 .375rem; }
.av-auth-box .av-lead { color: var(--tblr-secondary); margin: 0 0 1.5rem; }
.av-auth-logo { display: none; margin-bottom: 1.75rem; }
.av-auth-logo .logo { height: 26px; }
.av-auth-tools { position: absolute; top: 1rem; right: 1rem; }
.av-auth-tools .av-icon-btn {
  background: none; border: 0; color: var(--tblr-secondary); padding: .375rem; border-radius: var(--tblr-border-radius);
  display: inline-flex; font-size: 1.25rem; line-height: 1;
}
.av-auth-tools .av-icon-btn:hover { color: var(--tblr-body-color); background: var(--tblr-bg-surface-secondary); }
@media (max-width: 899.98px) {
  .av-auth { grid-template-columns: 1fr; }
  .av-auth-side { display: none; }
  .av-auth-main { padding: 2rem 1.25rem; justify-content: flex-start; }
  .av-auth-logo { display: block; }
}

.av-stack { display: flex; flex-direction: column; gap: .875rem; }
.av-stack .form-label { margin-bottom: .25rem; }
.av-error { color: var(--tblr-danger); font-size: .84375rem; min-height: 1.125rem; }
.av-error:empty { min-height: 0; }
.av-hint { font-size: .78125rem; color: var(--tblr-secondary); margin-top: .25rem; display: block; }
.av-code { font-variant-numeric: tabular-nums; letter-spacing: .12em; font-size: 1.0625rem; }
.av-split { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.av-tag {
  display: inline-block; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--tblr-secondary); background: var(--tblr-bg-surface-secondary); border: 1px solid var(--tblr-border-color);
  border-radius: 5px; padding: .125rem .375rem;
}
.av-linkbtn { background: none; border: 0; padding: 0; color: var(--av-brand-text); font: inherit; font-size: .875rem; cursor: pointer; text-decoration: none; }
.av-linkbtn:hover { color: var(--av-brand-text-hover); text-decoration: underline; }
.av-center { text-align: center; align-self: center; }
.av-linkbtn.av-center { display: block; margin: 0 auto; }

/* Password field with show button */
.av-pw .av-eye { background: none; border: 0; padding: 0 .25rem; color: var(--tblr-secondary); display: inline-flex; cursor: pointer; }
.av-pw .av-eye:hover { color: var(--tblr-body-color); }
.av-pw .av-eye svg { width: 20px; height: 20px; }

/* Step indicator */
.av-steps { display: flex; gap: .5rem; margin-bottom: .5rem; }
.av-steps span { flex: 1; height: 5px; border-radius: 3px; background: var(--tblr-border-color); }
.av-steps span.on { background: var(--av-brand); }

/* Password strength */
.av-meter { display: flex; gap: 4px; margin-top: .375rem; }
.av-meter i { flex: 1; height: 4px; border-radius: 2px; background: var(--tblr-border-color); transition: background .2s; }
.av-meter[data-l="1"] i:nth-child(-n+1) { background: var(--tblr-danger); }
.av-meter[data-l="2"] i:nth-child(-n+2) { background: var(--tblr-warning); }
.av-meter[data-l="3"] i:nth-child(-n+3) { background: var(--av-brand); }
.av-meter[data-l="4"] i { background: var(--tblr-success); }
.av-match { font-size: .78125rem; display: block; margin-top: .25rem; }
.av-match.ok { color: var(--tblr-success); }
.av-match.no { color: var(--tblr-danger); }
.av-rules { list-style: none; margin: 0; padding: 0; font-size: .8125rem; color: var(--tblr-secondary); display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; }
.av-rules li::before { content: "\25CB  "; }
.av-rules li.ok { color: var(--tblr-success); }
.av-rules li.ok::before { content: "\25CF  "; }

/* Passkey ring */
.av-bio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .875rem; padding: 1.125rem 0; }
.av-bio .av-ring {
  width: 110px; height: 110px; border-radius: 50%; background: var(--av-brand-soft); border: 1px solid var(--av-brand-border);
  display: flex; align-items: center; justify-content: center;
}
.av-bio .av-ring svg { width: 56px; height: 56px; stroke: var(--av-brand); }
.av-bio.wait .av-ring { animation: av-pulse 1.2s ease-in-out infinite; }
.av-bio.done .av-ring { background: var(--av-success-soft); border-color: var(--av-success-border); }
.av-bio.done .av-ring svg { stroke: var(--tblr-success); }
@keyframes av-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .av-bio.wait .av-ring { animation: none; } }

/* Choice of the second factor */
.av-choices { display: flex; flex-direction: column; gap: .75rem; margin-top: .375rem; }
.av-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; text-align: left; width: 100%;
  background: var(--av-tile-bg); border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius-lg);
  padding: 1rem 1.125rem; cursor: pointer; font: inherit; color: var(--tblr-body-color);
}
.av-choice:hover:not(:disabled) { border-color: var(--av-brand-border); background: var(--av-brand-soft); }
.av-choice:focus-visible { outline: 2px solid var(--av-brand); outline-offset: 2px; }
.av-choice:disabled { opacity: .6; cursor: not-allowed; }
.av-choice b { font-size: 1rem; }
.av-choice span { color: var(--tblr-secondary); font-size: .84375rem; }
.av-choice .av-choice-hint { font-size: .78125rem; }
.av-qr { display: flex; justify-content: center; padding: .5rem 0; }
.av-qr img { border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); background: var(--tblr-white); padding: .5rem; }
.av-key code { word-break: break-all; }

/* ------------------------------------------------------------ Dialog and toast (PP.dialog, PP.toast in portal.js) */
.av-dialog {
  position: fixed; inset: 0; background: var(--av-overlay); display: flex; align-items: center; justify-content: center;
  z-index: 1060; padding: 1.25rem;
}
.av-dialog-box {
  background: var(--tblr-bg-surface); color: var(--tblr-body-color); border-radius: var(--tblr-border-radius-xl);
  max-width: 760px; width: 100%; padding: 1.25rem 1.375rem; display: flex; flex-direction: column; gap: .75rem;
  max-height: 90vh; box-shadow: var(--tblr-shadow-dropdown);
}
.av-dialog-box h3 { margin: 0; font-size: 1.0625rem; }
.av-dialog-box p { margin: 0; color: var(--tblr-secondary); font-size: .875rem; white-space: pre-line; overflow-wrap: anywhere; }
.av-dialog-box textarea { font-family: var(--tblr-font-monospace); font-size: .75rem; min-height: 320px; flex: 1; }
.av-dialog-btns { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.av-toast {
  position: fixed; bottom: 1.375rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem);
  background: var(--av-toast-bg); color: var(--av-toast-text); padding: .625rem 1rem; border-radius: 9px;
  font-size: .84375rem; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 1070;
}
.av-toast.show { opacity: 1; }

/* ------------------------------------------------------------ Contrast fixes (WCAG AA) for light badges */
.badge.bg-primary-lt { color: color-mix(in oklab, var(--tblr-primary) 75%, var(--tblr-body-color)) !important; }
.badge.bg-secondary-lt { color: color-mix(in oklab, var(--tblr-secondary) 75%, var(--tblr-body-color)) !important; }
.badge.bg-green-lt { color: color-mix(in oklab, var(--tblr-green) 60%, var(--tblr-body-color)) !important; }
.badge.bg-red-lt { color: color-mix(in oklab, var(--tblr-red) 75%, var(--tblr-body-color)) !important; }
.badge.bg-orange-lt { color: color-mix(in oklab, var(--tblr-orange) 50%, var(--tblr-body-color)) !important; }

/* Tabler empty state: larger icon */
.empty-icon .ti { font-size: 2.5rem; color: var(--tblr-secondary); }
.av-header .dropdown-header { text-transform: none; letter-spacing: normal; font-size: .8125rem; font-weight: 400; color: var(--tblr-secondary); }

/* ------------------------------------------------------------ Requests: status, variant, result badges, lists */
.av-status, .av-variant {
  display: inline-block; font-size: .75rem; font-weight: 700; line-height: 1.125rem; border-radius: 999px;
  padding: .125rem .625rem; white-space: nowrap; border: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface-secondary); color: var(--tblr-secondary);
}
.av-status-done { background: var(--tblr-bg-surface); color: var(--tblr-body-color); border-color: var(--tblr-secondary); }
.av-status-submitted { background: var(--av-brand-soft); color: var(--av-brand-text); border-color: var(--av-brand-border); }
.av-status-offer { background: var(--av-success-soft); color: var(--av-success-text); border-color: var(--av-success-border); }
.av-variant { background: var(--tblr-bg-surface); }
.av-variant-quick { color: var(--av-brand-text); border-color: var(--av-brand-border); }

/* Result badges: the text always names the result, the color only repeats it */
.av-results { display: inline-flex; flex-wrap: wrap; gap: .25rem; vertical-align: middle; }
.av-result {
  display: inline-block; padding: .125rem .5625rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
  line-height: 1.125rem; color: var(--av-result-text); background: var(--tblr-secondary);
}
.av-result-ja { background: var(--av-result-yes-bg); }
.av-result-offen { background: var(--av-result-open-bg); }
.av-result-nein { background: var(--av-result-no-bg); }

/* Key figures row */
.av-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.av-kpi { background: var(--av-brand-soft); border: 1px solid var(--av-brand-border); border-radius: var(--tblr-border-radius-lg); padding: .875rem .625rem; text-align: center; }
.av-kpi .av-figure { display: block; font-size: 1.75rem; line-height: 1.1; }
.av-kpi span { font-size: .78125rem; color: var(--tblr-secondary); }
@media (max-width: 767.98px) { .av-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Tiles that filter (0.19.0, /anfragen): five in a row, two per row on small screens (the total over both columns) */
.av-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
a.av-kpi { display: block; color: inherit; text-decoration: none; }
a.av-kpi:hover, a.av-kpi:focus-visible { border-color: var(--av-brand); color: inherit; text-decoration: none; }
a.av-kpi.active { border-color: var(--av-brand); box-shadow: inset 0 0 0 1px var(--av-brand); }
@media (max-width: 767.98px) {
  .av-kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-kpis-5 > :first-child { grid-column: 1 / -1; }
}

/* Request list (table.av-table-cards): logo, name with badges, clickable rows */
.av-list .av-row { cursor: pointer; }
.av-list .av-row:hover td { background: var(--tblr-bg-surface-secondary); }
.av-list .av-name { min-width: 0; overflow-wrap: anywhere; }
.av-list .av-name .av-results { display: flex; margin-top: .25rem; }
.av-list .av-sub2 { display: block; color: var(--tblr-secondary); font-size: .78125rem; }
.av-list td.av-logo-cell { width: 88px; }
/* Filter bar (0.17.0): a grid. Label above the field, all fields equally wide, the first column starts and the last
   one ends at the inner edge of the card. One column on small screens, two from 768 px, from 1200 px as many equal
   columns as fit (five filters: five in a row). Same gap in both directions (--av-gap).
   .av-filter-field: one field with its label · .av-filter-chips: chip groups in the same columns below the fields
   (needs a fixed number of columns: .av-filter-2) · .av-filter-meta: links and buttons of the bar, a row of their
   own after the grid (inside the grid a row over all columns would keep empty columns open). */
.av-filter { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--av-gap); align-items: end; }
.av-filter > form { display: contents; }
.av-filter-field { display: block; min-width: 0; margin: 0; }
.av-filter-field > .form-label { display: block; margin: 0 0 .25rem; text-align: left; }
/* min-width 0: a select with a long option (partner name) must shrink instead of widening the page */
.av-filter-field .form-select, .av-filter-field .form-control, .av-filter-field .input-icon { width: 100%; max-width: none; min-width: 0; }
.av-filter-chips { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: var(--av-gap); align-items: start; }
.av-filter-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin-top: var(--av-gap); font-size: .84375rem; }
.av-filter-meta > [data-swap] { display: contents; }
.av-filter-meta:not(:has(a, button:not(.hidden))) { display: none; }  /* nothing to show: no empty row */
@media (min-width: 768px) {
  .av-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-filter-meta { justify-content: flex-end; }
}
@media (min-width: 1200px) {
  .av-filter { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
  .av-filter.av-filter-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Filter bar in full rows (0.19.0, request lists): .av-filter-rows with .av-filter-cols-N, N = columns of the first
   row (the search .av-filter-wide takes two). The last row takes the actions (.av-filter-actions): right-aligned, on
   the baseline of the fields. No field alone in a row, no button in a row of its own. One field per row and a button
   over the full width on small screens. */
.av-filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; min-height: 2.25rem; font-size: .84375rem; }
@media (min-width: 768px) {
  .av-filter-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .av-filter-rows .av-filter-wide { grid-column: span 2; }
  .av-filter-rows .av-filter-actions { grid-column-end: -1; }
}
/* Tablets (three columns, 0.19.1): the search takes one, two or three columns (data-tab-wide, macro tab_wide in
   _requests.html), so that the last row holds two fields and the actions and never ends with a single field. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .av-filter-rows[data-tab-wide="1"] .av-filter-wide { grid-column: auto; }
  .av-filter-rows[data-tab-wide="3"] .av-filter-wide { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
  .av-filter-rows.av-filter-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .av-filter-rows.av-filter-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .av-filter-rows.av-filter-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .av-filter-rows.av-filter-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .av-filter-rows.av-filter-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .av-filter-rows .av-filter-actions, .av-filter-rows.av-filter-cols-7 .av-filter-actions { grid-column: 3 / -1; }
}
@media (max-width: 767.98px) {
  .av-filter-actions { flex-direction: column-reverse; align-items: stretch; gap: .5rem; text-align: center; }
  .av-filter-actions .btn { width: 100%; }
}
@media (max-width: 767.98px) {
  .av-list .av-row { display: grid !important; grid-template-columns: 1fr auto; gap: .25rem .75rem; padding: .875rem 0; }
  .av-list .av-row td { padding: 0 1rem !important; }
  .av-list td.av-logo-cell { grid-column: 1 / -1; width: auto; }
  .av-list td.av-name { grid-column: 1; }
  .av-list td.av-status-cell { grid-column: 2; grid-row: 2; text-align: right; }
  .av-list td[data-label] { grid-column: 1 / -1; font-size: .8125rem; }
  .av-list td.av-action-cell { grid-column: 1 / -1; padding-top: .375rem !important; }
}

/* Module logo in the context header and the details */
.av-modlogo { flex: none; width: 92px; height: 34px; object-fit: contain; border-radius: var(--tblr-border-radius-sm); }
.av-context-head { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.av-context-head h1 { min-width: 0; overflow-wrap: anywhere; }

/* History */
.av-timeline { list-style: none; margin: 0; padding: 0; font-size: .84375rem; }
.av-timeline li { padding: 0 0 .75rem 1.125rem; position: relative; color: var(--tblr-secondary); }
.av-timeline li::before { content: ""; position: absolute; left: 0; top: .375rem; width: 8px; height: 8px; border-radius: 50%; background: var(--tblr-border-color); }
.av-timeline li.done { color: var(--tblr-body-color); }
.av-timeline li.done::before { background: var(--av-brand); }

/* ------------------------------------------------------------ Contacts ("Kunden"): list, record, side panel */
.av-toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: .875rem; }
.av-toast-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.av-toast-btn:focus-visible { outline: 2px solid var(--av-brand); outline-offset: 3px; }
@media (max-width: 767.98px) {
  /* above the action bar at the bottom of small screens */
  .av-toast.has-action { bottom: 5.5rem; }
}

.av-count { color: var(--tblr-secondary); font-weight: 400; font-variant-numeric: tabular-nums; margin-left: .125rem; }
.av-banner { padding: .625rem 1.25rem; background: var(--tblr-bg-surface-secondary); color: var(--tblr-secondary); font-size: .84375rem; border-bottom: 1px solid var(--tblr-border-color); }

/* Regions that contacts.js replaces: dimmed with a spinner while the next state loads */
.av-swap { position: relative; transition: opacity .15s; }
.av-swap.av-loading { opacity: .55; pointer-events: none; min-height: 6rem; }
.av-swap.av-loading::after {
  content: ""; position: absolute; top: 2.25rem; left: 50%; width: 1.5rem; height: 1.5rem; margin-left: -.75rem;
  border: 2px solid var(--tblr-border-color); border-top-color: var(--av-brand); border-radius: 50%;
  animation: av-spin .7s linear infinite;
}
@keyframes av-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .av-swap.av-loading::after { animation-duration: 2s; } }

/* List: fixed column widths, long values are cut with an ellipsis */
.av-contacts { table-layout: fixed; width: 100%; }
.av-contacts .av-col-no { width: 7.5rem; }
.av-contacts .av-col-street { width: 22%; }
.av-contacts .av-col-city { width: 20%; }
.av-contacts .av-col-tags { width: 18%; }
.av-contacts td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-contacts td.av-tags-cell { white-space: normal; }
.av-contacts .av-no { font-variant-numeric: tabular-nums; color: var(--tblr-secondary); }
.av-contacts .av-name a { color: var(--tblr-body-color); font-weight: var(--tblr-font-weight-medium); }
.av-contacts .av-row { cursor: pointer; }
.av-contacts .av-row:hover td { background: var(--tblr-bg-surface-secondary); }
.av-contacts .av-row:focus-visible { outline: 2px solid var(--av-brand); outline-offset: -2px; }
.av-sort { color: inherit; display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; }
.av-sort:hover, .av-sort.active { color: var(--tblr-body-color); text-decoration: none; }
.av-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.av-pager .page-link { display: inline-flex; align-items: center; gap: .25rem; }
@media (max-width: 767.98px) {
  .av-contacts .av-row { display: flex !important; flex-direction: column; }
  .av-contacts td { white-space: normal; overflow-wrap: anywhere; font-size: .8125rem; }
  .av-contacts td.av-name { order: -1; font-size: .9375rem; }
  .av-contacts td.av-tags-cell:empty { display: none; }
  .av-pager { justify-content: center; }
}

/* Record */
.av-record-tabs { margin-bottom: 1rem; }
.av-kind { display: block; color: var(--tblr-secondary); font-size: .75rem; font-weight: 400; }
.av-dl dt .av-kind { display: inline; }
.av-dl dt .av-kind::before { content: "("; }
.av-dl dt .av-kind::after { content: ")"; }
.av-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .75rem; }
.av-block {
  display: flex; flex-direction: column; gap: .125rem; margin: 0; padding: .75rem .875rem; min-width: 0; overflow-wrap: anywhere;
  background: var(--tblr-bg-surface-secondary); border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius);
  font-style: normal; font-size: .875rem;
}
.av-block .av-kind { margin-bottom: .25rem; }
.av-taglist { display: flex; flex-wrap: wrap; gap: .375rem; }
.av-taglist a.badge { text-decoration: none; }
.av-note { white-space: pre-line; overflow-wrap: anywhere; }
.av-context-actions .btn .ti, .av-panel .btn .ti { margin-right: .375rem; }

/* Side panel (Tabler offcanvas, opened by contacts.js) */
.av-panel { --tblr-offcanvas-width: min(100vw, 35rem); }
.av-panel .offcanvas-title { font-size: 1.125rem; }
.av-panel .offcanvas-body { padding-top: .5rem; }
.av-panel-open { overflow: hidden; }
.av-panel-state { display: flex; align-items: center; gap: .625rem; padding: 2rem 0; color: var(--tblr-secondary); }
.av-panel-section { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.av-panel-section legend {
  float: none; width: 100%; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--tblr-secondary); padding: 0 0 .375rem; margin: 0 0 .75rem; border-bottom: 1px solid var(--tblr-border-color);
}
.av-field { display: block; margin-bottom: .75rem; }
.row > .av-field { margin-bottom: 0; }
.av-field .form-label { display: block; margin-bottom: .25rem; }
.av-number { font-variant-numeric: tabular-nums; }  /* full width like every field of a form (grid rule) */
.av-entry { border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); padding: .625rem .75rem .75rem; margin-bottom: .625rem; background: var(--tblr-bg-surface-secondary); }
.av-entry-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem; margin-bottom: .375rem; }
.av-entry-title { font-weight: var(--tblr-font-weight-medium); font-size: .875rem; }
.av-entry-actions { display: inline-flex; gap: .125rem; }
.av-entry-empty { font-size: .84375rem; margin: 0 0 .5rem; }
.av-tagbox {
  display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; padding: .3125rem .5rem; min-height: 2.5rem;
  border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); background: var(--tblr-bg-forms);
}
.av-tagbox:focus-within { border-color: var(--av-brand); box-shadow: 0 0 0 1px var(--av-brand); }
.av-tagbox [data-tags] { display: contents; }
.av-taginput { flex: 1 1 8rem; min-width: 6rem; border: 0; outline: 0; background: none; color: inherit; font: inherit; padding: .125rem 0; }
.av-chip { display: inline-flex; align-items: center; gap: .25rem; }
.av-chip-x { background: none; border: 0; padding: 0 .125rem; color: inherit; font: inherit; line-height: 1; cursor: pointer; }
.av-panel-footer { border-top: 1px solid var(--tblr-border-color); padding: .75rem 1.5rem; background: var(--tblr-bg-surface); }
.av-panel-buttons { display: flex; justify-content: flex-end; gap: .5rem; }
.av-panel-footer .av-error { margin-bottom: .375rem; }
@media (max-width: 575.98px) {
  .av-panel-buttons .btn { flex: 1 1 0; }
  .av-entry-actions .btn { --tblr-btn-padding-x: .375rem; }
}

/* Four and more navigation items ("Kunden" plus a module with its own item): below 576 px the navigation moves into
   a second row, so every item stays visible. */
@media (max-width: 575.98px) {
  .av-header.av-nav-many .container-xl { flex-wrap: wrap; row-gap: .25rem; padding-top: .5rem; padding-bottom: .375rem; }
  .av-header.av-nav-many nav { order: 3; flex: 1 0 100%; }
  /* Contacts: tabs stay in one row, master data with the label above the value */
  #contactList .nav-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #contactList .nav-tabs .nav-link { white-space: nowrap; padding-left: .625rem; padding-right: .625rem; }
  .av-dl.av-dl-stack { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .av-dl.av-dl-stack dd { margin-bottom: .5rem; }
}

/* Partner edit page (/admin/partner/<slug>): entitlements of apps and core features, one switch per entry */
.av-entitlements { display: flex; flex-direction: column; }
.av-entitlement { border: 0; border-top: 1px solid var(--tblr-border-color); margin: 0; padding: 1rem 0; min-width: 0; }
.av-entitlement:first-child { border-top: 0; padding-top: 0; }
.av-entitlement:last-child { padding-bottom: 0; }
.av-switch { margin: 0; min-height: 0; }
.av-switch .form-check-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; }
.av-switch-title { font-weight: 600; }
.av-switch-state { font-size: .8125rem; }
.av-entitlement-text { margin: .25rem 0 0 2.5rem; font-size: .875rem; }
.av-sections { margin: .75rem 0 0 2.5rem; }
.av-sections.av-off { opacity: .5; }
.av-section-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0 1rem; margin-top: .25rem; }
@media (max-width: 575.98px) { .av-entitlement-text, .av-sections { margin-left: 0; } }

/* Profile (/profil): sign-in methods and the setup of the authenticator app */
.av-methods { list-style: none; margin: 0 0 1rem; padding: 0; }
.av-methods li { display: flex; align-items: center; gap: .75rem; padding: .625rem 0; border-top: 1px solid var(--tblr-border-color); }
.av-methods li:first-child { border-top: 0; padding-top: 0; }
.av-method-icon { flex: 0 0 auto; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; background: var(--tblr-bg-surface-secondary); }
.av-method-icon svg { width: 1.25rem; height: 1.25rem; stroke: var(--tblr-body-color); }
.av-method-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.av-method-meta span { color: var(--tblr-secondary); font-size: .8125rem; }
.av-method-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.av-app-setup { border-top: 1px solid var(--tblr-border-color); margin-top: 1rem; padding-top: 1rem; }
.av-app-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.av-app-form .form-control { flex: 1 1 8rem; max-width: 12rem; }

/* Settings (/admin/settings): one card per group, secret fields write only, result of the tests in the form */
.av-settings .av-switch-hint { margin-left: 2.5rem; }
.av-secret { display: flex; gap: .5rem; }
.av-secret .form-control { flex: 1 1 auto; min-width: 0; }
.av-settings-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
/* Result of a test in a form ("Verbindung testen", "Testmail senden"). Text in the body color on the surface, so it
   is readable in light and dark; the state shows as icon and wording, the color only repeats it.
   (Until 0.15.0 this field used .av-result, the class of the result badges: gray text on a gray pill.) */
.av-outcome { display: flex; align-items: flex-start; gap: .5rem; padding: .625rem .75rem; overflow-wrap: anywhere;
  color: var(--tblr-body-color); background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color);
  border-left-width: .25rem; border-radius: var(--tblr-border-radius); font-size: .875rem; }
.av-outcome[hidden] { display: none; }
.av-outcome .ti { font-size: 1.125rem; line-height: 1.25rem; color: var(--tblr-secondary); flex: none; }
.av-outcome span { min-width: 0; }
.av-outcome-ok { border-left-color: var(--tblr-success); }
.av-outcome-ok .ti { color: var(--tblr-success); }
.av-outcome-error { border-left-color: var(--tblr-danger); }
.av-outcome-error .ti { color: var(--tblr-danger); }
@media (max-width: 575.98px) {
  .av-settings .av-switch-hint { margin-left: 0; }
  .av-settings-actions .btn { flex: 1 1 100%; }
}

/* Error page (error.html: 404, 500): the centered box of the sign-in pages, alone on the page */
.av-error-page { min-height: 100vh; }
.av-error-page .av-auth-logo { display: block; }
.av-error-status { color: var(--tblr-secondary); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 .375rem; }

/* ------------------------------------------------------------ Contacts: products, filter chips, import (0.16.0) */
.av-context-buttons { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
/* chip groups stand in the columns of the filter bar (.av-filter-chips), their title above like a label */
.av-fchip-group { display: flex; flex-wrap: wrap; gap: .375rem; align-items: center; min-width: 0; }
.av-fchip-title { flex: 1 1 100%; margin: 0 0 -.125rem; font-size: .875rem; font-weight: var(--tblr-font-weight-medium); }  /* as .form-label */
.av-fchip {
  display: inline-flex; align-items: center; padding: .1875rem .75rem; border: 1px solid var(--tblr-border-color);
  border-radius: 999px; background: var(--tblr-bg-surface); color: var(--tblr-body-color); font-size: .84375rem;
  line-height: 1.5; text-decoration: none;
}
.av-fchip:hover { background: var(--tblr-bg-surface-secondary); color: var(--tblr-body-color); text-decoration: none; }
.av-fchip.active { background: var(--tblr-primary); border-color: var(--tblr-primary); color: var(--tblr-primary-fg); }
.av-fchip:focus-visible { outline: 2px solid var(--av-brand); outline-offset: 2px; }
.av-contacts .av-col-products { width: 17%; }
.av-contacts .av-col-street { width: 19%; }
.av-contacts .av-col-city { width: 17%; }
.av-contacts .av-col-tags { width: 13%; }
.av-contacts td.av-products-cell { white-space: normal; }
.av-product { background: var(--tblr-bg-surface-secondary); color: var(--tblr-body-color); border: 1px solid var(--tblr-border-color); font-weight: var(--tblr-font-weight-medium); }
.av-product-head { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.av-product-no { font-family: var(--tblr-font-monospace); font-size: .8125rem; overflow-wrap: anywhere; }
.av-product-block .av-note { font-size: .8125rem; color: var(--tblr-secondary); }
.av-requests .list-group-item { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .75rem; }
.av-import-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.av-import-figure { display: flex; flex-direction: column; padding: .625rem .75rem; border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); min-width: 0; font-size: .84375rem; }
.av-import-figure .av-figure { font-size: 1.5rem; line-height: 1.2; }
.av-import-notes { font-size: .84375rem; color: var(--tblr-secondary); padding-left: 1.125rem; }
.av-import-title { font-size: .9375rem; margin: 1rem 0 .375rem; }
.av-import-table td { overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
  .av-contacts td.av-products-cell:empty { display: none; }
  .av-context-buttons { width: 100%; }
  .av-context-buttons > .btn, .av-context-buttons > .dropdown, .av-context-buttons > .dropdown > .btn { flex: 1 1 0; width: 100%; }
  .av-import-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .av-import-table thead { display: none; }
  .av-import-table tr { display: block; padding: .5rem 0; border-bottom: 1px solid var(--tblr-border-color); }
  .av-import-table td { display: block; border: 0; padding: .0625rem 0; }
  .av-import-table td::before { content: attr(data-label) ": "; color: var(--tblr-secondary); }
}
/* Confidential numbers of products (0.16.0): masked value with "Anzeigen" and "Kopieren" on the record, a locked
   field with "Anzeigen" and "Ändern" in the panel */
.av-secret { display: flex; flex-direction: column; align-items: flex-start; }
.av-secret .av-kind .badge { font-size: .6875rem; vertical-align: baseline; }
.av-secret-actions { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .375rem; }
.av-secret-actions .btn .ti { margin-right: .25rem; }
.av-entry .av-field > label { display: block; margin: 0; }
/* Stage of a contact (0.17.0): chip with the word, the lead notice on the record, the row action of the list */
.av-stage { font-weight: var(--tblr-font-weight-medium); border: 1px solid var(--tblr-border-color); background: var(--tblr-bg-surface-secondary); color: var(--tblr-body-color); vertical-align: middle; }
.av-stage-lead { border-color: var(--tblr-warning); }
.av-stage-customer { border-color: var(--tblr-success); }
.av-lead-note { display: flex; align-items: flex-start; gap: .625rem; padding: .75rem 1rem; margin-bottom: 1rem; color: var(--tblr-body-color); background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); border-left: .25rem solid var(--tblr-warning); border-radius: var(--tblr-border-radius); }
.av-lead-note .ti { font-size: 1.25rem; line-height: 1.375rem; color: var(--tblr-secondary); flex: none; }
.av-origin { display: block; margin-top: .5rem; font-size: .84375rem; color: var(--tblr-secondary); }
.av-contacts .av-col-action { width: 13rem; }
.av-contacts td.av-action-cell { text-align: right; white-space: nowrap; text-overflow: clip; }
/* the name wraps, so the stage chip is never cut off; with the action column the other columns give way */
.av-contacts td.av-name { white-space: normal; overflow-wrap: break-word; }
.av-contacts td.av-name .av-stage { margin-left: .125rem; }
.av-contacts-actions .av-col-no { width: 6.5rem; }
.av-contacts-actions .av-col-street { width: 16%; }
.av-contacts-actions .av-col-city { width: 15%; }
.av-contacts-actions .av-col-products { width: 14%; }
.av-contacts-actions .av-col-tags { width: 10%; }
.av-contacts-leads .av-col-street { width: 18%; }
.av-contacts-leads .av-col-city { width: 16%; }
@media (min-width: 768px) and (max-width: 1199.98px) {
  /* narrow tables: the row action shows its icon only (name in aria-label and title), tags give way below 992px */
  .av-contacts .av-col-action { width: 3.5rem; }
  .av-contacts td.av-action-cell .av-action-text { display: none; }
  table.av-contacts td.av-action-cell .btn .ti { margin-right: 0; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .av-contacts .av-col-tags, .av-contacts td.av-tags-cell { display: none; }
}
.av-contacts td.av-action-cell .btn .ti { margin-right: .25rem; }
@media (max-width: 767.98px) {
  .av-contacts td.av-action-cell { text-align: left; }
  .av-contacts td.av-action-cell:empty { display: none; }
  .av-contacts td.av-action-cell .btn { width: 100%; margin-top: .375rem; }
}

/* Section "Anfragen" of a contact record (0.18.0): logo of the app, title with a line below, status at the end */
.av-listlogo-sm { width: 44px; flex: none; }
.av-request-main { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; }
.av-request-main > a { overflow-wrap: anywhere; }

/* History ("Verlauf") from the audit trail (0.19.0, templates/_history.html): sentence, time, values to unfold */
.av-hist li { padding-bottom: 1rem; }
.av-hist-text { color: var(--tblr-body-color); }
.av-hist time, .av-timeline time { color: var(--tblr-secondary); white-space: nowrap; }
.av-hist-note { display: inline-block; color: var(--tblr-secondary); font-size: .78125rem; }
.av-hist-details { margin-top: .25rem; font-size: .8125rem; }
.av-hist-details > summary { cursor: pointer; color: var(--tblr-link-color); width: fit-content; }
.av-hist-details > summary:focus-visible { outline: 2px solid var(--av-brand); outline-offset: 2px; }
.av-hist-values { width: 100%; margin-top: .375rem; border-collapse: collapse; table-layout: fixed; }
.av-hist-values th, .av-hist-values td { padding: .25rem .5rem .25rem 0; text-align: left; vertical-align: top; border-top: 1px solid var(--tblr-border-color); overflow-wrap: anywhere; font-weight: 400; }
.av-hist-values thead th { border-top: 0; color: var(--tblr-secondary); font-size: .75rem; }
.av-hist-values tbody th { color: var(--tblr-secondary); width: 28%; }
/* Audit log of the admin */
.av-audit .av-audit-what { min-width: 16rem; }
.av-audit td { vertical-align: top; }

/* History values on narrow screens: one field per block, "Vorher" and "Nachher" below each other (no breaks inside words) */
@media (max-width: 575.98px) {
  .av-hist-values thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .av-hist-values, .av-hist-values tbody, .av-hist-values tr, .av-hist-values th, .av-hist-values td { display: block; width: auto; }
  .av-hist-values tbody th { width: auto; padding-bottom: 0; font-weight: 600; }
  .av-hist-values td { border-top: 0; padding-top: 0; overflow-wrap: break-word; }
  .av-hist-values td::before { content: attr(data-label) ": "; color: var(--tblr-secondary); }
}

/* Admin (0.19.1): the invitation shown once in the dialog (admin.js) */
.av-invite { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .375rem 1rem; margin: 1rem 0 .75rem; text-align: left; }
.av-invite dt { color: var(--tblr-secondary); font-weight: 400; }
.av-invite dd { margin: 0; overflow-wrap: anywhere; }
.av-invite-value { font-family: var(--tblr-font-monospace); user-select: all; }
.av-invite-code { font-size: 1.125rem; font-weight: 600; letter-spacing: .08em; }
.av-invite-note { margin: 0 0 .25rem; padding: .625rem .75rem; border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); background: var(--tblr-bg-surface-secondary); text-align: left; font-size: .84375rem; }
@media (max-width: 575.98px) { .av-invite { grid-template-columns: minmax(0, 1fr); gap: 0; } .av-invite dd { margin-bottom: .5rem; } }
/* Three fields of a create form in one row from tablets on */
@media (min-width: 768px) { .av-filter.av-filter-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Row actions that stay in one line on wide screens (partner list of the admin) */
@media (min-width: 1200px) { .av-actions-nowrap { flex-wrap: nowrap; } }

/* Instance (0.20.0, docs/instance.md): own logo as two images, one for light and one for dark surfaces. The
   header and the side panel of the sign-in page are dark in both modes. */
img.logo-dark { display: none; }
.av-header img.logo-light, .av-auth-side img.logo-light, [data-bs-theme="dark"] img.logo-light { display: none; }
.av-header img.logo-dark, .av-auth-side img.logo-dark, [data-bs-theme="dark"] img.logo-dark { display: block; }
/* Public id of a tenant (admin) */
.av-id { font-family: var(--tblr-font-monospace); font-size: .8125rem; overflow-wrap: anywhere; user-select: all; }
/* Page "Datenstandort und Betrieb": two columns of text, the first one a little narrower */
.av-data-table td { vertical-align: top; overflow-wrap: anywhere; }
@media (min-width: 768px) { .av-data-table th:first-child, .av-data-table td:first-child { width: 55%; } }
/* Apps of the app register (0.23.0): a Tabler icon where an app inside the portal shows its logo. Same width as the
   list logo, colors of the theme only. */
.av-listicon {
  display: flex; align-items: center; justify-content: center; width: 72px; height: 40px; font-size: 1.5rem;
  color: var(--av-brand); background: var(--av-tile-icon-bg); border: 1px solid var(--av-brand-border);
  border-radius: var(--tblr-border-radius);
}
.av-listicon-sm { width: 44px; height: 32px; flex: none; font-size: 1.25rem; }
/* Admin page "Apps": key below the title, the tenants as a wrapping list */
.av-app-name { display: flex; align-items: center; gap: .75rem; }
.av-app-name .av-listicon { width: 40px; flex: none; }
.av-app-tenants { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
