/* 引入Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* 全局字体设置 */
body, .modal, .modal-content, .bubble-toast, input, textarea, button {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 标签样式 */
.tab-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-item:hover {
    background-color: #f0f0f0;
}

.tab-content {
    transition: opacity 0.3s ease;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #667eea;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

#customerForm {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.form-fields {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    flex-shrink: 0;
    background: #fff;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    line-height: normal;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-default {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e1e5e9;
}

.btn-default:hover {
    background-color: #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-height: 600px) {
    .modal-content {
        margin: 5% auto;
        max-height: 90vh;
    }
    
    #customerForm {
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}

/* 气泡弹窗样式 */
.bubble-toast {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 180px;
    max-width: 80vw;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    z-index: 9999;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.bubble-toast.show {
    display: block;
    opacity: 1;
}

.bubble-toast.success {
    background: #52c41a;
}

.bubble-toast.error {
    background: #ff4d4f;
}

.bubble-toast.info {
    background: #1890ff;
}