/* Kordo – Grundlayout. Farben des Mandanten kommen aus /branding.css (CSS-Variablen). */

:root {
  --k-bg: #f4f5f7;
  --k-surface: #ffffff;
  --k-border: #e3e6ea;
  --k-muted: #6b7280;
  --k-topbar-h: 60px;
  --k-sidebar-w: 248px;
  --k-radius: .75rem;
  --bs-border-radius: .5rem;
  --bs-border-radius-lg: .75rem;
  --bs-border-color: var(--k-border);
}

body.k-app { background: var(--k-bg); }
.k-skip { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: .5rem; }

/* Kopfzeile */
.k-topbar { height: var(--k-topbar-h); background: var(--k-surface); border-bottom: 1px solid var(--k-border); padding: 0; }
.k-topbar-btn { color: inherit; }
.navbar-brand { font-weight: 600; color: inherit; }
.k-logo { max-height: 36px; max-width: 160px; object-fit: contain; }
.k-logo-fallback {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: .6rem;
  background: var(--k-primary); color: var(--k-primary-contrast); font-weight: 700;
}
.k-logo-fallback-lg { width: 56px; height: 56px; font-size: 1.5rem; border-radius: 1rem; }
.k-brand-name { font-size: 1.05rem; letter-spacing: -.01em; }
.k-user-btn { border: 0; padding: .25rem .5rem; border-radius: 2rem; }
.k-user-btn:hover, .k-user-btn[aria-expanded="true"] { background: var(--k-bg); }
.k-user-role { color: var(--k-muted); }
.k-avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--k-primary-soft); color: var(--bs-primary-text-emphasis); font-weight: 600; font-size: .85rem;
}

/* Rahmen: Seitenleiste + Inhalt */
.k-shell { display: flex; min-height: calc(100vh - var(--k-topbar-h)); }
.k-sidebar {
  width: var(--k-sidebar-w); flex: 0 0 var(--k-sidebar-w); background: var(--k-surface); border-right: 1px solid var(--k-border);
  padding: 1rem .75rem; position: sticky; top: var(--k-topbar-h); height: calc(100vh - var(--k-topbar-h)); overflow-y: auto;
}
.k-nav-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--k-muted); padding: .75rem .75rem .35rem; font-weight: 600; }
.k-sidebar .nav-link, .k-sidebar-mobile .nav-link {
  display: flex; align-items: center; gap: .65rem; color: #1f2937; border-radius: .5rem; padding: .5rem .75rem; font-weight: 500;
}
.k-sidebar .nav-link .bi, .k-sidebar-mobile .nav-link .bi { font-size: 1.05rem; opacity: .8; }
.k-sidebar .nav-link:hover:not(.active), .k-sidebar-mobile .nav-link:hover:not(.active) { background: var(--k-bg); }
.k-sidebar .nav-link.active .bi, .k-sidebar-mobile .nav-link.active .bi { opacity: 1; }
.k-sidebar-mobile { --bs-offcanvas-width: 280px; }

.k-main { flex: 1; min-width: 0; padding: 1.5rem clamp(1rem, 3vw, 2rem) 1rem; display: flex; flex-direction: column; }
.k-page-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-end; margin-bottom: 1.25rem; }
.k-page-title { font-size: 1.5rem; font-weight: 650; letter-spacing: -.015em; margin: 0; }
.k-page-sub { color: var(--k-muted); margin: .15rem 0 0; }
.k-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.k-page-actions:empty { display: none; }
.k-footer { margin-top: auto; padding-top: 2rem; display: flex; justify-content: space-between; color: var(--k-muted); font-size: .8rem; }

/* Karten, Tabellen */
.card { border-color: var(--k-border); border-radius: var(--k-radius); }
.card-header, .card-footer { background: var(--k-surface); border-color: var(--k-border); }
.card-header:first-child { border-radius: var(--k-radius) var(--k-radius) 0 0; }
.k-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--k-muted); font-weight: 600; background: #fafbfc; border-bottom-width: 1px; }
.k-table td, .k-table th { padding: .7rem 1rem; }
.k-row-link { cursor: pointer; }
.k-text-primary { color: var(--k-primary); }
.k-dl dt { font-size: .78rem; color: var(--k-muted); font-weight: 500; }
.k-dl dd { margin-bottom: .85rem; }
.k-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.25rem; color: var(--bs-primary-text-emphasis); }
.k-timeline li { padding: .5rem 0; border-bottom: 1px solid var(--k-border); display: flex; gap: .75rem; align-items: center; }
.k-timeline li:last-child { border-bottom: 0; }

/* Kennzahlen */
.k-kpi .card-body { padding: 1rem 1.1rem; }
.k-kpi-label { font-size: .8rem; color: var(--k-muted); font-weight: 500; }
.k-kpi-icon { color: var(--k-primary); font-size: 1.2rem; opacity: .85; }
.k-kpi-value { font-size: 1.6rem; font-weight: 650; letter-spacing: -.02em; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.k-kpi-hint { font-size: .8rem; color: var(--k-muted); }

/* Rollen */
.k-role { font-weight: 500; border: 1px solid transparent; }
.k-role-customer { background: var(--k-primary-soft); color: var(--bs-primary-text-emphasis); }
.k-role-company { background: #eef2ff; color: #3730a3; }
.k-role-supplier { background: #fef3c7; color: #92400e; }
.k-role-employee { background: #ecfdf5; color: #065f46; }

/* Leerzustand */
.k-empty { text-align: center; padding: 3rem 1rem; }
.k-empty-icon { font-size: 2.5rem; color: var(--k-muted); margin-bottom: .5rem; }

/* Anmeldung */
body.k-auth { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--k-primary-soft), var(--k-bg) 60%); padding: 1rem; }
.k-auth-card { width: 100%; max-width: 400px; background: var(--k-surface); border: 1px solid var(--k-border); border-radius: 1rem; padding: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,.05); }
.k-auth-logo { max-height: 64px; max-width: 220px; object-fit: contain; }
.k-demo-hint { font-size: .85rem; background: #fff8e1; border: 1px solid #ffe08a; border-radius: .5rem; padding: .6rem .8rem; }

/* Branding-Seite */
.k-logo-preview { min-height: 88px; border: 1px dashed var(--k-border); border-radius: .5rem; display: grid; place-items: center; padding: 1rem; background: #fafbfc; }
.k-logo-preview img { max-height: 72px; max-width: 100%; object-fit: contain; }
.k-preview { background: #fafbfc; }
.k-preview-bar { display: flex; align-items: center; gap: .5rem; font-weight: 600; padding: .5rem .75rem; background: #fff; border: 1px solid var(--k-border); border-radius: .5rem; }
.k-preview-dot { width: 18px; height: 18px; border-radius: .35rem; background: var(--p); }
.k-preview-btn { display: inline-block; padding: .375rem .75rem; border-radius: .5rem; background: var(--p); color: #fff; border: 1px solid var(--p); font-size: .9rem; }
.k-preview-btn-outline { background: transparent; color: var(--p); }
.k-preview-badge { display: inline-block; padding: .3rem .55rem; border-radius: 2rem; background: var(--s); color: #fff; font-size: .75rem; font-weight: 600; align-self: center; }
.k-preview-link { color: var(--p); text-decoration: underline; }

/* Kalender */
.k-cal { overflow: hidden; }
.k-cal-scroll { overflow-x: auto; }
.k-cal-grid {
  --k-cal-hour: 76px;
  display: grid; grid-template-columns: 56px repeat(var(--k-cal-days), minmax(130px, 1fr)); min-width: 760px;
}
.k-cal-corner, .k-cal-dayhead { position: sticky; top: 0; background: var(--k-surface); border-bottom: 1px solid var(--k-border); z-index: 2; }
.k-cal-dayhead { padding: .6rem .75rem; display: flex; gap: .4rem; align-items: baseline; border-left: 1px solid var(--k-border); }
.k-cal-dow { font-weight: 600; }
.k-cal-date { color: var(--k-muted); font-size: .85rem; }
.k-cal-dayhead.is-today .k-cal-dow, .k-cal-dayhead.is-today .k-cal-date { color: var(--k-primary); font-weight: 700; }
.k-cal-times { grid-column: 1; }
.k-cal-time { height: var(--k-cal-hour); font-size: .72rem; color: var(--k-muted); text-align: right; padding: 0 .5rem; transform: translateY(-.5em); }
.k-cal-time:first-child { transform: none; padding-top: .15rem; }
.k-cal-col {
  position: relative; border-left: 1px solid var(--k-border); height: calc(var(--k-cal-hours) * var(--k-cal-hour));
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--k-cal-hour) - 1px), var(--k-border) calc(var(--k-cal-hour) - 1px), var(--k-border) var(--k-cal-hour));
}
.k-cal-col.is-today { background-color: rgba(var(--bs-primary-rgb), .035); }
.k-ev {
  position: absolute; left: 4px; right: 4px; border-radius: .45rem; padding: .25rem .45rem; overflow: hidden; font-size: .78rem; line-height: 1.25;
  border: 1px solid color-mix(in srgb, var(--k-primary) 22%, #fff); border-left: 3px solid var(--k-primary);
  background: color-mix(in srgb, var(--k-primary) 13%, #fff); color: #1f2937;
}
.k-ev-body { position: relative; z-index: 1; background: inherit; margin: -.25rem -.45rem 0; padding: .25rem .45rem .15rem; }
.k-ev-has-gap .k-ev-body { display: flex; gap: .35rem; white-space: nowrap; overflow: hidden; }
.k-ev-has-gap .k-ev-service { display: none; }
.k-ev-inset .k-ev-time { font-size: .72rem; }
.k-ev-inset { left: 38%; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.k-ev-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.k-ev-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-ev-service { color: #4b5563; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-ev-online { border-color: color-mix(in srgb, var(--k-secondary) 30%, #fff); border-left-color: var(--k-secondary); background: color-mix(in srgb, var(--k-secondary) 16%, #fff); }
.k-ev-erschienen { border-color: #bfe3cd; border-left-color: #198754; background: #e3f3ea; }
.k-ev-block {
  border-color: #e5e7eb; border-left-color: #9ca3af; color: #6b7280;
  background: repeating-linear-gradient(135deg, #f3f4f6 0, #f3f4f6 6px, #e9eaee 6px, #e9eaee 12px);
}
.k-ev-gap {
  position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.75) 0, rgba(255,255,255,.75) 5px, transparent 5px, transparent 10px);
  border-top: 1px dashed rgba(0,0,0,.15); border-bottom: 1px dashed rgba(0,0,0,.15); display: flex; align-items: center; justify-content: flex-end; padding-right: .35rem;
}
.k-ev-gap span { font-size: .66rem; color: #4b5563; background: rgba(255,255,255,.85); padding: 0 .25rem; border-radius: .2rem; }
.k-legend { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: .35rem; border-left: 3px solid var(--k-primary); background: var(--k-primary-soft); }
.k-legend.k-ev-online { border-color: color-mix(in srgb, var(--k-secondary) 30%, #fff); border-left-color: var(--k-secondary); background: color-mix(in srgb, var(--k-secondary) 16%, #fff); }
.k-legend.k-ev-erschienen { border-color: #bfe3cd; border-left-color: #198754; background: #e3f3ea; }
.k-legend.k-ev-block { border-left-color: #9ca3af; background: repeating-linear-gradient(135deg, #f3f4f6 0, #f3f4f6 3px, #e2e3e7 3px, #e2e3e7 6px); }
.k-legend.k-ev-gap-legend { background: repeating-linear-gradient(135deg, #fff 0, #fff 3px, var(--k-primary-soft) 3px, var(--k-primary-soft) 6px); border: 1px dashed #c4c8ce; }

/* Kasse */
.k-pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
@media (max-width: 991.98px) { .k-pos { grid-template-columns: 1fr; } }
.k-pos-groups .nav-link { white-space: nowrap; }
.k-pos-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.k-pos-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: .5rem; min-height: 96px; text-align: left;
  border: 1px solid var(--k-border); border-radius: .75rem; background: var(--k-surface); padding: .85rem; font-weight: 600; transition: border-color .12s, transform .06s;
}
.k-pos-tile:hover { border-color: var(--k-primary); }
.k-pos-tile:active { transform: scale(.98); }
.k-pos-tile:focus-visible { outline: 3px solid rgba(var(--bs-primary-rgb), .35); outline-offset: 1px; }
.k-pos-tile-price { color: var(--bs-primary-text-emphasis); font-variant-numeric: tabular-nums; font-weight: 500; }
.k-pos-cart { position: sticky; top: calc(var(--k-topbar-h) + 1rem); }
.k-pos-lines { max-height: 46vh; overflow-y: auto; }
.k-pos-line { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; }
.k-pos-qty { display: inline-flex; align-items: center; gap: .25rem; }
.k-pos-qty .btn { width: 28px; height: 28px; padding: 0; line-height: 1; }
.k-pos-total { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.k-pos-pay { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.k-pos-pay .btn { font-size: .95rem; padding: .7rem .25rem; }

@media (max-width: 575.98px) {
  .k-main { padding-top: 1rem; }
  .k-page-title { font-size: 1.3rem; }
  .k-pos-pay { grid-template-columns: 1fr; }
}

/* Status-Badges Plattform */
.k-state { font-weight: 500; }
.k-state-aktiv { background: #e3f3ea; color: #146c43; }
.k-state-einrichtung { background: #fff3cd; color: #8a6300; }
.k-state-gesperrt { background: #f8d7da; color: #a52834; }
.k-state-gekuendigt { background: #e9ecef; color: #495057; }
.k-inv-offen { background: var(--k-primary-soft); color: var(--bs-primary-text-emphasis); }
.k-inv-bezahlt { background: #e3f3ea; color: #146c43; }
.k-inv-storniert { background: #e9ecef; color: #6c757d; text-decoration: line-through; }
.k-inv-overdue { background: #f8d7da; color: #a52834; }
.k-missing { color: #a52834; background: #fdecee; border-radius: .25rem; padding: 0 .25rem; font-size: .9em; }
.k-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.min-w-0 { min-width: 0; }

.k-module-option { display: flex; gap: .65rem; align-items: flex-start; padding: .65rem .75rem; border: 1px solid var(--k-border); border-radius: .6rem; cursor: pointer; height: 100%; }
.k-module-option:hover { border-color: var(--k-primary); }
.k-module-option .form-check-input { margin-top: .2rem; flex-shrink: 0; }
.k-lines td { padding: .4rem .5rem; }
.k-lines thead th { font-size: .78rem; color: var(--k-muted); font-weight: 600; }
.k-sticky { position: sticky; top: calc(var(--k-topbar-h) + 1rem); }
.k-mail-preview .card-body { font-size: .95rem; line-height: 1.6; }

/* Rechnung (Bildschirm und Druck) */
.k-invoice { background: #fff; border: 1px solid var(--k-border); border-radius: var(--k-radius); padding: clamp(1.25rem, 4vw, 3rem); max-width: 900px; }
.k-invoice.is-cancelled { background-image: repeating-linear-gradient(135deg, transparent 0 40px, rgba(220, 53, 69, .04) 40px 80px); }
.k-invoice-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.k-invoice-sender { color: var(--k-muted); border-bottom: 1px solid var(--k-border); padding-bottom: .25rem; display: inline-block; }
.k-invoice-brand { font-size: 1.4rem; font-weight: 700; display: inline-flex; gap: .5rem; align-items: center; }
.k-invoice-meta th { font-weight: 500; color: var(--k-muted); padding: .1rem 1rem .1rem 0; text-align: left; }
.k-invoice-meta td { text-align: right; font-variant-numeric: tabular-nums; }
.k-invoice-lines td, .k-invoice-lines th { font-variant-numeric: tabular-nums; }
.k-invoice-lines tfoot td { border: 0; padding-top: .3rem; padding-bottom: .3rem; }
.k-invoice-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--k-border); padding-top: 1rem; margin-top: 2.5rem; color: var(--k-muted); }
@media (max-width: 575.98px) { .k-invoice-foot { grid-template-columns: 1fr; } }

@media print {
  body.k-app { background: #fff; }
  .k-topbar, .k-sidebar, .k-page-head, .k-footer, .alert, .d-print-none, .k-skip { display: none !important; }
  .k-main { padding: 0; }
  .k-invoice { border: 0; padding: 0; max-width: none; }
  .k-missing { background: none; }
}
.progress { --bs-progress-bar-bg: var(--k-primary); }

.k-consent { background: #fafbfc; border: 1px solid var(--k-border); border-radius: .6rem; padding: .75rem 1rem; }
.k-explain { background: var(--k-primary-soft); border-radius: .6rem; padding: .75rem 1rem; color: var(--bs-primary-text-emphasis); }
.k-ev-lock { position: absolute; right: .3rem; top: .3rem; font-size: .75rem; color: var(--k-primary); }
.k-invoice-pay { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: flex-start; }
.k-invoice-pay > div { flex: 1 1 320px; }
.k-invoice-qr { margin: 0; text-align: center; }
.k-invoice-qr svg { width: 150px; height: 150px; }
.k-invoice-qr figcaption { font-size: .75rem; color: var(--k-muted); }

/* Zeilen, die ein Dokument öffnen */
tr[data-k-href] { cursor: pointer; }

/* Balkendiagramm (eine Reihe, Markenfarbe) – Werte zusätzlich als Tabelle */
.k-bars { padding-top: 2.25rem; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; height: 180px; align-items: end; border-bottom: 1px solid var(--k-border); }
.k-bar { position: relative; height: 100%; display: flex; flex-direction: column; outline: none; }
.k-bar-track { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding: 0 18%; }
.k-bar:hover .k-bar-track, .k-bar:focus-visible .k-bar-track { background: var(--k-bg); border-radius: 4px 4px 0 0; }
.k-bar-fill { width: 100%; min-height: 0; background: var(--k-primary); border-radius: 4px 4px 0 0; }
.k-bar-label { position: absolute; bottom: -1.5rem; left: 0; right: 0; text-align: center; font-size: .72rem; color: var(--k-muted); }
.k-bars + details, .k-bars { margin-bottom: 1.75rem; }
.k-bar[data-k-tip]:hover::after, .k-bar[data-k-tip]:focus-visible::after {
  content: attr(data-k-tip); position: absolute; bottom: calc(100% + .25rem); left: 50%; transform: translateX(-50%); z-index: 5;
  background: var(--bs-body-color); color: var(--k-surface); font-size: .75rem; padding: .3rem .5rem; border-radius: .35rem; white-space: nowrap; pointer-events: none;
}
.k-bar:first-child[data-k-tip]:hover::after, .k-bar:nth-child(2)[data-k-tip]:hover::after { left: 0; transform: none; }
.k-bar:last-child[data-k-tip]:hover::after, .k-bar:nth-last-child(2)[data-k-tip]:hover::after { left: auto; right: 0; transform: none; }

/* Kalkulation */
.k-calc { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; }
.k-calc dt { font-weight: 400; color: var(--k-muted); }
.k-calc dd { margin: 0; text-align: right; white-space: nowrap; }

/* Kassenbeleg (Bon) – Bildschirm, E-Beleg und Druck auf 80-mm-Papier */
.k-bon { background: #fff; color: #111; border: 1px solid var(--k-border); border-radius: .5rem; padding: 1.25rem 1.1rem; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; max-width: 360px; margin: 0 auto; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.k-bon-head { text-align: center; margin-bottom: .75rem; line-height: 1.35; }
.k-bon-name { font-weight: 700; font-size: 1rem; }
.k-bon-meta { display: flex; justify-content: space-between; gap: .5rem; border-top: 1px dashed #999; padding: .35rem 0; }
.k-bon-lines, .k-bon-taxes { width: 100%; border-collapse: collapse; }
.k-bon-lines td { padding: .2rem 0; vertical-align: top; }
.k-bon-lines { border-top: 1px dashed #999; }
.k-bon-tax { color: #666; padding: 0 .5rem !important; text-align: right; }
.k-bon-amount { text-align: right; white-space: nowrap; }
.k-bon-sub { color: #666; font-size: .78rem; }
.k-bon-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; border-top: 2px solid #111; border-bottom: 2px solid #111; padding: .4rem 0; margin: .4rem 0; }
.k-bon-taxes { font-size: .75rem; color: #444; margin-bottom: .4rem; }
.k-bon-taxes th, .k-bon-taxes td { text-align: right; padding: .1rem 0; font-weight: 400; }
.k-bon-taxes th:first-child, .k-bon-taxes td:first-child { text-align: left; }
.k-bon-foot { text-align: center; border-top: 1px dashed #999; padding-top: .5rem; margin-top: .25rem; }
.k-bon-rksv { font-size: .7rem; color: #777; margin-bottom: .35rem; }
.k-bon-storno { text-align: center; font-weight: 700; color: #b02a37; letter-spacing: .3em; padding: .25rem 0; }
.k-bon.is-cancelled .k-bon-lines, .k-bon.is-cancelled .k-bon-total { text-decoration: line-through; }
.k-ebon-qr svg { width: 260px; height: 260px; }
@media print {
  .k-bon { border: 0; box-shadow: none; max-width: 80mm; padding: 0; }
  .k-sidebar, .k-topbar, .k-page-head, .k-site-nav, .k-site-footer, .k-footer { display: none !important; }
}

/* Blättern und Zeitraum */
/* Einheitliche Tabellenleisten (partials/pager.php und kordo-ui.js):
   oben Suche links, Aktionen rechts · unten „1–10 von 23“ links, Seiten Mitte, „pro Seite“ rechts */
.k-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.card > .k-table-toolbar, .k-table-toolbar.is-in-card { margin: 0; padding: .6rem 1rem; border-bottom: 1px solid var(--k-border); }
.k-table-search { position: relative; flex: 0 1 320px; min-width: 200px; margin: 0; }
.k-table-search .bi { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--k-muted); pointer-events: none; }
.k-table-search input { padding-left: 2rem; }
.k-table-actions { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.k-table-actions:empty { display: none; }
.k-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem 1rem; padding: .5rem 0; margin-top: .25rem; }
.card > .k-pager, .k-pager.is-in-card { margin: 0; padding: .5rem 1rem; border-top: 1px solid var(--k-border); background: var(--k-surface); }
.card > .k-pager:last-child { border-radius: 0 0 var(--k-radius) var(--k-radius); }
.k-pager-info { font-size: .85rem; color: var(--k-muted); }
.k-pager .pagination { justify-self: center; }
.k-pager-size { justify-self: end; display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .85rem; color: var(--k-muted); }
.k-pager-size label { margin: 0; white-space: nowrap; }
.k-pager-size select { width: auto; }
@media (max-width: 575.98px) { .k-pager { grid-template-columns: 1fr auto; } .k-pager .pagination { grid-column: 1 / -1; grid-row: 2; justify-self: start; } }

[data-k-table-actions] { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
[data-k-legacy-pager] { display: none !important; }

/* Filterzeilen: Beschriftung über dem Feld, alle Felder und Buttons unten bündig */
.k-filter-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.k-filter-row > label { display: flex; flex-direction: column; gap: .25rem; margin: 0; min-width: 150px; font-size: .85rem; color: var(--k-muted); }
.k-filter-row > label > .form-control, .k-filter-row > label > .form-select { color: var(--bs-body-color); }
@media (max-width: 575.98px) { .k-filter-row > label { flex: 1 1 100%; } }
.k-filter-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; align-items: flex-end; }
.k-inline-field { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .85rem; color: var(--k-muted); white-space: nowrap; }
.k-inline-field .form-select, .k-inline-field .form-control { width: auto; color: var(--bs-body-color); }

/* Seiten mit eigenem Kopf (Personen-/Firmenverzeichnis): nur eine Überschrift zeigen */
.k-main:has(> #k-directory) > .k-page-head { display: none; }

/* Buttons: Icon und Text immer gleich ausgerichtet */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.btn > .bi { line-height: 1; }
.btn > .bi.me-1, .btn > .bi.me-2, .btn > .bi.me-3 { margin-right: 0 !important; }
.btn.d-block, .btn.w-100 { display: flex; }
#k-directory button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; }
.k-period .k-period-label { min-width: 9rem; opacity: 1; }
.k-period input[type=date] { width: auto; }
tfoot.k-sum td, tr.k-sum td { font-weight: 600; background: #fafbfc; }

.k-preview-btn{color:var(--p-on,#fff)}.k-preview-btn-outline,.k-preview-link{color:var(--p-ink,var(--p))}.k-preview-badge{color:var(--s-on,#fff)}
