
.salesitemstable {
    width: 100%;
    margin-bottom: 30px
}
.salesitemstable thead th {
    text-align: center;
    padding: 3px 6px;
    border-bottom: 1px solid var(--color-borderdecent);
}
.salesitemstable tbody td {
    vertical-align: top;
    padding: 3px 6px;
    border-bottom: 1px solid var(--color-borderdecent);
    font-size: .95em;
}
.salesitemstable tfoot td {
    padding: 3px 6px;
    font-size: .95em;
}
.salesitemstable tfoot .sum td {
    font-weight: bold;
}
.salesitemstable .markdown p:last-child {
    margin-bottom: 0;
}
.salesitemstable .markdown em {
    font-weight: bold;
    font-style: normal;
}
.salesitemstable .markdown blockquote > p {
    padding: initial;
    margin: initial;
}
.salesitemstable .markdown blockquote {
    padding: initial;
    margin-left: 20px;
}
.divider:not(:first-child) {
    border-top: 1px solid black;
}

.leadboard {
    display: flex;
    align-items: stretch;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
}
.leadboard-column {
    display: flex;
    flex-direction: column;
    flex: 1 1 220px;
    min-width: 220px;
    height: 70vh;
    background-color: var(--color-row-tint);
    border: 1px solid var(--color-borderdecent);
    border-radius: 6px;
    overflow: hidden;
}
.widget-element.maximized .leadboard-column {
    height: calc(100vh - 110px);
}
.leadboard-column-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-top: 4px solid;
    font-weight: 600;
    color: var(--color-text-strong);
}
.leadboard-column-count {
    font-size: .8em;
    font-weight: 600;
    color: var(--color-text-strong);
    padding: 1px 8px;
    border-radius: 10px;
}
.leadboard-column-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 60px;
}
.leadboard-column-body:not(:has(.leadboard-card)) {
    display: flex;
    align-items: center;
    justify-content: center;
}
.leadboard-column-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--color-text-faint-3);
    text-align: center;
    padding: 10px 0;
    transform: translateY(-14px);
}
.leadboard-column-empty i {
    font-size: 1.3em;
    color: var(--color-text-faint-3);
}
.leadboard-column-empty span {
    font-size: .8em;
}
.leadboard-card {
    position: relative;
    background-color: var(--color-white);
    border: 1px solid var(--color-borderdecent);
    border-radius: 4px;
    padding: 10px 44px 10px 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.leadboard-draggable .leadboard-card {
    cursor: move;
}
.leadboard-card:hover {
    border-color: var(--color-border-medium);
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, .12);
}
.leadboard-card:last-child {
    margin-bottom: 0;
}
.leadboard-card-open {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: .85em;
    color: var(--color-text-muted);
    cursor: pointer;
}
.leadboard-card-open:hover {
    color: var(--color-text-strong);
}
.leadboard-card-customer {
    font-size: 1.05em;
    font-weight: 700;
    color: var(--color-text-strong);
    padding-right: 16px;
    line-height: 1.3;
}
.leadboard-card-value {
    margin-top: 5px;
    font-size: .9em;
    color: var(--color-text-muted);
}
.leadboard-card-classification {
    margin-top: 8px;
    margin-bottom: 12px;
    line-height: 1;
}
.leadboard-card-classification .badge {
    margin-bottom: 0;
}
.leadboard-card-avatar {
    position: absolute;
    bottom: 8px;
    right: 8px;
}
.leadboard-card-user {
    margin-top: 8px;
    font-size: .85em;
    color: var(--color-text-muted);
}
.leadboard-card-dates {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.leadboard-card-user + .leadboard-card-dates {
    margin-top: 4px;
}
.leadboard-card-date {
    font-size: .85em;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.leadboard-card-placeholder {
    border: 1px dashed var(--color-borderdecent);
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: var(--color-surface-light-2);
}


/* "Meine Vertriebsvorgänge" widget (table and badge styles are general, see app.css) */
.widget-saleseventswidget {
    container-type: inline-size;
}
.widget-saleseventswidget .se-row {
    position: relative;
}
.widget-saleseventswidget .se-col-amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* the contact: initials and name, the link covers the whole row */
.se-customer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-weight: var(--font-weight-strong);
    text-decoration: none;
}
.se-name {
    white-space: nowrap;
}
.se-customer::after {
    content: '';
    position: absolute;
    inset: 0;
}
.se-customer:hover {
    color: inherit;
    text-decoration: none;
}
.se-customer:hover .se-name {
    color: var(--color-highlight);
}
.se-avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-highlight) 15%, transparent);
    color: var(--color-highlight);
    font-size: .7rem;
    font-weight: var(--font-weight-strong);
    letter-spacing: .02em;
}

/* a narrow widget needs the room for the columns */
@container (max-width: 620px) {
    .se-avatar {
        display: none;
    }
}

/* follow-up date: calm unless something is due */
.se-followup {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 99px;
    font-size: .8rem;
    white-space: nowrap;
}
.se-followup.se-overdue {
    background: color-mix(in srgb, #d93025 14%, transparent);
    color: color-mix(in srgb, #d93025 75%, var(--color-text-strong));
}
.se-followup.se-today {
    background: color-mix(in srgb, #e8a100 20%, transparent);
    color: color-mix(in srgb, #b07800 70%, var(--color-text-strong));
}
.se-followup.se-upcoming {
    color: var(--color-text-muted);
}

.se-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 0 8px;
    border-top: 1px solid var(--color-borderdecent);
    font-size: .82rem;
    color: var(--color-text-muted);
}
.se-summary strong {
    color: var(--color-textprimary);
    font-weight: var(--font-weight-strong);
}
