/* Mezger CRM – Oberfläche nach Corporate Design Handbuch v1.1 (Juli 2026) */

@font-face {
  font-family: "Montserrat";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/montserrat-600.c9799d10d224.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/inter-variable.65850a373e25.woff2") format("woff2");
}

:root {
  /* Die elf definierten Markenfarben (Handbuch §3) */
  --navy: #1f2d3d;
  --tiefblau: #255e72;
  --petrol: #2e7d8c;
  --petrol-hell: #5ab0c0;
  --eislicht: #8fd6e2;
  --limette: #a8cc22;
  --anthrazit: #243239;
  --grau: #6b7a85;
  --linie: #d8e2e7;
  --hellgrund: #f5f8f9;
  --weiss: #ffffff;
  --brand-gradient: linear-gradient(135deg, #1f2d3d 0%, #255e72 55%, #2e7d8c 100%);

  --font-head: "Montserrat", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --radius: 6px;

  /* Logo: 180 px Mindestbreite digital, Schutzraum = halber Kugeldurchmesser (§2.5/§2.6) */
  --logo-width: 180px;
  --logo-clear: 21px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 400 15px/1.55 var(--font-body);
  color: var(--anthrazit);
  background: var(--weiss);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--petrol); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
  margin: 0 0 .5em;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
  text-align: left;
}
h1 { font-size: 27px; line-height: 1.2; }
h2 { font-size: 19px; line-height: 1.25; }
h3 { font-size: 16px; }
.muted { color: var(--grau); }
.error { color: #b3261e; }
.inline { display: inline; }
.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;
}

button.link {
  background: none; border: 0; padding: 0; color: var(--petrol);
  font: inherit; cursor: pointer;
}
button.link:hover { text-decoration: underline; }
button.primary {
  background: var(--navy); color: var(--weiss); border: 0; border-radius: var(--radius);
  padding: .65em 1.2em; font: 500 15px var(--font-body); cursor: pointer;
}
button.primary:hover { background: var(--tiefblau); }
button.primary:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--petrol); outline-offset: 2px;
}

/* Kopfzeile: nur das Zeichen (Mikes Entscheidung), Markenverlauf als schmale Kante darüber.
   Zeichen 40 px, Schutzraum = halber Kugeldurchmesser ≈ 14 px. */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--logo-clear);
  background: var(--weiss);
  border-top: 4px solid transparent;
  border-image: var(--brand-gradient) 1;
  border-bottom: 1px solid var(--linie);
}
.topbar .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.topbar .brand img { width: 40px; height: 40px; display: block; }
.brand-label {
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
  letter-spacing: .04em; color: var(--navy);
}
.brand-label small {
  display: block; font-family: var(--font-body, inherit); font-weight: 500; font-size: 11px;
  letter-spacing: .02em; color: var(--grau, #6b7a85); line-height: 1.2; margin-top: 1px;
}
.login .brand { display: block; line-height: 0; }
.login .brand img { width: var(--logo-width); height: auto; display: block; }
.topbar nav { display: flex; gap: 1.25rem; align-items: center; font-weight: 500; }
.topbar nav a { color: var(--navy); }
.topbar nav .user { color: var(--grau); font-weight: 400; }
.badge {
  display: inline-block; min-width: 1.4em; padding: 0 .45em; margin-left: .15em;
  border-radius: 999px; background: var(--petrol); color: var(--weiss);
  font: 600 12px/1.4 var(--font-body); text-align: center; vertical-align: 1px;
}

main { padding: 1.5rem var(--logo-clear); }
.page-title { font-size: 22px; margin-bottom: 1rem; }
.crumbs { margin: 0 0 .25rem; font-size: 13px; color: var(--grau); }

.messages { list-style: none; margin: 0 0 1rem; padding: 0; }
.messages li {
  padding: .6rem .9rem; border-radius: var(--radius); border: 1px solid var(--linie);
  background: var(--hellgrund); margin-bottom: .4rem;
}
.messages li.success { border-color: var(--petrol); }
.messages li.warning { border-color: var(--limette); }
.messages li.error { border-color: #b3261e; color: #b3261e; }

/* Angebote */
.quote-section { margin-bottom: 1.75rem; }
.quote-section h2 { display: flex; align-items: center; gap: .5rem; font-size: 16px; }
.quote-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--weiss); }
.quote-table th {
  text-align: left; font: 600 12px var(--font-head); letter-spacing: .06em;
  text-transform: uppercase; color: var(--grau); padding: .5rem .6rem;
  border-bottom: 1px solid var(--linie);
}
.quote-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--linie); }
.status-badge, .tag-quote {
  display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--linie); background: var(--hellgrund); color: var(--navy);
}
.tag-quote { margin-top: .4rem; margin-left: .3rem; text-decoration: none; }
.proposal-box { margin: .75rem 0 1rem; padding: .75rem; border: 1px solid #e3c87a; background: #fff8e6; border-radius: 6px; }
.proposal-box table.proposal { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .9rem; }
.proposal-box table.proposal th, .proposal-box table.proposal td { text-align: left; padding: .2rem .4rem; border-bottom: 1px solid #eee; }
.proposal-box .actions { display: flex; gap: .75rem; align-items: center; }
.tag-clarification { background: #fff4d6; color: #6b4e00; }
.clarification-box { margin-top: 1rem; padding: .75rem; border: 1px solid var(--line, #dde3e8); border-radius: 6px; }
.clarification-box .actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.tag-campaign { background: var(--navy); border-color: var(--navy); color: var(--weiss); margin-right: .3rem; }
.status-pending_review { background: var(--eislicht); border-color: var(--eislicht); }
.status-approved { background: var(--petrol); border-color: var(--petrol); color: var(--weiss); }
.status-sent { background: var(--navy); border-color: var(--navy); color: var(--weiss); }
.status-rejected { color: var(--grau); }

.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.review-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; } }
.review-main, .review-side { background: var(--hellgrund); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem; }
.quote-form label, .confirm-box label { display: block; margin: .9rem 0 .3rem; font-weight: 500; color: var(--navy); }
.quote-form input[type=text], .quote-form textarea {
  width: 100%; padding: .6em .75em; border: 1px solid var(--linie); border-radius: var(--radius);
  font: inherit; color: var(--anthrazit); background: var(--weiss); line-height: 1.55;
}
.quote-form textarea { min-height: 24rem; resize: vertical; }
.readonly { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6em .75em; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.25rem; }
.actions button, .button {
  background: var(--weiss); color: var(--navy); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: .6em 1.1em; font: 500 14px var(--font-body); cursor: pointer; text-decoration: none; display: inline-block;
}
.actions button:hover, .button:hover { border-color: var(--petrol); text-decoration: none; }
.actions button.primary, .button.primary { background: var(--navy); color: var(--weiss); border-color: var(--navy); }
.actions button.danger { color: #b3261e; }
.review-side h3 { margin-top: 1.25rem; font-size: 14px; }
.review-side h3:first-child { margin-top: 0; }
.side-label { margin: .5rem 0 .2rem; font-size: 12px; color: var(--grau); text-transform: uppercase; letter-spacing: .06em; }
.side-list { margin: 0 0 .5rem; padding-left: 1.1rem; font-size: 14px; }
.prose.small { font-size: 13px; padding: .6rem .75rem; }
.small { font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: .4rem 0; border-top: 1px solid var(--linie); }
.timeline .time { color: var(--grau); margin-right: .4rem; }
.timeline .note { color: var(--grau); margin-top: .15rem; }
.confirm-box { max-width: 760px; background: var(--hellgrund); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.25rem; }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }

/* Pipeline-Board */
.board {
  display: flex; gap: 1rem; align-items: flex-start;
  overflow-x: auto; padding-bottom: 1rem;
}
.column {
  flex: 0 0 284px;
  background: var(--hellgrund);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 12rem);
}
.column-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem .85rem;
  border-top: 3px solid var(--stage-color);
  border-radius: var(--radius) var(--radius) 0 0;
  font-family: var(--font-head); font-weight: 600; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--navy);
}
.count {
  font: 500 12px var(--font-body); letter-spacing: 0; text-transform: none;
  background: var(--weiss); color: var(--grau); border: 1px solid var(--linie);
  border-radius: 999px; padding: 0 .55em;
}
.cards { padding: 0 .55rem .55rem; overflow-y: auto; min-height: 3rem; flex: 1; }
.card {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: .65rem .75rem; margin-bottom: .55rem; cursor: grab;
}
.card:active { cursor: grabbing; }
.sortable-ghost { opacity: .4; }
.sortable-chosen { border-color: var(--petrol); }
.card-title { font-weight: 500; color: var(--navy); }
.card-sub { color: var(--grau); font-size: 13px; }
.tag {
  display: inline-block; margin-top: .4rem; padding: .1em .55em; font-size: 12px;
  background: var(--hellgrund); color: var(--petrol); border: 1px solid var(--linie);
  border-radius: 999px;
}
.card-meta {
  display: flex; gap: .6rem; align-items: center; margin-top: .5rem;
  font-size: 13px; color: var(--grau);
}
.card-meta a { margin-left: auto; }
/* Limette ausschließlich als Akzentpunkt, nie als Schrift (§3.2) */
.ki-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--limette);
  display: inline-block; position: relative;
}

/* Wiedervorlage-Ampel: funktionale Statusfarben (Rot/Gelb sind keine Markenfarben, Grün = Limette).
   Farbe sitzt nur im Punkt, der Text bleibt Anthrazit – so bleibt der Kontrast erhalten. */
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.legend { display: flex; gap: 1rem; margin: 0 0 1rem; font-size: 13px; color: var(--grau); }
.fu { display: inline-flex; align-items: center; gap: .35em; color: var(--anthrazit); white-space: nowrap; }
.fu-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--grau); }
.fu-green .fu-dot { background: var(--limette); }
.fu-yellow .fu-dot { background: #f2b705; }
.fu-red .fu-dot { background: #b3261e; }
.fu-red { font-weight: 500; }
.fu-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.fu-form input[type=date] {
  padding: .3em .5em; border: 1px solid var(--linie); border-radius: var(--radius); font: inherit;
}
.fu-form .button { padding: .35em .8em; font-size: 13px; }

/* Detail-Dialog */
.modal {
  border: 1px solid var(--linie); border-radius: var(--radius); padding: 0;
  width: min(760px, 94vw); color: var(--anthrazit);
}
.modal::backdrop { background: rgba(31, 45, 61, 0.55); }
.modal-body { padding: 1.5rem; }
.modal-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.25rem;
  margin: .75rem 0 1.25rem; font-size: 14px;
}
.facts dt { color: var(--grau); }
.facts dd { margin: 0; }
.prose {
  white-space: pre-wrap; background: var(--hellgrund); border: 1px solid var(--linie);
  padding: .85rem 1rem; border-radius: var(--radius); max-width: 70ch; line-height: 1.6;
}

/* Anmeldung und Passwort: Karte auf dem Markenverlauf, Logo auf Weiß */
body.login-page { background: var(--brand-gradient); min-height: 100vh; }
body.login-page main { padding: 0; }
.login {
  max-width: 420px; margin: 10vh auto; background: var(--weiss);
  padding: var(--logo-clear); border-radius: var(--radius);
}
.login .brand { margin-bottom: 1.5rem; }
.login h1 { font-size: 22px; }
.login label { display: block; margin: 1rem 0 .3rem; font-weight: 500; color: var(--navy); }
.login input {
  width: 100%; padding: .6em .75em; border: 1px solid var(--linie);
  border-radius: var(--radius); font: inherit; color: var(--anthrazit);
}
.login input:focus { border-color: var(--petrol); }
.login button { margin-top: 1.4rem; width: 100%; }
.login .error { margin: .5rem 0 0; padding-left: 1.2em; }
.login .hint { font-size: 13px; color: var(--grau); margin: 0 0 .5rem; }

/* Alltag: Filterleiste, Formulare im Dialog, Verlauf, Startseite „Heute“ */
.board-filter { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 .5rem; }
.board-filter input[type=search], .board-filter select,
.lead-form input, .lead-form select, .lead-form textarea,
.activity-form select, .activity-form textarea, .lost-box select, .lost-box textarea {
  padding: .45em .65em; border: 1px solid var(--linie); border-radius: var(--radius);
  font: inherit; color: var(--anthrazit); background: var(--weiss);
}
.board-filter input[type=search] { min-width: 16rem; }
.board-filter .check { display: inline-flex; gap: .4em; align-items: center; color: var(--grau); font-size: 14px; }
.board-filter .button { margin-left: auto; }
.modal.wide { width: min(760px, 94vw); }
.modal-tools { display: flex; gap: .75rem; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .9rem; }
.grid-2 .span-2 { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: var(--navy); font-weight: 500; margin-bottom: .2rem; }
.field input, .field select, .field textarea { width: 100%; }
.error { color: #b3261e; font-size: 13px; }
.stack { display: grid; gap: .5rem; }
.lost-box { background: var(--hellgrund); border-left: 3px solid #b3261e; border-radius: var(--radius); padding: .85rem 1rem; margin: 0 0 1.25rem; }
.lost-box h3 { margin: 0 0 .5rem; }
.activities h3 { margin-bottom: .5rem; }
.activity-form { display: grid; grid-template-columns: max-content 1fr max-content; gap: .5rem; align-items: start; margin-bottom: .9rem; }
.activity-form .error { grid-column: 1 / -1; }
.timeline .kind-system { color: var(--grau); }
.timeline .kind-system .note { font-style: italic; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.today-card { background: var(--hellgrund); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.15rem; }
.today-card.alert { border-color: #b3261e; }
.today-card.span-2 { grid-column: 1 / -1; }
.today-card h2 { font-size: 15px; margin: 0 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.today-list { list-style: none; margin: 0 0 .75rem; padding: 0; font-size: 14px; }
.today-list li { padding: .3rem 0; border-bottom: 1px solid var(--linie); }
.today-list li:last-child { border-bottom: 0; }
.stage-counts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.stage-counts li { border-top: 3px solid var(--stage-color); background: var(--weiss); border-radius: var(--radius); padding: .5rem .8rem; font-size: 14px; }
.muted { color: var(--grau); }

/* Kunden und Verträge */
.table { width: 100%; border-collapse: collapse; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); font-size: 14px; }
.table th { text-align: left; font-family: var(--font-head); font-weight: 600; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--navy); background: var(--hellgrund); padding: .55rem .75rem; border-bottom: 1px solid var(--linie); }
.table td { padding: .5rem .75rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .r, .table th.r { text-align: right; white-space: nowrap; }
.table.small { font-size: 13px; }
.table.items input, .table.items select { width: 100%; padding: .3em .45em; border: 1px solid var(--linie); border-radius: var(--radius); font: inherit; }
.contract { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .9rem; }
.contract.ended { opacity: .7; }
.contract-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.won-box { background: var(--hellgrund); border-left: 3px solid var(--limette); border-radius: var(--radius); padding: .85rem 1rem; margin: 0 0 1.25rem; }
.won-box h3 { margin: 0 0 .4rem; }
.status-active { background: var(--limette); color: var(--navy); }
.status-inactive { background: var(--linie); color: var(--grau); }

/* Zwei-Faktor-Anmeldung */
.qr { background: var(--weiss); padding: .5rem; display: inline-block; border: 1px solid var(--linie); border-radius: var(--radius); margin: .5rem 0; }
.qr svg { width: 200px; height: 200px; display: block; }
.codes { columns: 2; list-style: none; padding: 0; margin: .75rem 0 1rem; }
.codes code { font-size: 15px; letter-spacing: .05em; }
.login.wide { max-width: 40rem; }

/* Auswertung */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.kpi { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1rem; }
.kpi-value { display: block; font-family: var(--font-head); font-weight: 600; font-size: 24px; color: var(--navy); }
.kpi-label { font-size: 12px; color: var(--grau); }
.bars { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.bars li { display: grid; grid-template-columns: 9rem 1fr auto; gap: .6rem; align-items: center; padding: .25rem 0; }
.bar-label { color: var(--anthrazit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { background: var(--weiss); border: 1px solid var(--linie); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--petrol); }
.bar-fill.lost { background: #b3261e; }
.bar-count { color: var(--grau); white-space: nowrap; }
.bars-v { display: flex; gap: .5rem; align-items: flex-end; height: 160px; padding-top: 1.2rem; }
.bar-v { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; font-size: 11px; color: var(--grau); }
.bar-v-fill { width: 100%; background: var(--petrol); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-v-count { position: absolute; top: 0; color: var(--navy); font-weight: 500; }
.bar-v-label { margin-top: .3rem; }

.activity-form .structure { grid-column: 1 / -1; font-size: 13px; color: var(--grau); }
.fu-form.suggestion { background: var(--hellgrund); border-left: 3px solid var(--limette); padding: .5rem .75rem; border-radius: var(--radius); margin: 0 0 .75rem; font-size: 13px; }

/* Angebotspositionen im Prüfdialog */
.package-form { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .8rem; flex-wrap: wrap; }
.package-form label { font-weight: 600; font-size: .9rem; }
.package-form select { padding: .35em .5em; border: 1px solid var(--linie); border-radius: var(--radius); font: inherit; }
.items-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .6rem 0 .2rem; font-size: 13px; }
.items-tools label { font-weight: 400; }
.items-tools select { max-width: 24rem; padding: .3em .45em; border: 1px solid var(--linie); border-radius: var(--radius); font: inherit; }
.pending { background: #fff8e1; border-left: 3px solid #e0a800; padding: .5rem .8rem; border-radius: var(--radius); font-size: .9rem; }
.table.items { table-layout: fixed; }
.table.items th, .table.items td { padding-left: .4rem; padding-right: .4rem; }
.table.items th:first-child, .table.items td:first-child { padding-left: .6rem; }
.table.items th:last-child, .table.items td:last-child { padding-right: .6rem; }
.table.items th:nth-child(1) { width: 26%; }
.table.items th:nth-child(2) { width: 30%; }
.table.items th:nth-child(3) { width: 14%; }
.table.items th:nth-child(4) { width: 11%; }
.table.items th:nth-child(5) { width: 9%; }
.table.items th:nth-child(6) { width: 10%; }
.table.items td { vertical-align: middle; }
.table.items .check { white-space: nowrap; gap: .3rem; font-size: 12px; color: var(--grau); font-weight: 500; }
.table.items .check input { margin: 0; }
.table.items input[type="number"] { text-align: right; }
.review-full { margin-top: 1.5rem; }
.review-full .section-title { margin: 0 0 .75rem; font-size: 16px; }
.last-act { color: var(--grau); white-space: nowrap; }
.related { background: #fff8e1; border-left: 3px solid #e0a800; border-radius: var(--radius); padding: .5rem .8rem; margin: 0 0 1rem; font-size: 13px; }
.related ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.contract.failed { border-left: 3px solid #c0392b; }
.onboarding-form { margin: .6rem 0 1.2rem; }

.button.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.delete-form { border-top: 1px solid #e6e6e6; padding-top: .5rem; margin-top: .5rem; }

/* Support-Tickets */
.status-new { background: var(--limette); border-color: var(--limette); color: var(--navy); }
.status-open { background: var(--petrol); border-color: var(--petrol); color: var(--weiss); }
.status-waiting_customer { background: var(--eislicht); border-color: var(--eislicht); }
.status-resolved { background: var(--navy); border-color: var(--navy); color: var(--weiss); }
.status-closed { color: var(--grau); }
.prio-high { color: #b3261e; font-weight: 600; }
.prio-urgent { color: var(--weiss); background: #b3261e; padding: 0 .5em; border-radius: 999px; font-weight: 600; }
.thread { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.msg { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: .85rem 1rem; }
.msg.outbound { border-left: 3px solid var(--petrol); }
.msg.note { background: var(--hellgrund); border-style: dashed; }
.msg.draft { border-left: 3px solid var(--limette); }
.msg-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 13px; color: var(--grau); margin-bottom: .4rem; }
.msg-head strong { color: var(--navy); }
.msg-body { white-space: pre-wrap; line-height: 1.55; }
.msg details { margin-top: .5rem; font-size: 13px; }
.msg details pre { white-space: pre-wrap; color: var(--grau); margin: .4rem 0 0; }
.msg-files { margin: .5rem 0 0; padding-left: 1.1rem; font-size: 13px; }
.ticket-form textarea { width: 100%; min-height: 12rem; padding: .6em .75em; border: 1px solid var(--linie); border-radius: var(--radius); font: inherit; line-height: 1.55; resize: vertical; }
.side-form { display: flex; gap: .4rem; align-items: center; margin: .3rem 0 .6rem; }
.side-form select { flex: 1; padding: .35em .5em; border: 1px solid var(--linie); border-radius: var(--radius); font: inherit; }
.ai-box { background: var(--weiss); border-left: 3px solid var(--limette); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; font-size: 14px; }
