/* Shared by customer and association profiles. Page-specific columns and scrolling stay scoped. */
.customer-profile-header {
    display: grid;
    gap: 1.25rem;
    align-items: start;
    min-width: 0;
    padding: 1.25rem;
    border-radius: 24px;
    border: 1px solid var(--customer-border-color);
    background: var(--customer-surface-bg);
}

.customer-profile-header .customer-hero__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--customer-hero-actions-width, 240px);
    align-items: start;
    gap: 1.25rem;
}

.customer-profile-header .customer-hero__identity {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.customer-profile-header .customer-hero__avatar { width: 3rem; height: 3rem; flex: none; }
.customer-profile-header .customer-hero__content {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.customer-profile-header .customer-hero__eyebrow {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .4rem;
    color: var(--mud-palette-text-secondary);
    letter-spacing: .08em;
}

.customer-profile-header .customer-hero__eyebrow-number {
    color: var(--mud-palette-text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: .03em;
    font-variant-numeric: tabular-nums;
}

.customer-profile-header .customer-hero__title { font-weight: 700; line-height: 1.1; }
.customer-profile-header .customer-hero__subtitle { color: var(--mud-palette-text-secondary); }
.customer-profile-header .customer-hero__actions { display: grid; gap: .75rem; align-items: start; min-width: 0; }
.customer-profile-header .customer-hero__action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: .75rem;
}

.customer-profile-header :is(.customer-hero__primary-action, .customer-hero__visit-report-action) {
    min-height: 2.75rem;
    border-radius: 14px;
    width: 100%;
}

.customer-profile-header .customer-hero__primary-action { padding-inline: 1rem; }
.customer-profile-header .customer-hero__secondary-action {
    min-height: 2.75rem;
    width: 2.75rem;
    min-width: 2.75rem;
    border-radius: 14px;
}

.customer-profile-header .customer-hero__secondary-action .mud-button-icon-start { margin: 0; }
body:not(.dark-mode) .customer-profile-header .customer-hero__visit-report-action:not(:disabled) {
    color: var(--kundendreher-accent-ink);
    border-color: var(--mud-palette-lines-inputs);
    background: var(--kundendreher-brand-soft);
    font-weight: 700;
}

body:not(.dark-mode) .customer-profile-header .customer-hero__visit-report-action:not(:disabled):hover {
    background: var(--kundendreher-brand-soft-hover);
}

.customer-profile-header :is(.customer-hero__primary-action, .customer-hero__visit-report-action, .customer-hero__secondary-action):focus-visible,
.customer-activities-section :is(.customer-filter-pill, .customer-activity-timeline__more-button):focus-visible {
    outline: 3px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

@media (max-width: 959.98px) {
    .customer-profile-header { padding: 1rem; border-radius: 20px; }
    .customer-profile-header .customer-hero__top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 599.98px) {
    .customer-profile-header .customer-hero__title { font-size: 1.7rem; }
}

.customer-activities-section {
    --feed-order-color: #2563eb;
    --feed-label-color: #0f766e;
    --feed-visit-color: #15803d;
    --feed-phone-color: #b45309;
    --feed-mail-color: #7c3aed;
    --feed-return-color: #b91c1c;
    --feed-offer-color: #a21caf;
    --feed-document-color: #0e7490;
    --feed-survey-color: #4d7c0f;
    --feed-other-color: #64748b;
    --feed-action-background: #ffed00;
    --feed-action-text: #161616;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: var(--mud-palette-surface);
    box-shadow: 0 4px 20px rgb(0 0 0 / 4%);
}

:is(body.dark-mode .customer-activities-section, .customer-activities-section--dark) {
    --feed-order-color: #93c5fd;
    --feed-label-color: #5eead4;
    --feed-visit-color: #86efac;
    --feed-phone-color: #fdba74;
    --feed-mail-color: #c4b5fd;
    --feed-return-color: #fca5a5;
    --feed-offer-color: #f0abfc;
    --feed-document-color: #67e8f9;
    --feed-survey-color: #bef264;
    --feed-other-color: #cbd5e1;
}

.customer-activities-section .customer-activities-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--customer-border-color);
}

.customer-activities-section .customer-activities-header h2 {
    flex: 1 0 100%;
    margin: 0 0 .25rem;
    font-size: 1.2rem;
    font-weight: 750;
}

.customer-activities-section > .empty-state { width: auto; margin: 1rem; }
.customer-activities-section .customer-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    min-height: 2rem;
    padding: .4rem .75rem;
    border: 1px solid var(--customer-border-color);
    border-radius: 999px;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
}

.customer-activities-section .customer-filter-pill:not(.is-active):hover {
    background: color-mix(in srgb, var(--mud-palette-text-primary) 6%, var(--mud-palette-background));
}

.customer-activities-section .customer-filter-pill.is-active {
    border-color: transparent;
    background: var(--feed-action-background);
    color: var(--feed-action-text);
    font-weight: 700;
}

.customer-activities-section .customer-filter-pill .mud-icon-root { color: inherit; font-size: 1rem; }
.customer-activities-section .customer-activity-feed__day { position: relative; }
.customer-activities-section .customer-activity-feed__day-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0;
    padding: .5rem 1rem;
    border-bottom: 1px solid var(--customer-border-color);
    background: var(--mud-palette-surface);
    box-shadow: 0 2px 6px rgb(0 0 0 / 5%);
    color: var(--mud-palette-text-secondary);
    font-size: .75rem;
    font-weight: 650;
}

.customer-activities-section .customer-activity-feed__item {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    min-width: 0;
    min-height: 82px;
    padding: .6rem 1rem;
    border: 0;
    background: transparent;
    color: var(--mud-palette-text-primary);
    text-align: start;
    font: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.customer-activities-section .customer-activity-feed__item:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 7%, transparent);
}
.customer-activities-section .customer-activity-feed__item:focus-visible {
    outline: 3px solid var(--mud-palette-primary);
    outline-offset: -3px;
}

.customer-activity-feed__icon {
    --feed-icon-color: var(--feed-other-color);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--feed-icon-color);
    background: color-mix(in srgb, var(--feed-icon-color) 12%, var(--mud-palette-surface));
}
.customer-activity-feed__icon.is-order { --feed-icon-color: var(--feed-order-color); }
.customer-activity-feed__icon.is-label-order { --feed-icon-color: var(--feed-label-color); }
.customer-activity-feed__icon.is-visit { --feed-icon-color: var(--feed-visit-color); }
.customer-activity-feed__icon.is-phone { --feed-icon-color: var(--feed-phone-color); }
.customer-activity-feed__icon.is-mail { --feed-icon-color: var(--feed-mail-color); }
.customer-activity-feed__icon:is(.is-return, .is-reclamation) { --feed-icon-color: var(--feed-return-color); }
.customer-activity-feed__icon.is-offer { --feed-icon-color: var(--feed-offer-color); }
.customer-activity-feed__icon.is-document { --feed-icon-color: var(--feed-document-color); }
.customer-activity-feed__icon.is-survey { --feed-icon-color: var(--feed-survey-color); }
.customer-activity-feed__icon .mud-icon-root { color: inherit; }
.customer-activity-feed__main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: .25rem; }
.customer-activity-feed__main > :is(strong, span) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.customer-activity-feed__main > strong { font-size: .86rem; font-weight: 650; }
.customer-activity-feed__main > span, .customer-activity-feed__meta { font-size: .75rem; color: var(--mud-palette-text-secondary); }
.customer-activity-feed__author .employee-identity__avatar { width: 20px; height: 20px; flex: 0 0 20px; border: 0; }
.customer-activity-feed__author .employee-profile-image { width: 100%; height: 100%; }
.customer-activity-feed__meta { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: .35rem; font-variant-numeric: tabular-nums; }
.customer-activity-feed__meta b { white-space: nowrap; }
.customer-activity-feed__meta small { font-size: .68rem; }
.customer-activity-feed .customer-activity-timeline__more-button {
    min-height: 2.5rem;
    padding: .55rem 1.1rem;
    border: 1px solid var(--feed-action-background);
    border-radius: 999px;
    box-shadow: 0 3px 10px rgb(0 0 0 / 12%);
    font-size: .85rem;
    font-weight: 700;
    text-transform: none;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}
.customer-activity-feed .customer-activity-timeline__more-button:not(:disabled) {
    background: var(--feed-action-background);
    color: var(--feed-action-text);
}
.customer-activity-feed .customer-activity-timeline__more-button:not(:disabled):hover {
    background: color-mix(in srgb, var(--feed-action-background) 88%, #fff);
    box-shadow: 0 5px 14px rgb(0 0 0 / 16%);
}
.customer-activity-feed .customer-activity-timeline__more-button .mud-button-label { color: inherit; }
.customer-activity-feed .customer-activity-timeline__more-button:disabled {
    border-color: var(--customer-border-color);
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-secondary);
    box-shadow: none;
}
@media (max-width: 700px) {
    .customer-activities-section .customer-activity-feed__day-heading { position: static; }
}
@media (max-width: 599.98px) {
    .customer-activities-section .customer-activities-header h2 { margin: 0; }
    .customer-activities-section .customer-section__header--split h2 { flex-basis: auto; }
    .customer-activities-section .customer-activity-feed__item { padding-inline: .75rem; gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .customer-activities-section :is(.customer-activity-feed__item, .customer-activity-timeline__more-button) { transition: none; }
}
