/* Leitstand – production styles. Base tokens and components are taken 1:1 from
   entwuerfe/entwurf-a-leitstand.html (approved draft); additions for real data follow at the end. */

:root {
  --ground: #E8ECEF;
  --surface: #FFFFFF;
  --ink: #15212C;
  --ink-2: #45525E;
  --line: #C9D2DA;
  --line-soft: #DFE4E9;
  --steel: #D5DCE2;
  --steel-deep: #BCC6CF;
  --hover: #F6F8F9;

  --run: #0A6CFF;    --run-t: #0A58CC;   --run-tint: #EBF2FF;
  --wait: #F2A900;   --wait-t: #6E4A00;  --wait-tint: #FFF5DA; --wait-line: #E3C36C;
  --fault: #E5484D;  --fault-t: #B3261E; --fault-tint: #FCEFEF;
  --free: #1F9D6B;   --free-t: #0F7049;
  --off: #8E99A4;

  --font: "Archivo", "Archivo Variable", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.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;
}

.page { max-width: 1440px; margin: 0 auto; padding: 20px 32px 28px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; line-height: 1.1;
  padding: 9px 14px; min-height: 36px;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ink:hover { background: #2A3C4D; border-color: #2A3C4D; }
.btn-ink:focus-visible { outline-offset: 3px; }
.btn-small { font-size: 13px; padding: 6px 10px; min-height: 30px; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { border-color: var(--line); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- lamps ---------- */
.lamp {
  --c: var(--off);
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #C4CDD5;
  box-shadow: inset 0 1px 3px rgba(21, 33, 44, .45), 0 1px 0 rgba(255, 255, 255, .85);
}
.lamp::before, .lamp::after { content: ""; grid-area: 1 / 1; border-radius: 50%; }
.lamp::after {
  width: 12px; height: 12px;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 24%, transparent),
              0 0 10px color-mix(in srgb, var(--c) 60%, transparent);
}
.lamp.s-working { --c: var(--run); }
.lamp.s-working::after { animation: breathe 2.6s ease-in-out infinite; }
.lamp.s-ready { --c: var(--free); }
.lamp.s-waiting { --c: var(--wait); }
.lamp.s-external::after {
  width: 14px; height: 14px;
  background: var(--surface);
  border: 3px solid var(--run);
  box-shadow: 0 0 8px color-mix(in srgb, var(--run) 45%, transparent);
}
.lamp.s-limit { --c: var(--fault); }
.lamp.s-limit::before {
  width: 7px; height: 2px; border-radius: 1px;
  background: #fff; position: relative; z-index: 1;
}
.lamp.s-off::after {
  background: #97A2AC;
  box-shadow: inset 0 1px 2px rgba(21, 33, 44, .35);
}
.lamp-sm { width: 20px; height: 20px; }
.lamp-sm::after { width: 10px; height: 10px; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 28%, transparent), 0 0 6px color-mix(in srgb, var(--c) 45%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 10%, transparent), 0 0 18px color-mix(in srgb, var(--c) 85%, transparent); }
}

/* ---------- head ---------- */
.head { position: relative; padding-bottom: 20px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.brand { font-size: 17px; font-weight: 700; font-stretch: 112%; letter-spacing: .01em; }
.bar-right { display: flex; align-items: center; gap: 16px; }
.stand { font-size: 13px; color: var(--ink-2); }
.lagebild {
  margin-top: 14px;
  max-width: 34em;
  font-size: 36px; line-height: 1.12;
  font-weight: 600; font-stretch: 86%;
  letter-spacing: -.012em;
  text-wrap: pretty;
}

/* composer */
.composer {
  position: absolute; right: 0; top: 48px; z-index: 20;
  width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(21, 33, 44, .18);
  padding: 16px;
  display: grid; gap: 12px;
}
.composer h2 { font-size: 16px; font-weight: 650; }
.field { display: grid; gap: 4px; }
.field label, .field .label { font-size: 13px; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px; font-size: 15px;
}
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline-offset: 0; border-color: var(--ink); }
.textarea { resize: vertical; min-height: 64px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.form-error { font-size: 13px; color: var(--fault-t); font-weight: 600; }

/* ---------- waiting on you ---------- */
.waiting {
  background: var(--wait-tint);
  border: 1px solid var(--wait-line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  margin-bottom: 20px;
}
.waiting-head { padding: 16px 18px; display: flex; align-items: flex-start; gap: 10px; border-right: 1px solid var(--wait-line); }
.waiting-head h2 { font-size: 17px; font-weight: 650; line-height: 1.2; padding-top: 1px; white-space: nowrap; }
.waiting-head .count { color: var(--wait-t); margin-left: 4px; }
.decisions { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.decision { padding: 16px 20px 16px; display: grid; gap: 8px; align-content: start; }
.decision + .decision { border-left: 1px solid var(--wait-line); }
.decision-from { font-size: 13px; color: var(--wait-t); font-weight: 600; }
.decision-ticket { font-size: 15px; font-weight: 650; }
.decision-ticket .tid { color: var(--ink-2); font-weight: 500; margin-right: 6px; }
.decision-q { font-size: 16.5px; line-height: 1.4; max-width: 60ch; }
.decision .actions { margin-top: 4px; }
.waiting-empty { padding: 18px 20px; color: var(--ink-2); align-self: center; }

/* ---------- floor: board + dock ---------- */
.floor { display: grid; grid-template-columns: minmax(0, 1fr) clamp(296px, 23.6vw, 340px); gap: 20px; }
.board { align-self: start; }

.board { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.board-head, .lane {
  display: grid;
  grid-template-columns: 58px minmax(160px, 200px) minmax(0, 1.25fr) minmax(0, 1fr);
}
.board-head { font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.board-head > span { padding: 9px 16px; }
.board-head > span:first-child { background: var(--steel); border-right: 1px solid var(--steel-deep); }

.lane { border-top: 1px solid var(--line-soft); cursor: pointer; grid-template-rows: auto 1fr; }
.lane:hover { background: var(--hover); }
.lane > .lane-lamp, .lane > .lane-ident { grid-row: 1 / span 2; }
.lane > .lane-now { grid-column: 3; grid-row: 1; }
.lane > .lane-next { grid-column: 4; grid-row: 1; }
.lane > .lane-alert { grid-column: 3 / 5; grid-row: 2; padding-top: 0; }
.lane:first-child { border-top: 0; }
.lane > div { padding: 16px 16px 16px; min-width: 0; }
.lane > .lane-lamp {
  background: var(--steel); border-right: 1px solid var(--steel-deep);
  display: flex; justify-content: center; padding: 16px 0;
}
.lane:first-child > .lane-lamp { padding-top: 16px; }

.lane-name { font-size: 17px; font-weight: 650; line-height: 1.25; }
.name-btn {
  border: 0; background: none; padding: 0; margin: 0; cursor: pointer;
  font-weight: inherit; text-align: left; border-radius: 3px;
}
.name-btn:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lane-provider { font-size: 13px; color: var(--ink-2); margin-top: 1px; }
.lane-state { font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.is-working .lane-state, .is-external .lane-state { color: var(--run-t); }
.is-ready .lane-state { color: var(--free-t); }
.is-limit .lane-state { color: var(--fault-t); }
.is-off .lane-state { color: var(--ink-2); }

.counts { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.counts b { font-size: 15px; font-weight: 650; color: var(--ink); margin-right: 3px; }

.now-ref { display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); }
.now-title {
  margin-top: 3px;
  font-size: 23px; line-height: 1.15;
  font-weight: 620; font-stretch: 76%;
  letter-spacing: -.004em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.now-meta { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.now-quiet { font-size: 16px; color: var(--ink-2); margin-top: 2px; }
.is-off .now-title { color: var(--ink-2); }
.lane-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lane-alert p { font-size: 14px; color: var(--fault-t); font-weight: 600; }
.lane.is-limit { background: var(--fault-tint); }
.lane.is-limit:hover { background: #F9E7E7; }
.lane .actions { margin-top: 10px; }
.lane-alert .actions { margin-top: 0; }

.next-list { display: grid; gap: 5px; }
.next-list li { display: grid; grid-template-columns: 3.1em minmax(0, 1fr); gap: 4px; font-size: 14px; border-radius: 4px; }
.next-list .tid { color: var(--ink-2); font-size: 13px; padding-top: 1px; }
.next-list .ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-list li.fresh { background: var(--run-tint); box-shadow: 0 0 0 4px var(--run-tint); font-weight: 600; }
.next-more { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.next-empty { font-size: 14px; color: var(--ink-2); max-width: 30ch; }
.lane-note {
  margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  padding-left: 10px; border-left: 3px solid var(--ink);
}
.drop-hint { display: none; font-size: 13px; font-weight: 600; margin-top: 8px; color: var(--ink); }

body.is-dragging .lane.accepts .drop-hint { display: block; }
body.is-dragging .lane.refuses .drop-hint { display: block; color: var(--ink-2); font-weight: 500; }
body.is-dragging .lane.accepts > .lane-next { outline: 2px dashed var(--steel-deep); outline-offset: -8px; }
.lane.drop-over { background: var(--run-tint); }
.lane.drop-over > .lane-next { outline: 2px solid var(--ink) !important; outline-offset: -8px; }

/* ---------- dock ---------- */
.dock-col { align-self: stretch; contain: size; }
.dock {
  position: sticky; top: 16px;
  max-height: min(calc(100vh - 32px), 100%);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.dock-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.dock-head h2 { font-size: 17px; font-weight: 650; }
.dock-count { font-size: 30px; font-weight: 650; font-stretch: 80%; line-height: 1; grid-row: span 2; align-self: center; }
.dock-sub { font-size: 13px; color: var(--ink-2); }
.dock-note { font-size: 13.5px; font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); background: var(--hover); }
.dock-list { overflow-y: auto; padding: 10px; display: grid; gap: 8px; align-content: start; background: #F1F4F6; flex: 1; }
.dock-foot { font-size: 13px; color: var(--ink-2); padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dock-more { display: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 10px;
  cursor: grab;
  display: grid; gap: 6px;
}
.card:hover { border-color: var(--ink-2); }
.card.lifted { opacity: .45; border-style: dashed; }
.card-title { font-size: 15px; font-weight: 550; line-height: 1.3; overflow-wrap: anywhere; }
.card-meta { display: grid; grid-template-columns: 3.1em minmax(0, 1fr) auto auto; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2); }
.card-meta .proj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-assign { border-color: var(--line-soft); color: var(--ink-2); font-weight: 600; }
.btn-assign:hover, .btn-assign[aria-expanded="true"] { border-color: var(--ink-2); color: var(--ink); }
.assign { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.assign p { font-size: 13px; color: var(--ink-2); }
.assign .actions { gap: 6px; }
.assign .btn { font-weight: 550; }
.assign .btn small { font-size: 12px; color: var(--ink-2); font-weight: 500; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(21, 33, 44, .32); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(460px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(21, 33, 44, .16);
  display: flex; flex-direction: column;
  animation: slide-in .18s ease-out;
}
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 18px 20px 16px; border-bottom: 1px solid var(--line); background: var(--steel); }
.drawer-head h2 { font-size: 22px; font-weight: 650; font-stretch: 88%; line-height: 1.15; }
.drawer-head p { font-size: 13.5px; color: var(--ink-2); }
.drawer-head .state { font-weight: 600; color: var(--ink); margin-top: 2px; }
.drawer-body { overflow-y: auto; padding: 4px 20px 24px; }
.drawer-sec { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.drawer-sec:last-child { border-bottom: 0; }
.drawer-sec h3 { font-size: 15px; font-weight: 650; margin-bottom: 8px; display: flex; justify-content: space-between; }
.drawer-sec h3 span { color: var(--ink-2); font-weight: 500; }
.rows { display: grid; gap: 7px; }
.rows li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 6px; font-size: 14.5px; line-height: 1.35; }
.rows .k { color: var(--ink-2); font-size: 13px; padding-top: 1px; }
.rows.log { grid-template-columns: max-content minmax(0, 1fr); column-gap: 16px; }
.rows.log li { display: contents; }
.drawer-empty { font-size: 14px; color: var(--ink-2); }
.drawer-now { font-size: 20px; font-weight: 620; font-stretch: 78%; line-height: 1.2; }

.foot { margin-top: 24px; font-size: 13px; color: var(--ink-2); }

/* ---------- mid widths: dock moves under the waiting strip ---------- */
@media (max-width: 1100px) {
  .floor { grid-template-columns: minmax(0, 1fr); }
  .dock-col { contain: none; order: -1; }
  .dock { position: static; max-height: none; }
  .dock-list { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
  .dock-list.collapsed .card:nth-child(n+7) { display: none; }
  .dock-more { display: inline-flex; }
  .dock-list.collapsed .dock-group { display: none; }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .page { padding: 12px 16px 24px; }
  .lagebild { font-size: 23px; line-height: 1.18; margin-top: 10px; }
  .stand { display: none; }
  .composer { left: 0; right: 0; width: auto; top: 46px; }
  .field-row { grid-template-columns: 1fr; }

  .waiting { grid-template-columns: 1fr; }
  .waiting-head { border-right: 0; border-bottom: 1px solid var(--wait-line); padding: 12px 16px; align-items: center; }
  .decisions { grid-template-columns: minmax(0, 1fr); }
  .decision { padding: 14px 16px; }
  .decision + .decision { border-left: 0; border-top: 1px solid var(--wait-line); }
  .decision-q { font-size: 15.5px; }

  .dock-list { grid-template-columns: 1fr; }
  .dock-list.collapsed .card:nth-child(n+5) { display: none; }

  .board-head { display: none; }
  .lane { grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .lane > div { padding: 12px 14px; }
  .lane > .lane-lamp { grid-row: 1 / span 3; padding: 12px 0; }
  .lane > .lane-ident { grid-column: 2; grid-row: 1; padding-bottom: 0; }
  .lane > .lane-now { grid-column: 2; grid-row: 2; padding-top: 8px; }
  .lane > .lane-alert { grid-column: 2; grid-row: 3; padding-top: 0; }
  .lane-state { margin-top: 3px; }
  .now-title { font-size: 18.5px; }
  .lane > .lane-next { display: none; }
  .lane-note-mobile { display: block; }
  .drawer { width: 100vw; border-left: 0; }
}
@media (min-width: 761px) { .lane-note-mobile { display: none; } }

/* =====================================================================
   Additions for real data (not in the draft). Same tokens, same voice.
   ===================================================================== */
a.btn { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-danger { background: var(--fault-t); border-color: var(--fault-t); color: #fff; }
.btn-danger:hover { background: #8F1E18; border-color: #8F1E18; }
.btn-danger-quiet { border-color: transparent; background: transparent; color: var(--fault-t); }
.btn-danger-quiet:hover { border-color: var(--fault-t); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }

/* head: quiet entry to the planner */
.head-link {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; padding: 8px 4px; border-radius: 6px;
}
.head-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* lamps for states the draft did not show */
.lamp.s-unknown::after { width: 12px; height: 12px; background: transparent; border: 2px solid var(--off); box-shadow: none; }
.lamp.s-away::after { background: #97A2AC; box-shadow: inset 0 1px 2px rgba(21, 33, 44, .35); }
.lamp-xs { width: 14px; height: 14px; box-shadow: inset 0 1px 2px rgba(21, 33, 44, .4); }
.lamp-xs::after { width: 6px; height: 6px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 22%, transparent); }
.lamp-xs.s-working::after { animation: none; }
.lamp-xs.s-external::after { width: 8px; height: 8px; border-width: 2px; box-shadow: none; }
.lamp-xs.s-unknown::after { width: 7px; height: 7px; border-width: 1.5px; }
.lamp-xs.s-limit::before { width: 4px; height: 1.5px; }

/* lane states and extras */
.is-unknown .lane-state, .is-away .lane-state { color: var(--ink-2); font-weight: 500; }
.is-waiting .lane-state { color: var(--wait-t); }
.is-waiting .lane-alert p { color: var(--wait-t); }
.is-away .now-title { color: var(--ink-2); }
.lane-avail { font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.35; }
.lane-note.is-error { color: var(--fault-t); border-left-color: var(--fault); }
.lane-note .btn { margin-left: 6px; }
.dock-note.is-error { color: var(--fault-t); background: var(--fault-tint); }
.drop-hint.is-refused { color: var(--ink-2); font-weight: 500; }

/* small progress meter (routine) */
.meter { height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; max-width: 100%; background: var(--ink-2); border-radius: 2px; }

/* ticket titles open the task panel */
.ticket-btn {
  border: 0; background: none; padding: 0; margin: 0;
  color: inherit; text-align: left; cursor: pointer; border-radius: 3px;
  letter-spacing: inherit; font-stretch: inherit; font-weight: inherit; line-height: inherit;
}
.ticket-btn:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.next-list .ttl.ticket-btn { display: block; width: 100%; min-width: 0; font-size: 14px; }
.rows .ticket-btn { overflow-wrap: anywhere; }
.card-title .ticket-btn { overflow-wrap: anywhere; }
.decision-ticket .ticket-btn { overflow-wrap: anywhere; }

/* card extras: agent indicator, due, progress, "…" menu */
.agent-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; font-weight: 500; }
.card-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.due-late { color: var(--fault-t); font-weight: 600; }
.due-today { color: var(--wait-t); font-weight: 600; }
.progress { height: 3px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--ink-2); }
.next-list li .progress { grid-column: 2; margin-top: 1px; }
.lane-now .progress { margin-top: 10px; max-width: 280px; }
.card .progress { margin: 2px 0; }
.btn-more { border-color: var(--line-soft); color: var(--ink-2); font-weight: 700; min-width: 30px; justify-content: center; letter-spacing: .06em; }
.btn-more:hover, .btn-more[aria-expanded="true"] { border-color: var(--ink-2); color: var(--ink); }
.card-menu { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); cursor: default; }
.menu-label { font-size: 13px; color: var(--ink-2); }
.sub { display: grid; gap: 8px; padding: 10px; background: var(--hover); border: 1px solid var(--line-soft); border-radius: 8px; }
.sub .input, .sub .select { font-size: 14px; padding: 6px 8px; }


/* composer: Todoist-like fields with live previews */
.composer { width: 480px; }
.preview { font-size: 13px; color: var(--ink-2); min-height: 1.35em; }
.preview.is-miss { color: var(--fault-t); font-weight: 600; }
.composer-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.link-quiet {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; padding: 8px 4px; border-radius: 6px;
}
.link-quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* confirmation dialog */
.confirm {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px;
  width: min(440px, calc(100vw - 32px));
  background: var(--surface); color: var(--ink);
  box-shadow: 0 14px 36px rgba(21, 33, 44, .22);
}
.confirm::backdrop { background: rgba(21, 33, 44, .32); }
.confirm h2 { font-size: 17px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.confirm-text { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.confirm .actions { margin-top: 16px; }

/* session expired / load problem */
.problem {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 28px; max-width: 620px; display: grid; gap: 10px;
}
.problem h2 { font-size: 22px; font-weight: 650; font-stretch: 88%; line-height: 1.2; }
.problem p { color: var(--ink-2); max-width: 52ch; }
.problem .actions { margin-top: 6px; }

/* toast (deletions) */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: 8px; max-width: calc(100vw - 32px);
  box-shadow: 0 10px 28px rgba(21, 33, 44, .25);
}
.toast.is-error { background: var(--fault-t); }

/* drawer loading state */
.drawer-loading { font-size: 14px; color: var(--ink-2); }
.drawer-sec .actions { margin-top: 4px; }

/* task panel: same drawer pattern, wider, with a form */
.drawer.task { width: min(580px, 100vw); z-index: 55; }
.task .drawer-head { grid-template-columns: minmax(0, 1fr) auto; }
.task .drawer-head h2 { overflow-wrap: anywhere; }
.task-agent {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--steel-deep);
  font-size: 15px; font-weight: 600; line-height: 1.3;
}
.task-agent.is-limit { color: var(--fault-t); border-color: #EBB4B4; background: var(--fault-tint); }
.task-agent.is-assigned { font-weight: 500; }
/* v5.12: handoff between agents */
.task-uebergabe {
  grid-column: 1 / -1;
  display: grid; gap: 4px;
  padding: 9px 12px; border-radius: 8px;
  background: var(--surface); border: 1px dashed var(--steel-deep);
  font-size: 14.5px; line-height: 1.35;
}
.task-uebergabe-kopf { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.task-uebergabe-text { color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.comment-art { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.task-form { display: grid; gap: 14px; padding: 16px 0 18px; border-bottom: 1px solid var(--line-soft); }
.drawer-foot {
  border-top: 1px solid var(--line); padding: 12px 20px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface);
}
.drawer-foot .spacer { flex: 1; }
.seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(54px, 1fr);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface);
  max-width: 100%;
}
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 7px 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); border-left: 1px solid var(--line); }
.seg label:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -2px; box-shadow: inset 0 0 0 4px #fff; }
.labels { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.label-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 2px 2px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; background: var(--surface); max-width: 100%;
}
.label-chip > span:nth-child(2) { overflow-wrap: anywhere; }
.label-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); flex: none; }
.label-chip .btn { min-height: 26px; padding: 3px 8px; font-size: 12.5px; border-radius: 999px; }
.label-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.label-add .select { width: auto; min-width: 200px; max-width: 100%; }
.comments { display: grid; gap: 12px; }
.comment { display: grid; gap: 2px; }
.comment-meta { font-size: 13px; color: var(--ink-2); }
.comment-text { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.panel-note { font-size: 13.5px; font-weight: 600; padding-left: 10px; border-left: 3px solid var(--ink); }
.panel-note.is-error { color: var(--fault-t); border-left-color: var(--fault); }
.menu-choices { display: flex; flex-wrap: wrap; gap: 6px; }

.stand.is-error { color: var(--fault-t); font-weight: 600; }
.dock-group { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 8px 2px 0; }
.dock-empty { padding: 4px 2px; }
.lane-empty { padding: 16px; }

@media (max-width: 760px) {
  .composer { width: auto; }
  .drawer.task { width: 100vw; border-left: 0; }
  .drawer-foot { padding: 10px 16px; }
  .seg { grid-auto-columns: minmax(0, 1fr); width: 100%; }
  .head-link { font-size: 13px; }
}

/* =====================================================================
   Process additions: navigation, Bereich, rollover, all tickets, task panel sections
   ===================================================================== */
.bar { flex-wrap: wrap; justify-content: flex-start; gap: 8px 16px; }
.bar .tabs { margin-left: 16px; }
.bar .bereiche { margin-left: auto; }
.bar .bereiche[hidden] + .stand { margin-left: auto; }
.tabs { display: flex; gap: 20px; }
.tabs a {
  font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  padding: 9px 0 7px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.bereiche { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--steel); max-width: 100%; overflow-x: auto; }
.bereich-btn {
  border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 5px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.bereich-btn:hover { color: var(--ink); }
.bereich-btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 33, 44, .2); }

/* every ticket in a list is visibly a link to its panel */
.rows .ticket-btn, .next-list .ticket-btn, .rest-row .ticket-btn, .tl-row .ticket-btn, .subtasks .ticket-btn, .task-eltern .ticket-btn {
  text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.rows .ticket-btn:hover, .next-list .ticket-btn:hover, .rest-row .ticket-btn:hover, .tl-row .ticket-btn:hover, .subtasks .ticket-btn:hover, .task-eltern .ticket-btn:hover {
  text-decoration-color: var(--ink);
}

/* rollover */
.rest { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 20px; }
.rest-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.rest-head h2 { font-size: 17px; font-weight: 650; }
.rest-head .count { color: var(--ink-2); margin-left: 8px; }
.rest-sub { font-size: 13px; color: var(--ink-2); }
.rest-head .btn { margin-left: auto; }
.rest-note { margin: 10px 18px 0; }
.rest-row {
  display: grid; grid-template-columns: 3.4em minmax(0, 1.7fr) minmax(0, 1fr) 8.5em auto;
  align-items: center; gap: 6px 14px; padding: 8px 18px; border-top: 1px solid var(--line-soft);
}
.rest-list .rest-row:first-child { border-top: 0; }
.rest-row .tid { color: var(--ink-2); font-size: 13px; }
.rest-titel { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.rest-proj, .rest-tag { font-size: 13px; color: var(--ink-2); min-width: 0; }
.rest-row .actions { gap: 6px; justify-content: flex-end; }
.rest-row > .sub { grid-column: 1 / -1; }

/* all tickets */
.alle { display: grid; gap: 14px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 7px; font-size: 14px; font-weight: 600;
  padding: 7px 12px; min-height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.chip:hover { border-color: var(--ink-2); }
.chip-n { color: var(--ink-2); font-weight: 650; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .chip-n { color: #D5DCE2; }
.filter-row { display: grid; grid-template-columns: minmax(180px, 1.6fr) repeat(4, minmax(120px, 1fr)); gap: 10px; }
.filter-row .select, .filter-row .input { font-size: 14px; padding: 7px 9px; }
.filter-row .select:disabled { color: var(--ink-2); background: var(--hover); }
.alle-note { border: 1px solid var(--line-soft); border-radius: 8px; }
.tl { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tl-head, .tl-row {
  display: grid; grid-template-columns: 34px 52px minmax(0, 2.4fr) minmax(0, 1.1fr) 96px minmax(0, 1fr) 72px 70px 88px;
  align-items: center; column-gap: 12px; padding: 0 16px;
}
.tl-main, .tl-meta { display: contents; }
.tl-head { font-size: 13px; color: var(--ink-2); min-height: 40px; border-bottom: 1px solid var(--line); background: var(--hover); }
.tl-row { min-height: 46px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.tl-list .tl-row:first-child { border-top: 0; }
.tl-row:hover { background: var(--hover); }
.tl-row.is-selected { background: #EDF1F4; }
.tl-check { display: flex; align-items: center; justify-content: center; min-height: 40px; cursor: pointer; }
.tl-check input { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; margin: 0; }
.tl-id { font-size: 13px; color: var(--ink-2); }
.tl-titel { font-size: 15px; font-weight: 550; min-width: 0; padding: 8px 0; overflow-wrap: anywhere; }
.tl-proj, .tl-tag, .tl-wer, .tl-prio { font-size: 13px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-wer { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.is-none { color: var(--ink-2); }
.tl-prio.is-urgent { color: var(--ink); font-weight: 600; }
.tl-fs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.tl-fs .progress { flex: 1; min-width: 28px; }
.tl-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.pager { display: flex; align-items: center; gap: 10px; }
.tl-empty { padding: 28px 18px; display: grid; gap: 8px; justify-items: start; }
.tl-empty-title { font-size: 17px; font-weight: 650; color: var(--ink); }
.bulk {
  position: sticky; bottom: 12px; z-index: 30; display: grid; gap: 10px; align-items: center;
  background: var(--steel); border: 1px solid var(--steel-deep); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 12px 30px rgba(21, 33, 44, .2);
}
.bulk-count { font-size: 14px; font-weight: 650; }
.bulk .actions { gap: 6px; }
.bulk .sub { background: var(--surface); }
.bulk .btn-quiet:hover, .bulk .btn-danger-quiet { background: var(--surface); }

/* task panel sections */
.task-quelle, .task-eltern { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.task-eltern .tid { color: var(--ink-2); }
.task-start { padding-top: 12px; }
.agent-pick { display: grid; gap: 2px; }
.agent-opt { display: grid; grid-template-columns: 18px 14px auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14.5px; }
.agent-opt:hover { background: var(--surface); }
.agent-opt input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.agent-name { font-weight: 600; }
.agent-state { font-size: 13px; color: var(--ink-2); }
.subtasks { display: grid; gap: 6px; }
.subtask { display: grid; grid-template-columns: 18px 3.4em minmax(0, 1fr); align-items: baseline; gap: 8px; font-size: 14.5px; }
.subtask input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; align-self: center; }
.subtask .tid { color: var(--ink-2); font-size: 13px; }
.subtask.is-done .ticket-btn { color: var(--ink-2); text-decoration-line: line-through; }
.inline-add { display: flex; gap: 8px; }
.inline-add .input { flex: 1; min-width: 0; }
.akt-list { display: grid; gap: 10px; margin-bottom: 12px; }
.akt { display: grid; grid-template-columns: 4.6em minmax(0, 1fr) auto; gap: 10px; font-size: 14.5px; align-items: baseline; }
.akt-art { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.akt-body { display: grid; gap: 1px; min-width: 0; }
.akt-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.akt-meta { font-size: 12.5px; color: var(--ink-2); }
.akt-min { font-size: 13px; font-weight: 600; white-space: nowrap; }
.akt-summe { color: var(--ink) !important; font-weight: 600 !important; }
.akt-form { display: grid; gap: 10px; padding: 12px; background: var(--hover); border: 1px solid var(--line-soft); border-radius: 8px; }

@media (min-width: 761px) {
  .bulk { grid-template-columns: auto minmax(0, 1fr); }
  .bulk > .sub, .bulk > .form-error { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .rest-row { grid-template-columns: 3.4em minmax(0, 1fr) auto auto; }
  .rest-proj { display: none; }
  .rest-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row .field:first-child { grid-column: 1 / -1; }
  .tl-head, .tl-row { grid-template-columns: 34px 48px minmax(0, 2fr) minmax(0, 1fr) 88px minmax(0, 1fr) 66px; }
  .tl-fs, .tl-prio, .tl-head span:nth-last-child(-n+2) { display: none; }
}
@media (max-width: 760px) {
  .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand btn" "tabs tabs" "pill pill" "ber ber"; gap: 4px 12px; }
  .bar .timer-pill { grid-area: pill; justify-self: start; margin-left: 0; }
  .bar .brand { grid-area: brand; align-self: center; }
  .bar #composeBtn { grid-area: btn; }
  .bar .tabs { grid-area: tabs; margin-left: 0; }
  .bar .bereiche { grid-area: ber; margin-left: 0; justify-self: start; }
  .composer { top: 46px; }
  .rest-head { padding: 12px 14px; }
  .rest-head .btn { margin-left: 0; }
  .rest-row { grid-template-columns: 3em minmax(0, 1fr); padding: 10px 14px; }
  .rest-tag { grid-column: 2; }
  .rest-note { margin: 10px 14px 0; }
  .filter-row { grid-template-columns: 1fr; }
  .tl-head { grid-template-columns: 34px 1fr; }
  .tl-head span { display: none; }
  .tl-row { grid-template-columns: 30px minmax(0, 1fr); padding: 8px 12px; align-items: start; }
  .tl-main { display: flex; gap: 8px; align-items: flex-start; grid-column: 2; min-width: 0; }
  .tl-id { padding-top: 8px; flex: none; }
  .tl-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; grid-column: 2; padding-bottom: 6px; }
  .tl-titel { padding: 6px 0 2px; }
  .tl-proj, .tl-tag, .tl-wer, .tl-prio { white-space: normal; }
  .tl-fs { display: flex; min-width: 90px; }
  .tl-prio { display: inline; }
  .tl-check { min-height: 34px; }
  .akt { grid-template-columns: 4em minmax(0, 1fr); }
  .akt-min { grid-column: 2; }
}

/* =====================================================================
   Day plan, estimates, timer, day start
   ===================================================================== */
.bar .timer-pill { margin-left: 4px; }
.timer-pill {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  color: var(--run-t); font-size: 13px; font-weight: 600; padding: 4px 10px 4px 7px; border-radius: 999px;
  cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.timer-pill:hover { border-color: var(--ink-2); }

.now-ref { align-items: center; flex-wrap: wrap; }
.card-extra:empty { display: none; }

/* booked time (drawer rows) */
.zeit-chip {
  display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--ink);
  background: var(--hover); border: 1px solid var(--line-soft); border-radius: 999px; padding: 2px 8px;
  white-space: nowrap; font-variant-numeric: tabular-nums; min-height: 22px; cursor: default;
}
.tl-gebucht { font-size: 13px; color: var(--ink-2); white-space: nowrap; }

/* day plan */
.tag { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; margin-bottom: 20px; align-items: start; }
.tag-block { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tag-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.tag-head h2 { font-size: 17px; font-weight: 650; }
.tag-head .count { color: var(--ink-2); font-weight: 500; margin-left: 6px; }
.tag-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.tag-progress .meter { width: 90px; display: block; }
.tag-empty { padding: 16px 18px; color: var(--ink-2); font-size: 14px; }
.tag-empty a { color: var(--ink); }
.routine-list { display: grid; }
.routine-gruppe { border-top: 1px solid var(--line-soft); padding: 4px 0; }
.routine-list > .routine-gruppe:first-child { border-top: 0; }
.routine-gruppe > .routine-zeit { padding: 6px 18px 0; font-weight: 600; }
.routine-items { display: grid; }
.routine-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: start; gap: 2px 10px; padding: 4px 18px; }
.routine-fertig { border-top: 1px solid var(--line-soft); padding: 4px 18px 6px; }
.routine-fertig .routine-list { margin: 0 -18px; }
.routine-link { border-top: 1px solid var(--line-soft); padding: 4px 14px 6px; }
.routine-link .link-quiet { font-size: 13px; }
.routine-item input[type="checkbox"] { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--ink); cursor: pointer; }
.routine-zeit { font-size: 13px; color: var(--ink-2); }
.routine-main { display: grid; gap: 2px; min-width: 0; }
.routine-titel { font-size: 14.5px; line-height: 1.35; cursor: pointer; overflow-wrap: anywhere; }
.routine-item.is-erledigt .routine-titel { color: var(--ink-2); text-decoration: line-through; }
.routine-item.is-uebersprungen .routine-titel { color: var(--ink-2); }
.routine-vorb, .routine-notiz, .routine-meta { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; overflow-wrap: anywhere; }
.routine-item .btn-more { min-height: 24px; padding: 1px 8px; }
.routine-menu { grid-column: 2 / -1; display: grid; gap: 8px; padding: 6px 0 4px; }
.tag > :only-child { grid-column: 1 / -1; }
.ts-gruppe > .routine-zeit { font-weight: 600; margin-top: 4px; }
.fokus-list { display: grid; }
.fokus-slot { display: grid; grid-template-columns: 2.1em minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.fokus-list .fokus-slot:first-child { border-top: 0; }
.fokus-nr { font-size: 28px; font-weight: 650; font-stretch: 80%; line-height: 1; }
.fokus-slot.is-leer .fokus-nr { color: #8E99A4; }
.fokus-main { display: grid; gap: 5px; min-width: 0; }
.fokus-titel { font-size: 19px; font-weight: 620; font-stretch: 82%; line-height: 1.2; overflow-wrap: anywhere; }
.fokus-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--ink-2); }
.fokus-lauf { display: inline-flex; align-items: center; gap: 6px; color: var(--run-t); font-weight: 600; font-variant-numeric: tabular-nums; }
.fokus-actions { display: flex; gap: 6px; }
.fokus-slot.is-done .fokus-titel { color: var(--ink-2); text-decoration: line-through; }
.fokus-pick { display: grid; gap: 4px; margin-top: 2px; }
.pick-btn { width: 100%; display: grid; gap: 1px; text-align: left; border: 1px solid var(--line-soft); background: var(--surface); border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--ink); }
.pick-btn:hover { border-color: var(--ink-2); }
.pick-titel { font-size: 14.5px; font-weight: 550; overflow-wrap: anywhere; }
.pick-meta { font-size: 12.5px; color: var(--ink-2); }
.wzb { border-top: 1px solid var(--line); padding: 8px 18px 12px; }
.wzb-toggle { border: 0; background: none; padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-radius: 4px; }
.wzb-toggle:hover, .wzb-toggle[aria-expanded="true"] { color: var(--ink); }
.wzb-list { display: grid; gap: 6px; margin-top: 6px; }
.wzb-row { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 14px; }
.wzb-row .tid { color: var(--ink-2); font-size: 13px; }
.wzb-list .ticket-btn { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* task panel time */
.task-zeit .zeit-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.zeit-summe { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.zeit-nach { margin-top: 12px; }
.zeit-nach .input { max-width: 180px; }

/* day start dialog */
.tagesstart {
  border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--ink); background: var(--surface);
  width: min(640px, calc(100vw - 24px)); max-height: min(88vh, 860px);
  box-shadow: 0 20px 50px rgba(21, 33, 44, .28);
}
.tagesstart::backdrop { background: rgba(21, 33, 44, .42); }
.ts-inner { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(88vh, 860px); }
.ts-head { padding: 18px 22px 14px; background: var(--steel); border-bottom: 1px solid var(--steel-deep); }
.ts-schritt { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.ts-head h2 { font-size: 26px; font-weight: 650; font-stretch: 86%; line-height: 1.15; margin-top: 2px; }
.ts-sub { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.ts-body { overflow-y: auto; padding: 14px 22px; display: grid; gap: 12px; align-content: start; }
.ts-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); }
.ts-foot .spacer { flex: 1; }
.ts-list { display: grid; gap: 6px; }
.ts-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 15px; }
.ts-row.is-erledigt span:first-child { color: var(--ink-2); text-decoration: line-through; }
.ts-zeit { font-size: 13px; color: var(--ink-2); }
.ts-wahl { display: grid; gap: 6px; }
.ts-slot { display: grid; grid-template-columns: 2em minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; min-height: 48px; }
.ts-slot.is-leer { border-style: dashed; color: var(--ink-2); font-size: 14px; }
.ts-slot .fokus-nr { font-size: 22px; }
.ts-kand-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ts-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ts-filter .input { flex: 1; min-width: 160px; font-size: 14px; padding: 6px 9px; }
.ts-kand { display: grid; }
.ts-kand-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-soft); }
.ts-kand .drawer-empty, .ts-kand .drawer-loading { padding: 8px 0; }
.ts-wahl-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ts-summe { font-size: 24px; font-weight: 650; font-stretch: 86%; line-height: 1.2; }

@media (max-width: 1100px) {
  .tag { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .routine-item { padding: 5px 14px; }
  .routine-gruppe > .routine-zeit { padding: 6px 14px 0; }
  .routine-fertig { padding: 4px 14px 6px; }
  .routine-fertig .routine-list { margin: 0 -14px; }
  .fokus-slot { grid-template-columns: 2em minmax(0, 1fr); padding: 12px 14px; }
  .fokus-actions { grid-column: 2; }
  .wzb { padding: 8px 14px 12px; }
  .wzb-row { grid-template-columns: 3em minmax(0, 1fr) auto; }
  .wzb-row > .btn { grid-column: 2; justify-self: start; }
  .tag-head { padding: 12px 14px; }
  .ts-head, .ts-body, .ts-foot { padding-left: 16px; padding-right: 16px; }
  .ts-head h2 { font-size: 22px; }
}

.wochenhinweis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.wochenhinweis p { font-size: 15px; font-weight: 600; }

/* =====================================================================
   "Zu viel für heute" (#ueberlast, v5.14) – calm line, no modal
   ===================================================================== */
.ueberlast {
  margin-top: 12px;
  background: var(--wait-tint); border: 1px solid var(--wait-line); border-radius: 12px;
  padding: 10px 14px;
}
.ul-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ul-satz { font-size: 15px; font-weight: 600; color: var(--wait-t); margin-right: auto; }
.ul-note { flex-basis: 100%; font-size: 14px; color: var(--ink-2); }
.ul-note.is-error { color: var(--fault-t); font-weight: 600; }
.ul-wahl { margin-top: 10px; border-top: 1px solid var(--wait-line); padding-top: 10px; display: grid; gap: 10px; }
.ul-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ul-gewaehlt { font-size: 14px; color: var(--ink-2); }
.ul-list { display: grid; gap: 4px; }
.ul-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 8px; align-items: start;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; padding: 7px 10px;
}
.ul-row.is-gewaehlt { border-color: var(--ink-2); }
.ul-row input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.ul-titel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 15px; }
.ul-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.ul-rest { font-size: 15px; font-weight: 600; color: var(--wait-t); }
.ul-rest.is-ok { color: var(--free-t); }
.ul-ziel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ul-eigen { display: flex; align-items: center; gap: 8px; }
.ul-eigen label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ul-datum { width: auto; min-width: 150px; font-size: 14px; padding: 6px 9px; }

@media (max-width: 720px) {
  .ueberlast { padding: 10px 12px; }
  .ul-satz { margin-right: 0; flex-basis: 100%; }
  .ul-ziel > .btn { width: 100%; justify-content: center; }
}

/* =====================================================================
   Week planning (#woche)
   ===================================================================== */
.woche { display: grid; gap: 14px; }
.wo-kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px;
}
.wo-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wo-fuer { display: flex; align-items: center; gap: 8px; }
.wo-fuer label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.wo-fuer .select { width: auto; min-width: 170px; font-size: 14px; padding: 6px 9px; }
.wo-summe { margin-left: auto; font-size: 20px; font-weight: 650; font-stretch: 84%; font-variant-numeric: tabular-nums; }
.wo-note { border: 1px solid var(--line-soft); border-radius: 8px; }
.wo-grid { display: grid; grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); gap: 20px; align-items: start; }

.wo-pool {
  position: sticky; top: 16px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.wo-pool.drop-over { outline: 2px solid var(--ink); outline-offset: -2px; }
.wo-pool-kopf { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px 8px; }
.wo-pool-kopf h2 { font-size: 17px; font-weight: 650; }
.wo-pool-kopf .count { color: var(--ink-2); margin-left: 8px; font-weight: 500; }
.wo-pool-toggle { display: none; }
.wo-pool-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.wo-chips { padding: 0 14px 8px; gap: 6px; }
.wo-chips .chip { font-size: 13px; padding: 5px 9px; min-height: 30px; }
.wo-pool-body > .input { margin: 0 14px 8px; width: auto; font-size: 14px; padding: 6px 9px; }
#woBulk .bulk { position: static; margin: 0 10px 8px; box-shadow: none; grid-template-columns: 1fr; }
.wo-pool-list { overflow-y: auto; flex: 1; display: grid; align-content: start; background: #F1F4F6; border-top: 1px solid var(--line); padding: 6px; gap: 6px; }
.pool-row {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 2px 8px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; cursor: grab;
}
.pool-row:hover { border-color: var(--ink-2); }
.pool-row.is-selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pool-row.lifted, .wo-karte.lifted { opacity: .45; border-style: dashed; }
.pool-row > input[type="checkbox"] { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--ink); cursor: pointer; }
.pool-main { display: grid; gap: 3px; min-width: 0; }
.pool-titel { font-size: 14px; font-weight: 550; line-height: 1.3; overflow-wrap: anywhere; }
.pool-titel .tid { color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.pool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; font-size: 12.5px; color: var(--ink-2); }
.pool-proj { max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-wer { font-size: 12.5px; }
.pool-row .btn-more { min-height: 26px; padding: 1px 8px; }
.pool-row > .wo-menu { grid-column: 1 / -1; cursor: default; }
.wo-pool-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

.wo-tage-kopf { display: flex; justify-content: flex-end; min-height: 26px; margin-bottom: 4px; }
.wo-tage { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
.wo-tage.mit-wochenende { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wo-laden, .wo-fehler { grid-column: 1 / -1; }
.wo-tag {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  display: grid; align-content: start; min-height: 220px; min-width: 0;
}
.wo-tag.is-heute { border-color: var(--ink-2); }
.wo-tag.is-weg { background: repeating-linear-gradient(135deg, #F1F4F6 0 8px, #E9EDF0 8px 16px); }
.wo-tag.drop-over { outline: 2px solid var(--ink); outline-offset: -2px; background: var(--run-tint); }
.wo-tag-kopf { display: grid; gap: 5px; padding: 10px 10px 8px; border-bottom: 1px solid var(--line-soft); }
.wo-tagname { font-size: 16px; font-weight: 650; display: flex; align-items: baseline; gap: 6px; }
.wo-datum { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.wo-grund { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.wo-anzahl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.wo-karten { display: grid; gap: 6px; padding: 8px; }
.wo-karte {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
  display: grid; gap: 4px; cursor: grab;
}
.wo-karte:hover { border-color: var(--ink-2); }
.wo-karte-titel { font-size: 13.5px; font-weight: 550; line-height: 1.3; overflow-wrap: anywhere; }
.wo-karte-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; font-size: 12px; color: var(--ink-2); }
.wo-karte-meta .tid { color: var(--ink-2); }
.wo-zurueck { margin-left: auto; min-height: 24px; padding: 0 7px; font-size: 16px; line-height: 1; }
.wo-leer { font-size: 13px; color: var(--ink-2); padding: 10px; }
.wo-menu { display: grid; gap: 8px; }

@media (max-width: 1280px) {
  .wo-tage.mit-wochenende { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .wo-grid { grid-template-columns: minmax(0, 1fr); }
  .wo-pool { position: static; max-height: 460px; }
  .wo-tage, .wo-tage.mit-wochenende { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .wo-summe { margin-left: 0; }
}
@media (max-width: 760px) {
  .wo-kopf { padding: 10px 12px; }
  .wo-fuer .select { min-width: 0; flex: 1; }
  .wo-fuer { width: 100%; }
  .wo-summe { font-size: 18px; }
  .wo-tage, .wo-tage.mit-wochenende { grid-template-columns: minmax(0, 1fr); }
  .wo-tag { min-height: 0; }
  .wo-pool { order: 2; max-height: none; }
  .wo-pool-kopf h2 { display: none; }
  .wo-pool-toggle {
    display: block; width: 100%; text-align: left; border: 0; background: none; padding: 4px 0;
    font-size: 16px; font-weight: 650; color: var(--ink); cursor: pointer;
  }
  .wo-pool:not(.is-offen) .wo-pool-body { display: none; }
  .wo-pool-list { max-height: 520px; }
}

/* =====================================================================
   Task panel: Planung first, day chips, month grid, disclosure, "Mehr"; holiday hints
   ===================================================================== */
.task-planung { display: grid; gap: 12px; }
.task-planung > h3 { margin-bottom: 0; }
.planung-tag { display: grid; gap: 8px; }
.planung-kopf { display: flex; align-items: baseline; gap: 10px; }
.planung-label-klein { font-size: 13px; color: var(--ink-2); }
.tag-aktuell { font-size: 20px; font-weight: 650; font-stretch: 84%; font-variant-numeric: tabular-nums; }
.planung-felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; }
.planung-felder .seg { width: 100%; grid-auto-columns: minmax(0, 1fr); }
.planung-felder .seg span { white-space: nowrap; padding: 7px 2px; font-size: 13px; }
.planung-wert { font-size: 14px; font-weight: 600; margin: 2px 0 6px; overflow-wrap: anywhere; }
.planung-start > .drawer-sec { padding: 4px 0 0; border: 0; }
.tag-wahl { display: grid; gap: 8px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; padding: 5px 9px; min-height: 30px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tag-chip:hover { border-color: var(--ink-2); }
.tag-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag-chip[aria-expanded="true"] { border-color: var(--ink); }
.tag-punkt, .kal-punkt { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--wait); flex: none; }
.tag-legende, .kal-legende { display: grid; gap: 3px; font-size: 12.5px; color: var(--ink-2); }
.tag-legende li, .kal-legende li { display: flex; align-items: center; gap: 6px; }
.kal-legende .is-frei .kal-punkt { background: #9AA6B1; }
.tag-text-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-2); }
.tag-text-zeile .input { width: auto; max-width: 190px; font-size: 13px; padding: 4px 8px; min-height: 30px; }
.kalender { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; background: var(--surface); max-width: 320px; display: grid; gap: 6px; }
.kal-nav { display: flex; align-items: center; justify-content: space-between; }
.kal-titel { font-size: 14px; font-weight: 650; }
.kal-gitter { display: grid; gap: 2px; }
.kal-zeile { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.kal-wt { font-size: 11.5px; color: var(--ink-2); text-align: center; padding: 2px 0; }
.kal-tag {
  position: relative; height: 34px; border: 1px solid transparent; border-radius: 6px; background: none;
  font-size: 13.5px; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums;
}
.kal-tag:hover { border-color: var(--line); }
.kal-tag.is-wochenende { color: var(--ink-2); background: var(--hover); }
.kal-tag.is-aussen { color: #8E99A4; }
.kal-tag.is-heute { border-color: var(--ink-2); font-weight: 700; }
.kal-tag.is-gewaehlt { background: var(--ink); color: #fff; border-color: var(--ink); }
.kal-tag.is-frei { background: repeating-linear-gradient(135deg, #F1F4F6 0 5px, #E4E9ED 5px 10px); }
.kal-tag.is-feiertag::after, .kal-tag.is-frei::after {
  content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--wait);
}
.kal-tag.is-frei::after { background: #9AA6B1; }
.kal-tag:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.kal-hilfe { font-size: 12px; color: var(--ink-2); }
.task-zeit-akt { padding: 10px 0; }
.aufklapper {
  width: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; text-align: left;
  border: 0; background: none; padding: 6px 0; cursor: pointer; color: var(--ink); border-radius: 6px;
}
.aufklapper-titel { font-size: 15px; font-weight: 650; }
.aufklapper-summe { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.aufklapper-pfeil { margin-left: auto; color: var(--ink-2); }
.aufklapper-inhalt > .drawer-sec { padding: 12px 0; }
.aufklapper-inhalt > .drawer-sec:last-child { border-bottom: 0; }
.task-mehr { position: relative; }
.task-mehr-menu {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; width: min(300px, 80vw);
  display: grid; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(21, 33, 44, .18);
}
.mehr-eintrag { display: grid; gap: 2px; }
.mehr-eintrag .link-quiet { padding: 2px 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.mehr-hint { font-size: 12.5px; color: var(--ink-2); }
.mehr-eintrag .btn-danger-quiet { justify-self: start; }
.feiertagshinweis { margin-top: 8px; font-size: 14px; color: var(--ink-2); }
/* v5.13: the deploy automation switch in the head - one calm line, the lamp says whether it is on. */
.automatikschalter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
.automatik-lampe { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3, #9aa0a6); flex: none; }
.automatik-lampe.is-an { background: #16a34a; }
.automatik-text { min-width: 0; }
.wo-feiertag { display: grid; gap: 1px; }
.feiertag-chip {
  justify-self: start; font-size: 12px; font-weight: 600; color: var(--wait-t); background: var(--wait-tint);
  border: 1px solid var(--wait-line); border-radius: 6px; padding: 1px 7px; overflow-wrap: anywhere; line-height: 1.35;
}
.feiertag-hinweis { font-size: 12px; color: var(--ink-2); }

@media (max-width: 760px) {
  .planung-felder { grid-template-columns: minmax(0, 1fr); }
  .kalender { max-width: none; }
  .task-mehr-menu { width: min(300px, calc(100vw - 32px)); }
}

/* ---- authors: "Fabian" or name + KI pill; impersonation warning */
.autor { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.autor-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ki-pill {
  display: inline-block; font-size: 10.5px; line-height: 1.5; font-weight: 700; letter-spacing: .03em;
  color: var(--ink-2); background: var(--hover); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px;
}
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.akt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.feed-body { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.verdacht {
  margin: 4px 0 2px; padding: 6px 10px; font-size: 13.5px; font-weight: 600; line-height: 1.4;
  color: var(--fault-t); background: var(--fault-tint); border-left: 3px solid var(--fault-t); border-radius: 4px;
}
.verdacht strong { font-weight: 800; }
.comment.is-verdacht .comment-text, .feed-eintrag.is-verdacht .row-btn, .akt .verdacht + .akt-text { color: var(--ink-2); }

/* ---- composer v5.5: Für with status, instruction for agents, model, day + duration chips */
.toast.is-warn { background: var(--wait-tint); color: var(--wait-t); border: 1px solid var(--wait-line); }
.composer { width: 540px; max-height: calc(100vh - 64px); overflow-y: auto; align-content: start; gap: 14px; }
.c-fuer { display: flex; align-items: center; gap: 8px; }
.c-fuer .select { flex: 1; min-width: 0; }
.c-hinweis { font-size: 13px; color: var(--ink-2); }
.c-hinweis.is-warn { justify-self: start; color: var(--wait-t); background: var(--wait-tint); border: 1px solid var(--wait-line); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.c-text-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.c-hilfe { font-size: 13px; color: var(--ink-2); }
.c-modell .seg { width: 100%; grid-auto-columns: minmax(0, 1fr); }
.c-modell .seg span { padding: 7px 4px; font-size: 13.5px; white-space: nowrap; }
.c-tag .tag-wahl { margin-top: 2px; }
.composer-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.c-labels { margin-top: 8px; }
.composer-foot { position: sticky; bottom: -16px; margin: 0 0 -16px; padding: 10px 0 16px; background: var(--surface); border-top: 1px solid var(--line-soft); z-index: 1; }

@media (max-width: 760px) {
  .composer {
    position: fixed; inset: 0; top: 0; width: auto; height: 100%; max-height: none; z-index: 60;
    border: 0; border-radius: 0; box-shadow: none; padding: 16px 16px 0;
  }
  .composer-row3 { grid-template-columns: minmax(0, 1fr); }
  .composer-foot { bottom: 0; margin: 0; padding: 10px 0 16px; }
  .composer .input, .composer .select, .composer .textarea { font-size: 16px; }
}

/* ---- today rule: empty "Wenn Zeit bleibt" */
.wzb-leer { padding: 12px 20px 14px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line-soft); }
.wzb-leer a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

/* ---- ERP bridge: source line, "Im ERP öffnen", long option lists wrap */
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.decision-quelle, .task-erp-quelle { font-size: 13px; color: var(--ink-2); font-weight: 600; }
/* v5.11 deploy requests (Deploy-Schleuse): checksum line in tabular digits, long package names wrap */
.decision-paket { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; font-weight: 500; }
.decision-deploy .decision-q { white-space: pre-line; overflow-wrap: anywhere; max-height: 16em; overflow-y: auto; }
.task-erp { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.decision .actions { flex-wrap: wrap; }
.decision .actions .btn { white-space: normal; text-align: left; max-width: 100%; }

.btn.is-danger { color: var(--fault-t); border-color: var(--fault-t); background: var(--surface); }
.btn.is-danger:hover { background: var(--fault-tint); }

/* ---- done checkbox: Deine 3, Wenn Zeit bleibt, Von gestern übrig */
.haken { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 10px; cursor: pointer; }
.haken.is-klein { width: 34px; height: 34px; }
.haken:hover { background: var(--hover); }
.haken-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.haken-mark { position: relative; width: 22px; height: 22px; border: 2px solid var(--ink-2); border-radius: 6px; background: var(--surface); pointer-events: none; }
.haken.is-klein .haken-mark { width: 19px; height: 19px; border-radius: 5px; }
.haken:hover .haken-mark { border-color: var(--ink); }
.haken-input:checked + .haken-mark { background: var(--free-t); border-color: var(--free-t); }
.haken-input:checked + .haken-mark::after {
  content: ""; position: absolute; left: 50%; top: 45%; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translate(-50%, -50%) rotate(45deg);
}
.haken-input:focus-visible + .haken-mark { outline: 2px solid var(--ink); outline-offset: 3px; }
.haken-platz { display: inline-block; width: 44px; }
.wzb-row .haken-platz { width: 34px; }
.fokus-slot { grid-template-columns: 44px 1.4em minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 18px 10px 8px; }
.fokus-nr { font-size: 22px; }
.fokus-mehr { min-width: 40px; font-size: 18px; line-height: 1; }
.fokus-menu { grid-column: 3 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; background: var(--hover); border: 1px solid var(--line-soft); border-radius: 8px; }
.fokus-menu-lauf { font-size: 13px; font-weight: 600; color: var(--run-t); margin-right: 4px; }
.fokus-slot.is-done .fokus-meta { opacity: .7; }
.fokus-slot.is-done .fokus-btn { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-2); }
.wzb-row { grid-template-columns: 34px 3.4em minmax(0, 1fr) auto auto; }
/* #1860: priority visible per row + sort choice (Prio / Projekt / Nr) */
.wzb-titel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.wzb-proj { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wzb-prio { font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.wzb-prio.prio-0 { border-color: transparent; color: var(--off); font-weight: 500; }
.wzb-prio.prio-3 { color: var(--wait-t); background: var(--wait-tint); border-color: var(--wait-line); }
.wzb-prio.is-urgent { color: var(--fault-t); background: var(--fault-tint); border-color: var(--fault); }
.wzb-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.wzb-sort-label { margin-right: 2px; }
.wzb-sort-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.wzb-sort-btn:hover { color: var(--ink); background: var(--hover); }
.wzb-sort-btn.is-aktiv { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.wzb-sort-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* #1870: "Am Abend" under "Wenn Zeit bleibt"; two small actions per row (In die 3 · Abend / Zurück) */
.wzb-actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.wzb.abend { border-top: 1px solid var(--line-soft); }
.wzb-leer.abend-leer { padding: 6px 0 2px; border-top: 0; }
.wzb-row.is-done .ticket-btn, .rest-row.is-done .rest-titel .ticket-btn { color: var(--ink-2); text-decoration: line-through; }
.rest-titel { display: flex; align-items: center; gap: 4px; }
.erledigt-heute { border-top: 1px solid var(--line-soft); padding: 6px 18px 8px; }
.erledigt-list { display: grid; gap: 4px; margin: 4px 0 2px; }
.erledigt-row { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.erledigt-row .tid { color: var(--ink-2); font-size: 13px; }
.erledigt-row .ticket-btn { color: var(--ink-2); text-decoration: line-through; }

@media (max-width: 760px) {
  .fokus-slot { grid-template-columns: 44px 1.2em minmax(0, 1fr) auto; padding: 10px 12px 10px 4px; }
  .fokus-actions { grid-column: auto; }
  .fokus-menu { grid-column: 1 / -1; }
  .wzb-row { grid-template-columns: 34px 3em minmax(0, 1fr) auto; }
  .wzb-row > .btn, .wzb-row > .wzb-actions { grid-column: 3; justify-self: start; justify-content: flex-start; }
  .wzb-row .wzb-prio { grid-column: 4; grid-row: 1; }
}

/* ---- support agent on ERP mails: counters, last activity, ERP "Jetzt" */
.erp-zaehler { list-style: none; padding: 0; }
.erp-zaehler .is-wartet a {
  display: inline-block; color: var(--wait-t); background: var(--wait-tint); border: 1px solid var(--wait-line);
  border-radius: 999px; padding: 0 8px; font-weight: 600; text-decoration: none;
}
.erp-zaehler .is-wartet a b { color: var(--wait-t); }
.erp-zaehler .is-wartet a:hover { border-color: var(--wait-t); }
.lane-zuletzt { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.erp-jetzt-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.erp-jetzt-link { padding: 0; font-size: 13px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.drawer-head .erp-zaehler { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .lamp.s-working::after { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--run) 22%, transparent), 0 0 12px color-mix(in srgb, var(--run) 70%, transparent); }
  .drawer { animation: none; }
  .lamp-xs.s-working::after { box-shadow: 0 0 0 2px color-mix(in srgb, var(--run) 22%, transparent); }
}

/* ---- images on tasks (v5.8): composer, task panel, large view */
.c-bilder { gap: 6px; }
.c-bilder-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.c-bilder-hilfe { font-size: 12.5px; color: var(--ink-2); }
.composer.is-drop { outline: 2px dashed var(--ink); outline-offset: -8px; background: var(--run-tint); }
.bilder-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin: 2px 0 4px; }
.bild-kachel { display: grid; gap: 3px; align-content: start; min-width: 0; }
.bild-rahmen {
  display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; padding: 0; margin: 0;
  border: 1px solid var(--line); border-radius: 8px; background: var(--hover); overflow: hidden;
}
button.bild-rahmen { cursor: zoom-in; }
button.bild-rahmen:hover { border-color: var(--ink-2); }
.bild-rahmen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bild-ersatz { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); }
.bild-name { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bild-fehler { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--fault-t); }
.bild-kachel.is-fehler .bild-rahmen { border-color: #EBB4B4; background: var(--fault-tint); }
.bild-weg { justify-self: start; min-height: 26px; padding: 2px 8px; font-size: 12.5px; }
.c-nachher-text { font-size: 14.5px; line-height: 1.4; }
.task-bilder { display: grid; gap: 8px; }
.task-bilder h3 { margin-bottom: 0; }
.task-bilder.is-drop { outline: 2px dashed var(--ink); outline-offset: 2px; border-radius: 8px; background: var(--run-tint); }
.bilder-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.bilder-offen { display: grid; gap: 8px; }

/* ---- replies and comments: growing text field + attached files (22.09.2026) */
.textarea.is-wachsend { min-height: 110px; max-height: 60vh; overflow-y: auto; line-height: 1.45; }
.ablage { display: grid; gap: 6px; }
.ablage-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ablage-hilfe { font-size: 12.5px; color: var(--ink-2); }
.ablage-liste { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.ablage-datei {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0;
  padding: 2px 4px 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--hover); font-size: 13px;
}
.ablage-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 32ch; }
.ablage-groesse { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.ablage-weg { min-height: 24px; padding: 0 7px; font-size: 12px; }
.decision.is-drop, .kommentar-sec.is-drop { outline: 2px dashed var(--ink); outline-offset: 2px; border-radius: 8px; background: var(--run-tint); }
.mehr-dauer { gap: 4px; }
.mehr-dauer label { font-size: 13px; color: var(--ink-2); }
.bild-gross {
  border: 0; border-radius: 12px; padding: 0; color: var(--ink); background: var(--surface);
  width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 50px rgba(21, 33, 44, .35);
}
.bild-gross::backdrop { background: rgba(21, 33, 44, .72); }
.gross-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.gross-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.gross-flaeche { display: grid; place-items: center; min-height: 220px; padding: 12px; background: #F1F4F6; }
.gross-bild { display: block; max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; }
.gross-status { font-size: 14px; color: var(--ink-2); }
@media (max-width: 760px) {
  .bilder-liste { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .bild-gross { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
}

/* ---------- provider of an own agent: always visible, always switchable ---------- */
.prov { margin-top: 3px; display: grid; gap: 6px; justify-items: start; }
.prov-btn { font-size: 13px; padding: 4px 9px; min-height: 26px; font-weight: 600; }
.prov-btn[aria-expanded="true"] { border-color: var(--ink-2); background: var(--hover); }
.prov .prov-liste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0; }
.prov-liste .btn { font-weight: 500; }
.prov-liste .btn[aria-current="true"] { font-weight: 650; }
.btn.prov-aus { color: var(--ink-2); }
.prov-status { font-size: 13px; color: var(--ink-2); line-height: 1.35; max-width: 34ch; }
.prov-status:empty { display: none; }
.prov-fehler {
  font-size: 13.5px; font-weight: 600; color: var(--fault-t);
  padding-left: 10px; border-left: 3px solid var(--fault); max-width: 34ch;
}
.drawer-sec .prov { margin-top: 12px; }

/* ---------- remote control of an own agent (v5.9) ---------- */
.fern { margin-top: 10px; display: grid; gap: 6px; }
.fern .actions { gap: 6px; }
.fern a.btn { text-decoration: none; }
.fern-status { font-size: 13px; color: var(--ink-2); line-height: 1.35; max-width: 34ch; }
.fern-status:empty { display: none; }
.fern-fehler {
  font-size: 13.5px; font-weight: 600; color: var(--fault-t);
  padding-left: 10px; border-left: 3px solid var(--fault); max-width: 34ch;
}
.drawer-sec .fern { margin-top: 12px; }

/* model per ticket (label Opus/Sonnet/Haiku/Fable) */
.modell-badge {
  display: inline-block; align-self: center; justify-self: start; font-size: 10.5px; line-height: 1.5; font-weight: 700; letter-spacing: .03em;
  color: var(--ink-2); background: var(--hover); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; white-space: nowrap;
}
.next-list li .modell-badge { grid-column: 2; }
.task-modell .seg { width: 100%; grid-auto-columns: minmax(0, 1fr); }
.task-modell .seg span { white-space: nowrap; padding: 7px 2px; font-size: 13px; }
.task-modell .modell-hilfe { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }
.task-modell .modell-warn { justify-self: start; margin: 4px 0 0; color: var(--wait-t); background: var(--wait-tint); border: 1px solid var(--wait-line); border-radius: 6px; padding: 2px 8px; font-size: 12.5px; font-weight: 600; }
.task-modell.is-busy .seg { opacity: .6; }
