/* ========== 销售收款 · 现代紫色主题 ========== */
.sale-page { animation: fadeIn 0.45s ease; }
.sale-selector {
    display: flex; gap: var(--spacing-lg); margin-bottom: var(--spacing-lg);
    flex-wrap: wrap; align-items: flex-end;
}
.sale-selector .form-group { min-width: 280px; margin-bottom: 0; flex: 1; }
.sale-customer-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.sale-customer-static {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--color-text, #1e293b);
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sale-customer-static.muted {
    color: var(--color-text-light, #64748b);
    font-weight: 500;
}
.sale-customer-picker {
    margin-bottom: var(--spacing-lg);
}
.sale-customer-picker h3 {
    margin: 0 0 12px;
    font-size: 15px;
}
.sale-customer-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}
.sale-customer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    background: #ffffff;
    color: var(--color-text, #1e293b);
    text-align: left;
    cursor: pointer;
}
.sale-customer-item:hover {
    border-color: #1d63ed;
    background: #e8f0fe;
}
.sale-customer-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sale-customer-item span {
    flex: 0 0 auto;
    color: #1d63ed;
    font-size: 12px;
    font-weight: 600;
}

.sale-overview {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
.sale-overview-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(150%);
    border-radius: var(--radius-lg); padding: var(--spacing-lg); text-align: center;
    box-shadow: var(--shadow-card); transition: all var(--transition-normal);
    border: 1.5px solid rgba(226, 232, 240, 0.7); position: relative; overflow: hidden;
}
.sale-overview-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
}
.sale-overview-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-card-hover); 
    border-color: rgba(99, 102, 241, 0.2); 
}
.sale-overview-card.total::before { background: linear-gradient(90deg, var(--primary), #8B5CF6); }
.sale-overview-card.received::before { background: linear-gradient(90deg, #10B981, #059669); }
.sale-overview-card.receivable::before { background: linear-gradient(90deg, #F59E0B, #D97706); }
.overview-label { font-size: 12px; color: var(--color-text-light); margin-bottom: 8px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }
.overview-value { font-size: 23px; font-weight: 700; line-height: 1.2; }
.sale-overview-card.total .overview-value { color: var(--primary); }
.sale-overview-card.received .overview-value { color: #059669; }
.sale-overview-card.receivable .overview-value { color: #D97706; }

.sale-receivable-wrap {
    position: relative;
    z-index: 2;
}
.sale-receivable-wrap:hover {
    z-index: 30;
}
.sale-receivable-wrap:hover .sale-overview-card.receivable {
    transform: none;
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: var(--shadow-card-hover);
}
.sale-receivable-popover {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    padding-top: 8px;
    z-index: 40;
}
.sale-receivable-wrap:hover .sale-receivable-popover {
    display: block;
}
.sale-receivable-popover-title {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #c2410c;
}
.sale-receivable-popover-list {
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid #fed7aa;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.sale-receivable-contract-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.sale-receivable-contract-item:last-child {
    border-bottom: 0;
}
.sale-receivable-contract-item:hover {
    background: #fff7ed;
}
.sale-receivable-contract-no {
    font-family: var(--font-numeric), var(--font-family);
    font-size: 12px;
    font-weight: 700;
    color: #0f766e;
    word-break: break-all;
}
.sale-receivable-contract-amt {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-numeric), var(--font-family);
    font-variant-numeric: tabular-nums;
    color: #c96b88;
}
.sale-receivable-empty {
    padding: 14px 12px;
    font-size: 12px;
    color: var(--color-text-lighter);
    text-align: center;
}

.sale-record-form {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(150%);
    border-radius: var(--radius-lg); padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg); box-shadow: var(--shadow-card);
    border: 1.5px solid rgba(226, 232, 240, 0.7);
}
.sale-record-form h3 { margin-bottom: var(--spacing-md); font-size: 15px; font-weight: 600; color: var(--color-text); letter-spacing: -0.2px; }
.sale-record-form .form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--spacing-md); }

.sale-history { margin-top: var(--spacing-lg); }
.sale-history h3 { 
    margin-bottom: var(--spacing-md); font-size: 15px; font-weight: 600; 
    color: var(--color-text); position: relative; padding-left: 12px;
}
.sale-history h3::before {
    content: ''; position: absolute; left: 0; top: 4px; width: 3px; height: calc(100% - 8px);
    border-radius: 3px; background: linear-gradient(180deg, var(--primary), var(--secondary));
}
.sale-record-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 13px 18px; border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: all var(--transition-fast); border-radius: var(--radius-sm);
}
.sale-record-item:hover { background: rgba(99, 102, 241, 0.03); }
.record-info { display: flex; gap: var(--spacing-lg); align-items: center; }
.record-amount { font-weight: 700; color: #059669; font-size: 15px; }
.record-date { color: var(--color-text-light); font-size: 12px; }
.record-note { color: var(--color-text-lighter); font-size: 12px; }
.record-actions { display: flex; gap: 6px; }


