/* Compact desktop workspace. Scope all overrides to the application shell. */
.imap-app .app-sidebar { position: absolute; inset: 0 auto 0 0; width: 64px; padding: 12px 6px; z-index: 30; overflow: hidden auto; }
.imap-app .app-sidebar.expanded { width: 280px; }
.imap-app .navigation-toggle { width: 44px; min-height: 36px; margin: 0 4px 16px; border: 1px solid var(--dark-green-300); background: transparent; color: white; font-size: 20px; cursor: pointer; }
.imap-app .sidebar-brand, .imap-app .sidebar-label, .imap-app .sidebar-footer { display: none; }
.imap-app .app-sidebar.expanded .sidebar-brand { display: block; padding: 0 12px 24px; }
.imap-app .tabs { flex-direction: column; overflow: visible; }
.imap-app .tab-btn { flex: none; width: 100%; min-height: 48px; padding: 10px 8px 10px 42px; overflow: hidden; font-size: 0; }
.imap-app .tab-btn::before { left: 17px; top: 15px; }
.imap-app .app-sidebar.expanded .tab-btn { font-size: 13px; }
/* Sidebar entry = .tab-name + .tab-count (imap-design.js). In the 64 px bar nothing but the number shows; in the
   .expanded overlay (below 1280 px) and from 1280 px the name and the count show. */
.imap-app .tab-btn .tab-count { display: none; }
.imap-app .tab-btn .tab-name { display: block; }
.imap-app .app-sidebar.expanded .tab-btn.has-count { padding-right: 36px; }
.imap-app .app-sidebar.expanded .tab-btn .tab-count { display: block; position: absolute; top: 12px; right: 10px; min-width: 20px; text-align: right; font-size: 12px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--mint); }
.imap-app .workspace { margin-left: 64px; padding: 0 16px 12px; }
/* From 1280 px the sidebar is permanently wide and shows the table names (numbers stay as prefix, long names wrap).
   The hamburger and the .expanded overlay are not needed there. */
@media (min-width: 1280px) {
    .imap-app .app-sidebar, .imap-app .app-sidebar.expanded { width: 220px; padding: 20px 8px 16px; }
    .imap-app .navigation-toggle { display: none; }
    .imap-app .sidebar-brand { display: block; padding: 0 12px 20px; }
    .imap-app .tab-btn { min-height: 48px; padding: 10px 8px 10px 42px; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
    .imap-app .tab-btn::before { left: 17px; top: 15px; }
    .imap-app .tab-btn.has-count { padding-right: 36px; }
    .imap-app .tab-btn .tab-count { display: block; position: absolute; top: 11px; right: 10px; min-width: 20px; text-align: right; font-size: 12px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--mint); }
    .imap-app .workspace { margin-left: 220px; }
}
.imap-app .header { min-height: 48px; padding: 6px 0; margin-bottom: 8px; gap: 8px; }
.imap-app .header .btn { min-height: 30px; padding: 5px 8px; }
.list-workspace .title-row { min-height: 44px; padding: 6px 0; margin-bottom: 8px; background: var(--surface); color: var(--link); gap: 16px; }
.list-workspace .title-row h1 { font-size: 22px; line-height: 1.25; margin: 0; }
.list-workspace .title-row .eyebrow, .list-workspace #page-description { display: none; }
.compact-count { margin-left: auto; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.imap-app .filter-row { position: relative; align-items: end; padding: 6px 10px; gap: 6px 12px; margin-bottom: 8px; flex-wrap: wrap; }
.imap-app .filter-group { flex: 0 1 210px; min-width: 0; }
.imap-app .filter-input { min-height: 30px; height: 30px; width: 100%; padding: 4px 8px; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; flex-basis: 100%; }
.filter-chips:empty { display: none; }
.imap-app .market-team-filter { width: 100%; min-height: 30px; height: 30px; padding: 4px 8px; border: 1px solid var(--dark-green-300); background: var(--surface); color: var(--link); font-size: 12px; }
.imap-app .table-download { min-height: 30px; align-self: end; margin-left: auto; }
.period-filter, .personal-filter, .multi-filter { position: relative; }
.period-trigger, .personal-trigger, .multi-trigger { min-height: 30px; width: 100%; justify-content: space-between; }
.period-panel { position: fixed; top: 15vh; left: 50%; transform: translateX(-50%); max-height: 75vh; overflow: auto; z-index: 45; width: 510px; max-width: calc(100vw - 32px); padding: 16px; background: var(--surface); border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 8px 30px #0002; color: var(--link); }
.period-panel[hidden] { display: none; }
/* Personal-Fenster: direkt unter dem Knopf; die Leiste umbricht, daher kein Scroll-Clipping. Unter 900 px wie das Zeitraum-Fenster mittig. */
.imap-app .filter-row { overflow: visible; }
.personal-panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 45; width: 300px; max-width: calc(100vw - 32px); max-height: 75vh; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 8px 30px #0002; color: var(--link); }
.personal-panel :focus-visible { outline: 2px solid var(--dark-green); outline-offset: 2px; }
.personal-panel .personal-done { background: var(--dark-green); color: white; }
.personal-panel[hidden] { display: none; }
.personal-field { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 899px) { .personal-panel { position: fixed; top: 15vh; left: 50%; transform: translateX(-50%); } }
/* P1-T105: Mehrfachauswahl-Fenster der Archiv-Filter (Archiviert aus, Grund); Rundung (10 px) steht im Ausnahme-Block von imap-design.css */
.multi-trigger { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; justify-content: flex-start; text-align: left; }
.multi-panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 45; width: 300px; max-width: calc(100vw - 32px); padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--linie); box-shadow: 0 8px 30px #0002; color: var(--link); }
.multi-panel[hidden] { display: none; }
.multi-panel :focus-visible { outline: 2px solid var(--dark-green); outline-offset: 2px; }
.multi-panel .multi-done { background: var(--dark-green); color: white; }
.multi-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.multi-option { display: flex; align-items: flex-start; gap: 6px; padding: 4px 2px; font: 400 12px/1.4 Arial, sans-serif; cursor: pointer; overflow-wrap: anywhere; }
.multi-option input { flex: none; margin: 1px 0 0; accent-color: var(--link); }
.multi-heading { padding: 6px 2px 2px; font: 600 11px/1.4 Arial, sans-serif; color: var(--ink-muted); }
@media (max-width: 899px) { .multi-panel { position: fixed; top: 15vh; left: 50%; transform: translateX(-50%); } }
.period-help { margin: 0 0 12px; font-size: 11px; line-height: 1.5; color: var(--ink-muted); }
.period-calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.period-calendar { min-width: 0; }
.period-calendar h3 { font-size: 12px; text-align: center; margin: 0 0 8px; }
.period-month { display: flex; gap: 2px; align-items: center; background: var(--fill-1); padding: 4px 2px; border: 1px solid var(--linie); }
.period-month select { min-width: 0; padding: 2px 0; border: 0; background: transparent; font: inherit; font-size: 11px; flex: 1; }
.period-month select + select { flex: 0 0 54px; }
.period-month button, .period-day { border: 0; background: transparent; color: inherit; cursor: pointer; min-height: 28px; font: inherit; }
.period-month button { font-size: 20px; padding: 0 5px; }
.period-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--linie); border-top: 0; padding: 4px; gap: 2px; }
.period-weekday { text-align: center; font-size: 10px; padding: 4px 0; }
.period-day { font-size: 11px; padding: 0; border-radius: 3px; }
.period-day.in-range { background: var(--fill-1); }
.period-day[aria-pressed="true"], .period-panel .period-apply { background: var(--dark-green); color: white; }
.period-day:hover { box-shadow: inset 0 0 0 1px var(--dark-green); }
.period-panel :focus-visible { outline: 2px solid var(--dark-green); outline-offset: 2px; }
.period-selected { text-align: center; font-size: 11px; margin: 6px 0; }
.period-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.period-error { color: #a12626; font-size: 12px; margin: 8px 0; }
.period-error:empty { display: none; }
.period-apply:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 480px) {
    .period-calendars { grid-template-columns: 1fr; }
}
.filter-chip { border: 1px solid var(--linie); background: var(--surface); padding: 2px 6px; font-size: 11px; color: var(--link); cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
.imap-app .table-container .compact-table { table-layout: fixed; width: 100%; min-width: 0; font-size: 13px; }
/* Semantic column widths replace the old nth-child minimum widths. */
.imap-app .compact-table th, .imap-app .compact-table td { min-width: 0 !important; max-width: none !important; width: auto; padding: 4px 8px; text-align: left !important; vertical-align: middle; overflow-wrap: anywhere; }
.imap-app .compact-table th { height: 38px; padding-block: 4px; background: var(--flaeche-kopf); color: var(--ink); border-bottom: 2px solid var(--link); }
.imap-app .compact-table .create-record-button { min-height: 28px; height: 28px; width: 28px; }
.imap-app .compact-table .compact-selection { width: 64px; text-align: center !important; }
.imap-app .compact-table th.compact-documents, .imap-app .compact-table td.compact-documents { text-align: center !important; }
.imap-app .compact-table .compact-reference { width: 105px; }
.imap-app .compact-table .compact-deadlines { width: 130px; }
.imap-app .compact-table .compact-owners { width: 260px; }
.imap-app .compact-table :is(.compact-duration, .compact-deepdive) { width: 150px; white-space: nowrap; font-size: 12px; }
.imap-app .compact-table .compact-actions { width: 104px; }
/* P1-T33: the nameless last column "in nächste Phase senden" (not in final) takes the width the duration had. styles.css sizes the last column of
   four tables by id (180px), hence the :is() with id specificity; the button wraps between words only. */
.imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu) .compact-next { width: 150px; min-width: 0; padding: 4px 8px; }
.imap-app .compact-table .compact-next .confirm-btn { width: 100%; padding: 4px 6px; font-size: 12px; line-height: 15px; white-space: normal; text-align: center; overflow-wrap: normal; word-break: normal; }
/* Arrow switch in a sortable column head. */
.imap-app .compact-table th.is-sortable { white-space: nowrap; }
.imap-app .compact-table .sort-label { vertical-align: middle; }
.imap-app .compact-table .sort-toggle { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; width: 24px; height: 24px; min-height: 24px; margin-left: 4px; padding: 0; border: 1px solid var(--dark-green-300); background: var(--surface); color: var(--link); font: 600 14px/1 Arial, sans-serif; cursor: pointer; }
.imap-app .compact-table .sort-toggle:hover { background: var(--fill-2); }
.imap-app .compact-table th[aria-sort="ascending"] .sort-toggle, .imap-app .compact-table th[aria-sort="descending"] .sort-toggle { background: var(--dark-green); border-color: var(--dark-green); color: white; }
/* P1-T74: the DeepDive button stays on one line and inside the cell, also in the 84 px band. */
.imap-app .compact-table .compact-deepdive .deepdive-btn { display: block; max-width: 100%; padding: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; font-size: 12px; }
/* The client wraps and the row grows downwards; the description shows up to four lines, the full text is in the drawer. */
.compact-table .compact-client, .compact-table .compact-place { display: block; }
.compact-table .compact-place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); font-size: 11px; line-height: 14px; }
.compact-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; line-height: 17px; }
/* Procedure stage, documents, Market Team and (not in final) the duration: hidden by default, shown only where the fixed columns leave room (see the media queries below). */
.imap-app .compact-table th.compact-procedure, .imap-app .compact-table td.compact-procedure,
.imap-app .compact-table th.compact-documents, .imap-app .compact-table td.compact-documents,
.imap-app .compact-table th.compact-market, .imap-app .compact-table td.compact-market { display: none; }
/* P1-T74/T108: the DeepDive column replaces the duration in these four tables (final keeps its duration, always visible; the archive tables have duration cells of their own). It shows from 1460 px, hidden below. */
@media (max-width: 1459.98px) {
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu) :is(th, td).compact-deepdive { display: none; }
}
.compact-table .compact-procedure .record-field { line-height: 17px; }
/* Documents (from 1760 px): one link per line, centred in the cell; long link texts wrap inside the 180 px. */
.compact-table .compact-doc-links { display: flex; flex-direction: column; align-items: center; gap: 0; font-size: 12px; line-height: 24px; }
.compact-table .compact-doc-links a { display: block; max-width: 100%; min-height: 0; height: auto; padding: 0; font: inherit; color: var(--link); text-decoration: none; background: transparent; border: 0; cursor: pointer; text-align: center; overflow-wrap: anywhere; }
.compact-table .compact-doc-links a:hover { color: var(--ink); }
.compact-label { display: block; color: var(--ink-muted); font-size: 10px; line-height: 14px; font-weight: 500; }
.compact-table .record-field { min-width: 0; line-height: 18px; }
.imap-app .compact-table .form-input, .imap-app .compact-table .deadline-input { min-height: 26px; height: 26px; max-width: 100%; width: 100%; padding: 2px 4px; font-size: 12px; }
.compact-table .assignee-input-wrap { padding: 2px 4px; min-width: 0; }
.compact-table .assignee-input { font-size: 12px; min-width: 0; width: 100%; }
.compact-table .btn-circle-small, .compact-table .btn-ghost { min-width: 24px; min-height: 24px; width: 24px; height: 24px; flex-shrink: 0; }
.compact-table .compact-owners .record-field > div { gap: 2px !important; }
/* 4 px between field title and field, the same gap as .filter-group (styles.css) between .filter-label and .filter-input. */
.compact-table .compact-owners .compact-label { line-height: 11px; margin-bottom: 4px; }
.imap-app .compact-table :is(.compact-owners, .compact-market) .form-input { min-height: 24px; height: 24px; }
/* final is read-only: values are plain text (createReadOnlyText). */
.readonly-value { display: block; overflow-wrap: anywhere; }
.compact-table .compact-selection .select-toggle { margin: 0 auto 4px; }
/* P1-T34: Archiv und Fertige Ausschreibungen (js/archive-tabs.js), read-only table in the compact look. */
/* P1-T57: Links-Spalte +24 px (168 / 174 / 176), damit "Leistungsbeschreibung" (151 px) in einer Zeile passt; die Spalte nimmt der Grund- bzw. Summary-Spalte weg. */
.imap-app .compact-table .compact-selection .archive-retention-hint { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: 4px auto 0; border: 0; background: var(--dark-green); color: var(--on-dark); font-size: 12px; font-weight: 700; line-height: 1; cursor: help; }
.imap-app .compact-table .compact-selection .archive-retention-hint:hover, .imap-app .compact-table .compact-selection .archive-retention-hint:focus-visible { outline: 2px solid var(--dark-green); outline-offset: 2px; }
/* P1-T66: warning triangle for missing required fields (js/compact-lists.js missingHint). PO exception to "Neon-Gelb only for row-highlight":
   the fill is the Neon-Gelb token, the outline and the mark are ink, so it stays visible on a highlighted (yellow) row. */
.imap-app .compact-table .compact-selection .missing-hint { display: flex; align-items: center; justify-content: center; width: 24px; height: 22px; margin: 4px auto 0; cursor: help; }
.imap-app .compact-table .compact-selection .missing-hint:hover, .imap-app .compact-table .compact-selection .missing-hint:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.missing-hint svg { display: block; flex: none; }
/* P1-T66 (PO exception, as above): a row with missing required fields is tinted lightly yellow (22 % Neon-Gelb on white). Selection (row-highlight, !important)
   and hover (tbody tr:hover td, higher specificity) still win. Below 900 px (cards) the colour sits on the tr, like row-highlight in imap-design.css. */
tr.row-missing td { background: color-mix(in srgb, var(--neon-gelb) 22%, var(--surface)); }
@media (max-width: 899px) {
    .imap-app tr.row-missing:not(.row-highlight) { background: color-mix(in srgb, var(--neon-gelb) 22%, var(--surface)); }
}
.missing-hint-shape { fill: var(--neon-gelb); stroke: var(--on-signal); stroke-width: 1.6; stroke-linejoin: round; }
.missing-hint-mark { fill: none; stroke: var(--on-signal); stroke-width: 2.2; stroke-linecap: round; }
/* P1-T66: editable fields (Postgres only): the table shows text, compact-lists.js addEditControls swaps in the input while the details window is open. */
#record-drawer .edit-input { display: block; width: 100%; box-sizing: border-box; }
#record-drawer textarea.edit-input { min-height: 120px; resize: vertical; }
#record-drawer .record-field > a + .edit-input { margin-top: 6px; }
/* P1-T94: Einstellungen > Organisation (organisation.js). Nur Tokens, Darkmode ueber die Token-Umstellung. */
body.settings-active .compact-count, body.analyse-active .compact-count { display: none !important; }
.imap-app .settings-panel { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; }
.imap-app .settings-subtabs, .imap-app .settings-search { flex-shrink: 0; }
.imap-app .settings-body { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; }
.imap-app .settings-body > .settings-note { flex-shrink: 0; }
/* Unterreiter (Einstellungen und Analyse) nach dem Muster der Reiter in Cockpit 2.0: der aktive Reiter hat eine Mint-Fläche und eine durchgehende
   Linie darunter, keinen Radius und keine Pille; Hover ohne Farbwechsel der Schrift. Nur Tokens. */
.imap-app .settings-subtabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--linie); }
.imap-app .settings-subtab { position: relative; padding: 10px 18px 11px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.imap-app .settings-subtab:hover { background: var(--fill-1); }
.imap-app .settings-subtab.active { background: var(--fill-2); font-weight: 700; }
.imap-app .settings-subtab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--mint); }
.imap-app .settings-search { max-width: 360px; }
.imap-app .settings-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--rahmen-kraeftig); background: var(--surface); }
.imap-app .settings-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 13px; }
.imap-app .settings-table td:first-child { min-width: 220px; }
.imap-app .settings-table th { padding: 10px 8px; background: var(--flaeche-kopf); color: var(--ink); border-bottom: 2px solid var(--link); text-align: center; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.imap-app .settings-table th:first-child { text-align: left; }
.imap-app .settings-table td { padding: 8px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.imap-app .settings-table tr:hover td { background: var(--flaeche-hover); }
.imap-app .settings-table td.settings-person { text-align: left; }
.imap-app .settings-person strong, .imap-app .settings-person span { display: block; overflow-wrap: anywhere; }
.imap-app .settings-person span, .imap-app .settings-status { font-size: 12px; color: var(--ink); }
.imap-app .settings-right { text-align: center; }
.imap-app .settings-right input { width: 18px; height: 18px; accent-color: var(--dark-green); }
.imap-app .settings-right input:disabled { cursor: not-allowed; opacity: .6; }
.imap-app .settings-inactive td { color: var(--ink-muted); }
/* P1·T98: Inhalt statt Zelle abdunkeln (Hover-Flaeche und Kopf bleiben); Haekchen nicht doppelt (.55 x .6). */
.imap-app .settings-inactive td > * { opacity: .55; }
.imap-app .settings-inactive .settings-right input:disabled { opacity: .55; }
.imap-app .settings-inactive td.settings-status { color: color-mix(in srgb, var(--ink-muted) 55%, transparent); }
.imap-app .settings-note { margin: 0; font-size: 12px; }
@media (max-width: 899px) {
    .imap-app .settings-table { min-width: 0; }
    .imap-app .settings-table thead { display: none; }
    .imap-app .settings-table, .imap-app .settings-table tbody, .imap-app .settings-table tr, .imap-app .settings-table td { display: block; }
    .imap-app .settings-table tr { padding: 8px; border-bottom: 1px solid var(--rahmen-kraeftig); }
    .imap-app .settings-table td { border: 0; padding: 4px 0; text-align: left; }
    .imap-app .settings-right, .imap-app .settings-status { display: flex; align-items: center; gap: 8px; }
    .imap-app .settings-right::before, .imap-app .settings-status::before { content: attr(data-label); min-width: 140px; font-size: 12px; font-weight: 600; }
}
/* P2-T1: Analyse > Datengrundlage (analyse.js). Nur Tokens, Darkmode ueber die Token-Umstellung. Status steht als Text mit Symbol, die Flaeche ist nur Zusatz. */
.imap-app .analyse-body { display: flex; flex-direction: column; gap: 20px; flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding-bottom: 16px; }
.imap-app .analyse-section { display: flex; flex-direction: column; gap: 10px; }
.imap-app .analyse-heading { margin: 0; font-size: 18px; color: var(--ink); }
.imap-app .analyse-subheading { margin: 0 0 6px; font-size: 14px; color: var(--ink); }
.imap-app .analyse-summary { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.imap-app .analyse-line { margin: 0; font-size: 13px; }
.imap-app .analyse-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 700px) and (max-width: 1099px) { .imap-app .analyse-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .imap-app .analyse-grid { grid-template-columns: 1.7fr 1.2fr 1fr; } }
.imap-app .analyse-card { border: 1px solid var(--rahmen-kraeftig); background: var(--surface); padding: 12px; min-width: 0; }
.imap-app .analyse-section { min-width: 0; }
.imap-app .analyse-table-wrap { overflow: auto; overscroll-behavior: contain; border: 1px solid var(--rahmen-kraeftig); background: var(--surface); }
.imap-app .analyse-card .analyse-table-wrap { border: 0; }
.imap-app .analyse-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.imap-app .analyse-table th { padding: 8px; background: var(--flaeche-kopf); color: var(--ink); border-bottom: 2px solid var(--link); text-align: left; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.imap-app .analyse-table td { padding: 8px; border-bottom: 1px solid var(--linie); vertical-align: top; overflow-wrap: break-word; text-align: left; }
.imap-app .analyse-points-table td { overflow-wrap: anywhere; }
.imap-app .analyse-status-table td:last-child, .imap-app .analyse-topf-table td:last-child, .imap-app .analyse-month-table td:last-child,
.imap-app .analyse-status-table th:last-child, .imap-app .analyse-topf-table th:last-child, .imap-app .analyse-month-table th:last-child { text-align: right; white-space: nowrap; }
.imap-app .analyse-table tr:hover td { background: var(--flaeche-hover); }
.imap-app .analyse-points-table { min-width: 980px; }
.imap-app .analyse-point-name strong { font-weight: 600; }
.imap-app .analyse-ki-packages-table .analyse-point-name { display: flex; flex-direction: column; gap: 2px; }
.imap-app .analyse-check-cell { display: flex; flex-direction: column; gap: 4px; }
.imap-app .analyse-hint { font-size: 12px; color: var(--ink-muted); }
.imap-app .analyse-chip { display: inline-block; padding: 2px 8px; border: 1px solid var(--rahmen-kraeftig); font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.imap-app .analyse-status-verknuepft { background: var(--fill-1); }
.imap-app .analyse-status-abgeleitet { background: var(--fill-2); }
.imap-app .analyse-status-offen { background: var(--surface); border-style: dashed; }
.imap-app .analyse-status-luecke { background: var(--surface); border-width: 2px; }
.imap-app .analyse-status-entfaellt { background: var(--surface); color: var(--ink-muted); border-color: var(--linie); }
.imap-app .analyse-check { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.imap-app .analyse-check-fehler, .imap-app .analyse-warning { font-weight: 700; }
/* KI-Anbindung (Unterreiter): Statustabelle, Testknopf, Ergebniszeile. */
.imap-app .analyse-ki-table { max-width: 640px; }
.imap-app .analyse-ki-limits-table, .imap-app .analyse-ki-stand-table { max-width: 640px; }
.imap-app .analyse-button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.imap-app .analyse-ki-packages-table .analyse-test-btn { white-space: normal; text-align: left; }
.imap-app .analyse-prompt-details { border: 1px solid var(--rahmen-kraeftig); background: var(--surface); padding: 8px 12px; }
.imap-app .analyse-prompt-details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.imap-app .analyse-prompt { margin: 8px 0 0; padding: 10px; background: var(--flaeche-feldgruppe); border: 1px solid var(--linie); font: 12px/1.5 Arial, sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; color: var(--ink); }
.imap-app .analyse-test-btn { align-self: flex-start; padding: 8px 16px; border: 1px solid var(--rahmen-kraeftig); background: var(--fill-1); color: var(--on-signal); font: inherit; font-weight: 600; cursor: pointer; }
.imap-app .analyse-test-btn:hover:not(:disabled) { background: var(--fill-2); }
.imap-app .analyse-test-btn:disabled { cursor: progress; opacity: 0.7; }
.imap-app .analyse-test-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.imap-app .analyse-test-result { margin: 0; font-size: 14px; font-weight: 600; min-height: 1.4em; overflow-wrap: anywhere; }
@media (max-width: 899px) {
    .imap-app .analyse-points-table, .imap-app .analyse-config-table, .imap-app .analyse-ki-ready-table { min-width: 0; }
    .imap-app .analyse-points-table thead, .imap-app .analyse-config-table thead, .imap-app .analyse-ki-ready-table thead { display: none; }
    .imap-app .analyse-points-table tbody, .imap-app .analyse-config-table tbody, .imap-app .analyse-ki-ready-table tbody,
    .imap-app .analyse-points-table tr, .imap-app .analyse-config-table tr, .imap-app .analyse-ki-ready-table tr,
    .imap-app .analyse-points-table td, .imap-app .analyse-config-table td, .imap-app .analyse-ki-ready-table td,
    .imap-app .analyse-points-table, .imap-app .analyse-config-table, .imap-app .analyse-ki-ready-table { display: block; }
    .imap-app .analyse-points-table tr, .imap-app .analyse-config-table tr, .imap-app .analyse-ki-ready-table tr { padding: 8px; border-bottom: 1px solid var(--rahmen-kraeftig); }
    .imap-app .analyse-points-table td, .imap-app .analyse-config-table td, .imap-app .analyse-ki-ready-table td { border: 0; padding: 3px 0; }
    .imap-app .analyse-points-table td::before, .imap-app .analyse-config-table td::before, .imap-app .analyse-ki-ready-table td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; color: var(--ink-muted); }
}
/* P1-T37: from 900 px the columns next to the summary are sized to their text (Arial 13 px, padding 8+8 px): link "Vergabeunterlagen" 128, date 65, duration "mind. 12 Tage 23 Std." 124, head
   "Bearbeitungsdauer" 119, "Finale Entscheidung Head of BU OE/PI" 242. Links, date, duration (from 1024 px) and "Archiviert aus" (from 1600 px) stay on one line. The summary is fixed; exactly one column takes the rest:
   "Grund" in Archiv (class archive-with-reason), the summary in Fertige Ausschreibungen. Table width = viewport - 97 (900-1279 px) / - 253 (from 1280 px). Widths, left to right (selection/reference/from/at/duration/documents + summary):
   900-1023: 48+80+72+82+76+144 + 200 = 702, Grund 803-702 = 101 at 900 px. 1024-1279: 52+80+100+82+144+150 + 200 = 808, Grund 927-808 = 119 at 1024 px.
   1280-1439: 52+95+150+92+144+152 + 210 = 895, Grund 1027-895 = 132 at 1280 px. 1440-1599: 52+95+170+92+144+152 + 240 = 945, Grund 1187-945 = 242 at 1440 px.
   from 1600: 52+95+264+92+144+152 + 240 = 1039, Grund 1347-1039 = 308 at 1600 px; from 1760 the summary is 300, Grund 1667-1099 = 568 at 1920 px.
   Under 900 px the card layout and the base widths below stay as they were. */
.imap-app .compact-table.archive-table .compact-summary { width: auto; }
.imap-app .archive-more { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.imap-app .archive-more[hidden] { display: none; }
.imap-app .compact-table.archive-table .archive-from { width: 150px; }
.imap-app .compact-table.archive-table .archive-at { width: 95px; }
.imap-app .compact-table.archive-table .archive-reason { width: 150px; }
.imap-app .compact-table.archive-table .archive-links { width: 110px; }
.imap-app .compact-table.archive-table .archive-links a { display: block; color: var(--link); }
@media (min-width: 900px) {
    .imap-app .compact-table.archive-table td.archive-at, .imap-app .compact-table.archive-table td.archive-links { white-space: nowrap; }
    .imap-app .compact-table.archive-table .archive-links a { white-space: nowrap; }
    .imap-app .compact-table.archive-table.archive-with-reason .compact-summary { width: 200px; }
    .imap-app .compact-table.archive-table .archive-reason { width: auto; }
}
@media (min-width: 900px) and (max-width: 1023.98px) {
    .imap-app .compact-table.archive-table .compact-reference { width: 80px; }
    .imap-app .compact-table.archive-table .archive-from { width: 72px; }
    .imap-app .compact-table.archive-table .archive-at { width: 82px; }
    .imap-app .compact-table.archive-table .compact-duration { width: 76px; }
    .imap-app .compact-table.archive-table .archive-links { width: 168px; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .imap-app .compact-table.archive-table .compact-reference { width: 80px; }
    .imap-app .compact-table.archive-table .archive-from { width: 100px; }
    .imap-app .compact-table.archive-table .archive-at { width: 82px; }
    .imap-app .compact-table.archive-table .archive-links { width: 174px; }
}
@media (min-width: 1024px) {
    .imap-app .compact-table.archive-table .compact-duration { width: 144px; }
    .imap-app .compact-table.archive-table td.compact-duration { white-space: nowrap; }
    .imap-app .compact-table.archive-table th { overflow-wrap: normal; word-break: normal; }
}
@media (min-width: 1280px) {
    .imap-app .compact-table.archive-table .compact-selection { width: 52px; }
    .imap-app .compact-table.archive-table .compact-reference { width: 95px; }
    .imap-app .compact-table.archive-table .archive-at { width: 92px; }
    .imap-app .compact-table.archive-table .archive-links { width: 176px; }
    .imap-app .compact-table.archive-table .archive-from { width: 150px; }
    .imap-app .compact-table.archive-table.archive-with-reason .compact-summary { width: 210px; }
}
@media (min-width: 1440px) {
    .imap-app .compact-table.archive-table .archive-from { width: 170px; }
    .imap-app .compact-table.archive-table.archive-with-reason .compact-summary { width: 240px; }
}
@media (min-width: 1600px) {
    .imap-app .compact-table.archive-table .archive-from { width: 264px; }
    .imap-app .compact-table.archive-table td.archive-from { white-space: nowrap; }
}
/* range syntax: tests locate the process tables' 1760 px block by its text */
@media (width >= 1760px) {
    .imap-app .compact-table.archive-table.archive-with-reason .compact-summary { width: 300px; }
}
.imap-app .compact-table .compact-selection .trash-btn { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; min-width: 24px; min-height: 24px; margin: 0 auto; padding: 0; border: 1px solid var(--dark-green-300); background: transparent; color: var(--link); font-size: 0; line-height: 0; cursor: pointer; }
.imap-app .compact-table .compact-selection .trash-btn:hover, .imap-app .compact-table .compact-selection .trash-btn:focus-visible { color: #a12626; border-color: #a12626; background: rgb(161 38 38 / 8%); }
.compact-table .compact-selection .trash-btn svg { display: block; flex: none; }
.compact-open { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 3px 8px; background: var(--surface); color: var(--link); border: 1px solid var(--dark-green-300); font: 500 12px/1.4 Arial, sans-serif; cursor: pointer; }
.compact-open:hover { background: var(--fill-1); }
.compact-actions .compact-open { width: 100%; margin-block: 2px; }
.record-backdrop { position: fixed; inset: 0; background: rgb(18 67 77 / 18%); z-index: 1000; }
.imap-app #overlay { z-index: 2500; }
.record-drawer { position: fixed; inset: 0 0 0 auto; width: min(600px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--linie); z-index: 1001; font-size: 13px; }
/* P1-T87: Vorabsprache-Dialog (eigene Ebene ueber dem Details-Fenster 1001, unter der Namensliste 2100 und dem Lade-Overlay 2500). */
.vorabsprache-link { background: none; border: 0; padding: 2px 0; color: var(--link); font: 500 13px/1.4 Arial, sans-serif; text-decoration: underline; cursor: pointer; }
.vorab-backdrop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgb(18 67 77 / 45%); z-index: 2050; }
.vorab-panel { width: min(640px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); color: var(--ink); border: 1px solid var(--rahmen-kraeftig); font: 400 14px/1.45 Arial, sans-serif; }
.vorab-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--flaeche-kopf); border-bottom: 2px solid var(--link); }
.vorab-header h2 { margin: 0; font-size: 16px; color: var(--link); overflow-wrap: anywhere; }
.vorab-body { padding: 12px 16px; overflow-y: auto; }
.vorab-section { margin-top: 16px; padding: 12px; background: var(--flaeche-feldgruppe); border: 1px solid var(--rahmen-kraeftig); }
.vorab-section h3 { margin: 0 0 8px; font-size: 14px; color: var(--link); }
.vorab-hint, .vorab-empty, .vorab-meta { margin: 0 0 8px; font-size: 12px; }
.vorab-list { margin: 0 0 8px; padding: 0; list-style: none; }
.vorab-note, .vorab-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.vorab-note-text { flex: 1 1 100%; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.vorab-tag span { flex: 1 1 auto; }
.vorab-input { display: block; width: 100%; margin-bottom: 8px; font: 400 13px/1.4 Arial, sans-serif; }
.vorab-small { min-height: 28px; padding: 3px 10px; font-size: 12px; }
.vorab-section .people-combobox { max-width: 320px; }
.vorab-status { margin: 0; padding: 0 16px 12px; font-size: 12px; }
.vorab-status:empty { display: none; }
.vorab-status.is-error { color: var(--ink); font-weight: 700; }
.record-drawer-header { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--bar); color: white; }
.record-drawer-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.record-section-nav { display: flex; gap: 6px; padding: 8px 20px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.record-close { border: 1px solid var(--mint); background: transparent; color: white; font-size: 24px; width: 36px; height: 36px; flex-shrink: 0; cursor: pointer; }
.record-drawer-content { overflow: auto; min-height: 0; padding: 0 20px 24px; overscroll-behavior: contain; }
.record-section { padding: 16px 0; border-bottom: 1px solid var(--rahmen-kraeftig); scroll-margin-top: 12px; }
.record-section h3 { margin: 0 0 12px; padding: 6px 10px; font-size: 16px; color: var(--ink); background: var(--flaeche-kopf); }
.record-detail-field { margin: 0 0 12px; overflow-wrap: anywhere; }
.record-detail-field > .compact-label { font-size: 11px; margin-bottom: 4px; }
.record-drawer .record-field { min-width: 0; }
.record-drawer .record-field:has(.procedure-stage) { min-width: 0; }
.record-drawer .option-box { width: 100%; min-width: 0; flex-wrap: wrap; }
.record-drawer .option-field { min-width: 0; max-width: 100%; }
.record-drawer .assignee-input-wrap { min-width: 0; }
.record-drawer input, .record-drawer select { max-width: 100%; }
.record-drawer .assignee-input { width: 100%; min-width: 0; }
.compact-table .compact-owners > .compact-slot > .record-field > .assignee-input { border: 1px solid var(--dark-green-300); background: var(--surface); padding: 2px 4px; height: 24px; }
.compact-table .compact-owners > .compact-slot > .record-field > .people-combobox > .assignee-input { border: 1px solid var(--dark-green-300); background: var(--surface); padding: 2px 18px 2px 4px; height: 24px; }
.record-drawer .drop-zone { width: 100%; }
/* Medium widths (F7): the fixed columns add up to ~813 px and would squeeze the summary column to a few pixels.
   Narrower fixed columns keep it above 240 px. The :is() list carries id specificity because styles.css sizes the
   last column of four tables by id (width 180px). */
@media (min-width: 900px) and (max-width: 1023.98px) {
    .imap-app .workspace { padding-inline: 8px; }
    .imap-app .compact-table .compact-selection { width: 48px; }
    .imap-app .compact-table .compact-reference { width: 80px; }
    .imap-app .compact-table .compact-deadlines { width: 100px; }
    .imap-app .compact-table .compact-owners { width: 160px; }
    .imap-app .compact-table :is(.compact-duration, .compact-deepdive) { width: 84px; white-space: normal; hyphens: auto; }
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu) .compact-next { width: 84px; }
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu, #table-final) .compact-actions { width: 72px; min-width: 0; padding-inline: 6px; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
    .imap-app .compact-table .compact-selection { width: 52px; }
    .imap-app .compact-table .compact-reference { width: 90px; }
    .imap-app .compact-table .compact-deadlines { width: 110px; }
    .imap-app .compact-table .compact-owners { width: 180px; }
    .imap-app .compact-table :is(.compact-duration, .compact-deepdive) { width: 105px; white-space: normal; hyphens: auto; }
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu) .compact-next { width: 105px; }
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu, #table-final) .compact-actions { width: 88px; min-width: 0; }
}
/* From 1280 px the actions column takes its intended 104 px in all five tables (styles.css sizes four of them by id to 180 px). */
@media (min-width: 1280px) {
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu, #table-final) .compact-actions { width: 104px; min-width: 0; }
}
/* Wide screens. The sidebar (220 px from 1280 px) leaves the table 156 px less than before, so the bands were re-cut (P1-T17).
   Table width = viewport - sidebar - 32 (padding) - ~15 (scroll bar, only when the rows need it). Exactly one visible column has no width and takes the rest.
   1280-1399 px: narrow fixed set (723 px), the summary takes the rest (288-408 px).
   1400-1459 px: the summary stays at 420 px and the owners column takes the rest (230-289 px), so the summary never grows past ~420 px.
   1460-1579 px: narrow set + DeepDive column (P1-T108, 110 px); in final the stage column instead (summary 325 px, the stage column takes the rest, >= 140 px, "Teilnahmeantrag" on one line).
   1580-1759 px: normal set (813 px) + DeepDive (150 px); in final the stage column instead (summary 360 px, stage takes the rest).
   In main, screening, deepdive and headobu the stage column is hidden here and the summary takes the rest (~358 px at 1460, ~348 px at 1580, both with a 17 px scroll bar).
   From 1760 px (P1-T19): documents appear, 180 px wide with the links stacked and centred; the stage column (final) is fixed at 140 px and
   the summary takes the rest and has no upper limit. Duration may wrap in the narrow set. The sidebar stays 220 px.
   P1-T108: in main, screening, deepdive and headobu the DeepDive column (150 px) is fixed from 1460 px on; with documents the fixed width from 1760 px
   is 813 + 150 + 180 = 1143 (final: 813 + 140 stage + 180 = 1133). The columns "Market Team" and the stage column (Verfahrensstufe, 140 px) appear one after
   the other, each only where the summary keeps about 360 px with a classic 17 px scroll bar: summary = viewport - 1399 - added - 17 (1399 = 220 sidebar + 32 padding + 1143 + ~4).
   "Market Team" (204 px, not in main) from 1971 px (summary 351 px, accepted slightly below 360); the stage column after it from 2121 px in screening, deepdive
   and headobu (summary 361 px); main has no Market Team, so its stage column starts at 1917 px (summary 361 px). final shows the stage column from 1460 px
   and has no DeepDive column. Below the threshold the stage stays in the drawer only.
   In the table the order is Zuständigkeit, Market Team, DeepDive, Aktionen, (nameless) in nächste Phase senden.
   A further fixed column raises every threshold behind it by its width. */
@media (min-width: 1280px) and (max-width: 1579.98px) {
    .imap-app .compact-table .compact-reference { width: 95px; }
    .imap-app .compact-table .compact-deadlines { width: 120px; }
    .imap-app .compact-table .compact-owners { width: 230px; }
    .imap-app .compact-table :is(.compact-duration, .compact-deepdive) { width: 110px; white-space: normal; hyphens: auto; }
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu) .compact-next { width: 110px; }
}
@media (min-width: 1400px) and (max-width: 1459.98px) {
    .imap-app .compact-table .compact-summary { width: 420px; }
    .imap-app .compact-table .compact-owners { width: auto; }
}
@media (min-width: 1460px) {
    .imap-app #table-final th.compact-procedure, .imap-app #table-final td.compact-procedure { display: table-cell; }
    .imap-app .compact-table .compact-summary { width: 325px; }
}
@media (min-width: 1460px) and (max-width: 1759.98px) {
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu) .compact-summary { width: auto; }
}
@media (min-width: 1580px) and (max-width: 1759.98px) {
    .imap-app .compact-table .compact-summary { width: 360px; }
}
@media (min-width: 1760px) {
    .imap-app .compact-table th.compact-documents, .imap-app .compact-table td.compact-documents { display: table-cell; }
    .imap-app .compact-table .compact-procedure { width: 140px; }
    .imap-app .compact-table .compact-documents { width: 180px; }
    .imap-app .compact-table .compact-summary { width: auto; }
    .imap-app .compact-table .compact-market { width: 204px; }
}
@media (min-width: 1971px) {
    .imap-app .compact-table th.compact-market, .imap-app .compact-table td.compact-market { display: table-cell; }
}
@media (min-width: 1917px) {
    .imap-app #table-main :is(th, td).compact-procedure { display: table-cell; }
}
@media (min-width: 2121px) {
    .imap-app :is(#table-screening, #table-deepdive, #table-headobu) :is(th, td).compact-procedure { display: table-cell; }
}
@media (max-width: 899px) {
    .imap-app .workspace { padding-inline: 8px; }
    .imap-app .filter-group { flex-basis: 180px; }
    .record-drawer { width: 100vw; }
    .imap-app .compact-table .compact-selection, .imap-app .compact-table .compact-reference,
    .imap-app .compact-table .compact-deadlines, .imap-app .compact-table .compact-owners,
    .imap-app .compact-table .compact-duration, .imap-app .compact-table .compact-deepdive, .imap-app .compact-table .compact-actions { width: 100%; }
    /* The nameless cell has no label: no empty label column in the card. */
    .imap-app :is(#table-main, #table-screening, #table-deepdive, #table-headobu) td.compact-next { display: block; padding: 4px 0; }
    .imap-app .table-container tbody td.compact-next::before { display: none; }
    .imap-app .compact-table tbody td { padding: 4px 0; }
    .compact-actions .compact-open { width: auto; margin-right: 6px; }
    /* Card layout: imap-design.css hides every head cell but the first; the sort switch stays next to the "+". */
    .imap-app .table-container thead th.is-sortable { display: flex; align-items: center; gap: 4px; flex: 0 1 auto; width: auto; padding: 4px 8px; border: 0; }
    .list-workspace .title-row { align-items: start; flex-wrap: wrap; }
    .list-workspace .title-row h1 { font-size: 18px; }
}

/* P1·T109: small text button next to a document link in the details window; deletes the Postgres file for good after a confirm. */
.doc-remove-btn { margin-left: 8px; padding: 0; border: 0; background: none; color: var(--dark-green); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.doc-remove-btn:hover { text-decoration: none; }

/* Analyse > Themen: Filterleiste und Kennzahlen-Kacheln (nur Tokens, keine festen Farben). */
/* Analyse-Entwicklung: eigener, unauffälliger Eintrag am Ende der Seitenleiste (kleiner, dünner, abgesetzt). */
.imap-app .tab-btn.tab-btn-dev { font-weight: 400; }
.imap-app .nav-group-label { display: none; }
.imap-app .app-sidebar.expanded .nav-group-label { display: block; }
.imap-app .nav-group { margin-top: 8px; }
@media (min-width: 1280px) { .imap-app .nav-group-label { display: block; } .imap-app .nav-group { margin-top: 12px; } }
.imap-app .app-sidebar.expanded .tab-btn.tab-btn-dev { font-size: 12px; }
@media (min-width: 1280px) { .imap-app .tab-btn.tab-btn-dev { font-size: 12px; } }
/* Analyse: Seitenführung nach Cockpit 2.0 (Inhalte als weiße Karten auf ruhigem Grund, Kennzahlen groß, eine Filterleiste) und Steffi (weiße
   Spaltenköpfe mit 2-px-Linie, Mint-Körper). Die Reiterfläche trägt keinen eigenen Rahmen mehr. Nur Tokens, keine Transparenz; Zahlen stehen immer auch als Text. */
.imap-app #tab-analyse, .imap-app #tab-analyse-dev { padding: 16px; border: 0; background: var(--fill-1); }
.imap-app .analyse-section { width: 100%; max-width: 1280px; gap: 16px; }
.imap-app .analyse-panel { border: 1px solid var(--linie); background: var(--surface); }
.imap-app .analyse-muted { color: var(--ink-muted); }
.imap-app .settings-note.analyse-warning { padding: 9px 14px; background: var(--fill-2); border: 2px solid var(--link); }
.imap-app .settings-note.analyse-empty { margin: 0; padding: 16px 18px; border-top: 1px solid var(--linie); background: var(--fill-1); font-size: 13px; }
/* Karte 1: Zeitraum, Status, Kennzahlen */
.imap-app .analyse-overview .analyse-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin: 0; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--linie); background: transparent; }
.imap-app .analyse-filter-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.imap-app .analyse-filter-field > .analyse-hint { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.imap-app .analyse-filter-check { flex-direction: row; align-items: center; gap: 8px; padding-bottom: 6px; }
.imap-app .analyse-filter .analyse-stand { margin-left: auto; padding-bottom: 6px; font-size: 12px; color: var(--ink-muted); }
.imap-app .analyse-status { display: flex; flex-direction: column; }
.imap-app .analyse-status > p { margin: 0; padding: 8px 16px; border-bottom: 1px solid var(--linie); background: var(--fill-1); font-size: 12px; }
.imap-app .analyse-status > p.analyse-warning { background: var(--fill-2); font-weight: 700; }
/* Karte 2: Themen als Balkenliste */
.imap-app .analyse-result { --themen-cols: minmax(0, 1fr) minmax(240px, 34%) 112px 92px; }
.imap-app .analyse-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; }
.imap-app .analyse-result-title { display: flex; align-items: baseline; gap: 10px; }
.imap-app .analyse-result-title strong { font-size: 16px; }
.imap-app .analyse-sort { display: flex; align-items: center; font-size: 12px; color: var(--ink-muted); }
.imap-app .analyse-sort > span { margin-right: 10px; }
/* Auftraggeber: Suche, Mindestanzahl und Sortierung in einer Zeile; Gruppenzeilen sind nicht aufklappbar */
.imap-app .analyse-sort-wide { flex-wrap: wrap; gap: 8px 16px; }
.imap-app .analyse-sort-wide input[type="search"] { min-width: 200px; padding: 6px 10px; font: inherit; font-size: 13px; }
.imap-app .analyse-sort-wide .analyse-filter-field { flex-direction: row; align-items: center; gap: 6px; }
.imap-app .analyse-theme-head.is-static { cursor: default; padding-left: 16px; }
.imap-app .analyse-theme-head.is-static::before { content: none; }
.imap-app .analyse-theme-head.is-static:hover { background: transparent; }
/* Ablehnungen: Zwischenueberschriften, Hinweis in der Karte und die Tabelle der Gruende */
.imap-app .analyse-subhead { margin: 16px 16px 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.imap-app .analyse-banner-flat { margin: 0 16px 8px; padding: 8px 12px; background: var(--fill-2); color: var(--ink); font-size: 13px; }
.imap-app .analyse-table-wrap { margin: 0 16px 8px; overflow-x: auto; }
.imap-app .analyse-grund-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 13px; }
.imap-app .analyse-grund-table th, .imap-app .analyse-grund-table td { padding: 8px 8px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
.imap-app .analyse-grund-table thead th { border-bottom: 2px solid var(--link); background: var(--surface); color: var(--ink-muted); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.imap-app .analyse-grund-table .num { text-align: right; white-space: nowrap; }
.imap-app .analyse-grund-table .bu { color: var(--ink-muted); }
.imap-app .analyse-grund-table .analyse-total { font-weight: 700; color: var(--ink); }
.imap-app .analyse-grund-table tfoot th, .imap-app .analyse-grund-table tfoot td { border-top: 2px solid var(--link); border-bottom: 0; font-weight: 700; }
.imap-app .analyse-grund-table tbody tr.analyse-grund-row:hover { background: var(--flaeche-hover); }
.imap-app .analyse-grund-table tr.analyse-grund-detail > td { padding: 8px 0 12px; background: var(--fill-1); }
.imap-app .analyse-grund-toggle { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.imap-app .analyse-grund-toggle::before { content: '▸ '; }
.imap-app .analyse-grund-toggle[aria-expanded="true"]::before { content: '▾ '; }
.imap-app .analyse-grund-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.imap-app .analyse-sort-btn { padding: 6px 12px; border: 1px solid var(--btn-border); background: var(--surface); color: var(--link); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.imap-app .analyse-sort-btn + .analyse-sort-btn { margin-left: -1px; }
.imap-app .analyse-sort-btn:hover { background: var(--fill-1); }
.imap-app .analyse-sort-btn[aria-pressed="true"] { position: relative; border-color: var(--link); background: var(--bar); color: var(--on-dark); }
.imap-app .analyse-theme-cols { display: grid; grid-template-columns: var(--themen-cols); gap: 8px 20px; padding: 8px 16px 8px 40px; border-top: 1px solid var(--linie); border-bottom: 2px solid var(--link); background: var(--surface); color: var(--ink-muted); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.imap-app .analyse-theme-cols > :nth-child(4) { text-align: right; }
.imap-app .analyse-themen-list { margin: 0; padding: 0; list-style: none; }
.imap-app .analyse-theme { border-bottom: 1px solid var(--linie); }
.imap-app .analyse-theme-head { position: relative; display: grid; grid-template-columns: var(--themen-cols); align-items: center; gap: 8px 20px; width: 100%; padding: 12px 16px 12px 40px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.imap-app .analyse-theme-head::before { content: '▸'; position: absolute; left: 16px; top: 50%; margin-top: -9px; color: var(--link); font-size: 14px; }
.imap-app .analyse-theme-head[aria-expanded="true"]::before { content: '▾'; }
.imap-app .analyse-theme-head:hover { background: var(--flaeche-hover); }
.imap-app .analyse-theme-head:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.imap-app .analyse-theme-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.imap-app .analyse-theme-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.imap-app .analyse-theme-name strong { font-size: 14px; overflow-wrap: anywhere; }
.imap-app .analyse-theme-desc { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imap-app .analyse-badge { display: inline-block; padding: 1px 7px; border: 1px solid var(--dark-mint); background: var(--fill-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.imap-app .analyse-chart { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.imap-app .analyse-chart-row { display: flex; align-items: center; gap: 10px; }
.imap-app .analyse-chart-track { flex: 1; height: 14px; background: var(--fill-1); }
.imap-app .analyse-chart-row > strong { min-width: 30px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.imap-app .analyse-stack { display: flex; height: 100%; gap: 1px; }
.imap-app .analyse-stack span { display: block; height: 100%; }
.imap-app .analyse-seg-vor { background: var(--linie); }
.imap-app .analyse-seg-spaet { background: var(--ink-muted); }
.imap-app .analyse-seg-ang { background: var(--link); }
.imap-app .analyse-seg-bear { background: var(--mint); }
.imap-app .analyse-seg-dq { background: var(--ink); }
.imap-app .analyse-change { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.imap-app .analyse-num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.imap-app .analyse-num strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.imap-app .analyse-chip-auf { border-color: var(--dark-mint); background: var(--fill-2); }
.imap-app .analyse-chip-ab { border: 2px solid var(--ink); background: var(--surface); }
.imap-app .analyse-chip-neu { border-color: var(--dark-mint); background: var(--mint); color: var(--on-signal); }
.imap-app .analyse-theme-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px 40px; border-top: 1px solid var(--linie); background: var(--fill-1); }
.imap-app .analyse-theme-count { font-size: 13px; }
.imap-app .analyse-tenders { border: 1px solid var(--linie); background: var(--surface); }
.imap-app .analyse-tender { display: grid; grid-template-columns: 84px minmax(160px, 1fr) 160px 104px 104px minmax(150px, 200px); gap: 4px 16px; align-items: start; padding: 10px 12px; border-bottom: 1px solid var(--linie); font-size: 13px; }
.imap-app .analyse-tender:last-child { border-bottom: 0; }
.imap-app .analyse-tender:not(.analyse-tender-head):hover { background: var(--flaeche-hover); }
.imap-app .analyse-tender-head { padding: 8px 12px; border-bottom: 2px solid var(--link); background: var(--surface); color: var(--ink-muted); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.imap-app .analyse-tender-cell, .imap-app .analyse-tender-who, .imap-app .analyse-tender-stand { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.imap-app .analyse-tender-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; }
.imap-app .analyse-tender-stand .analyse-chip, .imap-app .analyse-tender-cell .analyse-chip { align-self: flex-start; white-space: normal; }
.imap-app .analyse-result-foot { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 14px; border-top: 1px solid var(--linie); }
.imap-app .analyse-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-muted); }
.imap-app .analyse-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }
.imap-app .analyse-foot-note { max-width: 110ch; margin: 0; font-size: 12px; color: var(--ink-muted); }
@media (max-width: 899px) {
    .imap-app #tab-analyse, .imap-app #tab-analyse-dev { padding: 10px; }
    .imap-app .analyse-theme-cols { display: none; }
    .imap-app .analyse-theme-head { grid-template-columns: 1fr 1fr; padding-left: 36px; }
    .imap-app .analyse-theme-main, .imap-app .analyse-chart { grid-column: 1 / -1; }
    .imap-app .analyse-num { align-items: flex-start; }
    .imap-app .analyse-theme-desc { white-space: normal; }
    .imap-app .analyse-theme-body { padding-left: 16px; }
    .imap-app .analyse-tender { grid-template-columns: 1fr 1fr; }
    .imap-app .analyse-tender-head { display: none; }
    .imap-app .analyse-tender-who { grid-column: 1 / -1; }
    .imap-app .analyse-tender-cell::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; color: var(--ink-muted); }
}
/* Analyse-Seiten im Rahmen des Tools: Seitenkopf als Banner wie in Steffi und im Dashboard, Kopfleiste nur mit Nutzer, Hell/Dunkel und Abmelden. */
body.analyse-active .header .btn:not(#btn-theme):not(#btn-logout):not(#btn-feedback) { display: none !important; }
body.analyse-active.list-workspace .title-row { min-height: 0; margin-bottom: 16px; padding: 24px 28px; background: var(--bar); color: var(--on-dark); gap: 12px; }
body.analyse-active.list-workspace .title-row h1 { margin: 0 0 8px; font-size: clamp(24px, 2.5vw, 34px); }
body.analyse-active.list-workspace .title-row .eyebrow { display: block; }
body.analyse-active.list-workspace #page-description { display: block; max-width: 72ch; }
:root[data-theme="dark"] body.analyse-active.list-workspace .title-row { background: var(--bar); }
/* Geplante Unterreiter: sichtbar, aber ausgegraut und nicht anklickbar (wie die Platzhalter in der Navigation von Cockpit 2.0) */
.imap-app .settings-subtab.is-soon { color: var(--ink-muted); cursor: default; }
.imap-app .settings-subtab.is-soon:hover { background: transparent; }
.imap-app .settings-subtab.is-soon::after { content: ' · folgt'; font-size: 11px; font-weight: 400; }
/* Der erste Blick: Eingegangen → Themengebiete → Angegangen, drei gleich starke Schritte mit Pfeil */
.imap-app .analyse-flow { display: grid; grid-template-columns: 1fr; }
.imap-app .analyse-step { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 28px; }
.imap-app .analyse-step + .analyse-step { border-top: 1px solid var(--linie); }
.imap-app .analyse-step-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.imap-app .analyse-step-number { font-size: 44px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--ink); }
.imap-app .analyse-step-sub { font-size: 14px; color: var(--ink-muted); overflow-wrap: anywhere; }
@media (min-width: 900px) {
    .imap-app .analyse-flow { grid-template-columns: repeat(3, 1fr); }
    .imap-app .analyse-step + .analyse-step { border-top: 0; border-left: 1px solid var(--linie); }
    .imap-app .analyse-step + .analyse-step::before { content: '→'; position: absolute; left: -13px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border: 1px solid var(--linie); background: var(--surface); color: var(--link); font-size: 16px; line-height: 24px; text-align: center; }
}
/* Schriftgrößen: Zahlen groß, Titel 18, Zeilentitel 15, Fließtext 14, Hinweise 12 */
.imap-app .analyse-result-title strong { font-size: 18px; }
.imap-app .analyse-theme-name strong { font-size: 15px; }
.imap-app .analyse-theme-desc { font-size: 13px; }
.imap-app .analyse-chart-row > strong, .imap-app .analyse-num strong { font-size: 16px; }
.imap-app .analyse-chip { font-size: 12px; }
/* BU und Market Team in der Filterleiste: Mehrfachauswahl wie die Archiv-Filter, Fenster unter dem Knopf */
.imap-app .analyse-multi { position: relative; }
.imap-app .analyse-multi .multi-trigger { min-width: 170px; max-width: 280px; }
.imap-app .analyse-multi .multi-panel { width: 340px; }
.imap-app .analyse-overview, .imap-app .analyse-overview .analyse-filter { overflow: visible; }

/* Feedback geben (P2·T9): Knopf im Kopf, Markierungsmodus, Sprechblase und die Liste im Unterreiter "Feedback". Nur CD-Tokens, keine neuen Hex-Werte. */
.imap-app .fb-toggle { display: inline-flex; align-items: center; gap: 6px; }
.imap-app .fb-toggle[hidden] { display: none; }
.imap-app .fb-toggle[aria-pressed="true"] { border-color: var(--neon-lila); background: var(--neon-lila-100); color: var(--on-signal); font-weight: 700; }
.fb-frame { position: fixed; inset: 0; border: 6px solid var(--neon-lila); pointer-events: none; z-index: 2990; }
.fb-pulse { position: fixed; border: 3px solid var(--neon-lila); pointer-events: none; z-index: 2991; animation: fb-pulse 1s ease-in-out infinite; }
@keyframes fb-pulse { 0%, 100% { border-color: var(--neon-lila); } 50% { border-color: var(--neon-lila-100); } }
@media (prefers-reduced-motion: reduce) { .fb-pulse { animation: none; } }
body.fb-mode { cursor: crosshair; }
.fb-bubble { position: fixed; width: 340px; max-width: calc(100vw - 16px); background: var(--surface); color: var(--ink); border: 2px solid var(--link); z-index: 3000; font: 14px Arial, sans-serif; }
.fb-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bar); color: var(--on-dark); font-weight: 600; cursor: move; user-select: none; }
.fb-close { padding: 0 2px; border: 0; background: transparent; color: var(--on-dark); font-size: 22px; line-height: 1; cursor: pointer; }
.fb-body { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.fb-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.fb-note { width: 100%; min-height: 84px; padding: 8px; font: inherit; resize: vertical; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip { padding: 5px 9px; border: 2px solid var(--link); background: var(--surface); color: var(--link); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fb-chip[aria-pressed="true"] { background: var(--bar); color: var(--on-dark); }
.fb-chip:disabled { cursor: default; }
.fb-hint { margin: 0; font-size: 12px; color: var(--ink-muted); }
.fb-anchor { font-size: 12px; color: var(--ink-muted); }
.fb-anchor summary { cursor: pointer; font-weight: 600; }
.fb-anchor code { font-size: 11px; word-break: break-all; }
.fb-status { min-height: 18px; margin: 0; font-size: 13px; font-weight: 600; }
.fb-actions { display: flex; justify-content: flex-end; gap: 8px; }
.fb-send, .fb-cancel { padding: 8px 14px; border: 2px solid var(--link); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fb-send { background: var(--bar); color: var(--on-dark); }
.fb-cancel { background: var(--surface); color: var(--link); }
.fb-send:disabled { cursor: default; }
.fb-bubble :focus-visible, .imap-app .fb-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.imap-app .feedback-leiste { margin-left: auto; }
.imap-app .feedback-list { margin: 0; padding: 0 16px 8px; list-style: none; }
.imap-app .feedback-item { padding: 12px 0; border-top: 1px solid var(--linie); }
.imap-app .feedback-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.imap-app .feedback-note { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.imap-app .feedback-anker { overflow-wrap: anywhere; }
.imap-app .feedback-anker code { font-size: 11px; }
.imap-app .feedback-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.imap-app .feedback-aktionen select { flex: 0 0 150px; width: 150px; }
.imap-app .feedback-aktionen input[type="text"] { flex: 1 1 220px; min-width: 160px; padding: 6px 10px; font: inherit; font-size: 13px; }
.imap-app .feedback-fehler { margin: 6px 0 0; }
.imap-app .feedback-export { display: block; width: calc(100% - 32px); margin: 0 16px 8px; padding: 8px; font: 12px/1.4 monospace; }
.imap-app .feedback-fuss { padding: 8px 16px 12px; }
