/* V3 stays visually self-contained; this layer adapts the supplied desktop canvas
   to the website frame and preserves readable, unscaled controls on mobile. */
html {
  scrollbar-gutter: auto;
  height: 100%;
}
body {
  padding: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: block;
}
.shell {
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.side {
  position: relative;
  width: 232px;
  padding: 24px 12px;
  gap: 24px;
}
.portal {
  overscroll-behavior: contain;
}
.body {
  min-width: 0;
  padding: 32px;
}
.screen {
  min-width: 0;
}
.demo-notice {
  flex: none;
  padding: 12px 32px;
  font: 400 11px/1.5 var(--font);
  color: var(--ged);
  background: var(--ruhe);
}
.demo-session {
  font: 400 11px/1.5 var(--font);
  color: var(--ged);
}
.demo-mobilebar {
  display: none;
}
.demo-file-error {
  color: var(--kritisch);
  font-size: 13px;
}
.demo-plus {
  display: inline-flex;
  flex: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--ruhe);
  color: var(--tx);
  font: 400 26px/1 var(--font);
  cursor: pointer;
}
.demo-plus:hover {
  background: var(--hell);
}
.demo-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.demo-attachments:empty {
  display: none;
}
.demo-attachment {
  max-width: 100%;
  overflow-wrap: anywhere;
  background: var(--ruhe);
  color: var(--tx);
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.side .fw-menu {
  top: 110px;
  left: 12px;
  right: 12px;
}
.fw-text {
  min-width: 0;
}
.fw-name,
.side .fw-meta {
  white-space: normal;
  overflow-wrap: anywhere;
}
button:focus-visible,
[tabindex]:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 3px;
}
.sheet {
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.sheet-mrow .v {
  min-width: 0;
  overflow-wrap: anywhere;
}
.overlay:not(.on) {
  visibility: hidden;
}
.phead,
.prow2 {
  min-width: 0;
  grid-template-columns:
    minmax(170px, 1.6fr) minmax(75px, 0.7fr) minmax(75px, 0.7fr) minmax(90px, 0.8fr)
    minmax(100px, 1fr) minmax(70px, 0.7fr);
  gap: 16px;
}
.pc,
.pc-name .nm .nmtx,
.pc-name .ins .instx,
.lc,
.lc.name,
.lc-titel .tt {
  white-space: normal;
  overflow-wrap: anywhere;
}
.msg-actions,
.composer-bar,
.btn-row {
  flex-wrap: wrap;
}
@media (max-width: 1400px) {
  .side {
    width: 212px;
  }
  .body {
    padding: 24px;
  }
  .cols2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .phead,
  .lhead {
    display: none;
  }
  .prow2,
  .lrow {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px;
  }
  .prow2 > :first-child,
  .lrow > :first-child {
    grid-column: 1/-1;
  }
  [data-column]::before {
    content: attr(data-column);
    display: block;
    color: var(--ged);
    font: 500 11px/1.4 var(--font);
    margin-bottom: 4px;
  }
  .lrow .lc-status {
    width: fit-content;
  }
  .ecols {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .demo-mobilebar {
    display: flex;
    height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px;
    background: var(--flaeche-02);
    font: 700 16px/1.2 var(--font);
  }
  #demo-menu {
    min-height: 40px;
    padding: 8px 14px;
    background: var(--flaeche-00);
    border: 0;
    border-radius: 8px;
    color: var(--tx);
    font: 600 13px var(--font);
  }
  .shell {
    height: calc(100% - 56px);
  }
  .side {
    display: none;
    position: absolute;
    inset: 56px 0 0;
    z-index: 40;
    width: 100%;
    height: auto;
    gap: 16px;
    padding: 16px;
  }
  .side .marke {
    display: none;
  }
  .side .fw-menu {
    top: 64px;
    left: 16px;
    right: 16px;
    max-width: 420px;
  }
  .demo-menu-open .side {
    display: flex;
  }
  .side .sitem,
  .firma {
    min-height: 44px;
  }
  .body {
    padding: 24px 16px;
    gap: 24px;
  }
  .demo-notice {
    padding: 10px 16px;
    font-size: 11px;
  }
  .chatwrap {
    padding: 12px 0;
  }
  .chatcol h1,
  .p-title,
  .area-title {
    font-size: 26px;
  }
  .chatcol .composer {
    padding: 16px;
    margin-top: 24px;
  }
  .chat-input,
  .fctrl,
  .msg-input {
    font-size: 16px;
  }
  .fpair,
  .chooser {
    grid-template-columns: 1fr;
  }
  .card,
  .infocard {
    padding: 18px;
  }
  .ohead {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }
  .ohead-main {
    flex-basis: 60%;
  }
  .ohead-fig {
    margin-left: auto;
  }
  .obody-inner {
    padding: 16px;
  }
  .prow {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
  }
  .prow > .tag {
    grid-column: 1/-1;
    justify-self: start;
  }
  .prow-side {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .steps {
    gap: 8px;
  }
  .step {
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }
  .step-line {
    min-width: 8px;
    margin: 0 4px;
  }
  .step-label {
    font-size: 11px;
  }
  .contact-row {
    gap: 12px;
    padding: 12px;
    flex-wrap: wrap;
  }
  .btn-primary,
  .btn-secondary,
  .btn-file,
  .doc,
  .fchip {
    min-height: 40px;
  }
  .msg-actions .btn-primary {
    flex: 1;
  }
  .msg-actions .btn-primary:nth-child(2) {
    display: none;
  }
  .actionrow {
    gap: 8px;
  }
  .actionrow .btn-primary,
  .actionrow .btn-secondary {
    padding: 10px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.demo-chat-toggle {
  border: 0;
  background: none;
  color: var(--ged);
  font: 400 11px/1.4 var(--font);
  padding: 4px 20px;
  text-align: left;
  cursor: pointer;
}
.pc-docs {
  align-items: flex-start;
}
.pc-docs .doc {
  white-space: normal;
  text-align: left;
}
@media (max-width: 720px) {
  .body.empfang {
    padding: 24px 16px;
  }
  .actionrow[data-pill] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .actionrow[data-pill] > button:last-child:nth-child(odd) {
    grid-column: 1/-1;
  }
  .actionrow[data-pill] > button {
    white-space: normal;
  }
}
:root {
  --warnung: #78531b;
  --erledigt: #4c6634;
}
/* The supplied prototype reuses .cbody in its timeline; isolate sidebar spacing. */
.chatblock .cbody {
  padding-bottom: 0;
}
.chatblock .cleer {
  padding-left: 20px;
}
.sidescroll > .sgruppe {
  flex-shrink: 0;
}
.kiwrap {
  position: relative;
}
.kiwrap > .sitem {
  padding-right: 40px;
}
#kiChev {
  display: none;
}
.demo-chat-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  text-align: center;
  color: var(--tx);
}
@media (max-height: 760px) and (min-width: 721px) {
  .side {
    padding: 16px 12px;
    gap: 16px;
  }
  .sgruppe + .sgruppe {
    padding-top: 12px;
  }
}
