.contacts-home,
.contact-profile,
.contacts-form-page {
    width: 100%;
    max-width: 46rem;
    margin: 0 auto;
    padding-bottom: 6rem;
}

.contacts-kicker {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent, var(--accent));
}

.contacts-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 16px;
}

.contacts-hero h1,
.contact-profile__hero h1 {
    margin: 0;
    font-size: 1.7rem;
    letter-spacing: -0.03em;
}

.contacts-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.contacts-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 14px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d5dde8);
    padding: 12px 14px;
    font: inherit;
}

.contacts-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.contacts-filter {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(13, 71, 255, 0.08);
    color: var(--text, #0a1633);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.contacts-filter.is-active {
    background: var(--accent, var(--accent));
    color: #fff;
}

.contacts-list,
.contact-profile__grid {
    display: grid;
    gap: 12px;
}

.contacts-card,
.contact-panel {
    padding: 16px;
    border-radius: 20px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d5dde8);
}

.contacts-card__main {
    display: grid;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.contacts-card h2,
.contact-panel h2 {
    margin: 0;
    font-size: 1.15rem;
}

.contacts-card__status,
.contact-profile__status {
    margin: 0;
    font-weight: 800;
    color: var(--accent, var(--accent));
}

.contacts-card p,
.contact-panel p {
    margin: 0;
}

.contacts-card__next {
    margin-top: 8px;
    font-weight: 700;
}

.contacts-card p span,
.contacts-card__last span,
.contacts-card__next span,
.contact-panel__muted {
    display: block;
    color: var(--text-muted, #33415c);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contacts-card__actions,
.contact-profile__cta,
.contact-form__actions,
.contact-chip-add,
.contact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.contacts-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted, #33415c);
}

.contact-profile__hero {
    margin-bottom: 18px;
}

.contact-viewed {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 6px;
}

.contact-panel--recommend {
    border-color: rgba(13, 71, 255, 0.35);
}

.contact-panel__summary {
    font-size: 1.05rem;
    line-height: 1.45;
    font-weight: 650;
}

.contact-chips {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}

.contact-chips li,
.contact-chip-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(13, 71, 255, 0.1);
    color: var(--accent, var(--accent));
    font-size: 0.86rem;
    font-weight: 800;
}

.contact-history-day h3 {
    margin: 14px 0 8px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-history-item {
    display: grid;
    gap: 2px;
    padding: 8px 0;
    border-top: 1px solid var(--border, #d5dde8);
}

.contact-field {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted, #33415c);
}

.contact-field input,
.contact-field select,
.contact-field textarea,
.contact-chip-add input {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: rgba(13, 71, 255, 0.06);
    padding: 12px 14px;
    font: inherit;
    color: var(--text, #0a1633);
}

.contact-budget {
    display: grid;
    gap: 10px;
}

.contact-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-chip-edit button {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
}

@media (min-width: 900px) {
    .contact-profile__grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-panel--history {
        grid-column: 1 / -1;
    }

    .contact-budget {
        grid-template-columns: 7rem 1fr 1fr;
    }
}

html[data-theme="dark"] .contacts-card,
html[data-theme="dark"] .contact-panel,
html[data-theme="dark"] .contacts-search input,
html[data-theme="dark"] .matches-card {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.matches-page {
    width: 100%;
    max-width: 46rem;
    margin: 0 auto;
    padding-bottom: 7rem;
}

.matches-hero h1 {
    margin: 0 0 6px;
    font-size: 1.55rem;
    letter-spacing: -0.03em;
}

.matches-sub,
.matches-temp,
.matches-hood,
.matches-facts,
.matches-coincide {
    margin: 0 0 8px;
    color: var(--muted, #5b6b82);
}

.matches-temp {
    font-weight: 700;
    color: var(--text, #0a1633);
}

.matches-chips {
    margin: 12px 0;
}

.matches-search {
    margin: 12px 0 0;
}

.matches-search-form,
.matches-search-grid,
.matches-features {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.matches-search-grid {
    grid-template-columns: 1fr 1fr;
}

.matches-features {
    border: 0;
    padding: 0;
}

.matches-features label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
}

.matches-search-actions,
.matches-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.matches-count {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 18px 0 10px;
    font-weight: 700;
}

.matches-list {
    display: grid;
    gap: 12px;
}

.matches-card {
    position: relative;
    padding: 16px 16px 16px 44px;
    border-radius: 18px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d5dde8);
}

.matches-pick {
    position: absolute;
    top: 16px;
    left: 14px;
}

.matches-score {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}

.matches-score strong {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.matches-badge {
    display: inline-block;
    margin: 0 0 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(13, 71, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 800;
}

.matches-source {
    background: rgba(17, 24, 39, 0.08);
}

.matches-card h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.matches-price {
    margin: 0 0 8px;
    font-weight: 800;
}

.matches-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    font-size: 0.82rem;
}

.matches-sources li {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.06);
}

.matches-sources em {
    font-style: normal;
    color: var(--muted, #5b6b82);
}

.matches-hits {
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
    font-size: 0.88rem;
}

.matches-hits [data-state="conflict"] {
    color: var(--muted, #5b6b82);
}

.matches-sharebar {
    position: sticky;
    bottom: 4.5rem;
    display: flex;
    justify-content: center;
}

.matches-more {
    margin-top: 16px;
    text-align: center;
}

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

.contacts-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contacts-stale-banner,
.contacts-back {
    margin: 0 0 12px;
    color: var(--muted, #5b6b82);
}

.contact-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.contact-kpis article {
    padding: 12px;
    border-radius: 16px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d5dde8);
}

.contact-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(13, 71, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 800;
}

.contact-profile__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 8px 0 12px;
    list-style: none;
    color: var(--muted, #5b6b82);
}

@media (min-width: 720px) {
    .contact-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.followup-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.followup-card h2 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.followup-card h2 a {
    color: inherit;
    text-decoration: none;
}

.followup-card__reason {
    font-weight: 700;
}

.followup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.followup-actions form,
.followup-postpone,
.followup-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.followup-note input,
.followup-postpone select {
    min-height: 40px;
}

.followup-panel form {
    margin-top: 12px;
}

.recommend-panel,
.recommend-list,
.recommend-card,
.matches-list,
.matches-card {
    max-width: 100%;
    min-width: 0;
}

.recommend-panel__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.recommend-list {
    display: grid;
    gap: 12px;
    margin: 0 0 12px;
}

.recommend-card {
    display: grid;
    gap: 0;
    border: 1px solid var(--border, #d5dde8);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface, #fff);
}

.recommend-card img,
.matches-photo {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.recommend-card__body {
    display: grid;
    gap: 6px;
    padding: 12px;
}

.recommend-card__top,
.recommend-card__actions,
.matches-actions,
.recommend-discard {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.recommend-card h2 {
    margin: 0;
    font-size: 1.05rem;
}

.recommend-reasons {
    margin: 0;
    padding-left: 1.1rem;
}

.recommend-card__actions form,
.recommend-card__actions .btn,
.matches-actions .btn,
.matches-actions select {
    max-width: 100%;
}

.contact-profile,
.matches-page,
.shortlist-page {
    overflow-x: hidden;
}

.recommend-pick {
    display: flex;
    align-items: center;
    min-height: 44px;
}

.shortlist-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: stretch;
    padding: 12px 0;
    background: color-mix(in srgb, var(--surface, #fff) 92%, transparent);
}

.shortlist-bar .btn {
    width: 100%;
}

@media (max-width: 768px) {
    body.has-mobile-bottom-nav .shortlist-bar,
    body.has-mobile-bottom-nav .matches-sharebar {
        position: fixed;
        left: 16px;
        right: 16px;
        bottom: calc(var(--m-nav-h, 74px) + 8px);
        z-index: 35;
        padding: 0;
        background: transparent;
    }

    body.has-mobile-bottom-nav .shortlist-bar .btn,
    body.has-mobile-bottom-nav .matches-sharebar .btn {
        width: 100%;
        min-height: 52px;
        border-radius: 999px;
        box-shadow: 0 8px 24px color-mix(in srgb, var(--color-text, #111) 16%, transparent);
    }

    body.has-mobile-bottom-nav .recommend-list,
    body.has-mobile-bottom-nav .matches-page,
    body.has-mobile-bottom-nav .shortlist-page {
        padding-bottom: calc(var(--m-nav-h, 74px) + 88px);
    }
}

.shortlist-page {
    width: 100%;
    max-width: 46rem;
    margin: 0 auto;
    padding-bottom: 6rem;
}

.shortlist-items {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 12px;
}

.shortlist-item,
.shortlist-item__actions form,
.shortlist-follow,
.shortlist-date {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.shortlist-item {
    justify-content: space-between;
    padding: 12px;
    border: 1px solid var(--border, #d5dde8);
    border-radius: 16px;
    background: var(--surface, #fff);
}

.shortlist-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.shortlist-mode legend {
    width: 100%;
    margin-bottom: 4px;
}

.shortlist-draft textarea {
    width: 100%;
    min-height: 220px;
    margin: 8px 0 0;
}
