/* =========================================================
   TENDERCATCHER LAYOUT V2
   Wird nach app.css geladen.

   1. Grundgeruest: Kopfleiste mit Suche + Reiter-Navigation
   2. Datensatzseite (rec-*): Kopfbereich, Phasenleiste,
      Reiter, einklappbare Feldgruppen, rechte Spalte
   ========================================================= */


/* ---------------------------------------------------------
   1. GRUNDGERUEST
   --------------------------------------------------------- */

.layout-v2 .app-shell {
    display: block;
    min-height: 100vh;
}

.tc-header {
    position: sticky;
    top: 0;
    z-index: 50;

    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: 0 6px 24px rgba(29, 19, 50, .04);
}

.tc-header-top {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(0, 640px) minmax(180px, 1fr);
    align-items: center;
    gap: 24px;

    max-width: 1600px;
    height: 64px;
    margin: 0 auto;
    padding: 0 32px;
}

.tc-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.tc-brand-logo {
    display: block;
    width: auto;
    height: 34px;
    object-fit: contain;
}

.tc-brand-name {
    font-size: 19px;
    font-weight: 850;
    letter-spacing: -.5px;
}

.tc-brand-name span {
    color: var(--blue);
}

.tc-search {
    display: flex;
    align-items: center;
    gap: 10px;

    height: 40px;
    padding: 0 14px;

    background: #f6f4fb;
    border: 1px solid var(--line);
    border-radius: 11px;

    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.tc-search:focus-within {
    background: #fff;
    border-color: #ba9ff1;
    box-shadow: 0 0 0 4px rgba(94, 31, 216, .08);
}

.tc-search span {
    color: var(--muted-2, #978daa);
}

.tc-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.tc-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.tc-avatar {
    display: grid;
    place-items: center;
    flex: none;

    width: 34px;
    height: 34px;
    border-radius: 50%;

    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark, #4b12b0));
    font-size: 12px;
    font-weight: 800;
}

.tc-user-copy {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.tc-user-copy strong {
    overflow: hidden;
    max-width: 180px;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tc-user-copy small {
    color: var(--muted);
    font-size: 11px;
}

.tc-icon-button {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;

    color: var(--muted);
    background: #fff;
    cursor: pointer;
    font-size: 15px;
}

.tc-icon-button:hover {
    color: var(--blue);
    background: var(--blue-soft);
}


/* Reiter-Navigation */

.tc-tabs {
    display: flex;
    align-items: stretch;
    gap: 4px;

    max-width: 1600px;
    height: 44px;
    margin: 0 auto;
    padding: 0 32px;
}

.tc-tab {
    display: inline-flex;
    align-items: center;

    padding: 0 14px;
    border-bottom: 3px solid transparent;

    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
}

.tc-tab::-webkit-details-marker {
    display: none;
}

.tc-tab:hover {
    color: var(--text);
    background: #f8f6fc;
}

.tc-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.tc-tab-menu {
    position: relative;
    display: flex;
    margin-left: auto;
}

.tc-tab-menu > summary {
    height: 100%;
    box-sizing: border-box;
}

.tc-tab-menu-list {
    position: absolute;
    top: 100%;
    right: 0;

    display: grid;
    min-width: 200px;
    padding: 6px;

    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 24px 70px rgba(29, 19, 50, .085));
}

.tc-tab-menu-list a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}

.tc-tab-menu-list a:hover,
.tc-tab-menu-list a.active {
    color: var(--blue);
    background: var(--blue-soft);
}

.layout-v2 .content {
    max-width: 1600px;
    padding: 28px 32px 70px;
}


@media (max-width: 900px) {

    .tc-header-top {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 12px;
        height: 58px;
        padding: 0 16px;
    }

    .tc-brand-name,
    .tc-user-copy {
        display: none;
    }

    .tc-tabs {
        overflow-x: auto;
        padding: 0 8px;
        scrollbar-width: none;
    }

    .tc-tab-menu {
        position: static;
        margin-left: 0;
    }

    .tc-tab-menu-list {
        right: 16px;
    }

    .layout-v2 .content {
        padding: 18px 16px 50px;
    }
}


/* ---------------------------------------------------------
   2. DATENSATZSEITE
   --------------------------------------------------------- */

.rec-breadcrumb {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.rec-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.rec-breadcrumb a:hover {
    color: var(--blue);
}


/* Kopfbereich */

.rec-header {
    padding: 22px 24px 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.rec-header-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.rec-icon {
    display: grid;
    place-items: center;
    flex: none;

    width: 46px;
    height: 46px;
    border-radius: 12px;

    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan, #9a28c0));
    font-size: 22px;
}

.rec-title {
    flex: 1;
    min-width: 0;
}

.rec-type {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rec-title h1 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.rec-notice {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--orange-soft, #fff7e9);
    color: #7a4a00;
    font-size: 14px;
    line-height: 1.6;
}

.rec-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.rec-actions form {
    margin: 0;
}

.rec-actions .button {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}


/* Kernfelder */

.rec-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 4px 24px;

    margin: 18px -24px 0;
    padding: 14px 24px;

    border-top: 1px solid var(--line);
}

.rec-highlight span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.rec-highlight strong,
.rec-highlight a {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rec-highlight a {
    color: var(--blue);
    text-decoration: none;
}

.rec-highlight a:hover {
    text-decoration: underline;
}

.rec-highlight small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}


/* Fristen-Ampel (gleiche Stufen wie deadline_class) */

.rec-deadline.deadline-critical { color: var(--red); }
.rec-deadline.deadline-warning { color: var(--orange, #d68a1e); }
.rec-deadline.deadline-good { color: var(--green); }
.rec-deadline.deadline-expired { color: var(--muted); }


/* Phasenleiste */

.rec-path {
    display: flex;
    margin: 16px 0 22px;
    padding: 0;
    list-style: none;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
}

.rec-step {
    position: relative;
    flex: 1;
    min-width: 0;

    padding: 10px 18px 10px 30px;

    background: #f1eef7;
    color: var(--muted);
    font-size: 13px;
    text-align: center;

    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
    margin-right: -10px;
}

.rec-step:first-child {
    padding-left: 18px;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.rec-step:last-child {
    margin-right: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
}

.rec-step strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rec-step small {
    display: block;
    font-size: 12px;
    opacity: .85;
}

.rec-step.done {
    background: var(--blue-soft);
    color: var(--blue-dark, #4b12b0);
}

.rec-step.current {
    background: var(--blue);
    color: #fff;
}

.rec-step.current.warn {
    background: var(--orange, #d68a1e);
}


/* Zweispaltiges Layout */

.rec-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 22px;
    align-items: start;
}

.rec-main {
    min-width: 0;
    padding: 0 24px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}


/* Reiter */

.rec-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin: 0 -24px 6px;
    padding: 0 16px;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
}

.rec-tab {
    padding: 14px 12px 11px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
}

.rec-tab:hover {
    color: var(--text);
}

.rec-tab[aria-selected="true"] {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.rec-count {
    display: inline-block;
    min-width: 20px;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 20px;
    background: #f1eef7;
    color: var(--muted);
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}

.rec-tab[aria-selected="true"] .rec-count {
    background: var(--blue-soft);
    color: var(--blue);
}

/* Ohne JS bleiben alle Reiterinhalte sichtbar. */
.rec-js .rec-panel[hidden] {
    display: none;
}


/* Einklappbare Feldgruppen */

.rec-section {
    margin-top: 16px;
}

.rec-section > summary {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 9px 12px;
    border-radius: 9px;

    background: #f5f3fa;
    color: var(--text);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    list-style: none;
}

.rec-section > summary::-webkit-details-marker {
    display: none;
}

.rec-section > summary::before {
    content: "›";
    display: inline-block;
    width: 12px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    transition: transform .15s ease;
}

.rec-section[open] > summary::before {
    transform: rotate(90deg);
}

.rec-section-body {
    padding: 6px 12px 0;
}

.rec-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
}

.rec-field {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.rec-field.wide {
    grid-column: 1 / -1;
}

.rec-field dt {
    color: var(--muted);
}

.rec-field dd {
    margin: 0;
    min-width: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.rec-field dd a {
    color: var(--blue);
    text-decoration: none;
}

.rec-field dd a:hover {
    text-decoration: underline;
}

.rec-field small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.rec-text {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-line;
}

.rec-empty {
    padding: 28px 12px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}


/* Zeilenlisten (Lose, Dokumente, Mitteilungen, Bekanntmachungen) */

.rec-rows {
    display: grid;
}

.rec-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rec-row:last-child {
    border-bottom: 0;
}

.rec-row-badge {
    display: grid;
    place-items: center;
    flex: none;

    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: 9px;

    background: var(--blue-soft);
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.rec-row-main {
    flex: 1;
    min-width: 0;
}

.rec-row-main strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.rec-row-main p {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

.rec-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.rec-meta a {
    color: var(--blue);
    text-decoration: none;
}

.rec-download {
    display: grid;
    place-items: center;
    flex: none;

    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 9px;

    color: var(--blue);
    background: #fff;
    font-weight: 800;
    text-decoration: none;
}

.rec-download:hover {
    background: var(--blue-soft);
}

.rec-download.disabled {
    color: var(--muted-2, #978daa);
    background: #f5f3fa;
    cursor: not-allowed;
}

.rec-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.rec-panel-toolbar .button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}


/* Zuschlaege */

.rec-award {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.rec-award:last-child {
    border-bottom: 0;
}

.rec-award-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.rec-award-head strong {
    font-size: 14px;
}

.rec-winners {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.rec-winner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.rec-winner:hover {
    filter: brightness(.96);
}


/* Rechte Spalte */

.rec-side {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.rec-side > * {
    min-width: 0;
}

.rec-card-body {
    overflow-wrap: anywhere;
}

.rec-card {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.rec-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rec-card-icon {
    display: grid;
    place-items: center;
    flex: none;

    width: 28px;
    height: 28px;
    border-radius: 8px;

    color: #fff;
    font-size: 14px;
}

.rec-card-icon.blue { background: var(--blue); }
.rec-card-icon.green { background: var(--green); }
.rec-card-icon.orange { background: var(--orange, #d68a1e); }
.rec-card-icon.cyan { background: var(--cyan, #9a28c0); }
.rec-card-icon.navy { background: var(--navy); }

.rec-card-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 750;
}

.rec-card-body {
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
}

.rec-card-body .muted {
    color: var(--muted);
}

.rec-card-more {
    display: block;
    margin: 12px -18px -16px;
    padding: 10px;
    border-top: 1px solid var(--line);
    color: var(--blue);
    background: none;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0 0 16px 16px;
    width: calc(100% + 36px);
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

.rec-card-more:hover {
    background: #f8f6fc;
}

.rec-quicklinks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
}

.rec-quicklinks a {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--blue);
    font-size: 13px;
    text-decoration: none;
}

.rec-quicklinks a::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: .55;
}

.rec-quicklinks a:hover {
    text-decoration: underline;
}

.rec-deadline-big {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.rec-side-buttons {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.rec-side-buttons .button {
    min-height: 38px;
    font-size: 14px;
}

.rec-mini-list {
    display: grid;
    gap: 8px;
}

.rec-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rec-mini-item > div {
    flex: 1;
    min-width: 0;
}

.rec-mini-item strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rec-mini-item small {
    color: var(--muted);
    font-size: 12px;
}

.rec-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rec-note-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    resize: vertical;
}

.rec-note-form .button {
    width: 100%;
    margin-top: 8px;
}

.rec-note {
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.rec-note-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.rec-note-meta strong {
    color: var(--text);
}

.rec-note-text {
    margin-top: 4px;
    font-size: 14px;
    white-space: pre-wrap;
}


@media (max-width: 1150px) {

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

    .rec-side {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 760px) {

    .rec-crumb-extra {
        display: none;
    }

    .rec-header,
    .rec-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rec-header-main {
        flex-wrap: wrap;
    }

    .rec-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .rec-highlights {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rec-tabs {
        margin-left: -16px;
        margin-right: -16px;
    }

    .rec-path {
        flex-direction: column;
    }

    .rec-step,
    .rec-step:first-child,
    .rec-step:last-child {
        margin-right: 0;
        padding: 8px 14px;
        clip-path: none;
        text-align: left;
    }

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

    .rec-field {
        grid-template-columns: 130px minmax(0, 1fr);
    }
}


/* ---------------------------------------------------------
   3. LISTENANSICHT (list-*)
   --------------------------------------------------------- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.list-header {
    padding-bottom: 16px;
}

.list-view-picker {
    position: relative;
    display: inline-block;
}

.list-view-picker > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.list-view-picker > summary::-webkit-details-marker {
    display: none;
}

.list-view-picker h1 {
    margin: 2px 0 0;
}

.list-view-caret {
    color: var(--muted);
    font-size: 16px;
}

.list-view-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;

    display: grid;
    min-width: 260px;
    padding: 6px;

    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 24px 70px rgba(29, 19, 50, .085));
}

.list-view-menu-title {
    padding: 6px 12px 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.list-view-menu a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}

.list-view-menu a:hover,
.list-view-menu a.active {
    color: var(--blue);
    background: var(--blue-soft);
}

.list-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.list-meta a {
    color: var(--blue);
}

.list-segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f6f4fb;
}

.list-segmented a {
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.list-segmented a.active {
    color: var(--text);
    background: #fff;
    box-shadow: 0 1px 3px rgba(29, 19, 50, .12);
}


/* Suche + Filter */

.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
}

.list-search {
    display: flex;
    flex: 1 1 320px;
    align-items: center;
    gap: 8px;

    height: 40px;
    padding: 0 12px;

    background: #f6f4fb;
    border: 1px solid var(--line);
    border-radius: 10px;
}

.list-search:focus-within {
    background: #fff;
    border-color: #ba9ff1;
    box-shadow: 0 0 0 4px rgba(94, 31, 216, .08);
}

.list-search span {
    color: var(--muted-2, #978daa);
}

.list-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
}

.list-toolbar > .button,
.list-filter-toggle > summary {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.list-filter-toggle {
    display: contents;
}

.list-filter-toggle > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
}

.list-filter-toggle > summary::-webkit-details-marker {
    display: none;
}

.list-filter-grid {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;

    margin-top: 6px;
    padding: 14px;

    background: #f9f7fc;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.list-filter-grid label {
    display: grid;
    gap: 4px;
}

.list-filter-grid label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.list-filter-grid input,
.list-filter-grid select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font-size: 14px;
}

.list-filter-actions {
    display: flex;
    align-items: flex-end;
}

.list-filter-actions .button {
    min-height: 38px;
    width: 100%;
    font-size: 14px;
}

.list-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
}

.list-chip {
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--blue-soft);
    color: var(--blue-dark, #4b12b0);
    font-size: 12px;
    font-weight: 650;
}

.list-chip-reset {
    margin-left: 4px;
    color: var(--muted);
    font-size: 12px;
}


/* Tabelle */

.list-card {
    margin-top: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.list-table th {
    padding: 10px 12px;

    background: #f9f7fc;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.list-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    vertical-align: top;
}

.list-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Ecken der Kopfzeile an die Karte anpassen */
.list-card .list-table th:first-child { border-top-left-radius: 16px; }
.list-card .list-table th:last-child { border-top-right-radius: 16px; }

.list-table tbody tr:hover td {
    background: #fbf9fe;
}

.list-sort-link {
    color: inherit;
    text-decoration: none;
}

.list-sort-link:hover {
    color: var(--blue);
}

.list-col-star {
    width: 44px;
    text-align: center !important;
}

.list-col-star form {
    margin: 0;
}

.list-star {
    border: 0;
    background: none;
    color: var(--muted-2, #978daa);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.list-star:hover,
.list-star.active {
    color: var(--orange, #d68a1e);
}

.list-col-title {
    min-width: 280px;
}

.list-title {
    color: var(--blue);
    font-weight: 650;
    line-height: 1.4;
    text-decoration: none;
}

.list-title:hover {
    text-decoration: underline;
}

.list-sub {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.list-nowrap {
    white-space: nowrap;
}

.list-rel {
    display: block;
    font-size: 12px;
    opacity: .9;
}

.list-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1eef7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.list-type-tender { background: var(--blue-soft); color: var(--blue-dark, #4b12b0); }
.list-type-award { background: var(--green-soft); color: var(--green); }
.list-type-modification { background: var(--orange-soft, #fff7e9); color: #8a5a10; }

.layout-v2 .proc-pagination-v4 {
    margin-top: 18px;
}


/* ---------------------------------------------------------
   4. STARTSEITE (home-*)
   --------------------------------------------------------- */

.home-header {
    margin-bottom: 22px;
}

.home-kpi {
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.2;
}

.home-main {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.home-main > *,
.home-search form,
.home-search .search-editor-card {
    min-width: 0;
}

.home-card-link {
    margin-left: auto;
    color: var(--blue);
    font-size: 13px;
    text-decoration: none;
}

.home-search .search-blocks-v4 {
    margin-top: 4px;
}

.home-results {
    padding: 16px 0 0;
}

.home-results > .rec-card-head,
.home-results > .home-list-meta {
    padding: 0 18px;
}

.home-results .rec-card-head h2 {
    display: flex;
    align-items: center;
    gap: 4px;
}

.home-list-search {
    display: flex;
    align-items: center;
    gap: 6px;

    width: min(280px, 100%);
    height: 34px;
    margin-left: auto;
    padding: 0 10px;

    background: #f6f4fb;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.home-list-search span {
    color: var(--muted-2, #978daa);
}

.home-list-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
}

.home-list-meta {
    margin: -4px 0 10px;
}

.home-table {
    border-top: 1px solid var(--line);
}

.home-today {
    display: inline-block;
    margin-right: 4px;
    padding: 0 6px;
    border-radius: 5px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.home-score {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1eef7;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.home-score.positive { background: var(--green-soft); color: var(--green); }
.home-score.negative { background: var(--red-soft, #fff0f0); color: var(--red); }

.home-mini-link {
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 9px;
    color: var(--text);
    text-decoration: none;
}

.home-mini-link:hover {
    background: #f8f6fc;
}

.home-hint {
    font-size: 14px;
}

.home-hint a {
    color: var(--blue);
}


/* ---------------------------------------------------------
   Tabellen auf schmalen Bildschirmen als Karten
   --------------------------------------------------------- */

@media (max-width: 760px) {

    .list-table thead {
        display: none;
    }

    .list-table,
    .list-table tbody,
    .list-table tr,
    .list-table td {
        display: block;
        width: 100%;
    }

    .list-table tr {
        position: relative;
        padding: 12px 14px 12px 48px;
        border-bottom: 1px solid var(--line);
    }

    .list-table tbody tr:hover td {
        background: none;
    }

    .list-table td {
        padding: 2px 0;
        border: 0;
    }

    .list-table td[data-label] {
        display: flex;
        gap: 8px;
        font-size: 13px;
    }

    .list-table td[data-label]::before {
        content: attr(data-label);
        flex: none;
        width: 104px;
        color: var(--muted);
    }

    .list-table td[data-label] .list-rel {
        display: inline;
        margin-left: 4px;
    }

    .list-table td[data-label] {
        flex-wrap: wrap;
        white-space: normal;
    }

    .list-table td[data-label] > span:not(.list-type) {
        min-width: 0;
    }

    .list-col-star {
        position: absolute;
        top: 12px;
        left: 6px;
        width: 36px !important;
    }

    .list-col-title {
        min-width: 0;
        margin-bottom: 6px;
    }

    .home-results .rec-card-head {
        flex-wrap: wrap;
    }

    .home-list-search {
        width: 100%;
        margin-left: 0;
    }

    .list-segmented {
        width: 100%;
    }

    .list-segmented a {
        flex: 1;
        text-align: center;
    }
}


/* ---------------------------------------------------------
   5. AUFTRAGGEBER, COCKPIT, WETTBEWERB
   --------------------------------------------------------- */

.list-num {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.list-entity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-monogram {
    display: grid;
    place-items: center;
    flex: none;

    width: 30px;
    height: 30px;
    border-radius: 8px;

    background: var(--blue-soft);
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}

.rec-icon-text {
    font-size: 20px;
    font-weight: 800;
}


/* Auftraggeber-Detail */

.org-cpv-code {
    display: inline-block;
    min-width: 30px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #fff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.org-year {
    margin: 14px 0 2px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.org-year span {
    color: var(--muted);
    font-weight: 600;
}

.org-winner-table {
    margin-top: 10px;
}

.org-bars {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.org-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.org-bar-label span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-bar-track {
    height: 6px;
    margin-top: 4px;
    border-radius: 6px;
    background: #f1eef7;
}

.org-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--green);
}


/* Cockpit */

.cockpit-group {
    margin-top: 16px;
}

.cockpit-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
    background: #f9f7fc;
    border-radius: 16px 16px 0 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 750;
    list-style: none;
}

.cockpit-group:not([open]) .cockpit-group-head {
    border-bottom: 0;
    border-radius: 16px;
}

.cockpit-group-head::-webkit-details-marker {
    display: none;
}

.cockpit-group-head::before {
    content: "›";
    color: var(--muted);
    font-size: 18px;
    transition: transform .15s ease;
}

.cockpit-group[open] .cockpit-group-head::before {
    transform: rotate(90deg);
}

.cockpit-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(220px, 320px) auto;
    gap: 18px;
    align-items: start;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.cockpit-row:last-child {
    border-bottom: 0;
}

.cockpit-deadline small {
    display: block;
    font-size: 12px;
}

.cockpit-deadline strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}

.cockpit-person {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.cockpit-person > div {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.cockpit-person strong {
    display: block;
    font-size: 13px;
}

.cockpit-person small {
    color: var(--muted);
    font-size: 12px;
}

.cockpit-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

.cockpit-remove {
    width: 26px;
    height: 26px;
    font-size: 14px;
}

.cockpit-unit {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.cockpit-nobody {
    font-size: 13px;
}

.cockpit-assign {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.cockpit-assign select {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
}

.cockpit-assign .button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
}

.cockpit-actions {
    display: grid;
    gap: 6px;
}

.cockpit-actions form {
    margin: 0;
}

.cockpit-actions .button {
    width: 100%;
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}


/* Markt & Wettbewerb */

.hub-heading {
    margin: 26px 0 12px;
    color: var(--text);
    font-size: 18px;
    font-weight: 750;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hub-card {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    color: var(--text);
    text-decoration: none;
}

.hub-card .rec-card-body {
    margin: 0;
    color: var(--muted);
}

.hub-card.ready:hover {
    border-color: #ba9ff1;
    box-shadow: var(--shadow-lg, 0 24px 70px rgba(29, 19, 50, .085));
}

.hub-card.pending {
    opacity: .7;
}

.hub-status {
    margin-top: auto;
    padding-top: 14px;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.hub-card.pending .hub-status {
    color: var(--muted);
}

.hub-note {
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.6;
}

.rec-actions .home-list-search {
    width: 280px;
}

.comp-value {
    flex: none;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}


@media (max-width: 1100px) {

    .cockpit-row {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .cockpit-people,
    .cockpit-actions {
        grid-column: 2;
    }

    .cockpit-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .cockpit-actions .button {
        width: auto;
    }

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

@media (max-width: 760px) {

    .cockpit-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 14px 16px;
    }

    .cockpit-people,
    .cockpit-actions {
        grid-column: 1;
    }

    .cockpit-deadline {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 6px;
    }

    .cockpit-deadline strong {
        font-size: 15px;
    }

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

    .comp-value {
        white-space: normal;
    }

    .rec-row:has(.comp-value) {
        flex-wrap: wrap;
    }

    .rec-actions .home-list-search {
        width: 100%;
    }
}
