/* PRÜFBANK Arbeitsplatz – ruhige, lokale Arbeitsfläche */
:root {
  color-scheme: dark;
  --room: #121513;
  --surface: #1c211e;
  --surface-raised: #242b25;
  --paper: #e9eae2;
  --text: #f3f4ee;
  --muted: #aab2aa;
  --line: #3a433c;
  --line-soft: rgba(243, 244, 238, 0.11);
  --hot: #c7e86b;
  --hot-soft: rgba(199, 232, 107, 0.1);
  --ink: #111411;
  --danger: #d85b50;
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--room);
  scroll-padding-top: 24px;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--room);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

::selection {
  background: var(--hot);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 3px;
}

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--hot);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
select,
input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul,
fieldset {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 760;
}

h2 {
  font-size: 1.18rem;
  font-weight: 720;
}

h3 {
  font-size: 1rem;
}

h4 {
  font-size: 0.95rem;
}

ol,
ul {
  padding: 0;
}

time,
.case-number,
.quiet-count,
.metric__value,
.badge,
.status,
.priority,
.unread-badge {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset: 10px auto auto 10px;
  z-index: 1000;
  padding: 12px 18px;
  transform: translateY(-180%);
  background: var(--hot);
  color: var(--ink);
  font-weight: 750;
}

.skip-link:focus {
  transform: none;
  color: var(--ink);
}

.worker-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(18, 21, 19, 0.97);
}

.worker-header__inner {
  position: relative;
  width: min(100%, 1600px);
  min-height: 74px;
  margin-inline: auto;
  padding-inline: clamp(16px, 2.2vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.worker-brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.worker-brand__mark {
  min-width: 44px;
  min-height: 40px;
  padding: 8px;
  display: grid;
  place-items: center;
  background: var(--hot);
  color: var(--ink);
  font: 800 0.75rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.04em;
}

.worker-brand__text {
  display: grid;
  gap: 1px;
}

.worker-brand__text strong {
  font-size: 0.94rem;
  letter-spacing: 0.07em;
}

.worker-brand__text small {
  color: var(--muted);
  font-size: 0.72rem;
}

.worker-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.worker-nav a,
.worker-menu__nav a {
  min-height: 44px;
  padding: 11px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 650;
}

.worker-nav a:hover,
.worker-nav a[aria-current="page"],
.worker-menu__nav a:hover,
.worker-menu__nav a[aria-current="page"] {
  color: var(--text);
}

.worker-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px var(--hot);
}

.worker-nav a:last-child,
.worker-menu__nav a:last-child {
  margin-left: 8px;
  background: var(--hot);
  color: var(--ink);
  box-shadow: none;
}

.worker-nav a:last-child:hover,
.worker-menu__nav a:last-child:hover {
  color: var(--ink);
  filter: brightness(1.06);
}

.worker-menu {
  display: none;
}

.worker-menu > summary {
  min-width: 64px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  list-style: none;
  font-weight: 700;
}

.worker-menu > summary::-webkit-details-marker,
.queue-disclosure > summary::-webkit-details-marker,
.sub-disclosure > summary::-webkit-details-marker {
  display: none;
}

.worker-menu__nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.worker-menu__nav a {
  width: 100%;
  justify-content: flex-start;
}

.worker-menu__nav a:last-child {
  margin: 8px 0 0;
}

.worker-main {
  width: min(100%, 1600px);
  min-width: 0;
  margin-inline: auto;
  padding: clamp(20px, 2.5vw, 38px) clamp(14px, 2.2vw, 34px) 48px;
  flex: 1;
}

.worker-main:focus {
  outline: none;
}

.worker-footer {
  width: min(100%, 1600px);
  margin-inline: auto;
  padding: 18px clamp(14px, 2.2vw, 34px) 26px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.alert {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: var(--surface);
}

.alert--notice {
  border-left-color: var(--hot);
}

.alert--error {
  border-left-color: var(--danger);
  background: rgba(216, 91, 80, 0.1);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--hot);
  font: 650 0.68rem/1.35 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-raised);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  font-weight: 720;
  line-height: 1.25;
}

.button:hover {
  border-color: var(--hot);
  color: var(--text);
}

.button--primary {
  border-color: var(--hot);
  background: var(--hot);
  color: var(--ink);
}

.button--primary:hover {
  color: var(--ink);
  filter: brightness(1.06);
}

.button--secondary {
  background: transparent;
}

.button--quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button--block {
  width: 100%;
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.button-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.badge,
.status,
.priority,
.unread-badge {
  width: fit-content;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.badge--local {
  border-color: rgba(199, 232, 107, 0.35);
  color: var(--hot);
  text-transform: lowercase;
}

.status--neu,
.status--wartet,
.status--ready {
  border-color: rgba(199, 232, 107, 0.38);
  background: var(--hot-soft);
  color: var(--hot);
}

.status--erledigt {
  opacity: 0.72;
}

.unread-badge {
  border-color: var(--hot);
  background: var(--hot);
  color: var(--ink);
}

.priority {
  border-color: var(--hot);
  color: var(--hot);
  text-transform: uppercase;
}

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel__head {
  margin-bottom: 18px;
}

.panel__head > p:not(.eyebrow) {
  max-width: 65ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.fine-print,
.field-help {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.field-help {
  margin-top: 5px;
}

.quiet-count {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.day-head {
  margin-bottom: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.day-head__copy {
  min-width: 0;
}

.day-head__copy > p:last-child {
  max-width: 65ch;
  margin-top: 10px;
  color: var(--muted);
}

.metrics {
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
  min-width: 0;
  min-height: 98px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.metric + .metric {
  border-left: 1px solid var(--line-soft);
}

.metric:hover,
.metric:focus-visible {
  background: var(--hot-soft);
  color: var(--text);
}

.metric__label {
  color: var(--muted);
  font-size: 0.78rem;
}

.metric__value {
  color: var(--hot);
  font-size: 1.9rem;
  line-height: 1;
}

.dashboard-grid {
  min-width: 0;
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  align-items: start;
  gap: 22px;
}

.case-index {
  padding: 0;
  overflow: hidden;
}

.case-index__head {
  margin: 0;
  padding: 20px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filters {
  padding: 16px 20px 20px;
  border-block: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: var(--room);
}

.filters__search {
  flex: 1 1 240px;
}

.filters > .field:not(.filters__search) {
  flex: 1 1 140px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.field > label,
.kind-choice > legend {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 680;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--room);
  color: var(--text);
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.78;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--hot);
}

input[type="file"] {
  padding: 7px;
}

input[type="file"]::file-selector-button {
  min-height: 36px;
  margin-right: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.stacked-form {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.form-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field--full {
  grid-column: 1 / -1;
}

.check-row {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex: none;
  accent-color: var(--hot);
}

.kind-choice {
  min-width: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.kind-choice > legend {
  margin-bottom: 7px;
}

.kind-choice > label {
  position: relative;
  min-width: 0;
  min-height: 48px;
}

.kind-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.kind-choice span {
  min-height: 48px;
  padding: 11px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.kind-choice input:checked + span {
  border-color: var(--hot);
  background: var(--hot);
  color: var(--ink);
}

.kind-choice input:focus-visible + span {
  outline: 2px solid var(--hot);
  outline-offset: 3px;
}

.case-list,
.queue-list,
.message-list,
.attachment-list,
.part-list,
.event-list {
  list-style: none;
}

.case-list > li + li {
  border-top: 1px solid var(--line-soft);
}

.case-row__link {
  min-width: 0;
  padding: 18px 20px;
  display: block;
  color: var(--text);
  text-decoration: none;
}

.case-row__link:hover {
  background: rgba(243, 244, 238, 0.025);
  color: var(--text);
}

.case-row__topline,
.case-row__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.case-number {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.73rem;
}

.case-row h3 {
  margin-top: 12px;
  font-size: 1.04rem;
}

.case-row__meta,
.case-row__concern {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.case-row__concern {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.next-action {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 2px solid var(--hot);
  background: var(--hot-soft);
  color: var(--text);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.next-action strong {
  margin-right: 8px;
  color: var(--hot);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.next-action--large {
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.case-row__footer {
  margin-top: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.7rem;
}

.empty-state {
  padding: 38px 20px;
  text-align: center;
}

.empty-state h3 {
  font-size: 1.1rem;
}

.empty-state p {
  max-width: 55ch;
  margin: 10px auto 16px;
  color: var(--muted);
}

.empty-state--compact {
  padding: 20px 0 4px;
  text-align: left;
}

.empty-state--compact p {
  margin: 8px 0 0;
}

.empty-compact {
  color: var(--muted);
  font-size: 0.85rem;
}

.day-panel,
.case-main,
.case-actions {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 20px;
}

.system-list,
.timestamp-list,
.compact-list {
  display: grid;
  gap: 10px;
}

.system-list > div,
.timestamp-list > div,
.compact-list > div {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.system-list dt,
.timestamp-list dt,
.compact-list dt {
  color: var(--muted);
  font-size: 0.77rem;
}

.system-list dd,
.timestamp-list dd,
.compact-list dd {
  min-width: 0;
  text-align: right;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.system-panel .fine-print {
  margin-top: 16px;
}

.case-head {
  min-width: 0;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.case-head > div {
  min-width: 0;
}

.case-head .eyebrow {
  margin-top: 10px;
}

.case-head__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.back-link,
.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.case-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 350px;
  align-items: start;
  gap: 20px;
}

.queue-panel {
  padding: 0;
  overflow: hidden;
}

.queue-disclosure > summary,
.sub-disclosure > summary {
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  color: var(--text);
  font-weight: 700;
}

.queue-disclosure > summary {
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-raised);
}

.queue-disclosure:not([open]) > summary {
  border-bottom: 0;
}

.sub-disclosure > summary {
  margin-top: 16px;
  padding-inline: 0;
  border-top: 1px solid var(--line-soft);
  color: var(--hot);
  font-size: 0.86rem;
}

.sub-disclosure > summary::after {
  content: "+";
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.sub-disclosure[open] > summary::after {
  content: "−";
}

.queue-disclosure__content {
  padding: 14px 10px 10px;
}

.queue-panel__head {
  padding: 0 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-panel__head h2 {
  font-size: 0.9rem;
}

.queue-panel__head a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.queue-list {
  display: grid;
  gap: 5px;
}

.queue-item {
  min-width: 0;
  padding: 11px;
  border-left: 2px solid transparent;
  display: grid;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
}

.queue-item:hover {
  background: rgba(243, 244, 238, 0.03);
  color: var(--text);
}

.queue-item--active {
  border-left-color: var(--hot);
  background: var(--hot-soft);
}

.queue-item__topline,
.queue-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-item__topline .case-number {
  margin: 0;
}

.queue-item > strong {
  font-size: 0.84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.queue-item__meta {
  color: var(--muted);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.queue-item__bottom time {
  color: var(--muted);
  font-size: 0.62rem;
  text-align: right;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
}

.case-facts > div {
  min-width: 0;
}

.case-facts__wide {
  grid-column: 1 / -1;
}

.case-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.73rem;
}

.case-facts dd {
  overflow-wrap: anywhere;
}

.disclosure-form {
  padding: 16px 0 2px;
}

.prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-list {
  max-height: min(68vh, 760px);
  padding-right: 6px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line) var(--room);
}

.message {
  max-width: 90%;
  min-width: 0;
}

.message--aus {
  margin-left: auto;
}

.message--notiz {
  max-width: 100%;
}

.message > article {
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--room);
}

.message--aus > article {
  border-color: rgba(199, 232, 107, 0.32);
  background: var(--hot-soft);
}

.message--notiz > article {
  border-style: dashed;
}

.message__head,
.message__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.message__head {
  font-size: 0.76rem;
}

.message__head > span:not(.badge) {
  color: var(--muted);
}

.message__body {
  margin-top: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message__meta {
  margin-top: 11px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.67rem;
}

.external-link-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.external-link-row .fine-print {
  flex: 1 1 240px;
}

.attachment-list {
  margin-bottom: 18px;
  display: grid;
}

.attachment-list > li {
  min-width: 0;
  padding-block: 11px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.attachment-list > li > div {
  min-width: 0;
}

.attachment-list a,
.compact-list a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
}

.attachment-list p,
.attachment-list time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}

.attachment-list time {
  flex: none;
  text-align: right;
}

.upload-form {
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 180px) auto;
  align-items: end;
  gap: 12px;
}

.inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.timestamp-list {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.sale-panel .panel__head {
  margin-bottom: 8px;
}

.sale-panel .badge-row {
  margin-top: 12px;
}

.sale-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.sale-block > h3 {
  margin-bottom: 12px;
}

.sale-block > p:not(.fine-print) {
  color: var(--muted);
  font-size: 0.85rem;
}

.sale-action-form {
  margin-top: 14px;
}

.ad-preview {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--room);
}

.ad-preview h4 {
  margin-top: 10px;
  font-size: 1rem;
}

.ad-preview > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.83rem;
}

.ad-preview__price {
  color: var(--hot) !important;
  font-size: 1.1rem !important;
  font-weight: 750;
}

.missing-data {
  margin-top: 12px;
  padding: 12px;
  border-left: 2px solid var(--hot);
  background: var(--hot-soft);
}

.missing-data h4 {
  color: var(--hot);
}

.missing-data ul {
  margin-top: 8px;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.8rem;
}

.compact-list + .badge {
  margin-top: 12px;
}

.sale-panel > .text-link {
  margin-top: 10px;
}

.ai-draft {
  margin-top: 16px;
  padding: 13px;
  border-left: 2px solid var(--hot);
  background: var(--room);
}

.ai-draft h3 {
  margin-bottom: 9px;
}

.ai-draft p {
  color: var(--muted);
  font-size: 0.83rem;
}

.part-list {
  display: grid;
  gap: 14px;
}

.part-list > li {
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.part-list h3 {
  margin-bottom: 10px;
}

.event-list {
  padding-top: 12px;
  display: grid;
  gap: 12px;
}

.event-list li {
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.event-list strong {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.event-list p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.77rem;
  overflow-wrap: anywhere;
}

.event-list time {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
}

/* WhatsApp-Arbeitsfläche: Posteingang, Verlauf und nachvollziehbare Prüfung */
.wa-head {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.wa-head__title-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.wa-head__mark {
  width: 50px;
  height: 50px;
  flex: none;
  border: 1px solid rgba(199, 232, 107, 0.45);
  display: grid;
  place-items: center;
  background: var(--hot-soft);
  color: var(--hot);
}

.wa-head__mark svg {
  width: 28px;
  height: 28px;
}

.wa-head__title-row .eyebrow {
  margin-bottom: 4px;
}

.wa-head__copy > p:last-child {
  margin-top: 10px;
  color: var(--muted);
}

.wa-head__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.wa-connection {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

.wa-connection > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.wa-connection--ready {
  color: var(--hot);
}

.wa-connection--ready > span {
  background: var(--hot);
}

.wa-statusbar {
  margin-bottom: 12px;
  border: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 170px)) minmax(220px, 1fr);
  background: var(--surface);
}

.wa-statusbar__item {
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wa-statusbar__item > span {
  color: var(--muted);
  font-size: 0.7rem;
}

.wa-statusbar__item > strong {
  color: var(--hot);
  font: 750 1.2rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wa-statusbar__note {
  padding: 12px 16px;
  align-self: center;
  color: var(--muted);
  font-size: 0.73rem;
  text-align: right;
}

.wa-mobile-tabs {
  display: none;
}

.wa-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(390px, 1.5fr) minmax(265px, 0.9fr);
  align-items: stretch;
  gap: 12px;
}

.wa-panel {
  min-width: 0;
  height: clamp(650px, calc(100vh - 285px), 850px);
  padding: 0;
  border-color: var(--line-soft);
  overflow: hidden;
  background: var(--surface);
}

.wa-inbox,
.wa-thread,
.wa-review {
  display: flex;
  flex-direction: column;
}

.wa-inbox__head,
.wa-thread__head,
.wa-review__head {
  min-height: 82px;
  padding: 17px 18px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wa-inbox__head .eyebrow,
.wa-review__head .eyebrow {
  margin-bottom: 5px;
}

.wa-search {
  padding: 0 14px 12px;
  flex: none;
}

.wa-search__field {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 38px;
  align-items: center;
  background: var(--room);
}

.wa-search__field:focus-within {
  border-color: var(--hot);
}

.wa-search__field > svg {
  width: 18px;
  margin-left: 11px;
  color: var(--muted);
}

.wa-search__field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.78rem;
}

.wa-search__field button {
  width: 38px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hot);
  font-size: 1.1rem;
}

.wa-filters {
  padding: 0 14px 12px;
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.wa-filters a {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.69rem;
}

.wa-filters a:hover {
  color: var(--text);
}

.wa-filters a[aria-current="page"] {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--hot);
}

.wa-chat-list {
  min-height: 0;
  border-top: 1px solid var(--line-soft);
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-color: var(--line) transparent;
}

.wa-chat-list > li {
  min-width: 0;
}

.wa-chat {
  position: relative;
  min-width: 0;
  min-height: 104px;
  padding: 14px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.wa-chat:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.wa-chat--active {
  background: var(--hot-soft);
  box-shadow: inset 3px 0 var(--hot);
}

.wa-chat--active:hover {
  background: rgba(199, 232, 107, 0.14);
}

.wa-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-raised);
  color: var(--paper);
  font: 700 0.72rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wa-chat--active .wa-avatar {
  border-color: var(--hot);
  background: var(--hot);
  color: var(--ink);
}

.wa-avatar--large {
  width: 44px;
  height: 44px;
}

.wa-chat__content,
.wa-chat__topline,
.wa-chat__bottomline {
  min-width: 0;
}

.wa-chat__content {
  display: grid;
  gap: 4px;
}

.wa-chat__topline,
.wa-chat__bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wa-chat__topline > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-chat__topline > time {
  flex: none;
  color: var(--muted);
  font-size: 0.58rem;
}

.wa-chat__case {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-chat__preview {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-chat--active .wa-chat__preview,
.wa-chat--active .wa-chat__case {
  color: var(--text);
}

.wa-unread {
  min-width: 20px;
  height: 20px;
  padding-inline: 5px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  flex: none;
  background: var(--hot);
  color: var(--ink);
  font: 750 0.64rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wa-thread {
  overflow-y: auto;
  scrollbar-color: var(--line) transparent;
}

.wa-thread__head {
  justify-content: flex-start;
  border-bottom: 1px solid var(--line-soft);
}

.wa-thread__identity {
  min-width: 0;
  flex: 1;
}

.wa-thread__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wa-thread__name h2 {
  font-size: 1rem;
}

.wa-thread__identity > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.wa-case-link {
  min-height: 44px;
  padding-left: 8px;
  display: inline-flex;
  align-items: center;
  flex: none;
  color: var(--muted);
  font-size: 0.7rem;
}

.wa-thread__vehicle {
  padding: 11px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  flex: none;
  background: var(--room);
}

.wa-thread__vehicle > span:first-child {
  grid-column: 1 / -1;
  color: var(--hot);
  font: 650 0.59rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wa-thread__vehicle > strong {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.wa-thread__vehicle > span:last-child {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.65rem;
  text-align: right;
}

.wa-thread__vehicle > .wa-thread__subject {
  grid-column: 1 / -1;
  grid-row: 3;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: left;
}

.wa-messages {
  min-height: 190px;
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-color: var(--line) transparent;
}

.wa-day {
  padding-block: 3px;
  display: flex;
  justify-content: center;
}

.wa-day > span {
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font: 0.6rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wa-message {
  min-width: 0;
  display: flex;
}

.wa-message--ein {
  justify-content: flex-start;
}

.wa-message--aus {
  justify-content: flex-end;
}

.wa-message--notiz {
  justify-content: center;
}

.wa-bubble {
  min-width: 0;
  max-width: 86%;
  padding: 11px 12px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  background: var(--surface-raised);
}

.wa-message--aus .wa-bubble {
  border-color: rgba(199, 232, 107, 0.25);
  background: var(--hot-soft);
}

.wa-message--notiz .wa-bubble {
  max-width: 94%;
  border-style: dashed;
  background: var(--room);
}

.wa-bubble__head,
.wa-bubble__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wa-bubble__head {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.6rem;
}

.wa-bubble__head > strong {
  color: var(--hot);
  font-weight: 650;
}

.wa-bubble__text {
  color: var(--text);
  font-size: 0.83rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.wa-bubble__meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.56rem;
}

.wa-bubble__meta > time {
  flex: none;
}

.wa-message-files {
  margin-top: 9px;
  display: grid;
  gap: 7px;
}

.wa-message-file {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.72rem;
  text-decoration: none;
}

.wa-message-file > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wa-message-file small {
  margin-top: 3px;
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
}

.wa-message-file > img {
  width: 76px;
  height: 62px;
  flex: none;
  object-fit: cover;
}

.wa-composer {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  flex: none;
  background: var(--surface-raised);
}

.wa-composer__label {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wa-composer__label > label {
  font-size: 0.76rem;
  font-weight: 700;
}

.wa-composer__label > span {
  color: var(--hot);
  font: 0.6rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

.wa-composer textarea {
  width: 100%;
  min-height: 80px;
  max-height: 220px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  resize: vertical;
  background: var(--room);
  color: var(--text);
  font-size: 0.82rem;
}

.wa-composer textarea:focus {
  border-color: var(--hot);
}

.wa-composer__confirm {
  margin-top: 10px;
  font-size: 0.7rem;
}

.wa-composer__actions {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.wa-composer__actions .button {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 0.7rem;
}

.wa-composer__disabled {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.65rem;
}

.wa-gate-note,
.wa-consent-form {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 88%, var(--hot) 12%);
  color: var(--muted);
  font-size: 0.68rem;
}

.wa-gate-note strong {
  color: var(--text);
  font-size: 0.7rem;
}

.wa-consent-form input:not([type="checkbox"]) {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--room);
  color: var(--text);
}

.wa-tools {
  flex: none;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.wa-tools > summary,
.wa-review-details > summary {
  min-height: 44px;
  padding: 11px 16px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.wa-tools__grid {
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wa-tools__grid .button {
  width: 100%;
  font-size: 0.7rem;
}

.wa-review {
  overflow-y: auto;
  scrollbar-color: var(--line) transparent;
}

.wa-review__head {
  border-bottom: 1px solid var(--line-soft);
}

.wa-review__honesty {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.68rem;
}

.wa-review-card,
.wa-question,
.wa-ai-draft {
  margin: 14px 14px 0;
  padding: 13px;
  border: 1px solid var(--line-soft);
  background: var(--room);
}

.wa-review-card--summary {
  border-left: 2px solid var(--hot);
}

.wa-review-card__label {
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wa-review-card__label > h3 {
  font-size: 0.79rem;
}

.wa-review-card__label > span {
  color: var(--muted);
  font: 0.58rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

.wa-review-card > p,
.wa-question > p,
.wa-ai-draft > p {
  color: var(--paper);
  font-size: 0.77rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.wa-review-card > small {
  margin-top: 9px;
  display: block;
  color: var(--muted);
  font-size: 0.59rem;
}

.wa-count {
  padding: 2px 6px;
  border: 1px solid rgba(199, 232, 107, 0.35);
  color: var(--hot) !important;
}

.wa-count--done {
  border-color: var(--line);
  color: var(--muted) !important;
}

.wa-missing-list {
  padding-left: 16px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.7rem;
}

.wa-missing-list > li::marker {
  color: var(--hot);
}

.wa-complete {
  color: var(--muted) !important;
  font-size: 0.7rem !important;
}

.wa-complete > span {
  margin-right: 5px;
  color: var(--hot);
}

.wa-question {
  border-color: rgba(199, 232, 107, 0.35);
  background: var(--hot-soft);
}

.wa-question .eyebrow {
  margin-bottom: 7px;
  font-size: 0.57rem;
}

.wa-question .button,
.wa-ai-draft .button {
  margin-top: 11px;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.68rem;
}

.wa-review-details {
  margin: 14px 14px 0;
  border: 1px solid var(--line-soft);
}

.wa-review-details > summary {
  padding-inline: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
}

.wa-review-details > summary::-webkit-details-marker,
.wa-tools > summary::-webkit-details-marker {
  display: none;
}

.wa-review-details > summary > span {
  color: var(--hot);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wa-fact-list {
  padding: 0 12px 12px;
  display: grid;
  gap: 9px;
}

.wa-fact-list > div {
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 4px;
}

.wa-fact-list dt {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.65rem;
}

.wa-fact-list dt > small {
  font-size: 0.55rem;
}

.wa-fact-list dd {
  color: var(--text);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.wa-document-list {
  padding: 0 12px 12px;
  display: grid;
  gap: 9px;
  list-style: none;
}

.wa-document-list > li {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.wa-document-list a {
  min-height: 32px;
  display: block;
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.wa-document-list span {
  display: block;
  color: var(--muted);
  font-size: 0.57rem;
  overflow-wrap: anywhere;
}

.wa-ai-draft {
  border-left: 2px solid var(--hot);
}

.wa-review__footer {
  margin-top: auto;
  padding: 16px 14px 18px;
  display: grid;
  gap: 12px;
}

.wa-review__footer .button {
  font-size: 0.72rem;
}

.wa-review__footer .text-link {
  justify-self: start;
  font-size: 0.68rem;
}

.wa-empty {
  min-height: 220px;
  padding: 28px 20px;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.wa-empty__icon {
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--hot);
  font: 0.68rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.wa-empty > p {
  max-width: 48ch;
  font-size: 0.78rem;
}

.wa-empty .button,
.wa-empty .text-link {
  margin-top: 5px;
  font-size: 0.73rem;
}

@media (max-width: 1320px) {
  .wa-workspace {
    grid-template-columns: minmax(230px, 0.75fr) minmax(360px, 1.4fr) minmax(240px, 0.82fr);
  }

  .wa-statusbar {
    grid-template-columns: repeat(3, minmax(120px, 150px)) minmax(180px, 1fr);
  }

  .wa-composer__actions .button--quiet {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .wa-workspace {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.4fr);
  }

  .wa-review {
    height: auto;
    max-height: none;
    grid-column: 1 / -1;
  }

  .wa-review__footer {
    margin-top: 16px;
  }

  .wa-statusbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wa-statusbar__note {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
    text-align: left;
  }
}

@media (max-width: 760px) {
  .wa-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .wa-head__actions {
    width: 100%;
    justify-content: space-between;
  }

  .wa-mobile-tabs {
    position: sticky;
    top: 0;
    z-index: 12;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--surface-raised);
  }

  .wa-mobile-tabs > a {
    min-width: 0;
    min-height: 46px;
    padding: 10px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--muted);
    text-align: center;
    text-decoration: none;
    font-size: 0.72rem;
  }

  .wa-mobile-tabs > a + a {
    border-left: 1px solid var(--line);
  }

  .wa-mobile-tabs > a > span {
    color: var(--hot);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  }

  .wa-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .wa-panel {
    height: auto;
    max-height: none;
    scroll-margin-top: 58px;
  }

  .wa-inbox {
    height: min(590px, 72vh);
    min-height: 430px;
  }

  .wa-thread {
    min-height: 620px;
    overflow: hidden;
  }

  .wa-review {
    grid-column: auto;
  }

  .wa-messages {
    max-height: 58vh;
    flex: none;
  }

  .wa-filters a,
  .wa-composer__actions .button,
  .wa-question .button,
  .wa-ai-draft .button,
  .wa-document-list a {
    min-height: 44px;
  }

  .wa-review__honesty,
  .wa-review-card > p,
  .wa-question > p,
  .wa-ai-draft > p {
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .wa-head__mark {
    width: 44px;
    height: 44px;
  }

  .wa-head__copy > p:last-child {
    font-size: 0.82rem;
  }

  .wa-head__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .wa-head__actions .button {
    width: 100%;
  }

  .wa-statusbar__item {
    padding: 10px 8px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .wa-statusbar__item > span {
    font-size: 0.61rem;
  }

  .wa-statusbar__note {
    padding: 10px;
    font-size: 0.66rem;
  }

  .wa-thread__head {
    flex-wrap: wrap;
  }

  .wa-thread__identity {
    min-width: calc(100% - 60px);
  }

  .wa-case-link {
    width: 100%;
    min-height: 36px;
    padding: 0;
  }

  .wa-thread__vehicle {
    grid-template-columns: minmax(0, 1fr);
  }

  .wa-thread__vehicle > span:last-child {
    grid-column: 1;
    grid-row: 4;
    text-align: left;
  }

  .wa-messages {
    padding: 13px 10px;
  }

  .wa-bubble {
    max-width: 94%;
  }

  .wa-composer {
    padding: 13px 12px;
  }

  .wa-composer__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .wa-composer__actions .button,
  .wa-composer__actions .button--quiet {
    width: 100%;
    justify-content: center;
  }

  .wa-composer__disabled {
    margin-left: 0;
    text-align: center;
  }

  .wa-tools__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wa-review-card,
  .wa-question,
  .wa-ai-draft,
  .wa-review-details {
    margin-inline: 12px;
  }
}

@media (max-width: 1200px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .queue-panel {
    grid-column: 1 / -1;
  }

  .queue-list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 1000px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .day-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 900px) {
  .case-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .queue-panel,
  .case-main,
  .case-actions {
    grid-column: 1;
  }

  .queue-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .worker-nav--desktop {
    display: none;
  }

  .worker-menu {
    display: block;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 88px;
  }

  .metric + .metric {
    border-left: 0;
  }

  .metric:nth-child(even) {
    border-left: 1px solid var(--line-soft);
  }

  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line-soft);
  }

  .metric:last-child {
    grid-column: 1 / -1;
  }

  .day-head,
  .case-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-head__badges {
    justify-content: flex-start;
  }

  .day-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .upload-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-form .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .worker-header__inner {
    min-height: 66px;
    gap: 10px;
  }

  .worker-brand__text small {
    display: none;
  }

  .worker-brand__text strong {
    font-size: 0.78rem;
  }

  .worker-main {
    padding-top: 18px;
  }

  .panel {
    padding: 16px;
  }

  .case-index,
  .queue-panel {
    padding: 0;
  }

  .case-index__head,
  .filters,
  .case-row__link {
    padding-inline: 15px;
  }

  .day-head .button,
  .button-row .button,
  .filter-actions,
  .filter-actions .button,
  .external-link-row .button {
    width: 100%;
  }

  .filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .filters > .field,
  .filters__search {
    flex-basis: 100%;
  }

  .form-grid,
  .case-facts,
  .queue-list,
  .upload-form,
  .inline-action {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-facts__wide,
  .upload-form .button {
    grid-column: auto;
  }

  .message {
    max-width: 100%;
  }

  .message-list {
    max-height: 62vh;
    padding-right: 2px;
  }

  .message__meta,
  .attachment-list > li {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-list time {
    text-align: left;
  }

  .system-list > div,
  .timestamp-list > div,
  .compact-list > div {
    gap: 10px;
  }

  .worker-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.wa-operation-stack {
  padding: 0 12px 12px;
  display: grid;
  gap: 12px;
}

.wa-operation-stack > form {
  min-width: 0;
}

.wa-operation-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.wa-operation-list li,
.wa-operation {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.wa-operation-list strong,
.wa-operation-list span {
  display: block;
  overflow-wrap: anywhere;
}

.wa-operation-list span,
.wa-operation p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.65rem;
}

.wa-operation__body {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.wa-operation > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wa-operation > div > strong {
  font-size: 0.73rem;
}

.wa-operation form {
  margin-top: 10px;
}

.wa-operation__error {
  color: #f0a59d !important;
  overflow-wrap: anywhere;
}

.wa-operation__hash {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.worker-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.worker-account__name {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button--small {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 0.72rem;
}

.login-panel {
  width: min(100%, 520px);
  margin: clamp(24px, 8vh, 90px) auto;
  padding: clamp(22px, 4vw, 38px);
  border-top: 3px solid var(--hot);
}

.login-panel > p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
}

.login-form {
  margin-top: 24px;
}

@media (max-width: 900px) {
  .worker-account__name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
