* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #f5f6f8;
    color: #111;
}

.page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.top-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f5f6f8;
    padding: 24px 24px;
    padding-bottom: 10px;
    margin-top: -24px;
    margin-bottom: 10px;
    margin-left: -24px;
    margin-right: -24px;
    /* box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.header p {
    margin: 0;
    color: #666;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

button,
.actions a,
.export-btn {
    border: 0;
    background: #111;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.4;      /* 可选，统一行高更保险 */
    box-sizing: border-box; /* 可选，确保盒模型一致 */
}

/* .actions a{
    font-size: 14px;
    line-height: 16px;
    box-sizing: border-box;
} */

.export-btn {
    display: inline-flex;
    align-items: center;
}

button:hover,
.actions a:hover,
.export-btn:hover {
    opacity: 0.86;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

button.danger {
    background: #dc2626;
}

.follow-btn {
    background: #16a34a;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.filter-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none;
    background: #fff;
    color: #222;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    font-size: 14px;
}

.filter-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f1f2f4;
    color: #555;
    font-size: 12px;
}

.filter-link.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.filter-link.active span {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.customer-list {
    display: grid;
    gap: 16px;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.card-no-follow {
    border: 1px solid #fecaca;
    background: #fffafa;
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.card h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.sub {
    margin: 0;
    color: #777;
    line-height: 1.7;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    align-items: flex-start;
    max-width: 680px;
}

.content p {
    line-height: 1.7;
    margin: 8px 0;
}

.content a {
    color: #2563eb;
    word-break: break-all;
}

.tag-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #333;
    font-size: 12px;
    line-height: 1.2;
}

.tag-A-高意向,
.tag-A {
    background: #fee2e2;
    color: #991b1b;
}

.tag-B-中意向,
.tag-B {
    background: #fef3c7;
    color: #92400e;
}

.tag-C-低意向,
.tag-C {
    background: #dbeafe;
    color: #1e40af;
}

.tag-不跟进 {
    background: #fecaca;
    color: #991b1b;
}

.tag-同行,
.tag-竞品,
.tag-卖家,
.tag-家具卖家 {
    background: #ede9fe;
    color: #5b21b6;
}

.tag-测试 {
    background: #dcfce7;
    color: #166534;
}

.tag-empty {
    background: #f3f4f6;
    color: #999;
}

.conversation {
    margin-top: 8px;
    border: 1px solid #eee;
    background: #fafafa;
    border-radius: 10px;
    padding: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.conversation-item {
    display: grid;
    grid-template-columns: 190px 76px 1fr;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    line-height: 1.6;
}

.conversation-item:last-child {
    border-bottom: 0;
}

.conversation-time {
    color: #777;
}

.conversation-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    border-radius: 999px;
    background: #eee;
    color: #555;
    font-size: 12px;
}

.role-me {
    background: #111;
    color: #fff;
}

.role-customer {
    background: #facc15;
    color: #111;
}

.role-system {
    background: #e5e7eb;
    color: #444;
}

.conversation-content {
    word-break: break-word;
    color: #222;
}

.conversation-empty {
    color: #999;
    font-size: 13px;
    padding: 6px 0;
}

.empty {
    background: #fff;
    border-radius: 14px;
    padding: 42px;
    color: #888;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

@media (max-width: 900px) {
    .page {
        padding: 16px;
    }

    .header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .card-header {
        flex-direction: column;
    }

    .actions {
        justify-content: flex-start;
        max-width: none;
    }


    .conversation-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}